|
|
|
@ -29,6 +29,7 @@ import org.springframework.web.bind.annotation.*;
|
|
|
|
|
import javax.validation.constraints.Min;
|
|
|
|
|
import javax.validation.constraints.NotNull;
|
|
|
|
|
import java.time.LocalDateTime;
|
|
|
|
|
import java.util.Arrays;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
@ -68,7 +69,7 @@ public class TaskUController {
|
|
|
|
|
static class ListTParam {
|
|
|
|
|
private int pageNum;
|
|
|
|
|
private int pageSize;
|
|
|
|
|
@Schema(title = "任务状态")
|
|
|
|
|
@Schema(title="任务状态",description = "0未上线;1已上线;2已结束")
|
|
|
|
|
private Integer status;
|
|
|
|
|
@Schema(title = "月份区间")
|
|
|
|
|
private Integer month;
|
|
|
|
@ -122,6 +123,8 @@ public class TaskUController {
|
|
|
|
|
|
|
|
|
|
@Data
|
|
|
|
|
static class CusNoteParam {
|
|
|
|
|
@Schema(title = "任务id")
|
|
|
|
|
private Integer taskId;
|
|
|
|
|
@NotNull(message = "顾客姓名不能为空")
|
|
|
|
|
@Schema(title = "顾客姓名")
|
|
|
|
|
private String customerName;
|
|
|
|
@ -144,10 +147,9 @@ public class TaskUController {
|
|
|
|
|
if (useId == null) {
|
|
|
|
|
return Result.fail(HttpStatusEnum.CUSTOM_EXCEPTION, "未找到该用户");
|
|
|
|
|
}
|
|
|
|
|
List<String> brandList = param.getBrandList();
|
|
|
|
|
customerActionNoteService.save(
|
|
|
|
|
new CustomerActionNote().setCustomerName(param.getCustomerName()).setTel(param.getTel()).setArea(param.getArea())
|
|
|
|
|
.setBrandList(brandList).setRemarks(param.getRemarks()).setProvideId(useId).setCreatAt(LocalDateTime.now()));
|
|
|
|
|
new CustomerActionNote().setCustomerName(param.getCustomerName()).setTel(param.getTel()).setArea(param.getArea()).setTaskId(param.getTaskId())
|
|
|
|
|
.setBrandList( new CustomUtil().listToString(param.getBrandList())).setRemarks(param.getRemarks()).setProvideId(useId).setCreatAt(LocalDateTime.now()));
|
|
|
|
|
return Result.success("上传完成");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -155,7 +157,14 @@ public class TaskUController {
|
|
|
|
|
@PostMapping("/customerNoteList")
|
|
|
|
|
@tokenValid
|
|
|
|
|
public Result customerNote(@Validated @RequestBody JSONObject obj, @RequestHeader(value = "token") @Parameter(name = "登录token") String token) {
|
|
|
|
|
return Result.success(customerActionNoteService.pageList(MybatisPlusUtil.SetPage(obj), new JwtUtil().parseOpenid(token)));
|
|
|
|
|
IPage<Map> iPage = customerActionNoteService.pageList(MybatisPlusUtil.SetPage(obj), new JwtUtil().parseOpenid(token));
|
|
|
|
|
List<Map> records = iPage.getRecords();
|
|
|
|
|
for(Map m:records){
|
|
|
|
|
if(m.get("brandList") !=null){
|
|
|
|
|
m.replace("brandList",new CustomUtil().stringToList(m.get("brandList").toString()));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return Result.success(iPage);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|