Commit eedb2d9f by 王祖波

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

parents f2c2dcd4 e4991117
......@@ -139,13 +139,15 @@ public class ContactFollowServiceImpl implements ContactFollowService {
page.setResult(Collections.emptyList());
return page;
}
int totalCount = list.size();
int totalCount = 500;
int pageSize = pageInfo.getPageSize();
int pageNum = pageInfo.getPageNum();
int totalPage = (int) Math.ceil((double) totalCount / pageSize);
int fromIndex = Math.max((pageNum - 1) * pageSize, 0);
fromIndex = Math.min(fromIndex, list.size());
int toIndex = Math.min(fromIndex + pageSize, totalCount);
toIndex = Math.min(toIndex, list.size());
List<ContactFollowDTO> pageList = list.subList(fromIndex, toIndex);
......@@ -168,7 +170,7 @@ public class ContactFollowServiceImpl implements ContactFollowService {
DateTime startTime = DateUtil.offsetMonth(date, -6);
BasePageInfo basePage = new BasePageInfo();
basePage.setPageNum(1);
basePage.setPageNum(sizeTotal);
basePage.setPageSize(sizeTotal);
ServiceResponse<Page<AiMemberLogListDTO>> aiRes = aiMemberLogApiService.pageAiMemberMarketingLog(memberId, "", aiThirdStatus,
DateUtil.formatDate(startTime), DateUtil.formatDate(date), new HashMap<>(), basePage);
if (aiRes != null && aiRes.getResult() != null && CollectionUtils.isNotEmpty(aiRes.getResult().getResult())) {
......@@ -207,7 +209,7 @@ public class ContactFollowServiceImpl implements ContactFollowService {
followDTO = new ContactFollowDTO();
followDTO.setMemberId(aiMemberLog.getMemberId());
followDTO.setFollowType(ContactFollowTypeEnum.AI.getCode());
followDTO.setFollowRemark(ContactFollowTypeEnum.AI.getDescription());
followDTO.setFollowRemark(ContactFollowTypeEnum.AI.getTextMatch());
followDTO.setFollowTime(aiMemberLog.getAiTime());
followDTO.setEnterpriseId(enterpriseId);
list.add(followDTO);
......@@ -223,7 +225,7 @@ public class ContactFollowServiceImpl implements ContactFollowService {
followDTO = new ContactFollowDTO();
followDTO.setMemberId(smsLog.getMemberId());
followDTO.setFollowType(ContactFollowTypeEnum.SMS.getCode());
followDTO.setFollowRemark(ContactFollowTypeEnum.SMS.getDescription());
followDTO.setFollowRemark(ContactFollowTypeEnum.SMS.getTextMatch());
followDTO.setFollowTime(smsLog.getCreateDate());
followDTO.setEnterpriseId(enterpriseId);
list.add(followDTO);
......
......@@ -78,16 +78,28 @@ public class InteractRecordApiServiceImpl implements InteractRecordApiService {
}
Integer eventType = interactRecordQDTO.getEventTypeAggs();
if (eventType != null) {
List<Integer> bizTypeList = searchQo.getBizTypeList();
if (Objects.equals(eventType, InteractRecordEventType.MATERIAL.getCode())) {
searchQo.setEventTypeList(Lists.newArrayList(MaterialInteractRecordEventType.VISIT_MATERIAL.getCode(),MaterialInteractRecordEventType.VISIT_PRODUCT.getCode()));
List<Integer> bizTypeList = Optional.ofNullable(searchQo.getBizTypeList()).orElse(new ArrayList<>());
bizTypeList.add(ShareBizType.MATERIAL.getCode());
if (CollectionUtils.isEmpty(searchQo.getBizTypeList())) {
bizTypeList = Lists.newArrayList(ShareBizType.MATERIAL.getCode());
}else {
bizTypeList.retainAll(Lists.newArrayList(ShareBizType.MATERIAL.getCode()));
if (CollectionUtils.isEmpty(bizTypeList)) {
bizTypeList = Lists.newArrayList(-1);
}
}
searchQo.setBizTypeList(bizTypeList);
} else if (Objects.equals(bizType, ShareBizType.GOODS.getCode())) {
} else if (Objects.equals(eventType, ShareBizType.GOODS.getCode())) {
searchQo.setEventTypeList(Lists.newArrayList(MaterialInteractRecordEventType.VISIT_MATERIAL.getCode(),MaterialInteractRecordEventType.VISIT_PRODUCT.getCode()));
List<Integer> bizTypeList = Optional.ofNullable(searchQo.getBizTypeList()).orElse(new ArrayList<>());
bizTypeList.add(ShareBizType.GOODS.getCode());
bizTypeList.add(ShareBizType.MULTIPLE_GOODS.getCode());
if (CollectionUtils.isEmpty(searchQo.getBizTypeList())) {
bizTypeList = Lists.newArrayList(ShareBizType.GOODS.getCode(),ShareBizType.MULTIPLE_GOODS.getCode());
}else {
bizTypeList.retainAll(Lists.newArrayList(ShareBizType.GOODS.getCode(),ShareBizType.MULTIPLE_GOODS.getCode()));
if (CollectionUtils.isEmpty(bizTypeList)) {
bizTypeList = Lists.newArrayList(-1);
}
}
searchQo.setBizTypeList(bizTypeList);
}else {
searchQo.setEventTypeList(Lists.newArrayList(eventType));
......
......@@ -101,6 +101,10 @@ public class GroupChatPlanExcelVO extends Object implements Serializable{
}
public String getCompletionRate() {
if (null == this.staffCount || this.staffCount==0 || null == this.sendCount || 0==this.sendCount){
completionRate = "0%";
return completionRate;
}
Double i = 100.0 * this.sendCount / this.staffCount;
BigDecimal bd = new BigDecimal(i);
bd = bd.setScale(2, RoundingMode.HALF_UP);
......
......@@ -136,6 +136,7 @@ public class GroupChatPlanController {
@RequestMapping("staff-send-result")
public RestResponse<Void> staffSendResult(@RequestBody StaffSendResultQDTO qdto) {
logger.info("企微返回={}",JSONObject.toJSONString(qdto));
qdto.setSendTime(new Date());
this.groupChatPlanApiService.staffSendResult(qdto) ;
return RestResponse.successResult();
}
......
......@@ -177,6 +177,7 @@ public class QwMomentController {
@ResponseBody
public RestResponse<Void> finishTask(@RequestBody SendResultQDTO qdto) {
logger.info("完成任务={}",JSONObject.toJSONString(qdto)) ;
qdto.setSendTime(new Date());
this.qwMomentApiService.finishTask(qdto) ;
return RestResponse.successResult();
}
......
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