style: 应用 Spotless 代码格式化
- 对所有 Java 源文件应用统一的代码格式化 - 统一缩进为 4 个空格 - 清理尾随空白字符和文件末尾换行 - 优化导入语句组织 - 总计格式化 654 个 Java 文件 有问题可以回滚或者找我聊
This commit is contained in:
@@ -12,11 +12,10 @@ 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
|
||||
*
|
||||
@@ -30,14 +29,11 @@ public class PlayBalanceDetailsInfoController {
|
||||
@Resource
|
||||
private IPlayBalanceDetailsInfoService playBalanceDetailsInfoService;
|
||||
|
||||
|
||||
/**
|
||||
* 查询余额明细列表
|
||||
*/
|
||||
@ApiOperation(value = "分页查询明细列表", notes = "分页查询余额明细信息列表")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
|
||||
@PostMapping("/listByPage")
|
||||
public R list(@ApiParam(value = "查询条件", required = true) @Validated @RequestBody PlayBalanceDetailsQueryVo vo) {
|
||||
return R.ok(playBalanceDetailsInfoService.selectByPage(vo));
|
||||
@@ -48,28 +44,23 @@ public class PlayBalanceDetailsInfoController {
|
||||
*/
|
||||
@ApiOperation(value = "获取明细详情", notes = "根据ID获取余额明细详细信息")
|
||||
@ApiImplicitParam(name = "id", value = "明细ID", required = true, paramType = "path", dataType = "String", example = "1")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功", response = PlayBalanceDetailsInfoEntity.class)
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = PlayBalanceDetailsInfoEntity.class)})
|
||||
@GetMapping(value = "/{id}")
|
||||
public R getInfo(@PathVariable("id") String id) {
|
||||
return R.ok(playBalanceDetailsInfoService.selectPlayBalanceDetailsInfoById(id));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 修改余额明细
|
||||
*/
|
||||
@ApiOperation(value = "修改明细信息", notes = "修改余额明细信息")
|
||||
@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('balance:details:update')")
|
||||
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "修改失败,包含详细错误信息")})
|
||||
// @PreAuthorize("@customSs.hasPermission('balance:details:update')")
|
||||
@Log(title = "余额明细", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/update/{id}")
|
||||
public R update(@PathVariable String id, @ApiParam(value = "明细信息", required = true) @RequestBody PlayBalanceDetailsInfoEntity playBalanceDetailsInfo) {
|
||||
public R update(@PathVariable String id,
|
||||
@ApiParam(value = "明细信息", required = true) @RequestBody PlayBalanceDetailsInfoEntity playBalanceDetailsInfo) {
|
||||
playBalanceDetailsInfo.setId(id);
|
||||
boolean success = playBalanceDetailsInfoService.update(playBalanceDetailsInfo);
|
||||
if (success) {
|
||||
@@ -83,10 +74,8 @@ public class PlayBalanceDetailsInfoController {
|
||||
*/
|
||||
@ApiOperation(value = "删除明细信息", notes = "根据ID批量删除余额明细信息")
|
||||
@ApiImplicitParam(name = "ids", value = "明细ID数组", required = true, paramType = "path", dataType = "String[]", example = "1,2,3")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功")
|
||||
})
|
||||
//@PreAuthorize("@customSs.hasPermission('balance:details:delete')")
|
||||
@ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
|
||||
// @PreAuthorize("@customSs.hasPermission('balance:details:delete')")
|
||||
@Log(title = "余额明细", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
|
||||
@@ -22,13 +22,12 @@ import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import io.swagger.annotations.ApiResponse;
|
||||
import io.swagger.annotations.ApiResponses;
|
||||
import java.time.LocalDateTime;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 管理员管理Controller
|
||||
*
|
||||
@@ -45,36 +44,31 @@ public class PlayPersonnelAdminInfoController {
|
||||
@Resource
|
||||
private SysUserService sysUserService;
|
||||
|
||||
|
||||
@Resource
|
||||
private SysRoleService sysRoleService;
|
||||
|
||||
@Resource
|
||||
private SysUserRoleService userRoleService;
|
||||
|
||||
|
||||
/**
|
||||
* 查询管理员管理信息列表
|
||||
*/
|
||||
@ApiOperation(value = "分页查询管理员列表", notes = "分页查询管理员信息列表")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功", response = PlayPersonnelAdminInfoReturnVo.class, responseContainer = "Page")
|
||||
})
|
||||
@ApiResponse(code = 200, message = "操作成功", response = PlayPersonnelAdminInfoReturnVo.class, responseContainer = "Page")})
|
||||
@PostMapping("/listByPage")
|
||||
public R listByPage(@ApiParam(value = "查询条件", required = true) @Validated @RequestBody PlayPersonnelAdminInfoQueryVo vo) {
|
||||
public R listByPage(
|
||||
@ApiParam(value = "查询条件", required = true) @Validated @RequestBody PlayPersonnelAdminInfoQueryVo vo) {
|
||||
IPage<PlayPersonnelAdminInfoReturnVo> list = playPersonnelAdminInfoService.selectByPage(vo);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取管理员管理详细信息
|
||||
*/
|
||||
@ApiOperation(value = "获取管理员详情", notes = "根据ID获取管理员详细信息")
|
||||
@ApiImplicitParam(name = "id", value = "管理员ID", required = true, paramType = "path", dataType = "String", example = "1")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功", response = PlayPersonnelAdminInfoEntity.class)
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = PlayPersonnelAdminInfoEntity.class)})
|
||||
@GetMapping(value = "/{id}")
|
||||
public R getInfo(@PathVariable("id") String id) {
|
||||
return R.ok(playPersonnelAdminInfoService.selectPlayPersonnelAdminInfoById(id));
|
||||
@@ -84,27 +78,25 @@ public class PlayPersonnelAdminInfoController {
|
||||
* 新增管理员管理信息
|
||||
*/
|
||||
@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("/createBaseInfo")
|
||||
public R createBaseInfo(@ApiParam(value = "管理员信息", required = true) @Validated @RequestBody PlayPersonnelAdminInfoEditAddInfoVo vo) {
|
||||
//校验对应用户是否存在
|
||||
public R createBaseInfo(
|
||||
@ApiParam(value = "管理员信息", required = true) @Validated @RequestBody PlayPersonnelAdminInfoEditAddInfoVo vo) {
|
||||
// 校验对应用户是否存在
|
||||
SysUserEntity sysUserEntity = sysUserService.selectUserById(vo.getSysUserId());
|
||||
//校验当前用户是否已经是组长
|
||||
// 校验当前用户是否已经是组长
|
||||
PlayPersonnelAdminInfoEntity groupInfoEntity = playPersonnelAdminInfoService.selectByUserId(vo.getSysUserId());
|
||||
if (groupInfoEntity != null) {
|
||||
throw new CustomException("当前账号已经是管理员,无法重复添加");
|
||||
}
|
||||
//添加管理员
|
||||
// 添加管理员
|
||||
PlayPersonnelAdminInfoEntity entity = ConvertUtil.entityToVo(vo, PlayPersonnelAdminInfoEntity.class);
|
||||
entity.setSysUserCode(sysUserEntity.getUserCode());
|
||||
entity.setAddTime(LocalDateTime.now());
|
||||
boolean success = playPersonnelAdminInfoService.create(entity);
|
||||
if (success) {
|
||||
//新建管理员后,添加对应的用户角色权限
|
||||
// 新建管理员后,添加对应的用户角色权限
|
||||
userRoleService.addUserRole(vo.getSysUserId(), sysRoleService.selectByRoleKey("operator").getRoleId());
|
||||
return R.ok();
|
||||
}
|
||||
@@ -115,17 +107,15 @@ public class PlayPersonnelAdminInfoController {
|
||||
* 修改管理员管理信息
|
||||
*/
|
||||
@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 = "/updateBaseInfo")
|
||||
public R updateBaseInfo(@ApiParam(value = "管理员信息", required = true) @Validated @RequestBody PlayPersonnelAdminInfoEditBaseInfoVo vo) {
|
||||
public R updateBaseInfo(
|
||||
@ApiParam(value = "管理员信息", required = true) @Validated @RequestBody PlayPersonnelAdminInfoEditBaseInfoVo vo) {
|
||||
|
||||
//校验对应用户是否存在
|
||||
// 校验对应用户是否存在
|
||||
SysUserEntity sysUserEntity = sysUserService.selectUserById(vo.getSysUserId());
|
||||
//校验当前用户是否已经是组长
|
||||
// 校验当前用户是否已经是组长
|
||||
PlayPersonnelAdminInfoEntity adminInfoEntity = playPersonnelAdminInfoService.selectByUserId(vo.getSysUserId());
|
||||
if (adminInfoEntity != null && !adminInfoEntity.getId().equals(vo.getId())) {
|
||||
throw new CustomException("当前账号已经是管理员,无法重复添加");
|
||||
@@ -134,7 +124,7 @@ public class PlayPersonnelAdminInfoController {
|
||||
entity.setSysUserCode(sysUserEntity.getUserCode());
|
||||
boolean success = playPersonnelAdminInfoService.update(entity);
|
||||
if (success) {
|
||||
//新建管理员后,添加对应的用户角色权限
|
||||
// 新建管理员后,添加对应的用户角色权限
|
||||
userRoleService.addUserRole(vo.getSysUserId(), sysRoleService.selectByRoleKey("operator").getRoleId());
|
||||
}
|
||||
return R.error("修改失败");
|
||||
@@ -145,9 +135,7 @@ public class PlayPersonnelAdminInfoController {
|
||||
*/
|
||||
@ApiOperation(value = "删除管理员信息", notes = "根据ID批量删除管理员信息")
|
||||
@ApiImplicitParam(name = "ids", value = "管理员ID数组", required = true, paramType = "path", dataType = "String[]", example = "1,2,3")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
|
||||
@PreAuthorize("@customSs.hasPermission('play:info:remove')")
|
||||
@Log(title = "管理员管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
@@ -156,9 +144,9 @@ public class PlayPersonnelAdminInfoController {
|
||||
for (String id : ids) {
|
||||
// 判断数据是否存在
|
||||
PlayPersonnelAdminInfoEntity entity = playPersonnelAdminInfoService.selectPlayPersonnelAdminInfoById(id);
|
||||
//删除管理员
|
||||
// 删除管理员
|
||||
playPersonnelAdminInfoService.deletePlayPersonnelAdminInfoById(id);
|
||||
//删除对应的权限信息
|
||||
// 删除对应的权限信息
|
||||
userRoleService.delUserRole(entity.getSysUserId(), ruleId);
|
||||
}
|
||||
return R.ok();
|
||||
|
||||
@@ -25,12 +25,11 @@ 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.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 店员分组信息Controller
|
||||
@@ -46,33 +45,31 @@ public class PlayPersonnelGroupInfoController {
|
||||
@Resource
|
||||
private IPlayPersonnelGroupInfoService playClerkGroupInfoService;
|
||||
|
||||
|
||||
@Resource
|
||||
private IPlayClerkUserInfoService playClerkUserInfoService;
|
||||
|
||||
@Resource
|
||||
private SysUserService sysUserService;
|
||||
|
||||
|
||||
@Resource
|
||||
private SysRoleService sysRoleService;
|
||||
|
||||
@Resource
|
||||
private SysUserRoleService userRoleService;
|
||||
|
||||
|
||||
/**
|
||||
* 查询店员分类信息列表
|
||||
*/
|
||||
@ApiOperation(value = "分页查询分组列表", notes = "分页查询店员分组信息列表")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功", response = PlayPersonnelGroupInfoReturnVo.class, responseContainer = "Page")
|
||||
})
|
||||
@ApiResponse(code = 200, message = "操作成功", response = PlayPersonnelGroupInfoReturnVo.class, responseContainer = "Page")})
|
||||
@PostMapping("/listByPage")
|
||||
public R listByPage(@ApiParam(value = "查询条件", required = true) @Validated @RequestBody PlayPersonnelGroupInfoQueryVo vo) {
|
||||
public R listByPage(
|
||||
@ApiParam(value = "查询条件", required = true) @Validated @RequestBody PlayPersonnelGroupInfoQueryVo vo) {
|
||||
IPage<PlayPersonnelGroupInfoReturnVo> list = playClerkGroupInfoService.selectByPage(vo);
|
||||
for (PlayPersonnelGroupInfoReturnVo record : list.getRecords()) {
|
||||
List<PlayClerkUserInfoEntity> clerkUserInfoEntities = playClerkUserInfoService.listAllByGroupId(record.getId());
|
||||
List<PlayClerkUserInfoEntity> clerkUserInfoEntities = playClerkUserInfoService
|
||||
.listAllByGroupId(record.getId());
|
||||
record.setTotalEmployeesNumber(clerkUserInfoEntities.size());
|
||||
Integer listingEmployeesNumber = 0;
|
||||
for (PlayClerkUserInfoEntity clerkUserInfoEntity : clerkUserInfoEntities) {
|
||||
@@ -85,33 +82,30 @@ public class PlayPersonnelGroupInfoController {
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增店员分组信息
|
||||
*/
|
||||
@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("/createBaseInfo")
|
||||
public R createBaseInfo(@ApiParam(value = "分组信息", required = true) @Validated @RequestBody PlayPersonnelGroupInfoEditAddInfoVo vo) {
|
||||
//校验对应用户是否存在
|
||||
public R createBaseInfo(
|
||||
@ApiParam(value = "分组信息", required = true) @Validated @RequestBody PlayPersonnelGroupInfoEditAddInfoVo vo) {
|
||||
// 校验对应用户是否存在
|
||||
SysUserEntity sysUserEntity = sysUserService.selectUserById(vo.getSysUserId());
|
||||
//校验当前用户是否已经是组长
|
||||
// 校验当前用户是否已经是组长
|
||||
PlayPersonnelGroupInfoEntity groupInfoEntity = playClerkGroupInfoService.selectByUserId(vo.getSysUserId());
|
||||
if (groupInfoEntity != null) {
|
||||
throw new CustomException("当前账号已经是组长,无法重复添加");
|
||||
}
|
||||
//添加组长配置
|
||||
// 添加组长配置
|
||||
PlayPersonnelGroupInfoEntity entity = ConvertUtil.entityToVo(vo, PlayPersonnelGroupInfoEntity.class);
|
||||
entity.setId(IdUtils.getUuid());
|
||||
entity.setSysUserCode(sysUserEntity.getUserCode());
|
||||
entity.setAddTime(LocalDateTime.now());
|
||||
boolean success = playClerkGroupInfoService.create(entity);
|
||||
if (success) {
|
||||
//新建组长后,添加对应的用户角色权限
|
||||
// 新建组长后,添加对应的用户角色权限
|
||||
userRoleService.addUserRole(vo.getSysUserId(), sysRoleService.selectByRoleKey("leader").getRoleId());
|
||||
return R.ok("成功");
|
||||
}
|
||||
@@ -122,17 +116,15 @@ public class PlayPersonnelGroupInfoController {
|
||||
* 修改店员分组信息
|
||||
*/
|
||||
@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 = "/updateBaseInfo")
|
||||
public R updateBaseInfo(@ApiParam(value = "分组信息", required = true) @Validated @RequestBody PlayPersonnelGroupInfoEditBaseInfoVo vo) {
|
||||
public R updateBaseInfo(
|
||||
@ApiParam(value = "分组信息", required = true) @Validated @RequestBody PlayPersonnelGroupInfoEditBaseInfoVo vo) {
|
||||
SysUserEntity sysUserEntity = sysUserService.selectUserById(vo.getSysUserId());
|
||||
//校验当前用户是否已经是组长
|
||||
// 校验当前用户是否已经是组长
|
||||
PlayPersonnelGroupInfoEntity groupInfoEntity = playClerkGroupInfoService.selectByUserId(vo.getSysUserId());
|
||||
//校验当前用户是否已经是组长,只有当前用户不为组长时
|
||||
// 校验当前用户是否已经是组长,只有当前用户不为组长时
|
||||
if (groupInfoEntity != null && !groupInfoEntity.getId().equals(vo.getId())) {
|
||||
throw new CustomException("当前账号已经是组长,无法重复添加");
|
||||
}
|
||||
@@ -140,23 +132,19 @@ public class PlayPersonnelGroupInfoController {
|
||||
entity.setSysUserCode(sysUserEntity.getUserCode());
|
||||
boolean success = playClerkGroupInfoService.update(entity);
|
||||
if (success) {
|
||||
//新建组长后,添加对应的用户角色权限
|
||||
// 新建组长后,添加对应的用户角色权限
|
||||
userRoleService.addUserRole(vo.getSysUserId(), sysRoleService.selectByRoleKey("leader").getRoleId());
|
||||
return R.ok("成功");
|
||||
}
|
||||
return R.error("修改失败");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除店员分组信息
|
||||
*/
|
||||
@ApiOperation(value = "删除分组信息", notes = "根据ID批量删除店员分组信息")
|
||||
@ApiImplicitParam(name = "ids", value = "分组ID数组", required = true, paramType = "path", dataType = "String[]", example = "1,2,3")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功"),
|
||||
@ApiResponse(code = 500, message = "删除失败,包含详细错误信息")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "删除失败,包含详细错误信息")})
|
||||
@Log(title = "店员分组信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
@@ -170,9 +158,9 @@ public class PlayPersonnelGroupInfoController {
|
||||
for (String id : ids) {
|
||||
// 判断数据是否存在
|
||||
PlayPersonnelGroupInfoEntity entity = playClerkGroupInfoService.selectPlayClerkGroupInfoById(id);
|
||||
//删除组长
|
||||
// 删除组长
|
||||
playClerkGroupInfoService.deletePlayClerkGroupInfoById(id);
|
||||
//删除对应的权限信息
|
||||
// 删除对应的权限信息
|
||||
userRoleService.delUserRole(entity.getSysUserId(), ruleId);
|
||||
|
||||
}
|
||||
|
||||
@@ -11,12 +11,11 @@ import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import io.swagger.annotations.ApiResponse;
|
||||
import io.swagger.annotations.ApiResponses;
|
||||
import java.util.List;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 管理员管理Controller
|
||||
*
|
||||
@@ -31,33 +30,29 @@ public class PlayPersonnelUserInfoController {
|
||||
@Resource
|
||||
private SysUserService sysUserService;
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询账户信息列表
|
||||
*/
|
||||
@ApiOperation(value = "分页查询用户列表", notes = "分页查询系统用户信息列表")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功", response = PlayPersonnelUserInfoReturnVo.class, responseContainer = "Page")
|
||||
})
|
||||
@ApiResponse(code = 200, message = "操作成功", response = PlayPersonnelUserInfoReturnVo.class, responseContainer = "Page")})
|
||||
@PostMapping("/listByPage")
|
||||
public R listByPage(@ApiParam(value = "查询条件", required = true) @Validated @RequestBody PlayPersonnelUserInfoQueryVo vo) {
|
||||
public R listByPage(
|
||||
@ApiParam(value = "查询条件", required = true) @Validated @RequestBody PlayPersonnelUserInfoQueryVo vo) {
|
||||
IPage<PlayPersonnelUserInfoReturnVo> list = sysUserService.selectByPage(vo);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询所有账户信息列表
|
||||
*/
|
||||
@ApiOperation(value = "查询所有用户", notes = "查询所有系统用户信息")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功", response = SysUserEntity.class, responseContainer = "List")
|
||||
})
|
||||
@ApiResponse(code = 200, message = "操作成功", response = SysUserEntity.class, responseContainer = "List")})
|
||||
@GetMapping("/listAll")
|
||||
public R listAll() {
|
||||
List<SysUserEntity> list = sysUserService.selectAll();
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -22,12 +22,11 @@ import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import io.swagger.annotations.ApiResponse;
|
||||
import io.swagger.annotations.ApiResponses;
|
||||
import java.time.LocalDateTime;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 客服信息Controller
|
||||
*
|
||||
@@ -44,23 +43,21 @@ public class PlayPersonnelWaiterInfoController {
|
||||
@Resource
|
||||
private SysUserService sysUserService;
|
||||
|
||||
|
||||
@Resource
|
||||
private SysRoleService sysRoleService;
|
||||
|
||||
@Resource
|
||||
private SysUserRoleService userRoleService;
|
||||
|
||||
|
||||
/**
|
||||
* 查询客服信息列表
|
||||
*/
|
||||
@ApiOperation(value = "分页查询客服列表", notes = "分页查询客服信息列表")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功", response = PlayPersonnelWaiterInfoReturnVo.class, responseContainer = "Page")
|
||||
})
|
||||
@ApiResponse(code = 200, message = "操作成功", response = PlayPersonnelWaiterInfoReturnVo.class, responseContainer = "Page")})
|
||||
@PostMapping("/listByPage")
|
||||
public R listByPage(@ApiParam(value = "查询条件", required = true) @Validated @RequestBody PlayPersonnelWaiterInfoQueryVo vo) {
|
||||
public R listByPage(
|
||||
@ApiParam(value = "查询条件", required = true) @Validated @RequestBody PlayPersonnelWaiterInfoQueryVo vo) {
|
||||
IPage<PlayPersonnelWaiterInfoReturnVo> list = playClerkWaiterInfoService.selectByPage(vo);
|
||||
return R.ok(list);
|
||||
}
|
||||
@@ -69,16 +66,14 @@ public class PlayPersonnelWaiterInfoController {
|
||||
* 新增客服信息列表
|
||||
*/
|
||||
@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("/createBaseInfo")
|
||||
public R createBaseInfo(@ApiParam(value = "客服信息", required = true) @Validated @RequestBody PlayPersonnelWaiterInfoEditAddInfoVo vo) {
|
||||
//校验对应用户是否存在
|
||||
public R createBaseInfo(
|
||||
@ApiParam(value = "客服信息", required = true) @Validated @RequestBody PlayPersonnelWaiterInfoEditAddInfoVo vo) {
|
||||
// 校验对应用户是否存在
|
||||
SysUserEntity sysUserEntity = sysUserService.selectUserById(vo.getSysUserId());
|
||||
//校验当前用户是否已经是组长
|
||||
// 校验当前用户是否已经是组长
|
||||
PlayPersonnelWaiterInfoEntity waiterInfoEntity = playClerkWaiterInfoService.selectByUserId(vo.getSysUserId());
|
||||
if (waiterInfoEntity != null) {
|
||||
throw new CustomException("当前账号已经是客服,无法重复添加");
|
||||
@@ -89,7 +84,7 @@ public class PlayPersonnelWaiterInfoController {
|
||||
entity.setAddTime(LocalDateTime.now());
|
||||
boolean success = playClerkWaiterInfoService.create(entity);
|
||||
if (success) {
|
||||
//新建客服后,添加对应的用户角色权限
|
||||
// 新建客服后,添加对应的用户角色权限
|
||||
userRoleService.addUserRole(vo.getSysUserId(), sysRoleService.selectByRoleKey("waiter").getRoleId());
|
||||
return R.ok();
|
||||
}
|
||||
@@ -100,44 +95,37 @@ public class PlayPersonnelWaiterInfoController {
|
||||
* 修改客服信息列表
|
||||
*/
|
||||
@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 = "/updateBaseInfo")
|
||||
public R updateBaseInfo(@ApiParam(value = "客服信息", required = true) @Validated @RequestBody PlayPersonnelWaiterInfoEditBaseInfoVo vo) {
|
||||
public R updateBaseInfo(
|
||||
@ApiParam(value = "客服信息", required = true) @Validated @RequestBody PlayPersonnelWaiterInfoEditBaseInfoVo vo) {
|
||||
|
||||
//校验对应用户是否存在
|
||||
// 校验对应用户是否存在
|
||||
SysUserEntity sysUserEntity = sysUserService.selectUserById(vo.getSysUserId());
|
||||
//校验当前用户是否已经是组长
|
||||
// 校验当前用户是否已经是组长
|
||||
PlayPersonnelWaiterInfoEntity waiterInfoEntity = playClerkWaiterInfoService.selectByUserId(vo.getSysUserId());
|
||||
if (waiterInfoEntity != null && !waiterInfoEntity.getId().equals(vo.getId())) {
|
||||
throw new CustomException("当前账号已经是客服,无法重复添加");
|
||||
}
|
||||
|
||||
|
||||
PlayPersonnelWaiterInfoEntity entity = ConvertUtil.entityToVo(vo, PlayPersonnelWaiterInfoEntity.class);
|
||||
entity.setSysUserCode(sysUserEntity.getUserCode());
|
||||
boolean success = playClerkWaiterInfoService.update(entity);
|
||||
if (success) {
|
||||
//新建客服后,添加对应的用户角色权限
|
||||
// 新建客服后,添加对应的用户角色权限
|
||||
userRoleService.addUserRole(vo.getSysUserId(), sysRoleService.selectByRoleKey("waiter").getRoleId());
|
||||
return R.ok();
|
||||
}
|
||||
return R.error("修改失败");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除客服信息
|
||||
*/
|
||||
@ApiOperation(value = "删除客服信息", notes = "根据ID批量删除客服信息")
|
||||
@ApiImplicitParam(name = "ids", value = "客服ID数组", required = true, paramType = "path", dataType = "String[]", example = "1,2,3")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功"),
|
||||
@ApiResponse(code = 500, message = "删除失败,包含详细错误信息")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "删除失败,包含详细错误信息")})
|
||||
@Log(title = "客服信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
@@ -145,9 +133,9 @@ public class PlayPersonnelWaiterInfoController {
|
||||
for (String id : ids) {
|
||||
// 判断数据是否存在
|
||||
PlayPersonnelWaiterInfoEntity entity = playClerkWaiterInfoService.selectPlayClerkWaiterInfoById(id);
|
||||
//删除客服
|
||||
// 删除客服
|
||||
playClerkWaiterInfoService.deletePlayClerkWaiterInfoById(id);
|
||||
//删除对应的权限信息
|
||||
// 删除对应的权限信息
|
||||
userRoleService.delUserRole(entity.getSysUserId(), ruleId);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.starry.admin.modules.personnel.mapper;
|
||||
|
||||
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import com.starry.admin.modules.personnel.module.entity.PlayBalanceDetailsInfoEntity;
|
||||
|
||||
@@ -12,5 +11,4 @@ import com.starry.admin.modules.personnel.module.entity.PlayBalanceDetailsInfoEn
|
||||
*/
|
||||
public interface PlayBalanceDetailsInfoMapper extends MPJBaseMapper<PlayBalanceDetailsInfoEntity> {
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.starry.admin.modules.personnel.mapper;
|
||||
|
||||
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import com.starry.admin.modules.personnel.module.entity.PlayPersonnelAdminInfoEntity;
|
||||
|
||||
@@ -12,5 +11,4 @@ import com.starry.admin.modules.personnel.module.entity.PlayPersonnelAdminInfoEn
|
||||
*/
|
||||
public interface PlayPersonnelAdminInfoMapper extends MPJBaseMapper<PlayPersonnelAdminInfoEntity> {
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.starry.admin.modules.personnel.mapper;
|
||||
|
||||
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import com.starry.admin.modules.personnel.module.entity.PlayPersonnelGroupInfoEntity;
|
||||
|
||||
@@ -12,5 +11,4 @@ import com.starry.admin.modules.personnel.module.entity.PlayPersonnelGroupInfoEn
|
||||
*/
|
||||
public interface PlayPersonnelGroupInfoMapper extends MPJBaseMapper<PlayPersonnelGroupInfoEntity> {
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.starry.admin.modules.personnel.mapper;
|
||||
|
||||
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import com.starry.admin.modules.personnel.module.entity.PlayPersonnelWaiterInfoEntity;
|
||||
|
||||
@@ -12,5 +11,4 @@ import com.starry.admin.modules.personnel.module.entity.PlayPersonnelWaiterInfoE
|
||||
*/
|
||||
public interface PlayPersonnelWaiterInfoMapper extends MPJBaseMapper<PlayPersonnelWaiterInfoEntity> {
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -3,13 +3,12 @@ package com.starry.admin.modules.personnel.module.entity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.starry.common.domain.BaseEntity;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 余额明细对象 play_balance_details_info
|
||||
*
|
||||
@@ -21,7 +20,6 @@ import java.time.LocalDateTime;
|
||||
@TableName("play_balance_details_info")
|
||||
public class PlayBalanceDetailsInfoEntity extends BaseEntity<PlayBalanceDetailsInfoEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
@@ -52,7 +50,6 @@ public class PlayBalanceDetailsInfoEntity extends BaseEntity<PlayBalanceDetailsI
|
||||
*/
|
||||
private BigDecimal balanceAfterOperation;
|
||||
|
||||
|
||||
/**
|
||||
* 操作类型(0:充值;1:消费;2:服务)
|
||||
*/
|
||||
|
||||
@@ -3,12 +3,11 @@ package com.starry.admin.modules.personnel.module.entity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.starry.common.domain.BaseEntity;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 管理员管理对象 play_personnel_admin_info
|
||||
*
|
||||
@@ -20,7 +19,6 @@ import java.time.LocalDateTime;
|
||||
@TableName("play_personnel_admin_info")
|
||||
public class PlayPersonnelAdminInfoEntity extends BaseEntity<PlayPersonnelAdminInfoEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
@@ -55,5 +53,4 @@ public class PlayPersonnelAdminInfoEntity extends BaseEntity<PlayPersonnelAdminI
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private LocalDateTime addTime;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -3,12 +3,11 @@ package com.starry.admin.modules.personnel.module.entity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.starry.common.domain.BaseEntity;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 店员分组信息对象 play_clerk_group_info
|
||||
*
|
||||
@@ -20,13 +19,11 @@ import java.time.LocalDateTime;
|
||||
@TableName("play_personnel_group_info")
|
||||
public class PlayPersonnelGroupInfoEntity extends BaseEntity<PlayPersonnelGroupInfoEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
@@ -47,16 +44,13 @@ public class PlayPersonnelGroupInfoEntity extends BaseEntity<PlayPersonnelGroupI
|
||||
*/
|
||||
private String groupName;
|
||||
|
||||
|
||||
/**
|
||||
* 组长名称
|
||||
**/
|
||||
private String leaderName;
|
||||
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private LocalDateTime addTime;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -3,12 +3,11 @@ package com.starry.admin.modules.personnel.module.entity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.starry.common.domain.BaseEntity;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 客服信息对象 play_clerk_waiter_info
|
||||
*
|
||||
@@ -20,7 +19,6 @@ import java.time.LocalDateTime;
|
||||
@TableName("play_personnel_waiter_info")
|
||||
public class PlayPersonnelWaiterInfoEntity extends BaseEntity<PlayPersonnelWaiterInfoEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
@@ -46,10 +44,8 @@ public class PlayPersonnelWaiterInfoEntity extends BaseEntity<PlayPersonnelWaite
|
||||
*/
|
||||
private String waiterName;
|
||||
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private LocalDateTime addTime;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
package com.starry.admin.modules.personnel.module.vo;
|
||||
|
||||
import com.starry.common.domain.BasePageEntity;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 分页查询余额明细
|
||||
*
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package com.starry.admin.modules.personnel.module.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 余额明细查询对象
|
||||
@@ -53,7 +52,6 @@ public class PlayBalanceDetailsReturnVo {
|
||||
*/
|
||||
private String payMethod;
|
||||
|
||||
|
||||
/**
|
||||
* 订单ID
|
||||
*/
|
||||
@@ -64,19 +62,16 @@ public class PlayBalanceDetailsReturnVo {
|
||||
*/
|
||||
private String orderNo;
|
||||
|
||||
|
||||
/**
|
||||
* 订单金额
|
||||
*/
|
||||
private BigDecimal orderMoney;
|
||||
|
||||
|
||||
/**
|
||||
* 赠送金额
|
||||
*/
|
||||
private BigDecimal giftAmount;
|
||||
|
||||
|
||||
/**
|
||||
* 订单最终金额
|
||||
*/
|
||||
@@ -87,7 +82,6 @@ public class PlayBalanceDetailsReturnVo {
|
||||
*/
|
||||
private String orderRemark;
|
||||
|
||||
|
||||
/**
|
||||
* 顾客Id
|
||||
*/
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
package com.starry.admin.modules.personnel.module.vo;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* 管理员管理信息新增
|
||||
*
|
||||
@@ -20,7 +19,6 @@ public class PlayPersonnelAdminInfoEditAddInfoVo {
|
||||
@NotBlank(message = "用户ID不能为空")
|
||||
private String sysUserId;
|
||||
|
||||
|
||||
/**
|
||||
* 管理员名称
|
||||
*/
|
||||
@@ -28,5 +26,4 @@ public class PlayPersonnelAdminInfoEditAddInfoVo {
|
||||
@Length(min = 1, max = 100, message = "字符长度在1-100之间")
|
||||
private String adminName;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
package com.starry.admin.modules.personnel.module.vo;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* 管理员管理信息修改
|
||||
*
|
||||
@@ -21,7 +20,6 @@ public class PlayPersonnelAdminInfoEditBaseInfoVo {
|
||||
@NotBlank(message = "ID不能为空")
|
||||
private String id;
|
||||
|
||||
|
||||
/**
|
||||
* 分组名称
|
||||
*/
|
||||
@@ -35,7 +33,4 @@ public class PlayPersonnelAdminInfoEditBaseInfoVo {
|
||||
@Length(min = 1, max = 100, message = "字符长度在1-100之间")
|
||||
private String adminName;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -19,6 +19,4 @@ public class PlayPersonnelAdminInfoQueryVo extends BasePageEntity {
|
||||
*/
|
||||
private String adminName;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
package com.starry.admin.modules.personnel.module.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 管理员管理信息
|
||||
*
|
||||
@@ -17,13 +16,11 @@ import java.time.LocalDateTime;
|
||||
@Data
|
||||
public class PlayPersonnelAdminInfoReturnVo {
|
||||
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
@@ -46,10 +43,8 @@ public class PlayPersonnelAdminInfoReturnVo {
|
||||
@Length(min = 1, max = 100, message = "字符长度在1-100之间")
|
||||
private String adminName;
|
||||
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private LocalDateTime addTime;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -2,11 +2,10 @@ package com.starry.admin.modules.personnel.module.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* 店员分组基本信息修改
|
||||
*
|
||||
@@ -24,7 +23,6 @@ public class PlayPersonnelGroupInfoEditAddInfoVo {
|
||||
@ApiModelProperty(value = "用户ID", required = true, example = "1", notes = "系统用户ID")
|
||||
private String sysUserId;
|
||||
|
||||
|
||||
/**
|
||||
* 分组名称
|
||||
*/
|
||||
@@ -41,5 +39,4 @@ public class PlayPersonnelGroupInfoEditAddInfoVo {
|
||||
@ApiModelProperty(value = "组长名称", required = true, example = "张三", notes = "组长的名称,1-100字符")
|
||||
private String leaderName;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -2,11 +2,10 @@ package com.starry.admin.modules.personnel.module.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* 店员分组基本信息修改
|
||||
*
|
||||
@@ -25,7 +24,6 @@ public class PlayPersonnelGroupInfoEditBaseInfoVo {
|
||||
@ApiModelProperty(value = "分组ID", required = true, example = "1", notes = "需要修改的分组ID")
|
||||
private String id;
|
||||
|
||||
|
||||
/**
|
||||
* 分组名称
|
||||
*/
|
||||
@@ -33,7 +31,6 @@ public class PlayPersonnelGroupInfoEditBaseInfoVo {
|
||||
@ApiModelProperty(value = "用户ID", required = true, example = "1", notes = "系统用户ID")
|
||||
private String sysUserId;
|
||||
|
||||
|
||||
/**
|
||||
* 分组名称
|
||||
*/
|
||||
@@ -50,5 +47,4 @@ public class PlayPersonnelGroupInfoEditBaseInfoVo {
|
||||
@ApiModelProperty(value = "组长名称", required = true, example = "张三", notes = "组长的名称,1-100字符")
|
||||
private String leaderName;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -23,5 +23,4 @@ public class PlayPersonnelGroupInfoQueryVo extends BasePageEntity {
|
||||
@ApiModelProperty(value = "组长名称", example = "张三", notes = "组长的名称,支持模糊查询")
|
||||
private String leaderName;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -3,11 +3,10 @@ package com.starry.admin.modules.personnel.module.vo;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 店员分组管理信息
|
||||
*
|
||||
@@ -18,14 +17,12 @@ import java.time.LocalDateTime;
|
||||
@ApiModel(value = "分组返回数据", description = "店员分组信息的返回数据")
|
||||
public class PlayPersonnelGroupInfoReturnVo {
|
||||
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
@ApiModelProperty(value = "分组ID", example = "1")
|
||||
private String id;
|
||||
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
@@ -37,7 +34,7 @@ public class PlayPersonnelGroupInfoReturnVo {
|
||||
**/
|
||||
@ApiModelProperty(value = "用户ID", example = "1")
|
||||
private String sysUserId;
|
||||
|
||||
|
||||
/**
|
||||
* 用户账号
|
||||
**/
|
||||
@@ -50,21 +47,18 @@ public class PlayPersonnelGroupInfoReturnVo {
|
||||
@ApiModelProperty(value = "分组名称", example = "销售组")
|
||||
private String groupName;
|
||||
|
||||
|
||||
/**
|
||||
* 组长名称
|
||||
**/
|
||||
@ApiModelProperty(value = "组长名称", example = "张三")
|
||||
private String leaderName;
|
||||
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@ApiModelProperty(value = "排序", example = "1")
|
||||
private Long sort;
|
||||
|
||||
|
||||
/**
|
||||
* 员工总数量
|
||||
**/
|
||||
@@ -77,11 +71,9 @@ public class PlayPersonnelGroupInfoReturnVo {
|
||||
@ApiModelProperty(value = "上架员工数", example = "5")
|
||||
private Integer listingEmployeesNumber;
|
||||
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@ApiModelProperty(value = "添加时间", example = "2024-01-01 12:00:00")
|
||||
private LocalDateTime addTime;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -3,11 +3,10 @@ package com.starry.admin.modules.personnel.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;
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
* @since 2024/6/15 下午9:42
|
||||
@@ -17,14 +16,12 @@ import java.util.List;
|
||||
@ApiModel(value = "用户查询参数", description = "查询系统用户信息的条件参数")
|
||||
public class PlayPersonnelUserInfoQueryVo extends BasePageEntity {
|
||||
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@ApiModelProperty(value = "系统用户ID", example = "1")
|
||||
private String sysUserId;
|
||||
|
||||
|
||||
/**
|
||||
* 用户名称
|
||||
*/
|
||||
@@ -37,14 +34,12 @@ public class PlayPersonnelUserInfoQueryVo extends BasePageEntity {
|
||||
@ApiModelProperty(value = "角色类型", example = "0", notes = "角色类型[0:用户;1:店员;2:组长]")
|
||||
private String ruleType;
|
||||
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@ApiModelProperty(value = "用户ID", example = "1")
|
||||
private String userId;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "添加时间范围", example = "['2024-01-01 00:00:00','2024-12-31 23:59:59']", notes = "用户添加时间范围,包含开始和结束时间")
|
||||
private List<String> addTime;
|
||||
}
|
||||
|
||||
@@ -2,11 +2,10 @@ package com.starry.admin.modules.personnel.module.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* 客户基本信息修改
|
||||
*
|
||||
@@ -24,7 +23,6 @@ public class PlayPersonnelWaiterInfoEditAddInfoVo {
|
||||
@ApiModelProperty(value = "用户ID", required = true, example = "1", notes = "系统用户ID")
|
||||
private String sysUserId;
|
||||
|
||||
|
||||
/**
|
||||
* 客服名称
|
||||
*/
|
||||
@@ -33,5 +31,4 @@ public class PlayPersonnelWaiterInfoEditAddInfoVo {
|
||||
@ApiModelProperty(value = "客服名称", required = true, example = "张三", notes = "客服的名称,1-100字符")
|
||||
private String waiterName;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -2,11 +2,10 @@ package com.starry.admin.modules.personnel.module.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* 客户基本信息修改
|
||||
*
|
||||
@@ -25,7 +24,6 @@ public class PlayPersonnelWaiterInfoEditBaseInfoVo {
|
||||
@ApiModelProperty(value = "客服ID", required = true, example = "1", notes = "需要修改的客服ID")
|
||||
private String id;
|
||||
|
||||
|
||||
/**
|
||||
* 分组名称
|
||||
*/
|
||||
@@ -41,6 +39,4 @@ public class PlayPersonnelWaiterInfoEditBaseInfoVo {
|
||||
@ApiModelProperty(value = "客服名称", required = true, example = "张三", notes = "客服的名称,1-100字符")
|
||||
private String waiterName;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -23,5 +23,4 @@ public class PlayPersonnelWaiterInfoQueryVo extends BasePageEntity {
|
||||
@ApiModelProperty(value = "客服名称", example = "张三", notes = "客服的名称,支持模糊查询")
|
||||
private String waiterName;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -3,11 +3,10 @@ package com.starry.admin.modules.personnel.module.vo;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 客户管理信息
|
||||
*
|
||||
@@ -18,14 +17,12 @@ import java.time.LocalDateTime;
|
||||
@ApiModel(value = "客服返回数据", description = "客服信息的返回数据")
|
||||
public class PlayPersonnelWaiterInfoReturnVo {
|
||||
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
@ApiModelProperty(value = "客服ID", example = "1")
|
||||
private String id;
|
||||
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
@@ -50,11 +47,9 @@ public class PlayPersonnelWaiterInfoReturnVo {
|
||||
@ApiModelProperty(value = "客服名称", example = "张三")
|
||||
private String waiterName;
|
||||
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@ApiModelProperty(value = "添加时间", example = "2024-01-01 12:00:00")
|
||||
private LocalDateTime addTime;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.starry.admin.modules.personnel.module.entity.PlayBalanceDetailsInfoEntity;
|
||||
import com.starry.admin.modules.personnel.module.vo.PlayBalanceDetailsQueryVo;
|
||||
import com.starry.admin.modules.personnel.module.vo.PlayBalanceDetailsReturnVo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
@@ -16,53 +15,65 @@ import java.math.BigDecimal;
|
||||
*/
|
||||
public interface IPlayBalanceDetailsInfoService extends IService<PlayBalanceDetailsInfoEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* 查询余额明细
|
||||
*
|
||||
* @param id 余额明细主键
|
||||
* @param id
|
||||
* 余额明细主键
|
||||
* @return 余额明细
|
||||
*/
|
||||
PlayBalanceDetailsInfoEntity selectPlayBalanceDetailsInfoById(String id);
|
||||
|
||||
|
||||
/**
|
||||
* 查询余额明细列表
|
||||
*
|
||||
* @param vo 余额明细查询对象
|
||||
* @param vo
|
||||
* 余额明细查询对象
|
||||
* @return 余额明细集合
|
||||
*/
|
||||
IPage<PlayBalanceDetailsReturnVo> selectByPage(PlayBalanceDetailsQueryVo vo);
|
||||
|
||||
|
||||
/**
|
||||
* 查询余额明细列表
|
||||
*
|
||||
* @param playBalanceDetailsInfo 余额明细
|
||||
* @param playBalanceDetailsInfo
|
||||
* 余额明细
|
||||
* @return 余额明细集合
|
||||
*/
|
||||
IPage<PlayBalanceDetailsInfoEntity> selectPlayBalanceDetailsInfoByPage(PlayBalanceDetailsInfoEntity playBalanceDetailsInfo);
|
||||
|
||||
IPage<PlayBalanceDetailsInfoEntity> selectPlayBalanceDetailsInfoByPage(
|
||||
PlayBalanceDetailsInfoEntity playBalanceDetailsInfo);
|
||||
|
||||
/**
|
||||
* 新增余额明细信息
|
||||
*
|
||||
* @param userType 用户类型[0:陪聊;1:顾客]
|
||||
* @param userId 用户ID
|
||||
* @param balanceBeforeOperation 操作前余额
|
||||
* @param balanceAfterOperation 操作后余额
|
||||
* @param operationType 操作类型(0:充值;1:消费,2:服务;3:退款)
|
||||
* @param operationAction 操作动作
|
||||
* @param balanceMoney 操作金额
|
||||
* @param giftAmount 赠送金额
|
||||
* @param orderId 订单ID
|
||||
* @param userType
|
||||
* 用户类型[0:陪聊;1:顾客]
|
||||
* @param userId
|
||||
* 用户ID
|
||||
* @param balanceBeforeOperation
|
||||
* 操作前余额
|
||||
* @param balanceAfterOperation
|
||||
* 操作后余额
|
||||
* @param operationType
|
||||
* 操作类型(0:充值;1:消费,2:服务;3:退款)
|
||||
* @param operationAction
|
||||
* 操作动作
|
||||
* @param balanceMoney
|
||||
* 操作金额
|
||||
* @param giftAmount
|
||||
* 赠送金额
|
||||
* @param orderId
|
||||
* 订单ID
|
||||
*/
|
||||
void insertBalanceDetailsInfo(String userType, String userId, BigDecimal balanceBeforeOperation, BigDecimal balanceAfterOperation, String operationType, String operationAction, BigDecimal balanceMoney, BigDecimal giftAmount, String orderId);
|
||||
void insertBalanceDetailsInfo(String userType, String userId, BigDecimal balanceBeforeOperation,
|
||||
BigDecimal balanceAfterOperation, String operationType, String operationAction, BigDecimal balanceMoney,
|
||||
BigDecimal giftAmount, String orderId);
|
||||
|
||||
/**
|
||||
* 新增余额明细
|
||||
*
|
||||
* @param playBalanceDetailsInfo 余额明细
|
||||
* @param playBalanceDetailsInfo
|
||||
* 余额明细
|
||||
* @return 结果
|
||||
*/
|
||||
boolean create(PlayBalanceDetailsInfoEntity playBalanceDetailsInfo);
|
||||
@@ -70,7 +81,8 @@ public interface IPlayBalanceDetailsInfoService extends IService<PlayBalanceDeta
|
||||
/**
|
||||
* 修改余额明细
|
||||
*
|
||||
* @param playBalanceDetailsInfo 余额明细
|
||||
* @param playBalanceDetailsInfo
|
||||
* 余额明细
|
||||
* @return 结果
|
||||
*/
|
||||
boolean update(PlayBalanceDetailsInfoEntity playBalanceDetailsInfo);
|
||||
@@ -78,7 +90,8 @@ public interface IPlayBalanceDetailsInfoService extends IService<PlayBalanceDeta
|
||||
/**
|
||||
* 批量删除余额明细
|
||||
*
|
||||
* @param ids 需要删除的余额明细主键集合
|
||||
* @param ids
|
||||
* 需要删除的余额明细主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayBalanceDetailsInfoByIds(String[] ids);
|
||||
@@ -86,7 +99,8 @@ public interface IPlayBalanceDetailsInfoService extends IService<PlayBalanceDeta
|
||||
/**
|
||||
* 删除余额明细信息
|
||||
*
|
||||
* @param id 余额明细主键
|
||||
* @param id
|
||||
* 余额明细主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayBalanceDetailsInfoById(String id);
|
||||
|
||||
@@ -14,30 +14,29 @@ import com.starry.admin.modules.personnel.module.vo.PlayPersonnelAdminInfoReturn
|
||||
*/
|
||||
public interface IPlayPersonnelAdminInfoService extends IService<PlayPersonnelAdminInfoEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* 查询店员分组信息
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @param userId
|
||||
* 用户ID
|
||||
* @return 店员分组信息
|
||||
*/
|
||||
PlayPersonnelAdminInfoEntity selectByUserId(String userId);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 查询管理员管理
|
||||
*
|
||||
* @param id 管理员管理主键
|
||||
* @param id
|
||||
* 管理员管理主键
|
||||
* @return 管理员管理
|
||||
*/
|
||||
PlayPersonnelAdminInfoEntity selectPlayPersonnelAdminInfoById(String id);
|
||||
|
||||
|
||||
/**
|
||||
* 查询管理员管理列表
|
||||
*
|
||||
* @param vo 管理员管理
|
||||
* @param vo
|
||||
* 管理员管理
|
||||
* @return 管理员管理集合
|
||||
*/
|
||||
IPage<PlayPersonnelAdminInfoReturnVo> selectByPage(PlayPersonnelAdminInfoQueryVo vo);
|
||||
@@ -45,7 +44,8 @@ public interface IPlayPersonnelAdminInfoService extends IService<PlayPersonnelAd
|
||||
/**
|
||||
* 新增管理员管理
|
||||
*
|
||||
* @param playPersonnelAdminInfo 管理员管理
|
||||
* @param playPersonnelAdminInfo
|
||||
* 管理员管理
|
||||
* @return 结果
|
||||
*/
|
||||
boolean create(PlayPersonnelAdminInfoEntity playPersonnelAdminInfo);
|
||||
@@ -53,7 +53,8 @@ public interface IPlayPersonnelAdminInfoService extends IService<PlayPersonnelAd
|
||||
/**
|
||||
* 修改管理员管理
|
||||
*
|
||||
* @param playPersonnelAdminInfo 管理员管理
|
||||
* @param playPersonnelAdminInfo
|
||||
* 管理员管理
|
||||
* @return 结果
|
||||
*/
|
||||
boolean update(PlayPersonnelAdminInfoEntity playPersonnelAdminInfo);
|
||||
@@ -61,7 +62,8 @@ public interface IPlayPersonnelAdminInfoService extends IService<PlayPersonnelAd
|
||||
/**
|
||||
* 批量删除管理员管理
|
||||
*
|
||||
* @param ids 需要删除的管理员管理主键集合
|
||||
* @param ids
|
||||
* 需要删除的管理员管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayPersonnelAdminInfoByIds(String[] ids);
|
||||
@@ -69,7 +71,8 @@ public interface IPlayPersonnelAdminInfoService extends IService<PlayPersonnelAd
|
||||
/**
|
||||
* 删除管理员管理信息
|
||||
*
|
||||
* @param id 管理员管理主键
|
||||
* @param id
|
||||
* 管理员管理主键
|
||||
*/
|
||||
void deletePlayPersonnelAdminInfoById(String id);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@ import com.starry.admin.common.domain.LoginUser;
|
||||
import com.starry.admin.modules.personnel.module.entity.PlayPersonnelGroupInfoEntity;
|
||||
import com.starry.admin.modules.personnel.module.vo.PlayPersonnelGroupInfoQueryVo;
|
||||
import com.starry.admin.modules.personnel.module.vo.PlayPersonnelGroupInfoReturnVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -19,7 +18,8 @@ public interface IPlayPersonnelGroupInfoService extends IService<PlayPersonnelGr
|
||||
/**
|
||||
* 查询店员分组信息
|
||||
*
|
||||
* @param id 店员分组信息主键
|
||||
* @param id
|
||||
* 店员分组信息主键
|
||||
* @return 店员分组信息
|
||||
*/
|
||||
PlayPersonnelGroupInfoEntity selectPlayClerkGroupInfoById(String id);
|
||||
@@ -27,12 +27,12 @@ public interface IPlayPersonnelGroupInfoService extends IService<PlayPersonnelGr
|
||||
/**
|
||||
* 查询店员分组信息
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @param userId
|
||||
* 用户ID
|
||||
* @return 店员分组信息
|
||||
*/
|
||||
PlayPersonnelGroupInfoEntity selectByUserId(String userId);
|
||||
|
||||
|
||||
/**
|
||||
* 查询店员分组信息列表
|
||||
*
|
||||
@@ -45,7 +45,8 @@ public interface IPlayPersonnelGroupInfoService extends IService<PlayPersonnelGr
|
||||
/**
|
||||
* 分页查询店员分组信息列表
|
||||
*
|
||||
* @param vo 查询店员分组信息查询对象
|
||||
* @param vo
|
||||
* 查询店员分组信息查询对象
|
||||
* @return PlayPersonnelGroupInfoReturnVo
|
||||
* @author admin
|
||||
* @since 2024/6/14 15:46
|
||||
@@ -55,7 +56,8 @@ public interface IPlayPersonnelGroupInfoService extends IService<PlayPersonnelGr
|
||||
/**
|
||||
* 新增店员分组信息
|
||||
*
|
||||
* @param playClerkGroupInfo 店员分组信息
|
||||
* @param playClerkGroupInfo
|
||||
* 店员分组信息
|
||||
* @return 结果
|
||||
*/
|
||||
boolean create(PlayPersonnelGroupInfoEntity playClerkGroupInfo);
|
||||
@@ -63,7 +65,8 @@ public interface IPlayPersonnelGroupInfoService extends IService<PlayPersonnelGr
|
||||
/**
|
||||
* 修改店员分组信息
|
||||
*
|
||||
* @param playClerkGroupInfo 店员分组信息
|
||||
* @param playClerkGroupInfo
|
||||
* 店员分组信息
|
||||
* @return 结果
|
||||
*/
|
||||
boolean update(PlayPersonnelGroupInfoEntity playClerkGroupInfo);
|
||||
@@ -71,7 +74,8 @@ public interface IPlayPersonnelGroupInfoService extends IService<PlayPersonnelGr
|
||||
/**
|
||||
* 批量删除店员分组信息
|
||||
*
|
||||
* @param ids 需要删除的店员分组信息主键集合
|
||||
* @param ids
|
||||
* 需要删除的店员分组信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayClerkGroupInfoByIds(String[] ids);
|
||||
@@ -79,14 +83,16 @@ public interface IPlayPersonnelGroupInfoService extends IService<PlayPersonnelGr
|
||||
/**
|
||||
* 删除店员分组信息信息
|
||||
*
|
||||
* @param id 店员分组信息主键
|
||||
* @param id
|
||||
* 店员分组信息主键
|
||||
*/
|
||||
void deletePlayClerkGroupInfoById(String id);
|
||||
|
||||
/**
|
||||
* 筛选所有的组员
|
||||
*
|
||||
* @param loginUser 登录用户
|
||||
* @param loginUser
|
||||
* 登录用户
|
||||
* @param clerkNickName
|
||||
* @return 组员ID列表
|
||||
*/
|
||||
|
||||
@@ -17,7 +17,8 @@ public interface IPlayPersonnelWaiterInfoService extends IService<PlayPersonnelW
|
||||
/**
|
||||
* 查询店员客服信息
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @param userId
|
||||
* 用户ID
|
||||
* @return 店员分组信息
|
||||
*/
|
||||
PlayPersonnelWaiterInfoEntity selectByUserId(String userId);
|
||||
@@ -25,16 +26,17 @@ public interface IPlayPersonnelWaiterInfoService extends IService<PlayPersonnelW
|
||||
/**
|
||||
* 查询客服信息
|
||||
*
|
||||
* @param id 客服信息主键
|
||||
* @param id
|
||||
* 客服信息主键
|
||||
* @return 客服信息
|
||||
*/
|
||||
PlayPersonnelWaiterInfoEntity selectPlayClerkWaiterInfoById(String id);
|
||||
|
||||
|
||||
/**
|
||||
* 查询客服信息列表
|
||||
*
|
||||
* @param vo 客服信息
|
||||
* @param vo
|
||||
* 客服信息
|
||||
* @return 客服信息集合
|
||||
*/
|
||||
IPage<PlayPersonnelWaiterInfoReturnVo> selectByPage(PlayPersonnelWaiterInfoQueryVo vo);
|
||||
@@ -42,7 +44,8 @@ public interface IPlayPersonnelWaiterInfoService extends IService<PlayPersonnelW
|
||||
/**
|
||||
* 新增客服信息
|
||||
*
|
||||
* @param playClerkWaiterInfo 客服信息
|
||||
* @param playClerkWaiterInfo
|
||||
* 客服信息
|
||||
* @return 结果
|
||||
*/
|
||||
boolean create(PlayPersonnelWaiterInfoEntity playClerkWaiterInfo);
|
||||
@@ -50,7 +53,8 @@ public interface IPlayPersonnelWaiterInfoService extends IService<PlayPersonnelW
|
||||
/**
|
||||
* 修改客服信息
|
||||
*
|
||||
* @param playClerkWaiterInfo 客服信息
|
||||
* @param playClerkWaiterInfo
|
||||
* 客服信息
|
||||
* @return 结果
|
||||
*/
|
||||
boolean update(PlayPersonnelWaiterInfoEntity playClerkWaiterInfo);
|
||||
@@ -58,7 +62,8 @@ public interface IPlayPersonnelWaiterInfoService extends IService<PlayPersonnelW
|
||||
/**
|
||||
* 批量删除客服信息
|
||||
*
|
||||
* @param ids 需要删除的客服信息主键集合
|
||||
* @param ids
|
||||
* 需要删除的客服信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayClerkWaiterInfoByIds(String[] ids);
|
||||
@@ -66,7 +71,8 @@ public interface IPlayPersonnelWaiterInfoService extends IService<PlayPersonnelW
|
||||
/**
|
||||
* 删除客服信息信息
|
||||
*
|
||||
* @param id 客服信息主键
|
||||
* @param id
|
||||
* 客服信息主键
|
||||
*/
|
||||
void deletePlayClerkWaiterInfoById(String id);
|
||||
}
|
||||
|
||||
@@ -15,12 +15,11 @@ import com.starry.admin.modules.personnel.module.vo.PlayBalanceDetailsQueryVo;
|
||||
import com.starry.admin.modules.personnel.module.vo.PlayBalanceDetailsReturnVo;
|
||||
import com.starry.admin.modules.personnel.service.IPlayBalanceDetailsInfoService;
|
||||
import com.starry.common.utils.IdUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Arrays;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 余额明细Service业务层处理
|
||||
@@ -29,7 +28,11 @@ import java.util.Arrays;
|
||||
* @since 2024-04-30
|
||||
*/
|
||||
@Service
|
||||
public class PlayBalanceDetailsInfoServiceImpl extends ServiceImpl<PlayBalanceDetailsInfoMapper, PlayBalanceDetailsInfoEntity> implements IPlayBalanceDetailsInfoService {
|
||||
public class PlayBalanceDetailsInfoServiceImpl
|
||||
extends
|
||||
ServiceImpl<PlayBalanceDetailsInfoMapper, PlayBalanceDetailsInfoEntity>
|
||||
implements
|
||||
IPlayBalanceDetailsInfoService {
|
||||
@Resource
|
||||
private PlayBalanceDetailsInfoMapper playBalanceDetailsInfoMapper;
|
||||
|
||||
@@ -39,7 +42,8 @@ public class PlayBalanceDetailsInfoServiceImpl extends ServiceImpl<PlayBalanceDe
|
||||
/**
|
||||
* 查询余额明细
|
||||
*
|
||||
* @param id 余额明细主键
|
||||
* @param id
|
||||
* 余额明细主键
|
||||
* @return 余额明细
|
||||
*/
|
||||
@Override
|
||||
@@ -47,20 +51,24 @@ public class PlayBalanceDetailsInfoServiceImpl extends ServiceImpl<PlayBalanceDe
|
||||
return this.baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IPage<PlayBalanceDetailsReturnVo> selectByPage(PlayBalanceDetailsQueryVo vo) {
|
||||
MPJLambdaWrapper<PlayBalanceDetailsInfoEntity> lambdaQueryWrapper = new MPJLambdaWrapper<PlayBalanceDetailsInfoEntity>()
|
||||
//查询主表全部字段
|
||||
// 查询主表全部字段
|
||||
.selectAll(PlayBalanceDetailsInfoEntity.class)
|
||||
//查询顾客表
|
||||
.selectAs(PlayCustomUserInfoEntity::getId, "customId").selectAs(PlayCustomUserInfoEntity::getNickname, "customNickname").selectAs(PlayCustomUserInfoEntity::getAvatar, "customAvatar")
|
||||
//查询订单表
|
||||
// .selectAs(PlayOrderInfoEntity::getId, "orderId").selectAs(PlayOrderInfoEntity::getOrderNo, "orderNo").selectAs(PlayOrderInfoEntity::getPayMethod,"payMethod")
|
||||
// 查询顾客表
|
||||
.selectAs(PlayCustomUserInfoEntity::getId, "customId")
|
||||
.selectAs(PlayCustomUserInfoEntity::getNickname, "customNickname")
|
||||
.selectAs(PlayCustomUserInfoEntity::getAvatar, "customAvatar")
|
||||
// 查询订单表
|
||||
// .selectAs(PlayOrderInfoEntity::getId,
|
||||
// "orderId").selectAs(PlayOrderInfoEntity::getOrderNo,
|
||||
// "orderNo").selectAs(PlayOrderInfoEntity::getPayMethod,"payMethod")
|
||||
.selectAll(PlayOrderInfoEntity.class)
|
||||
.leftJoin(PlayOrderInfoEntity.class, PlayOrderInfoEntity::getId, PlayBalanceDetailsInfoEntity::getOrderId)
|
||||
.leftJoin(PlayCustomUserInfoEntity.class, PlayCustomUserInfoEntity::getId, PlayBalanceDetailsInfoEntity::getUserId);
|
||||
|
||||
.leftJoin(PlayOrderInfoEntity.class, PlayOrderInfoEntity::getId,
|
||||
PlayBalanceDetailsInfoEntity::getOrderId)
|
||||
.leftJoin(PlayCustomUserInfoEntity.class, PlayCustomUserInfoEntity::getId,
|
||||
PlayBalanceDetailsInfoEntity::getUserId);
|
||||
|
||||
if (StrUtil.isNotBlank(vo.getPayMethod())) {
|
||||
lambdaQueryWrapper.eq(PlayOrderInfoEntity::getPayMethod, vo.getPayMethod());
|
||||
@@ -79,28 +87,33 @@ public class PlayBalanceDetailsInfoServiceImpl extends ServiceImpl<PlayBalanceDe
|
||||
}
|
||||
|
||||
if (!vo.getOperationTime().isEmpty()) {
|
||||
lambdaQueryWrapper.between(PlayBalanceDetailsInfoEntity::getOperationTime, vo.getOperationTime().get(0), vo.getOperationTime().get(1));
|
||||
lambdaQueryWrapper.between(PlayBalanceDetailsInfoEntity::getOperationTime, vo.getOperationTime().get(0),
|
||||
vo.getOperationTime().get(1));
|
||||
}
|
||||
lambdaQueryWrapper.orderByDesc(PlayBalanceDetailsInfoEntity::getOperationTime);
|
||||
return this.baseMapper.selectJoinPage(new Page<>(vo.getPageNum(), vo.getPageSize()), PlayBalanceDetailsReturnVo.class, lambdaQueryWrapper);
|
||||
return this.baseMapper.selectJoinPage(new Page<>(vo.getPageNum(), vo.getPageSize()),
|
||||
PlayBalanceDetailsReturnVo.class, lambdaQueryWrapper);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询余额明细列表
|
||||
*
|
||||
* @param playBalanceDetailsInfo 余额明细
|
||||
* @param playBalanceDetailsInfo
|
||||
* 余额明细
|
||||
* @return 余额明细
|
||||
*/
|
||||
@Override
|
||||
public IPage<PlayBalanceDetailsInfoEntity> selectPlayBalanceDetailsInfoByPage(PlayBalanceDetailsInfoEntity playBalanceDetailsInfo) {
|
||||
public IPage<PlayBalanceDetailsInfoEntity> selectPlayBalanceDetailsInfoByPage(
|
||||
PlayBalanceDetailsInfoEntity playBalanceDetailsInfo) {
|
||||
Page<PlayBalanceDetailsInfoEntity> page = new Page<>(1, 10);
|
||||
return this.baseMapper.selectPage(page, new LambdaQueryWrapper<>());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void insertBalanceDetailsInfo(String userType, String userId, BigDecimal balanceBeforeOperation, BigDecimal balanceAfterOperation, String operationType, String operationAction, BigDecimal balanceMoney, BigDecimal giftAmount, String orderId) {
|
||||
public void insertBalanceDetailsInfo(String userType, String userId, BigDecimal balanceBeforeOperation,
|
||||
BigDecimal balanceAfterOperation, String operationType, String operationAction, BigDecimal balanceMoney,
|
||||
BigDecimal giftAmount, String orderId) {
|
||||
PlayOrderInfoEntity orderInfo = playOrderInfoService.selectOrderInfoById(orderId);
|
||||
PlayBalanceDetailsInfoEntity entity = new PlayBalanceDetailsInfoEntity();
|
||||
entity.setId(IdUtils.getUuid());
|
||||
@@ -120,7 +133,8 @@ public class PlayBalanceDetailsInfoServiceImpl extends ServiceImpl<PlayBalanceDe
|
||||
/**
|
||||
* 新增余额明细
|
||||
*
|
||||
* @param playBalanceDetailsInfo 余额明细
|
||||
* @param playBalanceDetailsInfo
|
||||
* 余额明细
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@@ -134,7 +148,8 @@ public class PlayBalanceDetailsInfoServiceImpl extends ServiceImpl<PlayBalanceDe
|
||||
/**
|
||||
* 修改余额明细
|
||||
*
|
||||
* @param playBalanceDetailsInfo 余额明细
|
||||
* @param playBalanceDetailsInfo
|
||||
* 余额明细
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@@ -145,7 +160,8 @@ public class PlayBalanceDetailsInfoServiceImpl extends ServiceImpl<PlayBalanceDe
|
||||
/**
|
||||
* 批量删除余额明细
|
||||
*
|
||||
* @param ids 需要删除的余额明细主键
|
||||
* @param ids
|
||||
* 需要删除的余额明细主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@@ -156,7 +172,8 @@ public class PlayBalanceDetailsInfoServiceImpl extends ServiceImpl<PlayBalanceDe
|
||||
/**
|
||||
* 删除余额明细信息
|
||||
*
|
||||
* @param id 余额明细主键
|
||||
* @param id
|
||||
* 余额明细主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
|
||||
@@ -12,10 +12,9 @@ import com.starry.admin.modules.personnel.module.vo.PlayPersonnelAdminInfoQueryV
|
||||
import com.starry.admin.modules.personnel.module.vo.PlayPersonnelAdminInfoReturnVo;
|
||||
import com.starry.admin.modules.personnel.service.IPlayPersonnelAdminInfoService;
|
||||
import com.starry.common.utils.IdUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Arrays;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 管理员管理Service业务层处理
|
||||
@@ -24,11 +23,14 @@ import java.util.Arrays;
|
||||
* @since 2024-06-14
|
||||
*/
|
||||
@Service
|
||||
public class PlayPersonnelAdminInfoServiceImpl extends ServiceImpl<PlayPersonnelAdminInfoMapper, PlayPersonnelAdminInfoEntity> implements IPlayPersonnelAdminInfoService {
|
||||
public class PlayPersonnelAdminInfoServiceImpl
|
||||
extends
|
||||
ServiceImpl<PlayPersonnelAdminInfoMapper, PlayPersonnelAdminInfoEntity>
|
||||
implements
|
||||
IPlayPersonnelAdminInfoService {
|
||||
@Resource
|
||||
private PlayPersonnelAdminInfoMapper playPersonnelAdminInfoMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public PlayPersonnelAdminInfoEntity selectByUserId(String userId) {
|
||||
LambdaQueryWrapper<PlayPersonnelAdminInfoEntity> queryWrapper = new LambdaQueryWrapper<>();
|
||||
@@ -39,7 +41,8 @@ public class PlayPersonnelAdminInfoServiceImpl extends ServiceImpl<PlayPersonnel
|
||||
/**
|
||||
* 查询管理员管理
|
||||
*
|
||||
* @param id 管理员管理主键
|
||||
* @param id
|
||||
* 管理员管理主键
|
||||
* @return 管理员管理
|
||||
*/
|
||||
@Override
|
||||
@@ -47,20 +50,21 @@ public class PlayPersonnelAdminInfoServiceImpl extends ServiceImpl<PlayPersonnel
|
||||
return this.baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IPage<PlayPersonnelAdminInfoReturnVo> selectByPage(PlayPersonnelAdminInfoQueryVo vo) {
|
||||
MPJLambdaWrapper<PlayPersonnelAdminInfoEntity> lambdaWrapper = new MPJLambdaWrapper<>();
|
||||
if (StrUtil.isNotBlank(vo.getAdminName())) {
|
||||
lambdaWrapper.eq(PlayPersonnelAdminInfoEntity::getAdminName, vo.getAdminName());
|
||||
}
|
||||
return this.baseMapper.selectJoinPage(new Page<>(vo.getPageNum(), vo.getPageSize()), PlayPersonnelAdminInfoReturnVo.class, lambdaWrapper);
|
||||
return this.baseMapper.selectJoinPage(new Page<>(vo.getPageNum(), vo.getPageSize()),
|
||||
PlayPersonnelAdminInfoReturnVo.class, lambdaWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增管理员管理
|
||||
*
|
||||
* @param playPersonnelAdminInfo 管理员管理
|
||||
* @param playPersonnelAdminInfo
|
||||
* 管理员管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@@ -74,7 +78,8 @@ public class PlayPersonnelAdminInfoServiceImpl extends ServiceImpl<PlayPersonnel
|
||||
/**
|
||||
* 修改管理员管理
|
||||
*
|
||||
* @param playPersonnelAdminInfo 管理员管理
|
||||
* @param playPersonnelAdminInfo
|
||||
* 管理员管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@@ -85,7 +90,8 @@ public class PlayPersonnelAdminInfoServiceImpl extends ServiceImpl<PlayPersonnel
|
||||
/**
|
||||
* 批量删除管理员管理
|
||||
*
|
||||
* @param ids 需要删除的管理员管理主键
|
||||
* @param ids
|
||||
* 需要删除的管理员管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@@ -96,7 +102,8 @@ public class PlayPersonnelAdminInfoServiceImpl extends ServiceImpl<PlayPersonnel
|
||||
/**
|
||||
* 删除管理员管理信息
|
||||
*
|
||||
* @param id 管理员管理主键
|
||||
* @param id
|
||||
* 管理员管理主键
|
||||
*/
|
||||
@Override
|
||||
public void deletePlayPersonnelAdminInfoById(String id) {
|
||||
|
||||
@@ -18,14 +18,13 @@ import com.starry.admin.modules.personnel.module.vo.PlayPersonnelGroupInfoReturn
|
||||
import com.starry.admin.modules.personnel.service.IPlayPersonnelGroupInfoService;
|
||||
import com.starry.common.utils.IdUtils;
|
||||
import com.starry.common.utils.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 店员分组信息Service业务层处理
|
||||
@@ -34,7 +33,11 @@ import java.util.stream.Collectors;
|
||||
* @since 2024-05-31
|
||||
*/
|
||||
@Service
|
||||
public class PlayPersonnelGroupInfoServiceImpl extends ServiceImpl<PlayPersonnelGroupInfoMapper, PlayPersonnelGroupInfoEntity> implements IPlayPersonnelGroupInfoService {
|
||||
public class PlayPersonnelGroupInfoServiceImpl
|
||||
extends
|
||||
ServiceImpl<PlayPersonnelGroupInfoMapper, PlayPersonnelGroupInfoEntity>
|
||||
implements
|
||||
IPlayPersonnelGroupInfoService {
|
||||
@Resource
|
||||
private PlayPersonnelGroupInfoMapper playClerkGroupInfoMapper;
|
||||
@Resource
|
||||
@@ -43,7 +46,8 @@ public class PlayPersonnelGroupInfoServiceImpl extends ServiceImpl<PlayPersonnel
|
||||
/**
|
||||
* 查询店员分组信息
|
||||
*
|
||||
* @param id 店员分组信息主键
|
||||
* @param id
|
||||
* 店员分组信息主键
|
||||
* @return 店员分组信息
|
||||
*/
|
||||
@Override
|
||||
@@ -69,14 +73,15 @@ public class PlayPersonnelGroupInfoServiceImpl extends ServiceImpl<PlayPersonnel
|
||||
if (StrUtil.isNotBlank(vo.getLeaderName())) {
|
||||
lambdaQueryWrapper.eq(PlayPersonnelGroupInfoEntity::getLeaderName, vo.getLeaderName());
|
||||
}
|
||||
return this.baseMapper.selectJoinPage(new Page<>(vo.getPageNum(), vo.getPageSize()), PlayPersonnelGroupInfoReturnVo.class, lambdaQueryWrapper);
|
||||
return this.baseMapper.selectJoinPage(new Page<>(vo.getPageNum(), vo.getPageSize()),
|
||||
PlayPersonnelGroupInfoReturnVo.class, lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增店员分组信息
|
||||
*
|
||||
* @param playClerkGroupInfo 店员分组信息
|
||||
* @param playClerkGroupInfo
|
||||
* 店员分组信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@@ -90,7 +95,8 @@ public class PlayPersonnelGroupInfoServiceImpl extends ServiceImpl<PlayPersonnel
|
||||
/**
|
||||
* 修改店员分组信息
|
||||
*
|
||||
* @param playClerkGroupInfo 店员分组信息
|
||||
* @param playClerkGroupInfo
|
||||
* 店员分组信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@@ -101,7 +107,8 @@ public class PlayPersonnelGroupInfoServiceImpl extends ServiceImpl<PlayPersonnel
|
||||
/**
|
||||
* 批量删除店员分组信息
|
||||
*
|
||||
* @param ids 需要删除的店员分组信息主键
|
||||
* @param ids
|
||||
* 需要删除的店员分组信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@@ -112,7 +119,8 @@ public class PlayPersonnelGroupInfoServiceImpl extends ServiceImpl<PlayPersonnel
|
||||
/**
|
||||
* 删除店员分组信息信息
|
||||
*
|
||||
* @param id 店员分组信息主键
|
||||
* @param id
|
||||
* 店员分组信息主键
|
||||
*/
|
||||
@Override
|
||||
public void deletePlayClerkGroupInfoById(String id) {
|
||||
@@ -124,24 +132,35 @@ public class PlayPersonnelGroupInfoServiceImpl extends ServiceImpl<PlayPersonnel
|
||||
List<String> idList;
|
||||
PlayPersonnelGroupInfoEntity groupInfoEntity = this.selectByUserId(loginUser.getUserId());
|
||||
if (Objects.nonNull(groupInfoEntity)) {
|
||||
List<PlayClerkUserInfoEntity> list = clerkUserInfoService.list(Wrappers.lambdaQuery(PlayClerkUserInfoEntity.class).eq(PlayClerkUserInfoEntity::getGroupId, groupInfoEntity.getId()).select(PlayClerkUserInfoEntity::getId));
|
||||
List<PlayClerkUserInfoEntity> list = clerkUserInfoService
|
||||
.list(Wrappers.lambdaQuery(PlayClerkUserInfoEntity.class)
|
||||
.eq(PlayClerkUserInfoEntity::getGroupId, groupInfoEntity.getId())
|
||||
.select(PlayClerkUserInfoEntity::getId));
|
||||
idList = list.stream().map(PlayClerkUserInfoEntity::getId).collect(Collectors.toList());
|
||||
PlayClerkUserInfoEntity entity = clerkUserInfoService.getOne(Wrappers.lambdaQuery(PlayClerkUserInfoEntity.class).eq(PlayClerkUserInfoEntity::getSysUserId, loginUser.getUserId()), false);
|
||||
PlayClerkUserInfoEntity entity = clerkUserInfoService
|
||||
.getOne(Wrappers.lambdaQuery(PlayClerkUserInfoEntity.class)
|
||||
.eq(PlayClerkUserInfoEntity::getSysUserId, loginUser.getUserId()), false);
|
||||
if (Objects.nonNull(entity)) {
|
||||
idList.add(entity.getId());
|
||||
}
|
||||
} else {
|
||||
// 返回所有的clerkId
|
||||
idList = clerkUserInfoService.list(Wrappers.lambdaQuery(PlayClerkUserInfoEntity.class).select(PlayClerkUserInfoEntity::getId).eq(PlayClerkUserInfoEntity::getClerkState, "1")).stream().map(PlayClerkUserInfoEntity::getId).collect(Collectors.toList());
|
||||
idList = clerkUserInfoService
|
||||
.list(Wrappers.lambdaQuery(PlayClerkUserInfoEntity.class).select(PlayClerkUserInfoEntity::getId)
|
||||
.eq(PlayClerkUserInfoEntity::getClerkState, "1"))
|
||||
.stream().map(PlayClerkUserInfoEntity::getId).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
if (CollectionUtil.isEmpty(idList)) {
|
||||
idList = Collections.singletonList("-999");
|
||||
}
|
||||
// 加入nickName的筛选
|
||||
if(StringUtils.isNotEmpty(clerkNickName)){
|
||||
LambdaQueryWrapper<PlayClerkUserInfoEntity> wrapper = Wrappers.lambdaQuery(PlayClerkUserInfoEntity.class).in(PlayClerkUserInfoEntity::getId, idList).like(PlayClerkUserInfoEntity::getNickname, clerkNickName).select(PlayClerkUserInfoEntity::getId);
|
||||
idList = clerkUserInfoService.list(wrapper).stream().map(PlayClerkUserInfoEntity::getId).collect(Collectors.toList());
|
||||
if (StringUtils.isNotEmpty(clerkNickName)) {
|
||||
LambdaQueryWrapper<PlayClerkUserInfoEntity> wrapper = Wrappers.lambdaQuery(PlayClerkUserInfoEntity.class)
|
||||
.in(PlayClerkUserInfoEntity::getId, idList)
|
||||
.like(PlayClerkUserInfoEntity::getNickname, clerkNickName).select(PlayClerkUserInfoEntity::getId);
|
||||
idList = clerkUserInfoService.list(wrapper).stream().map(PlayClerkUserInfoEntity::getId)
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
if (CollectionUtil.isEmpty(idList)) {
|
||||
idList = Collections.singletonList("-999");
|
||||
|
||||
@@ -12,10 +12,9 @@ import com.starry.admin.modules.personnel.module.vo.PlayPersonnelWaiterInfoQuery
|
||||
import com.starry.admin.modules.personnel.module.vo.PlayPersonnelWaiterInfoReturnVo;
|
||||
import com.starry.admin.modules.personnel.service.IPlayPersonnelWaiterInfoService;
|
||||
import com.starry.common.utils.IdUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Arrays;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 客服信息Service业务层处理
|
||||
@@ -24,11 +23,14 @@ import java.util.Arrays;
|
||||
* @since 2024-06-14
|
||||
*/
|
||||
@Service
|
||||
public class PlayPersonnelWaiterInfoServiceImpl extends ServiceImpl<PlayPersonnelWaiterInfoMapper, PlayPersonnelWaiterInfoEntity> implements IPlayPersonnelWaiterInfoService {
|
||||
public class PlayPersonnelWaiterInfoServiceImpl
|
||||
extends
|
||||
ServiceImpl<PlayPersonnelWaiterInfoMapper, PlayPersonnelWaiterInfoEntity>
|
||||
implements
|
||||
IPlayPersonnelWaiterInfoService {
|
||||
@Resource
|
||||
private PlayPersonnelWaiterInfoMapper playClerkWaiterInfoMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public PlayPersonnelWaiterInfoEntity selectByUserId(String userId) {
|
||||
LambdaQueryWrapper<PlayPersonnelWaiterInfoEntity> queryWrapper = new LambdaQueryWrapper<>();
|
||||
@@ -39,7 +41,8 @@ public class PlayPersonnelWaiterInfoServiceImpl extends ServiceImpl<PlayPersonne
|
||||
/**
|
||||
* 查询客服信息
|
||||
*
|
||||
* @param id 客服信息主键
|
||||
* @param id
|
||||
* 客服信息主键
|
||||
* @return 客服信息
|
||||
*/
|
||||
@Override
|
||||
@@ -47,21 +50,21 @@ public class PlayPersonnelWaiterInfoServiceImpl extends ServiceImpl<PlayPersonne
|
||||
return this.baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IPage<PlayPersonnelWaiterInfoReturnVo> selectByPage(PlayPersonnelWaiterInfoQueryVo vo) {
|
||||
MPJLambdaWrapper<PlayPersonnelWaiterInfoEntity> lambdaWrapper = new MPJLambdaWrapper<>();
|
||||
if (StrUtil.isNotBlank(vo.getWaiterName())) {
|
||||
lambdaWrapper.eq(PlayPersonnelWaiterInfoEntity::getWaiterName, vo.getWaiterName());
|
||||
}
|
||||
return this.baseMapper.selectJoinPage(new Page<>(vo.getPageNum(), vo.getPageSize()), PlayPersonnelWaiterInfoReturnVo.class, lambdaWrapper);
|
||||
return this.baseMapper.selectJoinPage(new Page<>(vo.getPageNum(), vo.getPageSize()),
|
||||
PlayPersonnelWaiterInfoReturnVo.class, lambdaWrapper);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增客服信息
|
||||
*
|
||||
* @param playClerkWaiterInfo 客服信息
|
||||
* @param playClerkWaiterInfo
|
||||
* 客服信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@@ -75,7 +78,8 @@ public class PlayPersonnelWaiterInfoServiceImpl extends ServiceImpl<PlayPersonne
|
||||
/**
|
||||
* 修改客服信息
|
||||
*
|
||||
* @param playClerkWaiterInfo 客服信息
|
||||
* @param playClerkWaiterInfo
|
||||
* 客服信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@@ -86,7 +90,8 @@ public class PlayPersonnelWaiterInfoServiceImpl extends ServiceImpl<PlayPersonne
|
||||
/**
|
||||
* 批量删除客服信息
|
||||
*
|
||||
* @param ids 需要删除的客服信息主键
|
||||
* @param ids
|
||||
* 需要删除的客服信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@@ -97,7 +102,8 @@ public class PlayPersonnelWaiterInfoServiceImpl extends ServiceImpl<PlayPersonne
|
||||
/**
|
||||
* 删除客服信息信息
|
||||
*
|
||||
* @param id 客服信息主键
|
||||
* @param id
|
||||
* 客服信息主键
|
||||
*/
|
||||
@Override
|
||||
public void deletePlayClerkWaiterInfoById(String id) {
|
||||
|
||||
Reference in New Issue
Block a user