Sfoglia il codice sorgente

访客计划、线索相关bug修改

zhouyy 5 mesi fa
parent
commit
239547f2db

+ 1 - 1
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/controller/ProductController.java

@@ -167,7 +167,7 @@ public class ProductController {
                 msg.setError("存在已绑定到相关任务的产品,删除失败");
                 return msg;
             }
-            if(orderProductDetailService.count(new LambdaQueryWrapper<OrderProductDetail>().in(OrderProductDetail::getOrderId,idList))>0){
+            if(orderProductDetailService.count(new LambdaQueryWrapper<OrderProductDetail>().in(OrderProductDetail::getProductId,idList))>0){
                 msg.setError("存在关联订单的产品,删除失败");
                 return msg;
             }

+ 4 - 4
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/service/impl/VisitPlanServiceImpl.java

@@ -244,10 +244,10 @@ public class VisitPlanServiceImpl extends ServiceImpl<VisitPlanMapper, VisitPlan
             return httpRespMsg;
         }
         VisitPlan taskPlan = visitPlanMapper.selectById(planId);
-        if(1 == taskPlan.getFinishState()){
-            httpRespMsg.setError("无法修改已完成的计划");
-            return httpRespMsg;
-        }
+//        if(1 == taskPlan.getFinishState()){
+//            httpRespMsg.setError("无法修改已完成的计划");
+//            return httpRespMsg;
+//        }
         Date oldVisitTime = taskPlan.getVisitTime();
         long milliCosts = oldVisitTime.getTime() - now.getTime();
         if(milliCosts <= 30 * 60 * 1000 && milliCosts > 0){

+ 3 - 0
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/time/VisitPlanTask.java

@@ -15,6 +15,7 @@ import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
 import javax.annotation.Resource;
+import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
@@ -41,6 +42,7 @@ public class VisitPlanTask {
     public void checkRemindMessage() {
         Date now = new Date();
         System.out.println("===开始检查该分钟需提醒的访客计划==="+now);
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         List<VisitPlan> visitPlans = visitPlanMapper.getMinuteVisitPlans(now);
         System.out.println("需提醒计划数量为: "+visitPlans.size());
         List<WxCorpInfo> wxCorpInfos = wxCorpInfoMapper.selectList(null);
@@ -65,6 +67,7 @@ public class VisitPlanTask {
                 String join = StringUtils.join(wxIds, '|');
                 if (wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1&&StringUtils.isNotBlank(join)){
                     // getCorpwxUserid  以 | 隔开 可分割开放
+                    System.out.println("公司:"+companyId+"在时刻"+sdf.format(now)+"的访客ids=== "+entry.getValue().stream().map(VisitPlan::getId).collect(Collectors.toList()));
                     wxCorpInfoService.sendWXCorpMsg(wxCorpInfo,join,"访客计划提醒",null, WxCorpInfoServiceImpl.TEXT_CARD_MSG_VISIT_PLAN);
                 }
 

+ 3 - 3
fhKeeper/formulahousekeeper/management-crm/src/main/resources/mapper/ClueMapper.xml

@@ -518,13 +518,13 @@
         </if>
         order by c.need_pin desc,c.pin_time desc
         <choose>
-            <when test="isDesc == null">
+            <when test="clue.isDesc == null">
                 ,c.id DESC
             </when>
-            <when test="isDesc == 0">
+            <when test="clue.isDesc == 0">
                 ,sd.seq ASC, c.id DESC
             </when>
-            <when test="isDesc == 1">
+            <when test="clue.isDesc == 1">
                 ,sd.seq DESC, c.id DESC
             </when>
             <otherwise>

+ 1 - 1
fhKeeper/formulahousekeeper/management-crm/src/main/resources/mapper/CustomMapper.xml

@@ -547,7 +547,7 @@
         incharger_id,
         (select `name` from `user` where id = incharger_id) inchargerName,
         creator_id,
-        (select `name` from `user` where id = creator_id) creatorName,c.need_pin,c.pin_time
+        (select `name` from `user` where id = creator_id) creatorName,need_pin,pin_time
         from custom
         where company_id = #{companyId}
         and is_delete =#{isDelete}