Commit e982a112 by 徐高华

朋友圈

parent e1cf975b
......@@ -68,6 +68,19 @@ public class QwMomentPlanDTO implements Serializable{
// 选择的导购id列表
private List<String> selectClerkIdList ;
/**
* 参与导购列表
*/
private List<QwMomentPlanAttendDTO> clerkList ;
public List<QwMomentPlanAttendDTO> getClerkList() {
return clerkList;
}
public void setClerkList(List<QwMomentPlanAttendDTO> clerkList) {
this.clerkList = clerkList;
}
public Integer getTaskClerkNum() {
return taskClerkNum;
}
......
package com.gic.haoban.manage.api.qdto.moment;
import com.gic.api.base.commons.BasePageInfo;
import java.io.Serializable;
public class PlanListWxaQDTO implements Serializable {
public class PlanListWxaQDTO extends BasePageInfo {
private String wxEnterpriseId ;
private String enterpriseId ;
......
package com.gic.haoban.manage.api.qdto.moment;
import com.gic.api.base.commons.BasePageInfo;
import java.io.Serializable;
public class TaskListWxaQDTO implements Serializable {
public class TaskListWxaQDTO extends BasePageInfo {
private String wxEnterpriseId ;
private String enterpriseId ;
......
......@@ -229,6 +229,11 @@ public class QwMomentPlanServiceImpl implements QwMomentPlanService {
public ServiceResponse<QwMomentPlanDTO> detail(Long planId) {
TabQwMomentPlan plan = this.qwMomentPlanMapper.getById(planId);
QwMomentPlanDTO dto = EntityUtil.changeEntityByJSON(QwMomentPlanDTO.class,plan) ;
// 获取参与导购
if(dto.getPlanClerkType()==1) {
List<QwMomentPlanAttendDTO> clerkList = this.qwMomentPlanAttendMapper.listClerk(planId) ;
dto.setClerkList(clerkList);
}
return ServiceResponse.success(dto);
}
......
......@@ -43,6 +43,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
......@@ -122,51 +123,52 @@ public class QwMomentController {
List<String> logList = new ArrayList<>();
this.otherLog("活动标题",oldDTO.getTitle(),newDTO.getTitle() , logList) ;
this.otherLog("活动描述",oldDTO.getRemark(),newDTO.getRemark() , logList) ;
//this.otherLog("执行方式",oldDTO.getRemark(),newDTO.getRemark() , logList) ;
/* this.otherLog("变更任务时间", DateUtil.dateToStr(oldDTO.getBeginDate(),"yyyy-MM-dd")+"至"+DateUtil.dateToStr(oldDTO.getEndDate(),"yyyy-MM-dd"),
DateUtil.dateToStr(newDTO.getBeginDate(),"yyyy-MM-dd")+"至"+DateUtil.dateToStr(newDTO.getEndDate(),"yyyy-MM-dd"),logList) ;
// this.otherLog2("修改了任务图片",oldDTO.getImg(),newDTO.getImg(),logList) ;
this.otherLog("任务说明",oldDTO.getRemark(),newDTO.getRemark(),logList) ;
if(!oldDTO.getMediaInfo().equals(newDTO.getMediaInfo())) {
logList.add("变更朋友圈配置");
}
if(newDTO.getPublishType()==1) {
if(oldDTO.getPublishType()==2) {
this.otherLog("发布时间", "定时发布", "立即发布", logList);
}
}else {
if(oldDTO.getPublishType()==1) {
this.otherLog("发布时间","立即发布",DateUtil.dateToStr(newDTO.getPublishTime(),"yyyy-MM-dd HH:mm"),logList) ;
}else {
this.otherLog("发布时间",DateUtil.dateToStr(oldDTO.getPublishTime(),"yyyy-MM-dd HH:mm"),DateUtil.dateToStr(oldDTO.getPublishTime(),"yyyy-MM-dd HH:mm"),logList) ;
}
}*/
/* // 指定人群
if(oldDTO.getTaskType()!= ClerkTaskTypeEnum.CONTENT.getType()) {
this.otherLog("指定人群",this.rqLogTitle(oldDTO.getMemberType()),this.rqLogTitle(newDTO.getMemberType()),logList) ;
}
// 召回规则订单渠道
if(oldDTO.getTaskType() == ClerkTaskTypeEnum.ORDER.getType()) {
this.otherLog("召回规则订单渠道",this.channelName(enterpriseId,oldDTO.getOrderChannels()),this.channelName(enterpriseId,newDTO.getOrderChannels()),logList) ;
}
// 添加规则
if(oldDTO.getTaskType() == ClerkTaskTypeEnum.QW.getType()) {
String s = this.otherLog("添加规则",this.qwRule(oldDTO.getQwRule()),this.qwRule(newDTO.getQwRule()),logList) ;
String s1= this.qwNotMemberFlag(oldDTO.getQwNotMemberFlag(),newDTO.getQwNotMemberFlag(),StringUtils.isBlank(s)) ;
logList.add(s1) ;
String oldExecType = "" ;
String newExecType = "" ;
this.otherLog("执行方式",oldExecType,newExecType , logList) ;
// 0全部导购 1部分导购
int oldPlanClerkType = oldDTO.getPlanClerkType() ;
int newPlanClerkTyp = newDTO.getPlanClerkType() ;
if(oldPlanClerkType==0 && newPlanClerkTyp==1) {
this.otherLog("执行人类型","全部导购","部分导购" , logList) ;
}else if(oldPlanClerkType==1 && newPlanClerkTyp==0) {
this.otherLog("执行人类型","部分导购","全部导购" , logList) ;
}else if(oldPlanClerkType==1 && newPlanClerkTyp==1) {
}
// 指定导购
if(oldDTO.getTaskMode() == 2) {
/*if(planClerkType == 1) {
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());
this.otherLog("指定导购",oldClerkIdList.size()+"个",newClerkIdList.size()+"个",logList) ;
*//*if(CollectionUtils.isNotEmpty(differenceList(oldClerkIdList,newClerkIdList)) &&
CollectionUtils.isNotEmpty(differenceList(newClerkIdList,oldClerkIdList))) {
if(CollectionUtils.isNotEmpty(differenceList(oldClerkIdList,newClerkIdList)) &&
CollectionUtils.isNotEmpty(differenceList(newClerkIdList,oldClerkIdList))) {
String s1 = oldDTO.getClerkList().stream().map(o->o.getClerkName()).collect(Collectors.joining("、")) ;
String s2 = newDTO.getClerkList().stream().map(o->o.getClerkName()).collect(Collectors.joining("、")) ;
this.otherLog("指定导购",s1,s2,logList) ;
}*//*
}
}*/
if(!oldDTO.getMediaInfo().equals(newDTO.getMediaInfo())) {
logList.add("变更朋友圈配置");
}
// 1立即发布2定时发布
int oldPublishType = oldDTO.getPublishType() ;
int newPublishType = newDTO.getPublishType() ;
if(oldPublishType==2 && newPublishType==1) {
Date publishTime = oldDTO.getPublishTime() ;
this.otherLog("发送时间","定时发布-"+DateUtil.dateToStr(publishTime,"yyyy-MM-dd HH:mm:ss"),"立即发布" , logList) ;
}else if(oldPublishType==2 && newPublishType==2) {
Date oldPublishTime = oldDTO.getPublishTime() ;
Date newPublishTime = oldDTO.getPublishTime() ;
this.otherLog("发送时间",DateUtil.dateToStr(oldPublishTime,"yyyy-MM-dd HH:mm:ss"),DateUtil.dateToStr(newPublishTime,"yyyy-MM-dd HH:mm:ss") , logList) ;
}
int oldExpireDays = oldDTO.getExpireDays() ;
int newExpireDays = newDTO.getExpireDays() ;
this.otherLog("失效时间",oldExpireDays+"天后",newExpireDays+"天后" , logList) ;
return logList.stream().filter(o->StringUtils.isNotBlank(o)).collect(Collectors.joining(";"));
}
......@@ -288,13 +290,9 @@ public class QwMomentController {
HaobanQwMomentPlanVO vo = EntityUtil.changeEntityByJSON(HaobanQwMomentPlanVO.class, detaiResp.getResult());
// 部分导购
if(vo.getPlanClerkType()==1) {
PlanClerkListQDTO clerkQDTO = new PlanClerkListQDTO() ;
clerkQDTO.setPlanId(planId);
clerkQDTO.setPageNum(1);
clerkQDTO.setPageSize(10000);
ServiceResponse<Page<QwMomentPlanAttendDTO>> clerkResp = this.qwMomentApiService.attendList(clerkQDTO) ;
if(clerkResp.isSuccess() && CollectionUtils.isNotEmpty(clerkResp.getResult().getResult())) {
List<ClerkVO> list = clerkResp.getResult().getResult().stream().map(o->{
List<QwMomentPlanAttendDTO> clerkList = detaiResp.getResult().getClerkList() ;
if(CollectionUtils.isNotEmpty(clerkList)) {
List<ClerkVO> list = clerkList.stream().map(o->{
ClerkVO clerkVO = new ClerkVO();
clerkVO.setClerkId(o.getClerkId());
clerkVO.setClerkCode(o.getClerkCode());
......
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