‘linchangsheng’ hai 6 meses
pai
achega
178432ec47

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

@@ -12,6 +12,7 @@ import com.gree.mall.manager.bean.policy.*;
 import com.gree.mall.manager.commonmapper.PolicyCMapper;
 import com.gree.mall.manager.constant.Constant;
 import com.gree.mall.manager.enums.*;
+import com.gree.mall.manager.exception.RemoteServiceException;
 import com.gree.mall.manager.logic.common.CommonLogic;
 import com.gree.mall.manager.plus.entity.*;
 import com.gree.mall.manager.plus.service.*;
@@ -269,14 +270,18 @@ public class AgreementLogic {
             //发邮件
             try {
                 this.sendEmailFile(mailboxSendRecordPolicies, mailboxSendRecord, mailbox,emailUtilsNew);
-                mailboxSendRecord.setSendStatus("OK");
-                mailboxSendRecord.setSendTime(new Date());
-                mailboxSendRecord.updateById();
+                MailboxSendRecord mailboxSendRecord1 = new MailboxSendRecord();
+                mailboxSendRecord1.setId(mailboxSendRecord.getId());
+                mailboxSendRecord1.setSendStatus("OK");
+                mailboxSendRecord1.setSendTime(new Date());
+                mailboxSendRecord1.updateById();
             } catch (Exception e) {
                 log.error("发送意外保险失败"+e.toString());
-                mailboxSendRecord.setSendStatus("NO");
-                mailboxSendRecord.setSendTime(new Date());
-                mailboxSendRecord.updateById();
+                MailboxSendRecord mailboxSendRecord1 = new MailboxSendRecord();
+                mailboxSendRecord1.setId(mailboxSendRecord.getId());
+                mailboxSendRecord1.setSendStatus("NO");
+                mailboxSendRecord1.setSendTime(new Date());
+                mailboxSendRecord1.updateById();
             }
         }
 
@@ -285,14 +290,18 @@ public class AgreementLogic {
             //发邮件
             try {
                 this.sendEmailFileEm(mailboxSendRecordPolicies, mailboxSendRecord, mailbox,emailUtilsNew);
-                mailboxSendRecord.setSendStatus("OK");
-                mailboxSendRecord.setSendTime(new Date());
-                mailboxSendRecord.updateById();
+                MailboxSendRecord mailboxSendRecord1 = new MailboxSendRecord();
+                mailboxSendRecord1.setId(mailboxSendRecord.getId());
+                mailboxSendRecord1.setSendStatus("OK");
+                mailboxSendRecord1.setSendTime(new Date());
+                mailboxSendRecord1.updateById();
             } catch (Exception e) {
                 log.error("发送雇主保险失败"+e.toString());
-                mailboxSendRecord.setSendStatus("NO");
-                mailboxSendRecord.setSendTime(new Date());
-                mailboxSendRecord.updateById();
+                MailboxSendRecord mailboxSendRecord1 = new MailboxSendRecord();
+                mailboxSendRecord1.setId(mailboxSendRecord.getId());
+                mailboxSendRecord1.setSendStatus("NO");
+                mailboxSendRecord1.setSendTime(new Date());
+                mailboxSendRecord1.updateById();
             }
         }
 
@@ -302,14 +311,18 @@ public class AgreementLogic {
             //发邮件
             try {
                 this.sendEmailFileIn(mailboxSendRecordPolicies, mailboxSendRecord, mailbox,emailUtilsNew);
-                mailboxSendRecord.setSendStatus("OK");
-                mailboxSendRecord.setSendTime(new Date());
-                mailboxSendRecord.updateById();
+                MailboxSendRecord mailboxSendRecord1 = new MailboxSendRecord();
+                mailboxSendRecord1.setId(mailboxSendRecord.getId());
+                mailboxSendRecord1.setSendStatus("OK");
+                mailboxSendRecord1.setSendTime(new Date());
+                mailboxSendRecord1.updateById();
             } catch (Exception e) {
                 log.error("发送工伤保险失败"+e.toString());
-                mailboxSendRecord.setSendStatus("NO");
-                mailboxSendRecord.setSendTime(new Date());
-                mailboxSendRecord.updateById();
+                MailboxSendRecord mailboxSendRecord1 = new MailboxSendRecord();
+                mailboxSendRecord1.setId(mailboxSendRecord.getId());
+                mailboxSendRecord1.setSendStatus("NO");
+                mailboxSendRecord1.setSendTime(new Date());
+                mailboxSendRecord1.updateById();
             }
         }
 

+ 6 - 0
mall-server-api/src/main/resources/mapper/WebsitSalesCMapper.xml

@@ -192,6 +192,12 @@
         <if test="overTime != null and overTime !=''">
             AND a.create_time between  #{overTime} and #{overEndTime}
         </if>
+        <if test="ex.adminWebsitIds != null and ex.adminWebsitIds.size > 0">
+            AND d.websit_id IN
+            <foreach item="item" index="index" collection="ex.adminWebsitIds" open="(" separator="," close=")">
+                #{item}
+            </foreach>
+        </if>
         GROUP BY
           b.worker_number,a.order_small_type,b.websit_id
     </select>