组长、客服、管理员
This commit is contained in:
@@ -1,77 +0,0 @@
|
||||
package com.starry.admin.modules.clerk.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkGroupUserInfoEntity;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkGroupUserInfoService;
|
||||
import com.starry.common.annotation.Log;
|
||||
import com.starry.common.enums.BusinessType;
|
||||
import com.starry.common.result.R;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 店员和分组关系Controller
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-31
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/group/clerk")
|
||||
public class PlayClerkGroupUserInfoController {
|
||||
@Resource
|
||||
private IPlayClerkGroupUserInfoService playClerkGroupUserInfoService;
|
||||
|
||||
/**
|
||||
* 查询店员和分组关系列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public R list(PlayClerkGroupUserInfoEntity playClerkGroupUserInfo) {
|
||||
IPage<PlayClerkGroupUserInfoEntity> list = playClerkGroupUserInfoService.selectPlayClerkGroupUserInfoByPage(playClerkGroupUserInfo);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取店员和分组关系详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{id}")
|
||||
public R getInfo(@PathVariable("id") String id) {
|
||||
return R.ok(playClerkGroupUserInfoService.selectPlayClerkGroupUserInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增店员和分组关系
|
||||
*/
|
||||
@Log(title = "店员和分组关系", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/create")
|
||||
public R create(@RequestBody PlayClerkGroupUserInfoEntity playClerkGroupUserInfo) {
|
||||
boolean success = playClerkGroupUserInfoService.create(playClerkGroupUserInfo);
|
||||
if (success) {
|
||||
return R.ok();
|
||||
}
|
||||
return R.error("添加失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改店员和分组关系
|
||||
*/
|
||||
@Log(title = "店员和分组关系", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/update/{id}")
|
||||
public R update(@PathVariable String id, @RequestBody PlayClerkGroupUserInfoEntity playClerkGroupUserInfo) {
|
||||
playClerkGroupUserInfo.setId(id);
|
||||
boolean success = playClerkGroupUserInfoService.update(playClerkGroupUserInfo);
|
||||
if (success) {
|
||||
return R.ok();
|
||||
}
|
||||
return R.error("修改失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除店员和分组关系
|
||||
*/
|
||||
@Log(title = "店员和分组关系", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
return R.ok(playClerkGroupUserInfoService.deletePlayClerkGroupUserInfoByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package com.starry.admin.modules.clerk.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkGroupInfoEntity;
|
||||
|
||||
/**
|
||||
* 店员分组信息Mapper接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-31
|
||||
*/
|
||||
public interface PlayClerkGroupInfoMapper extends MPJBaseMapper<PlayClerkGroupInfoEntity> {
|
||||
|
||||
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package com.starry.admin.modules.clerk.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkGroupUserInfoEntity;
|
||||
|
||||
/**
|
||||
* 店员和分组关系Mapper接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-31
|
||||
*/
|
||||
public interface PlayClerkGroupUserInfoMapper extends BaseMapper<PlayClerkGroupUserInfoEntity> {
|
||||
|
||||
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
package com.starry.admin.modules.clerk.module.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.starry.common.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 店员和分组关系对象 play_clerk_group_user_info
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-31
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("play_clerk_group_user_info")
|
||||
public class PlayClerkGroupUserInfoEntity extends BaseEntity<PlayClerkGroupUserInfoEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 分组ID
|
||||
*/
|
||||
private String groupId;
|
||||
|
||||
/**
|
||||
* 店员ID
|
||||
*/
|
||||
private String clerkId;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 创建人的id
|
||||
*/
|
||||
private String createdBy;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
package com.starry.admin.modules.clerk.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkGroupUserInfoEntity;
|
||||
|
||||
/**
|
||||
* 店员和分组关系Service接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-31
|
||||
*/
|
||||
public interface IPlayClerkGroupUserInfoService extends IService<PlayClerkGroupUserInfoEntity> {
|
||||
/**
|
||||
* 查询店员和分组关系
|
||||
*
|
||||
* @param id 店员和分组关系主键
|
||||
* @return 店员和分组关系
|
||||
*/
|
||||
PlayClerkGroupUserInfoEntity selectPlayClerkGroupUserInfoById(String id);
|
||||
|
||||
/**
|
||||
* 查询店员和分组关系列表
|
||||
*
|
||||
* @param playClerkGroupUserInfo 店员和分组关系
|
||||
* @return 店员和分组关系集合
|
||||
*/
|
||||
IPage<PlayClerkGroupUserInfoEntity> selectPlayClerkGroupUserInfoByPage(PlayClerkGroupUserInfoEntity playClerkGroupUserInfo);
|
||||
|
||||
/**
|
||||
* 新增店员和分组关系
|
||||
*
|
||||
* @param playClerkGroupUserInfo 店员和分组关系
|
||||
* @return 结果
|
||||
*/
|
||||
boolean create(PlayClerkGroupUserInfoEntity playClerkGroupUserInfo);
|
||||
|
||||
/**
|
||||
* 修改店员和分组关系
|
||||
*
|
||||
* @param playClerkGroupUserInfo 店员和分组关系
|
||||
* @return 结果
|
||||
*/
|
||||
boolean update(PlayClerkGroupUserInfoEntity playClerkGroupUserInfo);
|
||||
|
||||
/**
|
||||
* 批量删除店员和分组关系
|
||||
*
|
||||
* @param ids 需要删除的店员和分组关系主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayClerkGroupUserInfoByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除店员和分组关系信息
|
||||
*
|
||||
* @param id 店员和分组关系主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayClerkGroupUserInfoById(String id);
|
||||
}
|
||||
@@ -1,117 +0,0 @@
|
||||
package com.starry.admin.modules.clerk.service.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
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.clerk.mapper.PlayClerkGroupInfoMapper;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkGroupInfoEntity;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkUserInfoEntity;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkGroupInfoQueryVo;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkGroupInfoReturnVo;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkGroupInfoService;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkUserInfoService;
|
||||
import com.starry.common.utils.IdUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 店员分组信息Service业务层处理
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-31
|
||||
*/
|
||||
@Service
|
||||
public class PlayClerkGroupInfoServiceImpl extends ServiceImpl<PlayClerkGroupInfoMapper, PlayClerkGroupInfoEntity> implements IPlayClerkGroupInfoService {
|
||||
@Resource
|
||||
private PlayClerkGroupInfoMapper playClerkGroupInfoMapper;
|
||||
|
||||
@Resource
|
||||
private IPlayClerkUserInfoService playClerkUserInfoService;
|
||||
|
||||
/**
|
||||
* 查询店员分组信息
|
||||
*
|
||||
* @param id 店员分组信息主键
|
||||
* @return 店员分组信息
|
||||
*/
|
||||
@Override
|
||||
public PlayClerkGroupInfoEntity selectPlayClerkGroupInfoById(String id) {
|
||||
return this.baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IPage<PlayClerkGroupInfoReturnVo> selectByPage(PlayClerkGroupInfoQueryVo vo) {
|
||||
MPJLambdaWrapper<PlayClerkGroupInfoEntity> lambdaQueryWrapper = new MPJLambdaWrapper<>();
|
||||
if (StrUtil.isNotBlank(vo.getGroupName())) {
|
||||
lambdaQueryWrapper.eq(PlayClerkGroupInfoEntity::getGroupName, vo.getGroupName());
|
||||
}
|
||||
return this.baseMapper.selectJoinPage(new Page<>(vo.getPageNum(), vo.getPageSize()), PlayClerkGroupInfoReturnVo.class, lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询店员分组信息列表
|
||||
*
|
||||
* @param playClerkGroupInfo 店员分组信息
|
||||
* @return 店员分组信息
|
||||
*/
|
||||
@Override
|
||||
public IPage<PlayClerkGroupInfoEntity> selectPlayClerkGroupInfoByPage(PlayClerkGroupInfoEntity playClerkGroupInfo) {
|
||||
Page<PlayClerkGroupInfoEntity> page = new Page<>(1, 10);
|
||||
return this.baseMapper.selectPage(page, new LambdaQueryWrapper<PlayClerkGroupInfoEntity>());
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增店员分组信息
|
||||
*
|
||||
* @param playClerkGroupInfo 店员分组信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean create(PlayClerkGroupInfoEntity playClerkGroupInfo) {
|
||||
if (StrUtil.isBlankIfStr(playClerkGroupInfo.getId())) {
|
||||
playClerkGroupInfo.setId(IdUtils.getUuid());
|
||||
}
|
||||
return save(playClerkGroupInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改店员分组信息
|
||||
*
|
||||
* @param playClerkGroupInfo 店员分组信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean update(PlayClerkGroupInfoEntity 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);
|
||||
}
|
||||
}
|
||||
@@ -1,97 +0,0 @@
|
||||
package com.starry.admin.modules.clerk.service.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
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.starry.admin.modules.clerk.mapper.PlayClerkGroupUserInfoMapper;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkGroupUserInfoEntity;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkGroupUserInfoService;
|
||||
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 PlayClerkGroupUserInfoServiceImpl extends ServiceImpl<PlayClerkGroupUserInfoMapper, PlayClerkGroupUserInfoEntity> implements IPlayClerkGroupUserInfoService {
|
||||
@Resource
|
||||
private PlayClerkGroupUserInfoMapper playClerkGroupUserInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询店员和分组关系
|
||||
*
|
||||
* @param id 店员和分组关系主键
|
||||
* @return 店员和分组关系
|
||||
*/
|
||||
@Override
|
||||
public PlayClerkGroupUserInfoEntity selectPlayClerkGroupUserInfoById(String id) {
|
||||
return this.baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询店员和分组关系列表
|
||||
*
|
||||
* @param playClerkGroupUserInfo 店员和分组关系
|
||||
* @return 店员和分组关系
|
||||
*/
|
||||
@Override
|
||||
public IPage<PlayClerkGroupUserInfoEntity> selectPlayClerkGroupUserInfoByPage(PlayClerkGroupUserInfoEntity playClerkGroupUserInfo) {
|
||||
Page<PlayClerkGroupUserInfoEntity> page = new Page<>(1, 10);
|
||||
return this.baseMapper.selectPage(page, new LambdaQueryWrapper<PlayClerkGroupUserInfoEntity>());
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增店员和分组关系
|
||||
*
|
||||
* @param playClerkGroupUserInfo 店员和分组关系
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean create(PlayClerkGroupUserInfoEntity playClerkGroupUserInfo) {
|
||||
if (StrUtil.isBlankIfStr(playClerkGroupUserInfo.getId())) {
|
||||
playClerkGroupUserInfo.setId(IdUtils.getUuid());
|
||||
}
|
||||
return save(playClerkGroupUserInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改店员和分组关系
|
||||
*
|
||||
* @param playClerkGroupUserInfo 店员和分组关系
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean update(PlayClerkGroupUserInfoEntity playClerkGroupUserInfo) {
|
||||
return updateById(playClerkGroupUserInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除店员和分组关系
|
||||
*
|
||||
* @param ids 需要删除的店员和分组关系主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePlayClerkGroupUserInfoByIds(String[] ids) {
|
||||
return playClerkGroupUserInfoMapper.deleteBatchIds(Arrays.asList(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除店员和分组关系信息
|
||||
*
|
||||
* @param id 店员和分组关系主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePlayClerkGroupUserInfoById(String id) {
|
||||
return playClerkGroupUserInfoMapper.deleteById(id);
|
||||
}
|
||||
}
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
@@ -1,15 +1,15 @@
|
||||
package com.starry.admin.modules.clerk.controller;
|
||||
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.PlayClerkGroupInfoEntity;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkUserInfoEntity;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkGroupInfoEditAddInfoVo;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkGroupInfoEditBaseInfoVo;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkGroupInfoQueryVo;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkGroupInfoReturnVo;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkGroupInfoService;
|
||||
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;
|
||||
@@ -20,6 +20,7 @@ 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;
|
||||
|
||||
@@ -30,11 +31,11 @@ import java.util.stream.Collectors;
|
||||
* @since 2024-05-31
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/clerk/group")
|
||||
public class PlayClerkGroupInfoController {
|
||||
@RequestMapping("/personnel/group")
|
||||
public class PlayPersonnelGroupInfoController {
|
||||
|
||||
@Resource
|
||||
private IPlayClerkGroupInfoService playClerkGroupInfoService;
|
||||
private IPlayPersonnelGroupInfoService playClerkGroupInfoService;
|
||||
|
||||
|
||||
@Resource
|
||||
@@ -48,9 +49,9 @@ public class PlayClerkGroupInfoController {
|
||||
* 查询店员分组信息列表
|
||||
*/
|
||||
@PostMapping("/listByPage")
|
||||
public R listByPage(@Validated @RequestBody PlayClerkGroupInfoQueryVo vo) {
|
||||
IPage<PlayClerkGroupInfoReturnVo> list = playClerkGroupInfoService.selectByPage(vo);
|
||||
for (PlayClerkGroupInfoReturnVo record : list.getRecords()) {
|
||||
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());
|
||||
@@ -64,10 +65,11 @@ public class PlayClerkGroupInfoController {
|
||||
*/
|
||||
@Log(title = "店员分组信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/createBaseInfo")
|
||||
public R createBaseInfo(@Validated @RequestBody PlayClerkGroupInfoEditAddInfoVo vo) {
|
||||
public R createBaseInfo(@Validated @RequestBody PlayPersonnelGroupInfoEditAddInfoVo vo) {
|
||||
SysUserEntity sysUserEntity = sysUserService.selectUserById(vo.getSysUserId());
|
||||
PlayClerkGroupInfoEntity entity = ConvertUtil.entityToVo(vo, PlayClerkGroupInfoEntity.class);
|
||||
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();
|
||||
@@ -80,9 +82,9 @@ public class PlayClerkGroupInfoController {
|
||||
*/
|
||||
@Log(title = "店员分组信息", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/updateBaseInfo")
|
||||
public R updateBaseInfo(@Validated @RequestBody PlayClerkGroupInfoEditBaseInfoVo vo) {
|
||||
public R updateBaseInfo(@Validated @RequestBody PlayPersonnelGroupInfoEditBaseInfoVo vo) {
|
||||
SysUserEntity sysUserEntity = sysUserService.selectUserById(vo.getSysUserId());
|
||||
PlayClerkGroupInfoEntity entity = ConvertUtil.entityToVo(vo, PlayClerkGroupInfoEntity.class);
|
||||
PlayPersonnelGroupInfoEntity entity = ConvertUtil.entityToVo(vo, PlayPersonnelGroupInfoEntity.class);
|
||||
entity.setSysUserCode(sysUserEntity.getUserCode());
|
||||
boolean success = playClerkGroupInfoService.update(entity);
|
||||
if (success) {
|
||||
@@ -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;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,9 +1,13 @@
|
||||
package com.starry.admin.modules.clerk.module.entity;
|
||||
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
|
||||
@@ -13,8 +17,8 @@ import lombok.EqualsAndHashCode;
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("play_clerk_group_info")
|
||||
public class PlayClerkGroupInfoEntity extends BaseEntity<PlayClerkGroupInfoEntity> {
|
||||
@TableName("play_personnel_group_info")
|
||||
public class PlayPersonnelGroupInfoEntity extends BaseEntity<PlayPersonnelGroupInfoEntity> {
|
||||
|
||||
|
||||
/**
|
||||
@@ -50,10 +54,9 @@ public class PlayClerkGroupInfoEntity extends BaseEntity<PlayClerkGroupInfoEntit
|
||||
private String leaderName;
|
||||
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Long sort;
|
||||
@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;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.starry.admin.modules.clerk.module.vo;
|
||||
package com.starry.admin.modules.personnel.module.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
@@ -12,7 +12,7 @@ import javax.validation.constraints.NotBlank;
|
||||
* @since 2024/6/14 14:45
|
||||
**/
|
||||
@Data
|
||||
public class PlayClerkGroupInfoEditAddInfoVo {
|
||||
public class PlayPersonnelGroupInfoEditAddInfoVo {
|
||||
|
||||
/**
|
||||
* 分组名称
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.starry.admin.modules.clerk.module.vo;
|
||||
package com.starry.admin.modules.personnel.module.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
@@ -12,7 +12,7 @@ import javax.validation.constraints.NotBlank;
|
||||
* @since 2024/6/14 14:45
|
||||
**/
|
||||
@Data
|
||||
public class PlayClerkGroupInfoEditBaseInfoVo {
|
||||
public class PlayPersonnelGroupInfoEditBaseInfoVo {
|
||||
/**
|
||||
* UUID
|
||||
*
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.starry.admin.modules.clerk.module.vo;
|
||||
package com.starry.admin.modules.personnel.module.vo;
|
||||
|
||||
import com.starry.common.domain.BasePageEntity;
|
||||
import lombok.Data;
|
||||
@@ -12,12 +12,12 @@ import lombok.EqualsAndHashCode;
|
||||
**/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class PlayClerkGroupInfoQueryVo extends BasePageEntity {
|
||||
public class PlayPersonnelGroupInfoQueryVo extends BasePageEntity {
|
||||
|
||||
/**
|
||||
* 分组名称
|
||||
*/
|
||||
private String groupName;
|
||||
private String leaderName;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,6 +1,10 @@
|
||||
package com.starry.admin.modules.clerk.module.vo;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 店员分组管理信息
|
||||
@@ -9,7 +13,7 @@ import lombok.Data;
|
||||
* @since 2024/6/14 14:45
|
||||
**/
|
||||
@Data
|
||||
public class PlayClerkGroupInfoReturnVo {
|
||||
public class PlayPersonnelGroupInfoReturnVo {
|
||||
|
||||
|
||||
/**
|
||||
@@ -31,7 +35,7 @@ public class PlayClerkGroupInfoReturnVo {
|
||||
/**
|
||||
* 用户账号
|
||||
**/
|
||||
private String userCode;
|
||||
private String sysUserCode;
|
||||
|
||||
/**
|
||||
* 分组名称
|
||||
@@ -62,4 +66,9 @@ public class PlayClerkGroupInfoReturnVo {
|
||||
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);
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
package com.starry.admin.modules.clerk.service;
|
||||
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.clerk.module.entity.PlayClerkGroupInfoEntity;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkGroupInfoQueryVo;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkGroupInfoReturnVo;
|
||||
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接口
|
||||
@@ -12,32 +12,24 @@ import com.starry.admin.modules.clerk.module.vo.PlayClerkGroupInfoReturnVo;
|
||||
* @author admin
|
||||
* @since 2024-05-31
|
||||
*/
|
||||
public interface IPlayClerkGroupInfoService extends IService<PlayClerkGroupInfoEntity> {
|
||||
public interface IPlayPersonnelGroupInfoService extends IService<PlayPersonnelGroupInfoEntity> {
|
||||
/**
|
||||
* 查询店员分组信息
|
||||
*
|
||||
* @param id 店员分组信息主键
|
||||
* @return 店员分组信息
|
||||
*/
|
||||
PlayClerkGroupInfoEntity selectPlayClerkGroupInfoById(String id);
|
||||
|
||||
/**
|
||||
* 查询店员分组信息列表
|
||||
*
|
||||
* @param playClerkGroupInfo 店员分组信息
|
||||
* @return 店员分组信息集合
|
||||
*/
|
||||
IPage<PlayClerkGroupInfoEntity> selectPlayClerkGroupInfoByPage(PlayClerkGroupInfoEntity playClerkGroupInfo);
|
||||
PlayPersonnelGroupInfoEntity selectPlayClerkGroupInfoById(String id);
|
||||
|
||||
/**
|
||||
* 分页查询店员分组信息列表
|
||||
*
|
||||
* @param vo 查询店员分组信息查询对象
|
||||
* @return com.baomidou.mybatisplus.core.metadata.IPage<com.starry.admin.modules.clerk.module.entity.PlayClerkGroupInfoEntity>
|
||||
* @return PlayPersonnelGroupInfoReturnVo
|
||||
* @author 杭州世平信息科技有限公司-xuhq
|
||||
* @since 2024/6/14 15:46
|
||||
**/
|
||||
IPage<PlayClerkGroupInfoReturnVo> selectByPage(PlayClerkGroupInfoQueryVo vo);
|
||||
IPage<PlayPersonnelGroupInfoReturnVo> selectByPage(PlayPersonnelGroupInfoQueryVo vo);
|
||||
|
||||
/**
|
||||
* 新增店员分组信息
|
||||
@@ -45,7 +37,7 @@ public interface IPlayClerkGroupInfoService extends IService<PlayClerkGroupInfoE
|
||||
* @param playClerkGroupInfo 店员分组信息
|
||||
* @return 结果
|
||||
*/
|
||||
boolean create(PlayClerkGroupInfoEntity playClerkGroupInfo);
|
||||
boolean create(PlayPersonnelGroupInfoEntity playClerkGroupInfo);
|
||||
|
||||
/**
|
||||
* 修改店员分组信息
|
||||
@@ -53,7 +45,7 @@ public interface IPlayClerkGroupInfoService extends IService<PlayClerkGroupInfoE
|
||||
* @param playClerkGroupInfo 店员分组信息
|
||||
* @return 结果
|
||||
*/
|
||||
boolean update(PlayClerkGroupInfoEntity playClerkGroupInfo);
|
||||
boolean update(PlayPersonnelGroupInfoEntity playClerkGroupInfo);
|
||||
|
||||
/**
|
||||
* 批量删除店员分组信息
|
||||
@@ -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