Commit c66bcbf0 by 谢海旭

[+]新增单个更新客户阶段接口

1 parent 8f044a0b
...@@ -48,6 +48,11 @@ public class SopCustomerSearch extends Page { ...@@ -48,6 +48,11 @@ public class SopCustomerSearch extends Page {
private String sopFollowUpPersonId; private String sopFollowUpPersonId;
/** /**
* 客户旅程跟进人手机号
*/
private String sopFollowUpPersonPhone;
/**
* 进入sop旅程时间-开始 * 进入sop旅程时间-开始
*/ */
private String sopJourneyEnterTimeBegin; private String sopJourneyEnterTimeBegin;
......
package cn.com.glsx.process.modules.model;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
/**
* 更新单个旅程客户数据数据体
*/
@Data
public class SopJourneyStageUpdate {
/**
* 组织ID/门店id/商户号
*/
@NotEmpty
private String orgId;
/**
* 客户旅程id
*/
@NotEmpty
private String sopJourneyId;
/**
* oneId
*/
@NotEmpty
private String oneId;
/**
* 目标客户旅程阶段
*/
@NotEmpty
private String sopJourneyStage;
/**
* 操作人/登陆的账号名称
*/
@NotEmpty
private String oprBy;
}
...@@ -3,6 +3,7 @@ package cn.com.glsx.process.modules.client; ...@@ -3,6 +3,7 @@ package cn.com.glsx.process.modules.client;
import cn.com.glsx.cdp.modules.model.customer.CustomerSopJourneyDTO; import cn.com.glsx.cdp.modules.model.customer.CustomerSopJourneyDTO;
import cn.com.glsx.cdp.modules.model.customer.CustomerSopJourneyDetailDTO; import cn.com.glsx.cdp.modules.model.customer.CustomerSopJourneyDetailDTO;
import cn.com.glsx.cdp.modules.model.customer.CustomerSopJourneySearch; import cn.com.glsx.cdp.modules.model.customer.CustomerSopJourneySearch;
import cn.com.glsx.cdp.modules.model.customer.ModifySopJourneyStageRequest;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.glsx.plat.core.web.Result; import com.glsx.plat.core.web.Result;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
...@@ -30,4 +31,8 @@ public interface CustomerSopJourneyFeignClient_T { ...@@ -30,4 +31,8 @@ public interface CustomerSopJourneyFeignClient_T {
@Operation(description = "获取客户旅程详情") @Operation(description = "获取客户旅程详情")
@GetMapping("/detail") @GetMapping("/detail")
Result<CustomerSopJourneyDetailDTO> detail(@RequestParam("orgId") String orgId, @RequestParam("sopJourneyId") String sopJourneyId, @RequestParam("oneId") String oneId); Result<CustomerSopJourneyDetailDTO> detail(@RequestParam("orgId") String orgId, @RequestParam("sopJourneyId") String sopJourneyId, @RequestParam("oneId") String oneId);
@Operation(description = "修改客户旅程")
@PostMapping("/sopJourneyStage/modify")
Result<Boolean> modifyStage(@RequestBody ModifySopJourneyStageRequest request);
} }
...@@ -7,6 +7,7 @@ import cn.com.glsx.process.modules.entity.SopInst; ...@@ -7,6 +7,7 @@ import cn.com.glsx.process.modules.entity.SopInst;
import cn.com.glsx.process.modules.model.SopCustomerSearch; import cn.com.glsx.process.modules.model.SopCustomerSearch;
import cn.com.glsx.process.modules.model.SopInstDTO; import cn.com.glsx.process.modules.model.SopInstDTO;
import cn.com.glsx.process.modules.model.SopInstSearch; import cn.com.glsx.process.modules.model.SopInstSearch;
import cn.com.glsx.process.modules.model.SopJourneyStageUpdate;
import cn.com.glsx.process.modules.service.SopInstService; import cn.com.glsx.process.modules.service.SopInstService;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.glsx.plat.core.annotation.ResponseResultBody; import com.glsx.plat.core.annotation.ResponseResultBody;
...@@ -48,6 +49,18 @@ public class SopInstController extends BaseController { ...@@ -48,6 +49,18 @@ public class SopInstController extends BaseController {
return sopInstService.customers(search); return sopInstService.customers(search);
} }
@Operation(summary = "单个更新旅程客户阶段", description = "单个更新旅程客户阶段")
@PostMapping("/customers/stageUpdate")
public Result<Boolean> stageUpdate(@Validated @RequestBody SopJourneyStageUpdate body) {
return sopInstService.stageUpdate(body);
}
// @Operation(summary = "查询模板实例客户分页列表", description = "查询模板实例客户分页列表")
// @GetMapping("/customers/export")
// public Result<PageInfo<CustomerSopJourneyDTO>> customersExport(SopCustomerSearch search) {
// return null;
// }
@Operation(summary = "查询模板实例客户详细信息", description = "查询模板实例客户详细信息") @Operation(summary = "查询模板实例客户详细信息", description = "查询模板实例客户详细信息")
@GetMapping("/customers/detail") @GetMapping("/customers/detail")
public Result<CustomerSopJourneyDetailDTO> customerDetail(SopCustomerSearch search) { public Result<CustomerSopJourneyDetailDTO> customerDetail(SopCustomerSearch search) {
......
...@@ -4,6 +4,7 @@ import cn.com.glsx.cdp.api.customer.CustomerSopJourneyFeignClient; ...@@ -4,6 +4,7 @@ import cn.com.glsx.cdp.api.customer.CustomerSopJourneyFeignClient;
import cn.com.glsx.cdp.modules.model.customer.CustomerSopJourneyDTO; import cn.com.glsx.cdp.modules.model.customer.CustomerSopJourneyDTO;
import cn.com.glsx.cdp.modules.model.customer.CustomerSopJourneyDetailDTO; import cn.com.glsx.cdp.modules.model.customer.CustomerSopJourneyDetailDTO;
import cn.com.glsx.cdp.modules.model.customer.CustomerSopJourneySearch; import cn.com.glsx.cdp.modules.model.customer.CustomerSopJourneySearch;
import cn.com.glsx.cdp.modules.model.customer.ModifySopJourneyStageRequest;
import cn.com.glsx.process.modules.client.CustomerSopJourneyFeignClient_T; import cn.com.glsx.process.modules.client.CustomerSopJourneyFeignClient_T;
import cn.com.glsx.process.modules.converter.SopInstConverter; import cn.com.glsx.process.modules.converter.SopInstConverter;
import cn.com.glsx.process.modules.converter.SopTplConverter; import cn.com.glsx.process.modules.converter.SopTplConverter;
...@@ -11,10 +12,7 @@ import cn.com.glsx.process.modules.converter.SopTplLinKConverter; ...@@ -11,10 +12,7 @@ import cn.com.glsx.process.modules.converter.SopTplLinKConverter;
import cn.com.glsx.process.modules.converter.SopTplNodeConverter; import cn.com.glsx.process.modules.converter.SopTplNodeConverter;
import cn.com.glsx.process.modules.entity.*; import cn.com.glsx.process.modules.entity.*;
import cn.com.glsx.process.modules.mapper.*; import cn.com.glsx.process.modules.mapper.*;
import cn.com.glsx.process.modules.model.SopCustomerSearch; import cn.com.glsx.process.modules.model.*;
import cn.com.glsx.process.modules.model.SopInstDTO;
import cn.com.glsx.process.modules.model.SopInstSearch;
import cn.com.glsx.process.modules.model.SopTplDTO;
import cn.com.glsx.process.modules.model.enums.SopInstStatusEnum; import cn.com.glsx.process.modules.model.enums.SopInstStatusEnum;
import cn.com.glsx.process.modules.rabbitmq.MsgProducer; import cn.com.glsx.process.modules.rabbitmq.MsgProducer;
import cn.com.glsx.process.modules.rabbitmq.RabbitMQConstants; import cn.com.glsx.process.modules.rabbitmq.RabbitMQConstants;
...@@ -365,6 +363,8 @@ public class SopInstService { ...@@ -365,6 +363,8 @@ public class SopInstService {
String sopFollowUpPersonId = search.getSopFollowUpPersonId(); String sopFollowUpPersonId = search.getSopFollowUpPersonId();
request.setSopFollowUpPersonIds(StringUtils.hasLength(sopFollowUpPersonId)? Lists.newArrayList(sopFollowUpPersonId): null); request.setSopFollowUpPersonIds(StringUtils.hasLength(sopFollowUpPersonId)? Lists.newArrayList(sopFollowUpPersonId): null);
request.setSopFollowUpPersonPhone(search.getSopFollowUpPersonPhone());
request.setSopJourneyEnterTimeBegin(search.getSopJourneyEnterTimeBegin()); request.setSopJourneyEnterTimeBegin(search.getSopJourneyEnterTimeBegin());
request.setSopJourneyEnterTimeEnd(search.getSopJourneyEnterTimeEnd()); request.setSopJourneyEnterTimeEnd(search.getSopJourneyEnterTimeEnd());
return customerSopJourneyFeignClientT.pageCustomerSopJourney(request); return customerSopJourneyFeignClientT.pageCustomerSopJourney(request);
...@@ -379,4 +379,20 @@ public class SopInstService { ...@@ -379,4 +379,20 @@ public class SopInstService {
public Result<CustomerSopJourneyDetailDTO> customerDetail(SopCustomerSearch search) { public Result<CustomerSopJourneyDetailDTO> customerDetail(SopCustomerSearch search) {
return customerSopJourneyFeignClientT.detail(search.getOrgId(), search.getSopJourneyId(), search.getOneId()); return customerSopJourneyFeignClientT.detail(search.getOrgId(), search.getSopJourneyId(), search.getOneId());
} }
/**
* 单个更新旅程客户阶段
*
* @param body
* @return
*/
public Result<Boolean> stageUpdate(SopJourneyStageUpdate body) {
ModifySopJourneyStageRequest request = new ModifySopJourneyStageRequest();
request.setOrgId(body.getOrgId());
request.setSopJourneyId(body.getSopJourneyId());
request.setOneIds(Lists.newArrayList(body.getOneId()));
request.setSopJourneyStage(body.getSopJourneyStage());
request.setOprBy(body.getOprBy());
return customerSopJourneyFeignClientT.modifyStage(request);
}
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!