瀏覽代碼

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

FengChaoYu 3 周之前
父節點
當前提交
7e929c5aae

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

@@ -24,6 +24,7 @@ import com.gree.mall.miniapp.utils.RedisUtil;
 import com.gree.mall.miniapp.utils.StringUtil;
 import com.gree.mall.miniapp.utils.ocr.OCRUtil;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.http.client.utils.DateUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.util.CollectionUtils;
@@ -450,12 +451,19 @@ public class WorkerLogic {
             throw new RemoteServiceException("已拥有对应时间的保险");
 
         int month = DateUtil.month(startTime);
+
+        Mailbox mailbox = mailboxService.getById("1");
+        Date endTime = DateUtil.parseDateTime(DateUtils.formatDate(new Date(),"yyyy-MM-dd") +" "+ mailbox.getSendTime()+":00");
+
+        if (new Date().after(endTime) && DateUtil.offsetDay(startTime,2).month() != DateUtil.month(startTime)){
+            month = month+1;
+        }
+
         int month2 = DateUtil.month(policy.getEndTime());
         int year = DateUtil.year(startTime);
         int year2 = DateUtil.year(policy.getEndTime());
 
-
-        Integer integer =(year2-year)*12+( month2-month+1);
+        Integer integer =(year2-year)*12+(month2-month+1);
         if (integer > 12 || integer < 1)
             throw new RemoteServiceException("保险配置错误");
 
@@ -535,6 +543,10 @@ public class WorkerLogic {
 
         PolicyOrder policyOrder = policyOrderService.getById(policyOrderId);
 
+        if (DateUtil.offsetMinute(policyOrder.getCreateTime(),5).before(new Date())){
+            throw new RemoteServiceException("订单超过五分钟支付时间,请刷新重新购买");
+        }
+
         AdminWebsit adminWebsit = adminWebsitService.getById(policyOrder.getWebsitId());
 
         if (StringUtil.isEmpty(adminWebsit.getPayWorkerCodeId()))

+ 21 - 1
mall-server-api/src/main/java/com/gree/mall/manager/bean/listvo/workorder/OrderBaseVO.java

@@ -18,7 +18,7 @@ import java.util.List;
 
 @ZfireField(tbName = "a")
 @Data
-public class OrderBaseVO     {
+public class OrderBaseVO  {
 
     @ZfireField(sortNum = 1,isQuery = false, ignoreSelect = true)
     @ApiModelProperty(value="服务单标识")
@@ -83,6 +83,26 @@ public class OrderBaseVO     {
     @ZfireField(sortNum = 12)
     @ApiModelProperty(value = "客户电话2")
     private String userMobile2;
+
+    @ZfireField(sortNum = 13)
+    @ApiModelProperty(value = "省")
+    private String province;
+
+
+    @ZfireField(sortNum = 13)
+    @ApiModelProperty(value = "市")
+    private String city;
+
+
+    @ZfireField(sortNum = 13)
+    @ApiModelProperty(value = "区")
+    private String area;
+
+
+    @ZfireField(sortNum = 13)
+    @ApiModelProperty(value = "街道")
+    private String street;
+
     @ZfireField(sortNum = 13)
     @ApiModelProperty(value = "详细地址")
     private String address;

+ 0 - 7
mall-server-api/src/main/java/com/gree/mall/manager/logic/policy/AgreementLogic.java

@@ -605,8 +605,6 @@ public class AgreementLogic {
 
 
 
-        List<MailboxReceive> mailboxReceives = mailboxReceiveService.lambdaQuery().eq(MailboxReceive::getMailboxId, mailbox.getId()).list();
-
 
         //意外保险发送邮件
         List<PolicyOrder> policyOrders = policyOrderService.lambdaQuery()
@@ -1140,11 +1138,6 @@ public class AgreementLogic {
         }
 
 
-
-
-        List<MailboxReceive> mailboxReceives = mailboxReceiveService.lambdaQuery().eq(MailboxReceive::getMailboxId, mailbox.getId()).list();
-
-
         //雇主保险发送邮件
         List<PolicyOrder> policyOrdersEm = policyOrderService.lambdaQuery()
                 .le(PolicyOrder::getCreateTime,endTime)