Forráskód Böngészése

Merge branch 'saas' of http://git.dayaedu.com/yonge/mec into zx_saas_qrLogin

zouxuan 1 éve
szülő
commit
6cf2f2da1d

+ 3 - 2
mec-application/src/main/java/com/ym/mec/student/controller/SmsCodeController.java

@@ -44,9 +44,10 @@ public class SmsCodeController extends BaseController {
 
 
     @ApiOperation(value = "发送登录短信验证码")
     @ApiOperation(value = "发送登录短信验证码")
     @ApiImplicitParams({ @ApiImplicitParam(name = "mobile", value = "手机号", required = true, dataType = "String"),
     @ApiImplicitParams({ @ApiImplicitParam(name = "mobile", value = "手机号", required = true, dataType = "String"),
-            @ApiImplicitParam(name = "code", value = "验证码", required = true, dataType = "String") })
+            @ApiImplicitParam(name = "code", value = "验证码", required = true, dataType = "String"),
+            @ApiImplicitParam(name = "type", value = "验证码类型(register  login)", required = true, dataType = "String")})
     @PostMapping(value = "/sendSmsCode")
     @PostMapping(value = "/sendSmsCode")
-    public HttpResponseResult<Object> sendLoginVerifyCode1(String mobile, String code) throws Exception {
+    public HttpResponseResult<Object> sendLoginVerifyCode1(String mobile, String code,String type) throws Exception {
         if(StringUtils.isEmpty(mobile) || StringUtils.isEmpty(code)){
         if(StringUtils.isEmpty(mobile) || StringUtils.isEmpty(code)){
             return failed(SecurityConstants.PARAM_VERIFY_EXCEPTION);
             return failed(SecurityConstants.PARAM_VERIFY_EXCEPTION);
         }
         }

+ 11 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/page/SysCouponQueryInfo.java

@@ -19,6 +19,17 @@ public class SysCouponQueryInfo extends QueryInfo {
     @ApiModelProperty("优惠券类型")
     @ApiModelProperty("优惠券类型")
     private String typeDetail;
     private String typeDetail;
 
 
+    @ApiModelProperty(value = "0手动领取  1手动发放")
+    private Integer issuanceType;
+
+    public Integer getIssuanceType() {
+        return issuanceType;
+    }
+
+    public void setIssuanceType(Integer issuanceType) {
+        this.issuanceType = issuanceType;
+    }
+
     public String getTypeDetail() {
     public String getTypeDetail() {
         return typeDetail;
         return typeDetail;
     }
     }

+ 21 - 7
mec-biz/src/main/java/com/ym/mec/biz/service/impl/OrderPayOpsServiceImpl.java

@@ -18,6 +18,7 @@ import java.util.function.Consumer;
 import java.util.function.Function;
 import java.util.function.Function;
 
 
 import com.huifu.adapay.core.util.StringUtil;
 import com.huifu.adapay.core.util.StringUtil;
+import com.ym.mec.biz.service.*;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.redisson.api.RBucket;
 import org.redisson.api.RBucket;
 import org.redisson.api.RedissonClient;
 import org.redisson.api.RedissonClient;
@@ -42,12 +43,6 @@ import com.ym.mec.biz.dal.entity.TenantOrderRecord;
 import com.ym.mec.biz.dal.entity.TenantPaymentOrder;
 import com.ym.mec.biz.dal.entity.TenantPaymentOrder;
 import com.ym.mec.biz.dal.enums.DealStatusEnum;
 import com.ym.mec.biz.dal.enums.DealStatusEnum;
 import com.ym.mec.biz.dal.enums.PaymentChannelEnum;
 import com.ym.mec.biz.dal.enums.PaymentChannelEnum;
-import com.ym.mec.biz.service.HfMerchantConfigService;
-import com.ym.mec.biz.service.OrderPayOpsService;
-import com.ym.mec.biz.service.StudentPaymentOrderService;
-import com.ym.mec.biz.service.TenantConfigService;
-import com.ym.mec.biz.service.TenantOrderRecordService;
-import com.ym.mec.biz.service.TenantPaymentOrderService;
 import com.ym.mec.common.exception.BizException;
 import com.ym.mec.common.exception.BizException;
 import com.ym.mec.common.page.WrapperUtil;
 import com.ym.mec.common.page.WrapperUtil;
 import com.ym.mec.thirdparty.adapay.ConfigInit;
 import com.ym.mec.thirdparty.adapay.ConfigInit;
@@ -58,6 +53,8 @@ import com.ym.mec.util.date.DateUtil;
 import com.ym.mec.util.http.HttpUtil;
 import com.ym.mec.util.http.HttpUtil;
 import com.ym.mec.util.json.JsonUtil;
 import com.ym.mec.util.json.JsonUtil;
 
 
+import static com.ym.mec.biz.dal.enums.OrderTypeEnum.MALL_BUY;
+
 /**
 /**
  * @author hgw
  * @author hgw
  * Created by 2021-12-22
  * Created by 2021-12-22
@@ -116,7 +113,24 @@ public class OrderPayOpsServiceImpl implements OrderPayOpsService {
             //签名验证
             //签名验证
             checkSing(payParam);
             checkSing(payParam);
             String baseApiUrl = sysConfigDao.findConfigValue("base_api_url");
             String baseApiUrl = sysConfigDao.findConfigValue("base_api_url");
-            payParam.setNotifyUrl(baseApiUrl + "/api-student/studentOrder/callback/" + payParam.getOrderNo());
+            if(studentPaymentOrder.getType() == MALL_BUY){
+                String paymentChannelStr = sysConfigDao.findConfigValue(SysConfigService.PAYMENT_CHANNEL);
+                if(StringUtils.isBlank(paymentChannelStr)) {
+                    paymentChannelStr = PaymentChannelEnum.ADAPAY.getCode();
+                }
+                PaymentChannelEnum paymentChannel = PaymentChannelEnum.codeOf(paymentChannelStr);
+                String notifyUrl = "";
+                if (PaymentChannelEnum.YEEPAY == paymentChannel){
+                    notifyUrl = baseApiUrl + "/api-mall-portal/payment/callback_yee/" + studentPaymentOrder.getTenantId();
+                }else if (PaymentChannelEnum.ADAPAY == paymentChannel){
+                    notifyUrl = baseApiUrl + "/api-mall-portal/payment/callback";
+                }else {
+                    throw new BizException("支付渠道错误");
+                }
+                payParam.setNotifyUrl(notifyUrl);
+            }else {
+                payParam.setNotifyUrl(baseApiUrl + "/api-student/studentOrder/callback/" + payParam.getOrderNo());
+            }
 
 
             //如果以上操作都没有 则应该是这一个,因为老代码就是这样写的。
             //如果以上操作都没有 则应该是这一个,因为老代码就是这样写的。
             payment = student(payParam);
             payment = student(payParam);

+ 4 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/SmsCodeServiceImpl.java

@@ -2,6 +2,7 @@ package com.ym.mec.biz.service.impl;
 
 
 import java.util.List;
 import java.util.List;
 
 
+import com.ym.mec.auth.api.enums.YesOrNoEnum;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
@@ -42,6 +43,9 @@ public class SmsCodeServiceImpl implements SmsCodeService {
 		SysUser sysUser = sysUserFeignService.queryUserByMobile(mobile);
 		SysUser sysUser = sysUserFeignService.queryUserByMobile(mobile);
 		Integer userId = null;
 		Integer userId = null;
 		if (sysUser != null) {
 		if (sysUser != null) {
+			if(sysUser.getLockFlag() == 9 || sysUser.getLockFlag() == 1 || sysUser.getDelFlag() == YesOrNoEnum.YES) {
+				throw new BizException("账号已冻结,请联系管理员");
+			}
 			userId = sysUser.getId();
 			userId = sysUser.getId();
 		}
 		}
 		SysConfig sysConfig = sysConfigService.findByParamName(SysConfigService.SMS_MAX_TIMES);
 		SysConfig sysConfig = sysConfigService.findByParamName(SysConfigService.SMS_MAX_TIMES);

+ 2 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/SysCouponServiceImpl.java

@@ -74,6 +74,8 @@ public class SysCouponServiceImpl extends BaseServiceImpl<Integer, SysCoupon> im
                 oldCoupon.setWarningStatus(0);
                 oldCoupon.setWarningStatus(0);
             }
             }
             oldCoupon.setUseCondition(sysCoupon.getUseCondition());
             oldCoupon.setUseCondition(sysCoupon.getUseCondition());
+            oldCoupon.setStartDate(sysCoupon.getStartDate());
+            oldCoupon.setEndDate(sysCoupon.getEndDate());
             sysCouponDao.update(oldCoupon);
             sysCouponDao.update(oldCoupon);
         } else {
         } else {
             switch (sysCoupon.getType()) {
             switch (sysCoupon.getType()) {

+ 3 - 0
mec-biz/src/main/resources/config/mybatis/SysCouponMapper.xml

@@ -152,6 +152,9 @@
 			<if test="search != null and search != ''">
 			<if test="search != null and search != ''">
 				AND (id_=#{search} OR name_ LIKE CONCAT('%', #{search}, '%'))
 				AND (id_=#{search} OR name_ LIKE CONCAT('%', #{search}, '%'))
 			</if>
 			</if>
+			<if test="issuanceType != null">
+				AND issuance_type_ = #{issuanceType}
+			</if>
 			<if test="typeDetail != null and typeDetail != ''">
 			<if test="typeDetail != null and typeDetail != ''">
 				and #{typeDetail} = type_detail_
 				and #{typeDetail} = type_detail_
 			</if>
 			</if>

+ 2 - 2
mec-mall/mall-portal/src/main/resources/logback-spring.xml

@@ -63,7 +63,7 @@
 	</springProfile>
 	</springProfile>
 
 
 	<springProfile name="pre">
 	<springProfile name="pre">
-		<root level="WARN">
+		<root level="INFO">
 			<appender-ref ref="plumelog" />
 			<appender-ref ref="plumelog" />
 			<appender-ref ref="file" />
 			<appender-ref ref="file" />
 		</root>
 		</root>
@@ -71,7 +71,7 @@
 
 
 	<!--生产环境:输出到文件 -->
 	<!--生产环境:输出到文件 -->
 	<springProfile name="prod">
 	<springProfile name="prod">
-		<root level="WARN">
+		<root level="INFO">
 			<appender-ref ref="file" />
 			<appender-ref ref="file" />
 			<appender-ref ref="plumelog" />
 			<appender-ref ref="plumelog" />
 		</root>
 		</root>