Commit f4a1a049 by 徐高华

朋友圈

parent e982a112
...@@ -126,9 +126,12 @@ ...@@ -126,9 +126,12 @@
a.task_status taskStatus a.task_status taskStatus
from tab_haoban_qw_moment_plan_attend a left join tab_haoban_qw_moment_plan b on a.plan_id = b.plan_id from tab_haoban_qw_moment_plan_attend a left join tab_haoban_qw_moment_plan b on a.plan_id = b.plan_id
where a.plan_id = #{planId} and a.store_id = #{storeId} where a.plan_id = #{planId} and a.store_id = #{storeId}
<if test="null != execClerkId"> <if test="null != execClerkId and execClerkId !='' ">
and a.clerk_id = #{execClerkId} and a.clerk_id = #{execClerkId}
</if> </if>
<if test="null != clerkId and clerkId !='' ">
and a.clerk_id = #{clerkId}
</if>
<if test="null != taskStatus and taskStatus==0"> <if test="null != taskStatus and taskStatus==0">
and a.task_status = 1 and b.end_date <![CDATA[ <= ]]> now() and a.task_status = 1 and b.end_date <![CDATA[ <= ]]> now()
</if> </if>
......
...@@ -32,6 +32,7 @@ import com.gic.log.record.util.GicLogRecordCategoryEnum; ...@@ -32,6 +32,7 @@ import com.gic.log.record.util.GicLogRecordCategoryEnum;
import com.gic.log.record.util.GicLogRecordEvaluationContext; import com.gic.log.record.util.GicLogRecordEvaluationContext;
import com.gic.log.record.util.GicLogRecordOptTypeEnum; import com.gic.log.record.util.GicLogRecordOptTypeEnum;
import com.gic.web.common.utils.SessionContextUtils; import com.gic.web.common.utils.SessionContextUtils;
import com.google.common.collect.Sets;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
...@@ -43,6 +44,7 @@ import org.springframework.web.bind.annotation.ResponseBody; ...@@ -43,6 +44,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -136,23 +138,33 @@ public class QwMomentController { ...@@ -136,23 +138,33 @@ public class QwMomentController {
}else if(oldPlanClerkType==1 && newPlanClerkTyp==0) { }else if(oldPlanClerkType==1 && newPlanClerkTyp==0) {
this.otherLog("执行人类型","部分导购","全部导购" , logList) ; this.otherLog("执行人类型","部分导购","全部导购" , logList) ;
}else if(oldPlanClerkType==1 && newPlanClerkTyp==1) { }else if(oldPlanClerkType==1 && newPlanClerkTyp==1) {
}
/*if(planClerkType == 1) {
List<String> oldClerkIdList = oldDTO.getClerkList().stream().map(o->o.getClerkId()).collect(Collectors.toList()); List<String> oldClerkIdList = oldDTO.getClerkList().stream().map(o->o.getClerkId()).collect(Collectors.toList());
List<String> newClerkIdList = newDTO.getClerkList().stream().map(o->o.getClerkId()).collect(Collectors.toList()); List<String> newClerkIdList = newDTO.getClerkList().stream().map(o->o.getClerkId()).collect(Collectors.toList());
this.otherLog("指定导购",oldClerkIdList.size()+"个",newClerkIdList.size()+"个",logList) ; String del = "" ;
if(CollectionUtils.isNotEmpty(differenceList(oldClerkIdList,newClerkIdList)) && String add = "" ;
CollectionUtils.isNotEmpty(differenceList(newClerkIdList,oldClerkIdList))) { for(String clerkId : oldClerkIdList) {
String s1 = oldDTO.getClerkList().stream().map(o->o.getClerkName()).collect(Collectors.joining("、")) ; List<String> nameList = new ArrayList<>() ;
String s2 = newDTO.getClerkList().stream().map(o->o.getClerkName()).collect(Collectors.joining("、")) ; if(!newClerkIdList.contains(clerkId)) {
this.otherLog("指定导购",s1,s2,logList) ; nameList.add(clerkId);
}
if(CollectionUtils.isNotEmpty(nameList)) {
del = nameList.stream().collect(Collectors.joining("、")) ;
}
}
for(String clerkId : newClerkIdList) {
List<String> nameList = new ArrayList<>() ;
if(!oldClerkIdList.contains(clerkId)) {
nameList.add(clerkId);
}
if(CollectionUtils.isNotEmpty(nameList)) {
add = nameList.stream().collect(Collectors.joining("、")) ;
}
} }
}*/
}
if(!oldDTO.getMediaInfo().equals(newDTO.getMediaInfo())) { if(!oldDTO.getMediaInfo().equals(newDTO.getMediaInfo())) {
logList.add("变更朋友圈配置"); logList.add("变更朋友圈配置");
} }
// 1立即发布2定时发布 // 1立即发布2定时发布
int oldPublishType = oldDTO.getPublishType() ; int oldPublishType = oldDTO.getPublishType() ;
int newPublishType = newDTO.getPublishType() ; int newPublishType = newDTO.getPublishType() ;
...@@ -172,6 +184,14 @@ public class QwMomentController { ...@@ -172,6 +184,14 @@ public class QwMomentController {
return logList.stream().filter(o->StringUtils.isNotBlank(o)).collect(Collectors.joining(";")); return logList.stream().filter(o->StringUtils.isNotBlank(o)).collect(Collectors.joining(";"));
} }
private static List<String> differenceList(List<String> list1, List<String> list2) {
if (CollectionUtils.isNotEmpty(list1) && CollectionUtils.isNotEmpty(list2)) {
Sets.SetView<String> setView = Sets.difference(Sets.newHashSet(list1), Sets.newHashSet(list2));
return setView.stream().collect(Collectors.toList());
}
return Collections.emptyList();
}
private String otherLog(String s1, String s2, String s3 , List<String> logList) { private String otherLog(String s1, String s2, String s3 , List<String> logList) {
if(null == s2) { if(null == s2) {
s2 = "" ; s2 = "" ;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment