Browse Source

是否开启在线支付按钮、主页代缴信息状态筛选

QAQ 陈 4 months ago
parent
commit
df5c031c4c

+ 7 - 6
zhsw-common/src/main/java/com/rongwei/zhsw/system/wechat/impl/AccountServiceImpl.java

@@ -135,6 +135,7 @@ public class AccountServiceImpl implements AccountService {
         // 获取所有待缴费账单
         List<SwBillManagementUnpaidDo> outstandingBills = swBillManagementUnpaidService.list(new LambdaQueryWrapper<SwBillManagementUnpaidDo>()
                 .eq(SwBillManagementUnpaidDo::getDeleted, 0)
+                .eq(SwBillManagementUnpaidDo::getStatus,2)
                 .eq(SwBillManagementUnpaidDo::getUsernumber, accountNumber));
         WeChatHomePageVo weChatHomePageVo = new WeChatHomePageVo();
         BeanUtils.copyProperties(list.get(0), weChatHomePageVo);
@@ -189,16 +190,16 @@ public class AccountServiceImpl implements AccountService {
                 }
             }
         }
-        
+
         // 检查该户号是否还有其他微信绑定记录
         long count = swUserWechatService.count(new LambdaQueryWrapper<SwUserWechatDo>()
                 .eq(SwUserWechatDo::getUserno, account)
                 .ne(SwUserWechatDo::getWechatsign, currentWeChatOpenId)
                 .eq(SwUserWechatDo::getDeleted, 0));
-                
+
         // 删除绑定关系
         swUserManagementService.getBaseMapper().unbindAccount(dsKey, currentWeChatOpenId, account);
-        
+
         // 如果没有其他微信绑定该户号,则将WECHATBINDSTATUS设置为null
         if (count == 0) {
             swUserManagementService.update(new LambdaUpdateWrapper<SwUserManagementDo>()
@@ -256,14 +257,14 @@ public class AccountServiceImpl implements AccountService {
     public R updateReadStatusAll(ReadStatusVo readStatusVo) {
         //获取微信标识
         String openId = WeChatUtils.getCurrentWeChatOpenId();
-        
+
         // 获取参数
         String account = readStatusVo.getAccount();
         String deKey = readStatusVo.getDeKey();
-        
+
         // 更新所有消息读取状态
         sysNotifyAnnounceUserDao.updateReadStatusAll(account, deKey, openId);
-        
+
         return R.ok("更新成功");
     }
 

+ 8 - 0
zhsw-common/src/main/java/com/rongwei/zhsw/system/wechat/impl/PayMentServiceImpl.java

@@ -77,6 +77,14 @@ public class PayMentServiceImpl implements PayMentService {
         String merchantprivatekey = swEnterpriseConfigInfoDo.getMerchantprivatekey();
         String merchantserialnumber = swEnterpriseConfigInfoDo.getMerchantserialnumber();
         String merchantsecretkey = swEnterpriseConfigInfoDo.getMerchantsecretkey();
+        String whethertopayonline = swEnterpriseConfigInfoDo.getWhethertopayonline();
+
+        // 如果不允许在线支付,返回错误信息(包含状态信息)
+        if ("n".equalsIgnoreCase(whethertopayonline)) {
+            log.error("当前系统不允许在线缴费,配置值: {}", whethertopayonline);
+            String errorMessage = String.format("系统维护中,请稍后缴费|%s", whethertopayonline);
+            return R.error(errorMessage);
+        }
         if (StringUtils.isBlank(enterpriseno)) {
             log.error("支付参数:企业编号 为空");
             throw new CustomException("商户支付配置错误,请联系系统管理员!");

+ 1 - 1
zhsw-common/src/main/java/com/rongwei/zhsw/system/wechat/impl/PaymentRecordServiceImpl.java

@@ -97,7 +97,7 @@ public class PaymentRecordServiceImpl implements PaymentRecordService {
             paymentRecord.put("allfeewaiver", record.getAllfeewaiver());
             paymentRecord.put("latefees", record.getLatefees());
             paymentRecord.put("oughttohavepaid", record.getOughttohavepaid());
-            paymentRecord.put("actualdue", record.getActualdue());
+            paymentRecord.put("actualdue", record.getPaidin());
             paymentRecord.put("usernumber", record.getUsernumber());
 
             // 关联的账单列表

+ 5 - 0
zhsw-entity/src/main/java/com/rongwe/zhsw/system/domain/SwEnterpriseConfigInfoDo.java

@@ -131,4 +131,9 @@ public class SwEnterpriseConfigInfoDo extends BaseDo implements Serializable {
     private int notificationdays;
 
     private String gzhmc;
+
+    /**
+     * 是否开启在线缴费
+     */
+    private String whethertopayonline;
 }