提交 0e0df895 作者: 沈振路

Merge branch 'customer_service_SZlu'

...@@ -44,12 +44,8 @@ public class SwaggerConfig { ...@@ -44,12 +44,8 @@ public class SwaggerConfig {
private ApiInfo apiInfo() { private ApiInfo apiInfo() {
return new ApiInfoBuilder() return new ApiInfoBuilder()
//标题 //标题
.title("Spring Boot2中采用Swagger2构建RESTful APIs") .title("运营系统=客服模块-接口文档")
.description("通过访问swagger-ui.html,实现接口测试、文档生成") .description("运营系统 = 客服模块")
.termsOfServiceUrl("http://localhost:8080")
//设置联系方式
.contact(new Contact("西红柿丶番茄", "https://blog.csdn.net/p_programmer", "xxxxx@qq.com"))
.version("1.0")
.build(); .build();
} }
} }
......
...@@ -27,28 +27,28 @@ public class CrowdPackageController { ...@@ -27,28 +27,28 @@ public class CrowdPackageController {
private CrowdPackageService crowdPackageService; private CrowdPackageService crowdPackageService;
@ApiOperation("保存") @ApiOperation("新增")
@PostMapping("/save") @PostMapping("/insert")
public BaseResult saveCrowdPackage(@RequestBody CrowdPackageSaveDTO saveDto) { public BaseResult insertCrowdPackage(@RequestBody CrowdPackageSaveDTO saveDto) {
return new BaseResult().success(); return crowdPackageService.insertCrowdPackage(saveDto);
} }
@ApiOperation("编辑") @ApiOperation("编辑")
@PostMapping("/edit") @PostMapping("/edit")
public BaseResult updateCrowdPackage(@RequestBody CrowdPackageSaveDTO saveDto) { public BaseResult updateCrowdPackage(@RequestBody CrowdPackageSaveDTO saveDto) {
return new BaseResult().success(); return crowdPackageService.updateCrowdPackage(saveDto);
} }
@ApiOperation("查询") @ApiOperation("查询")
@PostMapping("/pageList") @PostMapping("/pageList")
public GenericsResult<List<CrowdPackageListVO>> pageList(@RequestBody CrowdPackageQueryDTO queryDto) { public GenericsResult<List<CrowdPackageListVO>> pageList(@RequestBody CrowdPackageQueryDTO queryDto) {
return new GenericsResult<>(new ArrayList<>()); return crowdPackageService.pageList(queryDto);
} }
@ApiOperation("删除") @ApiOperation("删除")
@GetMapping("/remove/{id}") @GetMapping("/remove/{id}")
public BaseResult removeCrowdPackage(@PathVariable("id") Long id) { public BaseResult removeCrowdPackage(@PathVariable("id") Long id) {
return new BaseResult().success(); return crowdPackageService.removeCrowdPackage(id);
} }
......
...@@ -6,6 +6,7 @@ import com.yaoyaozw.customer.dto.customer.DelayCustomerQueryDTO; ...@@ -6,6 +6,7 @@ import com.yaoyaozw.customer.dto.customer.DelayCustomerQueryDTO;
import com.yaoyaozw.customer.dto.customer.DelayCustomerSaveDTO; import com.yaoyaozw.customer.dto.customer.DelayCustomerSaveDTO;
import com.yaoyaozw.customer.entity.DelayCustomer; import com.yaoyaozw.customer.entity.DelayCustomer;
import com.yaoyaozw.customer.service.DelayCustomerService; import com.yaoyaozw.customer.service.DelayCustomerService;
import com.yaoyaozw.customer.vo.customer.DelayCustomerListVO;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -27,9 +28,9 @@ public class DelayCustomerController { ...@@ -27,9 +28,9 @@ public class DelayCustomerController {
private DelayCustomerService delayCustomerService; private DelayCustomerService delayCustomerService;
@ApiOperation("保存") @ApiOperation("新增")
@PostMapping("/save") @PostMapping("/insert")
public BaseResult saveCrowdPackage(@RequestBody DelayCustomerSaveDTO saveDto) { public BaseResult insertCrowdPackage(@RequestBody DelayCustomerSaveDTO saveDto) {
return new BaseResult().success(); return new BaseResult().success();
} }
...@@ -41,7 +42,7 @@ public class DelayCustomerController { ...@@ -41,7 +42,7 @@ public class DelayCustomerController {
@ApiOperation("查询") @ApiOperation("查询")
@PostMapping("/pageList") @PostMapping("/pageList")
public GenericsResult<List<DelayCustomer>> pageList(@RequestBody DelayCustomerQueryDTO queryDto) { public GenericsResult<List<DelayCustomerListVO>> pageList(@RequestBody DelayCustomerQueryDTO queryDto) {
return new GenericsResult<>(new ArrayList<>()); return new GenericsResult<>(new ArrayList<>());
} }
......
package com.yaoyaozw.customer.dto.crowd; package com.yaoyaozw.customer.dto.crowd;
import com.yaoyaozw.customer.common.PageParams; import com.yaoyaozw.customer.common.PageParams;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
...@@ -10,10 +12,11 @@ import java.io.Serializable; ...@@ -10,10 +12,11 @@ import java.io.Serializable;
* @author darker * @author darker
* @date 2022/9/15 14:19 * @date 2022/9/15 14:19
*/ */
@EqualsAndHashCode(callSuper = true)
@Data @Data
public class CrowdPackageQueryDTO extends PageParams implements Serializable { @ApiModel("人群包列表查询条件")
public class CrowdPackageQueryDTO implements Serializable {
@ApiModelProperty("人群包名称关键词")
private String nameKeyword;
} }
package com.yaoyaozw.customer.dto.customer; package com.yaoyaozw.customer.dto.customer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
...@@ -9,5 +11,13 @@ import java.io.Serializable; ...@@ -9,5 +11,13 @@ import java.io.Serializable;
* @date 2022/9/15 11:15 * @date 2022/9/15 11:15
*/ */
@Data @Data
@ApiModel("图文素材")
public class DelayCustomerGraphicsDTO implements Serializable { public class DelayCustomerGraphicsDTO implements Serializable {
@ApiModelProperty("素材图片路径")
private String graphicsPicUrl;
@ApiModelProperty("素材文本内容")
private String graphicsContent;
} }
package com.yaoyaozw.customer.dto.customer; package com.yaoyaozw.customer.dto.customer;
import com.yaoyaozw.customer.common.PageParams; import com.yaoyaozw.customer.common.PageParams;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
...@@ -11,9 +13,17 @@ import java.io.Serializable; ...@@ -11,9 +13,17 @@ import java.io.Serializable;
* @date 2022/9/15 11:20 * @date 2022/9/15 11:20
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = true) @ApiModel("延时客服列表查询实体")
public class DelayCustomerQueryDTO extends PageParams implements Serializable { public class DelayCustomerQueryDTO implements Serializable {
@ApiModelProperty("人群包")
private Integer crowdPackageId;
@ApiModelProperty("消息名称关键词")
private String messageKeyword;
@ApiModelProperty("客服消息类型")
private Integer messageType;
} }
package com.yaoyaozw.customer.dto.customer; package com.yaoyaozw.customer.dto.customer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
...@@ -9,16 +11,22 @@ import java.io.Serializable; ...@@ -9,16 +11,22 @@ import java.io.Serializable;
* @date 2022/9/15 11:14 * @date 2022/9/15 11:14
*/ */
@Data @Data
@ApiModel("延时客服保存实体")
public class DelayCustomerSaveDTO implements Serializable { public class DelayCustomerSaveDTO implements Serializable {
@ApiModelProperty("人群包ID")
private Long crowdPackageId; private Long crowdPackageId;
@ApiModelProperty("客服消息名称")
private String messageName; private String messageName;
@ApiModelProperty("客服消息类型(图文、文本)")
private Integer messageType; private Integer messageType;
@ApiModelProperty("图文实体")
private DelayCustomerGraphicsDTO graphicsDto; private DelayCustomerGraphicsDTO graphicsDto;
@ApiModelProperty("文本实体")
private DelayCustomerTextDTO textDto; private DelayCustomerTextDTO textDto;
} }
package com.yaoyaozw.customer.dto.customer; package com.yaoyaozw.customer.dto.customer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
...@@ -9,5 +11,10 @@ import java.io.Serializable; ...@@ -9,5 +11,10 @@ import java.io.Serializable;
* @date 2022/9/15 11:16 * @date 2022/9/15 11:16
*/ */
@Data @Data
@ApiModel("延时客服文本实体")
public class DelayCustomerTextDTO implements Serializable { public class DelayCustomerTextDTO implements Serializable {
@ApiModelProperty("文本消息内容")
private String messageText;
} }
package com.yaoyaozw.customer.service; package com.yaoyaozw.customer.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.yaoyaozw.customer.common.BaseResult;
import com.yaoyaozw.customer.common.GenericsResult;
import com.yaoyaozw.customer.dto.crowd.CrowdPackageQueryDTO;
import com.yaoyaozw.customer.dto.crowd.CrowdPackageSaveDTO;
import com.yaoyaozw.customer.entity.CrowdPackage; import com.yaoyaozw.customer.entity.CrowdPackage;
import com.yaoyaozw.customer.vo.crowd.CrowdPackageListVO;
import java.util.List;
/** /**
* @author darker * @author darker
* @date 2022/9/16 12:03 * @date 2022/9/16 12:03
*/ */
public interface CrowdPackageService extends IService<CrowdPackage> { public interface CrowdPackageService extends IService<CrowdPackage> {
/**
* 插入人群包
*
* @param saveDto 保存dto
* @return {@link BaseResult}
*/
BaseResult insertCrowdPackage(CrowdPackageSaveDTO saveDto);
/**
* 人群更新包
*
* @param saveDto 保存dto
* @return {@link BaseResult}
*/
BaseResult updateCrowdPackage(CrowdPackageSaveDTO saveDto);
/**
* 页面列表
*
* @param queryDto 查询dto
* @return {@link GenericsResult}<{@link List}<{@link CrowdPackageListVO}>>
*/
GenericsResult<List<CrowdPackageListVO>> pageList(CrowdPackageQueryDTO queryDto);
/**
* 删除群包
*
* @param id id
* @return {@link BaseResult}
*/
BaseResult removeCrowdPackage(Long id);
} }
package com.yaoyaozw.customer.service.impl; package com.yaoyaozw.customer.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yaoyaozw.customer.common.BaseResult;
import com.yaoyaozw.customer.common.GenericsResult;
import com.yaoyaozw.customer.dto.crowd.CrowdPackageQueryDTO;
import com.yaoyaozw.customer.dto.crowd.CrowdPackageSaveDTO;
import com.yaoyaozw.customer.entity.CrowdPackage; import com.yaoyaozw.customer.entity.CrowdPackage;
import com.yaoyaozw.customer.mapper.MaterialCrowdPackageMapper; import com.yaoyaozw.customer.mapper.MaterialCrowdPackageMapper;
import com.yaoyaozw.customer.service.CrowdPackageService; import com.yaoyaozw.customer.service.CrowdPackageService;
import com.yaoyaozw.customer.vo.crowd.CrowdPackageListVO;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
/** /**
* @author darker * @author darker
* @date 2022/9/16 12:03 * @date 2022/9/16 12:03
*/ */
@Service @Service
public class CrowdPackageServiceImpl extends ServiceImpl<MaterialCrowdPackageMapper, CrowdPackage> implements CrowdPackageService { public class CrowdPackageServiceImpl extends ServiceImpl<MaterialCrowdPackageMapper, CrowdPackage> implements CrowdPackageService {
@Override
public BaseResult insertCrowdPackage(CrowdPackageSaveDTO saveDto) {
return new BaseResult().success();
}
@Override
public BaseResult updateCrowdPackage(CrowdPackageSaveDTO saveDto) {
return new BaseResult().success();
}
@Override
public GenericsResult<List<CrowdPackageListVO>> pageList(CrowdPackageQueryDTO queryDto) {
return new GenericsResult<>(new ArrayList<>());
}
@Override
public BaseResult removeCrowdPackage(Long id) {
return new BaseResult().success();
}
} }
...@@ -11,13 +11,28 @@ import java.io.Serializable; ...@@ -11,13 +11,28 @@ import java.io.Serializable;
* @date 2022/9/16 10:46 * @date 2022/9/16 10:46
*/ */
@Data @Data
@ApiModel @ApiModel("人群包列表实体")
public class CrowdPackageListVO implements Serializable { public class CrowdPackageListVO implements Serializable {
@ApiModelProperty("姓名") @ApiModelProperty("人群包主键")
private String name; private Long id;
@ApiModelProperty("年龄") @ApiModelProperty("人群包名称")
private Integer age; private String packageName;
@ApiModelProperty("人群包中的人数")
private Integer numOfCrowdInPackage;
@ApiModelProperty("创建时间")
private String createTime;
@ApiModelProperty("创建人")
private String createUser;
@ApiModelProperty("修改时间")
private String modifiedTime;
@ApiModelProperty("修改人")
private String modifiedUser;
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论