Prechádzať zdrojové kódy

Merge remote-tracking branch 'origin/master'

huangpeng 4 mesiacov pred
rodič
commit
b7685f293c

+ 1 - 1
zhsw-common/src/main/java/com/rongwei/zhsw/system/utils/ZHSWCommonUtils.java

@@ -53,7 +53,7 @@ public class ZHSWCommonUtils {
 
     public static SysUserVo getCurrentUser() {
         // 获取当前登录人信息
-        SysUserVo currUser = null;
+        SysUserVo currUser = new SysUserVo();
         log.info("开始获取当前用户登录信息");
         ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
         log.info("attributes:{}",attributes);

+ 5 - 4
zhsw-common/src/main/java/com/rongwei/zhsw/system/wechat/impl/AccountServiceImpl.java

@@ -66,10 +66,10 @@ public class AccountServiceImpl implements AccountService {
             log.error("户号不存在:{}", accountBindVo.getAccountNum());
             throw new CustomException("户号不存在!");
         }
-        if (!swUserManagementVo.getUsername().equals(accountBindVo.getAccountName())) {
-            log.error("户名错误");
-            throw new CustomException("户名错误!");
-        }
+        // if (!swUserManagementVo.getUsername().equals(accountBindVo.getPhoneNum())) {
+        //     log.error("户名错误");
+        //     throw new CustomException("户名错误!");
+        // }
         String openId = WeChatUtils.getCurrentWeChatOpenId();
         if (swUserManagementVo.getWechatSign().contains(openId)) {
             log.error("当前户号已绑定");
@@ -90,6 +90,7 @@ public class AccountServiceImpl implements AccountService {
         // swUserWechat.setPhone(accountBindVo.getPhone());
         swUserWechat.setUserno(swUserManagementVo.getUsernumber());
         swUserWechat.setUsername(swUserManagementVo.getUsername());
+        swUserWechat.setPhone(accountBindVo.getPhoneNum());
         swUserWechat.setWechatsign(openId);
         swUserWechat.setUserid(swUserManagementVo.getId());
         swUserWechat.setCreatedate(new Date());

+ 6 - 3
zhsw-common/src/main/java/com/rongwei/zhsw/system/wechat/impl/RefundServiceImpl.java

@@ -81,7 +81,12 @@ public class RefundServiceImpl implements RefundService {
             log.error("参数异常");
             throw new CustomException("缴费记录id为空,参数异常");
         }
-
+        // 退款申请
+        SwRefundRequestRecordDO swRefundRequestRecordDO = swRefundRequestRecordService.getById(refundRequestId);
+        if(StringUtils.isNotBlank(swRefundRequestRecordDO.getMerchantrefundnumber())){
+            log.error("退款申请已发起");
+            throw new CustomException("退款申请已发起,请勿重新发起");
+        }
         SwEnterpriseConfigInfoDo swEnterpriseConfigInfoDo = swEnterpriseConfigInfoService.getOne(new LambdaQueryWrapper<SwEnterpriseConfigInfoDo>().eq(BaseDo::getDeleted, "0"));
         if (swEnterpriseConfigInfoDo == null) {
             log.error("无法获取企业配置信息");
@@ -118,8 +123,6 @@ public class RefundServiceImpl implements RefundService {
             log.error("支付参数:商户密钥 为空");
             throw new CustomException("商户支付配置错误,请联系系统管理员!");
         }
-        // 退款申请
-        SwRefundRequestRecordDO swRefundRequestRecordDO = swRefundRequestRecordService.getById(refundRequestId);
         if (swRefundRequestRecordDO.getPaymentrecordid() == null) {
             log.error("无法获取退款申请");
             throw new CustomException("无法获取退款申请");

+ 2 - 0
zhsw-entity/src/main/java/com/rongwe/zhsw/system/vo/AccountBindVo.java

@@ -23,6 +23,8 @@ public class AccountBindVo {
     private String groupType;
     // 是否默认户号
     private Boolean defaultAccount;
+    // 手机号
+    private String phoneNum;
 
     private List<String> otherDsKey =new ArrayList<>();
 }