Browse Source

Merge remote-tracking branch 'origin/develop' into develop

FengChaoYu 10 months ago
parent
commit
9b6eec4f68

+ 1 - 1
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/logic/common/CommonLogic.java

@@ -92,7 +92,7 @@ public class CommonLogic {
         if (StringUtils.isBlank(device) && StringUtils.isBlank(appid)) {
             throw new RemoteServiceException("非法请求,缺少必须的参数");
         }
-     //   log.info("打印token:"+token);
+        log.info("打印token:"+token);
         AdminCompanyWechat adminCompanyWechat;
         User user = null;
         if (StringUtils.isBlank(device)) {

+ 5 - 2
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/logic/policy/WorkerLogic.java

@@ -306,10 +306,13 @@ public class WorkerLogic {
 
         int month = DateUtil.month(startTime);
         int month2 = DateUtil.month(policy.getEndTime());
+        int year = DateUtil.year(startTime);
+        int year2 = DateUtil.year(policy.getEndTime());
 
-        Integer integer = month2-month+1;
+
+        Integer integer =(year2-year)*12+( month2-month+1);
         if (integer > 12)
-            throw new RemoteServiceException("");
+            throw new RemoteServiceException("保险配置错误");
 
         BigDecimal price = this.getPayPrice(integer,policy);
 

+ 2 - 1
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/logic/user/UserLogic.java

@@ -1311,6 +1311,7 @@ public class UserLogic {
         user.updateById();
 
         if (CollectionUtils.isNotEmpty(workerImgs)) {
+            workerImgService.lambdaUpdate().eq(WorkerImg::getWebsitId,currentCompanyWechat.getUserId()).remove();
             for (WorkerImg workerImg : workerImgs) {
                 workerImg.setWebsitId(websitId);
                 workerImg.setWorkerId(currentCompanyWechat.getUserId());
@@ -1318,7 +1319,7 @@ public class UserLogic {
             workerImgService.saveBatch(workerImgs);
         }
 
-        if (userApplyBean.getWorkerPolicy()!= null) {
+        if (userApplyBean.getWorkerPolicy()!= null && userApplyBean.getStartTime() != null) {
             userApplyBean.getWorkerPolicy().insert();
         }
     }

+ 1 - 1
mall-server-api/src/main/java/com/gree/mall/manager/logic/common/WechatLogic.java

@@ -878,7 +878,7 @@ public class WechatLogic {
         //receiver.put("name",name);
         receiver.put("relation_type", "STAFF");
         //添加分账人
-        ProfitSharingService profitSharingService = this.getPayWebstiService(companyWechatId,source).getProfitSharingService();
+        ProfitSharingService profitSharingService = this.getPayJaspWebstiService(companyWechatId,source).getProfitSharingService();
 
         ProfitSharingReceiverRequest profitSharingReceiverRequest = new ProfitSharingReceiverRequest();
         profitSharingReceiverRequest.setReceiver(JSONObject.toJSONString(receiver));

+ 1 - 1
mall-server-api/src/main/java/com/gree/mall/manager/logic/policy/WorkerManagerLogic.java

@@ -177,7 +177,7 @@ public class WorkerManagerLogic {
     @Transactional(rollbackFor = Exception.class)
     public void examineWait(WorkerManagerBean workerManagerBean) {
 
-
+        workerManagerBean.setWorkerNumber(workerManagerBean.getUser().getWorkerNumber());
         User user = userService.getById(workerManagerBean.getUserId());
 
         if (!StringUtil.isEmpty(user.getWorkerNumber())){