docs: swagger docs refacto & perf

This commit is contained in:
huchuansai
2025-06-12 10:23:22 +08:00
parent 725d14c125
commit d5a51faf8b
155 changed files with 3655 additions and 281 deletions

View File

@@ -6,6 +6,13 @@ import com.starry.admin.modules.custom.service.IPlayCustomFollowInfoService;
import com.starry.common.annotation.Log;
import com.starry.common.enums.BusinessType;
import com.starry.common.result.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
@@ -17,6 +24,7 @@ import javax.annotation.Resource;
* @author admin
* @since 2024-04-30
*/
@Api(tags = "顾客关注管理", description = "顾客关注店员信息管理相关接口,包括查询、新增、修改和删除等操作")
@RestController
@RequestMapping("/play/follow")
public class PlayCustomFollowInfoController {
@@ -26,9 +34,13 @@ public class PlayCustomFollowInfoController {
/**
* 查询顾客关注陪聊信息列表
*/
@ApiOperation(value = "分页查询关注列表", notes = "分页查询顾客关注店员信息列表")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayCustomFollowInfoEntity.class, responseContainer = "Page")
})
@PreAuthorize("@customSs.hasPermission('play:info:list')")
@GetMapping("/list")
public R list(PlayCustomFollowInfoEntity playCustomFollowInfo) {
public R list(@ApiParam(value = "查询条件") PlayCustomFollowInfoEntity playCustomFollowInfo) {
IPage<PlayCustomFollowInfoEntity> list = playCustomFollowInfoService.selectPlayCustomFollowInfoByPage(playCustomFollowInfo);
return R.ok(list);
}
@@ -36,6 +48,11 @@ public class PlayCustomFollowInfoController {
/**
* 获取顾客关注陪聊信息详细信息
*/
@ApiOperation(value = "获取关注详情", notes = "根据ID获取顾客关注店员详细信息")
@ApiImplicitParam(name = "id", value = "关注记录ID", required = true, paramType = "path", dataType = "String", example = "1")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayCustomFollowInfoEntity.class)
})
@PreAuthorize("@customSs.hasPermission('play:info:query')")
@GetMapping(value = "/{id}")
public R getInfo(@PathVariable("id") String id) {
@@ -45,10 +62,15 @@ public class PlayCustomFollowInfoController {
/**
* 新增顾客关注陪聊信息
*/
@ApiOperation(value = "新增关注记录", notes = "创建新的顾客关注店员信息")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功"),
@ApiResponse(code = 500, message = "添加失败")
})
@PreAuthorize("@customSs.hasPermission('play:info:create')")
@Log(title = "顾客关注陪聊信息", businessType = BusinessType.INSERT)
@PostMapping("/create")
public R create(@RequestBody PlayCustomFollowInfoEntity playCustomFollowInfo) {
public R create(@ApiParam(value = "关注信息", required = true) @RequestBody PlayCustomFollowInfoEntity playCustomFollowInfo) {
boolean success = playCustomFollowInfoService.create(playCustomFollowInfo);
if (success) {
return R.ok();
@@ -59,10 +81,16 @@ public class PlayCustomFollowInfoController {
/**
* 修改顾客关注陪聊信息
*/
@ApiOperation(value = "修改关注记录", notes = "根据ID修改顾客关注店员信息")
@ApiImplicitParam(name = "id", value = "关注记录ID", required = true, paramType = "path", dataType = "String", example = "1")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功"),
@ApiResponse(code = 500, message = "修改失败")
})
@PreAuthorize("@customSs.hasPermission('play:info:edit')")
@Log(title = "顾客关注陪聊信息", businessType = BusinessType.UPDATE)
@PostMapping(value = "/update/{id}")
public R update(@PathVariable String id, @RequestBody PlayCustomFollowInfoEntity playCustomFollowInfo) {
public R update(@PathVariable String id, @ApiParam(value = "关注信息", required = true) @RequestBody PlayCustomFollowInfoEntity playCustomFollowInfo) {
playCustomFollowInfo.setId(id);
boolean success = playCustomFollowInfoService.update(playCustomFollowInfo);
if (success) {
@@ -74,6 +102,11 @@ public class PlayCustomFollowInfoController {
/**
* 删除顾客关注陪聊信息
*/
@ApiOperation(value = "删除关注记录", notes = "根据ID批量删除顾客关注店员信息")
@ApiImplicitParam(name = "ids", value = "关注记录ID数组", required = true, paramType = "path", dataType = "String[]", example = "1,2,3")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = Integer.class)
})
@PreAuthorize("@customSs.hasPermission('play:info:remove')")
@Log(title = "顾客关注陪聊信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")

View File

@@ -6,6 +6,13 @@ import com.starry.admin.modules.custom.service.IPlayCustomGiftInfoService;
import com.starry.common.annotation.Log;
import com.starry.common.enums.BusinessType;
import com.starry.common.result.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@@ -16,6 +23,7 @@ import javax.annotation.Resource;
* @author admin
* @since 2024-06-05
*/
@Api(tags = "顾客礼物管理", description = "顾客与礼物关系管理相关接口,包括查询、新增、修改和删除等操作")
@RestController
@RequestMapping("/custom/giff")
public class PlayCustomGiftInfoController {
@@ -25,8 +33,12 @@ public class PlayCustomGiftInfoController {
/**
* 查询顾客和礼物关系列表
*/
@ApiOperation(value = "分页查询礼物列表", notes = "分页查询顾客与礼物关系列表")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayCustomGiftInfoEntity.class, responseContainer = "Page")
})
@GetMapping("/list")
public R list(PlayCustomGiftInfoEntity playCustomGiftInfo) {
public R list(@ApiParam(value = "查询条件") PlayCustomGiftInfoEntity playCustomGiftInfo) {
IPage<PlayCustomGiftInfoEntity> list = playCustomGiftInfoService.selectPlayCustomGiftInfoByPage(playCustomGiftInfo);
return R.ok(list);
}
@@ -34,6 +46,11 @@ public class PlayCustomGiftInfoController {
/**
* 获取顾客和礼物关系详细信息
*/
@ApiOperation(value = "获取礼物详情", notes = "根据ID获取顾客与礼物关系详细信息")
@ApiImplicitParam(name = "id", value = "礼物关系ID", required = true, paramType = "path", dataType = "String", example = "1")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayCustomGiftInfoEntity.class)
})
@GetMapping(value = "/{id}")
public R getInfo(@PathVariable("id") String id) {
return R.ok(playCustomGiftInfoService.selectPlayCustomGiftInfoById(id));
@@ -42,9 +59,14 @@ public class PlayCustomGiftInfoController {
/**
* 新增顾客和礼物关系
*/
@ApiOperation(value = "新增礼物关系", notes = "创建新的顾客与礼物关系信息")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功"),
@ApiResponse(code = 500, message = "添加失败")
})
@Log(title = "顾客和礼物关系", businessType = BusinessType.INSERT)
@PostMapping("/create")
public R create(@RequestBody PlayCustomGiftInfoEntity playCustomGiftInfo) {
public R create(@ApiParam(value = "礼物关系信息", required = true) @RequestBody PlayCustomGiftInfoEntity playCustomGiftInfo) {
boolean success = playCustomGiftInfoService.create(playCustomGiftInfo);
if (success) {
return R.ok();
@@ -55,9 +77,15 @@ public class PlayCustomGiftInfoController {
/**
* 修改顾客和礼物关系
*/
@ApiOperation(value = "修改礼物关系", notes = "根据ID修改顾客与礼物关系信息")
@ApiImplicitParam(name = "id", value = "礼物关系ID", required = true, paramType = "path", dataType = "String", example = "1")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功"),
@ApiResponse(code = 500, message = "修改失败")
})
@Log(title = "顾客和礼物关系", businessType = BusinessType.UPDATE)
@PostMapping(value = "/update/{id}")
public R update(@PathVariable String id, @RequestBody PlayCustomGiftInfoEntity playCustomGiftInfo) {
public R update(@PathVariable String id, @ApiParam(value = "礼物关系信息", required = true) @RequestBody PlayCustomGiftInfoEntity playCustomGiftInfo) {
playCustomGiftInfo.setId(id);
boolean success = playCustomGiftInfoService.update(playCustomGiftInfo);
if (success) {
@@ -69,6 +97,11 @@ public class PlayCustomGiftInfoController {
/**
* 删除顾客和礼物关系
*/
@ApiOperation(value = "删除礼物关系", notes = "根据ID批量删除顾客与礼物关系信息")
@ApiImplicitParam(name = "ids", value = "礼物关系ID数组", required = true, paramType = "path", dataType = "String[]", example = "1,2,3")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = Integer.class)
})
@Log(title = "顾客和礼物关系", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public R remove(@PathVariable String[] ids) {

View File

@@ -8,6 +8,13 @@ import com.starry.admin.modules.custom.service.IPlayCustomLeaveMsgService;
import com.starry.common.annotation.Log;
import com.starry.common.enums.BusinessType;
import com.starry.common.result.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@@ -19,6 +26,7 @@ import javax.annotation.Resource;
* @author admin
* @since 2024-05-07
*/
@Api(tags = "顾客留言管理", description = "顾客留言信息管理相关接口,包括查询、新增、修改和删除等操作")
@RestController
@RequestMapping("/custom/leave")
public class PlayCustomLeaveMsgController {
@@ -28,8 +36,12 @@ public class PlayCustomLeaveMsgController {
/**
* 分页查询顾客留言列表
*/
@ApiOperation(value = "分页查询留言列表", notes = "分页查询顾客留言信息列表")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayCustomLeaveMsgReturnVo.class, responseContainer = "Page")
})
@PostMapping("/listByPage")
public R list(@Validated @RequestBody PlayCustomLeaveMsgQueryVo vo) {
public R list(@ApiParam(value = "查询条件", required = true) @Validated @RequestBody PlayCustomLeaveMsgQueryVo vo) {
IPage<PlayCustomLeaveMsgReturnVo> list = playCustomLeaveMsgService.selectByPage(vo);
return R.ok(list);
}
@@ -37,6 +49,11 @@ public class PlayCustomLeaveMsgController {
/**
* 获取顾客留言详细信息
*/
@ApiOperation(value = "获取留言详情", notes = "根据ID获取顾客留言详细信息")
@ApiImplicitParam(name = "id", value = "留言ID", required = true, paramType = "path", dataType = "String", example = "1")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayCustomLeaveMsgEntity.class)
})
@GetMapping(value = "/{id}")
public R getInfo(@PathVariable("id") String id) {
return R.ok(playCustomLeaveMsgService.selectPlayCustomLeaveMsgById(id));
@@ -45,10 +62,15 @@ public class PlayCustomLeaveMsgController {
/**
* 新增顾客留言
*/
@ApiOperation(value = "新增留言", notes = "创建新的顾客留言信息")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功"),
@ApiResponse(code = 500, message = "添加失败")
})
//@PreAuthorize("@customSs.hasPermission('custom:leave:add')")
@Log(title = "顾客留言", businessType = BusinessType.INSERT)
@PostMapping("/create")
public R create(@RequestBody PlayCustomLeaveMsgEntity playCustomLeaveMsg) {
public R create(@ApiParam(value = "留言信息", required = true) @RequestBody PlayCustomLeaveMsgEntity playCustomLeaveMsg) {
boolean success = playCustomLeaveMsgService.create(playCustomLeaveMsg);
if (success) {
return R.ok();
@@ -59,10 +81,16 @@ public class PlayCustomLeaveMsgController {
/**
* 修改顾客留言
*/
@ApiOperation(value = "修改留言", notes = "根据ID修改顾客留言信息")
@ApiImplicitParam(name = "id", value = "留言ID", required = true, paramType = "path", dataType = "String", example = "1")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功"),
@ApiResponse(code = 500, message = "修改失败")
})
//@PreAuthorize("@customSs.hasPermission('custom:leave:update')")
@Log(title = "顾客留言", businessType = BusinessType.UPDATE)
@PostMapping(value = "/update/{id}")
public R update(@PathVariable String id, @RequestBody PlayCustomLeaveMsgEntity playCustomLeaveMsg) {
public R update(@PathVariable String id, @ApiParam(value = "留言信息", required = true) @RequestBody PlayCustomLeaveMsgEntity playCustomLeaveMsg) {
playCustomLeaveMsg.setId(id);
boolean success = playCustomLeaveMsgService.update(playCustomLeaveMsg);
if (success) {
@@ -74,6 +102,11 @@ public class PlayCustomLeaveMsgController {
/**
* 删除顾客留言
*/
@ApiOperation(value = "删除留言", notes = "根据ID批量删除顾客留言信息")
@ApiImplicitParam(name = "ids", value = "留言ID数组", required = true, paramType = "path", dataType = "String[]", example = "1,2,3")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = Integer.class)
})
//@PreAuthorize("@customSs.hasPermission('custom:leave:delete')")
@Log(title = "顾客留言", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")

View File

@@ -10,6 +10,12 @@ import com.starry.common.annotation.Log;
import com.starry.common.enums.BusinessType;
import com.starry.common.result.R;
import com.starry.common.utils.ConvertUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@@ -23,6 +29,7 @@ import java.util.List;
*/
@RestController
@RequestMapping("/custom/level")
@Api(tags = "顾客等级管理", description = "顾客等级信息管理相关接口,包括查询、新增、修改和删除等操作")
public class PlayCustomLevelInfoController {
@Resource
private IPlayCustomLevelInfoService playCustomLevelInfoService;
@@ -31,6 +38,10 @@ public class PlayCustomLevelInfoController {
* 查询顾客等级列表
*/
@PostMapping("/listAll")
@ApiOperation(value = "查询等级列表", notes = "获取所有顾客等级信息列表")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayCustomLevelReturnVo.class, responseContainer = "List")
})
public R listAll() {
List<PlayCustomLevelInfoEntity> list = playCustomLevelInfoService.selectPlayCustomLevelInfoByPage();
return R.ok(ConvertUtil.entityToVoList(list, PlayCustomLevelReturnVo.class));
@@ -40,6 +51,11 @@ public class PlayCustomLevelInfoController {
* 获取顾客等级详细信息
*/
@GetMapping(value = "/{id}")
@ApiOperation(value = "获取等级详情", notes = "根据ID获取顾客等级详细信息")
@ApiImplicitParam(name = "id", value = "等级ID", required = true, paramType = "path", dataType = "String", example = "1")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayCustomLevelInfoEntity.class)
})
public R getInfo(@PathVariable("id") String id) {
return R.ok(playCustomLevelInfoService.selectPlayCustomLevelInfoById(id));
}
@@ -51,7 +67,12 @@ public class PlayCustomLevelInfoController {
//@PreAuthorize("@customSs.hasPermission('custom:level:add')")
@Log(title = "店员等级", businessType = BusinessType.INSERT)
@PostMapping("/create")
public R create(@RequestBody PlayCustomLevelAddVo vo) {
@ApiOperation(value = "新增等级", notes = "创建新的顾客等级信息")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功"),
@ApiResponse(code = 500, message = "添加失败")
})
public R create(@ApiParam(value = "等级信息", required = true) @RequestBody PlayCustomLevelAddVo vo) {
PlayCustomLevelInfoEntity entity = ConvertUtil.entityToVo(vo, PlayCustomLevelInfoEntity.class);
int level = playCustomLevelInfoService.selectMaxLevel();
entity.setLevel(level + 1);
@@ -69,7 +90,13 @@ public class PlayCustomLevelInfoController {
//@PreAuthorize("@customSs.hasPermission('custom:level:update')")
@Log(title = "顾客等级", businessType = BusinessType.UPDATE)
@PostMapping(value = "/update")
public R update(@RequestBody PlayCustomLevelEditVo vo) {
@ApiOperation(value = "修改等级", notes = "修改顾客等级信息")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功"),
@ApiResponse(code = 500, message = "修改失败"),
@ApiResponse(code = 400, message = "对象不存在")
})
public R update(@ApiParam(value = "等级信息", required = true) @RequestBody PlayCustomLevelEditVo vo) {
if (playCustomLevelInfoService.selectPlayCustomLevelInfoById(vo.getId()) == null) {
throw new CustomException("对象不存在");
}
@@ -86,6 +113,11 @@ public class PlayCustomLevelInfoController {
*/
@Log(title = "店员等级", businessType = BusinessType.DELETE)
@DeleteMapping("delMaxLevel")
@ApiOperation(value = "删除最高等级", notes = "删除系统中的最高等级")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功"),
@ApiResponse(code = 400, message = "最后一级,不允许删除")
})
public R remove() {
int level = playCustomLevelInfoService.selectMaxLevel();
if (level <= 1) {

View File

@@ -5,6 +5,11 @@ import com.starry.admin.modules.custom.module.vo.PlayCustomRankingQueryVo;
import com.starry.admin.modules.custom.module.vo.PlayCustomRankingReturnVo;
import com.starry.admin.modules.custom.service.IPlayCustomUserInfoService;
import com.starry.common.result.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@@ -19,6 +24,7 @@ import javax.annotation.Resource;
* @author admin
* @since 2024-04-08
*/
@Api(tags = "顾客排名管理", description = "顾客消费排名相关接口,包括查询排名列表等操作")
@RestController
@RequestMapping("/custom/ranking")
public class PlayCustomRankingController {
@@ -28,8 +34,12 @@ public class PlayCustomRankingController {
/**
* 查询顾客排名列表
*/
@ApiOperation(value = "分页查询排名列表", notes = "分页查询顾客消费排名信息列表")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayCustomRankingReturnVo.class, responseContainer = "Page")
})
@PostMapping("/listByPage")
public R list(@Validated @RequestBody PlayCustomRankingQueryVo vo) {
public R list(@ApiParam(value = "查询条件", required = true) @Validated @RequestBody PlayCustomRankingQueryVo vo) {
IPage<PlayCustomRankingReturnVo> list = playCustomUserInfoService.selectRankingByPage(vo);
return R.ok(list);
}

View File

@@ -10,6 +10,13 @@ import com.starry.common.annotation.Log;
import com.starry.common.enums.BusinessType;
import com.starry.common.result.R;
import com.starry.common.utils.ConvertUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@@ -21,6 +28,7 @@ import javax.annotation.Resource;
* @author admin
* @since 2024-04-08
*/
@Api(tags = "顾客管理", description = "顾客信息管理相关接口,包括查询、新增、修改和删除等操作")
@RestController
@RequestMapping("/custom/user")
public class PlayCustomUserInfoController {
@@ -30,8 +38,12 @@ public class PlayCustomUserInfoController {
/**
* 查询顾客列表
*/
@ApiOperation(value = "分页查询顾客列表", notes = "分页查询顾客信息列表")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayCustomUserReturnVo.class, responseContainer = "Page")
})
@PostMapping("/listByPage")
public R list(@Validated @RequestBody PlayCustomUserQueryVo vo) {
public R list(@ApiParam(value = "查询条件", required = true) @Validated @RequestBody PlayCustomUserQueryVo vo) {
IPage<PlayCustomUserReturnVo> list = playCustomUserInfoService.selectByPage(vo);
return R.ok(list);
}
@@ -39,6 +51,11 @@ public class PlayCustomUserInfoController {
/**
* 获取顾客详细信息
*/
@ApiOperation(value = "获取顾客详情", notes = "根据ID获取顾客详细信息")
@ApiImplicitParam(name = "id", value = "顾客ID", required = true, paramType = "path", dataType = "String", example = "1")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayCustomUserInfoEntity.class)
})
@GetMapping(value = "/{id}")
public R getInfo(@PathVariable("id") String id) {
return R.ok(playCustomUserInfoService.selectById(id));
@@ -47,9 +64,14 @@ public class PlayCustomUserInfoController {
/**
* 新增顾客
*/
@ApiOperation(value = "新增顾客", notes = "创建新的顾客信息")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功"),
@ApiResponse(code = 500, message = "添加失败")
})
@Log(title = "顾客", businessType = BusinessType.INSERT)
@PostMapping("/create")
public R create(@RequestBody PlayCustomUserInfoEntity playCustomUserInfo) {
public R create(@ApiParam(value = "顾客信息", required = true) @RequestBody PlayCustomUserInfoEntity playCustomUserInfo) {
boolean success = playCustomUserInfoService.create(playCustomUserInfo);
if (success) {
return R.ok();
@@ -60,9 +82,14 @@ public class PlayCustomUserInfoController {
/**
* 修改顾客状态
*/
@ApiOperation(value = "修改顾客状态", notes = "修改顾客的状态信息,如黑名单状态、关注状态等")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功"),
@ApiResponse(code = 500, message = "修改失败")
})
@Log(title = "顾客", businessType = BusinessType.UPDATE)
@PostMapping(value = "/updateState")
public R updateState(@Validated @RequestBody PlayCustomUserStateEditVo vo) {
public R updateState(@ApiParam(value = "顾客状态信息", required = true) @Validated @RequestBody PlayCustomUserStateEditVo vo) {
PlayCustomUserInfoEntity entity = ConvertUtil.entityToVo(vo, PlayCustomUserInfoEntity.class);
boolean success = playCustomUserInfoService.update(entity);
if (success) {
@@ -74,9 +101,15 @@ public class PlayCustomUserInfoController {
/**
* 修改顾客
*/
@ApiOperation(value = "修改顾客信息", notes = "根据ID修改顾客基本信息")
@ApiImplicitParam(name = "id", value = "顾客ID", required = true, paramType = "path", dataType = "String", example = "1")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功"),
@ApiResponse(code = 500, message = "修改失败")
})
@Log(title = "顾客", businessType = BusinessType.UPDATE)
@PostMapping(value = "/update/{id}")
public R update(@PathVariable String id, @RequestBody PlayCustomUserInfoEntity playCustomUserInfo) {
public R update(@PathVariable String id, @ApiParam(value = "顾客信息", required = true) @RequestBody PlayCustomUserInfoEntity playCustomUserInfo) {
playCustomUserInfo.setId(id);
boolean success = playCustomUserInfoService.update(playCustomUserInfo);
if (success) {
@@ -88,6 +121,11 @@ public class PlayCustomUserInfoController {
/**
* 删除顾客
*/
@ApiOperation(value = "删除顾客", notes = "根据ID批量删除顾客信息")
@ApiImplicitParam(name = "ids", value = "顾客ID数组", required = true, paramType = "path", dataType = "String[]", example = "1,2,3")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = Integer.class)
})
@Log(title = "顾客", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public R remove(@PathVariable String[] ids) {

View File

@@ -1,6 +1,10 @@
package com.starry.admin.modules.custom.module.vo;
import com.starry.common.domain.BasePageEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 顾客留言查询对象
@@ -8,5 +12,14 @@ import com.starry.common.domain.BasePageEntity;
* @author admin
* @since 2024/5/7 16:29
**/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "顾客留言查询参数", description = "查询顾客留言信息的条件参数")
public class PlayCustomLeaveMsgQueryVo extends BasePageEntity {
@ApiModelProperty(value = "顾客ID", example = "1", notes = "特定顾客的ID")
private String customId;
@ApiModelProperty(value = "留言内容", example = "服务很好", notes = "留言的内容,支持模糊查询")
private String content;
}

View File

@@ -2,6 +2,8 @@ package com.starry.admin.modules.custom.module.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import com.starry.admin.common.conf.StringTypeHandler;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
@@ -14,47 +16,56 @@ import java.util.List;
* @since 2024/5/7 16:29
**/
@Data
@ApiModel(value = "顾客留言返回数据", description = "顾客留言信息的返回数据")
public class PlayCustomLeaveMsgReturnVo {
/**
* UUID
*/
@ApiModelProperty(value = "留言ID", example = "1")
private String id;
/**
* 留言内容
*/
@ApiModelProperty(value = "留言内容", example = "服务很好,希望以后再次合作")
private String content;
/**
* 图片
*/
@ApiModelProperty(value = "留言图片", example = "[\"https://example.com/image1.jpg\",\"https://example.com/image2.jpg\"]")
@TableField(typeHandler = StringTypeHandler.class)
private List<String> images;
/**
* 留言时间
*/
@ApiModelProperty(value = "留言时间", example = "2024-01-01 12:00:00")
private Date msgTime;
/**
* 备注
*/
@ApiModelProperty(value = "备注", example = "重要留言")
private String remark;
/**
* 顾客Id
*/
@ApiModelProperty(value = "顾客ID", example = "1")
private String customId;
/**
* 顾客昵称
*/
@ApiModelProperty(value = "顾客头像", example = "https://example.com/avatar.jpg")
private String customAvatar;
/**
* 头像
*/
@ApiModelProperty(value = "顾客昵称", example = "张三")
private String customNickname;
}

View File

@@ -1,16 +1,20 @@
package com.starry.admin.modules.custom.module.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
@Data
@ApiModel(value = "顾客等级添加参数", description = "新增顾客等级信息的请求参数")
public class PlayCustomLevelAddVo {
/**
* 等级名称
*/
@NotBlank(message = "等级名称不能为空")
@ApiModelProperty(value = "等级名称", required = true, example = "钻石会员", notes = "顾客等级的名称")
private String name;
@@ -18,17 +22,20 @@ public class PlayCustomLevelAddVo {
* 上一级消费金额
*/
@NotBlank(message = "消费金额不能为空")
@ApiModelProperty(value = "消费金额", required = true, example = "1000", notes = "达到该等级需要的消费金额")
private String consumptionAmount;
/**
* 满减比例
*/
@NotBlank(message = "满减比例不能为空")
@ApiModelProperty(value = "满减比例", required = true, example = "95", notes = "该等级享受的满减折扣比例如95表示95折")
private Integer discount;
/**
* 头像框地址
*/
@ApiModelProperty(value = "头像框地址", example = "https://example.com/frame.png", notes = "该等级专属的头像框图片地址")
private String avatarFrameAddress;
}

View File

@@ -1,22 +1,27 @@
package com.starry.admin.modules.custom.module.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
@Data
@ApiModel(value = "顾客等级修改参数", description = "修改顾客等级信息的请求参数")
public class PlayCustomLevelEditVo {
/**
* UUID
*/
@NotBlank(message = "ID不能为空")
@ApiModelProperty(value = "等级ID", required = true, example = "1", notes = "顾客等级的ID")
private String id;
/**
* 等级名称
*/
@NotBlank(message = "等级名称不能为空")
@ApiModelProperty(value = "等级名称", required = true, example = "钻石会员", notes = "顾客等级的名称")
private String name;
@@ -24,17 +29,20 @@ public class PlayCustomLevelEditVo {
* 上一级消费金额
*/
@NotBlank(message = "消费金额不能为空")
@ApiModelProperty(value = "消费金额", required = true, example = "1000", notes = "达到该等级需要的消费金额")
private String consumptionAmount;
/**
* 满减比例
*/
@NotBlank(message = "满减比例不能为空")
@ApiModelProperty(value = "满减比例", required = true, example = "95", notes = "该等级享受的满减折扣比例如95表示95折")
private Integer discount;
/**
* 头像框地址
*/
@ApiModelProperty(value = "头像框地址", example = "https://example.com/frame.png", notes = "该等级专属的头像框图片地址")
private String avatarFrameAddress;
}

View File

@@ -1,5 +1,7 @@
package com.starry.admin.modules.custom.module.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
@@ -8,36 +10,43 @@ import lombok.Data;
* @author admin
*/
@Data
@ApiModel(value = "顾客等级返回数据", description = "顾客等级信息的返回数据")
public class PlayCustomLevelReturnVo {
/**
* UUID
*/
@ApiModelProperty(value = "等级ID", example = "1")
private String id;
/**
* 等级名称
*/
@ApiModelProperty(value = "等级名称", example = "钻石会员")
private String name;
/**
* 等级数字(排序字段)
*/
@ApiModelProperty(value = "等级数值", example = "3", notes = "等级数字,用于排序")
private Integer level;
/**
* 上一级消费金额
*/
@ApiModelProperty(value = "消费金额", example = "1000", notes = "达到该等级需要的消费金额")
private String consumptionAmount;
/**
* 满减比例
*/
@ApiModelProperty(value = "满减比例", example = "95", notes = "该等级享受的满减折扣比例如95表示95折")
private Integer discount;
/**
* 头像框地址
*/
@ApiModelProperty(value = "头像框地址", example = "https://example.com/frame.png")
private String avatarFrameAddress;

View File

@@ -1,6 +1,8 @@
package com.starry.admin.modules.custom.module.vo;
import com.starry.common.domain.BasePageEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -14,14 +16,17 @@ import java.util.List;
**/
@EqualsAndHashCode(callSuper = true)
@Data
@ApiModel(value = "顾客排名查询参数", description = "查询顾客消费排名信息的条件参数")
public class PlayCustomRankingQueryVo extends BasePageEntity {
/**
* userId
*/
@ApiModelProperty(value = "顾客ID", example = "1", notes = "特定顾客的ID")
private String id;
/**
* 下单时间
*/
@ApiModelProperty(value = "下单时间范围", example = "['2024-01-01 00:00:00','2024-12-31 23:59:59']", notes = "下单时间范围,包含开始和结束时间")
private List<String> purchaserTime;
}

View File

@@ -2,6 +2,8 @@ package com.starry.admin.modules.custom.module.vo;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.starry.admin.modules.order.module.entity.PlayOrderInfoEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
@@ -15,67 +17,80 @@ import java.util.List;
* @since 2024/5/14 下午7:47
**/
@Data
@ApiModel(value = "顾客排名返回数据", description = "顾客消费排名信息的返回数据")
public class PlayCustomRankingReturnVo {
/**
* UUID
*/
@ApiModelProperty(value = "顾客ID", example = "1")
private String id;
/**
* 顾客昵称
*/
@ApiModelProperty(value = "顾客昵称", example = "张三")
private String nickname;
/**
* 头像
*/
@ApiModelProperty(value = "头像", example = "https://example.com/avatar.jpg")
private String avatar;
/**
* 排名
*/
@ApiModelProperty(value = "排名", example = "1", notes = "顾客消费排名索引")
private Integer rankingIndex;
/**
* 订单列表
*/
@JsonIgnore
@ApiModelProperty(value = "订单列表", hidden = true)
private List<PlayOrderInfoEntity> orderInfos;
/**
* 下单时间-起始时间
*/
@ApiModelProperty(value = "下单起始时间", example = "2024-01-01 00:00:00")
private String beginPurchaserTime;
/**
* 下单时间-终止时间
*/
@ApiModelProperty(value = "下单终止时间", example = "2024-12-31 23:59:59")
private String endPurchaserTime;
/**
* 订单总数
*/
@ApiModelProperty(value = "订单总数", example = "10")
private String orderNumber;
/**
* 续单总数
*/
@ApiModelProperty(value = "续单总数", example = "5", notes = "顾客续费订单的总数量")
private String orderContinueNumber;
/**
* 订单单价
*/
@ApiModelProperty(value = "订单单价", example = "100.00")
private String orderPrice;
/**
* 订单总金额
*/
@ApiModelProperty(value = "订单总金额", example = "1000.00")
private BigDecimal orderTotalAmount;
/**
* 统计时间
*/
@ApiModelProperty(value = "统计时间", example = "2024-01-01")
private String statisticalTime = LocalDate.now().toString();
}

View File

@@ -1,6 +1,8 @@
package com.starry.admin.modules.custom.module.vo;
import com.starry.common.domain.BasePageEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -14,99 +16,118 @@ import java.util.List;
**/
@EqualsAndHashCode(callSuper = true)
@Data
@ApiModel(value = "顾客查询参数", description = "查询顾客信息的条件参数")
public class PlayCustomUserQueryVo extends BasePageEntity {
@ApiModelProperty(value = "顾客ID", example = "1", notes = "特定顾客的ID")
private String id;
/**
* 用户的标识,对当前公众号唯一
*/
@ApiModelProperty(value = "OpenID", example = "o6_bmjrPTlm6_2sgVt7hMZOPfL2M", notes = "微信用户的唯一标识")
private String openid;
/**
* 顾客昵称
*/
@ApiModelProperty(value = "昵称", example = "张三", notes = "顾客的昵称,支持模糊查询")
private String nickname;
/**
* 顾客性别0:未知;1:男,2:女)
*/
@ApiModelProperty(value = "性别", example = "1", notes = "0:未知;1:男;2:女")
private String sex;
/**
* 微信号
*/
@ApiModelProperty(value = "微信号", example = "zhangsan123", notes = "顾客的微信号")
private String weiChatCode;
/**
* 绑定手机状态[0:未绑定,1:绑定]
*/
@ApiModelProperty(value = "绑定手机状态", example = "1", notes = "0:未绑定,1:绑定")
private String mobilePhoneState;
/**
* 手机号码
*/
@ApiModelProperty(value = "手机号码", example = "13800138000", notes = "顾客的手机号码")
private String phone;
/**
* 等级ID
*/
@ApiModelProperty(value = "等级ID", example = "1", notes = "顾客等级的ID")
private String levelId;
/**
* 余额状态[0:不存在余额1:存在余额]
*/
@ApiModelProperty(value = "余额状态", example = "1", notes = "0:不存在余额1:存在余额")
private String accountState;
/**
* 关注状态[0:未关注1:已关注]
*/
@ApiModelProperty(value = "关注状态", example = "1", notes = "0:未关注1:已关注")
private String subscribeState;
/**
* 违规状态[0:未违规,1:违规]
*/
@ApiModelProperty(value = "违规状态", example = "0", notes = "0:未违规,1:违规")
private String violationState;
/**
* 是否下单状态[0:未下单过1:下单过]
*/
@ApiModelProperty(value = "下单状态", example = "1", notes = "0:未下单过1:下单过")
private String purchaseState;
/**
* 黑名单状态[0:非黑名单1:黑名单]
*/
@ApiModelProperty(value = "黑名单状态", example = "0", notes = "0:非黑名单1:黑名单")
private String blacklistState;
/**
* 注册时间
*/
@ApiModelProperty(value = "注册时间范围", example = "['2024-01-01 00:00:00','2024-12-31 23:59:59']", notes = "注册时间范围,包含开始和结束时间")
private List<String> registrationTime;
/**
* 首次下单时间
*/
@ApiModelProperty(value = "首次下单时间范围", example = "['2024-01-01 00:00:00','2024-12-31 23:59:59']", notes = "首次下单时间范围,包含开始和结束时间")
private List<String> firstPurchaseTime;
/**
* 最后一次下单时间
*/
@ApiModelProperty(value = "最后下单时间范围", example = "['2024-01-01 00:00:00','2024-12-31 23:59:59']", notes = "最后一次下单时间范围,包含开始和结束时间")
private List<String> lastPurchaseTime;
/**
* 备注
*/
@ApiModelProperty(value = "备注", example = "重要客户", notes = "顾客相关备注信息")
private String remark;
/**
* 排序字段
*/
@ApiModelProperty(value = "排序字段", example = "registrationTime", notes = "排序的字段名称")
private String sort;

View File

@@ -1,6 +1,8 @@
package com.starry.admin.modules.custom.module.vo;
import com.starry.admin.modules.order.module.entity.PlayOrderInfoEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
@@ -14,161 +16,190 @@ import java.util.List;
* @since 2024/5/14 下午7:47
**/
@Data
@ApiModel(value = "顾客返回数据", description = "顾客信息的返回数据")
public class PlayCustomUserReturnVo {
/**
* UUID
*/
@ApiModelProperty(value = "顾客ID", example = "1")
private String id;
/**
* 租户ID
*/
@ApiModelProperty(value = "租户ID", example = "tenant123", notes = "系统租户标识")
private String tenantId;
/**
* 用户的标识,对当前公众号唯一
*/
@ApiModelProperty(value = "OpenID", example = "o6_bmjrPTlm6_2sgVt7hMZOPfL2M", notes = "微信用户的唯一标识")
private String openid;
/**
* 顾客昵称
*/
@ApiModelProperty(value = "昵称", example = "张三")
private String nickname;
/**
* 顾客性别0:未知;1:男,2:女)
*/
@ApiModelProperty(value = "性别", example = "1", notes = "0:未知;1:男;2:女")
private Integer sex;
/**
* 头像
*/
@ApiModelProperty(value = "头像", example = "https://example.com/avatar.jpg")
private String avatar;
/**
* 手机号码
*/
@ApiModelProperty(value = "手机号码", example = "13800138000")
private String phone;
/**
* 微信号码
*/
@ApiModelProperty(value = "微信号", example = "zhangsan123")
private String weiChatCode;
/**
* 所在国家
*/
@ApiModelProperty(value = "国家", example = "中国")
private String country;
/**
* 所在省份
*/
@ApiModelProperty(value = "省份", example = "广东省")
private String province;
/**
* 所在城市
*/
@ApiModelProperty(value = "城市", example = "深圳市")
private String city;
/**
* 账户余额
*/
@ApiModelProperty(value = "账户余额", example = "1000.50")
private BigDecimal accountBalance;
/**
* 余额状态[0:不存在余额1:存在余额]
*/
@ApiModelProperty(value = "余额状态", example = "1", notes = "0:不存在余额1:存在余额")
private String accountState;
/**
* 关注状态[0:未关注1:已关注]
*/
@ApiModelProperty(value = "关注状态", example = "1", notes = "0:未关注1:已关注")
private String subscribeState;
/**
* 黑名单状态[0:非黑名单1:黑名单]
*/
@ApiModelProperty(value = "黑名单状态", example = "0", notes = "0:非黑名单1:黑名单")
private String blacklistState;
/**
* 违规状态[0:未违规,1:违规]
*/
@ApiModelProperty(value = "违规状态", example = "0", notes = "0:未违规,1:违规")
private String violationState;
/**
* 是否下单状态[0:未下单过1:下单过]
*/
@ApiModelProperty(value = "下单状态", example = "1", notes = "0:未下单过1:下单过")
private String purchaseState;
/**
* 绑定手机状态[0:未绑定,1:绑定]
*/
@ApiModelProperty(value = "绑定手机状态", example = "1", notes = "0:未绑定,1:绑定")
private String mobilePhoneState;
/**
* 实名状态【1已实名0未实名】
*/
@ApiModelProperty(value = "实名状态", example = "1", notes = "1已实名0未实名")
private String realState;
/**
* 是否必须实名【2:跟随店铺设置1必须实名0非必须实名】
*/
@ApiModelProperty(value = "必须实名状态", example = "1", notes = "2:跟随店铺设置1必须实名0非必须实名")
private String mandatoryRealState;
/**
* 注册时间
*/
@ApiModelProperty(value = "注册时间", example = "2024-01-01 12:00:00")
private Date registrationTime;
/**
* 上次登录时间
*/
@ApiModelProperty(value = "上次登录时间", example = "2024-01-15 12:00:00")
private Date lastLoginTime;
/**
* 首次下单时间
*/
@ApiModelProperty(value = "首次下单时间", example = "2024-01-05 12:00:00")
private Date firstPurchaseTime;
/**
* 最后一次下单时间
*/
@ApiModelProperty(value = "最后下单时间", example = "2024-01-20 12:00:00")
private Date lastPurchaseTime;
/**
* 备注
*/
@ApiModelProperty(value = "备注", example = "重要客户")
private String remark;
/**
* 等级ID
*/
@ApiModelProperty(value = "等级ID", example = "1")
private String levelId;
/**
* 等级名称
*/
@ApiModelProperty(value = "等级名称", example = "钻石会员")
private String levelName;
/**
* 订单列表
*/
@ApiModelProperty(value = "订单列表", notes = "顾客的订单列表")
private List<PlayOrderInfoEntity> orderInfos;
/**
* 订单总数
*/
@ApiModelProperty(value = "订单总数", example = "10")
private String orderNumber;
/**
* 订单单价
*/
@ApiModelProperty(value = "订单单价", example = "100.00")
private String orderPrice;
/**
* 订单总金额
*/
@ApiModelProperty(value = "订单总金额", example = "1000.00")
private BigDecimal orderTotalAmount;
}

View File

@@ -1,5 +1,7 @@
package com.starry.admin.modules.custom.module.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
@@ -9,55 +11,66 @@ import javax.validation.constraints.NotBlank;
* @author admin
*/
@Data
@ApiModel(value = "顾客状态修改参数", description = "修改顾客状态信息的请求参数")
public class PlayCustomUserStateEditVo {
/**
* id
*/
@NotBlank(message = "id不能为空")
@ApiModelProperty(value = "顾客ID", required = true, example = "1", notes = "顾客的ID")
private String id;
/**
* 余额状态[0:不存在余额1:存在余额]
*/
@ApiModelProperty(value = "余额状态", example = "1", notes = "0:不存在余额1:存在余额")
private String accountState;
/**
* 关注状态[0:未关注1:已关注]
*/
@ApiModelProperty(value = "关注状态", example = "1", notes = "0:未关注1:已关注")
private String subscribeState;
/**
* 黑名单状态[0:非黑名单1:黑名单]
*/
@ApiModelProperty(value = "黑名单状态", example = "0", notes = "0:非黑名单1:黑名单")
private String blacklistState;
/**
* 违规状态[0:未违规,1:违规]
*/
@ApiModelProperty(value = "违规状态", example = "0", notes = "0:未违规,1:违规")
private String violationState;
/**
* 是否下单状态[0:未未下单1:下单过]
*/
@ApiModelProperty(value = "下单状态", example = "1", notes = "0:未下单过1:下单过")
private String purchaseState;
/**
* 绑定手机状态[0:未绑定,1:绑定]
*/
@ApiModelProperty(value = "绑定手机状态", example = "1", notes = "0:未绑定,1:绑定")
private String mobilePhoneState;
/**
* 实名状态【1已实名0未实名】
*/
@ApiModelProperty(value = "实名状态", example = "1", notes = "1已实名0未实名")
private String realState;
/**
* 是否必须实名【0:非必须实名;1:必须实名;2:跟随店铺设置】
*/
@ApiModelProperty(value = "必须实名状态", example = "1", notes = "2:跟随店铺设置1必须实名0非必须实名")
private String mandatoryRealState;
@ApiModelProperty(value = "备注", example = "重要客户", notes = "顾客相关备注信息")
private String remark;