最新代码
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
package com.starry.admin.modules.clerk.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkArticleInfoEntity;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkArticleQueryVo;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkArticleReturnVo;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkArticleReviewStateEditVo;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkArticleInfoService;
|
||||
import com.starry.admin.modules.clerk.service.IPlayCustomArticleInfoService;
|
||||
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-05-04
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/clerk/article")
|
||||
public class PlayClerkArticleInfoController {
|
||||
@Resource
|
||||
private IPlayClerkArticleInfoService playClerkArticleInfoService;
|
||||
@Resource
|
||||
private IPlayCustomArticleInfoService playCustomArticleInfoService;
|
||||
|
||||
|
||||
/**
|
||||
* 查询店员动态信息列表
|
||||
*/
|
||||
@PostMapping("/listByPage")
|
||||
public R list(@Validated @RequestBody PlayClerkArticleQueryVo vo) {
|
||||
IPage<PlayClerkArticleReturnVo> list = playClerkArticleInfoService.selectByPage(vo);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 修改店员动态信息
|
||||
*/
|
||||
@Log(title = "店员动态信息", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/update")
|
||||
public R update(@RequestBody PlayClerkArticleReviewStateEditVo vo) {
|
||||
PlayClerkArticleInfoEntity entity = ConvertUtil.entityToVo(vo, PlayClerkArticleInfoEntity.class);
|
||||
boolean success = playClerkArticleInfoService.update(entity);
|
||||
if (success) {
|
||||
return R.ok();
|
||||
}
|
||||
return R.error("修改失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除店员动态信息
|
||||
*/
|
||||
@Log(title = "店员动态信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
for (String id : ids) {
|
||||
playClerkArticleInfoService.deletePlayClerkArticleInfoById(id);
|
||||
playCustomArticleInfoService.deleteByArticleId(id);
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
}
|
||||
@@ -1,23 +1,14 @@
|
||||
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.module.vo.PlayClerkDataReviewQueryVo;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkDataReviewReturnVo;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkDataReviewStateEditVo;
|
||||
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.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -26,99 +17,33 @@ import javax.annotation.Resource;
|
||||
* 店员资料审核Controller
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-04-11
|
||||
* @since 2024-05-19
|
||||
*/
|
||||
@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);
|
||||
public R list(@Validated @RequestBody PlayClerkDataReviewQueryVo vo) {
|
||||
IPage<PlayClerkDataReviewReturnVo> list = playClerkDataReviewInfoService.selectByPage(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("修改失败");
|
||||
public R update(@Validated @RequestBody PlayClerkDataReviewStateEditVo vo) {
|
||||
playClerkDataReviewInfoService.updateDataReviewState(vo);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
package com.starry.admin.modules.clerk.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkGroupInfoEntity;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkGroupInfoService;
|
||||
import com.starry.common.annotation.Log;
|
||||
import com.starry.common.enums.BusinessType;
|
||||
import com.starry.common.result.R;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 店员分组信息Controller
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-31
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/clerk/group")
|
||||
public class PlayClerkGroupInfoController {
|
||||
@Resource
|
||||
private IPlayClerkGroupInfoService playClerkGroupInfoService;
|
||||
|
||||
/**
|
||||
* 查询店员分组信息列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public R list(PlayClerkGroupInfoEntity playClerkGroupInfo) {
|
||||
IPage<PlayClerkGroupInfoEntity> list = playClerkGroupInfoService.selectPlayClerkGroupInfoByPage(playClerkGroupInfo);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取店员分组信息详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{id}")
|
||||
public R getInfo(@PathVariable("id") String id) {
|
||||
return R.ok(playClerkGroupInfoService.selectPlayClerkGroupInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增店员分组信息
|
||||
*/
|
||||
@Log(title = "店员分组信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/create")
|
||||
public R create(@RequestBody PlayClerkGroupInfoEntity playClerkGroupInfo) {
|
||||
boolean success = playClerkGroupInfoService.create(playClerkGroupInfo);
|
||||
if (success) {
|
||||
return R.ok();
|
||||
}
|
||||
return R.error("添加失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改店员分组信息
|
||||
*/
|
||||
@Log(title = "店员分组信息", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/update/{id}")
|
||||
public R update(@PathVariable String id, @RequestBody PlayClerkGroupInfoEntity playClerkGroupInfo) {
|
||||
playClerkGroupInfo.setId(id);
|
||||
boolean success = playClerkGroupInfoService.update(playClerkGroupInfo);
|
||||
if (success) {
|
||||
return R.ok();
|
||||
}
|
||||
return R.error("修改失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除店员分组信息
|
||||
*/
|
||||
@Log(title = "店员分组信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
return R.ok(playClerkGroupInfoService.deletePlayClerkGroupInfoByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
package com.starry.admin.modules.clerk.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkGroupUserInfoEntity;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkGroupUserInfoService;
|
||||
import com.starry.common.annotation.Log;
|
||||
import com.starry.common.enums.BusinessType;
|
||||
import com.starry.common.result.R;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 店员和分组关系Controller
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-31
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/group/clerk")
|
||||
public class PlayClerkGroupUserInfoController {
|
||||
@Resource
|
||||
private IPlayClerkGroupUserInfoService playClerkGroupUserInfoService;
|
||||
|
||||
/**
|
||||
* 查询店员和分组关系列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public R list(PlayClerkGroupUserInfoEntity playClerkGroupUserInfo) {
|
||||
IPage<PlayClerkGroupUserInfoEntity> list = playClerkGroupUserInfoService.selectPlayClerkGroupUserInfoByPage(playClerkGroupUserInfo);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取店员和分组关系详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{id}")
|
||||
public R getInfo(@PathVariable("id") String id) {
|
||||
return R.ok(playClerkGroupUserInfoService.selectPlayClerkGroupUserInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增店员和分组关系
|
||||
*/
|
||||
@Log(title = "店员和分组关系", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/create")
|
||||
public R create(@RequestBody PlayClerkGroupUserInfoEntity playClerkGroupUserInfo) {
|
||||
boolean success = playClerkGroupUserInfoService.create(playClerkGroupUserInfo);
|
||||
if (success) {
|
||||
return R.ok();
|
||||
}
|
||||
return R.error("添加失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改店员和分组关系
|
||||
*/
|
||||
@Log(title = "店员和分组关系", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/update/{id}")
|
||||
public R update(@PathVariable String id, @RequestBody PlayClerkGroupUserInfoEntity playClerkGroupUserInfo) {
|
||||
playClerkGroupUserInfo.setId(id);
|
||||
boolean success = playClerkGroupUserInfoService.update(playClerkGroupUserInfo);
|
||||
if (success) {
|
||||
return R.ok();
|
||||
}
|
||||
return R.error("修改失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除店员和分组关系
|
||||
*/
|
||||
@Log(title = "店员和分组关系", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
return R.ok(playClerkGroupUserInfoService.deletePlayClerkGroupUserInfoByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
package com.starry.admin.modules.clerk.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkRankingInfoEntity;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkRankingInfoService;
|
||||
import com.starry.common.annotation.Log;
|
||||
import com.starry.common.enums.BusinessType;
|
||||
import com.starry.common.result.R;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 店员排行Controller
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/clerk/ranking")
|
||||
public class PlayClerkRankingInfoController {
|
||||
@Resource
|
||||
private IPlayClerkRankingInfoService playClerkRankingInfoService;
|
||||
|
||||
/**
|
||||
* 查询店员排行列表
|
||||
*/
|
||||
@GetMapping("/listByPage")
|
||||
public R list(PlayClerkRankingInfoEntity playClerkRankingInfo) {
|
||||
IPage<PlayClerkRankingInfoEntity> list = playClerkRankingInfoService.selectPlayClerkRankingInfoByPage(playClerkRankingInfo);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取店员排行详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{id}")
|
||||
public R getInfo(@PathVariable("id") String id) {
|
||||
return R.ok(playClerkRankingInfoService.selectPlayClerkRankingInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增店员排行
|
||||
*/
|
||||
@Log(title = "店员排行", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/create")
|
||||
public R create(@RequestBody PlayClerkRankingInfoEntity playClerkRankingInfo) {
|
||||
boolean success = playClerkRankingInfoService.create(playClerkRankingInfo);
|
||||
if (success) {
|
||||
return R.ok();
|
||||
}
|
||||
return R.error("添加失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改店员排行
|
||||
*/
|
||||
@Log(title = "店员排行", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/update/{id}")
|
||||
public R update(@PathVariable String id, @RequestBody PlayClerkRankingInfoEntity playClerkRankingInfo) {
|
||||
playClerkRankingInfo.setId(id);
|
||||
boolean success = playClerkRankingInfoService.update(playClerkRankingInfo);
|
||||
if (success) {
|
||||
return R.ok();
|
||||
}
|
||||
return R.error("修改失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除店员排行
|
||||
*/
|
||||
@Log(title = "店员排行", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
return R.ok(playClerkRankingInfoService.deletePlayClerkRankingInfoByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
package com.starry.admin.modules.clerk.controller;
|
||||
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkTypeInfoEntity;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkTypeInfoAddVo;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkTypeInfoService;
|
||||
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-05-31
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/clerk/type")
|
||||
public class PlayClerkTypeInfoController {
|
||||
@Resource
|
||||
private IPlayClerkTypeInfoService playClerkTypeInfoService;
|
||||
|
||||
/**
|
||||
* 查询店员分类信息列表
|
||||
*/
|
||||
@GetMapping("/listByAll")
|
||||
public R listByAll() {
|
||||
return R.ok(playClerkTypeInfoService.selectByAll());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取店员分类信息详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{id}")
|
||||
public R getInfo(@PathVariable("id") String id) {
|
||||
return R.ok(playClerkTypeInfoService.selectPlayClerkTypeInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增店员分类信息
|
||||
*/
|
||||
@Log(title = "店员分类信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/create")
|
||||
public R create(@Validated @RequestBody PlayClerkTypeInfoAddVo vo) {
|
||||
boolean success = playClerkTypeInfoService.create(ConvertUtil.entityToVo(vo, PlayClerkTypeInfoEntity.class));
|
||||
if (success) {
|
||||
return R.ok();
|
||||
}
|
||||
return R.error("添加失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改店员分类信息
|
||||
*/
|
||||
@Log(title = "店员分类信息", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/update/{id}")
|
||||
public R update(@PathVariable String id, @RequestBody PlayClerkTypeInfoEntity playClerkTypeInfo) {
|
||||
playClerkTypeInfo.setId(id);
|
||||
boolean success = playClerkTypeInfoService.update(playClerkTypeInfo);
|
||||
if (success) {
|
||||
return R.ok();
|
||||
}
|
||||
return R.error("修改失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除店员分类信息
|
||||
*/
|
||||
@Log(title = "店员分类信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
return R.ok(playClerkTypeInfoService.deletePlayClerkTypeInfoByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -1,18 +1,16 @@
|
||||
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.entity.PlayClerkUserQueryVo;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkUserReturnVo;
|
||||
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.admin.modules.weichat.entity.clerk.PlayClerkUserInfoQueryVo;
|
||||
import com.starry.admin.modules.weichat.entity.clerk.PlayClerkUserInfoResultVo;
|
||||
import com.starry.common.annotation.Log;
|
||||
import com.starry.common.enums.BusinessType;
|
||||
import com.starry.common.result.R;
|
||||
@@ -44,8 +42,8 @@ public class PlayClerkUserInfoController {
|
||||
* 查询店员列表
|
||||
*/
|
||||
@PostMapping("listByPage")
|
||||
public R listByPage(PlayClerkUserInfoQueryVo vo) {
|
||||
IPage<PlayClerkUserListResultVo> list = playClerkUserInfoService.selectPlayClerkUserInfoByPage(vo);
|
||||
public R listByPage(@Validated @RequestBody PlayClerkUserQueryVo vo) {
|
||||
IPage<PlayClerkUserReturnVo> list = playClerkUserInfoService.selectByPage(vo);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
@@ -55,7 +53,7 @@ public class PlayClerkUserInfoController {
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public R list(PlayClerkUserInfoQueryVo vo) {
|
||||
IPage<PlayClerkUserListResultVo> list = playClerkUserInfoService.selectPlayClerkUserInfoByPage(vo);
|
||||
IPage<PlayClerkUserInfoResultVo> list = playClerkUserInfoService.selectPlayClerkUserInfoByPage(vo);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
@@ -67,43 +65,43 @@ public class PlayClerkUserInfoController {
|
||||
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("/wx/add")
|
||||
// public R add(@Validated @RequestBody PlayClerkUserAddToWxVo vo) {
|
||||
// //微信申请成为店员,需要先创建账户。
|
||||
// PlayUserInfoEntity userInfoEntity = ConvertUtil.entityToVo(vo, PlayUserInfoEntity.class);
|
||||
// userInfoEntity.setId(IdUtils.getUuid());
|
||||
// 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.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("添加失败");
|
||||
// }
|
||||
|
||||
/**
|
||||
* 修改店员
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.starry.admin.modules.clerk.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkUserReviewQueryVo;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkUserReviewReturnVo;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkUserReviewStateEditVo;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkUserReviewInfoService;
|
||||
import com.starry.common.annotation.Log;
|
||||
import com.starry.common.enums.BusinessType;
|
||||
import com.starry.common.result.R;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 店员资料审核Controller
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-19
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/clerk/user/review")
|
||||
public class PlayClerkUserReviewInfoController {
|
||||
@Resource
|
||||
private IPlayClerkUserReviewInfoService playClerkUserReviewInfoService;
|
||||
|
||||
/**
|
||||
* 查询店员资料审核列表
|
||||
*/
|
||||
@PostMapping("/listByPage")
|
||||
public R listByPage(@Validated @RequestBody PlayClerkUserReviewQueryVo vo) {
|
||||
IPage<PlayClerkUserReviewReturnVo> list = playClerkUserReviewInfoService.selectByPage(vo);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改店员资料审核
|
||||
*/
|
||||
@Log(title = "店员资料审核", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/update")
|
||||
public R update(@Validated @RequestBody PlayClerkUserReviewStateEditVo vo) {
|
||||
playClerkUserReviewInfoService.updateDataReviewState(vo);
|
||||
return R.ok("修改成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除店员资料审核
|
||||
*/
|
||||
@Log(title = "店员资料审核", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
return R.ok(playClerkUserReviewInfoService.deletePlayClerkUserReviewInfoByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
package com.starry.admin.modules.clerk.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkWagesDetailsInfoEntity;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkWagesDetailsInfoService;
|
||||
import com.starry.common.annotation.Log;
|
||||
import com.starry.common.enums.BusinessType;
|
||||
import com.starry.common.result.R;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 店员工资明细信息Controller
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-31
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/wages/details")
|
||||
public class PlayClerkWagesDetailsInfoController {
|
||||
@Resource
|
||||
private IPlayClerkWagesDetailsInfoService playClerkWagesDetailsInfoService;
|
||||
|
||||
/**
|
||||
* 查询店员工资明细信息列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public R list(PlayClerkWagesDetailsInfoEntity playClerkWagesDetailsInfo) {
|
||||
IPage<PlayClerkWagesDetailsInfoEntity> list = playClerkWagesDetailsInfoService.selectPlayClerkWagesDetailsInfoByPage(playClerkWagesDetailsInfo);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取店员工资明细信息详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{id}")
|
||||
public R getInfo(@PathVariable("id") String id) {
|
||||
return R.ok(playClerkWagesDetailsInfoService.selectPlayClerkWagesDetailsInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增店员工资明细信息
|
||||
*/
|
||||
@Log(title = "店员工资明细信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/create")
|
||||
public R create(@RequestBody PlayClerkWagesDetailsInfoEntity playClerkWagesDetailsInfo) {
|
||||
boolean success = playClerkWagesDetailsInfoService.create(playClerkWagesDetailsInfo);
|
||||
if (success) {
|
||||
return R.ok();
|
||||
}
|
||||
return R.error("添加失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改店员工资明细信息
|
||||
*/
|
||||
@Log(title = "店员工资明细信息", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/update/{id}")
|
||||
public R update(@PathVariable String id, @RequestBody PlayClerkWagesDetailsInfoEntity playClerkWagesDetailsInfo) {
|
||||
playClerkWagesDetailsInfo.setId(id);
|
||||
boolean success = playClerkWagesDetailsInfoService.update(playClerkWagesDetailsInfo);
|
||||
if (success) {
|
||||
return R.ok();
|
||||
}
|
||||
return R.error("修改失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除店员工资明细信息
|
||||
*/
|
||||
@Log(title = "店员工资明细信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
return R.ok(playClerkWagesDetailsInfoService.deletePlayClerkWagesDetailsInfoByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
package com.starry.admin.modules.clerk.controller;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.starry.admin.common.exception.CustomException;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkWagesDetailsInfoEntity;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkUnsettledWagesInfoQueryVo;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkUnsettledWagesInfoReturnVo;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkWagesInfoQueryVo;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkUserInfoService;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkWagesDetailsInfoService;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkWagesInfoService;
|
||||
import com.starry.admin.modules.order.module.entity.PlayOrderInfoEntity;
|
||||
import com.starry.admin.modules.weichat.entity.wages.ClerkWagesDetailsReturnVo;
|
||||
import com.starry.common.result.R;
|
||||
import com.starry.common.utils.ConvertUtil;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 店员工资结算信息Controller
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-31
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/clerk/wages")
|
||||
public class PlayClerkWagesInfoController {
|
||||
@Resource
|
||||
private IPlayClerkWagesInfoService playClerkWagesInfoService;
|
||||
|
||||
@Resource
|
||||
private IPlayClerkWagesDetailsInfoService playClerkWagesDetailsInfoService;
|
||||
|
||||
@Resource
|
||||
private IPlayClerkUserInfoService playClerkUserInfoService;
|
||||
|
||||
/**
|
||||
* 查询店员工资结算信息列表
|
||||
*/
|
||||
@PostMapping("/listByPage")
|
||||
public R list(@Validated @RequestBody PlayClerkWagesInfoQueryVo vo) {
|
||||
return R.ok(playClerkWagesInfoService.selectHistoricalByPage(vo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询店员工未结算工资
|
||||
*/
|
||||
@PostMapping("/listUnsettledWagesByPage")
|
||||
public R list(@Validated @RequestBody PlayClerkUnsettledWagesInfoQueryVo vo) {
|
||||
IPage<PlayClerkUnsettledWagesInfoReturnVo> page = playClerkUserInfoService.listUnsettledWagesByPage(vo);
|
||||
for (PlayClerkUnsettledWagesInfoReturnVo record : page.getRecords()) {
|
||||
Integer orderState1Number = 0;
|
||||
BigDecimal orderState1Money = BigDecimal.ZERO;
|
||||
Integer orderState2Number = 0;
|
||||
BigDecimal orderState2Money = BigDecimal.ZERO;
|
||||
BigDecimal orderState2Revenue = BigDecimal.ZERO;
|
||||
Integer orderState3Number = 0;
|
||||
BigDecimal orderState3Money = BigDecimal.ZERO;
|
||||
BigDecimal orderState3Revenue = BigDecimal.ZERO;
|
||||
for (PlayOrderInfoEntity orderInfoEntity : record.getOrderInfoEntities()) {
|
||||
if ("1".equals(orderInfoEntity.getOrderStatus())) {
|
||||
orderState1Number++;
|
||||
orderState1Money = orderState1Money.add(orderInfoEntity.getFinalAmount());
|
||||
} else if ("2".equals(orderInfoEntity.getOrderStatus())) {
|
||||
orderState2Number++;
|
||||
orderState2Money = orderState2Money.add(orderInfoEntity.getFinalAmount());
|
||||
orderState2Revenue = orderState2Revenue.add(orderInfoEntity.getEstimatedRevenue());
|
||||
} else if ("3".equals(orderInfoEntity.getOrderStatus())) {
|
||||
orderState3Number++;
|
||||
orderState3Money = orderState3Money.add(orderInfoEntity.getFinalAmount());
|
||||
orderState3Revenue = orderState3Revenue.add(orderInfoEntity.getEstimatedRevenue());
|
||||
}
|
||||
}
|
||||
record.setOrderState1Number(orderState1Number);
|
||||
record.setOrderState1Money(orderState1Money);
|
||||
record.setOrderState2Number(orderState2Number);
|
||||
record.setOrderState2Money(orderState2Money);
|
||||
record.setOrderState2Revenue(orderState2Revenue);
|
||||
record.setOrderState3Number(orderState3Number);
|
||||
record.setOrderState3Money(orderState3Money);
|
||||
record.setOrderState3Revenue(orderState3Revenue);
|
||||
}
|
||||
return R.ok(page);
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("queryWagesDetailsById")
|
||||
public R clerkQueryWagesDetails(@RequestParam("id") String id) {
|
||||
if (StrUtil.isBlankIfStr(id)) {
|
||||
throw new CustomException("ID不能为空");
|
||||
}
|
||||
List<PlayClerkWagesDetailsInfoEntity> list = playClerkWagesDetailsInfoService.selectByWagesId(id);
|
||||
List<ClerkWagesDetailsReturnVo> returnVos = new ArrayList<>(list.size());
|
||||
for (PlayClerkWagesDetailsInfoEntity entity : list) {
|
||||
returnVos.add(ConvertUtil.entityToVo(entity, ClerkWagesDetailsReturnVo.class));
|
||||
}
|
||||
return R.ok(returnVos);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
package com.starry.admin.modules.clerk.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayCustomArticleInfoEntity;
|
||||
import com.starry.admin.modules.clerk.service.IPlayCustomArticleInfoService;
|
||||
import com.starry.common.annotation.Log;
|
||||
import com.starry.common.enums.BusinessType;
|
||||
import com.starry.common.result.R;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 陪聊点赞动态信息Controller
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-04
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/custom/article")
|
||||
public class PlayCustomArticleInfoController {
|
||||
@Resource
|
||||
private IPlayCustomArticleInfoService playCustomArticleInfoService;
|
||||
|
||||
/**
|
||||
* 查询陪聊点赞动态信息列表
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('play:info:list')")
|
||||
@GetMapping("/list")
|
||||
public R list(PlayCustomArticleInfoEntity playCustomArticleInfo) {
|
||||
IPage<PlayCustomArticleInfoEntity> list = playCustomArticleInfoService.selectPlayCustomArticleInfoByPage(playCustomArticleInfo);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取陪聊点赞动态信息详细信息
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('play:info:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public R getInfo(@PathVariable("id") String id) {
|
||||
return R.ok(playCustomArticleInfoService.selectPlayCustomArticleInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增陪聊点赞动态信息
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('play:info:create')")
|
||||
@Log(title = "陪聊点赞动态信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/create")
|
||||
public R create(@RequestBody PlayCustomArticleInfoEntity playCustomArticleInfo) {
|
||||
boolean success = playCustomArticleInfoService.create(playCustomArticleInfo);
|
||||
if (success) {
|
||||
return R.ok();
|
||||
}
|
||||
return R.error("添加失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改陪聊点赞动态信息
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('play:info:edit')")
|
||||
@Log(title = "陪聊点赞动态信息", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/update/{id}")
|
||||
public R update(@PathVariable String id, @RequestBody PlayCustomArticleInfoEntity playCustomArticleInfo) {
|
||||
playCustomArticleInfo.setId(id);
|
||||
boolean success = playCustomArticleInfoService.update(playCustomArticleInfo);
|
||||
if (success) {
|
||||
return R.ok();
|
||||
}
|
||||
return R.error("修改失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除陪聊点赞动态信息
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('play:info:remove')")
|
||||
@Log(title = "陪聊点赞动态信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
return R.ok(playCustomArticleInfoService.deletePlayCustomArticleInfoByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.starry.admin.modules.clerk.mapper;
|
||||
|
||||
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkArticleInfoEntity;
|
||||
|
||||
/**
|
||||
* 店员动态信息Mapper接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-04
|
||||
*/
|
||||
public interface PlayClerkArticleInfoMapper extends MPJBaseMapper<PlayClerkArticleInfoEntity> {
|
||||
|
||||
|
||||
}
|
||||
@@ -1,16 +1,16 @@
|
||||
package com.starry.admin.modules.clerk.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkDataReviewInfoEntity;
|
||||
|
||||
/**
|
||||
* 店员资料审核Mapper接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-04-11
|
||||
* @since 2024-05-19
|
||||
*/
|
||||
public interface PlayClerkDataReviewInfoMapper extends BaseMapper<PlayClerkDataReviewInfoEntity> {
|
||||
public interface PlayClerkDataReviewInfoMapper extends MPJBaseMapper<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.PlayClerkGroupInfoEntity;
|
||||
|
||||
/**
|
||||
* 店员分组信息Mapper接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-31
|
||||
*/
|
||||
public interface PlayClerkGroupInfoMapper extends BaseMapper<PlayClerkGroupInfoEntity> {
|
||||
|
||||
|
||||
}
|
||||
@@ -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.PlayClerkGroupUserInfoEntity;
|
||||
|
||||
/**
|
||||
* 店员和分组关系Mapper接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-31
|
||||
*/
|
||||
public interface PlayClerkGroupUserInfoMapper extends BaseMapper<PlayClerkGroupUserInfoEntity> {
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.starry.admin.modules.clerk.mapper;
|
||||
|
||||
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkRankingInfoEntity;
|
||||
|
||||
/**
|
||||
* 店员排行Mapper接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-25
|
||||
*/
|
||||
public interface PlayClerkRankingInfoMapper extends MPJBaseMapper<PlayClerkRankingInfoEntity> {
|
||||
|
||||
|
||||
}
|
||||
@@ -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.PlayClerkTypeInfoEntity;
|
||||
|
||||
/**
|
||||
* 店员分类信息Mapper接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-31
|
||||
*/
|
||||
public interface PlayClerkTypeInfoMapper extends BaseMapper<PlayClerkTypeInfoEntity> {
|
||||
|
||||
|
||||
}
|
||||
@@ -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.PlayClerkTypeUserInfoEntity;
|
||||
|
||||
/**
|
||||
* 店员和分类关系Mapper接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-31
|
||||
*/
|
||||
public interface PlayClerkTypeUserInfoMapper extends BaseMapper<PlayClerkTypeUserInfoEntity> {
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.starry.admin.modules.clerk.mapper;
|
||||
|
||||
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkUserReviewInfoEntity;
|
||||
|
||||
/**
|
||||
* 店员资料审核Mapper接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-19
|
||||
*/
|
||||
public interface PlayClerkUserReviewInfoMapper extends MPJBaseMapper<PlayClerkUserReviewInfoEntity> {
|
||||
|
||||
|
||||
}
|
||||
@@ -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.PlayClerkWagesDetailsInfoEntity;
|
||||
|
||||
/**
|
||||
* 店员工资明细信息Mapper接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-31
|
||||
*/
|
||||
public interface PlayClerkWagesDetailsInfoMapper extends BaseMapper<PlayClerkWagesDetailsInfoEntity> {
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.starry.admin.modules.clerk.mapper;
|
||||
|
||||
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkWagesInfoEntity;
|
||||
|
||||
/**
|
||||
* 店员工资结算信息Mapper接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-31
|
||||
*/
|
||||
public interface PlayClerkWagesInfoMapper extends MPJBaseMapper<PlayClerkWagesInfoEntity> {
|
||||
|
||||
|
||||
}
|
||||
@@ -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.PlayCustomArticleInfoEntity;
|
||||
|
||||
/**
|
||||
* 陪聊点赞动态信息Mapper接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-04
|
||||
*/
|
||||
public interface PlayCustomArticleInfoMapper extends BaseMapper<PlayCustomArticleInfoEntity> {
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.starry.admin.modules.clerk.module.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.starry.admin.common.conf.StringTypeHandler;
|
||||
import com.starry.common.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 店员动态信息对象 play_clerk_article_info
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-04
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName(value = "play_clerk_article_info", autoResultMap = true)
|
||||
public class PlayClerkArticleInfoEntity extends BaseEntity<PlayClerkArticleInfoEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 陪聊用户ID
|
||||
*/
|
||||
private String clerkId;
|
||||
|
||||
/**
|
||||
* 动态内容
|
||||
*/
|
||||
private String articleCon;
|
||||
|
||||
|
||||
/**
|
||||
* 动态附件类型(0:图片;1:视频;2:音频)
|
||||
*/
|
||||
private String annexType;
|
||||
|
||||
/**
|
||||
* 动态附件内容
|
||||
*/
|
||||
@TableField(typeHandler = StringTypeHandler.class)
|
||||
private List<String> annexCon;
|
||||
|
||||
|
||||
/**
|
||||
* 发布时间
|
||||
*/
|
||||
private LocalDateTime releaseTime;
|
||||
|
||||
/**
|
||||
* 审核状态(0:未审核:1:审核通过,2:审核不通过)
|
||||
*/
|
||||
private String reviewState;
|
||||
|
||||
/**
|
||||
* 审核时间
|
||||
*/
|
||||
private LocalDateTime reviewTime;
|
||||
|
||||
/**
|
||||
* 备注(审核理由)
|
||||
*/
|
||||
private String reviewCon;
|
||||
|
||||
|
||||
}
|
||||
@@ -5,8 +5,6 @@ import com.starry.common.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 陪聊服务项目对象 play_clerk_commodity
|
||||
*
|
||||
@@ -32,33 +30,19 @@ public class PlayClerkCommodityEntity extends BaseEntity<PlayClerkCommodityEntit
|
||||
/**
|
||||
* 店员用户ID
|
||||
*/
|
||||
private String playUserId;
|
||||
private String clerkId;
|
||||
|
||||
/**
|
||||
* 服务项目ID
|
||||
*/
|
||||
private String commodityId;
|
||||
|
||||
/**
|
||||
* 项目类型
|
||||
*/
|
||||
private String commodityType;
|
||||
|
||||
/**
|
||||
* 项目名称
|
||||
* 服务项目名称
|
||||
*/
|
||||
private String commodityName;
|
||||
|
||||
/**
|
||||
* 项目价格
|
||||
*/
|
||||
private BigDecimal commodityPrice;
|
||||
|
||||
|
||||
/**
|
||||
* 服务时长(文字描述信息,不参与订单计算)
|
||||
*/
|
||||
private String serviceDuration;
|
||||
/**
|
||||
* 服务启动状态
|
||||
* 0:停用
|
||||
|
||||
@@ -4,7 +4,7 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 店员资料审核对象 play_clerk_data_review_info
|
||||
* 店员申请对象 play_clerk_data_review_info
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-04-11
|
||||
|
||||
@@ -1,21 +1,24 @@
|
||||
package com.starry.admin.modules.clerk.module.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.starry.admin.common.conf.StringTypeHandler;
|
||||
import com.starry.common.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 店员资料审核对象 play_clerk_data_review_info
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-04-11
|
||||
* @since 2024-05-19
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("play_clerk_data_review_info")
|
||||
@TableName(value = "play_clerk_data_review_info", autoResultMap = true)
|
||||
public class PlayClerkDataReviewInfoEntity extends BaseEntity<PlayClerkDataReviewInfoEntity> {
|
||||
|
||||
|
||||
@@ -32,55 +35,47 @@ public class PlayClerkDataReviewInfoEntity extends BaseEntity<PlayClerkDataRevie
|
||||
/**
|
||||
* 店员ID
|
||||
*/
|
||||
private String playUserId;
|
||||
private String clerkId;
|
||||
|
||||
/**
|
||||
* 店员头像
|
||||
*/
|
||||
private String clerkAvatar;
|
||||
|
||||
/**
|
||||
* 店员名称
|
||||
*/
|
||||
private String clerkNickname;
|
||||
|
||||
/**
|
||||
* 资料类型[0:店员申请,1:头像;2:相册;3:录音]
|
||||
* 资料类型[0:昵称;1:头像;2:相册;3:录音]
|
||||
*/
|
||||
private String dataType;
|
||||
|
||||
/**
|
||||
* 资料内容(JSON格式)
|
||||
* 资料内容
|
||||
*/
|
||||
private String content;
|
||||
@TableField(typeHandler = StringTypeHandler.class)
|
||||
private List<String> dataContent;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
* 0:未审核
|
||||
* 1:审核通过
|
||||
* 2:审核未通过
|
||||
* 审核状态(0:未审核:1:审核通过,2:审核不通过)
|
||||
*/
|
||||
private String state;
|
||||
private String reviewState;
|
||||
|
||||
/**
|
||||
* 资料添加时间
|
||||
*/
|
||||
private Date addTime;
|
||||
private LocalDateTime addTime;
|
||||
|
||||
/**
|
||||
* 审核时间
|
||||
*/
|
||||
private Date reviewTime;
|
||||
private LocalDateTime reviewTime;
|
||||
|
||||
/**
|
||||
* 审核人
|
||||
*/
|
||||
private String reviewBy;
|
||||
|
||||
/**
|
||||
* 审核内容
|
||||
*/
|
||||
private String reviewCon;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import lombok.EqualsAndHashCode;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 店员资料审核对象 play_clerk_data_review_info
|
||||
* 店员申请对象 play_clerk_data_review_info
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-04-11
|
||||
|
||||
@@ -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_group_info
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-31
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("play_clerk_group_info")
|
||||
public class PlayClerkGroupInfoEntity extends BaseEntity<PlayClerkGroupInfoEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 分组名称
|
||||
*/
|
||||
private String groupName;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Long sort;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.starry.admin.modules.clerk.module.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.starry.common.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 店员和分组关系对象 play_clerk_group_user_info
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-31
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("play_clerk_group_user_info")
|
||||
public class PlayClerkGroupUserInfoEntity extends BaseEntity<PlayClerkGroupUserInfoEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 分组ID
|
||||
*/
|
||||
private String groupId;
|
||||
|
||||
/**
|
||||
* 店员ID
|
||||
*/
|
||||
private String clerkId;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 创建人的id
|
||||
*/
|
||||
private String createdBy;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
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;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* 店员排行对象 play_clerk_ranking_info
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-25
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("play_clerk_ranking_info")
|
||||
public class PlayClerkRankingInfoEntity extends BaseEntity<PlayClerkRankingInfoEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 店员ID
|
||||
*/
|
||||
private String clerkId;
|
||||
|
||||
/**
|
||||
* 统计批次
|
||||
*/
|
||||
private Integer serialNumber;
|
||||
|
||||
/**
|
||||
* 排序名词
|
||||
*/
|
||||
private Integer rankingIndex;
|
||||
|
||||
/**
|
||||
* 开始统计时间
|
||||
*/
|
||||
private LocalDate startCountDate;
|
||||
|
||||
/**
|
||||
* 结束统计时间
|
||||
*/
|
||||
private LocalDate endCountDate;
|
||||
|
||||
/**
|
||||
* 订单总数
|
||||
*/
|
||||
private Integer orderNumber;
|
||||
|
||||
/**
|
||||
* 订单金额
|
||||
*/
|
||||
private BigDecimal orderMoney;
|
||||
|
||||
/**
|
||||
* 续单数
|
||||
*/
|
||||
private Integer orderContinueNumber;
|
||||
|
||||
/**
|
||||
* 续单金额
|
||||
*/
|
||||
private BigDecimal orderContinueMoney;
|
||||
|
||||
/**
|
||||
* 超时未接单数量
|
||||
*/
|
||||
private Integer ordersExpiredNumber = 0;
|
||||
|
||||
|
||||
/**
|
||||
* 距离前一名相差金额
|
||||
*/
|
||||
private BigDecimal previousMoney;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
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_type_info
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-31
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("play_clerk_type_info")
|
||||
public class PlayClerkTypeInfoEntity extends BaseEntity<PlayClerkTypeInfoEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 分类名称
|
||||
*/
|
||||
private String typeName;
|
||||
|
||||
/**
|
||||
* 是否在首页显示(0:不显示,1:显示)
|
||||
*/
|
||||
private String homeDisplayed;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
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_type_user_info
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-31
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("play_clerk_type_user_info")
|
||||
public class PlayClerkTypeUserInfoEntity extends BaseEntity<PlayClerkTypeUserInfoEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 分组ID
|
||||
*/
|
||||
private String typeId;
|
||||
|
||||
/**
|
||||
* 店员ID
|
||||
*/
|
||||
private String clerkId;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
}
|
||||
@@ -58,12 +58,21 @@ public class PlayClerkUserInfoEntity extends BaseEntity<PlayClerkUserInfoEntity>
|
||||
*/
|
||||
private String nickname;
|
||||
|
||||
/**
|
||||
* 是否固定等级(0:固定等级,1:不固定)
|
||||
*/
|
||||
private String fixingLevel;
|
||||
|
||||
/**
|
||||
* 分组ID
|
||||
*/
|
||||
private String groupId;
|
||||
|
||||
/**
|
||||
* 店员等级
|
||||
*/
|
||||
private String levelId;
|
||||
|
||||
|
||||
/**
|
||||
* 店员类型
|
||||
*/
|
||||
@@ -74,6 +83,11 @@ public class PlayClerkUserInfoEntity extends BaseEntity<PlayClerkUserInfoEntity>
|
||||
*/
|
||||
private String sex;
|
||||
|
||||
/**
|
||||
* 身份证号码
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
@@ -171,7 +185,7 @@ public class PlayClerkUserInfoEntity extends BaseEntity<PlayClerkUserInfoEntity>
|
||||
private String realState;
|
||||
|
||||
/**
|
||||
* 是否必须实名【1:必须实名,0:非必须实名】
|
||||
* 是否必须实名【0:非必须实名;1:必须实名;2:跟随店铺设置】
|
||||
*/
|
||||
private String mandatoryRealState;
|
||||
|
||||
@@ -210,5 +224,11 @@ public class PlayClerkUserInfoEntity extends BaseEntity<PlayClerkUserInfoEntity>
|
||||
@JsonIgnore
|
||||
private String token;
|
||||
|
||||
public PlayClerkUserInfoEntity() {
|
||||
}
|
||||
|
||||
public PlayClerkUserInfoEntity(String id, BigDecimal accountBalance) {
|
||||
this.id = id;
|
||||
this.accountBalance = accountBalance;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
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,133 @@
|
||||
package com.starry.admin.modules.clerk.module.entity;
|
||||
|
||||
import com.starry.common.domain.BasePageEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 店员对象 play_clerk_user_info
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-03-30
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class PlayClerkUserQueryVo extends BasePageEntity {
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 昵称
|
||||
*/
|
||||
private String nickname;
|
||||
|
||||
/**
|
||||
* 电话号码
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 分组ID
|
||||
*/
|
||||
private String groupId;
|
||||
|
||||
|
||||
/**
|
||||
* 性别[0:未知;1:男;2:女]
|
||||
*/
|
||||
private String sex;
|
||||
|
||||
|
||||
/**
|
||||
* 是否固定等级(0:固定等级,1:不固定)
|
||||
*/
|
||||
private String fixingLevel;
|
||||
|
||||
/**
|
||||
* 店员等级
|
||||
*/
|
||||
private String levelId;
|
||||
|
||||
/**
|
||||
* 年龄
|
||||
*/
|
||||
private List<Integer> ages;
|
||||
|
||||
/**
|
||||
* 所在国家
|
||||
*/
|
||||
private String country;
|
||||
|
||||
/**
|
||||
* 所在省份
|
||||
*/
|
||||
private String province;
|
||||
|
||||
/**
|
||||
* 所在城市
|
||||
*/
|
||||
private String city;
|
||||
|
||||
|
||||
/**
|
||||
* 在职状态(1:在职,0:离职)
|
||||
*/
|
||||
private String onboardingState = "1";
|
||||
|
||||
/**
|
||||
* 是否推荐状态(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;
|
||||
|
||||
/**
|
||||
* 是否必须实名【0:非必须实名;1:必须实名;2:跟随店铺设置】
|
||||
*/
|
||||
private String mandatoryRealState;
|
||||
|
||||
/**
|
||||
* 随机接单状态【1:允许,0:禁止】
|
||||
*/
|
||||
private String randomOrderState;
|
||||
|
||||
/**
|
||||
* 店员状态(0:不是陪聊,1:陪聊,2:资料审核中)
|
||||
*/
|
||||
private String clerkState = "1";
|
||||
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
private String code;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,15 +1,22 @@
|
||||
package com.starry.admin.modules.clerk.module.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.starry.admin.modules.order.module.entity.PlayOrderInfoEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 店员分页查询对象
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-03-30
|
||||
*/
|
||||
@Data
|
||||
public class PlayClerkUserListResultVo {
|
||||
public class PlayClerkUserReturnVo {
|
||||
|
||||
|
||||
/**
|
||||
* UUID
|
||||
@@ -32,6 +39,18 @@ public class PlayClerkUserListResultVo {
|
||||
private String levelName;
|
||||
|
||||
|
||||
/**
|
||||
* 分组ID
|
||||
*/
|
||||
private String groupId;
|
||||
|
||||
|
||||
/**
|
||||
* 分组ID
|
||||
*/
|
||||
private String groupName;
|
||||
|
||||
|
||||
/**
|
||||
* 性别[0:未知;1:男;2:女]
|
||||
*/
|
||||
@@ -42,13 +61,11 @@ public class PlayClerkUserListResultVo {
|
||||
*/
|
||||
private String avatar;
|
||||
|
||||
|
||||
/**
|
||||
* 音频
|
||||
*/
|
||||
private String audio;
|
||||
|
||||
|
||||
/**
|
||||
* 星座
|
||||
*/
|
||||
@@ -84,12 +101,6 @@ public class PlayClerkUserListResultVo {
|
||||
*/
|
||||
private String city;
|
||||
|
||||
|
||||
/**
|
||||
* 关注(0:未关注,1:已关注)
|
||||
*/
|
||||
private String followState = "0";
|
||||
|
||||
/**
|
||||
* 在线状态【1:在线,0:离线】
|
||||
*/
|
||||
@@ -100,14 +111,13 @@ public class PlayClerkUserListResultVo {
|
||||
*/
|
||||
private String listingState;
|
||||
|
||||
|
||||
/**
|
||||
* 实名状态【1:已实名,0:未实名】
|
||||
*/
|
||||
private String realState;
|
||||
|
||||
/**
|
||||
* 是否必须实名【1:必须实名,0:非必须实名,2:跟随店铺设置】
|
||||
* 是否必须实名【0:非必须实名;1:必须实名;2:跟随店铺设置】
|
||||
*/
|
||||
private String mandatoryRealState;
|
||||
|
||||
@@ -116,22 +126,31 @@ public class PlayClerkUserListResultVo {
|
||||
*/
|
||||
private String randomOrderState;
|
||||
|
||||
|
||||
/**
|
||||
* 服务项目
|
||||
*/
|
||||
private List<String> commodity;
|
||||
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 订单列表
|
||||
*/
|
||||
@JsonIgnore
|
||||
private List<PlayOrderInfoEntity> orderInfos;
|
||||
|
||||
/**
|
||||
* 最低消费
|
||||
* 订单总数
|
||||
*/
|
||||
private String latestConsumption = "最低1船票";
|
||||
private String orderNumber;
|
||||
|
||||
/**
|
||||
* 续单总数
|
||||
*/
|
||||
private String orderContinueNumber;
|
||||
|
||||
/**
|
||||
* 订单总金额
|
||||
*/
|
||||
private BigDecimal orderTotalAmount;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
package com.starry.admin.modules.clerk.module.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.starry.admin.common.conf.StringTypeHandler;
|
||||
import com.starry.common.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 店员申请对象 play_clerk_user_review_info
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-19
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName(value = "play_clerk_user_review_info", autoResultMap = true)
|
||||
public class PlayClerkUserReviewInfoEntity extends BaseEntity<PlayClerkUserReviewInfoEntity> {
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 店员ID
|
||||
*/
|
||||
private String clerkId;
|
||||
|
||||
/**
|
||||
* 微信号码
|
||||
*/
|
||||
private String weiChatCode;
|
||||
|
||||
/**
|
||||
* 手机号码
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 昵称
|
||||
*/
|
||||
private String nickname;
|
||||
|
||||
/**
|
||||
* 性别[0:未知;1:男;2:女]
|
||||
*/
|
||||
private String sex;
|
||||
|
||||
/**
|
||||
* 年龄
|
||||
*/
|
||||
private Integer age;
|
||||
|
||||
/**
|
||||
* 所在省份
|
||||
*/
|
||||
private String province;
|
||||
|
||||
/**
|
||||
* 所在城市
|
||||
*/
|
||||
private String city;
|
||||
|
||||
/**
|
||||
* 备注(相关经验)
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 音频
|
||||
*/
|
||||
private String audio;
|
||||
|
||||
/**
|
||||
* 照片
|
||||
*/
|
||||
@TableField(typeHandler = StringTypeHandler.class)
|
||||
private List<String> album;
|
||||
|
||||
/**
|
||||
* 申请时间
|
||||
*/
|
||||
private LocalDateTime addTime;
|
||||
|
||||
|
||||
/**
|
||||
* 审核状态(0:未审核:1:审核通过,2:审核不通过)
|
||||
*/
|
||||
private String reviewState;
|
||||
|
||||
/**
|
||||
* 审核时间
|
||||
*/
|
||||
private LocalDateTime reviewTime;
|
||||
|
||||
/**
|
||||
* 审核人
|
||||
*/
|
||||
private String reviewBy;
|
||||
|
||||
/**
|
||||
* 审核内容
|
||||
*/
|
||||
private String reviewCon;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
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;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 店员工资明细信息对象 play_clerk_wages_details_info
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-31
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("play_clerk_wages_details_info")
|
||||
public class PlayClerkWagesDetailsInfoEntity extends BaseEntity<PlayClerkWagesDetailsInfoEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 工资统计ID
|
||||
*/
|
||||
private String wagesId;
|
||||
|
||||
/**
|
||||
* 店员ID
|
||||
*/
|
||||
private String clerkId;
|
||||
|
||||
/**
|
||||
* 订单ID
|
||||
*/
|
||||
private String orderId;
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
private String orderNo;
|
||||
|
||||
/**
|
||||
* 订单最终金额(支付金额)
|
||||
*/
|
||||
private BigDecimal finalAmount;
|
||||
|
||||
/**
|
||||
* 店员收入
|
||||
*/
|
||||
private BigDecimal estimatedRevenue;
|
||||
|
||||
/**
|
||||
* 订单完成时间
|
||||
*/
|
||||
private LocalDateTime endOrderTime;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
package com.starry.admin.modules.clerk.module.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.starry.common.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* 店员工资结算信息对象 play_clerk_wages_info
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-31
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("play_clerk_wages_info")
|
||||
public class PlayClerkWagesInfoEntity extends BaseEntity<PlayClerkWagesInfoEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 店员ID
|
||||
*/
|
||||
private String clerkId;
|
||||
|
||||
|
||||
/**
|
||||
* 是否为往期统计(1:是;0:不是)
|
||||
**/
|
||||
private String historicalStatistics;
|
||||
|
||||
/**
|
||||
* 统计序号
|
||||
*/
|
||||
private Long serialNumber;
|
||||
|
||||
/**
|
||||
* 排行序号
|
||||
*/
|
||||
private Long rankingIndex;
|
||||
|
||||
/**
|
||||
* 开始统计时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
private LocalDate startCountDate;
|
||||
|
||||
/**
|
||||
* 结束统计时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
private LocalDate endCountDate;
|
||||
|
||||
|
||||
/**
|
||||
* 结算时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
private LocalDate settlementDate;
|
||||
|
||||
/**
|
||||
* 订单总数
|
||||
*/
|
||||
private Integer orderNumber;
|
||||
|
||||
/**
|
||||
* 订单金额
|
||||
*/
|
||||
private BigDecimal finalAmount;
|
||||
|
||||
/**
|
||||
* 续单数
|
||||
*/
|
||||
private Integer orderContinueNumber;
|
||||
|
||||
/**
|
||||
* 续单比例
|
||||
*/
|
||||
private double orderContinueProportion = 0.0;
|
||||
|
||||
/**
|
||||
* 续单金额
|
||||
*/
|
||||
private BigDecimal orderContinueMoney;
|
||||
|
||||
/**
|
||||
* 超时未接单数
|
||||
*/
|
||||
private Integer ordersExpiredNumber;
|
||||
|
||||
/**
|
||||
* 店员收入
|
||||
*/
|
||||
private BigDecimal estimatedRevenue;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
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.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 陪聊点赞动态信息对象 play_custom_article_info
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-04
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("play_custom_article_info")
|
||||
public class PlayCustomArticleInfoEntity extends BaseEntity<PlayCustomArticleInfoEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 动态ID
|
||||
*/
|
||||
private String articleId;
|
||||
|
||||
/**
|
||||
* 店员ID
|
||||
*/
|
||||
private String clerkId;
|
||||
|
||||
/**
|
||||
* 顾客ID
|
||||
*/
|
||||
private String customId;
|
||||
|
||||
/**
|
||||
* 点赞时间
|
||||
*/
|
||||
private LocalDateTime endorseTime;
|
||||
|
||||
/**
|
||||
* 赞同状态(1:赞同,0:未赞同)
|
||||
*/
|
||||
private String endorseState;
|
||||
|
||||
|
||||
/**
|
||||
* 操作类型(1:关注;0:收藏)
|
||||
*/
|
||||
private String endorseType;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.starry.admin.modules.clerk.module.vo;
|
||||
|
||||
import com.starry.common.domain.BasePageEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
* 动态信息查询对象
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class PlayClerkArticleQueryVo extends BasePageEntity {
|
||||
|
||||
private String id;
|
||||
|
||||
|
||||
/**
|
||||
* 店员ID
|
||||
*/
|
||||
private String clerkId;
|
||||
/**
|
||||
* 审核状态(0:未审核:1:审核通过,2:审核不通过)
|
||||
*/
|
||||
private String reviewState;
|
||||
|
||||
/**
|
||||
* 发布时间
|
||||
*/
|
||||
private List<String> releaseTime;
|
||||
|
||||
|
||||
/**
|
||||
* 顾客ID
|
||||
*/
|
||||
private String customId;
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
package com.starry.admin.modules.clerk.module.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayCustomArticleInfoEntity;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
* 动态信息查询返回对象
|
||||
*/
|
||||
@Data
|
||||
public class PlayClerkArticleReturnVo {
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
private String id;
|
||||
/**
|
||||
* 陪聊用户ID
|
||||
*/
|
||||
private String clerkId;
|
||||
|
||||
/**
|
||||
* 陪聊用户昵称
|
||||
*/
|
||||
private String clerkNickname;
|
||||
|
||||
/**
|
||||
* 陪聊用户头像
|
||||
*/
|
||||
private String clerkAvatar;
|
||||
|
||||
/**
|
||||
* 动态内容
|
||||
*/
|
||||
private String articleCon;
|
||||
|
||||
|
||||
/**
|
||||
* 动态附件类型(0:图片;1:视频;2:音频)
|
||||
*/
|
||||
private String annexType;
|
||||
|
||||
/**
|
||||
* 动态附件内容
|
||||
*/
|
||||
private List<String> annexCon;
|
||||
|
||||
|
||||
/**
|
||||
* 发布时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private LocalDateTime releaseTime;
|
||||
|
||||
/**
|
||||
* 备注(审核理由)
|
||||
*/
|
||||
private String reviewCon;
|
||||
|
||||
/**
|
||||
* 点赞人数
|
||||
*/
|
||||
private Integer agreedQuantity = 0;
|
||||
|
||||
/**
|
||||
* 审核状态(0:未审核:1:审核通过,2:审核不通过)
|
||||
*/
|
||||
private String reviewState;
|
||||
|
||||
/**
|
||||
* 陪聊点赞动态
|
||||
*/
|
||||
@JsonIgnore
|
||||
private List<PlayCustomArticleInfoEntity> articleInfoEntities;
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.starry.admin.modules.clerk.module.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Pattern;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
* 动态审核
|
||||
*/
|
||||
@Data
|
||||
public class PlayClerkArticleReviewStateEditVo {
|
||||
|
||||
|
||||
@NotBlank(message = "ID不能为空")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 审核状态(0:未审核:1:审核通过,2:审核不通过)
|
||||
*/
|
||||
@NotBlank(message = "审核状态不能为空")
|
||||
@Pattern(regexp = "[12]", message = "审核状态必须为1或2")
|
||||
private String reviewState;
|
||||
|
||||
/**
|
||||
* 发布时间
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 审核时间
|
||||
*/
|
||||
private LocalDateTime reviewTime = LocalDateTime.now();
|
||||
}
|
||||
@@ -20,4 +20,9 @@ public class PlayClerkCommodityQueryVo {
|
||||
* 1:启用
|
||||
*/
|
||||
private String enablingState;
|
||||
|
||||
public PlayClerkCommodityQueryVo(String commodityType, String enablingState) {
|
||||
this.commodityType = commodityType;
|
||||
this.enablingState = enablingState;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.starry.admin.modules.clerk.module.vo;
|
||||
|
||||
import com.starry.common.domain.BasePageEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 店员资料审核对象 play_clerk_data_review_info
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-19
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class PlayClerkDataReviewQueryVo extends BasePageEntity {
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
private String clerkId;
|
||||
|
||||
/**
|
||||
* 资料类型[0:昵称;1:头像;2:相册;3:录音]
|
||||
*/
|
||||
private String dataType;
|
||||
|
||||
/**
|
||||
* 审核状态(0:未审核:1:审核通过,2:审核不通过)
|
||||
*/
|
||||
private String reviewState;
|
||||
|
||||
/**
|
||||
* 资料添加时间
|
||||
*/
|
||||
private List<String> addTime;
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
package com.starry.admin.modules.clerk.module.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 店员资料审核对象 play_clerk_data_review_info
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-19
|
||||
*/
|
||||
@Data
|
||||
public class PlayClerkDataReviewReturnVo {
|
||||
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
|
||||
/**
|
||||
* 店员ID
|
||||
*/
|
||||
private String clerkId;
|
||||
|
||||
/**
|
||||
* 店员昵称
|
||||
*/
|
||||
private String clerkNickname;
|
||||
|
||||
/**
|
||||
* 店员头像
|
||||
*/
|
||||
private String clerkAvatar;
|
||||
|
||||
|
||||
/**
|
||||
* 资料类型[0:昵称;1:头像;2:相册;3:录音]
|
||||
*/
|
||||
private String dateType;
|
||||
|
||||
/**
|
||||
* 资料内容
|
||||
*/
|
||||
private List<String> dateContent;
|
||||
|
||||
/**
|
||||
* 审核状态(0:未审核:1:审核通过,2:审核不通过)
|
||||
*/
|
||||
private String reviewState;
|
||||
|
||||
/**
|
||||
* 资料添加时间
|
||||
*/
|
||||
private LocalDateTime addTime;
|
||||
|
||||
/**
|
||||
* 审核时间
|
||||
*/
|
||||
private LocalDateTime reviewTime;
|
||||
|
||||
/**
|
||||
* 审核人
|
||||
*/
|
||||
private String reviewBy;
|
||||
|
||||
/**
|
||||
* 审核内容
|
||||
*/
|
||||
private String reviewCon;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.starry.admin.modules.clerk.module.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Pattern;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
* 动态审核
|
||||
*/
|
||||
@Data
|
||||
public class PlayClerkDataReviewStateEditVo {
|
||||
|
||||
|
||||
@NotBlank(message = "ID不能为空")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 审核状态(0:未审核:1:审核通过,2:审核不通过)
|
||||
*/
|
||||
@NotBlank(message = "审核状态不能为空")
|
||||
@Pattern(regexp = "[12]", message = "审核状态必须为1或2")
|
||||
private String reviewState;
|
||||
|
||||
/**
|
||||
* 审核内容
|
||||
*/
|
||||
private String reviewCon;
|
||||
|
||||
/**
|
||||
* 审核时间
|
||||
*/
|
||||
private LocalDateTime reviewTime = LocalDateTime.now();
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.starry.admin.modules.clerk.module.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
* @since 2024/6/2 下午5:59
|
||||
**/
|
||||
@Data
|
||||
public class PlayClerkTypeInfoAddVo {
|
||||
|
||||
|
||||
/**
|
||||
* 分类名称
|
||||
*/
|
||||
@NotNull(message = "分类名称不能为空")
|
||||
private String typeName;
|
||||
|
||||
/**
|
||||
* 是否在首页显示(0:不显示,1:显示)
|
||||
*/
|
||||
@NotNull(message = "是否在首页显示不能为空")
|
||||
private String homeDisplayed;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@NotNull(message = "排序不能为空")
|
||||
private Integer sort;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.starry.admin.modules.clerk.module.vo;
|
||||
|
||||
import com.starry.common.domain.BasePageEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
* @since 2024/6/3 下午10:08
|
||||
**/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class PlayClerkUnsettledWagesInfoQueryVo extends BasePageEntity {
|
||||
|
||||
/**
|
||||
* 店员ID
|
||||
*/
|
||||
private String clerkId;
|
||||
|
||||
/**
|
||||
* 店员上架状态
|
||||
*/
|
||||
private String listingState;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package com.starry.admin.modules.clerk.module.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.starry.admin.modules.order.module.entity.PlayOrderInfoEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
* @since 2024/6/3 下午10:08
|
||||
**/
|
||||
@Data
|
||||
public class PlayClerkUnsettledWagesInfoReturnVo {
|
||||
|
||||
private String clerkId;
|
||||
|
||||
|
||||
private String clerkNickname;
|
||||
|
||||
@JsonIgnore
|
||||
private List<PlayOrderInfoEntity> orderInfoEntities;
|
||||
|
||||
|
||||
/**
|
||||
* 待开始订单-数量
|
||||
*/
|
||||
private Integer orderState1Number;
|
||||
|
||||
|
||||
/**
|
||||
* 待开始订单-金额
|
||||
*/
|
||||
private BigDecimal orderState1Money;
|
||||
|
||||
|
||||
/**
|
||||
* 服务中订单-数量
|
||||
*/
|
||||
private Integer orderState2Number;
|
||||
|
||||
|
||||
/**
|
||||
* 服务中订单-金额
|
||||
*/
|
||||
private BigDecimal orderState2Money;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 服务中订单-店员收入
|
||||
*/
|
||||
private BigDecimal orderState2Revenue;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 已完成未结算订单-数量
|
||||
*/
|
||||
private Integer orderState3Number;
|
||||
|
||||
|
||||
/**
|
||||
* 已完成未结算订单-金额
|
||||
*/
|
||||
private BigDecimal orderState3Money;
|
||||
|
||||
/**
|
||||
* 已完成未结算订单-店员收入
|
||||
*/
|
||||
private BigDecimal orderState3Revenue;
|
||||
|
||||
}
|
||||
@@ -20,7 +20,7 @@ public class PlayClerkUserAddToWxVo {
|
||||
|
||||
|
||||
/**
|
||||
* 店员性别(1:男:0:女)
|
||||
* 性别[0:未知;1:男;2:女]
|
||||
*/
|
||||
@NotNull(message = "性别不能为空")
|
||||
private Integer sex;
|
||||
|
||||
@@ -36,7 +36,7 @@ public class PlayClerkUserAddVo {
|
||||
private String levelId;
|
||||
|
||||
/**
|
||||
* 店员性别(1:男:0:女)
|
||||
* 性别[0:未知;1:男;2:女]
|
||||
*/
|
||||
@NotNull(message = "性别不能为空")
|
||||
private Integer sex;
|
||||
|
||||
@@ -42,7 +42,7 @@ public class PlayClerkUserEditVo {
|
||||
private String levelId;
|
||||
|
||||
/**
|
||||
* 店员性别(1:男:0:女)
|
||||
* 性别[0:未知;1:男;2:女]
|
||||
*/
|
||||
@NotNull(message = "性别不能为空")
|
||||
private String sex;
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
package com.starry.admin.modules.clerk.module.vo;
|
||||
|
||||
import com.starry.common.domain.BasePageEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 店员申请审核
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024/5/19 下午4:21
|
||||
**/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class PlayClerkUserReviewQueryVo extends BasePageEntity {
|
||||
|
||||
/**
|
||||
* 店员ID
|
||||
*/
|
||||
private String clerkId;
|
||||
|
||||
|
||||
/**
|
||||
* 店员昵称
|
||||
*/
|
||||
private String nickname;
|
||||
|
||||
|
||||
/**
|
||||
* 性别[0:未知;1:男;2:女]
|
||||
*/
|
||||
private String sex;
|
||||
|
||||
|
||||
/**
|
||||
* 手机号码
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
|
||||
/**
|
||||
* 微信号
|
||||
*/
|
||||
private String weiChatCode;
|
||||
|
||||
/**
|
||||
* 审核状态(0:未审核:1:审核通过,2:审核不通过)
|
||||
*/
|
||||
private String reviewState;
|
||||
|
||||
/**
|
||||
* 申请时间
|
||||
*/
|
||||
private List<String> addTime;
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
package com.starry.admin.modules.clerk.module.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.starry.admin.common.conf.StringTypeHandler;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 店员申请审核
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024/5/19 下午4:21
|
||||
**/
|
||||
@Data
|
||||
public class PlayClerkUserReviewReturnVo {
|
||||
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 店员ID
|
||||
*/
|
||||
private String clerkId;
|
||||
|
||||
/**
|
||||
* 店员昵称
|
||||
*/
|
||||
private String clerkNickname;
|
||||
|
||||
/**
|
||||
* 店员头像
|
||||
*/
|
||||
private String clerkAvatar;
|
||||
|
||||
/**
|
||||
* 微信号码
|
||||
*/
|
||||
private String weiChatCode;
|
||||
|
||||
/**
|
||||
* 手机号码
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 昵称
|
||||
*/
|
||||
private String nickname;
|
||||
|
||||
/**
|
||||
* 性别[0:未知;1:男;2:女]
|
||||
*/
|
||||
private String sex;
|
||||
|
||||
/**
|
||||
* 年龄
|
||||
*/
|
||||
private Integer age;
|
||||
|
||||
/**
|
||||
* 所在省份
|
||||
*/
|
||||
private String province;
|
||||
|
||||
/**
|
||||
* 所在城市
|
||||
*/
|
||||
private String city;
|
||||
|
||||
/**
|
||||
* 备注(相关经验)
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 音频
|
||||
*/
|
||||
private String audio;
|
||||
|
||||
/**
|
||||
* 照片
|
||||
*/
|
||||
@TableField(typeHandler = StringTypeHandler.class)
|
||||
private List<String> album = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* 申请时间
|
||||
*/
|
||||
private LocalDateTime addTime;
|
||||
|
||||
/**
|
||||
* 审核状态(0:未审核:1:审核通过,2:审核不通过)
|
||||
*/
|
||||
private String reviewState;
|
||||
|
||||
/**
|
||||
* 审核时间
|
||||
*/
|
||||
private LocalDateTime reviewTime;
|
||||
|
||||
/**
|
||||
* 审核人
|
||||
*/
|
||||
private String reviewBy;
|
||||
|
||||
/**
|
||||
* 审核内容
|
||||
*/
|
||||
private String reviewCon;
|
||||
|
||||
/**
|
||||
* 个性签名
|
||||
*/
|
||||
private String signature;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.starry.admin.modules.clerk.module.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Pattern;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
* 动态审核
|
||||
*/
|
||||
@Data
|
||||
public class PlayClerkUserReviewStateEditVo {
|
||||
|
||||
|
||||
@NotBlank(message = "ID不能为空")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 审核状态(0:未审核:1:审核通过,2:审核不通过)
|
||||
*/
|
||||
@NotBlank(message = "审核状态不能为空")
|
||||
@Pattern(regexp = "[12]", message = "审核状态必须为1或2")
|
||||
private String reviewState;
|
||||
|
||||
/**
|
||||
* 发布时间
|
||||
*/
|
||||
private String reviewCon;
|
||||
|
||||
/**
|
||||
* 审核时间
|
||||
*/
|
||||
private LocalDateTime reviewTime = LocalDateTime.now();
|
||||
}
|
||||
@@ -48,7 +48,7 @@ public class PlayClerkUserStateEditVo {
|
||||
private String realState;
|
||||
|
||||
/**
|
||||
* 是否必须实名【1:必须实名,0:非必须实名】
|
||||
* 是否必须实名【0:非必须实名;1:必须实名;2:跟随店铺设置】
|
||||
*/
|
||||
private String mandatoryRealState;
|
||||
|
||||
@@ -57,5 +57,15 @@ public class PlayClerkUserStateEditVo {
|
||||
*/
|
||||
private String randomOrderState;
|
||||
|
||||
/**
|
||||
* 是否固定等级(0:固定等级,1:不固定)
|
||||
*/
|
||||
private String fixingLevel;
|
||||
|
||||
|
||||
/**
|
||||
* 在职状态(1:在职,0:离职)
|
||||
*/
|
||||
private String onboardingState = "1";
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.starry.admin.modules.clerk.module.vo;
|
||||
|
||||
import com.starry.common.domain.BasePageEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
* @since 2024/6/3 下午10:08
|
||||
**/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class PlayClerkWagesInfoQueryVo extends BasePageEntity {
|
||||
|
||||
/**
|
||||
* 店员ID
|
||||
*/
|
||||
private String clerkId;
|
||||
|
||||
/**
|
||||
* 店员分组
|
||||
*/
|
||||
private String groupId;
|
||||
/**
|
||||
* 店员上架状态
|
||||
*/
|
||||
private String listingState;
|
||||
|
||||
/**
|
||||
* 统计时间
|
||||
*/
|
||||
private String settlementDate;
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
package com.starry.admin.modules.clerk.module.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
* @since 2024/6/3 下午10:08
|
||||
**/
|
||||
@Data
|
||||
public class PlayClerkWagesInfoReturnVo {
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 店员ID
|
||||
*/
|
||||
private String clerkId;
|
||||
|
||||
|
||||
/**
|
||||
* 店员昵称
|
||||
*/
|
||||
private String clerkNickname;
|
||||
|
||||
|
||||
/**
|
||||
* 是否为往期统计(1:是;0:不是)
|
||||
**/
|
||||
private String historicalStatistics;
|
||||
|
||||
/**
|
||||
* 统计序号
|
||||
*/
|
||||
private Long serialNumber;
|
||||
|
||||
/**
|
||||
* 排行序号
|
||||
*/
|
||||
private Long rankingIndex;
|
||||
|
||||
/**
|
||||
* 开始统计时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
private LocalDate startCountDate;
|
||||
|
||||
/**
|
||||
* 结束统计时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
private LocalDate endCountDate;
|
||||
|
||||
|
||||
/**
|
||||
* 结算时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
private LocalDateTime settlementDate;
|
||||
|
||||
/**
|
||||
* 订单总数
|
||||
*/
|
||||
private Integer orderNumber;
|
||||
|
||||
/**
|
||||
* 订单金额
|
||||
*/
|
||||
private BigDecimal finalAmount;
|
||||
|
||||
/**
|
||||
* 续单数
|
||||
*/
|
||||
private Integer orderContinueNumber;
|
||||
|
||||
/**
|
||||
* 续单金额
|
||||
*/
|
||||
private BigDecimal orderContinueMoney;
|
||||
|
||||
/**
|
||||
* 超时未接单数
|
||||
*/
|
||||
private Integer ordersExpiredNumber;
|
||||
|
||||
|
||||
/**
|
||||
* 店员收入
|
||||
*/
|
||||
private BigDecimal estimatedRevenue = BigDecimal.ZERO;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
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.PlayClerkArticleInfoEntity;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkArticleQueryVo;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkArticleReturnVo;
|
||||
import com.starry.admin.modules.weichat.entity.article.PlayClerkArticleCustomQueryVo;
|
||||
import com.starry.admin.modules.weichat.entity.article.PlayClerkArticleCustomReturnVo;
|
||||
|
||||
|
||||
/**
|
||||
* 店员动态信息Service接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-04
|
||||
*/
|
||||
public interface IPlayClerkArticleInfoService extends IService<PlayClerkArticleInfoEntity> {
|
||||
/**
|
||||
* 查询店员动态信息
|
||||
*
|
||||
* @param id 店员动态信息主键
|
||||
* @return 店员动态信息
|
||||
*/
|
||||
PlayClerkArticleInfoEntity selectPlayClerkArticleInfoById(String id);
|
||||
|
||||
|
||||
/**
|
||||
* 查询店员动态信息列表
|
||||
*
|
||||
* @param vo 店员动态信息查询对象
|
||||
* @return 店员动态信息集合
|
||||
*/
|
||||
IPage<PlayClerkArticleReturnVo> selectByPage(PlayClerkArticleQueryVo vo);
|
||||
|
||||
|
||||
/**
|
||||
* 顾客查询动态列表
|
||||
*
|
||||
* @param customId 顾客ID
|
||||
* @param customId 动态查询对象
|
||||
* @return PlayClerkArticleCustomReturnVo
|
||||
*/
|
||||
IPage<PlayClerkArticleCustomReturnVo> customSelectByPage(PlayClerkArticleCustomQueryVo vo, String customId);
|
||||
|
||||
|
||||
/**
|
||||
* 新增店员动态信息
|
||||
*
|
||||
* @param playClerkArticleInfo 店员动态信息
|
||||
* @return 结果
|
||||
*/
|
||||
boolean create(PlayClerkArticleInfoEntity playClerkArticleInfo);
|
||||
|
||||
/**
|
||||
* 修改店员动态信息
|
||||
*
|
||||
* @param playClerkArticleInfo 店员动态信息
|
||||
* @return 结果
|
||||
*/
|
||||
boolean update(PlayClerkArticleInfoEntity playClerkArticleInfo);
|
||||
|
||||
/**
|
||||
* 批量删除店员动态信息
|
||||
*
|
||||
* @param ids 需要删除的店员动态信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayClerkArticleInfoByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除店员动态信息信息
|
||||
*
|
||||
* @param id 店员动态信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayClerkArticleInfoById(String id);
|
||||
}
|
||||
@@ -27,17 +27,19 @@ public interface IPlayClerkCommodityService extends IService<PlayClerkCommodityE
|
||||
* 根据用户ID,查询当前用户的服务项目类型
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @param enablingState 服务启动状态[0:停用;1:启用]
|
||||
* @return 服务项目类型
|
||||
*/
|
||||
List<String> getClerkCommodityList(String userId);
|
||||
List<String> getClerkCommodityList(String userId,String enablingState);
|
||||
|
||||
/**
|
||||
* 根据用户ID,查询当前用户的服务项目类型
|
||||
* 根据用户ID,查询当前店员所有服务项目
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @param enablingState 服务启动状态[0:停用;1:启用]
|
||||
* @return List<PlayClerkCommodityEntity>
|
||||
*/
|
||||
List<PlayClerkCommodityEntity> selectCommodityTypeByUser(String userId);
|
||||
List<PlayClerkCommodityEntity> selectCommodityTypeByUser(String userId, String enablingState);
|
||||
|
||||
/**
|
||||
* 根据用户ID,查询当前用户的服务项目
|
||||
|
||||
@@ -3,7 +3,9 @@ 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 com.starry.admin.modules.clerk.module.vo.PlayClerkDataReviewQueryVo;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkDataReviewReturnVo;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkDataReviewStateEditVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -11,44 +13,49 @@ import java.util.List;
|
||||
* 店员资料审核Service接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-04-11
|
||||
* @since 2024-05-19
|
||||
*/
|
||||
public interface IPlayClerkDataReviewInfoService extends IService<PlayClerkDataReviewInfoEntity> {
|
||||
/**
|
||||
* 查询店员资料审核
|
||||
*
|
||||
* @param id 店员资料审核主键
|
||||
* @return 店员资料审核
|
||||
*/
|
||||
PlayClerkDataReviewInfoEntity selectPlayClerkDataReviewInfoById(String id);
|
||||
|
||||
List<PlayClerkDataReviewInfoEntity> queryByClerkId(String clerkId);
|
||||
|
||||
/**
|
||||
* 查询店员资料审核列表
|
||||
*
|
||||
* @param entity 店员资料审核
|
||||
* @return 店员资料审核集合
|
||||
* 查询店员资料申请
|
||||
* @param clerkId 店员ID
|
||||
* @param dataType 资料类型[0:昵称;1:头像;2:相册;3:录音]
|
||||
* @param reviewState 审核状态(0:未审核:1:审核通过,2:审核不通过)
|
||||
* @return PlayClerkDataReviewInfoEntity
|
||||
*/
|
||||
List<PlayClerkDataReviewInfoEntity> queryList(PlayClerkDataReviewInfoEntity entity);
|
||||
PlayClerkDataReviewInfoEntity queryByClerkId(String clerkId, String dataType, String reviewState);
|
||||
|
||||
/**
|
||||
* 查询店员资料审核列表
|
||||
*
|
||||
* @param playClerkDataReviewInfo 店员资料审核
|
||||
* @param vo 店员资料审核
|
||||
* @return 店员资料审核集合
|
||||
*/
|
||||
IPage<PlayClerkDataReviewInfoEntity> selectPlayClerkDataReviewInfoByPage(PlayClerkDataReviewInfoQueryVo playClerkDataReviewInfo);
|
||||
IPage<PlayClerkDataReviewReturnVo> selectByPage(PlayClerkDataReviewQueryVo vo);
|
||||
|
||||
/**
|
||||
* 新增店员资料审核
|
||||
*
|
||||
* @param playClerkDataReviewInfo 店员资料审核
|
||||
* @return 结果
|
||||
*/
|
||||
boolean create(PlayClerkDataReviewInfoEntity playClerkDataReviewInfo);
|
||||
|
||||
/**
|
||||
* 修改店员资料审核
|
||||
* 修改店员资料审核状态
|
||||
*
|
||||
* @param vo PlayClerkDataReviewStateEditVo
|
||||
*/
|
||||
void updateDataReviewState(PlayClerkDataReviewStateEditVo vo);
|
||||
/**
|
||||
* 修改店员资料审核
|
||||
* @param playClerkDataReviewInfo 店员资料审核
|
||||
* @return 结果
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
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.PlayClerkGroupInfoEntity;
|
||||
|
||||
/**
|
||||
* 店员分组信息Service接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-31
|
||||
*/
|
||||
public interface IPlayClerkGroupInfoService extends IService<PlayClerkGroupInfoEntity> {
|
||||
/**
|
||||
* 查询店员分组信息
|
||||
*
|
||||
* @param id 店员分组信息主键
|
||||
* @return 店员分组信息
|
||||
*/
|
||||
PlayClerkGroupInfoEntity selectPlayClerkGroupInfoById(String id);
|
||||
|
||||
/**
|
||||
* 查询店员分组信息列表
|
||||
*
|
||||
* @param playClerkGroupInfo 店员分组信息
|
||||
* @return 店员分组信息集合
|
||||
*/
|
||||
IPage<PlayClerkGroupInfoEntity> selectPlayClerkGroupInfoByPage(PlayClerkGroupInfoEntity playClerkGroupInfo);
|
||||
|
||||
/**
|
||||
* 新增店员分组信息
|
||||
*
|
||||
* @param playClerkGroupInfo 店员分组信息
|
||||
* @return 结果
|
||||
*/
|
||||
boolean create(PlayClerkGroupInfoEntity playClerkGroupInfo);
|
||||
|
||||
/**
|
||||
* 修改店员分组信息
|
||||
*
|
||||
* @param playClerkGroupInfo 店员分组信息
|
||||
* @return 结果
|
||||
*/
|
||||
boolean update(PlayClerkGroupInfoEntity playClerkGroupInfo);
|
||||
|
||||
/**
|
||||
* 批量删除店员分组信息
|
||||
*
|
||||
* @param ids 需要删除的店员分组信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayClerkGroupInfoByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除店员分组信息信息
|
||||
*
|
||||
* @param id 店员分组信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayClerkGroupInfoById(String id);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.starry.admin.modules.clerk.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkGroupUserInfoEntity;
|
||||
|
||||
/**
|
||||
* 店员和分组关系Service接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-31
|
||||
*/
|
||||
public interface IPlayClerkGroupUserInfoService extends IService<PlayClerkGroupUserInfoEntity> {
|
||||
/**
|
||||
* 查询店员和分组关系
|
||||
*
|
||||
* @param id 店员和分组关系主键
|
||||
* @return 店员和分组关系
|
||||
*/
|
||||
PlayClerkGroupUserInfoEntity selectPlayClerkGroupUserInfoById(String id);
|
||||
|
||||
/**
|
||||
* 查询店员和分组关系列表
|
||||
*
|
||||
* @param playClerkGroupUserInfo 店员和分组关系
|
||||
* @return 店员和分组关系集合
|
||||
*/
|
||||
IPage<PlayClerkGroupUserInfoEntity> selectPlayClerkGroupUserInfoByPage(PlayClerkGroupUserInfoEntity playClerkGroupUserInfo);
|
||||
|
||||
/**
|
||||
* 新增店员和分组关系
|
||||
*
|
||||
* @param playClerkGroupUserInfo 店员和分组关系
|
||||
* @return 结果
|
||||
*/
|
||||
boolean create(PlayClerkGroupUserInfoEntity playClerkGroupUserInfo);
|
||||
|
||||
/**
|
||||
* 修改店员和分组关系
|
||||
*
|
||||
* @param playClerkGroupUserInfo 店员和分组关系
|
||||
* @return 结果
|
||||
*/
|
||||
boolean update(PlayClerkGroupUserInfoEntity playClerkGroupUserInfo);
|
||||
|
||||
/**
|
||||
* 批量删除店员和分组关系
|
||||
*
|
||||
* @param ids 需要删除的店员和分组关系主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayClerkGroupUserInfoByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除店员和分组关系信息
|
||||
*
|
||||
* @param id 店员和分组关系主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayClerkGroupUserInfoById(String id);
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
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.PlayClerkRankingInfoEntity;
|
||||
import com.starry.admin.modules.weichat.entity.order.PlayOrderHistoryRankingReturnVo;
|
||||
import com.starry.admin.modules.weichat.entity.order.PlayOrderRankingReturnVo;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 店员排行Service接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-25
|
||||
*/
|
||||
public interface IPlayClerkRankingInfoService extends IService<PlayClerkRankingInfoEntity> {
|
||||
/**
|
||||
* 查询店员排行
|
||||
*
|
||||
* @param id 店员排行主键
|
||||
* @return 店员排行
|
||||
*/
|
||||
PlayClerkRankingInfoEntity selectPlayClerkRankingInfoById(String id);
|
||||
|
||||
/**
|
||||
* 查询店员排行列表
|
||||
*
|
||||
* @param playClerkRankingInfo 店员排行
|
||||
* @return 店员排行集合
|
||||
*/
|
||||
IPage<PlayClerkRankingInfoEntity> selectPlayClerkRankingInfoByPage(PlayClerkRankingInfoEntity playClerkRankingInfo);
|
||||
|
||||
/**
|
||||
* 获取当前期排名序号
|
||||
*
|
||||
* @return PlayClerkRankingInfoEntity
|
||||
*/
|
||||
Integer selectSerialNumber();
|
||||
|
||||
|
||||
/**
|
||||
* 查询最后一次排行统计列表
|
||||
*
|
||||
* @return 排行信息列表
|
||||
*/
|
||||
List<PlayClerkRankingInfoEntity> selectMaxSerialNumber();
|
||||
|
||||
/**
|
||||
* 根据时间查询店员排行
|
||||
*
|
||||
* @param clerkId 店员ID
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @return 店员排行集合
|
||||
*/
|
||||
PlayClerkRankingInfoEntity selectByTime(String clerkId, LocalDate startTime, LocalDate endTime);
|
||||
|
||||
|
||||
/**
|
||||
* 店员分页查询本期排行信息
|
||||
*
|
||||
* @param clerkId 店员ID
|
||||
* @return 店员排行集合
|
||||
*/
|
||||
PlayOrderRankingReturnVo selectCurrentRanking(String clerkId);
|
||||
|
||||
/**
|
||||
* 店员分页查询本期历史排行
|
||||
*
|
||||
* @param clerkId 店员ID
|
||||
* @return 店员排行集合
|
||||
*/
|
||||
List<PlayOrderHistoryRankingReturnVo> selectHistoryRanking(String clerkId);
|
||||
|
||||
|
||||
/**
|
||||
* 新增店员排行
|
||||
*
|
||||
* @param playClerkRankingInfo 店员排行
|
||||
* @return 结果
|
||||
*/
|
||||
boolean create(PlayClerkRankingInfoEntity playClerkRankingInfo);
|
||||
|
||||
/**
|
||||
* 修改店员排行
|
||||
*
|
||||
* @param playClerkRankingInfo 店员排行
|
||||
* @return 结果
|
||||
*/
|
||||
boolean update(PlayClerkRankingInfoEntity playClerkRankingInfo);
|
||||
|
||||
/**
|
||||
* 批量删除店员排行
|
||||
*
|
||||
* @param ids 需要删除的店员排行主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayClerkRankingInfoByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除店员排行信息
|
||||
*
|
||||
* @param id 店员排行主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayClerkRankingInfoById(String id);
|
||||
}
|
||||
@@ -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.PlayClerkTypeInfoEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 店员分类信息Service接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-31
|
||||
*/
|
||||
public interface IPlayClerkTypeInfoService extends IService<PlayClerkTypeInfoEntity> {
|
||||
/**
|
||||
* 查询店员分类信息
|
||||
*
|
||||
* @param id 店员分类信息主键
|
||||
* @return 店员分类信息
|
||||
*/
|
||||
PlayClerkTypeInfoEntity selectPlayClerkTypeInfoById(String id);
|
||||
|
||||
/**
|
||||
* 查询店员分类信息列表
|
||||
*
|
||||
* @return 店员分类信息集合
|
||||
*/
|
||||
List<PlayClerkTypeInfoEntity> selectByAll();
|
||||
|
||||
|
||||
/**
|
||||
* 查询店员分类信息列表
|
||||
*
|
||||
* @param playClerkTypeInfo 店员分类信息
|
||||
* @return 店员分类信息集合
|
||||
*/
|
||||
IPage<PlayClerkTypeInfoEntity> selectPlayClerkTypeInfoByPage(PlayClerkTypeInfoEntity playClerkTypeInfo);
|
||||
|
||||
/**
|
||||
* 新增店员分类信息
|
||||
*
|
||||
* @param playClerkTypeInfo 店员分类信息
|
||||
* @return 结果
|
||||
*/
|
||||
boolean create(PlayClerkTypeInfoEntity playClerkTypeInfo);
|
||||
|
||||
/**
|
||||
* 修改店员分类信息
|
||||
*
|
||||
* @param playClerkTypeInfo 店员分类信息
|
||||
* @return 结果
|
||||
*/
|
||||
boolean update(PlayClerkTypeInfoEntity playClerkTypeInfo);
|
||||
|
||||
/**
|
||||
* 批量删除店员分类信息
|
||||
*
|
||||
* @param ids 需要删除的店员分类信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayClerkTypeInfoByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除店员分类信息信息
|
||||
*
|
||||
* @param id 店员分类信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayClerkTypeInfoById(String id);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
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.PlayClerkTypeUserInfoEntity;
|
||||
|
||||
/**
|
||||
* 店员和分类关系Service接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-31
|
||||
*/
|
||||
public interface IPlayClerkTypeUserInfoService extends IService<PlayClerkTypeUserInfoEntity> {
|
||||
/**
|
||||
* 查询店员和分类关系
|
||||
*
|
||||
* @param id 店员和分类关系主键
|
||||
* @return 店员和分类关系
|
||||
*/
|
||||
PlayClerkTypeUserInfoEntity selectPlayClerkTypeUserInfoById(String id);
|
||||
|
||||
/**
|
||||
* 查询店员和分类关系列表
|
||||
*
|
||||
* @param playClerkTypeUserInfo 店员和分类关系
|
||||
* @return 店员和分类关系集合
|
||||
*/
|
||||
IPage<PlayClerkTypeUserInfoEntity> selectPlayClerkTypeUserInfoByPage(PlayClerkTypeUserInfoEntity playClerkTypeUserInfo);
|
||||
|
||||
/**
|
||||
* 新增店员和分类关系
|
||||
*
|
||||
* @param playClerkTypeUserInfo 店员和分类关系
|
||||
* @return 结果
|
||||
*/
|
||||
boolean create(PlayClerkTypeUserInfoEntity playClerkTypeUserInfo);
|
||||
|
||||
/**
|
||||
* 修改店员和分类关系
|
||||
*
|
||||
* @param playClerkTypeUserInfo 店员和分类关系
|
||||
* @return 结果
|
||||
*/
|
||||
boolean update(PlayClerkTypeUserInfoEntity playClerkTypeUserInfo);
|
||||
|
||||
/**
|
||||
* 批量删除店员和分类关系
|
||||
*
|
||||
* @param ids 需要删除的店员和分类关系主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayClerkTypeUserInfoByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除店员和分类关系信息
|
||||
*
|
||||
* @param id 店员和分类关系主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayClerkTypeUserInfoById(String id);
|
||||
}
|
||||
@@ -2,12 +2,18 @@ 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 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.entity.PlayClerkUserQueryVo;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkUserReturnVo;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkUnsettledWagesInfoQueryVo;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkUnsettledWagesInfoReturnVo;
|
||||
import com.starry.admin.modules.weichat.entity.PlayClerkUserLoginResponseVo;
|
||||
import com.starry.admin.modules.weichat.entity.clerk.PlayClerkUserInfoQueryVo;
|
||||
import com.starry.admin.modules.weichat.entity.clerk.PlayClerkUserInfoResultVo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
@@ -18,6 +24,17 @@ import java.math.BigDecimal;
|
||||
*/
|
||||
public interface IPlayClerkUserInfoService extends IService<PlayClerkUserInfoEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* 获取当前店员抽成信息
|
||||
*
|
||||
* @param clerkId 店员ID
|
||||
* @return com.starry.admin.modules.clerk.module.entity.PlayClerkLevelInfoEntity
|
||||
* @author 杭州世平信息科技有限公司-xuhq
|
||||
* @since 2024/6/3 11:29
|
||||
**/
|
||||
PlayClerkLevelInfoEntity queryLevelCommission(String clerkId);
|
||||
|
||||
/**
|
||||
* 根据账户ID查询店员
|
||||
*
|
||||
@@ -71,6 +88,43 @@ public interface IPlayClerkUserInfoService extends IService<PlayClerkUserInfoEnt
|
||||
**/
|
||||
void updateAccountBalanceById(String id, BigDecimal accountBalance);
|
||||
|
||||
/**
|
||||
* 更新店员账户余额信息
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @param balanceBeforeOperation 操作前余额
|
||||
* @param balanceAfterOperation 操作后余额
|
||||
* @param operationType 操作类型(0:充值;1:消费;2:服务)
|
||||
* @param operationAction 操作动作
|
||||
* @param balanceMoney 操作金额
|
||||
* @param orderId 订单ID
|
||||
*/
|
||||
void updateAccountBalanceById(String userId, BigDecimal balanceBeforeOperation, BigDecimal balanceAfterOperation, String operationType, String operationAction, BigDecimal balanceMoney, String orderId);
|
||||
|
||||
|
||||
/**
|
||||
* 查询当前租户下所有店员
|
||||
*
|
||||
* @return 店员列表
|
||||
*/
|
||||
List<PlayClerkUserInfoEntity> listAll();
|
||||
|
||||
/**
|
||||
* 查询店员未结算订单
|
||||
*
|
||||
* @param vo 未结算订单查询对象
|
||||
* @return 未结算订单
|
||||
*/
|
||||
IPage<PlayClerkUnsettledWagesInfoReturnVo> listUnsettledWagesByPage(PlayClerkUnsettledWagesInfoQueryVo vo);
|
||||
|
||||
/**
|
||||
* 管理端分页查询店员信息
|
||||
*
|
||||
* @param vo 店员查询实体
|
||||
* @return 店员列表
|
||||
*/
|
||||
|
||||
IPage<PlayClerkUserReturnVo> selectByPage(PlayClerkUserQueryVo vo);
|
||||
|
||||
/**
|
||||
* 查询店员列表
|
||||
@@ -79,7 +133,7 @@ public interface IPlayClerkUserInfoService extends IService<PlayClerkUserInfoEnt
|
||||
* @param customUserId 顾客ID
|
||||
* @return 店员列表
|
||||
*/
|
||||
IPage<PlayClerkUserListResultVo> selectByPage(PlayClerkUserInfoQueryVo vo, String customUserId);
|
||||
IPage<PlayClerkUserInfoResultVo> selectByPage(PlayClerkUserInfoQueryVo vo, String customUserId);
|
||||
|
||||
/**
|
||||
* 查询店员列表
|
||||
@@ -87,7 +141,7 @@ public interface IPlayClerkUserInfoService extends IService<PlayClerkUserInfoEnt
|
||||
* @param vo 店员查询对象
|
||||
* @return 店员集合
|
||||
*/
|
||||
IPage<PlayClerkUserListResultVo> selectPlayClerkUserInfoByPage(PlayClerkUserInfoQueryVo vo);
|
||||
IPage<PlayClerkUserInfoResultVo> selectPlayClerkUserInfoByPage(PlayClerkUserInfoQueryVo vo);
|
||||
|
||||
/**
|
||||
* 新增店员
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
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.PlayClerkUserReviewInfoEntity;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkUserReviewQueryVo;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkUserReviewReturnVo;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkUserReviewStateEditVo;
|
||||
|
||||
/**
|
||||
* 店员资料审核Service接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-19
|
||||
*/
|
||||
public interface IPlayClerkUserReviewInfoService extends IService<PlayClerkUserReviewInfoEntity> {
|
||||
/**
|
||||
* 查询店员资料审核
|
||||
*
|
||||
* @param id 店员资料审核主键
|
||||
* @return 店员资料审核
|
||||
*/
|
||||
PlayClerkUserReviewInfoEntity selectPlayClerkUserReviewInfoById(String id);
|
||||
|
||||
|
||||
/**
|
||||
* 根据店员ID,查询未审核的申请
|
||||
*
|
||||
* @param clerkId 店员ID
|
||||
* @param reviewState 审核状态(0:未审核:1:审核通过,2:审核不通过)
|
||||
* @return 店员申请审核对象
|
||||
*/
|
||||
PlayClerkUserReviewInfoEntity queryByClerkId(String clerkId, String reviewState);
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询店员申请
|
||||
*
|
||||
* @param vo 店员申请对象
|
||||
* @return 店员申请对象
|
||||
*/
|
||||
IPage<PlayClerkUserReviewReturnVo> selectByPage(PlayClerkUserReviewQueryVo vo);
|
||||
|
||||
/**
|
||||
* 查询店员资料审核列表
|
||||
*
|
||||
* @param playClerkUserReviewInfo 店员资料审核
|
||||
* @return 店员资料审核集合
|
||||
*/
|
||||
IPage<PlayClerkUserReviewInfoEntity> selectPlayClerkUserReviewInfoByPage(PlayClerkUserReviewInfoEntity playClerkUserReviewInfo);
|
||||
|
||||
/**
|
||||
* 新增店员资料审核
|
||||
*
|
||||
* @param playClerkUserReviewInfo 店员资料审核
|
||||
* @return 结果
|
||||
*/
|
||||
boolean create(PlayClerkUserReviewInfoEntity playClerkUserReviewInfo);
|
||||
|
||||
boolean update(PlayClerkUserReviewInfoEntity entity);
|
||||
|
||||
/**
|
||||
* 修改店员资料审核
|
||||
*
|
||||
* @param vo 店员资料审核对象
|
||||
*/
|
||||
void updateDataReviewState(PlayClerkUserReviewStateEditVo vo);
|
||||
|
||||
/**
|
||||
* 批量删除店员资料审核
|
||||
*
|
||||
* @param ids 需要删除的店员资料审核主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayClerkUserReviewInfoByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除店员资料审核信息
|
||||
*
|
||||
* @param id 店员资料审核主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayClerkUserReviewInfoById(String id);
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
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.PlayClerkWagesDetailsInfoEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 店员工资明细信息Service接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-31
|
||||
*/
|
||||
public interface IPlayClerkWagesDetailsInfoService extends IService<PlayClerkWagesDetailsInfoEntity> {
|
||||
|
||||
/**
|
||||
* 查询店员工资明细信息
|
||||
*
|
||||
* @param wagesId 店员工资统计ID
|
||||
* @return 店员工资明细信息
|
||||
*/
|
||||
List<PlayClerkWagesDetailsInfoEntity> selectByWagesId(String wagesId);
|
||||
|
||||
|
||||
/**
|
||||
* 根据订单ID
|
||||
*
|
||||
* @param orderId 订单ID
|
||||
* @return 工资详情
|
||||
*/
|
||||
PlayClerkWagesDetailsInfoEntity selectByOrderId(String orderId);
|
||||
|
||||
/**
|
||||
* 根据工资结算ID和店员ID查询工资详情
|
||||
*
|
||||
* @param wagesId 结算ID
|
||||
* @param clerkId 店员ID
|
||||
* @return 工资详情
|
||||
*/
|
||||
PlayClerkWagesDetailsInfoEntity selectByClerkIdAndWagesId(String wagesId, String clerkId);
|
||||
/**
|
||||
* 查询店员工资明细信息
|
||||
*
|
||||
* @param id 店员工资明细信息主键
|
||||
* @return 店员工资明细信息
|
||||
*/
|
||||
PlayClerkWagesDetailsInfoEntity selectPlayClerkWagesDetailsInfoById(String id);
|
||||
|
||||
/**
|
||||
* 查询店员工资明细信息列表
|
||||
*
|
||||
* @param playClerkWagesDetailsInfo 店员工资明细信息
|
||||
* @return 店员工资明细信息集合
|
||||
*/
|
||||
IPage<PlayClerkWagesDetailsInfoEntity> selectPlayClerkWagesDetailsInfoByPage(PlayClerkWagesDetailsInfoEntity playClerkWagesDetailsInfo);
|
||||
|
||||
/**
|
||||
* 新增店员工资明细信息
|
||||
*
|
||||
* @param playClerkWagesDetailsInfo 店员工资明细信息
|
||||
* @return 结果
|
||||
*/
|
||||
boolean create(PlayClerkWagesDetailsInfoEntity playClerkWagesDetailsInfo);
|
||||
|
||||
/**
|
||||
* 修改店员工资明细信息
|
||||
*
|
||||
* @param playClerkWagesDetailsInfo 店员工资明细信息
|
||||
* @return 结果
|
||||
*/
|
||||
boolean update(PlayClerkWagesDetailsInfoEntity playClerkWagesDetailsInfo);
|
||||
|
||||
/**
|
||||
* 批量删除店员工资明细信息
|
||||
*
|
||||
* @param ids 需要删除的店员工资明细信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayClerkWagesDetailsInfoByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除店员工资明细信息信息
|
||||
*
|
||||
* @param id 店员工资明细信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayClerkWagesDetailsInfoById(String id);
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
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.PlayClerkWagesInfoEntity;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkWagesInfoQueryVo;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkWagesInfoReturnVo;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 店员工资结算信息Service接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-31
|
||||
*/
|
||||
public interface IPlayClerkWagesInfoService extends IService<PlayClerkWagesInfoEntity> {
|
||||
|
||||
/**
|
||||
* 根据店员ID查询店员工资结算信息
|
||||
*
|
||||
* @param clerkId 店员ID
|
||||
* @return 店员工资结算信息
|
||||
*/
|
||||
PlayClerkWagesInfoEntity selectCurrentPeriodWagesByClerkId(String clerkId);
|
||||
|
||||
/**
|
||||
* 根据店员ID查询店员往期工资
|
||||
*
|
||||
* @param clerkId 店员ID
|
||||
* @return 店员工资结算信息
|
||||
*/
|
||||
List<PlayClerkWagesInfoEntity> selectHistoricalWagesByClerkId(String clerkId);
|
||||
|
||||
|
||||
/**
|
||||
* 获取最后一次统计
|
||||
*
|
||||
* @param clerkId 店员ID
|
||||
* @return 上次结算时间
|
||||
*/
|
||||
PlayClerkWagesInfoEntity getLastSettlement(String clerkId);
|
||||
|
||||
/**
|
||||
* 获取最后一次统计
|
||||
*
|
||||
* @param clerkId 店员ID
|
||||
* @return 上次结算时间
|
||||
*/
|
||||
LocalDate getLastSettlementTime(String clerkId);
|
||||
|
||||
|
||||
/**
|
||||
* 查询店员工资结算信息
|
||||
*
|
||||
* @param id 店员工资结算信息主键
|
||||
* @return 店员工资结算信息
|
||||
*/
|
||||
PlayClerkWagesInfoEntity selectPlayClerkWagesInfoById(String id);
|
||||
|
||||
/**
|
||||
* 分页查询工资统计信息
|
||||
*
|
||||
* @param vo 统计统计查询对象
|
||||
* @return 查询工资统计信息
|
||||
*/
|
||||
IPage<PlayClerkWagesInfoReturnVo> selectHistoricalByPage(PlayClerkWagesInfoQueryVo vo);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 查询店员工资结算信息列表
|
||||
*
|
||||
* @param playClerkWagesInfo 店员工资结算信息
|
||||
* @return 店员工资结算信息集合
|
||||
*/
|
||||
IPage<PlayClerkWagesInfoEntity> selectPlayClerkWagesInfoByPage(PlayClerkWagesInfoEntity playClerkWagesInfo);
|
||||
|
||||
/**
|
||||
* 新增店员工资结算信息
|
||||
*
|
||||
* @param playClerkWagesInfo 店员工资结算信息
|
||||
* @return 结果
|
||||
*/
|
||||
boolean create(PlayClerkWagesInfoEntity playClerkWagesInfo);
|
||||
|
||||
/**
|
||||
* 修改店员工资结算信息
|
||||
*
|
||||
* @param playClerkWagesInfo 店员工资结算信息
|
||||
* @return 结果
|
||||
*/
|
||||
boolean update(PlayClerkWagesInfoEntity playClerkWagesInfo);
|
||||
|
||||
/**
|
||||
* 批量删除店员工资结算信息
|
||||
*
|
||||
* @param ids 需要删除的店员工资结算信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayClerkWagesInfoByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除店员工资结算信息信息
|
||||
*
|
||||
* @param id 店员工资结算信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayClerkWagesInfoById(String id);
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
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.PlayCustomArticleInfoEntity;
|
||||
|
||||
/**
|
||||
* 陪聊点赞动态信息Service接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-04
|
||||
*/
|
||||
public interface IPlayCustomArticleInfoService extends IService<PlayCustomArticleInfoEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* 查询顾客操作动态数据
|
||||
* @param articleId 动态ID
|
||||
* @param customId 客户ID
|
||||
* @param endorseType 操作类型(1:点赞;0:收藏)
|
||||
* @return PlayCustomArticleInfoEntity
|
||||
*/
|
||||
PlayCustomArticleInfoEntity selectByArticleId(String articleId, String customId, String endorseType);
|
||||
|
||||
/**
|
||||
* 查询陪聊点赞动态信息
|
||||
*
|
||||
* @param id 陪聊点赞动态信息主键
|
||||
* @return 陪聊点赞动态信息
|
||||
*/
|
||||
PlayCustomArticleInfoEntity selectPlayCustomArticleInfoById(String id);
|
||||
|
||||
/**
|
||||
* 查询陪聊点赞动态信息列表
|
||||
*
|
||||
* @param playCustomArticleInfo 陪聊点赞动态信息
|
||||
* @return 陪聊点赞动态信息集合
|
||||
*/
|
||||
IPage<PlayCustomArticleInfoEntity> selectPlayCustomArticleInfoByPage(PlayCustomArticleInfoEntity playCustomArticleInfo);
|
||||
|
||||
/**
|
||||
* 新增陪聊点赞动态信息
|
||||
*
|
||||
* @param playCustomArticleInfo 陪聊点赞动态信息
|
||||
* @return 结果
|
||||
*/
|
||||
boolean create(PlayCustomArticleInfoEntity playCustomArticleInfo);
|
||||
|
||||
/**
|
||||
* 修改陪聊点赞动态信息
|
||||
*
|
||||
* @param playCustomArticleInfo 陪聊点赞动态信息
|
||||
* @return 结果
|
||||
*/
|
||||
boolean update(PlayCustomArticleInfoEntity playCustomArticleInfo);
|
||||
|
||||
/**
|
||||
* 批量删除陪聊点赞动态信息
|
||||
*
|
||||
* @param ids 需要删除的陪聊点赞动态信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayCustomArticleInfoByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除陪聊点赞动态信息信息
|
||||
*
|
||||
* @param id 陪聊点赞动态信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deletePlayCustomArticleInfoById(String id);
|
||||
|
||||
|
||||
/**
|
||||
* 根据动态ID删除点赞信息
|
||||
*
|
||||
* @param articleId 动态ID
|
||||
*/
|
||||
void deleteByArticleId(String articleId);
|
||||
}
|
||||
@@ -0,0 +1,207 @@
|
||||
package com.starry.admin.modules.clerk.service.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
import com.starry.admin.common.exception.CustomException;
|
||||
import com.starry.admin.modules.clerk.mapper.PlayClerkArticleInfoMapper;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkArticleInfoEntity;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkUserInfoEntity;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayCustomArticleInfoEntity;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkArticleQueryVo;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkArticleReturnVo;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkArticleInfoService;
|
||||
import com.starry.admin.modules.weichat.entity.article.PlayClerkArticleCustomQueryVo;
|
||||
import com.starry.admin.modules.weichat.entity.article.PlayClerkArticleCustomReturnVo;
|
||||
import com.starry.common.utils.IdUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 店员动态信息Service业务层处理
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-04
|
||||
*/
|
||||
@Service
|
||||
public class PlayClerkArticleInfoServiceImpl extends ServiceImpl<PlayClerkArticleInfoMapper, PlayClerkArticleInfoEntity> implements IPlayClerkArticleInfoService {
|
||||
@Resource
|
||||
private PlayClerkArticleInfoMapper playClerkArticleInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询店员动态信息
|
||||
*
|
||||
* @param id 店员动态信息主键
|
||||
* @return 店员动态信息
|
||||
*/
|
||||
@Override
|
||||
public PlayClerkArticleInfoEntity selectPlayClerkArticleInfoById(String id) {
|
||||
PlayClerkArticleInfoEntity entity = this.baseMapper.selectById(id);
|
||||
if (entity == null) {
|
||||
throw new CustomException("动态不存在");
|
||||
}
|
||||
return this.baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询店员动态信息列表
|
||||
*
|
||||
* @param vo 店员动态信息查询对象
|
||||
* @return 店员动态信息
|
||||
*/
|
||||
@Override
|
||||
public IPage<PlayClerkArticleReturnVo> selectByPage(PlayClerkArticleQueryVo vo) {
|
||||
MPJLambdaWrapper<PlayClerkArticleInfoEntity> lambdaQueryWrapper = new MPJLambdaWrapper<>();
|
||||
//查询主表全部字段
|
||||
lambdaQueryWrapper.selectAll(PlayClerkArticleInfoEntity.class);
|
||||
//陪聊用户表全部字段
|
||||
lambdaQueryWrapper.selectAs(PlayClerkUserInfoEntity::getId, "clerkId").selectAs(PlayClerkUserInfoEntity::getNickname, "clerkNickname").selectAs(PlayClerkUserInfoEntity::getAvatar, "clerkAvatar");
|
||||
//陪聊动态表
|
||||
lambdaQueryWrapper.leftJoin(PlayClerkUserInfoEntity.class, PlayClerkUserInfoEntity::getId, PlayClerkArticleInfoEntity::getClerkId);
|
||||
//动态点赞表
|
||||
lambdaQueryWrapper.selectCollection(PlayCustomArticleInfoEntity.class, PlayClerkArticleReturnVo::getArticleInfoEntities).leftJoin(PlayCustomArticleInfoEntity.class, PlayCustomArticleInfoEntity::getArticleId, PlayCustomArticleInfoEntity::getId);
|
||||
|
||||
if (StrUtil.isNotBlank(vo.getClerkId())) {
|
||||
lambdaQueryWrapper.eq(PlayClerkArticleInfoEntity::getClerkId, vo.getClerkId());
|
||||
}
|
||||
if (StrUtil.isNotBlank(vo.getReviewState())) {
|
||||
lambdaQueryWrapper.eq(PlayClerkArticleInfoEntity::getReviewState, vo.getReviewState());
|
||||
}
|
||||
if (vo.getReleaseTime() != null && vo.getReleaseTime().size() == 2) {
|
||||
lambdaQueryWrapper.between(PlayClerkArticleInfoEntity::getReleaseTime, vo.getReleaseTime().get(0), vo.getReleaseTime().get(1));
|
||||
}
|
||||
IPage<PlayClerkArticleReturnVo> page = this.baseMapper.selectJoinPage(new Page<>(vo.getPageNum(), vo.getPageSize()), PlayClerkArticleReturnVo.class, lambdaQueryWrapper);
|
||||
for (PlayClerkArticleReturnVo record : page.getRecords()) {
|
||||
int index = 0;
|
||||
for (PlayCustomArticleInfoEntity articleInfoEntity : record.getArticleInfoEntities()) {
|
||||
if (articleInfoEntity.getId() == null) {
|
||||
continue;
|
||||
}
|
||||
index++;
|
||||
}
|
||||
record.setAgreedQuantity(index);
|
||||
}
|
||||
return this.baseMapper.selectJoinPage(new Page<>(vo.getPageNum(), vo.getPageSize()), PlayClerkArticleReturnVo.class, lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IPage<PlayClerkArticleCustomReturnVo> customSelectByPage(PlayClerkArticleCustomQueryVo vo, String customId) {
|
||||
MPJLambdaWrapper<PlayClerkArticleInfoEntity> lambdaQueryWrapper = new MPJLambdaWrapper<>();
|
||||
//查询主表全部字段
|
||||
lambdaQueryWrapper.selectAll(PlayClerkArticleInfoEntity.class);
|
||||
//陪聊用户表全部字段
|
||||
lambdaQueryWrapper.selectAs(PlayClerkUserInfoEntity::getId, "clerkId").selectAs(PlayClerkUserInfoEntity::getNickname, "clerkNickname").selectAs(PlayClerkUserInfoEntity::getAvatar, "clerkAvatar").selectAs(PlayClerkUserInfoEntity::getSex, "clerkSex");
|
||||
//陪聊用户表全部字段
|
||||
lambdaQueryWrapper.selectAs(PlayCustomArticleInfoEntity::getId, "id");
|
||||
//陪聊动态表
|
||||
lambdaQueryWrapper.leftJoin(PlayClerkUserInfoEntity.class, PlayClerkUserInfoEntity::getId, PlayClerkArticleInfoEntity::getClerkId);
|
||||
if (StrUtil.isNotBlank(vo.getFollowState()) && "1".equals(vo.getFollowState())) {
|
||||
//查询本人收藏的动态列表
|
||||
lambdaQueryWrapper.innerJoin(PlayCustomArticleInfoEntity.class, PlayCustomArticleInfoEntity::getArticleId, PlayClerkArticleInfoEntity::getId);
|
||||
lambdaQueryWrapper.eq(PlayCustomArticleInfoEntity::getCustomId, customId);
|
||||
lambdaQueryWrapper.eq(PlayCustomArticleInfoEntity::getEndorseType, "0");
|
||||
lambdaQueryWrapper.eq(PlayCustomArticleInfoEntity::getEndorseState, "1");
|
||||
}
|
||||
//查询指定店员动态
|
||||
if (StrUtil.isNotBlank(vo.getClerkId())) {
|
||||
lambdaQueryWrapper.eq(PlayClerkArticleInfoEntity::getClerkId, vo.getClerkId());
|
||||
}
|
||||
//动态点赞表
|
||||
lambdaQueryWrapper.selectCollection(PlayCustomArticleInfoEntity.class, PlayClerkArticleReturnVo::getArticleInfoEntities).leftJoin(PlayCustomArticleInfoEntity.class, PlayCustomArticleInfoEntity::getArticleId, PlayCustomArticleInfoEntity::getId);
|
||||
lambdaQueryWrapper.eq(PlayClerkArticleInfoEntity::getReviewState, "1");
|
||||
|
||||
|
||||
IPage<PlayClerkArticleCustomReturnVo> page = this.baseMapper.selectJoinPage(new Page<>(vo.getPageNum(), vo.getPageSize()), PlayClerkArticleCustomReturnVo.class, lambdaQueryWrapper);
|
||||
for (PlayClerkArticleCustomReturnVo record : page.getRecords()) {
|
||||
int index = 0;
|
||||
for (PlayCustomArticleInfoEntity articleInfoEntity : record.getArticleInfoEntities()) {
|
||||
//动态操作信息为空
|
||||
if (articleInfoEntity.getId() == null) {
|
||||
continue;
|
||||
}
|
||||
//点赞或者动态处于激活状态
|
||||
if ("1".equals(articleInfoEntity.getEndorseState())) {
|
||||
if ("1".equals(articleInfoEntity.getEndorseType())) {
|
||||
index++;
|
||||
record.setGreedState("1");
|
||||
} else {
|
||||
record.setFollowState("1");
|
||||
}
|
||||
}
|
||||
}
|
||||
record.setAgreedQuantity(index);
|
||||
}
|
||||
return page;
|
||||
}
|
||||
/**
|
||||
* 新增店员动态信息
|
||||
*
|
||||
* @param entity 店员动态信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean create(PlayClerkArticleInfoEntity entity) {
|
||||
if (!queryClerkUnauditedArticleInfo(entity.getClerkId()).isEmpty()) {
|
||||
throw new CustomException("存在未审核动态,无法新增");
|
||||
}
|
||||
|
||||
if (StrUtil.isBlankIfStr(entity.getId())) {
|
||||
entity.setId(IdUtils.getUuid());
|
||||
}
|
||||
return save(entity);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询店员未审核的动态
|
||||
*
|
||||
* @param clerkId 店员ID
|
||||
* @return 店员未审核的动态列表
|
||||
*/
|
||||
public List<PlayClerkArticleInfoEntity> queryClerkUnauditedArticleInfo(String clerkId) {
|
||||
LambdaQueryWrapper<PlayClerkArticleInfoEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(PlayClerkArticleInfoEntity::getClerkId, clerkId);
|
||||
lambdaQueryWrapper.eq(PlayClerkArticleInfoEntity::getReviewState, "0");
|
||||
return this.baseMapper.selectList(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改店员动态信息
|
||||
*
|
||||
* @param playClerkArticleInfo 店员动态信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean update(PlayClerkArticleInfoEntity playClerkArticleInfo) {
|
||||
return updateById(playClerkArticleInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除店员动态信息
|
||||
*
|
||||
* @param ids 需要删除的店员动态信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePlayClerkArticleInfoByIds(String[] ids) {
|
||||
return playClerkArticleInfoMapper.deleteBatchIds(Arrays.asList(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除店员动态信息信息
|
||||
*
|
||||
* @param id 店员动态信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePlayClerkArticleInfoById(String id) {
|
||||
return playClerkArticleInfoMapper.deleteById(id);
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.starry.admin.modules.clerk.service.impl;
|
||||
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.starry.common.utils.IdUtils;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@@ -70,7 +70,7 @@ public class PlayClerkClassificationInfoServiceImpl extends ServiceImpl<PlayCler
|
||||
@Override
|
||||
public boolean create(PlayClerkClassificationInfoEntity playClerkClassificationInfo) {
|
||||
if (StrUtil.isBlankIfStr(playClerkClassificationInfo.getId())) {
|
||||
playClerkClassificationInfo.setId(IdUtil.fastSimpleUUID());
|
||||
playClerkClassificationInfo.setId(IdUtils.getUuid());
|
||||
}
|
||||
return save(playClerkClassificationInfo);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
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;
|
||||
@@ -12,6 +11,7 @@ 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 com.starry.common.utils.IdUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -39,17 +39,14 @@ public class PlayClerkCommodityServiceImpl extends ServiceImpl<PlayClerkCommodit
|
||||
public void initClerkCommodity(String userId) {
|
||||
// 删除当前陪聊的所有服务项目
|
||||
LambdaQueryWrapper<PlayClerkCommodityEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(PlayClerkCommodityEntity::getPlayUserId, userId);
|
||||
lambdaQueryWrapper.eq(PlayClerkCommodityEntity::getClerkId, userId);
|
||||
this.baseMapper.delete(lambdaQueryWrapper);
|
||||
// 根据当前租户的服务项目,生成陪聊项目数据
|
||||
for (PlayCommodityInfoEntity commodityInfo : playCommodityInfoService.selectAll()) {
|
||||
for (PlayCommodityInfoEntity commodityInfo : playCommodityInfoService.selectByType()) {
|
||||
PlayClerkCommodityEntity entity = new PlayClerkCommodityEntity();
|
||||
entity.setPlayUserId(userId);
|
||||
entity.setClerkId(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);
|
||||
}
|
||||
@@ -58,23 +55,25 @@ public class PlayClerkCommodityServiceImpl extends ServiceImpl<PlayClerkCommodit
|
||||
|
||||
|
||||
@Override
|
||||
public List<String> getClerkCommodityList(String userId) {
|
||||
List<PlayClerkCommodityEntity> list = this.selectCommodityTypeByUser(userId);
|
||||
return list.stream().map(PlayClerkCommodityEntity::getCommodityType).collect(Collectors.toList());
|
||||
public List<String> getClerkCommodityList(String userId, String enablingState) {
|
||||
List<PlayClerkCommodityEntity> list = this.selectCommodityTypeByUser(userId, enablingState);
|
||||
return list.stream().map(PlayClerkCommodityEntity::getCommodityName).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PlayClerkCommodityEntity> selectCommodityTypeByUser(String userId) {
|
||||
public List<PlayClerkCommodityEntity> selectCommodityTypeByUser(String userId, String enablingState) {
|
||||
LambdaQueryWrapper<PlayClerkCommodityEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.groupBy(PlayClerkCommodityEntity::getCommodityType);
|
||||
lambdaQueryWrapper.eq(PlayClerkCommodityEntity::getPlayUserId, userId);
|
||||
lambdaQueryWrapper.eq(PlayClerkCommodityEntity::getClerkId, userId);
|
||||
if (StrUtil.isNotBlank(enablingState)) {
|
||||
lambdaQueryWrapper.eq(PlayClerkCommodityEntity::getEnablingState, enablingState);
|
||||
}
|
||||
return this.baseMapper.selectList(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PlayClerkCommodityEntity> selectByUser(String userId) {
|
||||
LambdaQueryWrapper<PlayClerkCommodityEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(PlayClerkCommodityEntity::getPlayUserId, userId);
|
||||
lambdaQueryWrapper.eq(PlayClerkCommodityEntity::getClerkId, userId);
|
||||
return this.baseMapper.selectList(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@@ -85,12 +84,12 @@ public class PlayClerkCommodityServiceImpl extends ServiceImpl<PlayClerkCommodit
|
||||
|
||||
|
||||
@Override
|
||||
public void startStopClerkItem(String type, String enablingState, String clerkUserId) {
|
||||
public void startStopClerkItem(String commodityName, String enablingState, String clerkId) {
|
||||
PlayClerkCommodityEntity entity = new PlayClerkCommodityEntity();
|
||||
entity.setEnablingState(enablingState);
|
||||
LambdaQueryWrapper<PlayClerkCommodityEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(PlayClerkCommodityEntity::getPlayUserId, clerkUserId);
|
||||
lambdaQueryWrapper.eq(PlayClerkCommodityEntity::getCommodityType, type);
|
||||
lambdaQueryWrapper.eq(PlayClerkCommodityEntity::getClerkId, clerkId);
|
||||
lambdaQueryWrapper.eq(PlayClerkCommodityEntity::getCommodityName, commodityName);
|
||||
this.baseMapper.update(entity, lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@@ -130,7 +129,7 @@ public class PlayClerkCommodityServiceImpl extends ServiceImpl<PlayClerkCommodit
|
||||
@Override
|
||||
public boolean create(PlayClerkCommodityEntity playClerkCommodity) {
|
||||
if (StrUtil.isBlankIfStr(playClerkCommodity.getId())) {
|
||||
playClerkCommodity.setId(IdUtil.fastSimpleUUID());
|
||||
playClerkCommodity.setId(IdUtils.getUuid());
|
||||
}
|
||||
return save(playClerkCommodity);
|
||||
}
|
||||
|
||||
@@ -1,18 +1,27 @@
|
||||
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.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.module.entity.PlayClerkUserInfoEntity;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkUserReviewInfoEntity;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkDataReviewQueryVo;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkDataReviewReturnVo;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkDataReviewStateEditVo;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkDataReviewInfoService;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkUserInfoService;
|
||||
import com.starry.common.utils.IdUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@@ -20,82 +29,116 @@ import java.util.List;
|
||||
* 店员资料审核Service业务层处理
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-04-11
|
||||
* @since 2024-05-19
|
||||
*/
|
||||
@Service
|
||||
public class PlayClerkDataReviewInfoServiceImpl extends ServiceImpl<PlayClerkDataReviewInfoMapper, PlayClerkDataReviewInfoEntity> implements IPlayClerkDataReviewInfoService {
|
||||
@Resource
|
||||
private PlayClerkDataReviewInfoMapper playClerkDataReviewInfoMapper;
|
||||
|
||||
@Resource
|
||||
private IPlayClerkUserInfoService playClerkUserInfoService;
|
||||
|
||||
|
||||
/**
|
||||
* 查询店员资料审核
|
||||
*
|
||||
* @param id 店员资料审核主键
|
||||
* @return 店员资料审核
|
||||
*/
|
||||
@Override
|
||||
public PlayClerkDataReviewInfoEntity selectPlayClerkDataReviewInfoById(String id) {
|
||||
return this.baseMapper.selectById(id);
|
||||
LambdaQueryWrapper<PlayClerkDataReviewInfoEntity> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(PlayClerkDataReviewInfoEntity::getId, id);
|
||||
PlayClerkDataReviewInfoEntity entity = this.baseMapper.selectOne(queryWrapper);
|
||||
if (entity == null) {
|
||||
throw new CustomException("对象不存在");
|
||||
}
|
||||
return entity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PlayClerkDataReviewInfoEntity> queryByClerkId(String clerkId) {
|
||||
LambdaQueryWrapper<PlayClerkDataReviewInfoEntity> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(PlayClerkDataReviewInfoEntity::getClerkId, clerkId);
|
||||
return this.baseMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询店员资料审核列表
|
||||
*
|
||||
* @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);
|
||||
public PlayClerkDataReviewInfoEntity queryByClerkId(String clerkId, String dataType, String reviewState) {
|
||||
LambdaQueryWrapper<PlayClerkDataReviewInfoEntity> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(PlayClerkDataReviewInfoEntity::getClerkId, clerkId);
|
||||
queryWrapper.eq(PlayClerkDataReviewInfoEntity::getReviewState, reviewState);
|
||||
queryWrapper.eq(PlayClerkDataReviewInfoEntity::getDataType, dataType);
|
||||
return this.baseMapper.selectOne(queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询店员资料审核列表
|
||||
*
|
||||
* @param vo 店员资料审核分页对象
|
||||
* @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());
|
||||
public IPage<PlayClerkDataReviewReturnVo> selectByPage(PlayClerkDataReviewQueryVo vo) {
|
||||
MPJLambdaWrapper<PlayClerkDataReviewInfoEntity> lambdaQueryWrapper = new MPJLambdaWrapper<>();
|
||||
lambdaQueryWrapper.selectAll(PlayClerkDataReviewInfoEntity.class);
|
||||
//店员表
|
||||
lambdaQueryWrapper.selectAs(PlayClerkUserInfoEntity::getAvatar, "clerkAvatar").selectAs(PlayClerkUserInfoEntity::getNickname, "clerkNickname");
|
||||
lambdaQueryWrapper.leftJoin(PlayClerkUserInfoEntity.class, PlayClerkUserInfoEntity::getId, PlayClerkUserReviewInfoEntity::getClerkId);
|
||||
if (StrUtil.isNotBlank(vo.getClerkId())) {
|
||||
lambdaQueryWrapper.eq(PlayClerkDataReviewInfoEntity::getClerkId, vo.getClerkId());
|
||||
}
|
||||
Page<PlayClerkDataReviewInfoEntity> page = new Page<>(vo.getPageNum(), vo.getPageSize());
|
||||
return this.baseMapper.selectPage(page, lambdaQueryWrapper);
|
||||
if (StrUtil.isNotBlank(vo.getDataType())) {
|
||||
lambdaQueryWrapper.eq(PlayClerkDataReviewInfoEntity::getDataType, vo.getDataType());
|
||||
}
|
||||
if (StrUtil.isNotBlank(vo.getReviewState())) {
|
||||
lambdaQueryWrapper.like(PlayClerkDataReviewInfoEntity::getReviewState, vo.getReviewState());
|
||||
}
|
||||
if (vo.getAddTime() != null && vo.getAddTime().size() == 2) {
|
||||
lambdaQueryWrapper.between(PlayClerkDataReviewInfoEntity::getAddTime, vo.getAddTime().get(0), vo.getAddTime().get(1));
|
||||
}
|
||||
return this.baseMapper.selectJoinPage(new Page<>(vo.getPageNum(), vo.getPageSize()), PlayClerkDataReviewReturnVo.class, lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增店员资料审核
|
||||
*
|
||||
* @param playClerkDataReviewInfo 店员资料审核
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean create(PlayClerkDataReviewInfoEntity playClerkDataReviewInfo) {
|
||||
if (StrUtil.isBlankIfStr(playClerkDataReviewInfo.getId())) {
|
||||
playClerkDataReviewInfo.setId(IdUtil.fastSimpleUUID());
|
||||
playClerkDataReviewInfo.setId(IdUtils.getUuid());
|
||||
}
|
||||
if (StrUtil.isBlankIfStr(playClerkDataReviewInfo.getAddTime())) {
|
||||
playClerkDataReviewInfo.setAddTime(LocalDateTime.now());
|
||||
}
|
||||
return save(playClerkDataReviewInfo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateDataReviewState(PlayClerkDataReviewStateEditVo vo) {
|
||||
PlayClerkDataReviewInfoEntity entity = this.selectPlayClerkDataReviewInfoById(vo.getId());
|
||||
BeanUtils.copyProperties(vo, entity);
|
||||
this.update(entity);
|
||||
if ("1".equals(vo.getReviewState())) {
|
||||
PlayClerkUserInfoEntity userInfo = new PlayClerkUserInfoEntity();
|
||||
userInfo.setId(entity.getId());
|
||||
if ("1".equals(entity.getDataType())) {
|
||||
userInfo.setAvatar(entity.getDataContent().get(0));
|
||||
}
|
||||
if ("2".equals(entity.getDataType())) {
|
||||
userInfo.setAlbum(entity.getDataContent());
|
||||
}
|
||||
if ("3".equals(entity.getDataType())) {
|
||||
userInfo.setAudio(entity.getDataContent().get(0));
|
||||
}
|
||||
playClerkUserInfoService.update(userInfo);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改店员资料审核
|
||||
*
|
||||
* @param playClerkDataReviewInfo 店员资料审核
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -106,7 +149,6 @@ public class PlayClerkDataReviewInfoServiceImpl extends ServiceImpl<PlayClerkDat
|
||||
|
||||
/**
|
||||
* 批量删除店员资料审核
|
||||
*
|
||||
* @param ids 需要删除的店员资料审核主键
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -117,7 +159,6 @@ public class PlayClerkDataReviewInfoServiceImpl extends ServiceImpl<PlayClerkDat
|
||||
|
||||
/**
|
||||
* 删除店员资料审核信息
|
||||
*
|
||||
* @param id 店员资料审核主键
|
||||
* @return 结果
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
package com.starry.admin.modules.clerk.service.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.starry.admin.modules.clerk.mapper.PlayClerkGroupInfoMapper;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkGroupInfoEntity;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkGroupInfoService;
|
||||
import com.starry.common.utils.IdUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 店员分组信息Service业务层处理
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-31
|
||||
*/
|
||||
@Service
|
||||
public class PlayClerkGroupInfoServiceImpl extends ServiceImpl<PlayClerkGroupInfoMapper, PlayClerkGroupInfoEntity> implements IPlayClerkGroupInfoService {
|
||||
@Resource
|
||||
private PlayClerkGroupInfoMapper playClerkGroupInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询店员分组信息
|
||||
*
|
||||
* @param id 店员分组信息主键
|
||||
* @return 店员分组信息
|
||||
*/
|
||||
@Override
|
||||
public PlayClerkGroupInfoEntity selectPlayClerkGroupInfoById(String id) {
|
||||
return this.baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询店员分组信息列表
|
||||
*
|
||||
* @param playClerkGroupInfo 店员分组信息
|
||||
* @return 店员分组信息
|
||||
*/
|
||||
@Override
|
||||
public IPage<PlayClerkGroupInfoEntity> selectPlayClerkGroupInfoByPage(PlayClerkGroupInfoEntity playClerkGroupInfo) {
|
||||
Page<PlayClerkGroupInfoEntity> page = new Page<>(1, 10);
|
||||
return this.baseMapper.selectPage(page, new LambdaQueryWrapper<PlayClerkGroupInfoEntity>());
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增店员分组信息
|
||||
*
|
||||
* @param playClerkGroupInfo 店员分组信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean create(PlayClerkGroupInfoEntity playClerkGroupInfo) {
|
||||
if (StrUtil.isBlankIfStr(playClerkGroupInfo.getId())) {
|
||||
playClerkGroupInfo.setId(IdUtils.getUuid());
|
||||
}
|
||||
return save(playClerkGroupInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改店员分组信息
|
||||
*
|
||||
* @param playClerkGroupInfo 店员分组信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean update(PlayClerkGroupInfoEntity playClerkGroupInfo) {
|
||||
return updateById(playClerkGroupInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除店员分组信息
|
||||
*
|
||||
* @param ids 需要删除的店员分组信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePlayClerkGroupInfoByIds(String[] ids) {
|
||||
return playClerkGroupInfoMapper.deleteBatchIds(Arrays.asList(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除店员分组信息信息
|
||||
*
|
||||
* @param id 店员分组信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePlayClerkGroupInfoById(String id) {
|
||||
return playClerkGroupInfoMapper.deleteById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
package com.starry.admin.modules.clerk.service.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.starry.admin.modules.clerk.mapper.PlayClerkGroupUserInfoMapper;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkGroupUserInfoEntity;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkGroupUserInfoService;
|
||||
import com.starry.common.utils.IdUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 店员和分组关系Service业务层处理
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-31
|
||||
*/
|
||||
@Service
|
||||
public class PlayClerkGroupUserInfoServiceImpl extends ServiceImpl<PlayClerkGroupUserInfoMapper, PlayClerkGroupUserInfoEntity> implements IPlayClerkGroupUserInfoService {
|
||||
@Resource
|
||||
private PlayClerkGroupUserInfoMapper playClerkGroupUserInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询店员和分组关系
|
||||
*
|
||||
* @param id 店员和分组关系主键
|
||||
* @return 店员和分组关系
|
||||
*/
|
||||
@Override
|
||||
public PlayClerkGroupUserInfoEntity selectPlayClerkGroupUserInfoById(String id) {
|
||||
return this.baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询店员和分组关系列表
|
||||
*
|
||||
* @param playClerkGroupUserInfo 店员和分组关系
|
||||
* @return 店员和分组关系
|
||||
*/
|
||||
@Override
|
||||
public IPage<PlayClerkGroupUserInfoEntity> selectPlayClerkGroupUserInfoByPage(PlayClerkGroupUserInfoEntity playClerkGroupUserInfo) {
|
||||
Page<PlayClerkGroupUserInfoEntity> page = new Page<>(1, 10);
|
||||
return this.baseMapper.selectPage(page, new LambdaQueryWrapper<PlayClerkGroupUserInfoEntity>());
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增店员和分组关系
|
||||
*
|
||||
* @param playClerkGroupUserInfo 店员和分组关系
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean create(PlayClerkGroupUserInfoEntity playClerkGroupUserInfo) {
|
||||
if (StrUtil.isBlankIfStr(playClerkGroupUserInfo.getId())) {
|
||||
playClerkGroupUserInfo.setId(IdUtils.getUuid());
|
||||
}
|
||||
return save(playClerkGroupUserInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改店员和分组关系
|
||||
*
|
||||
* @param playClerkGroupUserInfo 店员和分组关系
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean update(PlayClerkGroupUserInfoEntity playClerkGroupUserInfo) {
|
||||
return updateById(playClerkGroupUserInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除店员和分组关系
|
||||
*
|
||||
* @param ids 需要删除的店员和分组关系主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePlayClerkGroupUserInfoByIds(String[] ids) {
|
||||
return playClerkGroupUserInfoMapper.deleteBatchIds(Arrays.asList(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除店员和分组关系信息
|
||||
*
|
||||
* @param id 店员和分组关系主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePlayClerkGroupUserInfoById(String id) {
|
||||
return playClerkGroupUserInfoMapper.deleteById(id);
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
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;
|
||||
@@ -11,10 +10,12 @@ 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 com.starry.common.utils.IdUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -77,8 +78,9 @@ public class PlayClerkLevelInfoServiceImpl extends ServiceImpl<PlayClerkLevelInf
|
||||
@Override
|
||||
public boolean create(PlayClerkLevelInfoEntity playClerkLevelInfo) {
|
||||
if (StrUtil.isBlankIfStr(playClerkLevelInfo.getId())) {
|
||||
playClerkLevelInfo.setId(IdUtil.fastSimpleUUID());
|
||||
playClerkLevelInfo.setId(IdUtils.getUuid());
|
||||
}
|
||||
playClerkLevelInfo.setCreatedTime(new Date());
|
||||
return save(playClerkLevelInfo);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,186 @@
|
||||
package com.starry.admin.modules.clerk.service.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
import com.starry.admin.modules.clerk.mapper.PlayClerkRankingInfoMapper;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkLevelInfoEntity;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkRankingInfoEntity;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkUserInfoEntity;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkRankingInfoService;
|
||||
import com.starry.admin.modules.weichat.entity.order.PlayOrderHistoryRankingReturnVo;
|
||||
import com.starry.admin.modules.weichat.entity.order.PlayOrderRankingListVo;
|
||||
import com.starry.admin.modules.weichat.entity.order.PlayOrderRankingReturnVo;
|
||||
import com.starry.common.utils.IdUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 店员排行Service业务层处理
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-25
|
||||
*/
|
||||
@Service
|
||||
public class PlayClerkRankingInfoServiceImpl extends ServiceImpl<PlayClerkRankingInfoMapper, PlayClerkRankingInfoEntity> implements IPlayClerkRankingInfoService {
|
||||
@Resource
|
||||
private PlayClerkRankingInfoMapper playClerkRankingInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询店员排行
|
||||
*
|
||||
* @param id 店员排行主键
|
||||
* @return 店员排行
|
||||
*/
|
||||
@Override
|
||||
public PlayClerkRankingInfoEntity selectPlayClerkRankingInfoById(String id) {
|
||||
return this.baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<PlayOrderHistoryRankingReturnVo> selectHistoryRanking(String clerkId) {
|
||||
long serialNumber = selectSerialNumber();
|
||||
MPJLambdaWrapper<PlayClerkRankingInfoEntity> lambdaQueryWrapper = new MPJLambdaWrapper<>();
|
||||
// 根据排行序号和用户ID查询
|
||||
lambdaQueryWrapper.ne(PlayClerkRankingInfoEntity::getSerialNumber, serialNumber);
|
||||
lambdaQueryWrapper.eq(PlayClerkRankingInfoEntity::getClerkId, clerkId);
|
||||
return this.baseMapper.selectJoinList(PlayOrderHistoryRankingReturnVo.class, lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayOrderRankingReturnVo selectCurrentRanking(String clerkId) {
|
||||
long serialNumber = selectSerialNumber();
|
||||
MPJLambdaWrapper<PlayClerkRankingInfoEntity> lambdaQueryWrapper = new MPJLambdaWrapper<>();
|
||||
lambdaQueryWrapper.selectAll(PlayClerkRankingInfoEntity.class);
|
||||
//店员信息
|
||||
lambdaQueryWrapper.selectAs(PlayClerkUserInfoEntity::getId, "clerkId").selectAs(PlayClerkUserInfoEntity::getNickname, "clerkNickname").selectAs(PlayClerkUserInfoEntity::getAvatar, "clerkAvatar").selectAs(PlayClerkUserInfoEntity::getSex, "clerkSex");
|
||||
lambdaQueryWrapper.leftJoin(PlayClerkUserInfoEntity.class, PlayClerkUserInfoEntity::getId, PlayClerkRankingInfoEntity::getClerkId);
|
||||
//店员等级
|
||||
lambdaQueryWrapper.selectAs(PlayClerkLevelInfoEntity::getId, "levelId").selectAs(PlayClerkLevelInfoEntity::getName, "levelName");
|
||||
lambdaQueryWrapper.leftJoin(PlayClerkLevelInfoEntity.class, PlayClerkLevelInfoEntity::getId, PlayClerkUserInfoEntity::getLevelId);
|
||||
// 根据排行序号和用户ID查询
|
||||
lambdaQueryWrapper.eq(PlayClerkRankingInfoEntity::getSerialNumber, serialNumber);
|
||||
lambdaQueryWrapper.eq(PlayClerkRankingInfoEntity::getClerkId, clerkId);
|
||||
PlayOrderRankingReturnVo returnVo = this.baseMapper.selectJoinOne(PlayOrderRankingReturnVo.class, lambdaQueryWrapper);
|
||||
if (returnVo == null) {
|
||||
returnVo = new PlayOrderRankingReturnVo();
|
||||
}
|
||||
returnVo.setRankings(this.selectBySerialNumber(serialNumber));
|
||||
return returnVo;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<PlayClerkRankingInfoEntity> selectMaxSerialNumber() {
|
||||
MPJLambdaWrapper<PlayClerkRankingInfoEntity> lambdaQueryWrapper = new MPJLambdaWrapper<>();
|
||||
lambdaQueryWrapper.eq(PlayClerkRankingInfoEntity::getSerialNumber, this.selectSerialNumber());
|
||||
return this.baseMapper.selectList(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前期排名序号
|
||||
*
|
||||
* @return PlayClerkRankingInfoEntity
|
||||
*/
|
||||
@Override
|
||||
public Integer selectSerialNumber() {
|
||||
LambdaQueryWrapper<PlayClerkRankingInfoEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.orderByDesc(PlayClerkRankingInfoEntity::getSerialNumber).last("limit 1");
|
||||
PlayClerkRankingInfoEntity entity = this.baseMapper.selectOne(lambdaQueryWrapper);
|
||||
if (entity == null || entity.getSerialNumber() == null) {
|
||||
return 0;
|
||||
}
|
||||
return entity.getSerialNumber();
|
||||
}
|
||||
|
||||
|
||||
List<PlayOrderRankingListVo> selectBySerialNumber(long serialNumber) {
|
||||
MPJLambdaWrapper<PlayClerkRankingInfoEntity> lambdaQueryWrapper = new MPJLambdaWrapper<>();
|
||||
lambdaQueryWrapper.eq(PlayClerkRankingInfoEntity::getSerialNumber, serialNumber);
|
||||
lambdaQueryWrapper.orderByDesc(PlayClerkRankingInfoEntity::getRankingIndex);
|
||||
lambdaQueryWrapper.selectAll(PlayClerkRankingInfoEntity.class);
|
||||
//店员信息
|
||||
lambdaQueryWrapper.selectAs(PlayClerkUserInfoEntity::getId, "clerkId").selectAs(PlayClerkUserInfoEntity::getNickname, "clerkNickname").selectAs(PlayClerkUserInfoEntity::getAvatar, "clerkAvatar").selectAs(PlayClerkUserInfoEntity::getSex, "clerkSex");
|
||||
lambdaQueryWrapper.leftJoin(PlayClerkUserInfoEntity.class, PlayClerkUserInfoEntity::getId, PlayClerkRankingInfoEntity::getClerkId);
|
||||
//店员等级
|
||||
lambdaQueryWrapper.selectAs(PlayClerkLevelInfoEntity::getId, "levelId").selectAs(PlayClerkLevelInfoEntity::getName, "levelName");
|
||||
lambdaQueryWrapper.leftJoin(PlayClerkLevelInfoEntity.class, PlayClerkLevelInfoEntity::getId, PlayClerkUserInfoEntity::getLevelId);
|
||||
return this.baseMapper.selectJoinList(PlayOrderRankingListVo.class, lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayClerkRankingInfoEntity selectByTime(String clerkId, LocalDate startTime, LocalDate endTime) {
|
||||
MPJLambdaWrapper<PlayClerkRankingInfoEntity> lambdaQueryWrapper = new MPJLambdaWrapper<>();
|
||||
lambdaQueryWrapper.eq(PlayClerkRankingInfoEntity::getStartCountDate, startTime);
|
||||
lambdaQueryWrapper.eq(PlayClerkRankingInfoEntity::getEndCountDate, endTime);
|
||||
lambdaQueryWrapper.eq(PlayClerkRankingInfoEntity::getClerkId, clerkId);
|
||||
return this.baseMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询店员排行列表
|
||||
*
|
||||
* @param playClerkRankingInfo 店员排行
|
||||
* @return 店员排行
|
||||
*/
|
||||
@Override
|
||||
public IPage<PlayClerkRankingInfoEntity> selectPlayClerkRankingInfoByPage(PlayClerkRankingInfoEntity playClerkRankingInfo) {
|
||||
Page<PlayClerkRankingInfoEntity> page = new Page<>(1, 10);
|
||||
return this.baseMapper.selectPage(page, new LambdaQueryWrapper<>());
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增店员排行
|
||||
*
|
||||
* @param playClerkRankingInfo 店员排行
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean create(PlayClerkRankingInfoEntity playClerkRankingInfo) {
|
||||
if (StrUtil.isBlankIfStr(playClerkRankingInfo.getId())) {
|
||||
playClerkRankingInfo.setId(IdUtils.getUuid());
|
||||
}
|
||||
return save(playClerkRankingInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改店员排行
|
||||
*
|
||||
* @param playClerkRankingInfo 店员排行
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean update(PlayClerkRankingInfoEntity playClerkRankingInfo) {
|
||||
return updateById(playClerkRankingInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除店员排行
|
||||
*
|
||||
* @param ids 需要删除的店员排行主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePlayClerkRankingInfoByIds(String[] ids) {
|
||||
return playClerkRankingInfoMapper.deleteBatchIds(Arrays.asList(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除店员排行信息
|
||||
*
|
||||
* @param id 店员排行主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePlayClerkRankingInfoById(String id) {
|
||||
return playClerkRankingInfoMapper.deleteById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.starry.admin.modules.clerk.service.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.starry.admin.modules.clerk.mapper.PlayClerkTypeInfoMapper;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkTypeInfoEntity;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkTypeInfoService;
|
||||
import com.starry.common.utils.IdUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 店员分类信息Service业务层处理
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-31
|
||||
*/
|
||||
@Service
|
||||
public class PlayClerkTypeInfoServiceImpl extends ServiceImpl<PlayClerkTypeInfoMapper, PlayClerkTypeInfoEntity> implements IPlayClerkTypeInfoService {
|
||||
@Resource
|
||||
private PlayClerkTypeInfoMapper playClerkTypeInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询店员分类信息
|
||||
*
|
||||
* @param id 店员分类信息主键
|
||||
* @return 店员分类信息
|
||||
*/
|
||||
@Override
|
||||
public PlayClerkTypeInfoEntity selectPlayClerkTypeInfoById(String id) {
|
||||
return this.baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<PlayClerkTypeInfoEntity> selectByAll() {
|
||||
return this.baseMapper.selectList(new LambdaQueryWrapper<>());
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询店员分类信息列表
|
||||
*
|
||||
* @param playClerkTypeInfo 店员分类信息
|
||||
* @return 店员分类信息
|
||||
*/
|
||||
@Override
|
||||
public IPage<PlayClerkTypeInfoEntity> selectPlayClerkTypeInfoByPage(PlayClerkTypeInfoEntity playClerkTypeInfo) {
|
||||
Page<PlayClerkTypeInfoEntity> page = new Page<>(1, 10);
|
||||
return this.baseMapper.selectPage(page, new LambdaQueryWrapper<PlayClerkTypeInfoEntity>());
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增店员分类信息
|
||||
*
|
||||
* @param playClerkTypeInfo 店员分类信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean create(PlayClerkTypeInfoEntity playClerkTypeInfo) {
|
||||
if (StrUtil.isBlankIfStr(playClerkTypeInfo.getId())) {
|
||||
playClerkTypeInfo.setId(IdUtils.getUuid());
|
||||
}
|
||||
return save(playClerkTypeInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改店员分类信息
|
||||
*
|
||||
* @param playClerkTypeInfo 店员分类信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean update(PlayClerkTypeInfoEntity playClerkTypeInfo) {
|
||||
return updateById(playClerkTypeInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除店员分类信息
|
||||
*
|
||||
* @param ids 需要删除的店员分类信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePlayClerkTypeInfoByIds(String[] ids) {
|
||||
return playClerkTypeInfoMapper.deleteBatchIds(Arrays.asList(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除店员分类信息信息
|
||||
*
|
||||
* @param id 店员分类信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePlayClerkTypeInfoById(String id) {
|
||||
return playClerkTypeInfoMapper.deleteById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
package com.starry.admin.modules.clerk.service.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.starry.admin.modules.clerk.mapper.PlayClerkTypeUserInfoMapper;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkTypeUserInfoEntity;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkTypeUserInfoService;
|
||||
import com.starry.common.utils.IdUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 店员和分类关系Service业务层处理
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-31
|
||||
*/
|
||||
@Service
|
||||
public class PlayClerkTypeUserInfoServiceImpl extends ServiceImpl<PlayClerkTypeUserInfoMapper, PlayClerkTypeUserInfoEntity> implements IPlayClerkTypeUserInfoService {
|
||||
@Resource
|
||||
private PlayClerkTypeUserInfoMapper playClerkTypeUserInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询店员和分类关系
|
||||
*
|
||||
* @param id 店员和分类关系主键
|
||||
* @return 店员和分类关系
|
||||
*/
|
||||
@Override
|
||||
public PlayClerkTypeUserInfoEntity selectPlayClerkTypeUserInfoById(String id) {
|
||||
return this.baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询店员和分类关系列表
|
||||
*
|
||||
* @param playClerkTypeUserInfo 店员和分类关系
|
||||
* @return 店员和分类关系
|
||||
*/
|
||||
@Override
|
||||
public IPage<PlayClerkTypeUserInfoEntity> selectPlayClerkTypeUserInfoByPage(PlayClerkTypeUserInfoEntity playClerkTypeUserInfo) {
|
||||
Page<PlayClerkTypeUserInfoEntity> page = new Page<>(1, 10);
|
||||
return this.baseMapper.selectPage(page, new LambdaQueryWrapper<PlayClerkTypeUserInfoEntity>());
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增店员和分类关系
|
||||
*
|
||||
* @param playClerkTypeUserInfo 店员和分类关系
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean create(PlayClerkTypeUserInfoEntity playClerkTypeUserInfo) {
|
||||
if (StrUtil.isBlankIfStr(playClerkTypeUserInfo.getId())) {
|
||||
playClerkTypeUserInfo.setId(IdUtils.getUuid());
|
||||
}
|
||||
return save(playClerkTypeUserInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改店员和分类关系
|
||||
*
|
||||
* @param playClerkTypeUserInfo 店员和分类关系
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean update(PlayClerkTypeUserInfoEntity playClerkTypeUserInfo) {
|
||||
return updateById(playClerkTypeUserInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除店员和分类关系
|
||||
*
|
||||
* @param ids 需要删除的店员和分类关系主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePlayClerkTypeUserInfoByIds(String[] ids) {
|
||||
return playClerkTypeUserInfoMapper.deleteBatchIds(Arrays.asList(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除店员和分类关系信息
|
||||
*
|
||||
* @param id 店员和分类关系主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePlayClerkTypeUserInfoById(String id) {
|
||||
return playClerkTypeUserInfoMapper.deleteById(id);
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
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;
|
||||
@@ -8,22 +7,29 @@ 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.balance.service.IPlayBalanceDetailsInfoService;
|
||||
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.module.vo.PlayClerkUnsettledWagesInfoQueryVo;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkUnsettledWagesInfoReturnVo;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkCommodityService;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkUserInfoService;
|
||||
import com.starry.admin.modules.custom.module.entity.PlayCustomUserInfoEntity;
|
||||
import com.starry.admin.modules.custom.module.vo.PlayCustomRankingReturnVo;
|
||||
import com.starry.admin.modules.follow.module.entity.PlayCustomFollowInfoEntity;
|
||||
import com.starry.admin.modules.follow.service.IPlayCustomFollowInfoService;
|
||||
import com.starry.admin.modules.order.module.entity.PlayOrderInfoEntity;
|
||||
import com.starry.admin.modules.weichat.entity.PlayClerkUserLoginResponseVo;
|
||||
import com.starry.admin.modules.weichat.entity.clerk.PlayClerkUserInfoQueryVo;
|
||||
import com.starry.admin.modules.weichat.entity.clerk.PlayClerkUserInfoResultVo;
|
||||
import com.starry.common.utils.ConvertUtil;
|
||||
import com.starry.common.utils.IdUtils;
|
||||
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.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
@@ -39,8 +45,10 @@ public class PlayClerkUserInfoServiceImpl extends ServiceImpl<PlayClerkUserInfoM
|
||||
private PlayClerkUserInfoMapper playClerkUserInfoMapper;
|
||||
|
||||
@Resource
|
||||
private PlayClerkDataReviewInfoServiceImpl dataReviewInfoService;
|
||||
private PlayClerkDataReviewInfoServiceImpl playClerkDataReviewInfoService;
|
||||
|
||||
@Resource
|
||||
private PlayClerkUserReviewInfoServiceImpl playClerkUserReviewInfoService;
|
||||
|
||||
@Resource
|
||||
private IPlayClerkCommodityService playClerkCommodityService;
|
||||
@@ -48,6 +56,20 @@ public class PlayClerkUserInfoServiceImpl extends ServiceImpl<PlayClerkUserInfoM
|
||||
@Resource
|
||||
private IPlayCustomFollowInfoService customFollowInfoService;
|
||||
|
||||
@Resource
|
||||
private IPlayBalanceDetailsInfoService playBalanceDetailsInfoService;
|
||||
|
||||
|
||||
@Override
|
||||
public PlayClerkLevelInfoEntity queryLevelCommission(String clerkId) {
|
||||
MPJLambdaWrapper<PlayClerkUserInfoEntity> lambdaWrapper = new MPJLambdaWrapper<>();
|
||||
lambdaWrapper.selectAll(PlayClerkLevelInfoEntity.class);
|
||||
lambdaWrapper.selectAs(PlayClerkUserInfoEntity::getLevelId,"levelId");
|
||||
lambdaWrapper.leftJoin(PlayClerkLevelInfoEntity.class,PlayClerkLevelInfoEntity::getId,PlayClerkUserInfoEntity::getLevelId);
|
||||
lambdaWrapper.eq(PlayClerkUserInfoEntity::getId,clerkId);
|
||||
return this.baseMapper.selectJoinOne(PlayClerkLevelInfoEntity.class,lambdaWrapper);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayClerkUserInfoEntity queryByUserId(String id) {
|
||||
@@ -81,13 +103,9 @@ public class PlayClerkUserInfoServiceImpl extends ServiceImpl<PlayClerkUserInfoM
|
||||
@Override
|
||||
public PlayClerkUserLoginResponseVo getVo(PlayClerkUserInfoEntity userInfo) {
|
||||
PlayClerkUserLoginResponseVo result = ConvertUtil.entityToVo(userInfo, PlayClerkUserLoginResponseVo.class);
|
||||
|
||||
List<PlayClerkDataReviewInfoEntity> list = playClerkDataReviewInfoService.queryByClerkId(userInfo.getId());
|
||||
// 判断头像、音频、相册是否可以编辑,如果存在未审核的数据,则不允许编辑
|
||||
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));
|
||||
Map<String, PlayClerkDataReviewInfoEntity> map = list.stream().collect(Collectors.toMap(PlayClerkDataReviewInfoEntity::getDataType, account -> account, (entity1, entity2) -> entity1));
|
||||
if (map.containsKey("1")) {
|
||||
result.setAvatarAllowEdit(false);
|
||||
}
|
||||
@@ -97,10 +115,19 @@ public class PlayClerkUserInfoServiceImpl extends ServiceImpl<PlayClerkUserInfoM
|
||||
if (map.containsKey("3")) {
|
||||
result.setAudioAllowEdit(false);
|
||||
}
|
||||
if (map.containsKey("0") || "1".equals(result.getClerkState())) {
|
||||
//如果存在未审批的申请,或者当前已经是店员
|
||||
PlayClerkUserReviewInfoEntity entity = playClerkUserReviewInfoService.queryByClerkId(userInfo.getId(), "0");
|
||||
if (entity != null || "1".equals(result.getClerkState())) {
|
||||
result.setClerkAllowEdit(false);
|
||||
}
|
||||
result.setCommodity(ConvertUtil.entityToVoList(playClerkCommodityService.selectCommodityTypeByUser(userInfo.getId()), PlayClerkCommodityQueryVo.class));
|
||||
|
||||
// 查询店员服务项目
|
||||
List<PlayClerkCommodityEntity> clerkCommodityEntities = playClerkCommodityService.selectCommodityTypeByUser(userInfo.getId(), "");
|
||||
List<PlayClerkCommodityQueryVo> playClerkCommodityQueryVos = new ArrayList<>();
|
||||
for (PlayClerkCommodityEntity clerkCommodityEntity : clerkCommodityEntities) {
|
||||
playClerkCommodityQueryVos.add(new PlayClerkCommodityQueryVo(clerkCommodityEntity.getCommodityName(), clerkCommodityEntity.getEnablingState()));
|
||||
}
|
||||
result.setCommodity(playClerkCommodityQueryVos);
|
||||
result.setArea(userInfo.getProvince() + "-" + userInfo.getCity());
|
||||
return result;
|
||||
}
|
||||
@@ -117,12 +144,17 @@ public class PlayClerkUserInfoServiceImpl extends ServiceImpl<PlayClerkUserInfoM
|
||||
|
||||
@Override
|
||||
public void updateAccountBalanceById(String id, BigDecimal accountBalance) {
|
||||
PlayClerkUserInfoEntity entity = new PlayClerkUserInfoEntity();
|
||||
entity.setAccountBalance(accountBalance);
|
||||
entity.setId(id);
|
||||
this.baseMapper.updateById(entity);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateAccountBalanceById(String userId, BigDecimal balanceBeforeOperation, BigDecimal balanceAfterOperation, String operationType, String operationAction, BigDecimal balanceMoney, String orderId) {
|
||||
//修改用户余额
|
||||
this.baseMapper.updateById(new PlayClerkUserInfoEntity(userId, balanceAfterOperation));
|
||||
//记录余额变更记录
|
||||
playBalanceDetailsInfoService.create("0", userId, balanceBeforeOperation, balanceAfterOperation, operationType, operationAction, balanceMoney, orderId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询店员列表
|
||||
@@ -131,15 +163,15 @@ public class PlayClerkUserInfoServiceImpl extends ServiceImpl<PlayClerkUserInfoM
|
||||
* @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);
|
||||
public IPage<PlayClerkUserInfoResultVo> selectPlayClerkUserInfoByPage(PlayClerkUserInfoQueryVo vo) {
|
||||
Page<PlayClerkUserInfoResultVo> page = new Page<>(vo.getPageNum(), vo.getPageSize());
|
||||
|
||||
MPJLambdaWrapper<PlayClerkUserInfoEntity> lambdaQueryWrapper = new MPJLambdaWrapper<>();
|
||||
// 查询主表全部字段
|
||||
lambdaQueryWrapper.selectAll(PlayClerkUserInfoEntity.class).selectAs(PlayClerkUserInfoEntity::getCity, "address");
|
||||
// 等级表
|
||||
lambdaQueryWrapper.selectAs(PlayClerkLevelInfoEntity::getName, "levelName");
|
||||
lambdaQueryWrapper.leftJoin(PlayClerkLevelInfoEntity.class, PlayClerkLevelInfoEntity::getId, PlayClerkUserInfoEntity::getLevelId);
|
||||
|
||||
// 服务项目表
|
||||
if (StrUtil.isNotBlank(vo.getNickname())) {
|
||||
@@ -163,28 +195,141 @@ public class PlayClerkUserInfoServiceImpl extends ServiceImpl<PlayClerkUserInfoM
|
||||
if (StrUtil.isNotBlank(vo.getRecommendationState())) {
|
||||
lambdaQueryWrapper.eq(PlayClerkUserInfoEntity::getRecommendationState, vo.getRecommendationState());
|
||||
}
|
||||
return this.baseMapper.selectJoinPage(page, PlayClerkUserListResultVo.class, lambdaQueryWrapper);
|
||||
return this.baseMapper.selectJoinPage(page, PlayClerkUserInfoResultVo.class, lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PlayClerkUserInfoEntity> listAll() {
|
||||
return this.baseMapper.selectList(new 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());
|
||||
}
|
||||
}
|
||||
public IPage<PlayClerkUnsettledWagesInfoReturnVo> listUnsettledWagesByPage(PlayClerkUnsettledWagesInfoQueryVo vo) {
|
||||
MPJLambdaWrapper<PlayClerkUserInfoEntity> lambdaQueryWrapper = new MPJLambdaWrapper<>();
|
||||
//查询所有店员
|
||||
lambdaQueryWrapper.selectAs(PlayClerkUserInfoEntity::getNickname, "clerkNickname").selectAs(PlayClerkUserInfoEntity::getId, "clerkId");
|
||||
lambdaQueryWrapper.eq(PlayClerkUserInfoEntity::getClerkState, "1");
|
||||
if (StrUtil.isNotBlank(vo.getClerkId())) {
|
||||
lambdaQueryWrapper.eq(PlayClerkUserInfoEntity::getId, vo.getClerkId());
|
||||
}
|
||||
if (StrUtil.isNotBlank(vo.getListingState())) {
|
||||
lambdaQueryWrapper.eq(PlayClerkUserInfoEntity::getListingState, vo.getListingState());
|
||||
}
|
||||
//查询店员订单信息
|
||||
lambdaQueryWrapper.selectCollection(PlayOrderInfoEntity.class, PlayClerkUnsettledWagesInfoReturnVo::getOrderInfoEntities);
|
||||
lambdaQueryWrapper.leftJoin(PlayOrderInfoEntity.class, PlayOrderInfoEntity::getAcceptBy, PlayClerkUserInfoEntity::getId);
|
||||
lambdaQueryWrapper.eq(PlayOrderInfoEntity::getOrderSettlementState, "0");
|
||||
return this.baseMapper.selectJoinPage(new Page<>(vo.getPageNum(), vo.getPageSize()), PlayClerkUnsettledWagesInfoReturnVo.class, lambdaQueryWrapper);
|
||||
}
|
||||
@Override
|
||||
public IPage<PlayClerkUserReturnVo> selectByPage(PlayClerkUserQueryVo vo) {
|
||||
MPJLambdaWrapper<PlayClerkUserInfoEntity> lambdaQueryWrapper = new MPJLambdaWrapper<>();
|
||||
//主表(店员表全部字段)
|
||||
lambdaQueryWrapper.selectAll(PlayClerkUserInfoEntity.class);
|
||||
//订单表
|
||||
lambdaQueryWrapper.selectCollection(PlayOrderInfoEntity.class, PlayCustomRankingReturnVo::getOrderInfos);
|
||||
lambdaQueryWrapper.leftJoin(PlayOrderInfoEntity.class, PlayOrderInfoEntity::getAcceptBy, PlayCustomUserInfoEntity::getId);
|
||||
if(StrUtil.isNotBlank(vo.getId())) {
|
||||
lambdaQueryWrapper.eq(PlayClerkUserInfoEntity::getId, vo.getId());
|
||||
}
|
||||
if(StrUtil.isNotBlank(vo.getNickname())) {
|
||||
lambdaQueryWrapper.eq(PlayClerkUserInfoEntity::getNickname, vo.getNickname());
|
||||
}
|
||||
if(StrUtil.isNotBlank(vo.getNickname())) {
|
||||
lambdaQueryWrapper.eq(PlayClerkUserInfoEntity::getNickname, vo.getNickname());
|
||||
}
|
||||
if (StrUtil.isNotBlank(vo.getPhone())) {
|
||||
lambdaQueryWrapper.eq(PlayClerkUserInfoEntity::getPhone, vo.getPhone());
|
||||
}
|
||||
if (StrUtil.isNotBlank(vo.getGroupId())) {
|
||||
lambdaQueryWrapper.eq(PlayClerkUserInfoEntity::getGroupId, vo.getGroupId());
|
||||
}
|
||||
if (StrUtil.isNotBlank(vo.getSex())) {
|
||||
lambdaQueryWrapper.eq(PlayClerkUserInfoEntity::getSex, vo.getSex());
|
||||
}
|
||||
if (StrUtil.isNotBlank(vo.getFixingLevel())) {
|
||||
lambdaQueryWrapper.eq(PlayClerkUserInfoEntity::getFixingLevel, vo.getFixingLevel());
|
||||
}
|
||||
if (StrUtil.isNotBlank(vo.getLevelId())) {
|
||||
lambdaQueryWrapper.eq(PlayClerkUserInfoEntity::getLevelId, vo.getLevelId());
|
||||
}
|
||||
if (StrUtil.isNotBlank(vo.getProvince())) {
|
||||
lambdaQueryWrapper.eq(PlayClerkUserInfoEntity::getProvince, vo.getProvince());
|
||||
}
|
||||
if (StrUtil.isNotBlank(vo.getCity())) {
|
||||
lambdaQueryWrapper.eq(PlayClerkUserInfoEntity::getCity, vo.getCity());
|
||||
}
|
||||
if (StrUtil.isNotBlank(vo.getOnboardingState())) {
|
||||
lambdaQueryWrapper.eq(PlayClerkUserInfoEntity::getOnboardingState, vo.getOnboardingState());
|
||||
}
|
||||
if (StrUtil.isNotBlank(vo.getRecommendationState())) {
|
||||
lambdaQueryWrapper.eq(PlayClerkUserInfoEntity::getRecommendationState, vo.getRecommendationState());
|
||||
}
|
||||
if (StrUtil.isNotBlank(vo.getPinToTopState())) {
|
||||
lambdaQueryWrapper.eq(PlayClerkUserInfoEntity::getPinToTopState, vo.getPinToTopState());
|
||||
}
|
||||
if (StrUtil.isNotBlank(vo.getOnlineState())) {
|
||||
lambdaQueryWrapper.eq(PlayClerkUserInfoEntity::getOnlineState, vo.getOnlineState());
|
||||
}
|
||||
if (StrUtil.isNotBlank(vo.getDisplayState())) {
|
||||
lambdaQueryWrapper.eq(PlayClerkUserInfoEntity::getDisplayState, vo.getDisplayState());
|
||||
}
|
||||
if (StrUtil.isNotBlank(vo.getRealState())) {
|
||||
lambdaQueryWrapper.eq(PlayClerkUserInfoEntity::getRealState, vo.getRealState());
|
||||
}
|
||||
if (StrUtil.isNotBlank(vo.getMandatoryRealState())) {
|
||||
lambdaQueryWrapper.eq(PlayClerkUserInfoEntity::getMandatoryRealState, vo.getMandatoryRealState());
|
||||
}
|
||||
if (StrUtil.isNotBlank(vo.getClerkState())) {
|
||||
lambdaQueryWrapper.eq(PlayClerkUserInfoEntity::getClerkState, vo.getClerkState());
|
||||
}
|
||||
if (StrUtil.isNotBlank(vo.getCode())) {
|
||||
lambdaQueryWrapper.eq(PlayClerkUserInfoEntity::getCode, vo.getCode());
|
||||
}
|
||||
|
||||
IPage<PlayClerkUserReturnVo> page = this.baseMapper.selectJoinPage(new Page<>(vo.getPageNum(), vo.getPageSize()), PlayClerkUserReturnVo.class, lambdaQueryWrapper);
|
||||
|
||||
for (PlayClerkUserReturnVo record : page.getRecords()) {
|
||||
BigDecimal orderTotalAmount = new BigDecimal("0");
|
||||
int orderContinueNumber = 0;
|
||||
int orderNumber = 0;
|
||||
for (PlayOrderInfoEntity orderInfo : record.getOrderInfos()) {
|
||||
if (orderInfo.getId() == null) {
|
||||
continue;
|
||||
}
|
||||
if ("0".equals(orderInfo.getFirstOrder())) {
|
||||
orderContinueNumber++;
|
||||
}
|
||||
orderNumber++;
|
||||
if (!"4".equals(orderInfo.getOrderStatus())) {
|
||||
orderTotalAmount = orderTotalAmount.add(orderInfo.getFinalAmount());
|
||||
}
|
||||
}
|
||||
record.setOrderTotalAmount(orderTotalAmount);
|
||||
record.setOrderNumber(String.valueOf(orderNumber));
|
||||
record.setOrderContinueNumber(String.valueOf(orderContinueNumber));
|
||||
}
|
||||
|
||||
return page;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<PlayClerkUserInfoResultVo> selectByPage(PlayClerkUserInfoQueryVo vo, String customUserId) {
|
||||
IPage<PlayClerkUserInfoResultVo> voPage = this.selectPlayClerkUserInfoByPage(vo);
|
||||
Map<String, String> customFollows = new HashMap<>(16);
|
||||
// 如果当前顾客已登录,查询用户关注状态
|
||||
if (StrUtil.isNotBlank(customUserId)) {
|
||||
LambdaQueryWrapper<PlayCustomFollowInfoEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(PlayCustomFollowInfoEntity::getCustomId, customUserId);
|
||||
List<PlayCustomFollowInfoEntity> customFollowInfoEntities = customFollowInfoService.list(lambdaQueryWrapper);
|
||||
customFollows = customFollowInfoEntities.stream().collect(Collectors.toMap(PlayCustomFollowInfoEntity::getClerkId, PlayCustomFollowInfoEntity::getFollowState));
|
||||
}
|
||||
for (PlayClerkUserInfoResultVo record : voPage.getRecords()) {
|
||||
record.setFollowState(customFollows.containsKey(record.getId()) ? "1" : "0");
|
||||
record.setCommodity(playClerkCommodityService.getClerkCommodityList(record.getId(), "1"));
|
||||
}
|
||||
return voPage;
|
||||
}
|
||||
|
||||
@@ -197,7 +342,7 @@ public class PlayClerkUserInfoServiceImpl extends ServiceImpl<PlayClerkUserInfoM
|
||||
@Override
|
||||
public boolean create(PlayClerkUserInfoEntity playClerkUserInfo) {
|
||||
if (StrUtil.isBlankIfStr(playClerkUserInfo.getId())) {
|
||||
playClerkUserInfo.setId(IdUtil.fastSimpleUUID());
|
||||
playClerkUserInfo.setId(IdUtils.getUuid());
|
||||
}
|
||||
return save(playClerkUserInfo);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,177 @@
|
||||
package com.starry.admin.modules.clerk.service.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
import com.starry.admin.common.exception.CustomException;
|
||||
import com.starry.admin.modules.clerk.mapper.PlayClerkUserReviewInfoMapper;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkUserInfoEntity;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkUserReviewInfoEntity;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkUserReviewQueryVo;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkUserReviewReturnVo;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkUserReviewStateEditVo;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkCommodityService;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkUserInfoService;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkUserReviewInfoService;
|
||||
import com.starry.common.utils.IdUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 店员资料审核Service业务层处理
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-19
|
||||
*/
|
||||
@Service
|
||||
public class PlayClerkUserReviewInfoServiceImpl extends ServiceImpl<PlayClerkUserReviewInfoMapper, PlayClerkUserReviewInfoEntity> implements IPlayClerkUserReviewInfoService {
|
||||
@Resource
|
||||
private PlayClerkUserReviewInfoMapper playClerkUserReviewInfoMapper;
|
||||
|
||||
@Resource
|
||||
private IPlayClerkUserInfoService playClerkUserInfoService;
|
||||
|
||||
@Resource
|
||||
private IPlayClerkCommodityService clerkCommodityService;
|
||||
|
||||
|
||||
@Override
|
||||
public PlayClerkUserReviewInfoEntity queryByClerkId(String clerkId,String reviewState) {
|
||||
LambdaQueryWrapper<PlayClerkUserReviewInfoEntity> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(PlayClerkUserReviewInfoEntity::getClerkId, clerkId);
|
||||
queryWrapper.eq(PlayClerkUserReviewInfoEntity::getReviewState,reviewState);
|
||||
return this.baseMapper.selectOne(queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询店员资料审核
|
||||
*
|
||||
* @param id 店员资料审核主键
|
||||
* @return 店员资料审核
|
||||
*/
|
||||
@Override
|
||||
public PlayClerkUserReviewInfoEntity selectPlayClerkUserReviewInfoById(String id) {
|
||||
PlayClerkUserReviewInfoEntity entity = this.baseMapper.selectById(id);
|
||||
if (entity == null) {
|
||||
throw new CustomException("对象不存在");
|
||||
}
|
||||
return entity;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IPage<PlayClerkUserReviewReturnVo> selectByPage(PlayClerkUserReviewQueryVo vo) {
|
||||
MPJLambdaWrapper<PlayClerkUserReviewInfoEntity> lambdaQueryWrapper = new MPJLambdaWrapper<>();
|
||||
lambdaQueryWrapper.selectAll(PlayClerkUserReviewInfoEntity.class);
|
||||
//店员表
|
||||
lambdaQueryWrapper.selectAs(PlayClerkUserInfoEntity::getAvatar, "clerkAvatar").selectAs(PlayClerkUserInfoEntity::getSignature, "signature");
|
||||
lambdaQueryWrapper.leftJoin(PlayClerkUserInfoEntity.class, PlayClerkUserInfoEntity::getId, PlayClerkUserReviewInfoEntity::getClerkId);
|
||||
if (StrUtil.isNotBlank(vo.getClerkId())) {
|
||||
lambdaQueryWrapper.eq(PlayClerkUserReviewInfoEntity::getClerkId, vo.getClerkId());
|
||||
}
|
||||
if (StrUtil.isNotBlank(vo.getSex())) {
|
||||
lambdaQueryWrapper.eq(PlayClerkUserReviewInfoEntity::getSex, vo.getSex());
|
||||
}
|
||||
if (StrUtil.isNotBlank(vo.getNickname())) {
|
||||
lambdaQueryWrapper.like(PlayClerkUserReviewInfoEntity::getNickname, vo.getNickname());
|
||||
}
|
||||
if (StrUtil.isNotBlank(vo.getPhone())) {
|
||||
lambdaQueryWrapper.like(PlayClerkUserReviewInfoEntity::getPhone, vo.getPhone());
|
||||
}
|
||||
if (StrUtil.isNotBlank(vo.getReviewState())) {
|
||||
lambdaQueryWrapper.like(PlayClerkUserReviewInfoEntity::getReviewState, vo.getReviewState());
|
||||
}
|
||||
if (StrUtil.isNotBlank(vo.getWeiChatCode())) {
|
||||
lambdaQueryWrapper.like(PlayClerkUserReviewInfoEntity::getWeiChatCode, vo.getWeiChatCode());
|
||||
}
|
||||
lambdaQueryWrapper.orderByDesc(PlayClerkUserReviewInfoEntity::getAddTime);
|
||||
lambdaQueryWrapper.orderByDesc(PlayClerkUserReviewInfoEntity::getClerkId);
|
||||
return this.baseMapper.selectJoinPage(new Page<>(vo.getPageNum(), vo.getPageSize()), PlayClerkUserReviewReturnVo.class, lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询店员资料审核列表
|
||||
*
|
||||
* @param playClerkUserReviewInfo 店员资料审核
|
||||
* @return 店员资料审核
|
||||
*/
|
||||
@Override
|
||||
public IPage<PlayClerkUserReviewInfoEntity> selectPlayClerkUserReviewInfoByPage(PlayClerkUserReviewInfoEntity playClerkUserReviewInfo) {
|
||||
Page<PlayClerkUserReviewInfoEntity> page = new Page<>(1, 10);
|
||||
return this.baseMapper.selectPage(page, new LambdaQueryWrapper<>());
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增店员资料审核
|
||||
*
|
||||
* @param playClerkUserReviewInfo 店员资料审核
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean create(PlayClerkUserReviewInfoEntity playClerkUserReviewInfo) {
|
||||
if (StrUtil.isBlankIfStr(playClerkUserReviewInfo.getId())) {
|
||||
playClerkUserReviewInfo.setId(IdUtils.getUuid());
|
||||
}
|
||||
return save(playClerkUserReviewInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改店员资料审核
|
||||
*
|
||||
* @param entity 店员资料审核
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean update(PlayClerkUserReviewInfoEntity entity) {
|
||||
return updateById(entity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改店员资料审核
|
||||
*
|
||||
* @param vo 店员资料审核对象
|
||||
*/
|
||||
@Override
|
||||
public void updateDataReviewState(PlayClerkUserReviewStateEditVo vo) {
|
||||
PlayClerkUserReviewInfoEntity entity = this.selectPlayClerkUserReviewInfoById(vo.getId());
|
||||
if ("1".equals(vo.getReviewState())) {
|
||||
PlayClerkUserInfoEntity userInfo = playClerkUserInfoService.queryByUserId(entity.getClerkId());
|
||||
BeanUtils.copyProperties(entity, userInfo);
|
||||
userInfo.setClerkState("1");
|
||||
userInfo.setId(entity.getClerkId());
|
||||
userInfo.setAlbum(entity.getAlbum());
|
||||
playClerkUserInfoService.update(userInfo);
|
||||
clerkCommodityService.initClerkCommodity(userInfo.getId());
|
||||
}
|
||||
BeanUtils.copyProperties(vo, entity);
|
||||
this.update(entity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除店员资料审核
|
||||
*
|
||||
* @param ids 需要删除的店员资料审核主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePlayClerkUserReviewInfoByIds(String[] ids) {
|
||||
return playClerkUserReviewInfoMapper.deleteBatchIds(Arrays.asList(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除店员资料审核信息
|
||||
*
|
||||
* @param id 店员资料审核主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePlayClerkUserReviewInfoById(String id) {
|
||||
return playClerkUserReviewInfoMapper.deleteById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
package com.starry.admin.modules.clerk.service.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.starry.admin.modules.clerk.mapper.PlayClerkWagesDetailsInfoMapper;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkWagesDetailsInfoEntity;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkWagesDetailsInfoService;
|
||||
import com.starry.common.utils.IdUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 店员工资明细信息Service业务层处理
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-31
|
||||
*/
|
||||
@Service
|
||||
public class PlayClerkWagesDetailsInfoServiceImpl extends ServiceImpl<PlayClerkWagesDetailsInfoMapper, PlayClerkWagesDetailsInfoEntity> implements IPlayClerkWagesDetailsInfoService {
|
||||
@Resource
|
||||
private PlayClerkWagesDetailsInfoMapper playClerkWagesDetailsInfoMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public PlayClerkWagesDetailsInfoEntity selectByClerkIdAndWagesId(String wagesId, String clerkId) {
|
||||
LambdaQueryWrapper<PlayClerkWagesDetailsInfoEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(PlayClerkWagesDetailsInfoEntity::getWagesId, wagesId);
|
||||
lambdaQueryWrapper.eq(PlayClerkWagesDetailsInfoEntity::getClerkId, clerkId);
|
||||
return this.baseMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public PlayClerkWagesDetailsInfoEntity selectByOrderId(String orderId) {
|
||||
LambdaQueryWrapper<PlayClerkWagesDetailsInfoEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(PlayClerkWagesDetailsInfoEntity::getOrderId, orderId);
|
||||
return this.baseMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询店员工资明细信息
|
||||
*
|
||||
* @param id 店员工资明细信息主键
|
||||
* @return 店员工资明细信息
|
||||
*/
|
||||
@Override
|
||||
public PlayClerkWagesDetailsInfoEntity selectPlayClerkWagesDetailsInfoById(String id) {
|
||||
return this.baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PlayClerkWagesDetailsInfoEntity> selectByWagesId(String wagesId) {
|
||||
LambdaQueryWrapper<PlayClerkWagesDetailsInfoEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(PlayClerkWagesDetailsInfoEntity::getWagesId, wagesId);
|
||||
return this.baseMapper.selectList(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询店员工资明细信息列表
|
||||
*
|
||||
* @param playClerkWagesDetailsInfo 店员工资明细信息
|
||||
* @return 店员工资明细信息
|
||||
*/
|
||||
@Override
|
||||
public IPage<PlayClerkWagesDetailsInfoEntity> selectPlayClerkWagesDetailsInfoByPage(PlayClerkWagesDetailsInfoEntity playClerkWagesDetailsInfo) {
|
||||
Page<PlayClerkWagesDetailsInfoEntity> page = new Page<>(1, 10);
|
||||
return this.baseMapper.selectPage(page, new LambdaQueryWrapper<>());
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增店员工资明细信息
|
||||
*
|
||||
* @param playClerkWagesDetailsInfo 店员工资明细信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean create(PlayClerkWagesDetailsInfoEntity playClerkWagesDetailsInfo) {
|
||||
if (StrUtil.isBlankIfStr(playClerkWagesDetailsInfo.getId())) {
|
||||
playClerkWagesDetailsInfo.setId(IdUtils.getUuid());
|
||||
}
|
||||
return save(playClerkWagesDetailsInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改店员工资明细信息
|
||||
*
|
||||
* @param playClerkWagesDetailsInfo 店员工资明细信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean update(PlayClerkWagesDetailsInfoEntity playClerkWagesDetailsInfo) {
|
||||
return updateById(playClerkWagesDetailsInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除店员工资明细信息
|
||||
*
|
||||
* @param ids 需要删除的店员工资明细信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePlayClerkWagesDetailsInfoByIds(String[] ids) {
|
||||
return playClerkWagesDetailsInfoMapper.deleteBatchIds(Arrays.asList(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除店员工资明细信息信息
|
||||
*
|
||||
* @param id 店员工资明细信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePlayClerkWagesDetailsInfoById(String id) {
|
||||
return playClerkWagesDetailsInfoMapper.deleteById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,173 @@
|
||||
package com.starry.admin.modules.clerk.service.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
import com.starry.admin.modules.clerk.mapper.PlayClerkWagesInfoMapper;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkUserInfoEntity;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkWagesInfoEntity;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkWagesInfoQueryVo;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkWagesInfoReturnVo;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkWagesInfoService;
|
||||
import com.starry.common.utils.IdUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 店员工资结算信息Service业务层处理
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-31
|
||||
*/
|
||||
@Service
|
||||
public class PlayClerkWagesInfoServiceImpl extends ServiceImpl<PlayClerkWagesInfoMapper, PlayClerkWagesInfoEntity> implements IPlayClerkWagesInfoService {
|
||||
@Resource
|
||||
private PlayClerkWagesInfoMapper playClerkWagesInfoMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public PlayClerkWagesInfoEntity selectCurrentPeriodWagesByClerkId(String clerkId) {
|
||||
LambdaQueryWrapper<PlayClerkWagesInfoEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(PlayClerkWagesInfoEntity::getClerkId, clerkId);
|
||||
lambdaQueryWrapper.eq(PlayClerkWagesInfoEntity::getHistoricalStatistics, "0");
|
||||
return this.baseMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PlayClerkWagesInfoEntity> selectHistoricalWagesByClerkId(String clerkId) {
|
||||
LambdaQueryWrapper<PlayClerkWagesInfoEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(PlayClerkWagesInfoEntity::getClerkId, clerkId);
|
||||
lambdaQueryWrapper.eq(PlayClerkWagesInfoEntity::getHistoricalStatistics, "1");
|
||||
return this.baseMapper.selectList(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayClerkWagesInfoEntity getLastSettlement(String clerkId) {
|
||||
LambdaQueryWrapper<PlayClerkWagesInfoEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(PlayClerkWagesInfoEntity::getClerkId, clerkId);
|
||||
lambdaQueryWrapper.eq(PlayClerkWagesInfoEntity::getHistoricalStatistics, "0");
|
||||
lambdaQueryWrapper.orderByDesc(PlayClerkWagesInfoEntity::getEndCountDate);
|
||||
return this.baseMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public LocalDate getLastSettlementTime(String clerkId) {
|
||||
LambdaQueryWrapper<PlayClerkWagesInfoEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(PlayClerkWagesInfoEntity::getClerkId, clerkId);
|
||||
lambdaQueryWrapper.eq(PlayClerkWagesInfoEntity::getHistoricalStatistics, "1");
|
||||
lambdaQueryWrapper.orderByDesc(PlayClerkWagesInfoEntity::getEndCountDate);
|
||||
PlayClerkWagesInfoEntity entity = this.baseMapper.selectOne(lambdaQueryWrapper);
|
||||
if (entity == null) {
|
||||
return LocalDate.of(2000, 1, 1);
|
||||
}
|
||||
return entity.getEndCountDate();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IPage<PlayClerkWagesInfoReturnVo> selectHistoricalByPage(PlayClerkWagesInfoQueryVo vo) {
|
||||
MPJLambdaWrapper<PlayClerkWagesInfoEntity> lambdaWrapper = new MPJLambdaWrapper<>();
|
||||
lambdaWrapper.selectAll(PlayClerkWagesInfoEntity.class);
|
||||
//凭借店员表
|
||||
lambdaWrapper.selectAs(PlayClerkUserInfoEntity::getNickname, "clerkNickname");
|
||||
lambdaWrapper.leftJoin(PlayClerkUserInfoEntity.class, PlayClerkUserInfoEntity::getId, PlayClerkWagesInfoEntity::getClerkId);
|
||||
if (StrUtil.isNotBlank(vo.getGroupId())) {
|
||||
lambdaWrapper.eq(PlayClerkUserInfoEntity::getGroupId, vo.getGroupId());
|
||||
}
|
||||
if (StrUtil.isNotBlank(vo.getListingState())) {
|
||||
lambdaWrapper.eq(PlayClerkUserInfoEntity::getListingState, vo.getListingState());
|
||||
}
|
||||
if (StrUtil.isNotBlank(vo.getClerkId())) {
|
||||
lambdaWrapper.eq(PlayClerkUserInfoEntity::getId, vo.getClerkId());
|
||||
}
|
||||
if (StrUtil.isNotEmpty(vo.getSettlementDate())) {
|
||||
if (vo.getSettlementDate().contains("T")) {
|
||||
vo.setSettlementDate(vo.getSettlementDate().substring(0, vo.getSettlementDate().indexOf("T")));
|
||||
}
|
||||
lambdaWrapper.eq(PlayClerkWagesInfoEntity::getSettlementDate, LocalDate.parse(vo.getSettlementDate(), DateTimeFormatter.ofPattern("yyyy-MM-dd")));
|
||||
}
|
||||
lambdaWrapper.eq(PlayClerkWagesInfoEntity::getHistoricalStatistics, "1");
|
||||
return this.baseMapper.selectJoinPage(new Page<>(vo.getPageNum(), vo.getPageSize()), PlayClerkWagesInfoReturnVo.class, lambdaWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询店员工资结算信息
|
||||
*
|
||||
* @param id 店员工资结算信息主键
|
||||
* @return 店员工资结算信息
|
||||
*/
|
||||
@Override
|
||||
public PlayClerkWagesInfoEntity selectPlayClerkWagesInfoById(String id) {
|
||||
return this.baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询店员工资结算信息列表
|
||||
*
|
||||
* @param playClerkWagesInfo 店员工资结算信息
|
||||
* @return 店员工资结算信息
|
||||
*/
|
||||
@Override
|
||||
public IPage<PlayClerkWagesInfoEntity> selectPlayClerkWagesInfoByPage(PlayClerkWagesInfoEntity playClerkWagesInfo) {
|
||||
Page<PlayClerkWagesInfoEntity> page = new Page<>(1, 10);
|
||||
return this.baseMapper.selectPage(page, new LambdaQueryWrapper<>());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增店员工资结算信息
|
||||
*
|
||||
* @param playClerkWagesInfo 店员工资结算信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean create(PlayClerkWagesInfoEntity playClerkWagesInfo) {
|
||||
if (StrUtil.isBlankIfStr(playClerkWagesInfo.getId())) {
|
||||
playClerkWagesInfo.setId(IdUtils.getUuid());
|
||||
}
|
||||
return save(playClerkWagesInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改店员工资结算信息
|
||||
*
|
||||
* @param playClerkWagesInfo 店员工资结算信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean update(PlayClerkWagesInfoEntity playClerkWagesInfo) {
|
||||
return updateById(playClerkWagesInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除店员工资结算信息
|
||||
*
|
||||
* @param ids 需要删除的店员工资结算信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePlayClerkWagesInfoByIds(String[] ids) {
|
||||
return playClerkWagesInfoMapper.deleteBatchIds(Arrays.asList(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除店员工资结算信息信息
|
||||
*
|
||||
* @param id 店员工资结算信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePlayClerkWagesInfoById(String id) {
|
||||
return playClerkWagesInfoMapper.deleteById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
package com.starry.admin.modules.clerk.service.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.starry.admin.modules.clerk.mapper.PlayCustomArticleInfoMapper;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayCustomArticleInfoEntity;
|
||||
import com.starry.admin.modules.clerk.service.IPlayCustomArticleInfoService;
|
||||
import com.starry.common.utils.IdUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Arrays;
|
||||
|
||||
|
||||
/**
|
||||
* 陪聊点赞动态信息Service业务层处理
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-05-04
|
||||
*/
|
||||
@Service
|
||||
public class PlayCustomArticleInfoServiceImpl extends ServiceImpl<PlayCustomArticleInfoMapper, PlayCustomArticleInfoEntity> implements IPlayCustomArticleInfoService {
|
||||
@Resource
|
||||
private PlayCustomArticleInfoMapper playCustomArticleInfoMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public PlayCustomArticleInfoEntity selectByArticleId(String articleId, String customId, String endorseType) {
|
||||
LambdaQueryWrapper<PlayCustomArticleInfoEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(PlayCustomArticleInfoEntity::getArticleId, articleId);
|
||||
lambdaQueryWrapper.eq(PlayCustomArticleInfoEntity::getCustomId, customId);
|
||||
lambdaQueryWrapper.eq(PlayCustomArticleInfoEntity::getEndorseType, endorseType);
|
||||
return this.baseMapper.selectOne(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询陪聊点赞动态信息
|
||||
*
|
||||
* @param id 陪聊点赞动态信息主键
|
||||
* @return 陪聊点赞动态信息
|
||||
*/
|
||||
@Override
|
||||
public PlayCustomArticleInfoEntity selectPlayCustomArticleInfoById(String id) {
|
||||
return this.baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询陪聊点赞动态信息列表
|
||||
*
|
||||
* @param playCustomArticleInfo 陪聊点赞动态信息
|
||||
* @return 陪聊点赞动态信息
|
||||
*/
|
||||
@Override
|
||||
public IPage<PlayCustomArticleInfoEntity> selectPlayCustomArticleInfoByPage(PlayCustomArticleInfoEntity playCustomArticleInfo) {
|
||||
Page<PlayCustomArticleInfoEntity> page = new Page<>(1, 10);
|
||||
return this.baseMapper.selectPage(page, new LambdaQueryWrapper<>());
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增陪聊点赞动态信息
|
||||
*
|
||||
* @param playCustomArticleInfo 陪聊点赞动态信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean create(PlayCustomArticleInfoEntity playCustomArticleInfo) {
|
||||
if (StrUtil.isBlankIfStr(playCustomArticleInfo.getId())) {
|
||||
playCustomArticleInfo.setId(IdUtils.getUuid());
|
||||
}
|
||||
return save(playCustomArticleInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改陪聊点赞动态信息
|
||||
*
|
||||
* @param playCustomArticleInfo 陪聊点赞动态信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean update(PlayCustomArticleInfoEntity playCustomArticleInfo) {
|
||||
return updateById(playCustomArticleInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除陪聊点赞动态信息
|
||||
*
|
||||
* @param ids 需要删除的陪聊点赞动态信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePlayCustomArticleInfoByIds(String[] ids) {
|
||||
return playCustomArticleInfoMapper.deleteBatchIds(Arrays.asList(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除陪聊点赞动态信息信息
|
||||
*
|
||||
* @param id 陪聊点赞动态信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePlayCustomArticleInfoById(String id) {
|
||||
return playCustomArticleInfoMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteByArticleId(String articleId) {
|
||||
LambdaQueryWrapper<PlayCustomArticleInfoEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(PlayCustomArticleInfoEntity::getArticleId, articleId);
|
||||
this.baseMapper.delete(lambdaQueryWrapper);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user