提交 514ecc79 作者: 沈振路

环境

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