style: 应用 Spotless 代码格式化
- 对所有 Java 源文件应用统一的代码格式化 - 统一缩进为 4 个空格 - 清理尾随空白字符和文件末尾换行 - 优化导入语句组织 - 总计格式化 654 个 Java 文件 有问题可以回滚或者找我聊
This commit is contained in:
@@ -8,16 +8,14 @@ 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 javax.annotation.Resource;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 顾客关注陪聊信息Controller
|
||||
*
|
||||
@@ -36,12 +34,12 @@ public class PlayCustomFollowInfoController {
|
||||
*/
|
||||
@ApiOperation(value = "分页查询关注列表", notes = "分页查询顾客关注店员信息列表")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功", response = PlayCustomFollowInfoEntity.class, responseContainer = "Page")
|
||||
})
|
||||
@ApiResponse(code = 200, message = "操作成功", response = PlayCustomFollowInfoEntity.class, responseContainer = "Page")})
|
||||
@PreAuthorize("@customSs.hasPermission('play:info:list')")
|
||||
@GetMapping("/list")
|
||||
public R list(@ApiParam(value = "查询条件") PlayCustomFollowInfoEntity playCustomFollowInfo) {
|
||||
IPage<PlayCustomFollowInfoEntity> list = playCustomFollowInfoService.selectPlayCustomFollowInfoByPage(playCustomFollowInfo);
|
||||
IPage<PlayCustomFollowInfoEntity> list = playCustomFollowInfoService
|
||||
.selectPlayCustomFollowInfoByPage(playCustomFollowInfo);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
@@ -50,9 +48,7 @@ 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)
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = PlayCustomFollowInfoEntity.class)})
|
||||
@PreAuthorize("@customSs.hasPermission('play:info:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public R getInfo(@PathVariable("id") String id) {
|
||||
@@ -63,14 +59,12 @@ public class PlayCustomFollowInfoController {
|
||||
* 新增顾客关注陪聊信息
|
||||
*/
|
||||
@ApiOperation(value = "新增关注记录", notes = "创建新的顾客关注店员信息")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功"),
|
||||
@ApiResponse(code = 500, message = "添加失败")
|
||||
})
|
||||
@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(@ApiParam(value = "关注信息", required = true) @RequestBody PlayCustomFollowInfoEntity playCustomFollowInfo) {
|
||||
public R create(
|
||||
@ApiParam(value = "关注信息", required = true) @RequestBody PlayCustomFollowInfoEntity playCustomFollowInfo) {
|
||||
boolean success = playCustomFollowInfoService.create(playCustomFollowInfo);
|
||||
if (success) {
|
||||
return R.ok();
|
||||
@@ -83,14 +77,12 @@ 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 = "修改失败")
|
||||
})
|
||||
@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, @ApiParam(value = "关注信息", required = true) @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) {
|
||||
@@ -104,9 +96,7 @@ 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)
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = Integer.class)})
|
||||
@PreAuthorize("@customSs.hasPermission('play:info:remove')")
|
||||
@Log(title = "顾客关注陪聊信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
|
||||
@@ -8,14 +8,12 @@ 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;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 顾客和礼物关系Controller
|
||||
@@ -35,11 +33,11 @@ public class PlayCustomGiftInfoController {
|
||||
*/
|
||||
@ApiOperation(value = "分页查询礼物列表", notes = "分页查询顾客与礼物关系列表")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功", response = PlayCustomGiftInfoEntity.class, responseContainer = "Page")
|
||||
})
|
||||
@ApiResponse(code = 200, message = "操作成功", response = PlayCustomGiftInfoEntity.class, responseContainer = "Page")})
|
||||
@GetMapping("/list")
|
||||
public R list(@ApiParam(value = "查询条件") PlayCustomGiftInfoEntity playCustomGiftInfo) {
|
||||
IPage<PlayCustomGiftInfoEntity> list = playCustomGiftInfoService.selectPlayCustomGiftInfoByPage(playCustomGiftInfo);
|
||||
IPage<PlayCustomGiftInfoEntity> list = playCustomGiftInfoService
|
||||
.selectPlayCustomGiftInfoByPage(playCustomGiftInfo);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
@@ -48,9 +46,7 @@ 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)
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = PlayCustomGiftInfoEntity.class)})
|
||||
@GetMapping(value = "/{id}")
|
||||
public R getInfo(@PathVariable("id") String id) {
|
||||
return R.ok(playCustomGiftInfoService.selectPlayCustomGiftInfoById(id));
|
||||
@@ -60,13 +56,11 @@ public class PlayCustomGiftInfoController {
|
||||
* 新增顾客和礼物关系
|
||||
*/
|
||||
@ApiOperation(value = "新增礼物关系", notes = "创建新的顾客与礼物关系信息")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功"),
|
||||
@ApiResponse(code = 500, message = "添加失败")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "添加失败")})
|
||||
@Log(title = "顾客和礼物关系", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/create")
|
||||
public R create(@ApiParam(value = "礼物关系信息", required = true) @RequestBody PlayCustomGiftInfoEntity playCustomGiftInfo) {
|
||||
public R create(
|
||||
@ApiParam(value = "礼物关系信息", required = true) @RequestBody PlayCustomGiftInfoEntity playCustomGiftInfo) {
|
||||
boolean success = playCustomGiftInfoService.create(playCustomGiftInfo);
|
||||
if (success) {
|
||||
return R.ok();
|
||||
@@ -79,13 +73,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 = "操作成功"),
|
||||
@ApiResponse(code = 500, message = "修改失败")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "修改失败")})
|
||||
@Log(title = "顾客和礼物关系", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/update/{id}")
|
||||
public R update(@PathVariable String id, @ApiParam(value = "礼物关系信息", required = true) @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) {
|
||||
@@ -99,9 +91,7 @@ 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)
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = Integer.class)})
|
||||
@Log(title = "顾客和礼物关系", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
|
||||
@@ -10,16 +10,14 @@ 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 javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 顾客留言Controller
|
||||
*
|
||||
@@ -38,8 +36,7 @@ public class PlayCustomLeaveMsgController {
|
||||
*/
|
||||
@ApiOperation(value = "分页查询留言列表", notes = "分页查询顾客留言信息列表")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功", response = PlayCustomLeaveMsgReturnVo.class, responseContainer = "Page")
|
||||
})
|
||||
@ApiResponse(code = 200, message = "操作成功", response = PlayCustomLeaveMsgReturnVo.class, responseContainer = "Page")})
|
||||
@PostMapping("/listByPage")
|
||||
public R list(@ApiParam(value = "查询条件", required = true) @Validated @RequestBody PlayCustomLeaveMsgQueryVo vo) {
|
||||
IPage<PlayCustomLeaveMsgReturnVo> list = playCustomLeaveMsgService.selectByPage(vo);
|
||||
@@ -51,9 +48,7 @@ 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)
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = PlayCustomLeaveMsgEntity.class)})
|
||||
@GetMapping(value = "/{id}")
|
||||
public R getInfo(@PathVariable("id") String id) {
|
||||
return R.ok(playCustomLeaveMsgService.selectPlayCustomLeaveMsgById(id));
|
||||
@@ -63,14 +58,12 @@ public class PlayCustomLeaveMsgController {
|
||||
* 新增顾客留言
|
||||
*/
|
||||
@ApiOperation(value = "新增留言", notes = "创建新的顾客留言信息")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功"),
|
||||
@ApiResponse(code = 500, message = "添加失败")
|
||||
})
|
||||
//@PreAuthorize("@customSs.hasPermission('custom:leave:add')")
|
||||
@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(@ApiParam(value = "留言信息", required = true) @RequestBody PlayCustomLeaveMsgEntity playCustomLeaveMsg) {
|
||||
public R create(
|
||||
@ApiParam(value = "留言信息", required = true) @RequestBody PlayCustomLeaveMsgEntity playCustomLeaveMsg) {
|
||||
boolean success = playCustomLeaveMsgService.create(playCustomLeaveMsg);
|
||||
if (success) {
|
||||
return R.ok();
|
||||
@@ -83,14 +76,12 @@ 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')")
|
||||
@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, @ApiParam(value = "留言信息", required = true) @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) {
|
||||
@@ -104,10 +95,8 @@ 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')")
|
||||
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = Integer.class)})
|
||||
// @PreAuthorize("@customSs.hasPermission('custom:leave:delete')")
|
||||
@Log(title = "顾客留言", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
|
||||
@@ -16,10 +16,9 @@ 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;
|
||||
import java.util.List;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 顾客等级Controller
|
||||
@@ -40,8 +39,7 @@ public class PlayCustomLevelInfoController {
|
||||
@PostMapping("/listAll")
|
||||
@ApiOperation(value = "查询等级列表", notes = "获取所有顾客等级信息列表")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功", response = PlayCustomLevelReturnVo.class, responseContainer = "List")
|
||||
})
|
||||
@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));
|
||||
@@ -53,25 +51,19 @@ 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)
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = PlayCustomLevelInfoEntity.class)})
|
||||
public R getInfo(@PathVariable("id") String id) {
|
||||
return R.ok(playCustomLevelInfoService.selectPlayCustomLevelInfoById(id));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增顾客等级
|
||||
*/
|
||||
//@PreAuthorize("@customSs.hasPermission('custom:level:add')")
|
||||
// @PreAuthorize("@customSs.hasPermission('custom:level:add')")
|
||||
@Log(title = "店员等级", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/create")
|
||||
@ApiOperation(value = "新增等级", notes = "创建新的顾客等级信息")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功"),
|
||||
@ApiResponse(code = 500, message = "添加失败")
|
||||
})
|
||||
@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();
|
||||
@@ -83,19 +75,15 @@ public class PlayCustomLevelInfoController {
|
||||
return R.error("添加失败");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 修改顾客等级
|
||||
*/
|
||||
//@PreAuthorize("@customSs.hasPermission('custom:level:update')")
|
||||
// @PreAuthorize("@customSs.hasPermission('custom:level:update')")
|
||||
@Log(title = "顾客等级", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/update")
|
||||
@ApiOperation(value = "修改等级", notes = "修改顾客等级信息")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功"),
|
||||
@ApiResponse(code = 500, message = "修改失败"),
|
||||
@ApiResponse(code = 400, message = "对象不存在")
|
||||
})
|
||||
@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("对象不存在");
|
||||
@@ -114,10 +102,7 @@ public class PlayCustomLevelInfoController {
|
||||
@Log(title = "店员等级", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("delMaxLevel")
|
||||
@ApiOperation(value = "删除最高等级", notes = "删除系统中的最高等级")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功"),
|
||||
@ApiResponse(code = 400, message = "最后一级,不允许删除")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 400, message = "最后一级,不允许删除")})
|
||||
public R remove() {
|
||||
int level = playCustomLevelInfoService.selectMaxLevel();
|
||||
if (level <= 1) {
|
||||
|
||||
@@ -10,14 +10,13 @@ import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import io.swagger.annotations.ApiResponse;
|
||||
import io.swagger.annotations.ApiResponses;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 顾客Controller
|
||||
*
|
||||
@@ -36,8 +35,7 @@ public class PlayCustomRankingController {
|
||||
*/
|
||||
@ApiOperation(value = "分页查询排名列表", notes = "分页查询顾客消费排名信息列表")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功", response = PlayCustomRankingReturnVo.class, responseContainer = "Page")
|
||||
})
|
||||
@ApiResponse(code = 200, message = "操作成功", response = PlayCustomRankingReturnVo.class, responseContainer = "Page")})
|
||||
@PostMapping("/listByPage")
|
||||
public R list(@ApiParam(value = "查询条件", required = true) @Validated @RequestBody PlayCustomRankingQueryVo vo) {
|
||||
IPage<PlayCustomRankingReturnVo> list = playCustomUserInfoService.selectRankingByPage(vo);
|
||||
|
||||
@@ -12,16 +12,14 @@ 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 javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 顾客Controller
|
||||
*
|
||||
@@ -40,8 +38,7 @@ public class PlayCustomUserInfoController {
|
||||
*/
|
||||
@ApiOperation(value = "分页查询顾客列表", notes = "分页查询顾客信息列表")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功", response = PlayCustomUserReturnVo.class, responseContainer = "Page")
|
||||
})
|
||||
@ApiResponse(code = 200, message = "操作成功", response = PlayCustomUserReturnVo.class, responseContainer = "Page")})
|
||||
@PostMapping("/listByPage")
|
||||
public R list(@ApiParam(value = "查询条件", required = true) @Validated @RequestBody PlayCustomUserQueryVo vo) {
|
||||
IPage<PlayCustomUserReturnVo> list = playCustomUserInfoService.selectByPage(vo);
|
||||
@@ -53,9 +50,7 @@ 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)
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = PlayCustomUserInfoEntity.class)})
|
||||
@GetMapping(value = "/{id}")
|
||||
public R getInfo(@PathVariable("id") String id) {
|
||||
return R.ok(playCustomUserInfoService.selectById(id));
|
||||
@@ -65,13 +60,11 @@ public class PlayCustomUserInfoController {
|
||||
* 新增顾客
|
||||
*/
|
||||
@ApiOperation(value = "新增顾客", notes = "创建新的顾客信息")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功"),
|
||||
@ApiResponse(code = 500, message = "添加失败")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "添加失败")})
|
||||
@Log(title = "顾客", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/create")
|
||||
public R create(@ApiParam(value = "顾客信息", required = true) @RequestBody PlayCustomUserInfoEntity playCustomUserInfo) {
|
||||
public R create(
|
||||
@ApiParam(value = "顾客信息", required = true) @RequestBody PlayCustomUserInfoEntity playCustomUserInfo) {
|
||||
boolean success = playCustomUserInfoService.create(playCustomUserInfo);
|
||||
if (success) {
|
||||
return R.ok();
|
||||
@@ -83,13 +76,11 @@ public class PlayCustomUserInfoController {
|
||||
* 修改顾客状态
|
||||
*/
|
||||
@ApiOperation(value = "修改顾客状态", notes = "修改顾客的状态信息,如黑名单状态、关注状态等")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功"),
|
||||
@ApiResponse(code = 500, message = "修改失败")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "修改失败")})
|
||||
@Log(title = "顾客", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/updateState")
|
||||
public R updateState(@ApiParam(value = "顾客状态信息", required = true) @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) {
|
||||
@@ -103,13 +94,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 = "操作成功"),
|
||||
@ApiResponse(code = 500, message = "修改失败")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "修改失败")})
|
||||
@Log(title = "顾客", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/update/{id}")
|
||||
public R update(@PathVariable String id, @ApiParam(value = "顾客信息", required = true) @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) {
|
||||
@@ -123,9 +112,7 @@ 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)
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = Integer.class)})
|
||||
@Log(title = "顾客", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
|
||||
@@ -2,11 +2,10 @@ package com.starry.admin.modules.custom.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.starry.common.domain.BaseEntity;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 顾客关注陪聊信息对象 play_custom_follow_info
|
||||
*
|
||||
@@ -18,7 +17,6 @@ import java.util.Date;
|
||||
@TableName("play_custom_follow_info")
|
||||
public class PlayCustomFollowInfoEntity extends BaseEntity<PlayCustomFollowInfoEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.starry.admin.modules.custom.mapper;
|
||||
|
||||
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import com.starry.admin.modules.custom.entity.PlayCustomFollowInfoEntity;
|
||||
|
||||
@@ -8,9 +7,8 @@ import com.starry.admin.modules.custom.entity.PlayCustomFollowInfoEntity;
|
||||
* 顾客关注陪聊信息Mapper接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-04-30
|
||||
* @since 2024-04-30
|
||||
*/
|
||||
public interface PlayCustomFollowInfoMapper extends MPJBaseMapper<PlayCustomFollowInfoEntity> {
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.starry.admin.modules.custom.mapper;
|
||||
|
||||
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import com.starry.admin.modules.custom.module.entity.PlayCustomGiftInfoEntity;
|
||||
|
||||
@@ -12,5 +11,4 @@ import com.starry.admin.modules.custom.module.entity.PlayCustomGiftInfoEntity;
|
||||
*/
|
||||
public interface PlayCustomGiftInfoMapper extends MPJBaseMapper<PlayCustomGiftInfoEntity> {
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.starry.admin.modules.custom.mapper;
|
||||
|
||||
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import com.starry.admin.modules.custom.module.entity.PlayCustomLeaveMsgEntity;
|
||||
|
||||
@@ -8,9 +7,8 @@ import com.starry.admin.modules.custom.module.entity.PlayCustomLeaveMsgEntity;
|
||||
* 顾客留言Mapper接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-07
|
||||
* @since 2024-05-07
|
||||
*/
|
||||
public interface PlayCustomLeaveMsgMapper extends MPJBaseMapper<PlayCustomLeaveMsgEntity> {
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.starry.admin.modules.custom.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.starry.admin.modules.custom.module.entity.PlayCustomLevelInfoEntity;
|
||||
|
||||
@@ -12,5 +11,4 @@ import com.starry.admin.modules.custom.module.entity.PlayCustomLevelInfoEntity;
|
||||
*/
|
||||
public interface PlayCustomLevelInfoMapper extends BaseMapper<PlayCustomLevelInfoEntity> {
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.starry.admin.modules.custom.mapper;
|
||||
|
||||
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import com.starry.admin.modules.custom.module.entity.PlayCustomUserInfoEntity;
|
||||
|
||||
@@ -12,5 +11,4 @@ import com.starry.admin.modules.custom.module.entity.PlayCustomUserInfoEntity;
|
||||
*/
|
||||
public interface PlayCustomUserInfoMapper extends MPJBaseMapper<PlayCustomUserInfoEntity> {
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -16,7 +16,6 @@ import lombok.EqualsAndHashCode;
|
||||
@TableName("play_custom_gift_info")
|
||||
public class PlayCustomGiftInfoEntity extends BaseEntity<PlayCustomGiftInfoEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
|
||||
@@ -4,11 +4,10 @@ import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.starry.admin.common.conf.StringTypeHandler;
|
||||
import com.starry.common.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 顾客留言对象 play_custom_leave_msg
|
||||
@@ -21,7 +20,6 @@ import java.util.List;
|
||||
@TableName(value = "play_custom_leave_msg", autoResultMap = true)
|
||||
public class PlayCustomLeaveMsgEntity extends BaseEntity<PlayCustomLeaveMsgEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
|
||||
@@ -16,7 +16,6 @@ import lombok.EqualsAndHashCode;
|
||||
@TableName("play_custom_level_info")
|
||||
public class PlayCustomLevelInfoEntity extends BaseEntity<PlayCustomLevelInfoEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
@@ -52,5 +51,4 @@ public class PlayCustomLevelInfoEntity extends BaseEntity<PlayCustomLevelInfoEnt
|
||||
*/
|
||||
private String avatarFrameAddress;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -3,11 +3,10 @@ package com.starry.admin.modules.custom.module.entity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.starry.common.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 顾客对象 play_custom_user_info
|
||||
@@ -20,7 +19,6 @@ import java.util.Date;
|
||||
@TableName("play_custom_user_info")
|
||||
public class PlayCustomUserInfoEntity extends BaseEntity<PlayCustomUserInfoEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
@@ -66,7 +64,6 @@ public class PlayCustomUserInfoEntity extends BaseEntity<PlayCustomUserInfoEntit
|
||||
*/
|
||||
private String weiChatCode;
|
||||
|
||||
|
||||
/**
|
||||
* 等级ID
|
||||
*/
|
||||
@@ -100,7 +97,7 @@ public class PlayCustomUserInfoEntity extends BaseEntity<PlayCustomUserInfoEntit
|
||||
/**
|
||||
* 累计消费金额
|
||||
*/
|
||||
private BigDecimal accumulatedConsumptionAmount;
|
||||
private BigDecimal accumulatedConsumptionAmount;
|
||||
|
||||
/**
|
||||
* 余额状态[0:不存在余额,1:存在余额]
|
||||
@@ -167,7 +164,6 @@ public class PlayCustomUserInfoEntity extends BaseEntity<PlayCustomUserInfoEntit
|
||||
*/
|
||||
private String hideLevelState;
|
||||
|
||||
|
||||
/**
|
||||
* 隐藏排名[0:不隐藏;1:隐藏]
|
||||
*/
|
||||
|
||||
@@ -16,10 +16,10 @@ import lombok.EqualsAndHashCode;
|
||||
@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;
|
||||
}
|
||||
|
||||
@@ -4,10 +4,9 @@ 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;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 顾客留言查询返回对象
|
||||
@@ -19,7 +18,6 @@ import java.util.List;
|
||||
@ApiModel(value = "顾客留言返回数据", description = "顾客留言信息的返回数据")
|
||||
public class PlayCustomLeaveMsgReturnVo {
|
||||
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
|
||||
@@ -2,9 +2,8 @@ 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;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "顾客等级添加参数", description = "新增顾客等级信息的请求参数")
|
||||
@@ -17,7 +16,6 @@ public class PlayCustomLevelAddVo {
|
||||
@ApiModelProperty(value = "等级名称", required = true, example = "钻石会员", notes = "顾客等级的名称")
|
||||
private String name;
|
||||
|
||||
|
||||
/**
|
||||
* 上一级消费金额
|
||||
*/
|
||||
|
||||
@@ -2,9 +2,8 @@ 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;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "顾客等级修改参数", description = "修改顾客等级信息的请求参数")
|
||||
@@ -24,7 +23,6 @@ public class PlayCustomLevelEditVo {
|
||||
@ApiModelProperty(value = "等级名称", required = true, example = "钻石会员", notes = "顾客等级的名称")
|
||||
private String name;
|
||||
|
||||
|
||||
/**
|
||||
* 上一级消费金额
|
||||
*/
|
||||
|
||||
@@ -13,7 +13,6 @@ import lombok.Data;
|
||||
@ApiModel(value = "顾客等级返回数据", description = "顾客等级信息的返回数据")
|
||||
public class PlayCustomLevelReturnVo {
|
||||
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
@@ -49,5 +48,4 @@ public class PlayCustomLevelReturnVo {
|
||||
@ApiModelProperty(value = "头像框地址", example = "https://example.com/frame.png")
|
||||
private String avatarFrameAddress;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -3,11 +3,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 java.util.List;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 顾客排名分页查询对象
|
||||
*
|
||||
|
||||
@@ -4,11 +4,10 @@ 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;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 顾客分页查询返回对象
|
||||
@@ -86,7 +85,6 @@ public class PlayCustomRankingReturnVo {
|
||||
@ApiModelProperty(value = "订单总金额", example = "1000.00")
|
||||
private BigDecimal orderTotalAmount;
|
||||
|
||||
|
||||
/**
|
||||
* 统计时间
|
||||
*/
|
||||
|
||||
@@ -3,11 +3,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 java.util.List;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 顾客分页查询对象
|
||||
*
|
||||
@@ -22,14 +21,12 @@ 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;
|
||||
|
||||
|
||||
/**
|
||||
* 顾客昵称
|
||||
*/
|
||||
@@ -42,7 +39,6 @@ public class PlayCustomUserQueryVo extends BasePageEntity {
|
||||
@ApiModelProperty(value = "性别", example = "1", notes = "0:未知;1:男;2:女")
|
||||
private String sex;
|
||||
|
||||
|
||||
/**
|
||||
* 微信号
|
||||
*/
|
||||
@@ -61,21 +57,18 @@ public class PlayCustomUserQueryVo extends BasePageEntity {
|
||||
@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:已关注]
|
||||
*/
|
||||
@@ -106,7 +99,6 @@ public class PlayCustomUserQueryVo extends BasePageEntity {
|
||||
@ApiModelProperty(value = "注册时间范围", example = "['2024-01-01 00:00:00','2024-12-31 23:59:59']", notes = "注册时间范围,包含开始和结束时间")
|
||||
private List<String> registrationTime;
|
||||
|
||||
|
||||
/**
|
||||
* 首次下单时间
|
||||
*/
|
||||
@@ -130,5 +122,4 @@ public class PlayCustomUserQueryVo extends BasePageEntity {
|
||||
@ApiModelProperty(value = "排序字段", example = "registrationTime", notes = "排序的字段名称")
|
||||
private String sort;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -3,11 +3,10 @@ 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;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 顾客分页查询返回对象
|
||||
|
||||
@@ -2,10 +2,8 @@ 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;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
@@ -21,7 +19,6 @@ public class PlayCustomUserStateEditVo {
|
||||
@ApiModelProperty(value = "顾客ID", required = true, example = "1", notes = "顾客的ID")
|
||||
private String id;
|
||||
|
||||
|
||||
/**
|
||||
* 余额状态[0:不存在余额,1:存在余额]
|
||||
*/
|
||||
@@ -73,5 +70,4 @@ public class PlayCustomUserStateEditVo {
|
||||
@ApiModelProperty(value = "备注", example = "重要客户", notes = "顾客相关备注信息")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -16,7 +16,8 @@ public interface IPlayCustomFollowInfoService extends IService<PlayCustomFollowI
|
||||
/**
|
||||
* 查询顾客关注陪聊信息
|
||||
*
|
||||
* @param id 顾客关注陪聊信息主键
|
||||
* @param id
|
||||
* 顾客关注陪聊信息主键
|
||||
* @return 顾客关注陪聊信息
|
||||
*/
|
||||
PlayCustomFollowInfoEntity selectPlayCustomFollowInfoById(String id);
|
||||
@@ -24,8 +25,10 @@ public interface IPlayCustomFollowInfoService extends IService<PlayCustomFollowI
|
||||
/**
|
||||
* 修改关注状态
|
||||
*
|
||||
* @param customUserId 顾客ID
|
||||
* @param clerkUserId 陪聊ID
|
||||
* @param customUserId
|
||||
* 顾客ID
|
||||
* @param clerkUserId
|
||||
* 陪聊ID
|
||||
* @return 关注状态[0:未关注,1:已关注]
|
||||
*/
|
||||
String queryFollowState(String customUserId, String clerkUserId);
|
||||
@@ -33,17 +36,20 @@ public interface IPlayCustomFollowInfoService extends IService<PlayCustomFollowI
|
||||
/**
|
||||
* 修改关注状态
|
||||
*
|
||||
* @param customUserId 顾客ID
|
||||
* @param clerkUserId 陪聊ID
|
||||
* @param followState 关注状态[0:未关注,1:已关注]
|
||||
* @param customUserId
|
||||
* 顾客ID
|
||||
* @param clerkUserId
|
||||
* 陪聊ID
|
||||
* @param followState
|
||||
* 关注状态[0:未关注,1:已关注]
|
||||
*/
|
||||
void updateFollowState(String customUserId, String clerkUserId, String followState);
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询陪聊关注状态
|
||||
*
|
||||
* @param vo 店员关注状态 查询对象
|
||||
* @param vo
|
||||
* 店员关注状态 查询对象
|
||||
* @return 顾客关注陪聊信息集合
|
||||
* @author admin
|
||||
* @since 2024/5/10 10:28
|
||||
@@ -53,7 +59,8 @@ public interface IPlayCustomFollowInfoService extends IService<PlayCustomFollowI
|
||||
/**
|
||||
* 查询顾客关注陪聊信息列表
|
||||
*
|
||||
* @param playCustomFollowInfo 顾客关注陪聊信息
|
||||
* @param playCustomFollowInfo
|
||||
* 顾客关注陪聊信息
|
||||
* @return 顾客关注陪聊信息集合
|
||||
*/
|
||||
IPage<PlayCustomFollowInfoEntity> selectPlayCustomFollowInfoByPage(PlayCustomFollowInfoEntity playCustomFollowInfo);
|
||||
@@ -61,7 +68,8 @@ public interface IPlayCustomFollowInfoService extends IService<PlayCustomFollowI
|
||||
/**
|
||||
* 新增顾客关注陪聊信息
|
||||
*
|
||||
* @param playCustomFollowInfo 顾客关注陪聊信息
|
||||
* @param playCustomFollowInfo
|
||||
* 顾客关注陪聊信息
|
||||
* @return 结果
|
||||
*/
|
||||
boolean create(PlayCustomFollowInfoEntity playCustomFollowInfo);
|
||||
@@ -69,7 +77,8 @@ public interface IPlayCustomFollowInfoService extends IService<PlayCustomFollowI
|
||||
/**
|
||||
* 修改顾客关注陪聊信息
|
||||
*
|
||||
* @param playCustomFollowInfo 顾客关注陪聊信息
|
||||
* @param playCustomFollowInfo
|
||||
* 顾客关注陪聊信息
|
||||
* @return 结果
|
||||
*/
|
||||
boolean update(PlayCustomFollowInfoEntity playCustomFollowInfo);
|
||||
@@ -77,7 +86,8 @@ public interface IPlayCustomFollowInfoService extends IService<PlayCustomFollowI
|
||||
/**
|
||||
* 批量删除顾客关注陪聊信息
|
||||
*
|
||||
* @param ids 需要删除的顾客关注陪聊信息主键集合
|
||||
* @param ids
|
||||
* 需要删除的顾客关注陪聊信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayCustomFollowInfoByIds(String[] ids);
|
||||
@@ -85,7 +95,8 @@ public interface IPlayCustomFollowInfoService extends IService<PlayCustomFollowI
|
||||
/**
|
||||
* 删除顾客关注陪聊信息信息
|
||||
*
|
||||
* @param id 顾客关注陪聊信息主键
|
||||
* @param id
|
||||
* 顾客关注陪聊信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayCustomFollowInfoById(String id);
|
||||
|
||||
@@ -3,7 +3,6 @@ package com.starry.admin.modules.custom.service;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.starry.admin.modules.custom.module.entity.PlayCustomGiftInfoEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -14,19 +13,22 @@ import java.util.List;
|
||||
*/
|
||||
public interface IPlayCustomGiftInfoService extends IService<PlayCustomGiftInfoEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* 根据顾客ID和礼物ID,查询当前礼物活点亮情况
|
||||
* @param giftId 礼物ID
|
||||
* @param customId 顾客ID
|
||||
*
|
||||
* @param giftId
|
||||
* 礼物ID
|
||||
* @param customId
|
||||
* 顾客ID
|
||||
* @return 物活点亮情况
|
||||
*/
|
||||
PlayCustomGiftInfoEntity selectByGiftIdAndCustomId(String giftId,String customId);
|
||||
PlayCustomGiftInfoEntity selectByGiftIdAndCustomId(String giftId, String customId);
|
||||
|
||||
/**
|
||||
* 查询顾客已点亮礼物
|
||||
*
|
||||
* @param customId 顾客IF
|
||||
* @param customId
|
||||
* 顾客IF
|
||||
* @return 顾客已点亮礼物列表
|
||||
*/
|
||||
List<PlayCustomGiftInfoEntity> selectBtyCustomId(String customId);
|
||||
@@ -34,16 +36,17 @@ public interface IPlayCustomGiftInfoService extends IService<PlayCustomGiftInfoE
|
||||
/**
|
||||
* 查询顾客和礼物关系
|
||||
*
|
||||
* @param id 顾客和礼物关系主键
|
||||
* @param id
|
||||
* 顾客和礼物关系主键
|
||||
* @return 顾客和礼物关系
|
||||
*/
|
||||
PlayCustomGiftInfoEntity selectPlayCustomGiftInfoById(String id);
|
||||
|
||||
|
||||
/**
|
||||
* 查询顾客和礼物关系列表
|
||||
*
|
||||
* @param playCustomGiftInfo 顾客和礼物关系
|
||||
* @param playCustomGiftInfo
|
||||
* 顾客和礼物关系
|
||||
* @return 顾客和礼物关系集合
|
||||
*/
|
||||
IPage<PlayCustomGiftInfoEntity> selectPlayCustomGiftInfoByPage(PlayCustomGiftInfoEntity playCustomGiftInfo);
|
||||
@@ -51,7 +54,8 @@ public interface IPlayCustomGiftInfoService extends IService<PlayCustomGiftInfoE
|
||||
/**
|
||||
* 新增顾客和礼物关系
|
||||
*
|
||||
* @param playCustomGiftInfo 顾客和礼物关系
|
||||
* @param playCustomGiftInfo
|
||||
* 顾客和礼物关系
|
||||
* @return 结果
|
||||
*/
|
||||
boolean create(PlayCustomGiftInfoEntity playCustomGiftInfo);
|
||||
@@ -59,7 +63,8 @@ public interface IPlayCustomGiftInfoService extends IService<PlayCustomGiftInfoE
|
||||
/**
|
||||
* 修改顾客和礼物关系
|
||||
*
|
||||
* @param playCustomGiftInfo 顾客和礼物关系
|
||||
* @param playCustomGiftInfo
|
||||
* 顾客和礼物关系
|
||||
* @return 结果
|
||||
*/
|
||||
boolean update(PlayCustomGiftInfoEntity playCustomGiftInfo);
|
||||
@@ -67,7 +72,8 @@ public interface IPlayCustomGiftInfoService extends IService<PlayCustomGiftInfoE
|
||||
/**
|
||||
* 批量删除顾客和礼物关系
|
||||
*
|
||||
* @param ids 需要删除的顾客和礼物关系主键集合
|
||||
* @param ids
|
||||
* 需要删除的顾客和礼物关系主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayCustomGiftInfoByIds(String[] ids);
|
||||
@@ -75,7 +81,8 @@ public interface IPlayCustomGiftInfoService extends IService<PlayCustomGiftInfoE
|
||||
/**
|
||||
* 删除顾客和礼物关系信息
|
||||
*
|
||||
* @param id 顾客和礼物关系主键
|
||||
* @param id
|
||||
* 顾客和礼物关系主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayCustomGiftInfoById(String id);
|
||||
|
||||
@@ -16,25 +16,26 @@ public interface IPlayCustomLeaveMsgService extends IService<PlayCustomLeaveMsgE
|
||||
/**
|
||||
* 查询顾客留言
|
||||
*
|
||||
* @param id 顾客留言主键
|
||||
* @param id
|
||||
* 顾客留言主键
|
||||
* @return 顾客留言
|
||||
*/
|
||||
PlayCustomLeaveMsgEntity selectPlayCustomLeaveMsgById(String id);
|
||||
|
||||
|
||||
/**
|
||||
* 查询当前用户不允许留言的原因
|
||||
*
|
||||
* @param customId 顾客ID
|
||||
* @param customId
|
||||
* 顾客ID
|
||||
* @return 没有权限原因
|
||||
*/
|
||||
String queryNoMessagesAllowedReason(String customId);
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询顾客留言列表
|
||||
*
|
||||
* @param vo 顾客留言分页查询对象
|
||||
* @param vo
|
||||
* 顾客留言分页查询对象
|
||||
* @return 顾客留言集合
|
||||
*/
|
||||
IPage<PlayCustomLeaveMsgReturnVo> selectByPage(PlayCustomLeaveMsgQueryVo vo);
|
||||
@@ -42,7 +43,8 @@ public interface IPlayCustomLeaveMsgService extends IService<PlayCustomLeaveMsgE
|
||||
/**
|
||||
* 查询顾客留言列表
|
||||
*
|
||||
* @param playCustomLeaveMsg 顾客留言
|
||||
* @param playCustomLeaveMsg
|
||||
* 顾客留言
|
||||
* @return 顾客留言集合
|
||||
*/
|
||||
IPage<PlayCustomLeaveMsgEntity> selectPlayCustomLeaveMsgByPage(PlayCustomLeaveMsgEntity playCustomLeaveMsg);
|
||||
@@ -50,7 +52,8 @@ public interface IPlayCustomLeaveMsgService extends IService<PlayCustomLeaveMsgE
|
||||
/**
|
||||
* 新增顾客留言
|
||||
*
|
||||
* @param playCustomLeaveMsg 顾客留言
|
||||
* @param playCustomLeaveMsg
|
||||
* 顾客留言
|
||||
* @return 结果
|
||||
*/
|
||||
boolean create(PlayCustomLeaveMsgEntity playCustomLeaveMsg);
|
||||
@@ -58,7 +61,8 @@ public interface IPlayCustomLeaveMsgService extends IService<PlayCustomLeaveMsgE
|
||||
/**
|
||||
* 修改顾客留言
|
||||
*
|
||||
* @param playCustomLeaveMsg 顾客留言
|
||||
* @param playCustomLeaveMsg
|
||||
* 顾客留言
|
||||
* @return 结果
|
||||
*/
|
||||
boolean update(PlayCustomLeaveMsgEntity playCustomLeaveMsg);
|
||||
@@ -66,7 +70,8 @@ public interface IPlayCustomLeaveMsgService extends IService<PlayCustomLeaveMsgE
|
||||
/**
|
||||
* 批量删除顾客留言
|
||||
*
|
||||
* @param ids 需要删除的顾客留言主键集合
|
||||
* @param ids
|
||||
* 需要删除的顾客留言主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayCustomLeaveMsgByIds(String[] ids);
|
||||
@@ -74,7 +79,8 @@ public interface IPlayCustomLeaveMsgService extends IService<PlayCustomLeaveMsgE
|
||||
/**
|
||||
* 删除顾客留言信息
|
||||
*
|
||||
* @param id 顾客留言主键
|
||||
* @param id
|
||||
* 顾客留言主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayCustomLeaveMsgById(String id);
|
||||
|
||||
@@ -3,7 +3,6 @@ package com.starry.admin.modules.custom.service;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.starry.admin.modules.custom.module.entity.PlayCustomLevelInfoEntity;
|
||||
import com.starry.admin.modules.system.module.entity.SysTenantEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -17,7 +16,8 @@ public interface IPlayCustomLevelInfoService extends IService<PlayCustomLevelInf
|
||||
/**
|
||||
* 初始化顾客等级
|
||||
*
|
||||
* @param sysTenantEntity 租户细信息
|
||||
* @param sysTenantEntity
|
||||
* 租户细信息
|
||||
* @author admin
|
||||
* @since 2024/7/19 15:13
|
||||
**/
|
||||
@@ -40,7 +40,8 @@ public interface IPlayCustomLevelInfoService extends IService<PlayCustomLevelInf
|
||||
/**
|
||||
* 查询顾客等级
|
||||
*
|
||||
* @param id 顾客等级主键
|
||||
* @param id
|
||||
* 顾客等级主键
|
||||
* @return 顾客等级
|
||||
*/
|
||||
PlayCustomLevelInfoEntity selectPlayCustomLevelInfoById(String id);
|
||||
@@ -55,7 +56,8 @@ public interface IPlayCustomLevelInfoService extends IService<PlayCustomLevelInf
|
||||
/**
|
||||
* 新增顾客等级
|
||||
*
|
||||
* @param playCustomLevelInfo 顾客等级
|
||||
* @param playCustomLevelInfo
|
||||
* 顾客等级
|
||||
* @return 结果
|
||||
*/
|
||||
boolean create(PlayCustomLevelInfoEntity playCustomLevelInfo);
|
||||
@@ -63,7 +65,8 @@ public interface IPlayCustomLevelInfoService extends IService<PlayCustomLevelInf
|
||||
/**
|
||||
* 修改顾客等级
|
||||
*
|
||||
* @param playCustomLevelInfo 顾客等级
|
||||
* @param playCustomLevelInfo
|
||||
* 顾客等级
|
||||
* @return 结果
|
||||
*/
|
||||
boolean update(PlayCustomLevelInfoEntity playCustomLevelInfo);
|
||||
@@ -71,7 +74,8 @@ public interface IPlayCustomLevelInfoService extends IService<PlayCustomLevelInf
|
||||
/**
|
||||
* 批量删除顾客等级
|
||||
*
|
||||
* @param ids 需要删除的顾客等级主键集合
|
||||
* @param ids
|
||||
* 需要删除的顾客等级主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayCustomLevelInfoByIds(String[] ids);
|
||||
@@ -79,7 +83,8 @@ public interface IPlayCustomLevelInfoService extends IService<PlayCustomLevelInf
|
||||
/**
|
||||
* 删除顾客等级信息
|
||||
*
|
||||
* @param id 顾客等级主键
|
||||
* @param id
|
||||
* 顾客等级主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayCustomLevelInfoById(String id);
|
||||
@@ -91,7 +96,6 @@ public interface IPlayCustomLevelInfoService extends IService<PlayCustomLevelInf
|
||||
*/
|
||||
int selectMaxLevel();
|
||||
|
||||
|
||||
/**
|
||||
* 删除最大等级
|
||||
*/
|
||||
|
||||
@@ -8,7 +8,6 @@ import com.starry.admin.modules.custom.module.vo.PlayCustomRankingReturnVo;
|
||||
import com.starry.admin.modules.custom.module.vo.PlayCustomUserQueryVo;
|
||||
import com.starry.admin.modules.custom.module.vo.PlayCustomUserReturnVo;
|
||||
import com.starry.admin.modules.order.module.entity.PlayOrderInfoEntity;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
@@ -20,11 +19,11 @@ import java.util.List;
|
||||
*/
|
||||
public interface IPlayCustomUserInfoService extends IService<PlayCustomUserInfoEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* 查询顾客
|
||||
*
|
||||
* @param openId 顾客主键
|
||||
* @param openId
|
||||
* 顾客主键
|
||||
* @return 顾客
|
||||
*/
|
||||
PlayCustomUserInfoEntity selectByOpenid(String openId);
|
||||
@@ -32,26 +31,31 @@ public interface IPlayCustomUserInfoService extends IService<PlayCustomUserInfoE
|
||||
/**
|
||||
* 根据顾客等级,查询顾客充值余额时,实际支付金额
|
||||
*
|
||||
* @param rechargeAmount 重置金额,单位分
|
||||
* @param customId 顾客ID
|
||||
* @param rechargeAmount
|
||||
* 重置金额,单位分
|
||||
* @param customId
|
||||
* 顾客ID
|
||||
* @return 实际支付金额
|
||||
*/
|
||||
BigDecimal getCustomPaymentAmount(BigDecimal rechargeAmount, String customId);
|
||||
|
||||
|
||||
/**
|
||||
* 顾客账户余额充值
|
||||
*
|
||||
* @param rechargeAmount 充值金额,单位分
|
||||
* @param customId 顾客ID
|
||||
* @param orderId 订单ID
|
||||
* @param rechargeAmount
|
||||
* 充值金额,单位分
|
||||
* @param customId
|
||||
* 顾客ID
|
||||
* @param orderId
|
||||
* 订单ID
|
||||
*/
|
||||
void customAccountBalanceRecharge(BigDecimal rechargeAmount, String customId, String orderId);
|
||||
|
||||
/**
|
||||
* 查询顾客
|
||||
*
|
||||
* @param id 顾客主键
|
||||
* @param id
|
||||
* 顾客主键
|
||||
* @return 顾客
|
||||
*/
|
||||
PlayCustomUserInfoEntity selectById(String id);
|
||||
@@ -59,25 +63,26 @@ public interface IPlayCustomUserInfoService extends IService<PlayCustomUserInfoE
|
||||
/**
|
||||
* 分页查询顾客列表
|
||||
*
|
||||
* @param vo 顾客查询对象
|
||||
* @param vo
|
||||
* 顾客查询对象
|
||||
* @return 顾客集合
|
||||
*/
|
||||
IPage<PlayCustomUserReturnVo> selectByPage(PlayCustomUserQueryVo vo);
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询顾客排名列表
|
||||
*
|
||||
* @param vo 顾客查询对象
|
||||
* @param vo
|
||||
* 顾客查询对象
|
||||
* @return 顾客集合
|
||||
*/
|
||||
IPage<PlayCustomRankingReturnVo> selectRankingByPage(PlayCustomRankingQueryVo vo);
|
||||
|
||||
|
||||
/**
|
||||
* 新增顾客
|
||||
*
|
||||
* @param playCustomUserInfo 顾客
|
||||
* @param playCustomUserInfo
|
||||
* 顾客
|
||||
* @return 结果
|
||||
*/
|
||||
boolean create(PlayCustomUserInfoEntity playCustomUserInfo);
|
||||
@@ -85,8 +90,10 @@ public interface IPlayCustomUserInfoService extends IService<PlayCustomUserInfoE
|
||||
/**
|
||||
* 更新token
|
||||
*
|
||||
* @param id 账户余额
|
||||
* @param token TOKEN
|
||||
* @param id
|
||||
* 账户余额
|
||||
* @param token
|
||||
* TOKEN
|
||||
* @author admin
|
||||
* @since 2024/4/9 14:33
|
||||
**/
|
||||
@@ -95,8 +102,10 @@ public interface IPlayCustomUserInfoService extends IService<PlayCustomUserInfoE
|
||||
/**
|
||||
* 更新账号余额
|
||||
*
|
||||
* @param id 用户ID
|
||||
* @param accountBalance 账户余额
|
||||
* @param id
|
||||
* 用户ID
|
||||
* @param accountBalance
|
||||
* 账户余额
|
||||
* @author admin
|
||||
* @since 2024/4/9 14:33
|
||||
**/
|
||||
@@ -105,21 +114,32 @@ public interface IPlayCustomUserInfoService extends IService<PlayCustomUserInfoE
|
||||
/**
|
||||
* 更新顾客账户余额信息
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @param balanceBeforeOperation 操作前余额
|
||||
* @param balanceAfterOperation 操作后余额
|
||||
* @param operationType 操作类型(0:充值;1:消费;2:服务;3:退款)
|
||||
* @param operationAction 操作动作
|
||||
* @param balanceMoney 操作金额
|
||||
* @param giftAmount 赠送金额
|
||||
* @param orderId 订单ID
|
||||
* @param userId
|
||||
* 用户ID
|
||||
* @param balanceBeforeOperation
|
||||
* 操作前余额
|
||||
* @param balanceAfterOperation
|
||||
* 操作后余额
|
||||
* @param operationType
|
||||
* 操作类型(0:充值;1:消费;2:服务;3:退款)
|
||||
* @param operationAction
|
||||
* 操作动作
|
||||
* @param balanceMoney
|
||||
* 操作金额
|
||||
* @param giftAmount
|
||||
* 赠送金额
|
||||
* @param orderId
|
||||
* 订单ID
|
||||
*/
|
||||
void updateAccountBalanceById(String userId, BigDecimal balanceBeforeOperation, BigDecimal balanceAfterOperation, String operationType, String operationAction, BigDecimal balanceMoney, BigDecimal giftAmount,String orderId);
|
||||
void updateAccountBalanceById(String userId, BigDecimal balanceBeforeOperation, BigDecimal balanceAfterOperation,
|
||||
String operationType, String operationAction, BigDecimal balanceMoney, BigDecimal giftAmount,
|
||||
String orderId);
|
||||
|
||||
/**
|
||||
* 修改顾客
|
||||
*
|
||||
* @param playCustomUserInfo 顾客
|
||||
* @param playCustomUserInfo
|
||||
* 顾客
|
||||
* @return 结果
|
||||
*/
|
||||
boolean update(PlayCustomUserInfoEntity playCustomUserInfo);
|
||||
@@ -127,7 +147,8 @@ public interface IPlayCustomUserInfoService extends IService<PlayCustomUserInfoE
|
||||
/**
|
||||
* 批量删除顾客
|
||||
*
|
||||
* @param ids 需要删除的顾客主键集合
|
||||
* @param ids
|
||||
* 需要删除的顾客主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayCustomUserInfoByIds(String[] ids);
|
||||
@@ -135,18 +156,19 @@ public interface IPlayCustomUserInfoService extends IService<PlayCustomUserInfoE
|
||||
/**
|
||||
* 删除顾客信息
|
||||
*
|
||||
* @param id 顾客主键
|
||||
* @param id
|
||||
* 顾客主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayCustomUserInfoById(String id);
|
||||
|
||||
List<PlayCustomUserInfoEntity> simpleList();
|
||||
|
||||
|
||||
/**
|
||||
* 保存订单信息
|
||||
* 保存订单信息
|
||||
*
|
||||
* @param entity 订单实体 * @since 2024/7/18 17:13
|
||||
* @param entity
|
||||
* 订单实体 * @since 2024/7/18 17:13
|
||||
* @author admin
|
||||
**/
|
||||
void saveOrderInfo(PlayOrderInfoEntity entity);
|
||||
|
||||
@@ -13,11 +13,10 @@ import com.starry.admin.modules.custom.service.IPlayCustomFollowInfoService;
|
||||
import com.starry.admin.modules.weichat.entity.PlayClerkFollowQueryVo;
|
||||
import com.starry.admin.modules.weichat.entity.PlayClerkFollowReturnVo;
|
||||
import com.starry.common.utils.IdUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 顾客关注陪聊信息Service业务层处理
|
||||
@@ -26,14 +25,17 @@ import java.util.Date;
|
||||
* @since 2024-04-30
|
||||
*/
|
||||
@Service
|
||||
public class PlayCustomFollowInfoServiceImpl extends ServiceImpl<PlayCustomFollowInfoMapper, PlayCustomFollowInfoEntity> implements IPlayCustomFollowInfoService {
|
||||
public class PlayCustomFollowInfoServiceImpl extends ServiceImpl<PlayCustomFollowInfoMapper, PlayCustomFollowInfoEntity>
|
||||
implements
|
||||
IPlayCustomFollowInfoService {
|
||||
@Resource
|
||||
private PlayCustomFollowInfoMapper playCustomFollowInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询顾客关注陪聊信息
|
||||
*
|
||||
* @param id 顾客关注陪聊信息主键
|
||||
* @param id
|
||||
* 顾客关注陪聊信息主键
|
||||
* @return 顾客关注陪聊信息
|
||||
*/
|
||||
@Override
|
||||
@@ -41,7 +43,6 @@ public class PlayCustomFollowInfoServiceImpl extends ServiceImpl<PlayCustomFollo
|
||||
return this.baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String queryFollowState(String customUserId, String clerkUserId) {
|
||||
LambdaQueryWrapper<PlayCustomFollowInfoEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
@@ -78,17 +79,19 @@ public class PlayCustomFollowInfoServiceImpl extends ServiceImpl<PlayCustomFollo
|
||||
// 陪聊用户表全部字段
|
||||
.selectAll(PlayClerkUserInfoEntity.class)
|
||||
// 陪聊用户表
|
||||
.leftJoin(PlayClerkUserInfoEntity.class, PlayClerkUserInfoEntity::getId, PlayCustomFollowInfoEntity::getClerkId);
|
||||
.leftJoin(PlayClerkUserInfoEntity.class, PlayClerkUserInfoEntity::getId,
|
||||
PlayCustomFollowInfoEntity::getClerkId);
|
||||
if (StrUtil.isNotBlank(vo.getCustomId())) {
|
||||
lambdaQueryWrapper.eq(PlayCustomFollowInfoEntity::getCustomId, vo.getCustomId());
|
||||
}
|
||||
if (StrUtil.isNotBlank(vo.getFollowState())) {
|
||||
lambdaQueryWrapper.eq(PlayCustomFollowInfoEntity::getFollowState, vo.getFollowState());
|
||||
}
|
||||
IPage<PlayClerkFollowReturnVo> iPage = this.baseMapper.selectJoinPage(new Page<>(vo.getPageNum(), vo.getPageSize()), PlayClerkFollowReturnVo.class, lambdaQueryWrapper);
|
||||
IPage<PlayClerkFollowReturnVo> iPage = this.baseMapper.selectJoinPage(
|
||||
new Page<>(vo.getPageNum(), vo.getPageSize()), PlayClerkFollowReturnVo.class, lambdaQueryWrapper);
|
||||
for (PlayClerkFollowReturnVo record : iPage.getRecords()) {
|
||||
LambdaQueryWrapper<PlayCustomFollowInfoEntity> lambdaQueryWrapper1 = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper1.eq(PlayCustomFollowInfoEntity::getClerkId,record.getClerkId());
|
||||
lambdaQueryWrapper1.eq(PlayCustomFollowInfoEntity::getClerkId, record.getClerkId());
|
||||
record.setFollowNumber(this.baseMapper.selectList(lambdaQueryWrapper1).size());
|
||||
}
|
||||
return iPage;
|
||||
@@ -97,11 +100,13 @@ public class PlayCustomFollowInfoServiceImpl extends ServiceImpl<PlayCustomFollo
|
||||
/**
|
||||
* 查询顾客关注陪聊信息列表
|
||||
*
|
||||
* @param playCustomFollowInfo 顾客关注陪聊信息
|
||||
* @param playCustomFollowInfo
|
||||
* 顾客关注陪聊信息
|
||||
* @return 顾客关注陪聊信息
|
||||
*/
|
||||
@Override
|
||||
public IPage<PlayCustomFollowInfoEntity> selectPlayCustomFollowInfoByPage(PlayCustomFollowInfoEntity playCustomFollowInfo) {
|
||||
public IPage<PlayCustomFollowInfoEntity> selectPlayCustomFollowInfoByPage(
|
||||
PlayCustomFollowInfoEntity playCustomFollowInfo) {
|
||||
Page<PlayCustomFollowInfoEntity> page = new Page<>(1, 10);
|
||||
return this.baseMapper.selectPage(page, new LambdaQueryWrapper<>());
|
||||
}
|
||||
@@ -109,7 +114,8 @@ public class PlayCustomFollowInfoServiceImpl extends ServiceImpl<PlayCustomFollo
|
||||
/**
|
||||
* 新增顾客关注陪聊信息
|
||||
*
|
||||
* @param playCustomFollowInfo 顾客关注陪聊信息
|
||||
* @param playCustomFollowInfo
|
||||
* 顾客关注陪聊信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@@ -123,7 +129,8 @@ public class PlayCustomFollowInfoServiceImpl extends ServiceImpl<PlayCustomFollo
|
||||
/**
|
||||
* 修改顾客关注陪聊信息
|
||||
*
|
||||
* @param playCustomFollowInfo 顾客关注陪聊信息
|
||||
* @param playCustomFollowInfo
|
||||
* 顾客关注陪聊信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@@ -134,7 +141,8 @@ public class PlayCustomFollowInfoServiceImpl extends ServiceImpl<PlayCustomFollo
|
||||
/**
|
||||
* 批量删除顾客关注陪聊信息
|
||||
*
|
||||
* @param ids 需要删除的顾客关注陪聊信息主键
|
||||
* @param ids
|
||||
* 需要删除的顾客关注陪聊信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@@ -145,7 +153,8 @@ public class PlayCustomFollowInfoServiceImpl extends ServiceImpl<PlayCustomFollo
|
||||
/**
|
||||
* 删除顾客关注陪聊信息信息
|
||||
*
|
||||
* @param id 顾客关注陪聊信息主键
|
||||
* @param id
|
||||
* 顾客关注陪聊信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
|
||||
@@ -9,11 +9,10 @@ import com.starry.admin.modules.custom.mapper.PlayCustomGiftInfoMapper;
|
||||
import com.starry.admin.modules.custom.module.entity.PlayCustomGiftInfoEntity;
|
||||
import com.starry.admin.modules.custom.service.IPlayCustomGiftInfoService;
|
||||
import com.starry.common.utils.IdUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 顾客和礼物关系Service业务层处理
|
||||
@@ -22,11 +21,12 @@ import java.util.List;
|
||||
* @since 2024-06-05
|
||||
*/
|
||||
@Service
|
||||
public class PlayCustomGiftInfoServiceImpl extends ServiceImpl<PlayCustomGiftInfoMapper, PlayCustomGiftInfoEntity> implements IPlayCustomGiftInfoService {
|
||||
public class PlayCustomGiftInfoServiceImpl extends ServiceImpl<PlayCustomGiftInfoMapper, PlayCustomGiftInfoEntity>
|
||||
implements
|
||||
IPlayCustomGiftInfoService {
|
||||
@Resource
|
||||
private PlayCustomGiftInfoMapper playCustomGiftInfoMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public PlayCustomGiftInfoEntity selectByGiftIdAndCustomId(String giftId, String customId) {
|
||||
LambdaQueryWrapper<PlayCustomGiftInfoEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
@@ -38,7 +38,8 @@ public class PlayCustomGiftInfoServiceImpl extends ServiceImpl<PlayCustomGiftInf
|
||||
/**
|
||||
* 根据店员ID查询店员活动礼物列表
|
||||
*
|
||||
* @param customId 店员ID
|
||||
* @param customId
|
||||
* 店员ID
|
||||
* @return 店员活动礼物列表
|
||||
*/
|
||||
@Override
|
||||
@@ -48,11 +49,11 @@ public class PlayCustomGiftInfoServiceImpl extends ServiceImpl<PlayCustomGiftInf
|
||||
return this.baseMapper.selectList(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询顾客和礼物关系
|
||||
*
|
||||
* @param id 顾客和礼物关系主键
|
||||
* @param id
|
||||
* 顾客和礼物关系主键
|
||||
* @return 顾客和礼物关系
|
||||
*/
|
||||
@Override
|
||||
@@ -63,7 +64,8 @@ public class PlayCustomGiftInfoServiceImpl extends ServiceImpl<PlayCustomGiftInf
|
||||
/**
|
||||
* 查询顾客和礼物关系列表
|
||||
*
|
||||
* @param playCustomGiftInfo 顾客和礼物关系
|
||||
* @param playCustomGiftInfo
|
||||
* 顾客和礼物关系
|
||||
* @return 顾客和礼物关系
|
||||
*/
|
||||
@Override
|
||||
@@ -75,7 +77,8 @@ public class PlayCustomGiftInfoServiceImpl extends ServiceImpl<PlayCustomGiftInf
|
||||
/**
|
||||
* 新增顾客和礼物关系
|
||||
*
|
||||
* @param playCustomGiftInfo 顾客和礼物关系
|
||||
* @param playCustomGiftInfo
|
||||
* 顾客和礼物关系
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@@ -89,7 +92,8 @@ public class PlayCustomGiftInfoServiceImpl extends ServiceImpl<PlayCustomGiftInf
|
||||
/**
|
||||
* 修改顾客和礼物关系
|
||||
*
|
||||
* @param playCustomGiftInfo 顾客和礼物关系
|
||||
* @param playCustomGiftInfo
|
||||
* 顾客和礼物关系
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@@ -100,7 +104,8 @@ public class PlayCustomGiftInfoServiceImpl extends ServiceImpl<PlayCustomGiftInf
|
||||
/**
|
||||
* 批量删除顾客和礼物关系
|
||||
*
|
||||
* @param ids 需要删除的顾客和礼物关系主键
|
||||
* @param ids
|
||||
* 需要删除的顾客和礼物关系主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@@ -111,7 +116,8 @@ public class PlayCustomGiftInfoServiceImpl extends ServiceImpl<PlayCustomGiftInf
|
||||
/**
|
||||
* 删除顾客和礼物关系信息
|
||||
*
|
||||
* @param id 顾客和礼物关系主键
|
||||
* @param id
|
||||
* 顾客和礼物关系主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
|
||||
@@ -16,12 +16,11 @@ import com.starry.admin.modules.custom.module.vo.PlayCustomLeaveMsgReturnVo;
|
||||
import com.starry.admin.modules.custom.service.IPlayCustomLeaveMsgService;
|
||||
import com.starry.common.utils.IdUtils;
|
||||
import com.starry.common.utils.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
import java.util.Arrays;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 顾客留言Service业务层处理
|
||||
@@ -30,7 +29,9 @@ import java.util.Arrays;
|
||||
* @since 2024-05-07
|
||||
*/
|
||||
@Service
|
||||
public class PlayCustomLeaveMsgServiceImpl extends ServiceImpl<PlayCustomLeaveMsgMapper, PlayCustomLeaveMsgEntity> implements IPlayCustomLeaveMsgService {
|
||||
public class PlayCustomLeaveMsgServiceImpl extends ServiceImpl<PlayCustomLeaveMsgMapper, PlayCustomLeaveMsgEntity>
|
||||
implements
|
||||
IPlayCustomLeaveMsgService {
|
||||
@Resource
|
||||
private PlayCustomLeaveMsgMapper playCustomLeaveMsgMapper;
|
||||
|
||||
@@ -40,16 +41,21 @@ public class PlayCustomLeaveMsgServiceImpl extends ServiceImpl<PlayCustomLeaveMs
|
||||
// 查询主表全部字段
|
||||
.selectAll(PlayCustomLeaveMsgEntity.class)
|
||||
// 查询顾客表
|
||||
.selectAs(PlayCustomUserInfoEntity::getId, "customId").selectAs(PlayCustomUserInfoEntity::getAvatar, "customAvatar").selectAs(PlayCustomUserInfoEntity::getNickname, "customNickname")
|
||||
.selectAs(PlayCustomUserInfoEntity::getId, "customId")
|
||||
.selectAs(PlayCustomUserInfoEntity::getAvatar, "customAvatar")
|
||||
.selectAs(PlayCustomUserInfoEntity::getNickname, "customNickname")
|
||||
// 子表
|
||||
.leftJoin(PlayCustomUserInfoEntity.class, PlayCustomUserInfoEntity::getId, PlayCustomLeaveMsgEntity::getCustomId);
|
||||
return this.baseMapper.selectJoinPage(new Page<>(vo.getPageNum(), vo.getPageSize()), PlayCustomLeaveMsgReturnVo.class, lambdaQueryWrapper);
|
||||
.leftJoin(PlayCustomUserInfoEntity.class, PlayCustomUserInfoEntity::getId,
|
||||
PlayCustomLeaveMsgEntity::getCustomId);
|
||||
return this.baseMapper.selectJoinPage(new Page<>(vo.getPageNum(), vo.getPageSize()),
|
||||
PlayCustomLeaveMsgReturnVo.class, lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询顾客留言
|
||||
*
|
||||
* @param id 顾客留言主键
|
||||
* @param id
|
||||
* 顾客留言主键
|
||||
* @return 顾客留言
|
||||
*/
|
||||
@Override
|
||||
@@ -60,7 +66,8 @@ public class PlayCustomLeaveMsgServiceImpl extends ServiceImpl<PlayCustomLeaveMs
|
||||
/**
|
||||
* 查询顾客留言列表
|
||||
*
|
||||
* @param playCustomLeaveMsg 顾客留言
|
||||
* @param playCustomLeaveMsg
|
||||
* 顾客留言
|
||||
* @return 顾客留言
|
||||
*/
|
||||
@Override
|
||||
@@ -70,10 +77,10 @@ public class PlayCustomLeaveMsgServiceImpl extends ServiceImpl<PlayCustomLeaveMs
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询当前用户不允许留言的原因
|
||||
* 1、一个人在同一天只能留言一次
|
||||
* 查询当前用户不允许留言的原因 1、一个人在同一天只能留言一次
|
||||
*
|
||||
* @param customId 顾客ID
|
||||
* @param customId
|
||||
* 顾客ID
|
||||
* @return 当前用户不允许留言的原因
|
||||
*/
|
||||
@Override
|
||||
@@ -96,12 +103,14 @@ public class PlayCustomLeaveMsgServiceImpl extends ServiceImpl<PlayCustomLeaveMs
|
||||
/**
|
||||
* 新增顾客留言
|
||||
*
|
||||
* @param playCustomLeaveMsg 顾客留言
|
||||
* @param playCustomLeaveMsg
|
||||
* 顾客留言
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean create(PlayCustomLeaveMsgEntity playCustomLeaveMsg) {
|
||||
String noMessagesAllowedReason = this.queryNoMessagesAllowedReason(ThreadLocalRequestDetail.getCustomUserInfo().getId());
|
||||
String noMessagesAllowedReason = this
|
||||
.queryNoMessagesAllowedReason(ThreadLocalRequestDetail.getCustomUserInfo().getId());
|
||||
if (StringUtils.isNotEmpty(noMessagesAllowedReason)) {
|
||||
throw new CustomException(noMessagesAllowedReason);
|
||||
}
|
||||
@@ -114,7 +123,8 @@ public class PlayCustomLeaveMsgServiceImpl extends ServiceImpl<PlayCustomLeaveMs
|
||||
/**
|
||||
* 修改顾客留言
|
||||
*
|
||||
* @param playCustomLeaveMsg 顾客留言
|
||||
* @param playCustomLeaveMsg
|
||||
* 顾客留言
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@@ -125,7 +135,8 @@ public class PlayCustomLeaveMsgServiceImpl extends ServiceImpl<PlayCustomLeaveMs
|
||||
/**
|
||||
* 批量删除顾客留言
|
||||
*
|
||||
* @param ids 需要删除的顾客留言主键
|
||||
* @param ids
|
||||
* 需要删除的顾客留言主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@@ -136,7 +147,8 @@ public class PlayCustomLeaveMsgServiceImpl extends ServiceImpl<PlayCustomLeaveMs
|
||||
/**
|
||||
* 删除顾客留言信息
|
||||
*
|
||||
* @param id 顾客留言主键
|
||||
* @param id
|
||||
* 顾客留言主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
|
||||
@@ -9,11 +9,10 @@ import com.starry.admin.modules.custom.module.entity.PlayCustomLevelInfoEntity;
|
||||
import com.starry.admin.modules.custom.service.IPlayCustomLevelInfoService;
|
||||
import com.starry.admin.modules.system.module.entity.SysTenantEntity;
|
||||
import com.starry.common.utils.IdUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 顾客等级Service业务层处理
|
||||
@@ -22,11 +21,12 @@ import java.util.List;
|
||||
* @since 2024-05-04
|
||||
*/
|
||||
@Service
|
||||
public class PlayCustomLevelInfoServiceImpl extends ServiceImpl<PlayCustomLevelInfoMapper, PlayCustomLevelInfoEntity> implements IPlayCustomLevelInfoService {
|
||||
public class PlayCustomLevelInfoServiceImpl extends ServiceImpl<PlayCustomLevelInfoMapper, PlayCustomLevelInfoEntity>
|
||||
implements
|
||||
IPlayCustomLevelInfoService {
|
||||
@Resource
|
||||
private PlayCustomLevelInfoMapper playCustomLevelInfoMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public void initDefaultLevel(SysTenantEntity sysTenantEntity) {
|
||||
List<PlayCustomLevelInfoEntity> list = this.selectAll();
|
||||
@@ -64,11 +64,11 @@ public class PlayCustomLevelInfoServiceImpl extends ServiceImpl<PlayCustomLevelI
|
||||
return this.baseMapper.selectList(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询顾客等级
|
||||
*
|
||||
* @param id 顾客等级主键
|
||||
* @param id
|
||||
* 顾客等级主键
|
||||
* @return 顾客等级
|
||||
*/
|
||||
@Override
|
||||
@@ -91,7 +91,8 @@ public class PlayCustomLevelInfoServiceImpl extends ServiceImpl<PlayCustomLevelI
|
||||
/**
|
||||
* 新增顾客等级
|
||||
*
|
||||
* @param playCustomLevelInfo 顾客等级
|
||||
* @param playCustomLevelInfo
|
||||
* 顾客等级
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@@ -105,7 +106,8 @@ public class PlayCustomLevelInfoServiceImpl extends ServiceImpl<PlayCustomLevelI
|
||||
/**
|
||||
* 修改顾客等级
|
||||
*
|
||||
* @param playCustomLevelInfo 顾客等级
|
||||
* @param playCustomLevelInfo
|
||||
* 顾客等级
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@@ -116,7 +118,8 @@ public class PlayCustomLevelInfoServiceImpl extends ServiceImpl<PlayCustomLevelI
|
||||
/**
|
||||
* 批量删除顾客等级
|
||||
*
|
||||
* @param ids 需要删除的顾客等级主键
|
||||
* @param ids
|
||||
* 需要删除的顾客等级主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@@ -127,7 +130,8 @@ public class PlayCustomLevelInfoServiceImpl extends ServiceImpl<PlayCustomLevelI
|
||||
/**
|
||||
* 删除顾客等级信息
|
||||
*
|
||||
* @param id 顾客等级主键
|
||||
* @param id
|
||||
* 顾客等级主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
|
||||
@@ -21,14 +21,13 @@ import com.starry.admin.modules.order.module.entity.PlayOrderInfoEntity;
|
||||
import com.starry.admin.modules.order.service.impl.PlayOrderInfoServiceImpl;
|
||||
import com.starry.admin.modules.personnel.service.IPlayBalanceDetailsInfoService;
|
||||
import com.starry.common.utils.IdUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 顾客Service业务层处理
|
||||
@@ -38,7 +37,9 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class PlayCustomUserInfoServiceImpl extends ServiceImpl<PlayCustomUserInfoMapper, PlayCustomUserInfoEntity> implements IPlayCustomUserInfoService {
|
||||
public class PlayCustomUserInfoServiceImpl extends ServiceImpl<PlayCustomUserInfoMapper, PlayCustomUserInfoEntity>
|
||||
implements
|
||||
IPlayCustomUserInfoService {
|
||||
@Resource
|
||||
private PlayCustomUserInfoMapper playCustomUserInfoMapper;
|
||||
|
||||
@@ -48,7 +49,6 @@ public class PlayCustomUserInfoServiceImpl extends ServiceImpl<PlayCustomUserInf
|
||||
@Resource
|
||||
private IPlayBalanceDetailsInfoService playBalanceDetailsInfoService;
|
||||
|
||||
|
||||
@Override
|
||||
public PlayCustomUserInfoEntity selectByOpenid(String openId) {
|
||||
LambdaQueryWrapper<PlayCustomUserInfoEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
@@ -56,21 +56,23 @@ public class PlayCustomUserInfoServiceImpl extends ServiceImpl<PlayCustomUserInf
|
||||
return this.baseMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BigDecimal getCustomPaymentAmount(BigDecimal rechargeAmount, String customId) {
|
||||
//根据顾客ID,查询顾客对应等级
|
||||
// 根据顾客ID,查询顾客对应等级
|
||||
MPJLambdaWrapper<PlayCustomUserInfoEntity> lambdaQueryWrapper = new MPJLambdaWrapper<>();
|
||||
lambdaQueryWrapper.selectAll(PlayCustomLevelInfoEntity.class);
|
||||
lambdaQueryWrapper.leftJoin(PlayCustomLevelInfoEntity.class, PlayCustomLevelInfoEntity::getId, PlayCustomUserInfoEntity::getLevelId);
|
||||
lambdaQueryWrapper.leftJoin(PlayCustomLevelInfoEntity.class, PlayCustomLevelInfoEntity::getId,
|
||||
PlayCustomUserInfoEntity::getLevelId);
|
||||
lambdaQueryWrapper.eq(PlayCustomUserInfoEntity::getId, customId);
|
||||
PlayCustomLevelInfoEntity entity = this.baseMapper.selectJoinOne(PlayCustomLevelInfoEntity.class, lambdaQueryWrapper);
|
||||
PlayCustomLevelInfoEntity entity = this.baseMapper.selectJoinOne(PlayCustomLevelInfoEntity.class,
|
||||
lambdaQueryWrapper);
|
||||
if (entity == null) {
|
||||
log.error("未查询当前顾客的充值优惠金额,支付金额等于充值金额,rechargeAmount={},customId={}", rechargeAmount, customId);
|
||||
return rechargeAmount;
|
||||
}
|
||||
try {
|
||||
BigDecimal paymentAmount = BigDecimal.valueOf(entity.getDiscount()).divide(new BigDecimal(100), 2, RoundingMode.HALF_UP).multiply(rechargeAmount);
|
||||
BigDecimal paymentAmount = BigDecimal.valueOf(entity.getDiscount())
|
||||
.divide(new BigDecimal(100), 2, RoundingMode.HALF_UP).multiply(rechargeAmount);
|
||||
log.info("等级为{}的顾客{},充值{}元,实际应该支付{}元", entity.getName(), customId, rechargeAmount, paymentAmount);
|
||||
return paymentAmount;
|
||||
} catch (Exception e) {
|
||||
@@ -82,15 +84,17 @@ public class PlayCustomUserInfoServiceImpl extends ServiceImpl<PlayCustomUserInf
|
||||
@Override
|
||||
public void customAccountBalanceRecharge(BigDecimal rechargeAmount, String customId, String orderId) {
|
||||
PlayCustomUserInfoEntity userInfo = this.selectById(customId);
|
||||
//查询充值赠送金额(暂是设置为0)
|
||||
// 查询充值赠送金额(暂是设置为0)
|
||||
// 此处我想实现:超过50送5,超过100送10,200送20,300送30,400送40,500送50
|
||||
BigDecimal giftAmount = calculateGiftMoney(rechargeAmount);
|
||||
//修改用户账户余额
|
||||
this.updateAccountBalanceById(customId, userInfo.getAccountBalance(), userInfo.getAccountBalance().add(rechargeAmount).add(giftAmount), "0", "充值", rechargeAmount.add(giftAmount), giftAmount, orderId);
|
||||
// 修改用户账户余额
|
||||
this.updateAccountBalanceById(customId, userInfo.getAccountBalance(),
|
||||
userInfo.getAccountBalance().add(rechargeAmount).add(giftAmount), "0", "充值",
|
||||
rechargeAmount.add(giftAmount), giftAmount, orderId);
|
||||
}
|
||||
|
||||
private static BigDecimal calculateGiftMoney(BigDecimal rechargeAmount) {
|
||||
//此处我想实现:超过50送5,超过100送10,200送20,300送30,400送40,500送50
|
||||
// 此处我想实现:超过50送5,超过100送10,200送20,300送30,400送40,500送50
|
||||
BigDecimal giftAmount = BigDecimal.ZERO;
|
||||
if (rechargeAmount.compareTo(new BigDecimal(50)) >= 0) {
|
||||
giftAmount = new BigDecimal(5);
|
||||
@@ -113,11 +117,11 @@ public class PlayCustomUserInfoServiceImpl extends ServiceImpl<PlayCustomUserInf
|
||||
return giftAmount;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询顾客
|
||||
*
|
||||
* @param id 顾客主键
|
||||
* @param id
|
||||
* 顾客主键
|
||||
* @return 顾客
|
||||
*/
|
||||
@Override
|
||||
@@ -129,19 +133,22 @@ public class PlayCustomUserInfoServiceImpl extends ServiceImpl<PlayCustomUserInf
|
||||
return entity;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IPage<PlayCustomRankingReturnVo> selectRankingByPage(PlayCustomRankingQueryVo vo) {
|
||||
MPJLambdaWrapper<PlayCustomUserInfoEntity> lambdaQueryWrapper = new MPJLambdaWrapper<>();
|
||||
lambdaQueryWrapper.selectCollection(PlayOrderInfoEntity.class, PlayCustomRankingReturnVo::getOrderInfos).leftJoin(PlayOrderInfoEntity.class, PlayOrderInfoEntity::getPurchaserBy, PlayCustomUserInfoEntity::getId);
|
||||
lambdaQueryWrapper.selectCollection(PlayOrderInfoEntity.class, PlayCustomRankingReturnVo::getOrderInfos)
|
||||
.leftJoin(PlayOrderInfoEntity.class, PlayOrderInfoEntity::getPurchaserBy,
|
||||
PlayCustomUserInfoEntity::getId);
|
||||
if (StrUtil.isNotBlank(vo.getId())) {
|
||||
lambdaQueryWrapper.eq(PlayCustomUserInfoEntity::getId, vo.getId());
|
||||
}
|
||||
if (vo.getPurchaserTime() != null && vo.getPurchaserTime().size() == 2) {
|
||||
lambdaQueryWrapper.between(PlayOrderInfoEntity::getPurchaserTime, vo.getPurchaserTime().get(0), vo.getPurchaserTime().get(1));
|
||||
lambdaQueryWrapper.between(PlayOrderInfoEntity::getPurchaserTime, vo.getPurchaserTime().get(0),
|
||||
vo.getPurchaserTime().get(1));
|
||||
}
|
||||
|
||||
IPage<PlayCustomRankingReturnVo> page = this.baseMapper.selectJoinPage(new Page<>(vo.getPageNum(), vo.getPageSize()), PlayCustomRankingReturnVo.class, lambdaQueryWrapper);
|
||||
IPage<PlayCustomRankingReturnVo> page = this.baseMapper.selectJoinPage(
|
||||
new Page<>(vo.getPageNum(), vo.getPageSize()), PlayCustomRankingReturnVo.class, lambdaQueryWrapper);
|
||||
int index = 1;
|
||||
for (PlayCustomRankingReturnVo record : page.getRecords()) {
|
||||
record.setRankingIndex((vo.getPageNum() - 1) * vo.getPageSize() + index);
|
||||
@@ -168,14 +175,17 @@ public class PlayCustomUserInfoServiceImpl extends ServiceImpl<PlayCustomUserInf
|
||||
record.setOrderNumber(String.valueOf(orderNumber));
|
||||
record.setOrderContinueNumber(String.valueOf(orderContinueNumber));
|
||||
if (orderNumber != 0) {
|
||||
record.setOrderPrice(String.valueOf(orderTotalAmount.divide(new BigDecimal(orderNumber), 2, RoundingMode.HALF_UP)));
|
||||
record.setOrderPrice(
|
||||
String.valueOf(orderTotalAmount.divide(new BigDecimal(orderNumber), 2, RoundingMode.HALF_UP)));
|
||||
} else {
|
||||
record.setOrderPrice("0");
|
||||
}
|
||||
index++;
|
||||
}
|
||||
//按照订单顺序进行排序
|
||||
page.setRecords(page.getRecords().stream().sorted(Comparator.comparing(PlayCustomRankingReturnVo::getOrderNumber).reversed()).collect(Collectors.toList()));
|
||||
// 按照订单顺序进行排序
|
||||
page.setRecords(page.getRecords().stream()
|
||||
.sorted(Comparator.comparing(PlayCustomRankingReturnVo::getOrderNumber).reversed())
|
||||
.collect(Collectors.toList()));
|
||||
return page;
|
||||
}
|
||||
|
||||
@@ -184,7 +194,8 @@ public class PlayCustomUserInfoServiceImpl extends ServiceImpl<PlayCustomUserInf
|
||||
MPJLambdaWrapper<PlayCustomUserInfoEntity> lambdaQueryWrapper = new MPJLambdaWrapper<>();
|
||||
lambdaQueryWrapper.selectAll(PlayCustomUserInfoEntity.class);
|
||||
lambdaQueryWrapper.selectAs(PlayCustomLevelInfoEntity::getName, "levelName");
|
||||
lambdaQueryWrapper.leftJoin(PlayCustomLevelInfoEntity.class, PlayCustomLevelInfoEntity::getId, PlayCustomUserInfoEntity::getLevelId);
|
||||
lambdaQueryWrapper.leftJoin(PlayCustomLevelInfoEntity.class, PlayCustomLevelInfoEntity::getId,
|
||||
PlayCustomUserInfoEntity::getLevelId);
|
||||
if (StrUtil.isNotBlank(vo.getId())) {
|
||||
lambdaQueryWrapper.eq(PlayCustomUserInfoEntity::getId, vo.getId());
|
||||
}
|
||||
@@ -222,13 +233,16 @@ public class PlayCustomUserInfoServiceImpl extends ServiceImpl<PlayCustomUserInf
|
||||
lambdaQueryWrapper.eq(PlayCustomUserInfoEntity::getMobilePhoneState, vo.getMobilePhoneState());
|
||||
}
|
||||
if (vo.getRegistrationTime() != null && vo.getRegistrationTime().size() == 2) {
|
||||
lambdaQueryWrapper.between(PlayCustomUserInfoEntity::getRegistrationTime, vo.getRegistrationTime().get(0), vo.getRegistrationTime().get(1));
|
||||
lambdaQueryWrapper.between(PlayCustomUserInfoEntity::getRegistrationTime, vo.getRegistrationTime().get(0),
|
||||
vo.getRegistrationTime().get(1));
|
||||
}
|
||||
if (vo.getFirstPurchaseTime() != null && vo.getFirstPurchaseTime().size() == 2) {
|
||||
lambdaQueryWrapper.between(PlayCustomUserInfoEntity::getFirstPurchaseTime, vo.getFirstPurchaseTime().get(0), vo.getFirstPurchaseTime().get(1));
|
||||
lambdaQueryWrapper.between(PlayCustomUserInfoEntity::getFirstPurchaseTime, vo.getFirstPurchaseTime().get(0),
|
||||
vo.getFirstPurchaseTime().get(1));
|
||||
}
|
||||
if (vo.getLastPurchaseTime() != null && vo.getLastPurchaseTime().size() == 2) {
|
||||
lambdaQueryWrapper.between(PlayCustomUserInfoEntity::getLastPurchaseTime, vo.getLastPurchaseTime().get(0), vo.getLastPurchaseTime().get(1));
|
||||
lambdaQueryWrapper.between(PlayCustomUserInfoEntity::getLastPurchaseTime, vo.getLastPurchaseTime().get(0),
|
||||
vo.getLastPurchaseTime().get(1));
|
||||
}
|
||||
if (StrUtil.isNotBlank(vo.getSort())) {
|
||||
if ("levelId".equals(vo.getSort())) {
|
||||
@@ -242,10 +256,12 @@ public class PlayCustomUserInfoServiceImpl extends ServiceImpl<PlayCustomUserInf
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
IPage<PlayCustomUserReturnVo> page = this.baseMapper.selectJoinPage(new Page<>(vo.getPageNum(), vo.getPageSize()), PlayCustomUserReturnVo.class, lambdaQueryWrapper);
|
||||
IPage<PlayCustomUserReturnVo> page = this.baseMapper.selectJoinPage(
|
||||
new Page<>(vo.getPageNum(), vo.getPageSize()), PlayCustomUserReturnVo.class, lambdaQueryWrapper);
|
||||
for (PlayCustomUserReturnVo record : page.getRecords()) {
|
||||
List<PlayOrderInfoEntity> orderInfoEntities = playOrderInfoService.list(Wrappers.lambdaQuery(PlayOrderInfoEntity.class).eq(PlayOrderInfoEntity::getPurchaserBy, record.getId()).in(PlayOrderInfoEntity::getPlaceType, "0", "2"));
|
||||
List<PlayOrderInfoEntity> orderInfoEntities = playOrderInfoService.list(Wrappers
|
||||
.lambdaQuery(PlayOrderInfoEntity.class).eq(PlayOrderInfoEntity::getPurchaserBy, record.getId())
|
||||
.in(PlayOrderInfoEntity::getPlaceType, "0", "2"));
|
||||
BigDecimal orderTotalAmount = new BigDecimal("0");
|
||||
for (PlayOrderInfoEntity orderInfoEntity : orderInfoEntities) {
|
||||
orderTotalAmount = orderTotalAmount.add(orderInfoEntity.getFinalAmount());
|
||||
@@ -253,7 +269,8 @@ public class PlayCustomUserInfoServiceImpl extends ServiceImpl<PlayCustomUserInf
|
||||
record.setOrderNumber(String.valueOf(orderInfoEntities.size()));
|
||||
record.setOrderTotalAmount(orderTotalAmount);
|
||||
if (!orderInfoEntities.isEmpty()) {
|
||||
record.setOrderPrice(String.valueOf(orderTotalAmount.divide(new BigDecimal(orderInfoEntities.size()), 2, RoundingMode.HALF_UP)));
|
||||
record.setOrderPrice(String.valueOf(
|
||||
orderTotalAmount.divide(new BigDecimal(orderInfoEntities.size()), 2, RoundingMode.HALF_UP)));
|
||||
} else {
|
||||
record.setProvince("0");
|
||||
}
|
||||
@@ -266,7 +283,8 @@ public class PlayCustomUserInfoServiceImpl extends ServiceImpl<PlayCustomUserInf
|
||||
/**
|
||||
* 新增顾客
|
||||
*
|
||||
* @param playCustomUserInfo 顾客
|
||||
* @param playCustomUserInfo
|
||||
* 顾客
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@@ -277,7 +295,6 @@ public class PlayCustomUserInfoServiceImpl extends ServiceImpl<PlayCustomUserInf
|
||||
return save(playCustomUserInfo);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void updateTokenById(String id, String token) {
|
||||
PlayCustomUserInfoEntity entity = new PlayCustomUserInfoEntity();
|
||||
@@ -286,30 +303,32 @@ public class PlayCustomUserInfoServiceImpl extends ServiceImpl<PlayCustomUserInf
|
||||
this.baseMapper.updateById(entity);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void updateAccountBalanceById(String id, BigDecimal accountBalance) {
|
||||
//更新余额
|
||||
// 更新余额
|
||||
this.baseMapper.updateById(new PlayCustomUserInfoEntity(id, accountBalance));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void updateAccountBalanceById(String userId, BigDecimal balanceBeforeOperation, BigDecimal balanceAfterOperation, String operationType, String operationAction, BigDecimal balanceMoney, BigDecimal giftAmount, String orderId) {
|
||||
//更新余额
|
||||
public void updateAccountBalanceById(String userId, BigDecimal balanceBeforeOperation,
|
||||
BigDecimal balanceAfterOperation, String operationType, String operationAction, BigDecimal balanceMoney,
|
||||
BigDecimal giftAmount, String orderId) {
|
||||
// 更新余额
|
||||
PlayCustomUserInfoEntity entity = new PlayCustomUserInfoEntity();
|
||||
entity.setId(userId);
|
||||
entity.setAccountBalance(balanceAfterOperation);
|
||||
entity.setAccountState(balanceAfterOperation.compareTo(new BigDecimal(0)) > 0 ? "1" : "0");
|
||||
this.baseMapper.updateById(entity);
|
||||
//记录余额变更记录
|
||||
playBalanceDetailsInfoService.insertBalanceDetailsInfo("1", userId, balanceBeforeOperation, balanceAfterOperation, operationType, operationAction, balanceMoney, giftAmount, orderId);
|
||||
// 记录余额变更记录
|
||||
playBalanceDetailsInfoService.insertBalanceDetailsInfo("1", userId, balanceBeforeOperation,
|
||||
balanceAfterOperation, operationType, operationAction, balanceMoney, giftAmount, orderId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改顾客
|
||||
*
|
||||
* @param playCustomUserInfo 顾客
|
||||
* @param playCustomUserInfo
|
||||
* 顾客
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@@ -320,7 +339,8 @@ public class PlayCustomUserInfoServiceImpl extends ServiceImpl<PlayCustomUserInf
|
||||
/**
|
||||
* 批量删除顾客
|
||||
*
|
||||
* @param ids 需要删除的顾客主键
|
||||
* @param ids
|
||||
* 需要删除的顾客主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@@ -331,7 +351,8 @@ public class PlayCustomUserInfoServiceImpl extends ServiceImpl<PlayCustomUserInf
|
||||
/**
|
||||
* 删除顾客信息
|
||||
*
|
||||
* @param id 顾客主键
|
||||
* @param id
|
||||
* 顾客主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@@ -342,14 +363,17 @@ public class PlayCustomUserInfoServiceImpl extends ServiceImpl<PlayCustomUserInf
|
||||
@Override
|
||||
public List<PlayCustomUserInfoEntity> simpleList() {
|
||||
LambdaQueryWrapper<PlayCustomUserInfoEntity> wrapper = Wrappers.lambdaQuery(PlayCustomUserInfoEntity.class);
|
||||
wrapper.orderByDesc(PlayCustomUserInfoEntity::getId).eq(PlayCustomUserInfoEntity::getDeleted, 0).select(PlayCustomUserInfoEntity::getAvatar, PlayCustomUserInfoEntity::getId, PlayCustomUserInfoEntity::getNickname, PlayCustomUserInfoEntity::getAvatar);
|
||||
wrapper.orderByDesc(PlayCustomUserInfoEntity::getId).eq(PlayCustomUserInfoEntity::getDeleted, 0).select(
|
||||
PlayCustomUserInfoEntity::getAvatar, PlayCustomUserInfoEntity::getId,
|
||||
PlayCustomUserInfoEntity::getNickname, PlayCustomUserInfoEntity::getAvatar);
|
||||
return baseMapper.selectList(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveOrderInfo(PlayOrderInfoEntity entity) {
|
||||
String id = entity.getPurchaserBy();
|
||||
LambdaUpdateWrapper<PlayCustomUserInfoEntity> wrapper = Wrappers.lambdaUpdate(PlayCustomUserInfoEntity.class).eq(PlayCustomUserInfoEntity::getId, id).set(PlayCustomUserInfoEntity::getLastPurchaseTime, new Date());
|
||||
LambdaUpdateWrapper<PlayCustomUserInfoEntity> wrapper = Wrappers.lambdaUpdate(PlayCustomUserInfoEntity.class)
|
||||
.eq(PlayCustomUserInfoEntity::getId, id).set(PlayCustomUserInfoEntity::getLastPurchaseTime, new Date());
|
||||
PlayCustomUserInfoEntity userInfoEntity = selectById(id);
|
||||
if (Objects.isNull(userInfoEntity.getFirstPurchaseTime())) {
|
||||
wrapper.set(PlayCustomUserInfoEntity::getFirstPurchaseTime, new Date());
|
||||
|
||||
Reference in New Issue
Block a user