组长、客服、管理员
This commit is contained in:
@@ -0,0 +1,96 @@
|
||||
package com.starry.admin.modules.personnel.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.starry.admin.modules.personnel.module.entity.PlayPersonnelAdminInfoEntity;
|
||||
import com.starry.admin.modules.personnel.module.vo.*;
|
||||
import com.starry.admin.modules.personnel.service.IPlayPersonnelAdminInfoService;
|
||||
import com.starry.admin.modules.system.entity.SysUserEntity;
|
||||
import com.starry.admin.modules.system.service.SysUserService;
|
||||
import com.starry.common.annotation.Log;
|
||||
import com.starry.common.enums.BusinessType;
|
||||
import com.starry.common.result.R;
|
||||
import com.starry.common.utils.ConvertUtil;
|
||||
import 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
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-06-14
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/personnel/admin")
|
||||
public class PlayPersonnelAdminInfoController {
|
||||
@Resource
|
||||
private IPlayPersonnelAdminInfoService playPersonnelAdminInfoService;
|
||||
|
||||
@Resource
|
||||
private SysUserService sysUserService;
|
||||
|
||||
|
||||
/**
|
||||
* 查询管理员管理信息列表
|
||||
*/
|
||||
@PostMapping("/listByPage")
|
||||
public R listByPage(@Validated @RequestBody PlayPersonnelAdminInfoQueryVo vo) {
|
||||
IPage<PlayPersonnelAdminInfoReturnVo> list = playPersonnelAdminInfoService.selectByPage(vo);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取管理员管理详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{id}")
|
||||
public R getInfo(@PathVariable("id") String id) {
|
||||
return R.ok(playPersonnelAdminInfoService.selectPlayPersonnelAdminInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增管理员管理信息
|
||||
*/
|
||||
@Log(title = "管理员管理信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/createBaseInfo")
|
||||
public R createBaseInfo(@Validated @RequestBody PlayPersonnelAdminInfoEditAddInfoVo vo) {
|
||||
SysUserEntity sysUserEntity = sysUserService.selectUserById(vo.getSysUserId());
|
||||
PlayPersonnelAdminInfoEntity entity = ConvertUtil.entityToVo(vo, PlayPersonnelAdminInfoEntity.class);
|
||||
entity.setSysUserCode(sysUserEntity.getUserCode());
|
||||
entity.setAddTime(LocalDateTime.now());
|
||||
boolean success = playPersonnelAdminInfoService.create(entity);
|
||||
if (success) {
|
||||
return R.ok();
|
||||
}
|
||||
return R.error("添加失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改管理员管理信息
|
||||
*/
|
||||
@Log(title = "管理员管理信息", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/updateBaseInfo")
|
||||
public R updateBaseInfo(@Validated @RequestBody PlayPersonnelAdminInfoEditBaseInfoVo vo) {
|
||||
SysUserEntity sysUserEntity = sysUserService.selectUserById(vo.getSysUserId());
|
||||
PlayPersonnelAdminInfoEntity entity = ConvertUtil.entityToVo(vo, PlayPersonnelAdminInfoEntity.class);
|
||||
entity.setSysUserCode(sysUserEntity.getUserCode());
|
||||
boolean success = playPersonnelAdminInfoService.update(entity);
|
||||
if (success) {
|
||||
return R.ok();
|
||||
}
|
||||
return R.error("修改失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除管理员管理
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('play:info:remove')")
|
||||
@Log(title = "管理员管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
return R.ok(playPersonnelAdminInfoService.deletePlayPersonnelAdminInfoByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
package com.starry.admin.modules.personnel.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.starry.admin.common.exception.CustomException;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkUserInfoEntity;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkUserInfoService;
|
||||
import com.starry.admin.modules.personnel.module.entity.PlayPersonnelGroupInfoEntity;
|
||||
import com.starry.admin.modules.personnel.module.vo.PlayPersonnelGroupInfoEditAddInfoVo;
|
||||
import com.starry.admin.modules.personnel.module.vo.PlayPersonnelGroupInfoEditBaseInfoVo;
|
||||
import com.starry.admin.modules.personnel.module.vo.PlayPersonnelGroupInfoQueryVo;
|
||||
import com.starry.admin.modules.personnel.module.vo.PlayPersonnelGroupInfoReturnVo;
|
||||
import com.starry.admin.modules.personnel.service.IPlayPersonnelGroupInfoService;
|
||||
import com.starry.admin.modules.system.entity.SysUserEntity;
|
||||
import com.starry.admin.modules.system.service.SysUserService;
|
||||
import com.starry.common.annotation.Log;
|
||||
import com.starry.common.enums.BusinessType;
|
||||
import com.starry.common.result.R;
|
||||
import com.starry.common.utils.ConvertUtil;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 店员分组信息Controller
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-31
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/personnel/group")
|
||||
public class PlayPersonnelGroupInfoController {
|
||||
|
||||
@Resource
|
||||
private IPlayPersonnelGroupInfoService playClerkGroupInfoService;
|
||||
|
||||
|
||||
@Resource
|
||||
private IPlayClerkUserInfoService playClerkUserInfoService;
|
||||
|
||||
@Resource
|
||||
private SysUserService sysUserService;
|
||||
|
||||
|
||||
/**
|
||||
* 查询店员分组信息列表
|
||||
*/
|
||||
@PostMapping("/listByPage")
|
||||
public R listByPage(@Validated @RequestBody PlayPersonnelGroupInfoQueryVo vo) {
|
||||
IPage<PlayPersonnelGroupInfoReturnVo> list = playClerkGroupInfoService.selectByPage(vo);
|
||||
for (PlayPersonnelGroupInfoReturnVo record : list.getRecords()) {
|
||||
List<PlayClerkUserInfoEntity> clerkUserInfoEntities = playClerkUserInfoService.selecyByGroupId(record.getId());
|
||||
record.setTotalEmployeesNumber(clerkUserInfoEntities.size());
|
||||
record.setListingEmployeesNumber(clerkUserInfoEntities.stream().collect(Collectors.toMap(PlayClerkUserInfoEntity::getListingState, PlayClerkUserInfoEntity::getId)).size());
|
||||
}
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增店员分组信息
|
||||
*/
|
||||
@Log(title = "店员分组信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/createBaseInfo")
|
||||
public R createBaseInfo(@Validated @RequestBody PlayPersonnelGroupInfoEditAddInfoVo vo) {
|
||||
SysUserEntity sysUserEntity = sysUserService.selectUserById(vo.getSysUserId());
|
||||
PlayPersonnelGroupInfoEntity entity = ConvertUtil.entityToVo(vo, PlayPersonnelGroupInfoEntity.class);
|
||||
entity.setSysUserCode(sysUserEntity.getUserCode());
|
||||
entity.setAddTime(LocalDateTime.now());
|
||||
boolean success = playClerkGroupInfoService.create(entity);
|
||||
if (success) {
|
||||
return R.ok();
|
||||
}
|
||||
return R.error("添加失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改店员分组信息
|
||||
*/
|
||||
@Log(title = "店员分组信息", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/updateBaseInfo")
|
||||
public R updateBaseInfo(@Validated @RequestBody PlayPersonnelGroupInfoEditBaseInfoVo vo) {
|
||||
SysUserEntity sysUserEntity = sysUserService.selectUserById(vo.getSysUserId());
|
||||
PlayPersonnelGroupInfoEntity entity = ConvertUtil.entityToVo(vo, PlayPersonnelGroupInfoEntity.class);
|
||||
entity.setSysUserCode(sysUserEntity.getUserCode());
|
||||
boolean success = playClerkGroupInfoService.update(entity);
|
||||
if (success) {
|
||||
return R.ok();
|
||||
}
|
||||
return R.error("修改失败");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除店员分组信息
|
||||
*/
|
||||
@Log(title = "店员分组信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
for (String id : ids) {
|
||||
List<PlayClerkUserInfoEntity> clerkUserInfoEntities = playClerkUserInfoService.selecyByGroupId(id);
|
||||
if (!clerkUserInfoEntities.isEmpty()) {
|
||||
throw new CustomException("分组中存在店员,禁止删除");
|
||||
}
|
||||
}
|
||||
return R.ok(playClerkGroupInfoService.deletePlayClerkGroupInfoByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
package com.starry.admin.modules.personnel.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.starry.admin.modules.personnel.module.entity.PlayPersonnelWaiterInfoEntity;
|
||||
import com.starry.admin.modules.personnel.module.vo.PlayPersonnelWaiterInfoEditAddInfoVo;
|
||||
import com.starry.admin.modules.personnel.module.vo.PlayPersonnelWaiterInfoEditBaseInfoVo;
|
||||
import com.starry.admin.modules.personnel.module.vo.PlayPersonnelWaiterInfoQueryVo;
|
||||
import com.starry.admin.modules.personnel.module.vo.PlayPersonnelWaiterInfoReturnVo;
|
||||
import com.starry.admin.modules.personnel.service.IPlayPersonnelWaiterInfoService;
|
||||
import com.starry.admin.modules.system.entity.SysUserEntity;
|
||||
import com.starry.admin.modules.system.service.SysUserService;
|
||||
import com.starry.common.annotation.Log;
|
||||
import com.starry.common.enums.BusinessType;
|
||||
import com.starry.common.result.R;
|
||||
import com.starry.common.utils.ConvertUtil;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 客服信息Controller
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-06-14
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/personnel/waiter")
|
||||
public class PlayPersonnelWaiterInfoController {
|
||||
@Resource
|
||||
private IPlayPersonnelWaiterInfoService playClerkWaiterInfoService;
|
||||
|
||||
@Resource
|
||||
private SysUserService sysUserService;
|
||||
|
||||
|
||||
/**
|
||||
* 查询客服信息列表
|
||||
*/
|
||||
@PostMapping("/listByPage")
|
||||
public R listByPage(@Validated @RequestBody PlayPersonnelWaiterInfoQueryVo vo) {
|
||||
IPage<PlayPersonnelWaiterInfoReturnVo> list = playClerkWaiterInfoService.selectByPage(vo);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增客服信息列表
|
||||
*/
|
||||
@Log(title = "客服管理信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/createBaseInfo")
|
||||
public R createBaseInfo(@Validated @RequestBody PlayPersonnelWaiterInfoEditAddInfoVo vo) {
|
||||
SysUserEntity sysUserEntity = sysUserService.selectUserById(vo.getSysUserId());
|
||||
PlayPersonnelWaiterInfoEntity entity = ConvertUtil.entityToVo(vo, PlayPersonnelWaiterInfoEntity.class);
|
||||
entity.setSysUserCode(sysUserEntity.getUserCode());
|
||||
entity.setAddTime(LocalDateTime.now());
|
||||
boolean success = playClerkWaiterInfoService.create(entity);
|
||||
if (success) {
|
||||
return R.ok();
|
||||
}
|
||||
return R.error("添加失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改客服信息列表
|
||||
*/
|
||||
@Log(title = "客服管理信息", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/updateBaseInfo")
|
||||
public R updateBaseInfo(@Validated @RequestBody PlayPersonnelWaiterInfoEditBaseInfoVo vo) {
|
||||
SysUserEntity sysUserEntity = sysUserService.selectUserById(vo.getSysUserId());
|
||||
PlayPersonnelWaiterInfoEntity entity = ConvertUtil.entityToVo(vo, PlayPersonnelWaiterInfoEntity.class);
|
||||
entity.setSysUserCode(sysUserEntity.getUserCode());
|
||||
boolean success = playClerkWaiterInfoService.update(entity);
|
||||
if (success) {
|
||||
return R.ok();
|
||||
}
|
||||
return R.error("修改失败");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除客服信息
|
||||
*/
|
||||
@Log(title = "客服信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
return R.ok(playClerkWaiterInfoService.deletePlayClerkWaiterInfoByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.starry.admin.modules.personnel.mapper;
|
||||
|
||||
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import com.starry.admin.modules.personnel.module.entity.PlayPersonnelAdminInfoEntity;
|
||||
|
||||
/**
|
||||
* 管理员管理Mapper接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-06-14
|
||||
*/
|
||||
public interface PlayPersonnelAdminInfoMapper extends MPJBaseMapper<PlayPersonnelAdminInfoEntity> {
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.starry.admin.modules.personnel.mapper;
|
||||
|
||||
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import com.starry.admin.modules.personnel.module.entity.PlayPersonnelGroupInfoEntity;
|
||||
|
||||
/**
|
||||
* 店员分组信息Mapper接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-31
|
||||
*/
|
||||
public interface PlayPersonnelGroupInfoMapper extends MPJBaseMapper<PlayPersonnelGroupInfoEntity> {
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.starry.admin.modules.personnel.mapper;
|
||||
|
||||
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import com.starry.admin.modules.personnel.module.entity.PlayPersonnelWaiterInfoEntity;
|
||||
|
||||
/**
|
||||
* 客服信息Mapper接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-06-14
|
||||
*/
|
||||
public interface PlayPersonnelWaiterInfoMapper extends MPJBaseMapper<PlayPersonnelWaiterInfoEntity> {
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
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 lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 管理员管理对象 play_personnel_admin_info
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-06-14
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("play_personnel_admin_info")
|
||||
public class PlayPersonnelAdminInfoEntity extends BaseEntity<PlayPersonnelAdminInfoEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 账号ID
|
||||
*/
|
||||
private String sysUserId;
|
||||
|
||||
/**
|
||||
* 用户账号
|
||||
*/
|
||||
private String sysUserCode;
|
||||
|
||||
/**
|
||||
* 分组名称
|
||||
*/
|
||||
private String adminName;
|
||||
|
||||
/**
|
||||
* 责任人
|
||||
*/
|
||||
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;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
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 lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 店员分组信息对象 play_clerk_group_info
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-31
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("play_personnel_group_info")
|
||||
public class PlayPersonnelGroupInfoEntity extends BaseEntity<PlayPersonnelGroupInfoEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
**/
|
||||
private String sysUserId;
|
||||
|
||||
/**
|
||||
* 用户账号
|
||||
**/
|
||||
private String sysUserCode;
|
||||
|
||||
/**
|
||||
* 分组名称
|
||||
*/
|
||||
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;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
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 lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 客服信息对象 play_clerk_waiter_info
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-06-14
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("play_personnel_waiter_info")
|
||||
public class PlayPersonnelWaiterInfoEntity extends BaseEntity<PlayPersonnelWaiterInfoEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 用户账号ID
|
||||
*/
|
||||
private String sysUserId;
|
||||
|
||||
/**
|
||||
* 用户账号
|
||||
*/
|
||||
private String sysUserCode;
|
||||
|
||||
/**
|
||||
* 客服名称
|
||||
*/
|
||||
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;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.starry.admin.modules.personnel.module.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* 管理员管理信息新增
|
||||
*
|
||||
* @author 杭州世平信息科技有限公司-xuhq
|
||||
* @since 2024/6/14 14:45
|
||||
**/
|
||||
@Data
|
||||
public class PlayPersonnelAdminInfoEditAddInfoVo {
|
||||
|
||||
/**
|
||||
* 分组名称
|
||||
*/
|
||||
@NotBlank(message = "用户ID不能为空")
|
||||
private String sysUserId;
|
||||
|
||||
|
||||
/**
|
||||
* 管理员名称
|
||||
*/
|
||||
@NotBlank(message = "管理员名称不能为空")
|
||||
@Length(min = 1, max = 100, message = "字符长度在1-100之间")
|
||||
private String adminName;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.starry.admin.modules.personnel.module.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* 管理员管理信息修改
|
||||
*
|
||||
* @author 杭州世平信息科技有限公司-xuhq
|
||||
* @since 2024/6/14 14:45
|
||||
**/
|
||||
@Data
|
||||
public class PlayPersonnelAdminInfoEditBaseInfoVo {
|
||||
/**
|
||||
* UUID
|
||||
*
|
||||
* @since 2024/6/14 16:08
|
||||
**/
|
||||
@NotBlank(message = "ID不能为空")
|
||||
private String id;
|
||||
|
||||
|
||||
/**
|
||||
* 分组名称
|
||||
*/
|
||||
@NotBlank(message = "用户ID不能为空")
|
||||
private String sysUserId;
|
||||
|
||||
/**
|
||||
* 管理员名称
|
||||
*/
|
||||
@NotBlank(message = "管理员名称不能为空")
|
||||
@Length(min = 1, max = 100, message = "字符长度在1-100之间")
|
||||
private String adminName;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.starry.admin.modules.personnel.module.vo;
|
||||
|
||||
import com.starry.common.domain.BasePageEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 管理员管理信息
|
||||
*
|
||||
* @author 杭州世平信息科技有限公司-xuhq
|
||||
* @since 2024/6/14 14:45
|
||||
**/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class PlayPersonnelAdminInfoQueryVo extends BasePageEntity {
|
||||
|
||||
/**
|
||||
* 管理员名称
|
||||
*/
|
||||
private String adminName;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.starry.admin.modules.personnel.module.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 管理员管理信息
|
||||
*
|
||||
* @author 杭州世平信息科技有限公司-xuhq
|
||||
* @since 2024/6/14 14:45
|
||||
**/
|
||||
@Data
|
||||
public class PlayPersonnelAdminInfoReturnVo {
|
||||
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
**/
|
||||
private String sysUserId;
|
||||
|
||||
/**
|
||||
* 用户账号
|
||||
**/
|
||||
private String sysUserCode;
|
||||
|
||||
/**
|
||||
* 管理员名称
|
||||
*/
|
||||
@NotBlank(message = "管理员名称不能为空")
|
||||
@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;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.starry.admin.modules.personnel.module.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* 店员分组基本信息修改
|
||||
*
|
||||
* @author 杭州世平信息科技有限公司-xuhq
|
||||
* @since 2024/6/14 14:45
|
||||
**/
|
||||
@Data
|
||||
public class PlayPersonnelGroupInfoEditAddInfoVo {
|
||||
|
||||
/**
|
||||
* 分组名称
|
||||
*/
|
||||
@NotBlank(message = "用户ID不能为空")
|
||||
private String sysUserId;
|
||||
|
||||
|
||||
/**
|
||||
* 分组名称
|
||||
*/
|
||||
@NotBlank(message = "分组名称不能为空")
|
||||
@Length(min = 1, max = 100, message = "字符长度在1-100之间")
|
||||
private String groupName;
|
||||
|
||||
/**
|
||||
* 分组名称
|
||||
*/
|
||||
@NotBlank(message = "组长名称不能为空")
|
||||
@Length(min = 1, max = 100, message = "字符长度在1-100之间")
|
||||
private String leaderName;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.starry.admin.modules.personnel.module.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* 店员分组基本信息修改
|
||||
*
|
||||
* @author 杭州世平信息科技有限公司-xuhq
|
||||
* @since 2024/6/14 14:45
|
||||
**/
|
||||
@Data
|
||||
public class PlayPersonnelGroupInfoEditBaseInfoVo {
|
||||
/**
|
||||
* UUID
|
||||
*
|
||||
* @since 2024/6/14 16:08
|
||||
**/
|
||||
@NotBlank(message = "ID不能为空")
|
||||
private String id;
|
||||
|
||||
|
||||
/**
|
||||
* 分组名称
|
||||
*/
|
||||
@NotBlank(message = "用户ID不能为空")
|
||||
private String sysUserId;
|
||||
|
||||
|
||||
/**
|
||||
* 分组名称
|
||||
*/
|
||||
@NotBlank(message = "分组名称不能为空")
|
||||
@Length(min = 1, max = 100, message = "字符长度在1-100之间")
|
||||
private String groupName;
|
||||
|
||||
/**
|
||||
* 分组名称
|
||||
*/
|
||||
@NotBlank(message = "组长名称不能为空")
|
||||
@Length(min = 1, max = 100, message = "字符长度在1-100之间")
|
||||
private String leaderName;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.starry.admin.modules.personnel.module.vo;
|
||||
|
||||
import com.starry.common.domain.BasePageEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 店员分组管理信息
|
||||
*
|
||||
* @author 杭州世平信息科技有限公司-xuhq
|
||||
* @since 2024/6/14 14:45
|
||||
**/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class PlayPersonnelGroupInfoQueryVo extends BasePageEntity {
|
||||
|
||||
/**
|
||||
* 分组名称
|
||||
*/
|
||||
private String leaderName;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package com.starry.admin.modules.personnel.module.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 店员分组管理信息
|
||||
*
|
||||
* @author 杭州世平信息科技有限公司-xuhq
|
||||
* @since 2024/6/14 14:45
|
||||
**/
|
||||
@Data
|
||||
public class PlayPersonnelGroupInfoReturnVo {
|
||||
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
**/
|
||||
private String sysUserId;
|
||||
|
||||
/**
|
||||
* 用户账号
|
||||
**/
|
||||
private String sysUserCode;
|
||||
|
||||
/**
|
||||
* 分组名称
|
||||
*/
|
||||
private String groupName;
|
||||
|
||||
|
||||
/**
|
||||
* 组长名称
|
||||
**/
|
||||
private String leaderName;
|
||||
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Long sort;
|
||||
|
||||
|
||||
/**
|
||||
* 员工总数量
|
||||
**/
|
||||
private Integer totalEmployeesNumber;
|
||||
|
||||
/**
|
||||
* 上架员工数量
|
||||
**/
|
||||
private Integer listingEmployeesNumber;
|
||||
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private LocalDateTime addTime;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.starry.admin.modules.personnel.module.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* 客户基本信息修改
|
||||
*
|
||||
* @author 杭州世平信息科技有限公司-xuhq
|
||||
* @since 2024/6/14 14:45
|
||||
**/
|
||||
@Data
|
||||
public class PlayPersonnelWaiterInfoEditAddInfoVo {
|
||||
|
||||
/**
|
||||
* 分组名称
|
||||
*/
|
||||
@NotBlank(message = "用户ID不能为空")
|
||||
private String sysUserId;
|
||||
|
||||
|
||||
/**
|
||||
* 客服名称
|
||||
*/
|
||||
@NotBlank(message = "客服名称不能为空")
|
||||
@Length(min = 1, max = 100, message = "字符长度在1-100之间")
|
||||
private String waiterName;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.starry.admin.modules.personnel.module.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* 客户基本信息修改
|
||||
*
|
||||
* @author 杭州世平信息科技有限公司-xuhq
|
||||
* @since 2024/6/14 14:45
|
||||
**/
|
||||
@Data
|
||||
public class PlayPersonnelWaiterInfoEditBaseInfoVo {
|
||||
/**
|
||||
* UUID
|
||||
*
|
||||
* @since 2024/6/14 16:08
|
||||
**/
|
||||
@NotBlank(message = "ID不能为空")
|
||||
private String id;
|
||||
|
||||
|
||||
/**
|
||||
* 分组名称
|
||||
*/
|
||||
@NotBlank(message = "用户ID不能为空")
|
||||
private String sysUserId;
|
||||
|
||||
/**
|
||||
* 客服名称
|
||||
*/
|
||||
@NotBlank(message = "客服名称不能为空")
|
||||
@Length(min = 1, max = 100, message = "字符长度在1-100之间")
|
||||
private String waiterName;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.starry.admin.modules.personnel.module.vo;
|
||||
|
||||
import com.starry.common.domain.BasePageEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 客户管理信息
|
||||
*
|
||||
* @author 杭州世平信息科技有限公司-xuhq
|
||||
* @since 2024/6/14 14:45
|
||||
**/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class PlayPersonnelWaiterInfoQueryVo extends BasePageEntity {
|
||||
|
||||
/**
|
||||
* 分组名称
|
||||
*/
|
||||
private String waiterName;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.starry.admin.modules.personnel.module.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 客户管理信息
|
||||
*
|
||||
* @author 杭州世平信息科技有限公司-xuhq
|
||||
* @since 2024/6/14 14:45
|
||||
**/
|
||||
@Data
|
||||
public class PlayPersonnelWaiterInfoReturnVo {
|
||||
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
**/
|
||||
private String sysUserId;
|
||||
|
||||
/**
|
||||
* 用户账号
|
||||
**/
|
||||
private String sysUserCode;
|
||||
|
||||
/**
|
||||
* 客户名称
|
||||
*/
|
||||
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;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.starry.admin.modules.personnel.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.starry.admin.modules.personnel.module.entity.PlayPersonnelAdminInfoEntity;
|
||||
import com.starry.admin.modules.personnel.module.vo.PlayPersonnelAdminInfoQueryVo;
|
||||
import com.starry.admin.modules.personnel.module.vo.PlayPersonnelAdminInfoReturnVo;
|
||||
|
||||
/**
|
||||
* 管理员管理Service接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-06-14
|
||||
*/
|
||||
public interface IPlayPersonnelAdminInfoService extends IService<PlayPersonnelAdminInfoEntity> {
|
||||
/**
|
||||
* 查询管理员管理
|
||||
*
|
||||
* @param id 管理员管理主键
|
||||
* @return 管理员管理
|
||||
*/
|
||||
PlayPersonnelAdminInfoEntity selectPlayPersonnelAdminInfoById(String id);
|
||||
|
||||
|
||||
/**
|
||||
* 查询管理员管理列表
|
||||
*
|
||||
* @param vo 管理员管理
|
||||
* @return 管理员管理集合
|
||||
*/
|
||||
IPage<PlayPersonnelAdminInfoReturnVo> selectByPage(PlayPersonnelAdminInfoQueryVo vo);
|
||||
|
||||
/**
|
||||
* 新增管理员管理
|
||||
*
|
||||
* @param playPersonnelAdminInfo 管理员管理
|
||||
* @return 结果
|
||||
*/
|
||||
boolean create(PlayPersonnelAdminInfoEntity playPersonnelAdminInfo);
|
||||
|
||||
/**
|
||||
* 修改管理员管理
|
||||
*
|
||||
* @param playPersonnelAdminInfo 管理员管理
|
||||
* @return 结果
|
||||
*/
|
||||
boolean update(PlayPersonnelAdminInfoEntity playPersonnelAdminInfo);
|
||||
|
||||
/**
|
||||
* 批量删除管理员管理
|
||||
*
|
||||
* @param ids 需要删除的管理员管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayPersonnelAdminInfoByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除管理员管理信息
|
||||
*
|
||||
* @param id 管理员管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayPersonnelAdminInfoById(String id);
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.starry.admin.modules.personnel.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 店员分组信息Service接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-31
|
||||
*/
|
||||
public interface IPlayPersonnelGroupInfoService extends IService<PlayPersonnelGroupInfoEntity> {
|
||||
/**
|
||||
* 查询店员分组信息
|
||||
*
|
||||
* @param id 店员分组信息主键
|
||||
* @return 店员分组信息
|
||||
*/
|
||||
PlayPersonnelGroupInfoEntity selectPlayClerkGroupInfoById(String id);
|
||||
|
||||
/**
|
||||
* 分页查询店员分组信息列表
|
||||
*
|
||||
* @param vo 查询店员分组信息查询对象
|
||||
* @return PlayPersonnelGroupInfoReturnVo
|
||||
* @author 杭州世平信息科技有限公司-xuhq
|
||||
* @since 2024/6/14 15:46
|
||||
**/
|
||||
IPage<PlayPersonnelGroupInfoReturnVo> selectByPage(PlayPersonnelGroupInfoQueryVo vo);
|
||||
|
||||
/**
|
||||
* 新增店员分组信息
|
||||
*
|
||||
* @param playClerkGroupInfo 店员分组信息
|
||||
* @return 结果
|
||||
*/
|
||||
boolean create(PlayPersonnelGroupInfoEntity playClerkGroupInfo);
|
||||
|
||||
/**
|
||||
* 修改店员分组信息
|
||||
*
|
||||
* @param playClerkGroupInfo 店员分组信息
|
||||
* @return 结果
|
||||
*/
|
||||
boolean update(PlayPersonnelGroupInfoEntity playClerkGroupInfo);
|
||||
|
||||
/**
|
||||
* 批量删除店员分组信息
|
||||
*
|
||||
* @param ids 需要删除的店员分组信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayClerkGroupInfoByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除店员分组信息信息
|
||||
*
|
||||
* @param id 店员分组信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayClerkGroupInfoById(String id);
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.starry.admin.modules.personnel.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.starry.admin.modules.personnel.module.entity.PlayPersonnelWaiterInfoEntity;
|
||||
import com.starry.admin.modules.personnel.module.vo.PlayPersonnelWaiterInfoQueryVo;
|
||||
import com.starry.admin.modules.personnel.module.vo.PlayPersonnelWaiterInfoReturnVo;
|
||||
|
||||
/**
|
||||
* 客服信息Service接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-06-14
|
||||
*/
|
||||
public interface IPlayPersonnelWaiterInfoService extends IService<PlayPersonnelWaiterInfoEntity> {
|
||||
/**
|
||||
* 查询客服信息
|
||||
*
|
||||
* @param id 客服信息主键
|
||||
* @return 客服信息
|
||||
*/
|
||||
PlayPersonnelWaiterInfoEntity selectPlayClerkWaiterInfoById(String id);
|
||||
|
||||
|
||||
/**
|
||||
* 查询客服信息列表
|
||||
*
|
||||
* @param vo 客服信息
|
||||
* @return 客服信息集合
|
||||
*/
|
||||
IPage<PlayPersonnelWaiterInfoReturnVo> selectByPage(PlayPersonnelWaiterInfoQueryVo vo);
|
||||
|
||||
/**
|
||||
* 新增客服信息
|
||||
*
|
||||
* @param playClerkWaiterInfo 客服信息
|
||||
* @return 结果
|
||||
*/
|
||||
boolean create(PlayPersonnelWaiterInfoEntity playClerkWaiterInfo);
|
||||
|
||||
/**
|
||||
* 修改客服信息
|
||||
*
|
||||
* @param playClerkWaiterInfo 客服信息
|
||||
* @return 结果
|
||||
*/
|
||||
boolean update(PlayPersonnelWaiterInfoEntity playClerkWaiterInfo);
|
||||
|
||||
/**
|
||||
* 批量删除客服信息
|
||||
*
|
||||
* @param ids 需要删除的客服信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayClerkWaiterInfoByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除客服信息信息
|
||||
*
|
||||
* @param id 客服信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayClerkWaiterInfoById(String id);
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
package com.starry.admin.modules.personnel.service.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
import com.starry.admin.modules.personnel.mapper.PlayPersonnelAdminInfoMapper;
|
||||
import com.starry.admin.modules.personnel.module.entity.PlayPersonnelAdminInfoEntity;
|
||||
import com.starry.admin.modules.personnel.module.vo.PlayPersonnelAdminInfoQueryVo;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 管理员管理Service业务层处理
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-06-14
|
||||
*/
|
||||
@Service
|
||||
public class PlayPersonnelAdminInfoServiceImpl extends ServiceImpl<PlayPersonnelAdminInfoMapper, PlayPersonnelAdminInfoEntity> implements IPlayPersonnelAdminInfoService {
|
||||
@Resource
|
||||
private PlayPersonnelAdminInfoMapper playPersonnelAdminInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询管理员管理
|
||||
*
|
||||
* @param id 管理员管理主键
|
||||
* @return 管理员管理
|
||||
*/
|
||||
@Override
|
||||
public PlayPersonnelAdminInfoEntity selectPlayPersonnelAdminInfoById(String id) {
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增管理员管理
|
||||
*
|
||||
* @param playPersonnelAdminInfo 管理员管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean create(PlayPersonnelAdminInfoEntity playPersonnelAdminInfo) {
|
||||
if (StrUtil.isBlankIfStr(playPersonnelAdminInfo.getId())) {
|
||||
playPersonnelAdminInfo.setId(IdUtils.getUuid());
|
||||
}
|
||||
return save(playPersonnelAdminInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改管理员管理
|
||||
*
|
||||
* @param playPersonnelAdminInfo 管理员管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean update(PlayPersonnelAdminInfoEntity playPersonnelAdminInfo) {
|
||||
return updateById(playPersonnelAdminInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除管理员管理
|
||||
*
|
||||
* @param ids 需要删除的管理员管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePlayPersonnelAdminInfoByIds(String[] ids) {
|
||||
return playPersonnelAdminInfoMapper.deleteBatchIds(Arrays.asList(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除管理员管理信息
|
||||
*
|
||||
* @param id 管理员管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePlayPersonnelAdminInfoById(String id) {
|
||||
return playPersonnelAdminInfoMapper.deleteById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
package com.starry.admin.modules.personnel.service.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
import com.starry.admin.modules.personnel.mapper.PlayPersonnelGroupInfoMapper;
|
||||
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 com.starry.admin.modules.personnel.service.IPlayPersonnelGroupInfoService;
|
||||
import com.starry.common.utils.IdUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 店员分组信息Service业务层处理
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-31
|
||||
*/
|
||||
@Service
|
||||
public class PlayPersonnelGroupInfoServiceImpl extends ServiceImpl<PlayPersonnelGroupInfoMapper, PlayPersonnelGroupInfoEntity> implements IPlayPersonnelGroupInfoService {
|
||||
@Resource
|
||||
private PlayPersonnelGroupInfoMapper playClerkGroupInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询店员分组信息
|
||||
*
|
||||
* @param id 店员分组信息主键
|
||||
* @return 店员分组信息
|
||||
*/
|
||||
@Override
|
||||
public PlayPersonnelGroupInfoEntity selectPlayClerkGroupInfoById(String id) {
|
||||
return this.baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IPage<PlayPersonnelGroupInfoReturnVo> selectByPage(PlayPersonnelGroupInfoQueryVo vo) {
|
||||
MPJLambdaWrapper<PlayPersonnelGroupInfoEntity> lambdaQueryWrapper = new MPJLambdaWrapper<>();
|
||||
if (StrUtil.isNotBlank(vo.getLeaderName())) {
|
||||
lambdaQueryWrapper.eq(PlayPersonnelGroupInfoEntity::getLeaderName, vo.getLeaderName());
|
||||
}
|
||||
return this.baseMapper.selectJoinPage(new Page<>(vo.getPageNum(), vo.getPageSize()), PlayPersonnelGroupInfoReturnVo.class, lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增店员分组信息
|
||||
*
|
||||
* @param playClerkGroupInfo 店员分组信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean create(PlayPersonnelGroupInfoEntity playClerkGroupInfo) {
|
||||
if (StrUtil.isBlankIfStr(playClerkGroupInfo.getId())) {
|
||||
playClerkGroupInfo.setId(IdUtils.getUuid());
|
||||
}
|
||||
return save(playClerkGroupInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改店员分组信息
|
||||
*
|
||||
* @param playClerkGroupInfo 店员分组信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean update(PlayPersonnelGroupInfoEntity playClerkGroupInfo) {
|
||||
return updateById(playClerkGroupInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除店员分组信息
|
||||
*
|
||||
* @param ids 需要删除的店员分组信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePlayClerkGroupInfoByIds(String[] ids) {
|
||||
return playClerkGroupInfoMapper.deleteBatchIds(Arrays.asList(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除店员分组信息信息
|
||||
*
|
||||
* @param id 店员分组信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePlayClerkGroupInfoById(String id) {
|
||||
return playClerkGroupInfoMapper.deleteById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
package com.starry.admin.modules.personnel.service.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
import com.starry.admin.modules.personnel.mapper.PlayPersonnelWaiterInfoMapper;
|
||||
import com.starry.admin.modules.personnel.module.entity.PlayPersonnelWaiterInfoEntity;
|
||||
import com.starry.admin.modules.personnel.module.vo.PlayPersonnelWaiterInfoQueryVo;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 客服信息Service业务层处理
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-06-14
|
||||
*/
|
||||
@Service
|
||||
public class PlayPersonnelWaiterInfoServiceImpl extends ServiceImpl<PlayPersonnelWaiterInfoMapper, PlayPersonnelWaiterInfoEntity> implements IPlayPersonnelWaiterInfoService {
|
||||
@Resource
|
||||
private PlayPersonnelWaiterInfoMapper playClerkWaiterInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询客服信息
|
||||
*
|
||||
* @param id 客服信息主键
|
||||
* @return 客服信息
|
||||
*/
|
||||
@Override
|
||||
public PlayPersonnelWaiterInfoEntity selectPlayClerkWaiterInfoById(String id) {
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增客服信息
|
||||
*
|
||||
* @param playClerkWaiterInfo 客服信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean create(PlayPersonnelWaiterInfoEntity playClerkWaiterInfo) {
|
||||
if (StrUtil.isBlankIfStr(playClerkWaiterInfo.getId())) {
|
||||
playClerkWaiterInfo.setId(IdUtils.getUuid());
|
||||
}
|
||||
return save(playClerkWaiterInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改客服信息
|
||||
*
|
||||
* @param playClerkWaiterInfo 客服信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean update(PlayPersonnelWaiterInfoEntity playClerkWaiterInfo) {
|
||||
return updateById(playClerkWaiterInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除客服信息
|
||||
*
|
||||
* @param ids 需要删除的客服信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePlayClerkWaiterInfoByIds(String[] ids) {
|
||||
return playClerkWaiterInfoMapper.deleteBatchIds(Arrays.asList(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除客服信息信息
|
||||
*
|
||||
* @param id 客服信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePlayClerkWaiterInfoById(String id) {
|
||||
return playClerkWaiterInfoMapper.deleteById(id);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user