订单
This commit is contained in:
@@ -0,0 +1,88 @@
|
||||
package com.starry.admin.modules.clerk.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkClassificationInfoEntity;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkClassificationInfoService;
|
||||
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;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 店员分类Controller
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-04-06
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/clerk/class")
|
||||
public class PlayClerkClassificationInfoController {
|
||||
@Resource
|
||||
private IPlayClerkClassificationInfoService playClerkClassificationInfoService;
|
||||
|
||||
/**
|
||||
* 查询店员分类列表
|
||||
*/
|
||||
@GetMapping("/listAll")
|
||||
public R listAll() {
|
||||
List<PlayClerkClassificationInfoEntity> list = playClerkClassificationInfoService.selectAll();
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询店员分类列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public R list(PlayClerkClassificationInfoEntity playClerkClassificationInfo) {
|
||||
IPage<PlayClerkClassificationInfoEntity> list = playClerkClassificationInfoService.selectPlayClerkClassificationInfoByPage(playClerkClassificationInfo);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取店员分类详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{id}")
|
||||
public R getInfo(@PathVariable("id") String id) {
|
||||
return R.ok(playClerkClassificationInfoService.selectPlayClerkClassificationInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增店员分类
|
||||
*/
|
||||
@Log(title = "店员分类", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/create")
|
||||
public R create(@RequestBody PlayClerkClassificationInfoEntity playClerkClassificationInfo) {
|
||||
boolean success = playClerkClassificationInfoService.create(playClerkClassificationInfo);
|
||||
if (success) {
|
||||
return R.ok();
|
||||
}
|
||||
return R.error("添加失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改店员分类
|
||||
*/
|
||||
@Log(title = "店员分类", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/update/{id}")
|
||||
public R update(@PathVariable String id, @RequestBody PlayClerkClassificationInfoEntity playClerkClassificationInfo) {
|
||||
playClerkClassificationInfo.setId(id);
|
||||
boolean success = playClerkClassificationInfoService.update(playClerkClassificationInfo);
|
||||
if (success) {
|
||||
return R.ok();
|
||||
}
|
||||
return R.error("修改失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除店员分类
|
||||
*/
|
||||
@Log(title = "店员分类", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
return R.ok(playClerkClassificationInfoService.deletePlayClerkClassificationInfoByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
package com.starry.admin.modules.clerk.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkCommodityEntity;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkCommodityQueryVo;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkCommodityService;
|
||||
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.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 陪聊服务项目Controller
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-03-31
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/clerk/commodity")
|
||||
public class PlayClerkCommodityController {
|
||||
@Resource
|
||||
private IPlayClerkCommodityService playClerkCommodityService;
|
||||
|
||||
/**
|
||||
* 查询陪聊服务项目列表
|
||||
*/
|
||||
@GetMapping("/listAllCommodity")
|
||||
public R listAllCommodity() {
|
||||
List<PlayClerkCommodityEntity> list = playClerkCommodityService.selectAll();
|
||||
return R.ok(ConvertUtil.entityToVoList(list, PlayClerkCommodityQueryVo.class));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询陪聊服务项目列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public R list(PlayClerkCommodityEntity playClerkCommodity) {
|
||||
IPage<PlayClerkCommodityEntity> list = playClerkCommodityService.selectPlayClerkCommodityByPage(playClerkCommodity);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取陪聊服务项目详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{id}")
|
||||
public R getInfo(@PathVariable("id") String id) {
|
||||
return R.ok(playClerkCommodityService.selectPlayClerkCommodityById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增陪聊服务项目
|
||||
*/
|
||||
@Log(title = "陪聊服务项目", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/create")
|
||||
public R create(@RequestBody PlayClerkCommodityEntity playClerkCommodity) {
|
||||
boolean success = playClerkCommodityService.create(playClerkCommodity);
|
||||
if (success) {
|
||||
return R.ok();
|
||||
}
|
||||
return R.error("添加失败");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 修改陪聊服务项目
|
||||
*/
|
||||
@Log(title = "陪聊服务项目", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/update/{id}")
|
||||
public R update(@PathVariable String id, @RequestBody PlayClerkCommodityEntity playClerkCommodity) {
|
||||
playClerkCommodity.setId(id);
|
||||
boolean success = playClerkCommodityService.update(playClerkCommodity);
|
||||
if (success) {
|
||||
return R.ok();
|
||||
}
|
||||
return R.error("修改失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除陪聊服务项目
|
||||
*/
|
||||
@Log(title = "陪聊服务项目", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
return R.ok(playClerkCommodityService.deletePlayClerkCommodityByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,132 @@
|
||||
package com.starry.admin.modules.clerk.controller;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkDataReviewInfoEditVo;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkDataReviewInfoEntity;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkDataReviewInfoQueryVo;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkUserInfoEntity;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkCommodityService;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkDataReviewInfoService;
|
||||
import com.starry.admin.modules.clerk.service.impl.PlayClerkUserInfoServiceImpl;
|
||||
import com.starry.admin.modules.weichat.entity.PlayClerkUserAlbumVo;
|
||||
import com.starry.admin.modules.weichat.entity.PlayClerkUserAudioVo;
|
||||
import com.starry.admin.modules.weichat.entity.PlayClerkUserAvatarVo;
|
||||
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.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 店员资料审核Controller
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-04-11
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/clerk/data/review")
|
||||
public class PlayClerkDataReviewInfoController {
|
||||
private static final Logger log = LoggerFactory.getLogger(PlayClerkDataReviewInfoController.class);
|
||||
@Resource
|
||||
private IPlayClerkDataReviewInfoService playClerkDataReviewInfoService;
|
||||
|
||||
|
||||
@Resource
|
||||
private PlayClerkUserInfoServiceImpl playClerkUserInfoService;
|
||||
|
||||
|
||||
@Resource
|
||||
private IPlayClerkCommodityService playClerkCommodityService;
|
||||
|
||||
|
||||
/**
|
||||
* 查询店员资料审核列表
|
||||
*/
|
||||
@PostMapping("/listByPage")
|
||||
public R list(PlayClerkDataReviewInfoQueryVo vo) {
|
||||
IPage<PlayClerkDataReviewInfoEntity> list = playClerkDataReviewInfoService.selectPlayClerkDataReviewInfoByPage(vo);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取店员资料审核详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{id}")
|
||||
public R getInfo(@PathVariable("id") String id) {
|
||||
return R.ok(playClerkDataReviewInfoService.selectPlayClerkDataReviewInfoById(id));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 修改店员资料审核
|
||||
*/
|
||||
|
||||
@Log(title = "店员资料审核", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/update")
|
||||
public R update(@RequestBody PlayClerkDataReviewInfoEditVo vo) {
|
||||
PlayClerkDataReviewInfoEntity entity = ConvertUtil.entityToVo(vo, PlayClerkDataReviewInfoEntity.class);
|
||||
boolean success = playClerkDataReviewInfoService.update(entity);
|
||||
if (success) {
|
||||
entity = playClerkDataReviewInfoService.selectPlayClerkDataReviewInfoById(entity.getId());
|
||||
if (entity != null && "1".equals(entity.getState())) {
|
||||
switch (entity.getDataType()) {
|
||||
case "0": {
|
||||
//陪聊申请审批通过,初始化陪聊信息
|
||||
PlayClerkUserInfoEntity item = JSONObject.parseObject(entity.getContent(), PlayClerkUserInfoEntity.class);
|
||||
item.setId(entity.getPlayUserId());
|
||||
item.setClerkState("1");
|
||||
playClerkUserInfoService.update(item);
|
||||
//初始化陪聊服务项目
|
||||
playClerkCommodityService.initClerkCommodity(entity.getPlayUserId());
|
||||
break;
|
||||
}
|
||||
case "1": {
|
||||
PlayClerkUserAvatarVo item = JSONObject.parseObject(entity.getContent(), PlayClerkUserAvatarVo.class);
|
||||
PlayClerkUserInfoEntity userInfo = new PlayClerkUserInfoEntity();
|
||||
userInfo.setId(entity.getPlayUserId());
|
||||
userInfo.setAvatar(item.getAvatar());
|
||||
playClerkUserInfoService.update(userInfo);
|
||||
break;
|
||||
}
|
||||
case "2": {
|
||||
PlayClerkUserAlbumVo item = JSONObject.parseObject(entity.getContent(), PlayClerkUserAlbumVo.class);
|
||||
PlayClerkUserInfoEntity userInfo = new PlayClerkUserInfoEntity();
|
||||
userInfo.setId(entity.getPlayUserId());
|
||||
userInfo.setAlbum(item.getAlbum());
|
||||
playClerkUserInfoService.update(userInfo);
|
||||
|
||||
break;
|
||||
}
|
||||
case "3": {
|
||||
PlayClerkUserAudioVo item = JSONObject.parseObject(entity.getContent(), PlayClerkUserAudioVo.class);
|
||||
PlayClerkUserInfoEntity userInfo = new PlayClerkUserInfoEntity();
|
||||
userInfo.setId(entity.getPlayUserId());
|
||||
userInfo.setAudio(item.getAudio());
|
||||
playClerkUserInfoService.update(userInfo);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
log.error("dataType not,dataType = {}", entity.getDataType());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
return R.error("修改失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除店员资料审核
|
||||
*/
|
||||
@Log(title = "店员资料审核", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
return R.ok(playClerkDataReviewInfoService.deletePlayClerkDataReviewInfoByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
package com.starry.admin.modules.clerk.controller;
|
||||
|
||||
import com.starry.admin.common.exception.CustomException;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkLevelInfoEntity;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkLevelAddVo;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkLevelEditVo;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkLevelInfoService;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 店员等级Controller
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-03-30
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/clerk/level")
|
||||
public class PlayClerkLevelInfoController {
|
||||
@Resource
|
||||
private IPlayClerkLevelInfoService playClerkLevelInfoService;
|
||||
|
||||
/**
|
||||
* 查询店员等级列表
|
||||
*/
|
||||
@GetMapping("/listAll")
|
||||
public R listAll() {
|
||||
return R.ok(playClerkLevelInfoService.selectAll());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取店员等级详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{id}")
|
||||
public R getInfo(@PathVariable("id") String id) {
|
||||
return R.ok(playClerkLevelInfoService.selectPlayClerkLevelInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增店员等级
|
||||
*/
|
||||
@Log(title = "店员等级", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/create")
|
||||
public R create(@RequestBody PlayClerkLevelAddVo vo) {
|
||||
PlayClerkLevelInfoEntity entity = ConvertUtil.entityToVo(vo, PlayClerkLevelInfoEntity.class);
|
||||
int level = playClerkLevelInfoService.selectMaxLevel();
|
||||
entity.setLevel(level + 1);
|
||||
boolean success = playClerkLevelInfoService.create(entity);
|
||||
if (success) {
|
||||
return R.ok();
|
||||
}
|
||||
return R.error("添加失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改店员等级
|
||||
*/
|
||||
@Log(title = "店员等级", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/update")
|
||||
public R update(@Validated @RequestBody PlayClerkLevelEditVo vo) {
|
||||
PlayClerkLevelInfoEntity entity = ConvertUtil.entityToVo(vo, PlayClerkLevelInfoEntity.class);
|
||||
boolean success = playClerkLevelInfoService.update(entity);
|
||||
if (success) {
|
||||
return R.ok();
|
||||
}
|
||||
return R.error("修改失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除店员等级
|
||||
*/
|
||||
@Log(title = "店员等级", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("delMaxLevel")
|
||||
public R remove() {
|
||||
int level = playClerkLevelInfoService.selectMaxLevel();
|
||||
if (level <= 1) {
|
||||
throw new CustomException("最后一级,不允许删除");
|
||||
}
|
||||
playClerkLevelInfoService.delMaxLevelByLevel(level);
|
||||
return R.ok();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,145 @@
|
||||
package com.starry.admin.modules.clerk.controller;
|
||||
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkUserInfoEntity;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkUserInfoQueryVo;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkUserListResultVo;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkUserAddToWxVo;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkUserAddVo;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkUserEditVo;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkUserStateEditVo;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkCommodityService;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkUserInfoService;
|
||||
import com.starry.admin.modules.play.module.entity.PlayUserInfoEntity;
|
||||
import com.starry.admin.modules.play.service.IPlayUserInfoService;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 店员Controller
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-03-30
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/clerk/user")
|
||||
public class PlayClerkUserInfoController {
|
||||
|
||||
@Resource
|
||||
private IPlayUserInfoService playUserInfoService;
|
||||
@Resource
|
||||
private IPlayClerkUserInfoService playClerkUserInfoService;
|
||||
|
||||
@Resource
|
||||
private IPlayClerkCommodityService clerkCommodityService;
|
||||
|
||||
/**
|
||||
* 查询店员列表
|
||||
*/
|
||||
@PostMapping("listByPage")
|
||||
public R listByPage(PlayClerkUserInfoQueryVo vo) {
|
||||
IPage<PlayClerkUserListResultVo> list = playClerkUserInfoService.selectPlayClerkUserInfoByPage(vo);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询店员列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public R list(PlayClerkUserInfoQueryVo vo) {
|
||||
IPage<PlayClerkUserListResultVo> list = playClerkUserInfoService.selectPlayClerkUserInfoByPage(vo);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取店员详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{id}")
|
||||
public R getInfo(@PathVariable("id") String id) {
|
||||
return R.ok(playClerkUserInfoService.selectById(id));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 微信端口新增店员
|
||||
*/
|
||||
@Log(title = "店员", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/wx/add")
|
||||
public R add(@Validated @RequestBody PlayClerkUserAddToWxVo vo) {
|
||||
//微信申请成为店员,需要先创建账户。
|
||||
PlayUserInfoEntity userInfoEntity = ConvertUtil.entityToVo(vo, PlayUserInfoEntity.class);
|
||||
userInfoEntity.setId(IdUtil.fastSimpleUUID());
|
||||
playUserInfoService.create(userInfoEntity);
|
||||
//账号创建完成后,创建店员
|
||||
PlayClerkUserInfoEntity clerkUserInfoEntity = ConvertUtil.entityToVo(vo, PlayClerkUserInfoEntity.class);
|
||||
clerkUserInfoEntity.setPlayUserId(userInfoEntity.getId());
|
||||
boolean success = playClerkUserInfoService.create(clerkUserInfoEntity);
|
||||
if (success) {
|
||||
clerkCommodityService.initClerkCommodity(userInfoEntity.getId());
|
||||
return R.ok();
|
||||
}
|
||||
return R.error("添加失败");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增店员
|
||||
*/
|
||||
@Log(title = "店员", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/create")
|
||||
public R create(@Validated @RequestBody PlayClerkUserAddVo vo) {
|
||||
PlayClerkUserInfoEntity entity = ConvertUtil.entityToVo(vo, PlayClerkUserInfoEntity.class);
|
||||
boolean success = playClerkUserInfoService.create(entity);
|
||||
if (success) {
|
||||
clerkCommodityService.initClerkCommodity(vo.getPlayUserId());
|
||||
return R.ok();
|
||||
}
|
||||
return R.error("添加失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改店员
|
||||
*/
|
||||
@Log(title = "店员", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/update")
|
||||
public R update(@Validated @RequestBody PlayClerkUserEditVo vo) {
|
||||
PlayClerkUserInfoEntity entity = ConvertUtil.entityToVo(vo, PlayClerkUserInfoEntity.class);
|
||||
boolean success = playClerkUserInfoService.update(entity);
|
||||
if (success) {
|
||||
return R.ok();
|
||||
}
|
||||
return R.error("修改失败");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 修改店员状态
|
||||
*/
|
||||
@Log(title = "店员", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/updateState")
|
||||
public R updateState(@Validated @RequestBody PlayClerkUserStateEditVo vo) {
|
||||
PlayClerkUserInfoEntity entity = ConvertUtil.entityToVo(vo, PlayClerkUserInfoEntity.class);
|
||||
boolean success = playClerkUserInfoService.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(playClerkUserInfoService.deletePlayClerkUserInfoByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.starry.admin.modules.clerk.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkClassificationInfoEntity;
|
||||
|
||||
/**
|
||||
* 店员分类Mapper接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-04-06
|
||||
*/
|
||||
public interface PlayClerkClassificationInfoMapper extends BaseMapper<PlayClerkClassificationInfoEntity> {
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.starry.admin.modules.clerk.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkCommodityEntity;
|
||||
|
||||
/**
|
||||
* 陪聊服务项目Mapper接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-03-31
|
||||
*/
|
||||
public interface PlayClerkCommodityMapper extends BaseMapper<PlayClerkCommodityEntity> {
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.starry.admin.modules.clerk.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkDataReviewInfoEntity;
|
||||
|
||||
/**
|
||||
* 店员资料审核Mapper接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-04-11
|
||||
*/
|
||||
public interface PlayClerkDataReviewInfoMapper extends BaseMapper<PlayClerkDataReviewInfoEntity> {
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.starry.admin.modules.clerk.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkLevelInfoEntity;
|
||||
|
||||
/**
|
||||
* 店员等级Mapper接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-03-30
|
||||
*/
|
||||
public interface PlayClerkLevelInfoMapper extends BaseMapper<PlayClerkLevelInfoEntity> {
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.starry.admin.modules.clerk.mapper;
|
||||
|
||||
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkUserInfoEntity;
|
||||
|
||||
|
||||
/**
|
||||
* 店员Mapper接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-03-30
|
||||
*/
|
||||
public interface PlayClerkUserInfoMapper extends MPJBaseMapper<PlayClerkUserInfoEntity> {
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
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_classification_info
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-04-06
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("play_clerk_classification_info")
|
||||
public class PlayClerkClassificationInfoEntity extends BaseEntity<PlayClerkClassificationInfoEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 类型名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* (排序字段)
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
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;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 陪聊服务项目对象 play_clerk_commodity
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-03-31
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("play_clerk_commodity_info")
|
||||
public class PlayClerkCommodityEntity extends BaseEntity<PlayClerkCommodityEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 店员用户ID
|
||||
*/
|
||||
private String playUserId;
|
||||
|
||||
/**
|
||||
* 服务项目ID
|
||||
*/
|
||||
private String commodityId;
|
||||
|
||||
/**
|
||||
* 项目类型
|
||||
*/
|
||||
private String commodityType;
|
||||
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
private String commodityName;
|
||||
|
||||
/**
|
||||
* 项目价格
|
||||
*/
|
||||
private BigDecimal commodityPrice;
|
||||
|
||||
|
||||
/**
|
||||
* 服务时长(文字描述信息,不参与订单计算)
|
||||
*/
|
||||
private String serviceDuration;
|
||||
/**
|
||||
* 服务启动状态
|
||||
* 0:停用
|
||||
* 1:启用
|
||||
*/
|
||||
private String enablingState;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.starry.admin.modules.clerk.module.entity;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 店员资料审核对象 play_clerk_data_review_info
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-04-11
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class PlayClerkDataReviewInfoEditVo {
|
||||
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 资料类型[0:店员申请,1:头像;2:相册;3:录音]
|
||||
*/
|
||||
private String dataType;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
* 0:未审核
|
||||
* 1:审核通过
|
||||
* 2:审核未通过
|
||||
*/
|
||||
private String state;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
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;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 店员资料审核对象 play_clerk_data_review_info
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-04-11
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("play_clerk_data_review_info")
|
||||
public class PlayClerkDataReviewInfoEntity extends BaseEntity<PlayClerkDataReviewInfoEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 店员ID
|
||||
*/
|
||||
private String playUserId;
|
||||
|
||||
/**
|
||||
* 店员头像
|
||||
*/
|
||||
private String clerkAvatar;
|
||||
|
||||
/**
|
||||
* 店员名称
|
||||
*/
|
||||
private String clerkNickname;
|
||||
|
||||
/**
|
||||
* 资料类型[0:店员申请,1:头像;2:相册;3:录音]
|
||||
*/
|
||||
private String dataType;
|
||||
|
||||
/**
|
||||
* 资料内容(JSON格式)
|
||||
*/
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
* 0:未审核
|
||||
* 1:审核通过
|
||||
* 2:审核未通过
|
||||
*/
|
||||
private String state;
|
||||
|
||||
/**
|
||||
* 资料添加时间
|
||||
*/
|
||||
private Date addTime;
|
||||
|
||||
/**
|
||||
* 审核时间
|
||||
*/
|
||||
private Date reviewTime;
|
||||
|
||||
/**
|
||||
* 审核人
|
||||
*/
|
||||
private String reviewBy;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.starry.admin.modules.clerk.module.entity;
|
||||
|
||||
import com.starry.common.domain.BasePageEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 店员资料审核对象 play_clerk_data_review_info
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-04-11
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class PlayClerkDataReviewInfoQueryVo extends BasePageEntity {
|
||||
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
|
||||
/**
|
||||
* 资料类型[0:店员申请,1:头像;2:相册;3:录音]
|
||||
*/
|
||||
private String dataType;
|
||||
|
||||
/**
|
||||
* 资料内容(JSON格式)
|
||||
*/
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
* 0:未审核
|
||||
* 1:审核通过
|
||||
* 2:审核未通过
|
||||
*/
|
||||
private String state = "0";
|
||||
|
||||
/**
|
||||
* 资料添加时间
|
||||
*/
|
||||
private Date addTime;
|
||||
|
||||
/**
|
||||
* 审核时间
|
||||
*/
|
||||
private Date reviewTime;
|
||||
|
||||
/**
|
||||
* 审核人
|
||||
*/
|
||||
private String reviewBy;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
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_level_info
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-03-30
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("play_clerk_level_info")
|
||||
public class PlayClerkLevelInfoEntity extends BaseEntity<PlayClerkLevelInfoEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 等级名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 等级数字(排序字段)
|
||||
*/
|
||||
private Integer level;
|
||||
|
||||
/**
|
||||
* 首次固定单比例[0 - 100%]
|
||||
*/
|
||||
private Integer firstRegularRatio;
|
||||
|
||||
/**
|
||||
* 非首次固定单比例[0 - 100%]
|
||||
*/
|
||||
private Integer notFirstRegularRatio;
|
||||
|
||||
/**
|
||||
* 首次打赏比例[0 - 100%]
|
||||
*/
|
||||
private Integer firstRewardRatio;
|
||||
|
||||
/**
|
||||
* 非首次打赏比例[0 - 100%]
|
||||
*/
|
||||
private Integer notFirstRewardRatio;
|
||||
|
||||
/**
|
||||
* 首次随机单比例[0 - 100%]
|
||||
*/
|
||||
private Integer firstRandomRadio;
|
||||
|
||||
/**
|
||||
* 非首次随机单比例[0 - 100%]
|
||||
*/
|
||||
private Integer notFirstRandomRadio;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
package com.starry.admin.modules.clerk.module.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
*/
|
||||
@Data
|
||||
public class PlayClerkUserDetailResultVo {
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 店员昵称
|
||||
*/
|
||||
private String nickname;
|
||||
|
||||
/**
|
||||
* 店员等级
|
||||
*/
|
||||
private String levelId;
|
||||
|
||||
/**
|
||||
* 店员等级
|
||||
*/
|
||||
private String levelName;
|
||||
|
||||
/**
|
||||
* 性别[0:未知;1:男;2:女]
|
||||
*/
|
||||
private String sex;
|
||||
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
private String avatar;
|
||||
|
||||
/**
|
||||
* 头像框
|
||||
*/
|
||||
private String avatarFrameId;
|
||||
|
||||
/**
|
||||
* 音频
|
||||
*/
|
||||
private String audio;
|
||||
|
||||
/**
|
||||
* 标签
|
||||
*/
|
||||
private String label;
|
||||
|
||||
/**
|
||||
* 个性签名
|
||||
*/
|
||||
private String signature;
|
||||
|
||||
/**
|
||||
* 年龄
|
||||
*/
|
||||
private Integer age;
|
||||
|
||||
/**
|
||||
* 关注(0:未关注,1:已关注)
|
||||
*/
|
||||
private String followState = "0";
|
||||
/**
|
||||
* 价格
|
||||
*/
|
||||
private String price;
|
||||
|
||||
/**
|
||||
* 礼物列表
|
||||
*/
|
||||
|
||||
private List<PlayGiftInfoVo> gifts;
|
||||
|
||||
/**
|
||||
* 服务项目
|
||||
*/
|
||||
private List<PlayClerkCommodityEntity> commodity;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.starry.admin.modules.clerk.module.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 店员评价信息
|
||||
*
|
||||
* @author admin
|
||||
*/
|
||||
@Data
|
||||
public class PlayClerkUserEvaluateInfoEntity {
|
||||
|
||||
private String id;
|
||||
|
||||
|
||||
/**
|
||||
* 评价人ID
|
||||
*/
|
||||
private String evaluatorId;
|
||||
|
||||
|
||||
/**
|
||||
* 评价人昵称
|
||||
*/
|
||||
private String evaluatorUsername;
|
||||
|
||||
/**
|
||||
* 评价人头像
|
||||
*/
|
||||
private String evaluatorAvatar;
|
||||
|
||||
/**
|
||||
* 评价内容
|
||||
*/
|
||||
private String con;
|
||||
|
||||
/**
|
||||
* 评价时间
|
||||
*/
|
||||
private Date evaluateTime;
|
||||
|
||||
|
||||
/**
|
||||
* 订单ID
|
||||
*/
|
||||
private String orderId;
|
||||
|
||||
/**
|
||||
* 店员昵称
|
||||
*/
|
||||
private String clerkUsername;
|
||||
|
||||
/**
|
||||
* 商品ID
|
||||
*/
|
||||
private String commodityId;
|
||||
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
private String commodityName;
|
||||
|
||||
/**
|
||||
* 商品单位
|
||||
*/
|
||||
private String commodityUnit;
|
||||
|
||||
/**
|
||||
* 点赞数
|
||||
*/
|
||||
public Integer likeCount;
|
||||
|
||||
|
||||
public PlayClerkUserEvaluateInfoEntity(String id, String evaluatorId, String evaluatorUsername, String evaluatorAvatar, String con, Date evaluateTime, String orderId, String clerkUsername, String commodityId, String commodityName, String commodityUnit) {
|
||||
this.id = id;
|
||||
this.evaluatorId = evaluatorId;
|
||||
this.evaluatorUsername = evaluatorUsername;
|
||||
this.evaluatorAvatar = evaluatorAvatar;
|
||||
this.con = con;
|
||||
this.evaluateTime = evaluateTime;
|
||||
this.orderId = orderId;
|
||||
this.clerkUsername = clerkUsername;
|
||||
this.commodityId = commodityId;
|
||||
this.commodityName = commodityName;
|
||||
this.commodityUnit = commodityUnit;
|
||||
}
|
||||
|
||||
public PlayClerkUserEvaluateInfoEntity(String id, String evaluatorId, String evaluatorUsername, String evaluatorAvatar, String con, Date evaluateTime, String orderId, String clerkUsername, String commodityId, String commodityName, String commodityUnit, int likeCount) {
|
||||
this.id = id;
|
||||
this.evaluatorId = evaluatorId;
|
||||
this.evaluatorUsername = evaluatorUsername;
|
||||
this.evaluatorAvatar = evaluatorAvatar;
|
||||
this.con = con;
|
||||
this.evaluateTime = evaluateTime;
|
||||
this.orderId = orderId;
|
||||
this.clerkUsername = clerkUsername;
|
||||
this.commodityId = commodityId;
|
||||
this.commodityName = commodityName;
|
||||
this.commodityUnit = commodityUnit;
|
||||
this.likeCount = likeCount;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,214 @@
|
||||
package com.starry.admin.modules.clerk.module.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.starry.admin.common.conf.StringTypeHandler;
|
||||
import com.starry.common.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 店员对象 play_clerk_user_info
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-03-30
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName(value = "play_clerk_user_info", autoResultMap = true)
|
||||
public class PlayClerkUserInfoEntity extends BaseEntity<PlayClerkUserInfoEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 电话号码
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 微信号码
|
||||
*/
|
||||
private String weiChatCode;
|
||||
|
||||
/**
|
||||
* 陪聊用户ID
|
||||
*/
|
||||
private String playUserId;
|
||||
|
||||
/**
|
||||
* 用户的标识,对当前公众号唯一
|
||||
*/
|
||||
private String openid;
|
||||
|
||||
/**
|
||||
* 店员昵称
|
||||
*/
|
||||
private String nickname;
|
||||
|
||||
/**
|
||||
* 店员等级
|
||||
*/
|
||||
private String levelId;
|
||||
|
||||
|
||||
/**
|
||||
* 店员类型
|
||||
*/
|
||||
private String typeId;
|
||||
|
||||
/**
|
||||
* 性别[0:未知;1:男;2:女]
|
||||
*/
|
||||
private String sex;
|
||||
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
private String avatar;
|
||||
|
||||
/**
|
||||
* 头像框
|
||||
*/
|
||||
private String avatarFrameId;
|
||||
|
||||
/**
|
||||
* 音频
|
||||
*/
|
||||
private String audio;
|
||||
|
||||
/**
|
||||
* 星座
|
||||
*/
|
||||
private String constellation;
|
||||
|
||||
/**
|
||||
* 标签
|
||||
*/
|
||||
@TableField(typeHandler = StringTypeHandler.class)
|
||||
private List<String> label;
|
||||
|
||||
/**
|
||||
* 个性签名
|
||||
*/
|
||||
private String signature;
|
||||
|
||||
/**
|
||||
* 年龄
|
||||
*/
|
||||
private Integer age;
|
||||
|
||||
/**
|
||||
* 所在国家
|
||||
*/
|
||||
private String country;
|
||||
|
||||
/**
|
||||
* 所在省份
|
||||
*/
|
||||
private String province;
|
||||
|
||||
/**
|
||||
* 所在城市
|
||||
*/
|
||||
private String city;
|
||||
|
||||
/**
|
||||
* 账户余额
|
||||
*/
|
||||
private BigDecimal accountBalance;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 在职状态(1:在职,0:离职)
|
||||
*/
|
||||
private String onboardingState;
|
||||
|
||||
/**
|
||||
* 是否推荐状态(1:已推荐,0:未推荐)
|
||||
*/
|
||||
private String recommendationState;
|
||||
|
||||
/**
|
||||
* 是否置顶状态(1:已置顶,0:未置顶)
|
||||
*/
|
||||
private String pinToTopState;
|
||||
|
||||
/**
|
||||
* 在线状态【1:在线,0:离线】
|
||||
*/
|
||||
private String onlineState;
|
||||
|
||||
/**
|
||||
* 上架状态【1:上架,0:下架】
|
||||
*/
|
||||
private String listingState;
|
||||
|
||||
/**
|
||||
* 显示状态【1:显示,0:隐藏】
|
||||
*/
|
||||
private String displayState;
|
||||
|
||||
/**
|
||||
* 实名状态【1:已实名,0:未实名】
|
||||
*/
|
||||
private String realState;
|
||||
|
||||
/**
|
||||
* 是否必须实名【1:必须实名,0:非必须实名】
|
||||
*/
|
||||
private String mandatoryRealState;
|
||||
|
||||
/**
|
||||
* 随机接单状态【1:允许,0:禁止】
|
||||
*/
|
||||
private String randomOrderState;
|
||||
|
||||
/**
|
||||
* 店员状态(0:不是陪聊,1:陪聊,2:资料审核中)
|
||||
*/
|
||||
private String clerkState;
|
||||
/**
|
||||
* 相册
|
||||
*/
|
||||
@TableField(typeHandler = StringTypeHandler.class)
|
||||
private List<String> album;
|
||||
/**
|
||||
* 微信二维码
|
||||
**/
|
||||
private String weChatCodeImage;
|
||||
|
||||
/**
|
||||
* 微信收款码图片
|
||||
**/
|
||||
private String weChatPayImage;
|
||||
|
||||
/**
|
||||
* 支付宝收款码图片
|
||||
**/
|
||||
private String alipayImage;
|
||||
|
||||
/**
|
||||
* 最近一次登录token
|
||||
*/
|
||||
@JsonIgnore
|
||||
private String token;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.starry.admin.modules.clerk.module.entity;
|
||||
|
||||
import com.starry.common.domain.BasePageEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 分页查询店员对象
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-03-30
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class PlayClerkUserInfoQueryVo extends BasePageEntity {
|
||||
|
||||
|
||||
/**
|
||||
* 店员昵称
|
||||
**/
|
||||
private String nickname;
|
||||
/**
|
||||
* 店员等级
|
||||
*/
|
||||
private String levelId;
|
||||
|
||||
/**
|
||||
* 店员类型
|
||||
*/
|
||||
private String typeId;
|
||||
|
||||
/**
|
||||
* 店员性别(1:男:0:女)
|
||||
*/
|
||||
private String sex;
|
||||
|
||||
/**
|
||||
* 所在省份
|
||||
*/
|
||||
private String province;
|
||||
|
||||
/**
|
||||
* 上架状态【1:上架,0:下架】
|
||||
*/
|
||||
private String listingState;
|
||||
|
||||
/**
|
||||
* 是否推荐状态(1:已推荐,0:未推荐)
|
||||
*/
|
||||
private String recommendationState;
|
||||
|
||||
/**
|
||||
* 员工状态【1:是陪聊,0:不是陪聊】
|
||||
*/
|
||||
private String clerkState = "1";
|
||||
|
||||
/**
|
||||
* 手机号码
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
package com.starry.admin.modules.clerk.module.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
*/
|
||||
@Data
|
||||
public class PlayClerkUserListResultVo {
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 店员昵称
|
||||
*/
|
||||
private String nickname;
|
||||
|
||||
/**
|
||||
* 店员等级
|
||||
*/
|
||||
private String levelId;
|
||||
|
||||
/**
|
||||
* 店员等级
|
||||
*/
|
||||
private String levelName;
|
||||
|
||||
|
||||
/**
|
||||
* 性别[0:未知;1:男;2:女]
|
||||
*/
|
||||
private String sex;
|
||||
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
private String avatar;
|
||||
|
||||
|
||||
/**
|
||||
* 音频
|
||||
*/
|
||||
private String audio;
|
||||
|
||||
|
||||
/**
|
||||
* 星座
|
||||
*/
|
||||
private String constellation;
|
||||
|
||||
/**
|
||||
* 标签
|
||||
*/
|
||||
private List<String> label = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* 相册
|
||||
*/
|
||||
private List<String> album = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* 个性签名
|
||||
*/
|
||||
private String signature;
|
||||
|
||||
/**
|
||||
* 年龄
|
||||
*/
|
||||
private Integer age;
|
||||
|
||||
/**
|
||||
* 所在省份
|
||||
*/
|
||||
private String province;
|
||||
|
||||
/**
|
||||
* 所在城市
|
||||
*/
|
||||
private String city;
|
||||
|
||||
|
||||
/**
|
||||
* 关注(0:未关注,1:已关注)
|
||||
*/
|
||||
private String followState = "0";
|
||||
|
||||
/**
|
||||
* 在线状态【1:在线,0:离线】
|
||||
*/
|
||||
private String onlineState;
|
||||
|
||||
/**
|
||||
* 上架状态【1:上架,0:下架】
|
||||
*/
|
||||
private String listingState;
|
||||
|
||||
|
||||
/**
|
||||
* 实名状态【1:已实名,0:未实名】
|
||||
*/
|
||||
private String realState;
|
||||
|
||||
/**
|
||||
* 是否必须实名【1:必须实名,0:非必须实名,2:跟随店铺设置】
|
||||
*/
|
||||
private String mandatoryRealState;
|
||||
|
||||
/**
|
||||
* 随机接单状态【1:允许,0:禁止】
|
||||
*/
|
||||
private String randomOrderState;
|
||||
|
||||
|
||||
/**
|
||||
* 服务项目
|
||||
*/
|
||||
private List<String> commodity;
|
||||
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
private String address;
|
||||
|
||||
|
||||
/**
|
||||
* 最低消费
|
||||
*/
|
||||
private String latestConsumption = "最低1船票";
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.starry.admin.modules.clerk.module.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 店员动态
|
||||
*
|
||||
* @author admin
|
||||
*/
|
||||
@Data
|
||||
public class PlayClerkUserTrendsInfoEntity {
|
||||
|
||||
private String id;
|
||||
|
||||
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 动态类型(0:照片,1:视频)
|
||||
*/
|
||||
private String type;
|
||||
|
||||
|
||||
private String con;
|
||||
|
||||
|
||||
private Date releaseTime;
|
||||
|
||||
public PlayClerkUserTrendsInfoEntity(String id, String title, String con, Date releaseTime) {
|
||||
this.id = id;
|
||||
this.title = title;
|
||||
this.con = con;
|
||||
this.releaseTime = releaseTime;
|
||||
this.type = "1";
|
||||
}
|
||||
|
||||
public PlayClerkUserTrendsInfoEntity(String id, String title, String type, String con, Date releaseTime) {
|
||||
this.id = id;
|
||||
this.title = title;
|
||||
this.type = type;
|
||||
this.con = con;
|
||||
this.releaseTime = releaseTime;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.starry.admin.modules.clerk.module.entity;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 礼物信息
|
||||
* @author admin
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class PlayGiftInfoVo {
|
||||
|
||||
|
||||
/**
|
||||
* 礼物ID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 礼物名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 礼物地址
|
||||
*/
|
||||
private String url;
|
||||
|
||||
/**
|
||||
* 获得数量
|
||||
*/
|
||||
private Integer number;
|
||||
|
||||
|
||||
/**
|
||||
* 礼物状态(0:正常,1:已下架)
|
||||
*/
|
||||
private String state;
|
||||
|
||||
public PlayGiftInfoVo(String id, String name, String url, Integer number, String state) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.url = url;
|
||||
this.number = number;
|
||||
this.state = state;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.starry.admin.modules.clerk.module.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Pattern;
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
*/
|
||||
@Data
|
||||
public class PlayClerkCommodityEditVo {
|
||||
|
||||
/**
|
||||
* 项目类型
|
||||
*/
|
||||
@NotNull(message = "项目类型名称不能为空")
|
||||
private String commodityType;
|
||||
|
||||
|
||||
/**
|
||||
* 服务启动状态
|
||||
* 0:停用
|
||||
* 1:启用
|
||||
*/
|
||||
@NotNull(message = "服务状态不能为空")
|
||||
@Pattern(regexp = "[01]", message = "服务状态必须为0或1")
|
||||
private String enablingState;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.starry.admin.modules.clerk.module.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
*/
|
||||
@Data
|
||||
public class PlayClerkCommodityQueryVo {
|
||||
|
||||
/**
|
||||
* 项目类型
|
||||
*/
|
||||
private String commodityType;
|
||||
|
||||
|
||||
/**
|
||||
* 服务启动状态
|
||||
* 0:停用
|
||||
* 1:启用
|
||||
*/
|
||||
private String enablingState;
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.starry.admin.modules.clerk.module.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
*/
|
||||
@Data
|
||||
public class PlayClerkLevelAddVo {
|
||||
|
||||
/**
|
||||
* 等级名称
|
||||
*/
|
||||
@NotBlank(message = "等级名称不能为空")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 首次固定单比例[0 - 100%]
|
||||
*/
|
||||
private Integer firstRegularRatio;
|
||||
|
||||
/**
|
||||
* 非首次固定单比例[0 - 100%]
|
||||
*/
|
||||
private Integer notFirstRegularRatio;
|
||||
|
||||
/**
|
||||
* 首次打赏比例[0 - 100%]
|
||||
*/
|
||||
private Integer firstRewardRatio;
|
||||
|
||||
/**
|
||||
* 非首次打赏比例[0 - 100%]
|
||||
*/
|
||||
private Integer notFirstRewardRatio;
|
||||
|
||||
/**
|
||||
* 首次随机单比例[0 - 100%]
|
||||
*/
|
||||
private Integer firstRandomRadio;
|
||||
|
||||
/**
|
||||
* 非首次随机单比例[0 - 100%]
|
||||
*/
|
||||
private Integer notFirstRandomRadio;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.starry.admin.modules.clerk.module.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
*/
|
||||
@Data
|
||||
public class PlayClerkLevelEditVo {
|
||||
|
||||
/**
|
||||
* 等级名称
|
||||
*/
|
||||
@NotBlank(message = "ID不能为空")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 等级名称
|
||||
*/
|
||||
@NotBlank(message = "等级名称不能为空")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 首次固定单比例[0 - 100%]
|
||||
*/
|
||||
private Integer firstRegularRatio;
|
||||
|
||||
/**
|
||||
* 非首次固定单比例[0 - 100%]
|
||||
*/
|
||||
private Integer notFirstRegularRatio;
|
||||
|
||||
/**
|
||||
* 首次打赏比例[0 - 100%]
|
||||
*/
|
||||
private Integer firstRewardRatio;
|
||||
|
||||
/**
|
||||
* 非首次打赏比例[0 - 100%]
|
||||
*/
|
||||
private Integer notFirstRewardRatio;
|
||||
|
||||
/**
|
||||
* 首次随机单比例[0 - 100%]
|
||||
*/
|
||||
private Integer firstRandomRadio;
|
||||
|
||||
/**
|
||||
* 非首次随机单比例[0 - 100%]
|
||||
*/
|
||||
private Integer notFirstRandomRadio;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.starry.admin.modules.clerk.module.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 店员等级查询接口
|
||||
* @author admin
|
||||
*/
|
||||
@Data
|
||||
public class PlayClerkLevelQueryReturnVo {
|
||||
|
||||
/**
|
||||
* 等级名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
package com.starry.admin.modules.clerk.module.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
*/
|
||||
@Data
|
||||
public class PlayClerkUserAddToWxVo {
|
||||
|
||||
/**
|
||||
* 店员昵称
|
||||
*/
|
||||
@NotBlank(message = "昵称不能为空")
|
||||
private String nickname;
|
||||
|
||||
|
||||
/**
|
||||
* 店员性别(1:男:0:女)
|
||||
*/
|
||||
@NotNull(message = "性别不能为空")
|
||||
private Integer sex;
|
||||
|
||||
/**
|
||||
* 年龄
|
||||
*/
|
||||
@NotNull(message = "年龄不能为空")
|
||||
private int age;
|
||||
|
||||
|
||||
/**
|
||||
* 微信号
|
||||
*/
|
||||
@NotBlank(message = "微信号不能为空")
|
||||
private String weChat;
|
||||
|
||||
|
||||
/**
|
||||
* 手机号码区号
|
||||
*/
|
||||
@NotBlank(message = "微信号不能为空")
|
||||
private String areaCode;
|
||||
|
||||
/**
|
||||
* 手机号码
|
||||
*/
|
||||
@NotBlank(message = "微信号不能为空")
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 音频
|
||||
*/
|
||||
@NotBlank(message = "音频不能为空")
|
||||
private String audioFrequency;
|
||||
|
||||
|
||||
/**
|
||||
* 所在国家
|
||||
*/
|
||||
private String country = "中国";
|
||||
|
||||
/**
|
||||
* 所在省份
|
||||
*/
|
||||
@NotBlank(message = "省份不能为空")
|
||||
private String province;
|
||||
|
||||
/**
|
||||
* 所在城市
|
||||
*/
|
||||
@NotBlank(message = "城市不能为空")
|
||||
private String city;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 账户状态(1:审批通过,0:注册未审批)
|
||||
*/
|
||||
private String accountState = "0";
|
||||
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.starry.admin.modules.clerk.module.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
*/
|
||||
@Data
|
||||
public class PlayClerkUserAddVo {
|
||||
|
||||
/**
|
||||
* 账号ID
|
||||
*/
|
||||
@NotBlank(message = "账号不能为空")
|
||||
private String playUserId;
|
||||
|
||||
/**
|
||||
* 用户的标识,对当前公众号唯一
|
||||
*/
|
||||
private String openid;
|
||||
|
||||
/**
|
||||
* 店员昵称
|
||||
*/
|
||||
@NotBlank(message = "昵称不能为空")
|
||||
private String nickname;
|
||||
|
||||
/**
|
||||
* 店员等级
|
||||
*/
|
||||
@NotBlank(message = "等级不能为空")
|
||||
private String levelId;
|
||||
|
||||
/**
|
||||
* 店员性别(1:男:0:女)
|
||||
*/
|
||||
@NotNull(message = "性别不能为空")
|
||||
private Integer sex;
|
||||
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
@NotBlank(message = "头像不能为空")
|
||||
private String avatar;
|
||||
|
||||
/**
|
||||
* 音频
|
||||
*/
|
||||
@NotBlank(message = "音频不能为空")
|
||||
private String audioFrequency;
|
||||
|
||||
/**
|
||||
* 星座
|
||||
*/
|
||||
@NotBlank(message = "星座不能为空")
|
||||
private String constellation;
|
||||
|
||||
/**
|
||||
* 标签
|
||||
*/
|
||||
private String label;
|
||||
|
||||
/**
|
||||
* 个性签名
|
||||
*/
|
||||
@NotBlank(message = "签名不能为空")
|
||||
private String signature;
|
||||
|
||||
/**
|
||||
* 年龄
|
||||
*/
|
||||
@NotNull(message = "年龄不能为空")
|
||||
private Long age;
|
||||
|
||||
/**
|
||||
* 所在国家
|
||||
*/
|
||||
@NotBlank(message = "国家不能为空")
|
||||
private String country;
|
||||
|
||||
/**
|
||||
* 所在省份
|
||||
*/
|
||||
@NotBlank(message = "省份不能为空")
|
||||
private String province;
|
||||
|
||||
/**
|
||||
* 所在城市
|
||||
*/
|
||||
@NotBlank(message = "城市不能为空")
|
||||
private String city;
|
||||
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
package com.starry.admin.modules.clerk.module.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
*/
|
||||
@Data
|
||||
public class PlayClerkUserEditVo {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@NotBlank(message = "id不能为空")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 账号ID
|
||||
*/
|
||||
@NotBlank(message = "账号不能为空")
|
||||
private String playUserId;
|
||||
|
||||
/**
|
||||
* 用户的标识,对当前公众号唯一
|
||||
*/
|
||||
private String openid;
|
||||
|
||||
/**
|
||||
* 店员昵称
|
||||
*/
|
||||
@NotBlank(message = "昵称不能为空")
|
||||
private String nickname;
|
||||
|
||||
/**
|
||||
* 店员等级
|
||||
*/
|
||||
@NotBlank(message = "等级不能为空")
|
||||
private String levelId;
|
||||
|
||||
/**
|
||||
* 店员性别(1:男:0:女)
|
||||
*/
|
||||
@NotNull(message = "性别不能为空")
|
||||
private String sex;
|
||||
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
@NotBlank(message = "头像不能为空")
|
||||
private String avatar;
|
||||
|
||||
/**
|
||||
* 音频
|
||||
*/
|
||||
@NotBlank(message = "音频不能为空")
|
||||
private String audioFrequency;
|
||||
|
||||
/**
|
||||
* 星座
|
||||
*/
|
||||
@NotBlank(message = "星座不能为空")
|
||||
private String constellation;
|
||||
|
||||
/**
|
||||
* 标签
|
||||
*/
|
||||
private String label;
|
||||
|
||||
/**
|
||||
* 个性签名
|
||||
*/
|
||||
@NotBlank(message = "签名不能为空")
|
||||
private String signature;
|
||||
|
||||
/**
|
||||
* 年龄
|
||||
*/
|
||||
@NotNull(message = "年龄不能为空")
|
||||
private Long age;
|
||||
|
||||
/**
|
||||
* 所在国家
|
||||
*/
|
||||
@NotBlank(message = "国家不能为空")
|
||||
private String country;
|
||||
|
||||
/**
|
||||
* 所在省份
|
||||
*/
|
||||
@NotBlank(message = "省份不能为空")
|
||||
private String province;
|
||||
|
||||
/**
|
||||
* 所在城市
|
||||
*/
|
||||
@NotBlank(message = "城市不能为空")
|
||||
private String city;
|
||||
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.starry.admin.modules.clerk.module.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
*/
|
||||
@Data
|
||||
public class PlayClerkUserStateEditVo {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@NotBlank(message = "id不能为空")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 是否推荐状态(1:已推荐,0:未推荐)
|
||||
*/
|
||||
private String recommendationState;
|
||||
|
||||
/**
|
||||
* 是否置顶状态(1:已置顶,0:未置顶)
|
||||
*/
|
||||
private String pinToTopState;
|
||||
|
||||
/**
|
||||
* 在线状态【1:在线,0:离线】
|
||||
*/
|
||||
private String onlineState;
|
||||
|
||||
/**
|
||||
* 上架状态【1:上架,0:下架】
|
||||
*/
|
||||
private String listingState;
|
||||
|
||||
/**
|
||||
* 显示状态【1:显示,0:隐藏】
|
||||
*/
|
||||
private String displayState;
|
||||
|
||||
/**
|
||||
* 实名状态【1:已实名,0:未实名】
|
||||
*/
|
||||
private String realState;
|
||||
|
||||
/**
|
||||
* 是否必须实名【1:必须实名,0:非必须实名】
|
||||
*/
|
||||
private String mandatoryRealState;
|
||||
|
||||
/**
|
||||
* 随机接单状态【1:允许,0:禁止】
|
||||
*/
|
||||
private String randomOrderState;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
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.PlayClerkClassificationInfoEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 店员分类Service接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-04-06
|
||||
*/
|
||||
public interface IPlayClerkClassificationInfoService extends IService<PlayClerkClassificationInfoEntity> {
|
||||
/**
|
||||
* 查询店员分类
|
||||
*
|
||||
* @param id 店员分类主键
|
||||
* @return 店员分类
|
||||
*/
|
||||
PlayClerkClassificationInfoEntity selectPlayClerkClassificationInfoById(String id);
|
||||
|
||||
/**
|
||||
* 查询店员分类列表
|
||||
*
|
||||
* @return 店员分类集合
|
||||
*/
|
||||
List<PlayClerkClassificationInfoEntity> selectAll();
|
||||
|
||||
|
||||
/**
|
||||
* 查询店员分类列表
|
||||
*
|
||||
* @param playClerkClassificationInfo 店员分类
|
||||
* @return 店员分类集合
|
||||
*/
|
||||
IPage<PlayClerkClassificationInfoEntity> selectPlayClerkClassificationInfoByPage(PlayClerkClassificationInfoEntity playClerkClassificationInfo);
|
||||
|
||||
/**
|
||||
* 新增店员分类
|
||||
*
|
||||
* @param playClerkClassificationInfo 店员分类
|
||||
* @return 结果
|
||||
*/
|
||||
boolean create(PlayClerkClassificationInfoEntity playClerkClassificationInfo);
|
||||
|
||||
/**
|
||||
* 修改店员分类
|
||||
*
|
||||
* @param playClerkClassificationInfo 店员分类
|
||||
* @return 结果
|
||||
*/
|
||||
boolean update(PlayClerkClassificationInfoEntity playClerkClassificationInfo);
|
||||
|
||||
/**
|
||||
* 批量删除店员分类
|
||||
*
|
||||
* @param ids 需要删除的店员分类主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayClerkClassificationInfoByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除店员分类信息
|
||||
*
|
||||
* @param id 店员分类主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayClerkClassificationInfoById(String id);
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
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.PlayClerkCommodityEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 陪聊服务项目Service接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-03-31
|
||||
*/
|
||||
public interface IPlayClerkCommodityService extends IService<PlayClerkCommodityEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* 初始化当前陪聊服务项目
|
||||
*
|
||||
* @param playUserId 账号ID
|
||||
*/
|
||||
void initClerkCommodity(String playUserId);
|
||||
|
||||
|
||||
/**
|
||||
* 根据用户ID,查询当前用户的服务项目类型
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @return 服务项目类型
|
||||
*/
|
||||
List<String> getClerkCommodityList(String userId);
|
||||
|
||||
/**
|
||||
* 根据用户ID,查询当前用户的服务项目类型
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @return List<PlayClerkCommodityEntity>
|
||||
*/
|
||||
List<PlayClerkCommodityEntity> selectCommodityTypeByUser(String userId);
|
||||
|
||||
/**
|
||||
* 根据用户ID,查询当前用户的服务项目
|
||||
*
|
||||
* @param playUserId 用户ID
|
||||
* @return List<PlayClerkCommodityEntity>
|
||||
*/
|
||||
List<PlayClerkCommodityEntity> selectByUser(String playUserId);
|
||||
|
||||
/**
|
||||
* 查询当前陪聊所有服务项目
|
||||
*
|
||||
* @return List<PlayClerkCommodityEntity>
|
||||
*/
|
||||
List<PlayClerkCommodityEntity> selectAll();
|
||||
|
||||
|
||||
/**
|
||||
* 启停当前陪聊服务项目
|
||||
*
|
||||
* @param type 项目名称
|
||||
* @param enablingState 启停状态
|
||||
* @param clerkUserId 陪聊ID
|
||||
*/
|
||||
void startStopClerkItem(String type, String enablingState, String clerkUserId);
|
||||
|
||||
|
||||
/**
|
||||
* 查询陪聊服务项目
|
||||
*
|
||||
* @param id 陪聊服务项目主键
|
||||
* @return 陪聊服务项目
|
||||
*/
|
||||
PlayClerkCommodityEntity selectPlayClerkCommodityById(String id);
|
||||
|
||||
/**
|
||||
* 查询陪聊服务项目列表
|
||||
*
|
||||
* @param playClerkCommodity 陪聊服务项目
|
||||
* @return 陪聊服务项目集合
|
||||
*/
|
||||
IPage<PlayClerkCommodityEntity> selectPlayClerkCommodityByPage(PlayClerkCommodityEntity playClerkCommodity);
|
||||
|
||||
/**
|
||||
* 新增陪聊服务项目
|
||||
*
|
||||
* @param playClerkCommodity 陪聊服务项目
|
||||
* @return 结果
|
||||
*/
|
||||
boolean create(PlayClerkCommodityEntity playClerkCommodity);
|
||||
|
||||
/**
|
||||
* 修改陪聊服务项目
|
||||
*
|
||||
* @param playClerkCommodity 陪聊服务项目
|
||||
* @return 结果
|
||||
*/
|
||||
boolean update(PlayClerkCommodityEntity playClerkCommodity);
|
||||
|
||||
/**
|
||||
* 批量删除陪聊服务项目
|
||||
*
|
||||
* @param ids 需要删除的陪聊服务项目主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayClerkCommodityByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除陪聊服务项目信息
|
||||
*
|
||||
* @param id 陪聊服务项目主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayClerkCommodityById(String id);
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
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.PlayClerkDataReviewInfoEntity;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkDataReviewInfoQueryVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 店员资料审核Service接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-04-11
|
||||
*/
|
||||
public interface IPlayClerkDataReviewInfoService extends IService<PlayClerkDataReviewInfoEntity> {
|
||||
/**
|
||||
* 查询店员资料审核
|
||||
*
|
||||
* @param id 店员资料审核主键
|
||||
* @return 店员资料审核
|
||||
*/
|
||||
PlayClerkDataReviewInfoEntity selectPlayClerkDataReviewInfoById(String id);
|
||||
|
||||
/**
|
||||
* 查询店员资料审核列表
|
||||
*
|
||||
* @param entity 店员资料审核
|
||||
* @return 店员资料审核集合
|
||||
*/
|
||||
List<PlayClerkDataReviewInfoEntity> queryList(PlayClerkDataReviewInfoEntity entity);
|
||||
|
||||
/**
|
||||
* 查询店员资料审核列表
|
||||
*
|
||||
* @param playClerkDataReviewInfo 店员资料审核
|
||||
* @return 店员资料审核集合
|
||||
*/
|
||||
IPage<PlayClerkDataReviewInfoEntity> selectPlayClerkDataReviewInfoByPage(PlayClerkDataReviewInfoQueryVo playClerkDataReviewInfo);
|
||||
|
||||
/**
|
||||
* 新增店员资料审核
|
||||
*
|
||||
* @param playClerkDataReviewInfo 店员资料审核
|
||||
* @return 结果
|
||||
*/
|
||||
boolean create(PlayClerkDataReviewInfoEntity playClerkDataReviewInfo);
|
||||
|
||||
/**
|
||||
* 修改店员资料审核
|
||||
*
|
||||
* @param playClerkDataReviewInfo 店员资料审核
|
||||
* @return 结果
|
||||
*/
|
||||
boolean update(PlayClerkDataReviewInfoEntity playClerkDataReviewInfo);
|
||||
|
||||
/**
|
||||
* 批量删除店员资料审核
|
||||
*
|
||||
* @param ids 需要删除的店员资料审核主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayClerkDataReviewInfoByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除店员资料审核信息
|
||||
*
|
||||
* @param id 店员资料审核主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayClerkDataReviewInfoById(String id);
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
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.PlayClerkLevelInfoEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 店员等级Service接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-03-30
|
||||
*/
|
||||
public interface IPlayClerkLevelInfoService extends IService<PlayClerkLevelInfoEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* 获取新增陪聊时,默认最低等级ID
|
||||
* @return PlayClerkLevelInfoEntity
|
||||
*/
|
||||
PlayClerkLevelInfoEntity getDefaultLevel();
|
||||
/**
|
||||
*
|
||||
* 查询店员等级
|
||||
*
|
||||
* @param id 店员等级主键
|
||||
* @return 店员等级
|
||||
*/
|
||||
PlayClerkLevelInfoEntity selectPlayClerkLevelInfoById(String id);
|
||||
|
||||
/**
|
||||
* 查询店员等级列表
|
||||
*
|
||||
* @return 店员等级集合
|
||||
*/
|
||||
List<PlayClerkLevelInfoEntity> selectAll();
|
||||
|
||||
/**
|
||||
* 分页查询店员等级列表
|
||||
*
|
||||
* @param playClerkLevelInfo 店员等级
|
||||
* @return 店员等级集合
|
||||
*/
|
||||
IPage<PlayClerkLevelInfoEntity> selectPlayClerkLevelInfoByPage(PlayClerkLevelInfoEntity playClerkLevelInfo);
|
||||
|
||||
/**
|
||||
* 新增店员等级
|
||||
*
|
||||
* @param playClerkLevelInfo 店员等级
|
||||
* @return 结果
|
||||
*/
|
||||
boolean create(PlayClerkLevelInfoEntity playClerkLevelInfo);
|
||||
|
||||
/**
|
||||
* 修改店员等级
|
||||
*
|
||||
* @param playClerkLevelInfo 店员等级
|
||||
* @return 结果
|
||||
*/
|
||||
boolean update(PlayClerkLevelInfoEntity playClerkLevelInfo);
|
||||
|
||||
/**
|
||||
* 批量删除店员等级
|
||||
*
|
||||
* @param ids 需要删除的店员等级主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayClerkLevelInfoByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除店员等级信息
|
||||
*
|
||||
* @param id 店员等级主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayClerkLevelInfoById(String id);
|
||||
|
||||
|
||||
/**
|
||||
* 查询最大等级
|
||||
*
|
||||
* @return 最大等级
|
||||
*/
|
||||
int selectMaxLevel();
|
||||
|
||||
|
||||
/**
|
||||
* 删除最大等级
|
||||
*
|
||||
*/
|
||||
void delMaxLevelByLevel(Integer level);
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
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.PlayClerkUserInfoEntity;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkUserInfoQueryVo;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkUserListResultVo;
|
||||
import com.starry.admin.modules.weichat.entity.PlayClerkUserLoginResponseVo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
/**
|
||||
* 店员Service接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-03-30
|
||||
*/
|
||||
public interface IPlayClerkUserInfoService extends IService<PlayClerkUserInfoEntity> {
|
||||
|
||||
/**
|
||||
* 根据账户ID查询店员
|
||||
*
|
||||
* @param id 店员ID
|
||||
* @return 店员
|
||||
*/
|
||||
PlayClerkUserInfoEntity queryByUserId(String id);
|
||||
|
||||
|
||||
/**
|
||||
* 查询店员
|
||||
*
|
||||
* @param openId 微信ID
|
||||
* @return 店员
|
||||
*/
|
||||
PlayClerkUserInfoEntity selectByOpenid(String openId);
|
||||
|
||||
/**
|
||||
* 查询店员
|
||||
*
|
||||
* @param id 店员主键
|
||||
* @return 店员
|
||||
*/
|
||||
PlayClerkUserInfoEntity selectById(String id);
|
||||
|
||||
/**
|
||||
* 获得陪聊用户登录返回信息
|
||||
*
|
||||
* @param vo PlayClerkUserInfoEntity
|
||||
* @return PlayClerkUserLoginResponseVo
|
||||
*/
|
||||
PlayClerkUserLoginResponseVo getVo(PlayClerkUserInfoEntity vo);
|
||||
|
||||
/**
|
||||
* 更新token
|
||||
*
|
||||
* @param id 用户ID
|
||||
* @param token token
|
||||
* @author admin
|
||||
* @since 2024/4/9 14:30
|
||||
**/
|
||||
void updateTokenById(String id, String token);
|
||||
|
||||
/**
|
||||
* 更新账号余额
|
||||
*
|
||||
* @param id 用户ID
|
||||
* @param accountBalance 账户余额
|
||||
* @author admin
|
||||
* @since 2024/4/9 14:33
|
||||
**/
|
||||
void updateAccountBalanceById(String id, BigDecimal accountBalance);
|
||||
|
||||
|
||||
/**
|
||||
* 查询店员列表
|
||||
*
|
||||
* @param vo 店员查询对象
|
||||
* @param customUserId 顾客ID
|
||||
* @return 店员列表
|
||||
*/
|
||||
IPage<PlayClerkUserListResultVo> selectByPage(PlayClerkUserInfoQueryVo vo, String customUserId);
|
||||
|
||||
/**
|
||||
* 查询店员列表
|
||||
*
|
||||
* @param vo 店员查询对象
|
||||
* @return 店员集合
|
||||
*/
|
||||
IPage<PlayClerkUserListResultVo> selectPlayClerkUserInfoByPage(PlayClerkUserInfoQueryVo vo);
|
||||
|
||||
/**
|
||||
* 新增店员
|
||||
*
|
||||
* @param playClerkUserInfo 店员
|
||||
* @return 结果
|
||||
*/
|
||||
boolean create(PlayClerkUserInfoEntity playClerkUserInfo);
|
||||
|
||||
/**
|
||||
* 修改店员
|
||||
*
|
||||
* @param playClerkUserInfo 店员
|
||||
* @return 结果
|
||||
*/
|
||||
boolean update(PlayClerkUserInfoEntity playClerkUserInfo);
|
||||
|
||||
/**
|
||||
* 批量删除店员
|
||||
*
|
||||
* @param ids 需要删除的店员主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayClerkUserInfoByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除店员信息
|
||||
*
|
||||
* @param id 店员主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayClerkUserInfoById(String id);
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
package com.starry.admin.modules.clerk.service.impl;
|
||||
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
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.PlayClerkClassificationInfoMapper;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkClassificationInfoEntity;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkClassificationInfoService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 店员分类Service业务层处理
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-04-06
|
||||
*/
|
||||
@Service
|
||||
public class PlayClerkClassificationInfoServiceImpl extends ServiceImpl<PlayClerkClassificationInfoMapper, PlayClerkClassificationInfoEntity> implements IPlayClerkClassificationInfoService {
|
||||
@Resource
|
||||
private PlayClerkClassificationInfoMapper playClerkClassificationInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询店员分类
|
||||
*
|
||||
* @param id 店员分类主键
|
||||
* @return 店员分类
|
||||
*/
|
||||
@Override
|
||||
public PlayClerkClassificationInfoEntity selectPlayClerkClassificationInfoById(String id) {
|
||||
return this.baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询店员分类列表
|
||||
*
|
||||
* @return 店员分类
|
||||
*/
|
||||
@Override
|
||||
public List<PlayClerkClassificationInfoEntity> selectAll() {
|
||||
return this.baseMapper.selectList(new LambdaQueryWrapper<>());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询店员分类列表
|
||||
*
|
||||
* @param playClerkClassificationInfo 店员分类
|
||||
* @return 店员分类
|
||||
*/
|
||||
@Override
|
||||
public IPage<PlayClerkClassificationInfoEntity> selectPlayClerkClassificationInfoByPage(PlayClerkClassificationInfoEntity playClerkClassificationInfo) {
|
||||
Page<PlayClerkClassificationInfoEntity> page = new Page<>(1, 10);
|
||||
return this.baseMapper.selectPage(page, new LambdaQueryWrapper<>());
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增店员分类
|
||||
*
|
||||
* @param playClerkClassificationInfo 店员分类
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean create(PlayClerkClassificationInfoEntity playClerkClassificationInfo) {
|
||||
if (StrUtil.isBlankIfStr(playClerkClassificationInfo.getId())) {
|
||||
playClerkClassificationInfo.setId(IdUtil.fastSimpleUUID());
|
||||
}
|
||||
return save(playClerkClassificationInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改店员分类
|
||||
*
|
||||
* @param playClerkClassificationInfo 店员分类
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean update(PlayClerkClassificationInfoEntity playClerkClassificationInfo) {
|
||||
return updateById(playClerkClassificationInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除店员分类
|
||||
*
|
||||
* @param ids 需要删除的店员分类主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePlayClerkClassificationInfoByIds(String[] ids) {
|
||||
return playClerkClassificationInfoMapper.deleteBatchIds(Arrays.asList(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除店员分类信息
|
||||
*
|
||||
* @param id 店员分类主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePlayClerkClassificationInfoById(String id) {
|
||||
return playClerkClassificationInfoMapper.deleteById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,170 @@
|
||||
package com.starry.admin.modules.clerk.service.impl;
|
||||
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
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.common.exception.CustomException;
|
||||
import com.starry.admin.modules.clerk.mapper.PlayClerkCommodityMapper;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkCommodityEntity;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkCommodityService;
|
||||
import com.starry.admin.modules.play.module.entity.PlayCommodityInfoEntity;
|
||||
import com.starry.admin.modules.play.service.IPlayCommodityInfoService;
|
||||
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-03-31
|
||||
*/
|
||||
@Service
|
||||
public class PlayClerkCommodityServiceImpl extends ServiceImpl<PlayClerkCommodityMapper, PlayClerkCommodityEntity> implements IPlayClerkCommodityService {
|
||||
@Resource
|
||||
private PlayClerkCommodityMapper playClerkCommodityMapper;
|
||||
|
||||
|
||||
@Resource
|
||||
private IPlayCommodityInfoService playCommodityInfoService;
|
||||
|
||||
|
||||
@Override
|
||||
public void initClerkCommodity(String userId) {
|
||||
// 删除当前陪聊的所有服务项目
|
||||
LambdaQueryWrapper<PlayClerkCommodityEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(PlayClerkCommodityEntity::getPlayUserId, userId);
|
||||
this.baseMapper.delete(lambdaQueryWrapper);
|
||||
// 根据当前租户的服务项目,生成陪聊项目数据
|
||||
for (PlayCommodityInfoEntity commodityInfo : playCommodityInfoService.selectAll()) {
|
||||
PlayClerkCommodityEntity entity = new PlayClerkCommodityEntity();
|
||||
entity.setPlayUserId(userId);
|
||||
entity.setCommodityId(commodityInfo.getId());
|
||||
entity.setCommodityType(commodityInfo.getItemType());
|
||||
entity.setCommodityName(commodityInfo.getItemName());
|
||||
entity.setCommodityPrice(commodityInfo.getPrice());
|
||||
entity.setServiceDuration(commodityInfo.getServiceDuration());
|
||||
entity.setEnablingState("1");
|
||||
this.create(entity);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<String> getClerkCommodityList(String userId) {
|
||||
List<PlayClerkCommodityEntity> list = this.selectCommodityTypeByUser(userId);
|
||||
return list.stream().map(PlayClerkCommodityEntity::getCommodityType).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PlayClerkCommodityEntity> selectCommodityTypeByUser(String userId) {
|
||||
LambdaQueryWrapper<PlayClerkCommodityEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.groupBy(PlayClerkCommodityEntity::getCommodityType);
|
||||
lambdaQueryWrapper.eq(PlayClerkCommodityEntity::getPlayUserId, userId);
|
||||
return this.baseMapper.selectList(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PlayClerkCommodityEntity> selectByUser(String userId) {
|
||||
LambdaQueryWrapper<PlayClerkCommodityEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(PlayClerkCommodityEntity::getPlayUserId, userId);
|
||||
return this.baseMapper.selectList(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PlayClerkCommodityEntity> selectAll() {
|
||||
return this.baseMapper.selectList(new LambdaQueryWrapper<>());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void startStopClerkItem(String type, String enablingState, String clerkUserId) {
|
||||
PlayClerkCommodityEntity entity = new PlayClerkCommodityEntity();
|
||||
entity.setEnablingState(enablingState);
|
||||
LambdaQueryWrapper<PlayClerkCommodityEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(PlayClerkCommodityEntity::getPlayUserId, clerkUserId);
|
||||
lambdaQueryWrapper.eq(PlayClerkCommodityEntity::getCommodityType, type);
|
||||
this.baseMapper.update(entity, lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询陪聊服务项目
|
||||
*
|
||||
* @param id 陪聊服务项目主键
|
||||
* @return 陪聊服务项目
|
||||
*/
|
||||
@Override
|
||||
public PlayClerkCommodityEntity selectPlayClerkCommodityById(String id) {
|
||||
PlayClerkCommodityEntity entity = this.baseMapper.selectById(id);
|
||||
if (entity == null) {
|
||||
throw new CustomException("服务项目不存在");
|
||||
}
|
||||
return entity;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询陪聊服务项目列表
|
||||
*
|
||||
* @param playClerkCommodity 陪聊服务项目
|
||||
* @return 陪聊服务项目
|
||||
*/
|
||||
@Override
|
||||
public IPage<PlayClerkCommodityEntity> selectPlayClerkCommodityByPage(PlayClerkCommodityEntity playClerkCommodity) {
|
||||
Page<PlayClerkCommodityEntity> page = new Page<>(1, 10);
|
||||
return this.baseMapper.selectPage(page, new LambdaQueryWrapper<>());
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增陪聊服务项目
|
||||
*
|
||||
* @param playClerkCommodity 陪聊服务项目
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean create(PlayClerkCommodityEntity playClerkCommodity) {
|
||||
if (StrUtil.isBlankIfStr(playClerkCommodity.getId())) {
|
||||
playClerkCommodity.setId(IdUtil.fastSimpleUUID());
|
||||
}
|
||||
return save(playClerkCommodity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改陪聊服务项目
|
||||
*
|
||||
* @param playClerkCommodity 陪聊服务项目
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean update(PlayClerkCommodityEntity playClerkCommodity) {
|
||||
return updateById(playClerkCommodity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除陪聊服务项目
|
||||
*
|
||||
* @param ids 需要删除的陪聊服务项目主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePlayClerkCommodityByIds(String[] ids) {
|
||||
return playClerkCommodityMapper.deleteBatchIds(Arrays.asList(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除陪聊服务项目信息
|
||||
*
|
||||
* @param id 陪聊服务项目主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePlayClerkCommodityById(String id) {
|
||||
return playClerkCommodityMapper.deleteById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,128 @@
|
||||
package com.starry.admin.modules.clerk.service.impl;
|
||||
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
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.PlayClerkDataReviewInfoMapper;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkDataReviewInfoEntity;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkDataReviewInfoQueryVo;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkDataReviewInfoService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 店员资料审核Service业务层处理
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-04-11
|
||||
*/
|
||||
@Service
|
||||
public class PlayClerkDataReviewInfoServiceImpl extends ServiceImpl<PlayClerkDataReviewInfoMapper, PlayClerkDataReviewInfoEntity> implements IPlayClerkDataReviewInfoService {
|
||||
@Resource
|
||||
private PlayClerkDataReviewInfoMapper playClerkDataReviewInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询店员资料审核
|
||||
*
|
||||
* @param id 店员资料审核主键
|
||||
* @return 店员资料审核
|
||||
*/
|
||||
@Override
|
||||
public PlayClerkDataReviewInfoEntity selectPlayClerkDataReviewInfoById(String id) {
|
||||
return this.baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询店员资料审核列表
|
||||
*
|
||||
* @param entity 店员资料审核
|
||||
* @return 店员资料审核
|
||||
*/
|
||||
@Override
|
||||
public List<PlayClerkDataReviewInfoEntity> queryList(PlayClerkDataReviewInfoEntity entity) {
|
||||
LambdaQueryWrapper<PlayClerkDataReviewInfoEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
if (StrUtil.isNotBlank(entity.getId())) {
|
||||
lambdaQueryWrapper.eq(PlayClerkDataReviewInfoEntity::getId, entity.getId());
|
||||
}
|
||||
if (StrUtil.isNotBlank(entity.getPlayUserId())) {
|
||||
lambdaQueryWrapper.eq(PlayClerkDataReviewInfoEntity::getPlayUserId, entity.getPlayUserId());
|
||||
}
|
||||
if (StrUtil.isNotBlank(entity.getState())) {
|
||||
lambdaQueryWrapper.eq(PlayClerkDataReviewInfoEntity::getState, entity.getState());
|
||||
}
|
||||
if (StrUtil.isNotBlank(entity.getDataType())) {
|
||||
lambdaQueryWrapper.eq(PlayClerkDataReviewInfoEntity::getDataType, entity.getDataType());
|
||||
}
|
||||
return this.baseMapper.selectList(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询店员资料审核列表
|
||||
*
|
||||
* @param vo 店员资料审核分页对象
|
||||
* @return 店员资料审核
|
||||
*/
|
||||
@Override
|
||||
public IPage<PlayClerkDataReviewInfoEntity> selectPlayClerkDataReviewInfoByPage(PlayClerkDataReviewInfoQueryVo vo) {
|
||||
LambdaQueryWrapper<PlayClerkDataReviewInfoEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
if (StrUtil.isNotBlank(vo.getState())) {
|
||||
lambdaQueryWrapper.eq(PlayClerkDataReviewInfoEntity::getState, vo.getState());
|
||||
}
|
||||
Page<PlayClerkDataReviewInfoEntity> page = new Page<>(vo.getPageNum(), vo.getPageSize());
|
||||
return this.baseMapper.selectPage(page, lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增店员资料审核
|
||||
*
|
||||
* @param playClerkDataReviewInfo 店员资料审核
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean create(PlayClerkDataReviewInfoEntity playClerkDataReviewInfo) {
|
||||
if (StrUtil.isBlankIfStr(playClerkDataReviewInfo.getId())) {
|
||||
playClerkDataReviewInfo.setId(IdUtil.fastSimpleUUID());
|
||||
}
|
||||
return save(playClerkDataReviewInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改店员资料审核
|
||||
*
|
||||
* @param playClerkDataReviewInfo 店员资料审核
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean update(PlayClerkDataReviewInfoEntity playClerkDataReviewInfo) {
|
||||
return updateById(playClerkDataReviewInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除店员资料审核
|
||||
*
|
||||
* @param ids 需要删除的店员资料审核主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePlayClerkDataReviewInfoByIds(String[] ids) {
|
||||
return playClerkDataReviewInfoMapper.deleteBatchIds(Arrays.asList(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除店员资料审核信息
|
||||
*
|
||||
* @param id 店员资料审核主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePlayClerkDataReviewInfoById(String id) {
|
||||
return playClerkDataReviewInfoMapper.deleteById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
package com.starry.admin.modules.clerk.service.impl;
|
||||
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
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.common.exception.CustomException;
|
||||
import com.starry.admin.modules.clerk.mapper.PlayClerkLevelInfoMapper;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkLevelInfoEntity;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkLevelInfoService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 店员等级Service业务层处理
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-03-30
|
||||
*/
|
||||
@Service
|
||||
public class PlayClerkLevelInfoServiceImpl extends ServiceImpl<PlayClerkLevelInfoMapper, PlayClerkLevelInfoEntity> implements IPlayClerkLevelInfoService {
|
||||
@Resource
|
||||
private PlayClerkLevelInfoMapper playClerkLevelInfoMapper;
|
||||
|
||||
@Override
|
||||
public PlayClerkLevelInfoEntity getDefaultLevel() {
|
||||
List<PlayClerkLevelInfoEntity> list = this.selectAll();
|
||||
if (list != null && !list.isEmpty()) {
|
||||
return list.get(0);
|
||||
}
|
||||
throw new CustomException("系统错误,等级数据未初始化");
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询店员等级
|
||||
*
|
||||
* @param id 店员等级主键
|
||||
* @return 店员等级
|
||||
*/
|
||||
@Override
|
||||
public PlayClerkLevelInfoEntity selectPlayClerkLevelInfoById(String id) {
|
||||
return this.baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<PlayClerkLevelInfoEntity> selectAll() {
|
||||
LambdaQueryWrapper<PlayClerkLevelInfoEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.orderByAsc(PlayClerkLevelInfoEntity::getLevel);
|
||||
return this.baseMapper.selectList(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询店员等级列表
|
||||
*
|
||||
* @param playClerkLevelInfo 店员等级
|
||||
* @return 店员等级
|
||||
*/
|
||||
@Override
|
||||
public IPage<PlayClerkLevelInfoEntity> selectPlayClerkLevelInfoByPage(PlayClerkLevelInfoEntity playClerkLevelInfo) {
|
||||
Page<PlayClerkLevelInfoEntity> page = new Page<>(1, 9999);
|
||||
return this.baseMapper.selectPage(page, new LambdaQueryWrapper<>());
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增店员等级
|
||||
*
|
||||
* @param playClerkLevelInfo 店员等级
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean create(PlayClerkLevelInfoEntity playClerkLevelInfo) {
|
||||
if (StrUtil.isBlankIfStr(playClerkLevelInfo.getId())) {
|
||||
playClerkLevelInfo.setId(IdUtil.fastSimpleUUID());
|
||||
}
|
||||
return save(playClerkLevelInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改店员等级
|
||||
*
|
||||
* @param playClerkLevelInfo 店员等级
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean update(PlayClerkLevelInfoEntity playClerkLevelInfo) {
|
||||
return updateById(playClerkLevelInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除店员等级
|
||||
*
|
||||
* @param ids 需要删除的店员等级主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePlayClerkLevelInfoByIds(String[] ids) {
|
||||
return playClerkLevelInfoMapper.deleteBatchIds(Arrays.asList(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除店员等级信息
|
||||
*
|
||||
* @param id 店员等级主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePlayClerkLevelInfoById(String id) {
|
||||
return playClerkLevelInfoMapper.deleteById(id);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int selectMaxLevel() {
|
||||
QueryWrapper<PlayClerkLevelInfoEntity> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.select("max(level) as level ");
|
||||
PlayClerkLevelInfoEntity entity = this.baseMapper.selectOne(queryWrapper);
|
||||
return entity == null ? 0 : entity.getLevel();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delMaxLevelByLevel(Integer level) {
|
||||
LambdaQueryWrapper<PlayClerkLevelInfoEntity> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(PlayClerkLevelInfoEntity::getLevel, level);
|
||||
playClerkLevelInfoMapper.delete(queryWrapper);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,237 @@
|
||||
package com.starry.admin.modules.clerk.service.impl;
|
||||
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
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.common.exception.CustomException;
|
||||
import com.starry.admin.modules.clerk.mapper.PlayClerkUserInfoMapper;
|
||||
import com.starry.admin.modules.clerk.module.entity.*;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkCommodityQueryVo;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkCommodityService;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkUserInfoService;
|
||||
import com.starry.admin.modules.follow.module.entity.PlayCustomFollowInfoEntity;
|
||||
import com.starry.admin.modules.follow.service.IPlayCustomFollowInfoService;
|
||||
import com.starry.admin.modules.weichat.entity.PlayClerkUserLoginResponseVo;
|
||||
import com.starry.common.utils.ConvertUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
/**
|
||||
* 店员Service业务层处理
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-03-30
|
||||
*/
|
||||
@Service
|
||||
public class PlayClerkUserInfoServiceImpl extends ServiceImpl<PlayClerkUserInfoMapper, PlayClerkUserInfoEntity> implements IPlayClerkUserInfoService {
|
||||
@Resource
|
||||
private PlayClerkUserInfoMapper playClerkUserInfoMapper;
|
||||
|
||||
@Resource
|
||||
private PlayClerkDataReviewInfoServiceImpl dataReviewInfoService;
|
||||
|
||||
|
||||
@Resource
|
||||
private IPlayClerkCommodityService playClerkCommodityService;
|
||||
|
||||
@Resource
|
||||
private IPlayCustomFollowInfoService customFollowInfoService;
|
||||
|
||||
|
||||
@Override
|
||||
public PlayClerkUserInfoEntity queryByUserId(String id) {
|
||||
LambdaQueryWrapper<PlayClerkUserInfoEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(PlayClerkUserInfoEntity::getId, id);
|
||||
return this.baseMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayClerkUserInfoEntity selectByOpenid(String openId) {
|
||||
LambdaQueryWrapper<PlayClerkUserInfoEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(PlayClerkUserInfoEntity::getOpenid, openId);
|
||||
return this.baseMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询店员
|
||||
*
|
||||
* @param id 店员主键
|
||||
* @return 店员
|
||||
*/
|
||||
@Override
|
||||
public PlayClerkUserInfoEntity selectById(String id) {
|
||||
PlayClerkUserInfoEntity entity = this.baseMapper.selectById(id);
|
||||
if (entity == null) {
|
||||
throw new CustomException("店员不存在");
|
||||
}
|
||||
return entity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayClerkUserLoginResponseVo getVo(PlayClerkUserInfoEntity userInfo) {
|
||||
PlayClerkUserLoginResponseVo result = ConvertUtil.entityToVo(userInfo, PlayClerkUserLoginResponseVo.class);
|
||||
|
||||
// 判断头像、音频、相册是否可以编辑,如果存在未审核的数据,则不允许编辑
|
||||
PlayClerkDataReviewInfoEntity dataReviewInfo = new PlayClerkDataReviewInfoEntity();
|
||||
dataReviewInfo.setPlayUserId(userInfo.getId());
|
||||
dataReviewInfo.setState("0");
|
||||
List<PlayClerkDataReviewInfoEntity> list = dataReviewInfoService.queryList(dataReviewInfo);
|
||||
Map<String, PlayClerkDataReviewInfoEntity> map = list.stream().collect(Collectors.toMap(PlayClerkDataReviewInfoEntity::getDataType, account -> account));
|
||||
if (map.containsKey("1")) {
|
||||
result.setAvatarAllowEdit(false);
|
||||
}
|
||||
if (map.containsKey("2")) {
|
||||
result.setAvatarAllowEdit(false);
|
||||
}
|
||||
if (map.containsKey("3")) {
|
||||
result.setAudioAllowEdit(false);
|
||||
}
|
||||
if (map.containsKey("0") || "1".equals(result.getClerkState())) {
|
||||
result.setClerkAllowEdit(false);
|
||||
}
|
||||
result.setCommodity(ConvertUtil.entityToVoList(playClerkCommodityService.selectCommodityTypeByUser(userInfo.getId()), PlayClerkCommodityQueryVo.class));
|
||||
result.setArea(userInfo.getProvince() + "-" + userInfo.getCity());
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void updateTokenById(String id, String token) {
|
||||
PlayClerkUserInfoEntity entity = new PlayClerkUserInfoEntity();
|
||||
entity.setToken(token);
|
||||
entity.setId(id);
|
||||
this.baseMapper.updateById(entity);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void updateAccountBalanceById(String id, BigDecimal accountBalance) {
|
||||
PlayClerkUserInfoEntity entity = new PlayClerkUserInfoEntity();
|
||||
entity.setAccountBalance(accountBalance);
|
||||
entity.setId(id);
|
||||
this.baseMapper.updateById(entity);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询店员列表
|
||||
*
|
||||
* @param vo 店员查询对象
|
||||
* @return 店员
|
||||
*/
|
||||
@Override
|
||||
public IPage<PlayClerkUserListResultVo> selectPlayClerkUserInfoByPage(PlayClerkUserInfoQueryVo vo) {
|
||||
Page<PlayClerkUserListResultVo> page = new Page<>(vo.getPageNum(), vo.getPageSize());
|
||||
|
||||
MPJLambdaWrapper<PlayClerkUserInfoEntity> lambdaQueryWrapper = new MPJLambdaWrapper<PlayClerkUserInfoEntity>()
|
||||
// 查询主表全部字段
|
||||
.selectAll(PlayClerkUserInfoEntity.class).selectAs(PlayClerkUserInfoEntity::getCity, "address")
|
||||
// 等级表
|
||||
.selectAs(PlayClerkLevelInfoEntity::getName, "levelName").leftJoin(PlayClerkLevelInfoEntity.class, PlayClerkLevelInfoEntity::getId, PlayClerkUserInfoEntity::getLevelId);
|
||||
|
||||
|
||||
// 服务项目表
|
||||
if (StrUtil.isNotBlank(vo.getNickname())) {
|
||||
lambdaQueryWrapper.like(PlayClerkUserInfoEntity::getNickname, vo.getNickname());
|
||||
}
|
||||
if (StrUtil.isNotBlank(vo.getTypeId())) {
|
||||
lambdaQueryWrapper.eq(PlayClerkUserInfoEntity::getTypeId, vo.getTypeId());
|
||||
}
|
||||
if (StrUtil.isNotBlank(vo.getLevelId())) {
|
||||
lambdaQueryWrapper.eq(PlayClerkUserInfoEntity::getLevelId, vo.getLevelId());
|
||||
}
|
||||
if (StrUtil.isNotBlank(vo.getSex())) {
|
||||
lambdaQueryWrapper.eq(PlayClerkUserInfoEntity::getSex, vo.getSex());
|
||||
}
|
||||
if (StrUtil.isNotBlank(vo.getProvince())) {
|
||||
lambdaQueryWrapper.eq(PlayClerkUserInfoEntity::getProvince, vo.getProvince());
|
||||
}
|
||||
if (StrUtil.isNotBlank(vo.getClerkState())) {
|
||||
lambdaQueryWrapper.eq(PlayClerkUserInfoEntity::getClerkState, vo.getClerkState());
|
||||
}
|
||||
if (StrUtil.isNotBlank(vo.getRecommendationState())) {
|
||||
lambdaQueryWrapper.eq(PlayClerkUserInfoEntity::getRecommendationState, vo.getRecommendationState());
|
||||
}
|
||||
return this.baseMapper.selectJoinPage(page, PlayClerkUserListResultVo.class, lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IPage<PlayClerkUserListResultVo> selectByPage(PlayClerkUserInfoQueryVo vo, String customUserId) {
|
||||
IPage<PlayClerkUserListResultVo> voPage = this.selectPlayClerkUserInfoByPage(vo);
|
||||
// 如果当前顾客已登录,查询是否关注
|
||||
if (StrUtil.isNotBlank(customUserId)) {
|
||||
LambdaQueryWrapper<PlayCustomFollowInfoEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(PlayCustomFollowInfoEntity::getCustomUserId, customUserId);
|
||||
List<PlayCustomFollowInfoEntity> customFollowInfoEntities = customFollowInfoService.list(lambdaQueryWrapper);
|
||||
Map<String, String> customFollows = customFollowInfoEntities.stream().collect(Collectors.toMap(PlayCustomFollowInfoEntity::getClerkUserId, PlayCustomFollowInfoEntity::getFollowState));
|
||||
for (PlayClerkUserListResultVo record : voPage.getRecords()) {
|
||||
if (customFollows.containsKey(record.getId())) {
|
||||
record.setFollowState(customFollows.get(record.getId()));
|
||||
record.setCommodity(playClerkCommodityService.getClerkCommodityList(record.getId()));
|
||||
record.setAddress(record.getCity());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return voPage;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增店员
|
||||
*
|
||||
* @param playClerkUserInfo 店员
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean create(PlayClerkUserInfoEntity playClerkUserInfo) {
|
||||
if (StrUtil.isBlankIfStr(playClerkUserInfo.getId())) {
|
||||
playClerkUserInfo.setId(IdUtil.fastSimpleUUID());
|
||||
}
|
||||
return save(playClerkUserInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改店员
|
||||
*
|
||||
* @param playClerkUserInfo 店员
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean update(PlayClerkUserInfoEntity playClerkUserInfo) {
|
||||
return updateById(playClerkUserInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除店员
|
||||
*
|
||||
* @param ids 需要删除的店员主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePlayClerkUserInfoByIds(String[] ids) {
|
||||
return playClerkUserInfoMapper.deleteBatchIds(Arrays.asList(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除店员信息
|
||||
*
|
||||
* @param id 店员主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePlayClerkUserInfoById(String id) {
|
||||
return playClerkUserInfoMapper.deleteById(id);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user