|
@@ -7,6 +7,7 @@ import com.caimei365.manager.entity.ResponseJson;
|
|
|
import com.caimei365.manager.entity.caimei.CmShop;
|
|
|
import com.caimei365.manager.entity.caimei.cmUser.*;
|
|
|
import com.caimei365.manager.service.caimei.user.CustomerService;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Controller;
|
|
@@ -21,6 +22,7 @@ import javax.servlet.http.HttpServletRequest;
|
|
|
* @author : Charles
|
|
|
* @date : 2023/9/5
|
|
|
*/
|
|
|
+@Slf4j
|
|
|
@RestController
|
|
|
@RequestMapping("/user/customer")
|
|
|
public class CustomerApi {
|
|
@@ -126,7 +128,8 @@ public class CustomerApi {
|
|
|
* @return
|
|
|
*/
|
|
|
@PostMapping("/saveInformation")
|
|
|
- public ResponseJson saveInformationNotes(HttpServletRequest request, CmInformationNotes cmInformationNotes) {
|
|
|
+ public ResponseJson saveInformationNotes(HttpServletRequest request,@RequestBody CmInformationNotes cmInformationNotes) {
|
|
|
+ log.info("cmInformationNotes====="+cmInformationNotes);
|
|
|
if (null == cmInformationNotes.getInformationId()) {
|
|
|
return ResponseJson.error(-1, "游客Id不能为空", null);
|
|
|
}
|
|
@@ -492,89 +495,4 @@ public class CustomerApi {
|
|
|
}
|
|
|
return customerService.getPageShopKeyword(shopId, startTime, endTime, pageNum, pageSize);
|
|
|
}
|
|
|
-
|
|
|
- /**
|
|
|
- * 意向数据列表
|
|
|
- * @param shopId
|
|
|
- * @param startTime
|
|
|
- * @param endTime
|
|
|
- * @param pageNum
|
|
|
- * @param pageSize
|
|
|
- * @return
|
|
|
- */
|
|
|
- @GetMapping("/getIntentionUserList")
|
|
|
- public ResponseJson<PaginationVo<CmShopIntentionUser>> getIntentionUserList(Integer shopId, String startTime, String endTime,
|
|
|
- @RequestParam(value = "pageNum", defaultValue = "1") int pageNum,
|
|
|
- @RequestParam(value = "pageSize",defaultValue = "20") int pageSize) {
|
|
|
- if (null == shopId) {
|
|
|
- return ResponseJson.error(-1, "供应商Id不能为空", null);
|
|
|
- }
|
|
|
- return customerService.getIntentionUserList(shopId, startTime, endTime, pageNum, pageSize);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 保存意向客户数据
|
|
|
- * @param cmShopIntentionUser
|
|
|
- * @return
|
|
|
- */
|
|
|
- @PostMapping("/saveIntentionUser")
|
|
|
- public ResponseJson saveIntentionUser(CmShopIntentionUser cmShopIntentionUser) {
|
|
|
- if (null == cmShopIntentionUser.getShopId()) {
|
|
|
- return ResponseJson.error(-1, "供应商Id不能为空", null);
|
|
|
- }
|
|
|
- if (null == cmShopIntentionUser.getStartTime()) {
|
|
|
- return ResponseJson.error(-1, "统计开始时间不能为空", null);
|
|
|
- }
|
|
|
- if (null == cmShopIntentionUser.getEndTime()) {
|
|
|
- return ResponseJson.error(-1, "统计结束时间不能为空", null);
|
|
|
- }
|
|
|
- if (null == cmShopIntentionUser.getAppReadingVolume()) {
|
|
|
- return ResponseJson.error(-1, "公众号阅读量不能为空", null);
|
|
|
- }
|
|
|
- if (null == cmShopIntentionUser.getRedReadingVolume()) {
|
|
|
- return ResponseJson.error(-1, "小红书阅读量不能为空", null);
|
|
|
- }
|
|
|
- if (null == cmShopIntentionUser.getWbReadingVolume()) {
|
|
|
- return ResponseJson.error(-1, "微博阅读量不能为空", null);
|
|
|
- }
|
|
|
- if (null == cmShopIntentionUser.getOtherReadingVolume()) {
|
|
|
- return ResponseJson.error(-1, "其他渠道阅读量不能为空", null);
|
|
|
- }
|
|
|
- if (null == cmShopIntentionUser.getIntentionStrong()) {
|
|
|
- return ResponseJson.error(-1, "意向强烈人数不能为空", null);
|
|
|
- }
|
|
|
- if (null == cmShopIntentionUser.getIntentionOrdinary()) {
|
|
|
- return ResponseJson.error(-1, "意向普通人数不能为空", null);
|
|
|
- }
|
|
|
- return customerService.saveIntentionUser(cmShopIntentionUser);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 删除意向客户数据
|
|
|
- * @param id
|
|
|
- * @return
|
|
|
- */
|
|
|
- @GetMapping("/renewIntentionUser")
|
|
|
- public ResponseJson renewIntentionUser(Integer id) {
|
|
|
- if (null == id) {
|
|
|
- return ResponseJson.error(-1, "id不能为空", null);
|
|
|
- }
|
|
|
- return customerService.renewIntentionUser(id);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 添加意向客户数据总结
|
|
|
- * @param id
|
|
|
- * @return
|
|
|
- */
|
|
|
- @GetMapping("/renewIntentionNote")
|
|
|
- public ResponseJson renewIntentionNote(Integer id, String note) {
|
|
|
- if (null == id) {
|
|
|
- return ResponseJson.error(-1, "意向客户数据id不能为空", null);
|
|
|
- }
|
|
|
- if (StringUtils.isBlank(note)) {
|
|
|
- return ResponseJson.error(-1, "意向客户数据总结不能为空", null);
|
|
|
- }
|
|
|
- return customerService.renewIntentionNote(id, note);
|
|
|
- }
|
|
|
}
|