Commit 357fa981 by 王祖波

Merge branch 'feature-recommend2' into developer

parents 3d9ad68d 9681a4f3
......@@ -486,6 +486,10 @@ public class QwMomentPlanServiceImpl implements QwMomentPlanService {
@Override
public void getMomentId(Long planId) {
TabQwMomentPlan plan = this.qwMomentPlanMapper.getById(planId) ;
if(null == plan) {
logger.info("计划已删除");
return;
}
String wxEnterpriseId =plan.getWxEnterpriseId() ;
WxEnterpriseQwDTO qwDTO = this.wxEnterpriseService.getQwInfo(wxEnterpriseId);
ServiceResponse<Object> resp2 = this.qywxExternalUserService.getMomentTaskResult(qwDTO.getThirdCorpid(),
......
......@@ -139,6 +139,9 @@ public class OfflinePreController {
if(StringUtils.isBlank(offlinePreId) || !offlinePreId.trim().chars().allMatch(Character::isDigit)) {
return RestResponse.failure("9999","参数错误") ;
}
if(offlinePreId.length()>18) {
return RestResponse.failure("9999","参数错误") ;
}
ServiceResponse<Void> countOfflinePre = offlinePreApiService.checkOfflinePreWriteOff(Long.valueOf(offlinePreId.trim()), storeId);
return JSONObject.parseObject(JSONObject.toJSONString(countOfflinePre, SerializerFeature.WriteMapNullValue), RestResponse.class);
}
......
......@@ -15,14 +15,18 @@ import com.gic.haoban.manage.api.service.contact.ContactFollowApiService;
import com.gic.haoban.manage.api.service.contact.ContactLogApiService;
import com.gic.haoban.manage.web.qo.contact.ContactFollowPageQO;
import com.gic.haoban.manage.web.qo.contact.ContactFollowQO;
import com.gic.haoban.manage.web.qo.contact.ContactLastFollowQO;
import com.gic.haoban.manage.web.qo.contact.ContactLogQO;
import com.google.common.collect.Lists;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
......@@ -63,6 +67,29 @@ public class ContactController {
}
/**
* 会员最后一次跟进记录
* @param contactLastFollowQO
* @return
*/
@RequestMapping(path = "/last-follow")
public RestResponse<ContactFollowDTO> lastFollow(@RequestBody ContactLastFollowQO contactLastFollowQO) {
String memberId = contactLastFollowQO.getMemberId();
String enterpriseId = contactLastFollowQO.getEnterpriseId();
if (StringUtils.isAnyBlank(memberId,enterpriseId)) {
return RestResponse.successResult();
}
ServiceResponse<Map<String, ContactFollowDTO>> serviceResponse = contactFollowApiService.mapMemberLastFollow(enterpriseId,null, Lists.newArrayList(memberId));
if (!serviceResponse.isSuccess()) {
return RestResponse.failure(serviceResponse.getCode(), serviceResponse.getMessage());
}
if (serviceResponse.getResult() == null) {
return RestResponse.successResult();
}
ContactFollowDTO contactFollowDTO = serviceResponse.getResult().get(memberId);
return RestResponse.successResult(contactFollowDTO);
}
/**
* 分页查询跟进记录
* @param contactFollowPageQO
* @return
......
package com.gic.haoban.manage.web.qo.contact;
import lombok.Data;
/**
* Created by wangzubo on 2025/3/15.
*/
@Data
public class ContactLastFollowQO {
/**
* 会员id列表
*/
private String memberId;
/**
* 企业id
*/
private String enterpriseId;
}
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