最新代码
This commit is contained in:
@@ -0,0 +1,148 @@
|
||||
package com.starry.admin.modules.weichat.controller;
|
||||
|
||||
import com.starry.admin.common.aspect.ClerkUserLogin;
|
||||
import com.starry.admin.common.aspect.CustomUserLogin;
|
||||
import com.starry.admin.common.conf.ThreadLocalRequestDetail;
|
||||
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.service.IPlayClerkUserInfoService;
|
||||
import com.starry.admin.modules.clerk.service.impl.PlayClerkArticleInfoServiceImpl;
|
||||
import com.starry.admin.modules.clerk.service.impl.PlayCustomArticleInfoServiceImpl;
|
||||
import com.starry.admin.modules.weichat.entity.article.PlayClerkAddArticleVo;
|
||||
import com.starry.admin.modules.weichat.entity.article.PlayClerkArticleCustomQueryVo;
|
||||
import com.starry.admin.modules.weichat.entity.article.PlayClerkArticleFollowCustomFollowStateEditStateVo;
|
||||
import com.starry.admin.modules.weichat.entity.article.PlayClerkArticleFollowCustomGreedStateEditStateVo;
|
||||
import com.starry.admin.modules.weichat.service.WxCustomUserService;
|
||||
import com.starry.common.result.R;
|
||||
import com.starry.common.utils.ConvertUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 动态接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024/5/20 下午11:19
|
||||
**/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/wx/article")
|
||||
public class WxArticleController {
|
||||
|
||||
|
||||
@Resource
|
||||
private PlayClerkArticleInfoServiceImpl playClerkArticleInfoService;
|
||||
|
||||
@Resource
|
||||
private PlayCustomArticleInfoServiceImpl playCustomArticleInfoService;
|
||||
|
||||
@Resource
|
||||
private IPlayClerkUserInfoService playClerkUserInfoService;
|
||||
|
||||
@Resource
|
||||
private WxCustomUserService customUserService;
|
||||
|
||||
|
||||
/**
|
||||
* 店员新增动态
|
||||
*/
|
||||
@ClerkUserLogin
|
||||
@PostMapping("/clerk/add")
|
||||
public R clerkAdd(@Validated @RequestBody PlayClerkAddArticleVo vo) {
|
||||
vo.setClerkId(ThreadLocalRequestDetail.getClerkUserInfo().getId());
|
||||
playClerkArticleInfoService.create(ConvertUtil.entityToVo(vo, PlayClerkArticleInfoEntity.class));
|
||||
return R.ok("成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 店员分页查询本人动态列表
|
||||
*/
|
||||
@ClerkUserLogin
|
||||
@PostMapping("/clerk/listByPage")
|
||||
public R clerkListByPage(@Validated @RequestBody PlayClerkArticleQueryVo vo) {
|
||||
vo.setClerkId(ThreadLocalRequestDetail.getClerkUserInfo().getId());
|
||||
return R.ok(playClerkArticleInfoService.selectByPage(vo));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 顾客查询动态列表
|
||||
*/
|
||||
@PostMapping("/custom/listByPage")
|
||||
public R customListByPage(@Validated @RequestBody PlayClerkArticleCustomQueryVo vo) {
|
||||
vo.setFollowState("0");
|
||||
return R.ok(playClerkArticleInfoService.customSelectByPage(vo,customUserService.getLoginUserId()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 顾客查询已收藏动态列表
|
||||
*/
|
||||
@CustomUserLogin
|
||||
@PostMapping("/custom/listFollowByPage")
|
||||
public R customListFollowByPage(@Validated @RequestBody PlayClerkArticleCustomQueryVo vo) {
|
||||
vo.setFollowState("1");
|
||||
return R.ok(playClerkArticleInfoService.customSelectByPage(vo, customUserService.getLoginUserId()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页获取店员动态
|
||||
*
|
||||
* @param id 店员ID
|
||||
* @return 店员动态
|
||||
*/
|
||||
@GetMapping("/custom/queryByClerkId")
|
||||
public R queryTrendsById(@RequestParam("id") String id) {
|
||||
PlayClerkUserInfoEntity entity = playClerkUserInfoService.selectById(id);
|
||||
PlayClerkArticleCustomQueryVo vo = new PlayClerkArticleCustomQueryVo();
|
||||
vo.setClerkId(entity.getId());
|
||||
return R.ok(playClerkArticleInfoService.customSelectByPage(new PlayClerkArticleCustomQueryVo(), customUserService.getLoginUserId()));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 顾客查询已收藏动态列表
|
||||
*/
|
||||
@CustomUserLogin
|
||||
@PostMapping("/custom/updateGreedState")
|
||||
public R customUpdateGreedState(@Validated @RequestBody PlayClerkArticleFollowCustomGreedStateEditStateVo vo) {
|
||||
PlayClerkArticleInfoEntity articleInfoEntity = playClerkArticleInfoService.selectPlayClerkArticleInfoById(vo.getId());
|
||||
PlayCustomArticleInfoEntity entity = playCustomArticleInfoService.selectByArticleId(articleInfoEntity.getId(), ThreadLocalRequestDetail.getCustomUserInfo().getId(), "0");
|
||||
if (entity == null) {
|
||||
entity = new PlayCustomArticleInfoEntity();
|
||||
entity.setArticleId(articleInfoEntity.getId());
|
||||
entity.setCustomId(ThreadLocalRequestDetail.getCustomUserInfo().getId());
|
||||
entity.setEndorseType("1");
|
||||
entity.setClerkId(articleInfoEntity.getClerkId());
|
||||
}
|
||||
entity.setEndorseTime(LocalDateTime.now());
|
||||
entity.setEndorseState(vo.getGreedState());
|
||||
playCustomArticleInfoService.saveOrUpdate(entity);
|
||||
return R.ok("成功");
|
||||
}
|
||||
|
||||
@CustomUserLogin
|
||||
@PostMapping("/custom/updateFollowState")
|
||||
public R customUpdateFollowState(@Validated @RequestBody PlayClerkArticleFollowCustomFollowStateEditStateVo vo) {
|
||||
PlayClerkArticleInfoEntity articleInfoEntity = playClerkArticleInfoService.selectPlayClerkArticleInfoById(vo.getId());
|
||||
PlayCustomArticleInfoEntity entity = playCustomArticleInfoService.selectByArticleId(articleInfoEntity.getId(), ThreadLocalRequestDetail.getCustomUserInfo().getId(), "1");
|
||||
if (entity == null) {
|
||||
entity = new PlayCustomArticleInfoEntity();
|
||||
entity.setArticleId(articleInfoEntity.getId());
|
||||
entity.setCustomId(ThreadLocalRequestDetail.getCustomUserInfo().getId());
|
||||
entity.setEndorseType("0");
|
||||
entity.setClerkId(articleInfoEntity.getClerkId());
|
||||
}
|
||||
entity.setEndorseTime(LocalDateTime.now());
|
||||
entity.setEndorseState(vo.getFollowState());
|
||||
playCustomArticleInfoService.saveOrUpdate(entity);
|
||||
return R.ok("成功");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.starry.admin.modules.weichat.controller;
|
||||
|
||||
import com.starry.admin.modules.play.service.IPlayCommodityInfoService;
|
||||
import com.starry.admin.modules.weichat.entity.PlayCommodityReturnVo;
|
||||
import com.starry.common.result.R;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 店员等级
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024/5/29 上午6:24
|
||||
**/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/wx/commodity/")
|
||||
public class WxClerkCommodityController {
|
||||
|
||||
@Resource
|
||||
private IPlayCommodityInfoService playCommodityInfoService;
|
||||
|
||||
|
||||
/**
|
||||
* 顾客查询所有店员所有服务项目
|
||||
*
|
||||
* @return 店员所有服务项目
|
||||
*/
|
||||
@GetMapping("/custom/queryClerkAllCommodity")
|
||||
public R customQueryClerkAllCommodity() {
|
||||
List<PlayCommodityReturnVo> tree = playCommodityInfoService.selectTree();
|
||||
return R.ok(tree);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,37 +1,44 @@
|
||||
package com.starry.admin.modules.weichat.controller;
|
||||
|
||||
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.crypto.SecureUtil;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
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.starry.admin.common.aspect.ClerkUserLogin;
|
||||
import com.starry.admin.common.conf.ThreadLocalRequestDetail;
|
||||
import com.starry.admin.common.exception.CustomException;
|
||||
import com.starry.admin.modules.clerk.module.entity.*;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkCommodityEditVo;
|
||||
import com.starry.admin.modules.clerk.module.vo.PlayClerkCommodityQueryVo;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkClassificationInfoService;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkCommodityService;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkLevelInfoService;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkUserInfoService;
|
||||
import com.starry.admin.modules.clerk.service.impl.PlayClerkDataReviewInfoServiceImpl;
|
||||
import com.starry.admin.modules.clerk.service.*;
|
||||
import com.starry.admin.modules.clerk.service.impl.PlayClerkUserInfoServiceImpl;
|
||||
import com.starry.admin.modules.clerk.service.impl.PlayClerkUserReviewInfoServiceImpl;
|
||||
import com.starry.admin.modules.order.module.vo.PlayOrderEvaluateQueryVo;
|
||||
import com.starry.admin.modules.order.module.vo.PlayOrderStateEditVo;
|
||||
import com.starry.admin.modules.order.service.IPlayOrderEvaluateInfoService;
|
||||
import com.starry.admin.modules.order.service.IPlayOrderInfoService;
|
||||
import com.starry.admin.modules.play.service.IPlayCommodityInfoService;
|
||||
import com.starry.admin.modules.weichat.entity.*;
|
||||
import com.starry.admin.modules.weichat.entity.clerk.PlayClerkUserInfoQueryVo;
|
||||
import com.starry.admin.modules.weichat.entity.clerk.PlayClerkUserInfoResultVo;
|
||||
import com.starry.admin.modules.weichat.entity.order.PlayClerkOrderDetailsReturnVo;
|
||||
import com.starry.admin.modules.weichat.entity.order.PlayClerkOrderInfoQueryVo;
|
||||
import com.starry.admin.modules.weichat.entity.order.PlayClerkOrderListReturnVo;
|
||||
import com.starry.admin.modules.weichat.service.WxCustomUserService;
|
||||
import com.starry.admin.utils.SecurityUtils;
|
||||
import com.starry.common.redis.RedisCache;
|
||||
import com.starry.common.result.R;
|
||||
import com.starry.common.utils.ConvertUtil;
|
||||
import com.starry.common.utils.IdUtils;
|
||||
import com.starry.common.utils.VerificationCodeUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
@@ -50,15 +57,6 @@ public class WxClerkController {
|
||||
@Resource
|
||||
private PlayClerkUserInfoServiceImpl playClerkUserInfoService;
|
||||
|
||||
@Resource
|
||||
private PlayClerkDataReviewInfoServiceImpl dataReviewInfoService;
|
||||
|
||||
@Resource
|
||||
private IPlayClerkLevelInfoService playClerkLevelInfoService;
|
||||
|
||||
@Resource
|
||||
private IPlayClerkClassificationInfoService playClerkClassificationInfoService;
|
||||
|
||||
@Resource
|
||||
private IPlayClerkUserInfoService clerkUserInfoService;
|
||||
|
||||
@@ -68,30 +66,41 @@ public class WxClerkController {
|
||||
@Resource
|
||||
private WxCustomUserService customUserService;
|
||||
|
||||
@Resource
|
||||
private IPlayOrderInfoService playOrderInfoService;
|
||||
|
||||
@Resource
|
||||
private IPlayOrderEvaluateInfoService playOrderEvaluateInfoService;
|
||||
|
||||
@Resource
|
||||
private PlayClerkUserReviewInfoServiceImpl playClerkUserReviewInfoService;
|
||||
|
||||
@Resource
|
||||
private IPlayClerkDataReviewInfoService playClerkDataReviewInfoService;
|
||||
|
||||
@Resource
|
||||
private IPlayCommodityInfoService playCommodityInfoService;
|
||||
|
||||
@Resource
|
||||
private IPlayClerkLevelInfoService playClerkLevelInfoService;
|
||||
|
||||
@Resource
|
||||
private IPlayClerkClassificationInfoService playClerkClassificationInfoService;
|
||||
|
||||
|
||||
/**
|
||||
* 店员获取个人信息
|
||||
*/
|
||||
@ClerkUserLogin
|
||||
@GetMapping("/user/queryById")
|
||||
public R sendCode(@RequestParam("id") String id) {
|
||||
PlayClerkUserInfoEntity entity = clerkUserInfoService.selectById(id);
|
||||
public R queryById() {
|
||||
PlayClerkUserInfoEntity entity = clerkUserInfoService.selectById(ThreadLocalRequestDetail.getClerkUserInfo().getId());
|
||||
if (entity == null) {
|
||||
throw new CustomException("用户不存在");
|
||||
}
|
||||
return R.ok(clerkUserInfoService.getVo(entity));
|
||||
}
|
||||
|
||||
@ClerkUserLogin
|
||||
@GetMapping("/user/deleteNotReviewInfo")
|
||||
public R deleteNotReviewInfo(@RequestParam("id") String id) {
|
||||
PlayClerkUserInfoEntity entity = clerkUserInfoService.selectById(id);
|
||||
if (entity == null) {
|
||||
throw new CustomException("用户不存在");
|
||||
}
|
||||
LambdaQueryWrapper<PlayClerkDataReviewInfoEntity> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(PlayClerkDataReviewInfoEntity::getPlayUserId, entity.getOpenid());
|
||||
dataReviewInfoService.remove(queryWrapper);
|
||||
return R.ok("成功");
|
||||
}
|
||||
|
||||
|
||||
@ClerkUserLogin
|
||||
@PostMapping("/user/sendCode")
|
||||
@@ -126,27 +135,22 @@ public class WxClerkController {
|
||||
@ClerkUserLogin
|
||||
@PostMapping("/user/add")
|
||||
public R userAdd(@Validated @RequestBody PlayClerkUserByWxAddVo vo) {
|
||||
String playUserId = ThreadLocalRequestDetail.getClerkUserInfo().getId();
|
||||
PlayClerkUserInfoEntity userInfo = playClerkUserInfoService.selectById(playUserId);
|
||||
String clerkId = ThreadLocalRequestDetail.getClerkUserInfo().getId();
|
||||
PlayClerkUserInfoEntity userInfo = playClerkUserInfoService.selectById(clerkId);
|
||||
if (userInfo == null) {
|
||||
throw new CustomException("系统错误,用户不存在");
|
||||
}
|
||||
if ("1".equals(userInfo.getClerkState())) {
|
||||
throw new CustomException("当前用户已经是店员");
|
||||
}
|
||||
PlayClerkDataReviewInfoEntity dataReviewInfo = new PlayClerkDataReviewInfoEntity();
|
||||
dataReviewInfo.setPlayUserId(userInfo.getId());
|
||||
dataReviewInfo.setState("0");
|
||||
dataReviewInfo.setDataType("0");
|
||||
|
||||
if (!dataReviewInfoService.queryList(dataReviewInfo).isEmpty()) {
|
||||
PlayClerkUserReviewInfoEntity entity = playClerkUserReviewInfoService.queryByClerkId(userInfo.getId(), "0");
|
||||
if (entity != null) {
|
||||
throw new CustomException("已有申请未审核");
|
||||
}
|
||||
dataReviewInfo.setClerkAvatar(userInfo.getAvatar());
|
||||
dataReviewInfo.setClerkNickname(userInfo.getNickname());
|
||||
dataReviewInfo.setContent(JSONObject.toJSONString(vo));
|
||||
dataReviewInfo.setAddTime(new Date());
|
||||
dataReviewInfoService.create(dataReviewInfo);
|
||||
entity = ConvertUtil.entityToVo(vo, PlayClerkUserReviewInfoEntity.class);
|
||||
entity.setReviewState("0");
|
||||
entity.setClerkId(clerkId);
|
||||
playClerkUserReviewInfoService.create(entity);
|
||||
return R.ok("申请成功");
|
||||
}
|
||||
|
||||
@@ -155,20 +159,18 @@ public class WxClerkController {
|
||||
@PostMapping("/user/updateAvatar")
|
||||
public R updateAvatar(@Validated @RequestBody PlayClerkUserAvatarVo vo) {
|
||||
PlayClerkUserInfoEntity userInfo = ThreadLocalRequestDetail.getClerkUserInfo();
|
||||
|
||||
PlayClerkDataReviewInfoEntity dataReviewInfo = new PlayClerkDataReviewInfoEntity();
|
||||
dataReviewInfo.setPlayUserId(userInfo.getId());
|
||||
dataReviewInfo.setState("0");
|
||||
dataReviewInfo.setDataType("1");
|
||||
|
||||
if (!dataReviewInfoService.queryList(dataReviewInfo).isEmpty()) {
|
||||
PlayClerkDataReviewInfoEntity entity = playClerkDataReviewInfoService.queryByClerkId(userInfo.getId(), "1", "0");
|
||||
if (entity != null) {
|
||||
throw new CustomException("已有申请未审核");
|
||||
}
|
||||
dataReviewInfo.setClerkAvatar(userInfo.getAvatar());
|
||||
dataReviewInfo.setClerkNickname(userInfo.getNickname());
|
||||
dataReviewInfo.setContent(JSONObject.toJSONString(vo));
|
||||
dataReviewInfo.setAddTime(new Date());
|
||||
dataReviewInfoService.create(dataReviewInfo);
|
||||
entity = new PlayClerkDataReviewInfoEntity();
|
||||
entity.setClerkId(userInfo.getId());
|
||||
entity.setDataType("1");
|
||||
entity.setReviewState("0");
|
||||
List<String> list = new ArrayList<>();
|
||||
list.add(vo.getAvatar());
|
||||
entity.setDataContent(list);
|
||||
playClerkDataReviewInfoService.create(entity);
|
||||
return R.ok("申请成功");
|
||||
}
|
||||
|
||||
@@ -176,18 +178,16 @@ public class WxClerkController {
|
||||
@PostMapping("/user/updateAlbum")
|
||||
public R updateAlbum(@Validated @RequestBody PlayClerkUserAlbumVo vo) {
|
||||
PlayClerkUserInfoEntity userInfo = ThreadLocalRequestDetail.getClerkUserInfo();
|
||||
PlayClerkDataReviewInfoEntity dataReviewInfo = new PlayClerkDataReviewInfoEntity();
|
||||
dataReviewInfo.setPlayUserId(userInfo.getId());
|
||||
dataReviewInfo.setState("0");
|
||||
dataReviewInfo.setDataType("2");
|
||||
if (!dataReviewInfoService.queryList(dataReviewInfo).isEmpty()) {
|
||||
PlayClerkDataReviewInfoEntity entity = playClerkDataReviewInfoService.queryByClerkId(userInfo.getId(), "2", "0");
|
||||
if (entity != null) {
|
||||
throw new CustomException("已有申请未审核");
|
||||
}
|
||||
dataReviewInfo.setClerkAvatar(userInfo.getAvatar());
|
||||
dataReviewInfo.setClerkNickname(userInfo.getNickname());
|
||||
dataReviewInfo.setContent(JSONObject.toJSONString(vo));
|
||||
dataReviewInfo.setAddTime(new Date());
|
||||
dataReviewInfoService.create(dataReviewInfo);
|
||||
entity = new PlayClerkDataReviewInfoEntity();
|
||||
entity.setClerkId(userInfo.getId());
|
||||
entity.setDataType("2");
|
||||
entity.setReviewState("0");
|
||||
entity.setDataContent(vo.getAlbum());
|
||||
playClerkDataReviewInfoService.create(entity);
|
||||
return R.ok("申请成功");
|
||||
}
|
||||
|
||||
@@ -195,18 +195,18 @@ public class WxClerkController {
|
||||
@PostMapping("/user/updateAudio")
|
||||
public R updateAudio(@Validated @RequestBody PlayClerkUserAudioVo vo) {
|
||||
PlayClerkUserInfoEntity userInfo = ThreadLocalRequestDetail.getClerkUserInfo();
|
||||
PlayClerkDataReviewInfoEntity dataReviewInfo = new PlayClerkDataReviewInfoEntity();
|
||||
dataReviewInfo.setPlayUserId(userInfo.getId());
|
||||
dataReviewInfo.setState("0");
|
||||
dataReviewInfo.setDataType("3");
|
||||
if (!dataReviewInfoService.queryList(dataReviewInfo).isEmpty()) {
|
||||
PlayClerkDataReviewInfoEntity entity = playClerkDataReviewInfoService.queryByClerkId(userInfo.getId(), "3", "0");
|
||||
if (entity != null) {
|
||||
throw new CustomException("已有申请未审核");
|
||||
}
|
||||
dataReviewInfo.setAddTime(new Date());
|
||||
dataReviewInfo.setClerkAvatar(userInfo.getAvatar());
|
||||
dataReviewInfo.setClerkNickname(userInfo.getNickname());
|
||||
dataReviewInfo.setContent(JSONObject.toJSONString(vo));
|
||||
dataReviewInfoService.create(dataReviewInfo);
|
||||
entity = new PlayClerkDataReviewInfoEntity();
|
||||
entity.setClerkId(userInfo.getId());
|
||||
entity.setDataType("3");
|
||||
entity.setReviewState("0");
|
||||
List<String> list = new ArrayList<>();
|
||||
list.add(vo.getAudio());
|
||||
entity.setDataContent(list);
|
||||
playClerkDataReviewInfoService.create(entity);
|
||||
return R.ok("申请成功");
|
||||
}
|
||||
|
||||
@@ -257,7 +257,7 @@ public class WxClerkController {
|
||||
*/
|
||||
@PostMapping("/user/queryByPage")
|
||||
public R queryByPage(@RequestBody PlayClerkUserInfoQueryVo vo) {
|
||||
IPage<PlayClerkUserListResultVo> page = playClerkUserInfoService.selectByPage(vo, customUserService.getLoginUserId());
|
||||
IPage<PlayClerkUserInfoResultVo> page = playClerkUserInfoService.selectByPage(vo, customUserService.getLoginUserId());
|
||||
return R.ok(page);
|
||||
}
|
||||
|
||||
@@ -270,10 +270,10 @@ public class WxClerkController {
|
||||
@PostMapping("/user/queryByRecommend")
|
||||
public R queryByRecommend() {
|
||||
PlayClerkUserInfoQueryVo vo = new PlayClerkUserInfoQueryVo();
|
||||
vo.setPageNum(10);
|
||||
vo.setPageNum(1);
|
||||
vo.setPageSize(9999);
|
||||
vo.setRecommendationState("1");
|
||||
IPage<PlayClerkUserListResultVo> page = playClerkUserInfoService.selectByPage(vo, "");
|
||||
IPage<PlayClerkUserInfoResultVo> page = playClerkUserInfoService.selectByPage(vo, "");
|
||||
return R.ok(page);
|
||||
}
|
||||
|
||||
@@ -292,11 +292,11 @@ public class WxClerkController {
|
||||
}
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
List<PlayGiftInfoVo> list = new ArrayList<>();
|
||||
list.add(new PlayGiftInfoVo(IdUtil.fastSimpleUUID(), "礼物1", "https://live-cloud-cvoon.oss-cn-hangzhou.aliyuncs.com/d8e929c041e94075b93cfc6338a83d4c/2024/04/15/fc09da2f923d46e6951292ff8f34f6aa.png", 0, "0"));
|
||||
list.add(new PlayGiftInfoVo(IdUtil.fastSimpleUUID(), "礼物2", "https://live-cloud-cvoon.oss-cn-hangzhou.aliyuncs.com/d8e929c041e94075b93cfc6338a83d4c/2024/04/15/fc09da2f923d46e6951292ff8f34f6aa.png", 1, "0"));
|
||||
list.add(new PlayGiftInfoVo(IdUtil.fastSimpleUUID(), "礼物3", "https://live-cloud-cvoon.oss-cn-hangzhou.aliyuncs.com/d8e929c041e94075b93cfc6338a83d4c/2024/04/15/fc09da2f923d46e6951292ff8f34f6aa.png", 2, "1"));
|
||||
list.add(new PlayGiftInfoVo(IdUtil.fastSimpleUUID(), "礼物4", "https://live-cloud-cvoon.oss-cn-hangzhou.aliyuncs.com/d8e929c041e94075b93cfc6338a83d4c/2024/04/15/fc09da2f923d46e6951292ff8f34f6aa.png", 3, "1"));
|
||||
list.add(new PlayGiftInfoVo(IdUtil.fastSimpleUUID(), "礼物5", "https://live-cloud-cvoon.oss-cn-hangzhou.aliyuncs.com/d8e929c041e94075b93cfc6338a83d4c/2024/04/15/fc09da2f923d46e6951292ff8f34f6aa.png", 4, "1"));
|
||||
list.add(new PlayGiftInfoVo(IdUtils.getUuid(), "礼物1", "https://live-cloud-cvoon.oss-cn-hangzhou.aliyuncs.com/d8e929c041e94075b93cfc6338a83d4c/2024/04/15/fc09da2f923d46e6951292ff8f34f6aa.png", 0, "0"));
|
||||
list.add(new PlayGiftInfoVo(IdUtils.getUuid(), "礼物2", "https://live-cloud-cvoon.oss-cn-hangzhou.aliyuncs.com/d8e929c041e94075b93cfc6338a83d4c/2024/04/15/fc09da2f923d46e6951292ff8f34f6aa.png", 1, "0"));
|
||||
list.add(new PlayGiftInfoVo(IdUtils.getUuid(), "礼物3", "https://live-cloud-cvoon.oss-cn-hangzhou.aliyuncs.com/d8e929c041e94075b93cfc6338a83d4c/2024/04/15/fc09da2f923d46e6951292ff8f34f6aa.png", 2, "1"));
|
||||
list.add(new PlayGiftInfoVo(IdUtils.getUuid(), "礼物4", "https://live-cloud-cvoon.oss-cn-hangzhou.aliyuncs.com/d8e929c041e94075b93cfc6338a83d4c/2024/04/15/fc09da2f923d46e6951292ff8f34f6aa.png", 3, "1"));
|
||||
list.add(new PlayGiftInfoVo(IdUtils.getUuid(), "礼物5", "https://live-cloud-cvoon.oss-cn-hangzhou.aliyuncs.com/d8e929c041e94075b93cfc6338a83d4c/2024/04/15/fc09da2f923d46e6951292ff8f34f6aa.png", 4, "1"));
|
||||
result.put("list", list);
|
||||
result.put("obtainedGift", list.size() - 1);
|
||||
result.put("totalGift", list.size());
|
||||
@@ -312,73 +312,104 @@ public class WxClerkController {
|
||||
*/
|
||||
@GetMapping("/user/queryPriceById")
|
||||
public R queryDetailById(@RequestParam("id") String id) {
|
||||
PlayClerkUserInfoEntity entity = clerkUserInfoService.selectById(id);
|
||||
return R.ok(playClerkCommodityService.selectByUser(entity.getId()));
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 店员分页查询本人订单列表
|
||||
*
|
||||
* @param vo 订单列表分页查询对象
|
||||
* @return com.starry.common.result.R
|
||||
* @author admin
|
||||
* @since 2024/5/8 15:57
|
||||
**/
|
||||
@ClerkUserLogin
|
||||
@PostMapping("/order/queryByPage")
|
||||
public R queryOrderByPage(@Validated @RequestBody PlayClerkOrderInfoQueryVo vo) {
|
||||
vo.setAcceptBy(ThreadLocalRequestDetail.getClerkUserInfo().getId());
|
||||
IPage<PlayClerkOrderListReturnVo> iPage = playOrderInfoService.clerkSelectOrderInfoByPage(vo);
|
||||
return R.ok(iPage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 店员查询本人订单详情
|
||||
*
|
||||
* @param id 订单ID
|
||||
* @return com.starry.common.result.R
|
||||
* @author admin
|
||||
* @since 2024/5/8 15:57
|
||||
**/
|
||||
@ClerkUserLogin
|
||||
@GetMapping("/order/queryById")
|
||||
public R queryById(@RequestParam("id") String id) {
|
||||
PlayClerkOrderDetailsReturnVo orderInfo = playOrderInfoService.clerkSelectOrderDetails(ThreadLocalRequestDetail.getClerkUserInfo().getId(), id);
|
||||
return R.ok(orderInfo);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 分页获取店员动态
|
||||
* 店员-接单
|
||||
*
|
||||
* @param id 店员ID
|
||||
* @return 店员动态
|
||||
*/
|
||||
@GetMapping("/user/queryTrendsById")
|
||||
public R queryTrendsById(@RequestParam("id") String id) {
|
||||
PlayClerkUserInfoEntity entity = clerkUserInfoService.selectById(id);
|
||||
if (entity == null) {
|
||||
throw new CustomException("用户不存在");
|
||||
}
|
||||
List<PlayClerkUserTrendsInfoEntity> entities = new ArrayList<>();
|
||||
entities.add(new PlayClerkUserTrendsInfoEntity(IdUtil.fastSimpleUUID(), "动态1", "https://live-cloud-cvoon.oss-cn-hangzhou.aliyuncs.com/d8e929c041e94075b93cfc6338a83d4c/2024/04/15/0596854e16ae4a268eab4c08e2a9f762.mp3", new Date()));
|
||||
entities.add(new PlayClerkUserTrendsInfoEntity(IdUtil.fastSimpleUUID(), "动态2", "https://live-cloud-cvoon.oss-cn-hangzhou.aliyuncs.com/d8e929c041e94075b93cfc6338a83d4c/2024/04/15/0596854e16ae4a268eab4c08e2a9f762.mp3", new Date()));
|
||||
entities.add(new PlayClerkUserTrendsInfoEntity(IdUtil.fastSimpleUUID(), "动态3", "https://live-cloud-cvoon.oss-cn-hangzhou.aliyuncs.com/d8e929c041e94075b93cfc6338a83d4c/2024/04/15/0596854e16ae4a268eab4c08e2a9f762.mp3", new Date()));
|
||||
entities.add(new PlayClerkUserTrendsInfoEntity(IdUtil.fastSimpleUUID(), "动态4", "https://live-cloud-cvoon.oss-cn-hangzhou.aliyuncs.com/d8e929c041e94075b93cfc6338a83d4c/2024/04/15/0596854e16ae4a268eab4c08e2a9f762.mp3", new Date()));
|
||||
entities.add(new PlayClerkUserTrendsInfoEntity(IdUtil.fastSimpleUUID(), "动态5", "https://live-cloud-cvoon.oss-cn-hangzhou.aliyuncs.com/d8e929c041e94075b93cfc6338a83d4c/2024/04/15/0596854e16ae4a268eab4c08e2a9f762.mp3", new Date()));
|
||||
entities.add(new PlayClerkUserTrendsInfoEntity(IdUtil.fastSimpleUUID(), "动态6", "0", "https://live-cloud-cvoon.oss-cn-hangzhou.aliyuncs.com/d8e929c041e94075b93cfc6338a83d4c/2024/04/15/fc09da2f923d46e6951292ff8f34f6aa.png", new Date()));
|
||||
entities.add(new PlayClerkUserTrendsInfoEntity(IdUtil.fastSimpleUUID(), "动态7", "0", "https://live-cloud-cvoon.oss-cn-hangzhou.aliyuncs.com/d8e929c041e94075b93cfc6338a83d4c/2024/04/15/fc09da2f923d46e6951292ff8f34f6aa.png", new Date()));
|
||||
entities.add(new PlayClerkUserTrendsInfoEntity(IdUtil.fastSimpleUUID(), "动态8", "0", "https://live-cloud-cvoon.oss-cn-hangzhou.aliyuncs.com/d8e929c041e94075b93cfc6338a83d4c/2024/04/15/fc09da2f923d46e6951292ff8f34f6aa.png", new Date()));
|
||||
* @param id 订单ID
|
||||
* @return com.starry.common.result.R
|
||||
* @author admin
|
||||
* @since 2024/5/8 15:57
|
||||
**/
|
||||
@ClerkUserLogin
|
||||
@GetMapping("/order/accept")
|
||||
public R acceptOrder(@RequestParam("id") String id) {
|
||||
playOrderInfoService.updateStateTo1("1", ThreadLocalRequestDetail.getClerkUserInfo().getId(), ThreadLocalRequestDetail.getClerkUserInfo().getId(), id);
|
||||
return R.ok("成功");
|
||||
}
|
||||
|
||||
IPage<PlayClerkUserTrendsInfoEntity> resultPage = new Page<>();
|
||||
resultPage.setRecords(entities);
|
||||
// 设置分页参数
|
||||
resultPage.setCurrent(1);
|
||||
resultPage.setSize(1);
|
||||
resultPage.setTotal(5); // 假设total和实际情况一致
|
||||
return R.ok(resultPage);
|
||||
/**
|
||||
* 店员-开始订单
|
||||
*
|
||||
* @param id 订单ID
|
||||
* @return com.starry.common.result.R
|
||||
* @author admin
|
||||
* @since 2024/5/8 15:57
|
||||
**/
|
||||
@ClerkUserLogin
|
||||
@GetMapping("/order/start")
|
||||
public R startOrder(@RequestParam("id") String id) {
|
||||
playOrderInfoService.updateStateTo23("1", ThreadLocalRequestDetail.getClerkUserInfo().getId(), "2", id);
|
||||
return R.ok("成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 店员-取消订单
|
||||
*
|
||||
* @param vo 取消订单传参
|
||||
* @return com.starry.common.result.R
|
||||
* @author admin
|
||||
* @since 2024/5/8 15:57
|
||||
**/
|
||||
@ClerkUserLogin
|
||||
@PostMapping("/order/cancellation")
|
||||
public R endOrder(@Validated @RequestBody PlayOrderStateEditVo vo) {
|
||||
playOrderInfoService.updateStateTo4("1", ThreadLocalRequestDetail.getClerkUserInfo().getId(), vo.getOrderId(), vo.getRefundReason(), vo.getImages());
|
||||
return R.ok("成功");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 分页获取店员评价
|
||||
* 分页获取店员评价(订单评价)
|
||||
*
|
||||
* @param id 店员ID
|
||||
* @param vo 店员评价查询对象
|
||||
* @return 店员评价
|
||||
*/
|
||||
@GetMapping("/user/queryEvaluateById")
|
||||
public R queryEvaluateById(@RequestParam("id") String id) {
|
||||
PlayClerkUserInfoEntity entity = clerkUserInfoService.selectById(id);
|
||||
if (entity == null) {
|
||||
throw new CustomException("用户不存在");
|
||||
}
|
||||
|
||||
List<PlayClerkUserEvaluateInfoEntity> entities = new ArrayList<>();
|
||||
entities.add(new PlayClerkUserEvaluateInfoEntity(IdUtil.fastSimpleUUID(), IdUtil.fastSimpleUUID(), "评价人1昵称", "https://live-cloud-cvoon.oss-cn-hangzhou.aliyuncs.com/d8e929c041e94075b93cfc6338a83d4c/2024/04/15/fc09da2f923d46e6951292ff8f34f6aa.png", "评价内容", new Date(), IdUtil.fastSimpleUUID(), "店员昵称", IdUtil.fastSimpleUUID(), "文字语音条", "一小时"));
|
||||
entities.add(new PlayClerkUserEvaluateInfoEntity(IdUtil.fastSimpleUUID(), IdUtil.fastSimpleUUID(), "评价人2昵称", "https://live-cloud-cvoon.oss-cn-hangzhou.aliyuncs.com/d8e929c041e94075b93cfc6338a83d4c/2024/04/15/fc09da2f923d46e6951292ff8f34f6aa.png", "评价内容", new Date(), IdUtil.fastSimpleUUID(), "店员昵称", IdUtil.fastSimpleUUID(), "文字语音条", "一小时"));
|
||||
entities.add(new PlayClerkUserEvaluateInfoEntity(IdUtil.fastSimpleUUID(), IdUtil.fastSimpleUUID(), "评价人3昵称", "https://live-cloud-cvoon.oss-cn-hangzhou.aliyuncs.com/d8e929c041e94075b93cfc6338a83d4c/2024/04/15/fc09da2f923d46e6951292ff8f34f6aa.png", "评价内容", new Date(), IdUtil.fastSimpleUUID(), "店员昵称", IdUtil.fastSimpleUUID(), "文字语音条", "一小时"));
|
||||
entities.add(new PlayClerkUserEvaluateInfoEntity(IdUtil.fastSimpleUUID(), IdUtil.fastSimpleUUID(), "评价人4昵称", "https://live-cloud-cvoon.oss-cn-hangzhou.aliyuncs.com/d8e929c041e94075b93cfc6338a83d4c/2024/04/15/fc09da2f923d46e6951292ff8f34f6aa.png", "评价内容", new Date(), IdUtil.fastSimpleUUID(), "店员昵称", IdUtil.fastSimpleUUID(), "文字语音条", "一小时"));
|
||||
entities.add(new PlayClerkUserEvaluateInfoEntity(IdUtil.fastSimpleUUID(), IdUtil.fastSimpleUUID(), "评价人5昵称", "https://live-cloud-cvoon.oss-cn-hangzhou.aliyuncs.com/d8e929c041e94075b93cfc6338a83d4c/2024/04/15/fc09da2f923d46e6951292ff8f34f6aa.png", "评价内容", new Date(), IdUtil.fastSimpleUUID(), "店员昵称", IdUtil.fastSimpleUUID(), "文字语音条", "一小时"));
|
||||
entities.add(new PlayClerkUserEvaluateInfoEntity(IdUtil.fastSimpleUUID(), IdUtil.fastSimpleUUID(), "评价人5昵称", "https://live-cloud-cvoon.oss-cn-hangzhou.aliyuncs.com/d8e929c041e94075b93cfc6338a83d4c/2024/04/15/fc09da2f923d46e6951292ff8f34f6aa.png", "评价内容", new Date(), IdUtil.fastSimpleUUID(), "店员昵称", IdUtil.fastSimpleUUID(), "文字语音条", "一小时", 5));
|
||||
|
||||
IPage<PlayClerkUserEvaluateInfoEntity> resultPage = new Page<>();
|
||||
resultPage.setRecords(entities);
|
||||
// 设置分页参数
|
||||
resultPage.setCurrent(1);
|
||||
resultPage.setSize(1);
|
||||
resultPage.setTotal(5); // 假设total和实际情况一致
|
||||
return R.ok(resultPage);
|
||||
@PostMapping("/user/queryEvaluateByPage")
|
||||
public R queryEvaluateById(@Validated @RequestBody PlayOrderEvaluateQueryVo vo) {
|
||||
clerkUserInfoService.selectById(vo.getClerkId());
|
||||
return R.ok(playOrderEvaluateInfoService.selectByPage(vo));
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/level/queryAll")
|
||||
public R userAdd() {
|
||||
return R.ok(playClerkLevelInfoService.selectAll());
|
||||
@@ -389,5 +420,4 @@ public class WxClerkController {
|
||||
return R.ok(playClerkClassificationInfoService.selectAll());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.starry.admin.modules.weichat.controller;
|
||||
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkLevelInfoEntity;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkLevelInfoService;
|
||||
import com.starry.admin.modules.weichat.entity.level.PlayClerkLevelReturnVo;
|
||||
import com.starry.common.result.R;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 店员等级
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024/5/29 上午6:24
|
||||
**/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/wx/level/")
|
||||
public class WxClerkLeveController {
|
||||
|
||||
@Resource
|
||||
private IPlayClerkLevelInfoService playClerkLevelInfoService;
|
||||
|
||||
|
||||
/**
|
||||
* 顾客查询所有店员所有等级列表
|
||||
*
|
||||
* @return 店员所有等级列表
|
||||
*/
|
||||
@GetMapping("/custom/queryClerkAllLevel")
|
||||
public R customQueryClerkAllLevel() {
|
||||
List<PlayClerkLevelInfoEntity> list = playClerkLevelInfoService.selectAll();
|
||||
List<PlayClerkLevelReturnVo> returnVoList = new ArrayList<>(list.size());
|
||||
for (PlayClerkLevelInfoEntity entity : list) {
|
||||
PlayClerkLevelReturnVo vo = new PlayClerkLevelReturnVo();
|
||||
vo.setId(entity.getId());
|
||||
vo.setLevelName(entity.getName());
|
||||
returnVoList.add(vo);
|
||||
}
|
||||
return R.ok(returnVoList);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,140 @@
|
||||
package com.starry.admin.modules.weichat.controller;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.starry.admin.common.aspect.ClerkUserLogin;
|
||||
import com.starry.admin.common.conf.ThreadLocalRequestDetail;
|
||||
import com.starry.admin.common.exception.CustomException;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkWagesDetailsInfoEntity;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkWagesInfoEntity;
|
||||
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.order.service.IPlayOrderInfoService;
|
||||
import com.starry.admin.modules.weichat.entity.wages.*;
|
||||
import com.starry.common.result.R;
|
||||
import com.starry.common.utils.ConvertUtil;
|
||||
import com.starry.common.utils.IdUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 店员工资接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024/5/31 16:18
|
||||
**/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/wx/wages")
|
||||
public class WxClerkWagesController {
|
||||
@Resource
|
||||
private IPlayClerkWagesInfoService playClerkWagesInfoService;
|
||||
|
||||
@Resource
|
||||
private IPlayClerkWagesDetailsInfoService playClerkWagesDetailsInfoService;
|
||||
|
||||
@Resource
|
||||
private IPlayOrderInfoService playOrderInfoService;
|
||||
|
||||
|
||||
/**
|
||||
* 店员查询本人未结算工资
|
||||
* 订单完成之后,24小时之后进行订单结算,并且一旦订单结算了,就无法进行退款。想要退款,只能在24小时之内进行。
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024/5/31 16:20
|
||||
**/
|
||||
@ClerkUserLogin
|
||||
@GetMapping("clerk/queryUnsettledWages")
|
||||
public R clerkQueryUnsettledWages() {
|
||||
List<PlayOrderInfoEntity> list = playOrderInfoService.queryNotSettlementOrder(ThreadLocalRequestDetail.getClerkUserInfo().getId());
|
||||
BigDecimal orderMoney = BigDecimal.ZERO;
|
||||
BigDecimal estimatedRevenue = BigDecimal.ZERO;
|
||||
for (PlayOrderInfoEntity entity : list) {
|
||||
orderMoney = orderMoney.add(entity.getFinalAmount());
|
||||
estimatedRevenue = estimatedRevenue.add(entity.getEstimatedRevenue());
|
||||
}
|
||||
ClerkUnsettledWagesReturnVo vo = new ClerkUnsettledWagesReturnVo(orderMoney, list.size(), estimatedRevenue);
|
||||
return R.ok(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 店员查询本人当期工资
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024/5/31 16:20
|
||||
**/
|
||||
@ClerkUserLogin
|
||||
@GetMapping("clerk/queryCurrentPeriodWages")
|
||||
public R clerkQueryCurrentPeriodWages() {
|
||||
PlayClerkWagesInfoEntity entity = playClerkWagesInfoService.selectCurrentPeriodWagesByClerkId(ThreadLocalRequestDetail.getClerkUserInfo().getId());
|
||||
if (entity == null) {
|
||||
entity = new PlayClerkWagesInfoEntity();
|
||||
entity.setClerkId(ThreadLocalRequestDetail.getClerkUserInfo().getId());
|
||||
entity.setId(IdUtils.getUuid());
|
||||
entity.setStartCountDate(LocalDate.now());
|
||||
entity.setEndCountDate(LocalDate.now());
|
||||
entity.setFinalAmount(BigDecimal.ZERO);
|
||||
entity.setOrderNumber(0);
|
||||
entity.setOrdersExpiredNumber(0);
|
||||
entity.setOrderContinueNumber(0);
|
||||
entity.setOrderContinueProportion(0);
|
||||
entity.setOrderContinueMoney(BigDecimal.ZERO);
|
||||
}
|
||||
ClerkCurrentPeriodWagesReturnVo returnVo = ConvertUtil.entityToVo(entity, ClerkCurrentPeriodWagesReturnVo.class);
|
||||
returnVo.setTotalMoney(entity.getFinalAmount());
|
||||
returnVo.setOrderWages(ConvertUtil.entityToVo(entity, OrderWagesReturnVo.class));
|
||||
return R.ok(returnVo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 店员查询本人历史工资
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024/5/31 16:20
|
||||
**/
|
||||
@ClerkUserLogin
|
||||
@PostMapping("clerk/queryHistoricalWages")
|
||||
public R clerkQueryHistoricalWages() {
|
||||
List<PlayClerkWagesInfoEntity> list = playClerkWagesInfoService.selectHistoricalWagesByClerkId(ThreadLocalRequestDetail.getClerkUserInfo().getId());
|
||||
List<ClerkHistoricalWagesReturnVo> returnVoList = new ArrayList<>(list.size());
|
||||
for (PlayClerkWagesInfoEntity entity : list) {
|
||||
returnVoList.add(ConvertUtil.entityToVo(entity, ClerkHistoricalWagesReturnVo.class));
|
||||
}
|
||||
IPage<ClerkHistoricalWagesReturnVo> page = new Page<>();
|
||||
page.setTotal(5);
|
||||
page.setRecords(returnVoList);
|
||||
page.setSize(10);
|
||||
page.setPages(1);
|
||||
return R.ok(page);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 店员查询本人工资详情
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024/5/31 16:20
|
||||
**/
|
||||
@ClerkUserLogin
|
||||
@GetMapping("clerk/queryWagesDetails")
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.starry.admin.modules.weichat.controller;
|
||||
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.starry.common.utils.IdUtils;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.starry.admin.common.exception.CustomException;
|
||||
import com.starry.admin.common.oss.service.IOssFileService;
|
||||
@@ -61,7 +61,7 @@ public class WxCommonController {
|
||||
String accessToken = wxAccessTokenService.getAccessToken();
|
||||
// 下载录音文件,并转化为InputStream
|
||||
InputStream inputStream = WxFileUtils.getTemporaryMaterial(accessToken, mediaId);
|
||||
File tempFile = FileUtil.createTempFile("wx_" + SecurityUtils.getTenantId(), IdUtil.fastSimpleUUID() + ".amr", null).toFile();
|
||||
File tempFile = FileUtil.createTempFile("wx_" + SecurityUtils.getTenantId(), IdUtils.getUuid() + ".amr", null).toFile();
|
||||
// 可以在这里对临时文件进行操作
|
||||
log.error("tempFile = {}", tempFile.getPath());
|
||||
try (FileOutputStream fileOutputStream = new FileOutputStream(tempFile)) {
|
||||
@@ -76,11 +76,11 @@ public class WxCommonController {
|
||||
throw new CustomException("音频文件上传失败,文件不存在");
|
||||
}
|
||||
//将下载的微信素材文件,转化为MP3文件
|
||||
File targetFile = FileUtil.createTempFile("wx_" + SecurityUtils.getTenantId(), IdUtil.fastSimpleUUID() + ".mp3", null).toFile();
|
||||
File targetFile = FileUtil.createTempFile("wx_" + SecurityUtils.getTenantId(), IdUtils.getUuid() + ".mp3", null).toFile();
|
||||
log.error("targetFile = {}", targetFile.getPath());
|
||||
WxFileUtils.audioConvert2Mp3(tempFile, targetFile);
|
||||
//将MP3文件上传到OSS
|
||||
String fileAddress = ossFileService.upload(Files.newInputStream(targetFile.toPath()), SecurityUtils.getTenantId(), IdUtil.fastSimpleUUID() + ".mp3");
|
||||
String fileAddress = ossFileService.upload(Files.newInputStream(targetFile.toPath()), SecurityUtils.getTenantId(), IdUtils.getUuid() + ".mp3");
|
||||
//删除临时文件
|
||||
FileUtil.del(tempFile);
|
||||
FileUtil.del(targetFile);
|
||||
|
||||
@@ -6,10 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.starry.admin.common.aspect.CustomUserLogin;
|
||||
import com.starry.admin.common.conf.ThreadLocalRequestDetail;
|
||||
import com.starry.admin.common.exception.CustomException;
|
||||
import com.starry.admin.modules.balance.service.IPlayBalanceDetailsInfoService;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkCommodityEntity;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkUserInfoEntity;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkUserListResultVo;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkCommodityService;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkUserInfoService;
|
||||
import com.starry.admin.modules.custom.module.entity.PlayCustomLeaveMsgEntity;
|
||||
@@ -22,19 +19,31 @@ import com.starry.admin.modules.gift.service.IPlayGiftInfoService;
|
||||
import com.starry.admin.modules.order.module.entity.PlayOrderComplaintInfoEntity;
|
||||
import com.starry.admin.modules.order.module.entity.PlayOrderEvaluateInfoEntity;
|
||||
import com.starry.admin.modules.order.module.entity.PlayOrderInfoEntity;
|
||||
import com.starry.admin.modules.order.module.vo.PlayOrderDetailsReturnVo;
|
||||
import com.starry.admin.modules.order.module.vo.PlayOrderInfoQueryVo;
|
||||
import com.starry.admin.modules.order.module.vo.PlayOrderInfoReturnVo;
|
||||
import com.starry.admin.modules.order.module.entity.PlayOrderRandomInfoEntity;
|
||||
import com.starry.admin.modules.order.service.IPlayOrderComplaintInfoService;
|
||||
import com.starry.admin.modules.order.service.IPlayOrderEvaluateInfoService;
|
||||
import com.starry.admin.modules.order.service.IPlayOrderInfoService;
|
||||
import com.starry.admin.modules.order.service.IPlayOrderRandomInfoService;
|
||||
import com.starry.admin.modules.play.module.vo.PlayCommodityInfoVo;
|
||||
import com.starry.admin.modules.play.service.IPlayCommodityInfoService;
|
||||
import com.starry.admin.modules.weichat.entity.*;
|
||||
import com.starry.admin.modules.weichat.entity.clerk.PlayClerkUserInfoResultVo;
|
||||
import com.starry.admin.modules.weichat.entity.costom.PlayCustomHideLevelStateEditVo;
|
||||
import com.starry.admin.modules.weichat.entity.costom.PlayCustomHideRankingStateEditVo;
|
||||
import com.starry.admin.modules.weichat.entity.evaluate.PlayCustomOrderEvaluateReturnVo;
|
||||
import com.starry.admin.modules.weichat.entity.order.PlayCustomOrderDetailsReturnVo;
|
||||
import com.starry.admin.modules.weichat.entity.order.PlayCustomOrderInfoQueryVo;
|
||||
import com.starry.admin.modules.weichat.entity.order.PlayCustomOrderListReturnVo;
|
||||
import com.starry.admin.modules.weichat.entity.order.PlayOrderInfoCommodityAdd;
|
||||
import com.starry.admin.modules.weichat.entity.user.PlayCustomUserReturnDetailVo;
|
||||
import com.starry.admin.modules.weichat.service.WxCustomUserService;
|
||||
import com.starry.admin.utils.MoneyUtils;
|
||||
import com.starry.common.result.R;
|
||||
import com.starry.common.utils.ConvertUtil;
|
||||
import com.starry.common.utils.IdUtils;
|
||||
import com.starry.common.utils.StringUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -53,9 +62,6 @@ public class WxCustomController {
|
||||
@Resource
|
||||
private IPlayCustomUserInfoService customUserInfoService;
|
||||
|
||||
@Resource
|
||||
private IPlayBalanceDetailsInfoService playBalanceDetailsInfoService;
|
||||
|
||||
@Resource
|
||||
private IPlayClerkUserInfoService clerkUserInfoService;
|
||||
|
||||
@@ -63,7 +69,7 @@ public class WxCustomController {
|
||||
private IPlayGiftInfoService giftInfoService;
|
||||
|
||||
@Resource
|
||||
private IPlayClerkCommodityService clerkCommodityService;
|
||||
private IPlayCommodityInfoService playCommodityInfoService;
|
||||
|
||||
@Resource
|
||||
private IPlayCustomFollowInfoService playCustomFollowInfoService;
|
||||
@@ -86,6 +92,10 @@ public class WxCustomController {
|
||||
@Resource
|
||||
private IPlayOrderEvaluateInfoService playOrderEvaluateInfoService;
|
||||
|
||||
@Resource
|
||||
private IPlayOrderRandomInfoService playOrderRandomInfoService;
|
||||
|
||||
|
||||
/**
|
||||
* 根据店员ID查询店员详细信息
|
||||
*
|
||||
@@ -95,7 +105,7 @@ public class WxCustomController {
|
||||
@GetMapping("/queryClerkDetailedById")
|
||||
public R queryClerkDetailedById(@RequestParam("id") String id) {
|
||||
PlayClerkUserInfoEntity entity = clerkUserInfoService.selectById(id);
|
||||
PlayClerkUserListResultVo vo = ConvertUtil.entityToVo(entity, PlayClerkUserListResultVo.class);
|
||||
PlayClerkUserInfoResultVo vo = ConvertUtil.entityToVo(entity, PlayClerkUserInfoResultVo.class);
|
||||
vo.setAddress(entity.getCity());
|
||||
// 查询是否关注,未登录情况下,默认为未关注
|
||||
String loginUserId = customUserService.getLoginUserId();
|
||||
@@ -103,10 +113,19 @@ public class WxCustomController {
|
||||
vo.setFollowState(playCustomFollowInfoService.queryFollowState(loginUserId, vo.getId()));
|
||||
}
|
||||
// 服务项目
|
||||
vo.setCommodity(playClerkCommodityService.getClerkCommodityList(vo.getId()));
|
||||
vo.setCommodity(playClerkCommodityService.getClerkCommodityList(vo.getId(), "1"));
|
||||
return R.ok(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 顾客本人刷新头像
|
||||
*/
|
||||
@CustomUserLogin
|
||||
@GetMapping("/refreshAvatar")
|
||||
public R refreshAvatar() {
|
||||
return R.ok("");
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据顾客ID查询当前顾客详细信息
|
||||
*/
|
||||
@@ -115,12 +134,43 @@ public class WxCustomController {
|
||||
public R queryById() {
|
||||
String userId = ThreadLocalRequestDetail.getCustomUserInfo().getId();
|
||||
PlayCustomUserInfoEntity customUserInfo = customUserInfoService.selectById(userId);
|
||||
return R.ok(customUserInfo);
|
||||
PlayCustomUserReturnDetailVo vo = ConvertUtil.entityToVo(customUserInfo, PlayCustomUserReturnDetailVo.class);
|
||||
PlayClerkUserInfoEntity clerkUserInfo = clerkUserInfoService.selectByOpenid(customUserInfo.getOpenid());
|
||||
if (clerkUserInfo != null) {
|
||||
vo.setClerkState("1");
|
||||
}
|
||||
return R.ok(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 顾客本人修改隐藏等级状态
|
||||
*/
|
||||
@CustomUserLogin
|
||||
@PostMapping("/updateHideLevelState")
|
||||
public R updateHideLevelState(@Validated @RequestBody PlayCustomHideLevelStateEditVo vo) {
|
||||
vo.setId(ThreadLocalRequestDetail.getCustomUserInfo().getId());
|
||||
PlayCustomUserInfoEntity entity = new PlayCustomUserInfoEntity();
|
||||
BeanUtils.copyProperties(vo, entity);
|
||||
customUserInfoService.update(entity);
|
||||
return R.ok("成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 顾客本人修改隐藏排名状态
|
||||
*/
|
||||
@CustomUserLogin
|
||||
@PostMapping("/updateHideRankingState")
|
||||
public R updateHideRankingState(@Validated @RequestBody PlayCustomHideRankingStateEditVo vo) {
|
||||
vo.setId(ThreadLocalRequestDetail.getCustomUserInfo().getId());
|
||||
PlayCustomUserInfoEntity entity = new PlayCustomUserInfoEntity();
|
||||
BeanUtils.copyProperties(vo, entity);
|
||||
customUserInfoService.update(entity);
|
||||
return R.ok("成功");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 打赏店员
|
||||
* 打赏店员-打赏余额
|
||||
*/
|
||||
@CustomUserLogin
|
||||
@PostMapping("/order/reward")
|
||||
@@ -132,14 +182,15 @@ public class WxCustomController {
|
||||
if (new BigDecimal(vo.getMoney()).compareTo(customUserInfo.getAccountBalance()) > 0) {
|
||||
throw new CustomException("余额不足");
|
||||
}
|
||||
String orderId = IdUtils.getUuid();
|
||||
// 记录订单信息
|
||||
playOrderInfoService.createRewardOrder(new BigDecimal(vo.getMoney()), new BigDecimal(vo.getMoney()), userId);
|
||||
playOrderInfoService.createOrderInfo(orderId, playOrderInfoService.getOrderNo(), "3", "2", "2", "0", "1", "", "0", BigDecimal.ZERO, "", "", "", new BigDecimal(vo.getMoney()), new BigDecimal(vo.getMoney()), BigDecimal.ZERO, userId, vo.getClerkId(), vo.getWeiChatCode(), vo.getRemark());
|
||||
//
|
||||
// playOrderInfoService.createRewardOrder(orderId, new BigDecimal(vo.getMoney()), new BigDecimal(vo.getMoney()), userId, clerkUserInfo.getId(), vo.getRemark(), vo.getWeiChatCode());
|
||||
// 顾客减少余额
|
||||
customUserInfoService.updateAccountBalanceById(customUserInfo.getId(), customUserInfo.getAccountBalance().subtract(new BigDecimal(vo.getMoney())));
|
||||
playBalanceDetailsInfoService.create("0", customUserInfo.getId(), customUserInfo.getAccountBalance(), customUserInfo.getAccountBalance().subtract(new BigDecimal(vo.getMoney())), "打赏", new BigDecimal(vo.getMoney()).multiply(new BigDecimal("-1")));
|
||||
customUserInfoService.updateAccountBalanceById(customUserInfo.getId(), customUserInfo.getAccountBalance(), customUserInfo.getAccountBalance().subtract(new BigDecimal(vo.getMoney())), "1", "打赏", new BigDecimal(vo.getMoney()), orderId);
|
||||
// 陪聊增加余额
|
||||
clerkUserInfoService.updateAccountBalanceById(clerkUserInfo.getId(), clerkUserInfo.getAccountBalance().add(new BigDecimal(vo.getMoney())));
|
||||
playBalanceDetailsInfoService.create("1", clerkUserInfo.getId(), clerkUserInfo.getAccountBalance(), clerkUserInfo.getAccountBalance().add(new BigDecimal(vo.getMoney())), "打赏", new BigDecimal(vo.getMoney()).multiply(new BigDecimal("1")));
|
||||
// clerkUserInfoService.updateAccountBalanceById(clerkUserInfo.getId(), clerkUserInfo.getAccountBalance(), clerkUserInfo.getAccountBalance().add(new BigDecimal(vo.getMoney())), "2", "打赏", new BigDecimal(vo.getMoney()), orderId);
|
||||
return R.ok("成功");
|
||||
}
|
||||
|
||||
@@ -158,14 +209,15 @@ public class WxCustomController {
|
||||
if (money.compareTo(customUserInfo.getAccountBalance()) > 0) {
|
||||
throw new CustomException("账号余额不足");
|
||||
}
|
||||
String orderId = IdUtils.getUuid();
|
||||
// 记录订单信息
|
||||
playOrderInfoService.createGiftOrder(vo.getGiftId(), giftInfo.getPrice(), vo.getGiftQuantity(), money, money, userId);
|
||||
playOrderInfoService.createOrderInfo(orderId, playOrderInfoService.getOrderNo(), "3", "2", "2", "1", "1", giftInfo.getId(), "0", giftInfo.getPrice(), "", giftInfo.getName(), String.valueOf(vo.getGiftQuantity()), money, money, BigDecimal.ZERO, userId, vo.getClerkId(), vo.getWeiChatCode(), vo.getRemark());
|
||||
|
||||
// playOrderInfoService.createGiftOrder(orderId, vo.getGiftId(), giftInfo.getPrice(), String.valueOf(vo.getGiftQuantity()), money, money, userId, clerkUserInfo.getId(), vo.getRemark(), vo.getWeiChatCode());
|
||||
// 顾客减少余额
|
||||
customUserInfoService.updateAccountBalanceById(customUserInfo.getId(), customUserInfo.getAccountBalance().subtract(money));
|
||||
playBalanceDetailsInfoService.create("0", customUserInfo.getId(), customUserInfo.getAccountBalance(), customUserInfo.getAccountBalance().subtract(money), "赠送礼物", money.multiply(new BigDecimal("-1")));
|
||||
customUserInfoService.updateAccountBalanceById(customUserInfo.getId(), customUserInfo.getAccountBalance(), customUserInfo.getAccountBalance().subtract(money), "1", "赠送礼物", money, orderId);
|
||||
// 陪聊增加余额
|
||||
clerkUserInfoService.updateAccountBalanceById(clerkUserInfo.getId(), clerkUserInfo.getAccountBalance().add(money));
|
||||
playBalanceDetailsInfoService.create("1", clerkUserInfo.getId(), clerkUserInfo.getAccountBalance(), clerkUserInfo.getAccountBalance().add(money), "赠送礼物", money.multiply(new BigDecimal("1")));
|
||||
// clerkUserInfoService.updateAccountBalanceById(clerkUserInfo.getId(), clerkUserInfo.getAccountBalance(), clerkUserInfo.getAccountBalance().add(money), "2", "赠送礼物", money, orderId);
|
||||
return R.ok("成功");
|
||||
}
|
||||
|
||||
@@ -182,29 +234,61 @@ public class WxCustomController {
|
||||
@PostMapping("/order/commodity")
|
||||
public R commodityToOrdder(@Validated @RequestBody PlayOrderInfoCommodityAdd vo) {
|
||||
String customId = ThreadLocalRequestDetail.getCustomUserInfo().getId();
|
||||
|
||||
PlayClerkCommodityEntity clerkCommodity = clerkCommodityService.selectPlayClerkCommodityById(vo.getCommodityId());
|
||||
PlayCommodityInfoVo commodityInfo = playCommodityInfoService.queryCommodityInfo(vo.getCommodityId());
|
||||
PlayCustomUserInfoEntity customUserInfo = customUserInfoService.selectById(customId);
|
||||
PlayClerkUserInfoEntity clerkUserInfo = clerkUserInfoService.selectById(vo.getClerkId());
|
||||
BigDecimal money = clerkCommodity.getCommodityPrice().multiply(new BigDecimal(vo.getCommodityQuantity()));
|
||||
BigDecimal money = commodityInfo.getCommodityPrice().multiply(new BigDecimal(vo.getCommodityQuantity()));
|
||||
|
||||
if (money.compareTo(customUserInfo.getAccountBalance()) > 0) {
|
||||
throw new CustomException("余额不足");
|
||||
}
|
||||
String orderId = IdUtils.getUuid();
|
||||
|
||||
// 记录订单信息
|
||||
playOrderInfoService.createOrdinaryOrder("2", "0", clerkCommodity.getCommodityId(), clerkCommodity.getCommodityPrice(), vo.getCommodityQuantity(), money, money, customId);
|
||||
playOrderInfoService.createOrderInfo(orderId, playOrderInfoService.getOrderNo(), "0", "2", "0", "", "1", commodityInfo.getCommodityId(), "1", commodityInfo.getCommodityPrice(), commodityInfo.getServiceDuration(), commodityInfo.getCommodityName(), String.valueOf(vo.getCommodityQuantity()), money, money, BigDecimal.ZERO, customId, clerkUserInfo.getId(), vo.getWeiChatCode(), vo.getRemark());
|
||||
// playOrderInfoService.createOrdinaryOrder(orderId, commodityInfo.getCommodityId(), commodityInfo.getCommodityPrice(), String.valueOf(vo.getCommodityQuantity()), commodityInfo.getCommodityName(), commodityInfo.getServiceDuration(), money, money, customId, clerkUserInfo.getId(), vo.getRemark(), vo.getWeiChatCode());
|
||||
// 顾客减少余额
|
||||
customUserInfoService.updateAccountBalanceById(customUserInfo.getId(), customUserInfo.getAccountBalance().subtract(money));
|
||||
playBalanceDetailsInfoService.create("0", customUserInfo.getId(), customUserInfo.getAccountBalance(), customUserInfo.getAccountBalance().subtract(money), "打赏", money.multiply(new BigDecimal("-1")));
|
||||
customUserInfoService.updateAccountBalanceById(customUserInfo.getId(), customUserInfo.getAccountBalance(), customUserInfo.getAccountBalance().subtract(money), "1", "下单-指定单", money, orderId);
|
||||
// 陪聊增加余额
|
||||
clerkUserInfoService.updateAccountBalanceById(clerkUserInfo.getId(), clerkUserInfo.getAccountBalance().add(money));
|
||||
playBalanceDetailsInfoService.create("1", clerkUserInfo.getId(), clerkUserInfo.getAccountBalance(), clerkUserInfo.getAccountBalance().add(money), "下单", money.multiply(new BigDecimal("1")));
|
||||
// clerkUserInfoService.updateAccountBalanceById(clerkUserInfo.getId(), clerkUserInfo.getAccountBalance(), clerkUserInfo.getAccountBalance().add(money), "2", "下单-指定单", money, orderId);
|
||||
return R.ok("成功");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增随机订单
|
||||
*
|
||||
* @param vo 随机单创建对象
|
||||
* @return R
|
||||
*/
|
||||
@CustomUserLogin
|
||||
@PostMapping("/order/random")
|
||||
public R randomToOrdder(@Validated @RequestBody PlayOrderInfoRandomAdd vo) {
|
||||
// 验证当前顾客余额是否充足
|
||||
String customId = ThreadLocalRequestDetail.getCustomUserInfo().getId();
|
||||
PlayCustomUserInfoEntity customUserInfo = customUserInfoService.selectById(customId);
|
||||
PlayCommodityInfoVo commodityInfo = playCommodityInfoService.queryCommodityInfo(vo.getCommodityId());
|
||||
BigDecimal money = commodityInfo.getCommodityPrice().multiply(new BigDecimal(vo.getCommodityQuantity()));
|
||||
if (money.compareTo(customUserInfo.getAccountBalance()) > 0) {
|
||||
throw new CustomException("余额不足");
|
||||
}
|
||||
String orderId = IdUtils.getUuid();
|
||||
|
||||
PlayOrderRandomInfoEntity orderRandomInfo = ConvertUtil.entityToVo(vo, PlayOrderRandomInfoEntity.class);
|
||||
;
|
||||
orderRandomInfo.setCommodityId(commodityInfo.getCommodityId());
|
||||
orderRandomInfo.setCommodityName(commodityInfo.getCommodityName());
|
||||
orderRandomInfo.setCommodityPrice(commodityInfo.getCommodityPrice());
|
||||
orderRandomInfo.setCommodityNumber(String.valueOf(vo.getCommodityQuantity()));
|
||||
orderRandomInfo.setServiceDuration(commodityInfo.getServiceDuration());
|
||||
orderRandomInfo.setId(orderId);
|
||||
playOrderRandomInfoService.create(orderRandomInfo);
|
||||
// 记录订单信息
|
||||
playOrderInfoService.createOrderInfo(orderId, playOrderInfoService.getOrderNo(), "0", "2", "1", "", "1", commodityInfo.getCommodityId(), "1", commodityInfo.getCommodityPrice(), commodityInfo.getServiceDuration(), commodityInfo.getCommodityName(), String.valueOf(vo.getCommodityQuantity()), money, money, BigDecimal.ZERO, customId, "", vo.getWeiChatCode(), vo.getRemark());
|
||||
|
||||
// playOrderInfoService.createRandomOrder(orderId, customUserInfo.getId(), commodityInfo.getCommodityPrice(), String.valueOf(vo.getCommodityQuantity()), commodityInfo.getServiceDuration(), commodityInfo.getCommodityName(), money, money, customId, vo.getRemark(), vo.getWeiChatCode());
|
||||
// 顾客减少余额
|
||||
customUserInfoService.updateAccountBalanceById(customUserInfo.getId(), customUserInfo.getAccountBalance(), customUserInfo.getAccountBalance().subtract(money), "1", "下单-随机单", money, orderId);
|
||||
// 下单成功后,先根据用户条件进行随机分配
|
||||
return R.ok("下单成功");
|
||||
}
|
||||
@@ -220,10 +304,9 @@ public class WxCustomController {
|
||||
**/
|
||||
@CustomUserLogin
|
||||
@PostMapping("/order/queryByPage")
|
||||
public R queryOrderByPage(@Validated @RequestBody PlayOrderInfoQueryVo vo) {
|
||||
public R queryOrderByPage(@Validated @RequestBody PlayCustomOrderInfoQueryVo vo) {
|
||||
vo.setPurchaserBy(ThreadLocalRequestDetail.getCustomUserInfo().getId());
|
||||
vo.setOrderType("2");
|
||||
IPage<PlayOrderInfoReturnVo> iPage = playOrderInfoService.selectOrderInfoPage(vo);
|
||||
IPage<PlayCustomOrderListReturnVo> iPage = playOrderInfoService.customSelectOrderInfoByPage(vo);
|
||||
return R.ok(iPage);
|
||||
}
|
||||
|
||||
@@ -238,12 +321,13 @@ public class WxCustomController {
|
||||
@CustomUserLogin
|
||||
@GetMapping("/order/queryById")
|
||||
public R queryById(@RequestParam("id") String id) {
|
||||
PlayOrderDetailsReturnVo orderInfo = playOrderInfoService.selectById(id);
|
||||
return R.ok(orderInfo);
|
||||
PlayCustomOrderDetailsReturnVo vo = playOrderInfoService.customSelectOrderDetails(ThreadLocalRequestDetail.getCustomUserInfo().getId(), id);
|
||||
return R.ok(vo);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 顾客分页查询本人订单列表
|
||||
* 顾客-完成订单
|
||||
*
|
||||
* @param id 订单ID
|
||||
* @return com.starry.common.result.R
|
||||
@@ -251,9 +335,25 @@ public class WxCustomController {
|
||||
* @since 2024/5/8 15:57
|
||||
**/
|
||||
@CustomUserLogin
|
||||
@GetMapping("/order/cancellation")
|
||||
public R cancellationOrder(@RequestParam("id") String id) {
|
||||
playOrderInfoService.customCancellationOrder(id);
|
||||
@GetMapping("/order/end")
|
||||
public R endOrder(@RequestParam("id") String id) {
|
||||
playOrderInfoService.updateStateTo23("0", ThreadLocalRequestDetail.getCustomUserInfo().getId(), "3", id);
|
||||
return R.ok("成功");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 顾客取消订单
|
||||
*
|
||||
* @param vo 订单取消对象
|
||||
* @return com.starry.common.result.R
|
||||
* @author admin
|
||||
* @since 2024/5/8 15:57
|
||||
**/
|
||||
@CustomUserLogin
|
||||
@PostMapping("/order/cancellation")
|
||||
public R cancellationOrder(@Validated @RequestBody PlayOrderCancellationVo vo) {
|
||||
playOrderInfoService.updateStateTo4("0", ThreadLocalRequestDetail.getCustomUserInfo().getId(), vo.getOrderId(), vo.getRefundReason(), vo.getImages());
|
||||
return R.ok("取消成功");
|
||||
}
|
||||
|
||||
@@ -278,6 +378,24 @@ public class WxCustomController {
|
||||
return R.ok("评价成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据订单ID查询当前顾客对当前人的评价
|
||||
*
|
||||
* @param orderId 订单ID
|
||||
* @return com.starry.common.result.R
|
||||
* @author admin
|
||||
* @since 2024/5/8 15:57
|
||||
**/
|
||||
@CustomUserLogin
|
||||
@GetMapping("/order/evaluate/queryByOrderId")
|
||||
public R addOrderEvaluateByOrderId(@RequestParam("id") String orderId) {
|
||||
PlayOrderEvaluateInfoEntity orderEvaluateInfo = playOrderEvaluateInfoService.queryCustomToOrderEvaluateInfo(ThreadLocalRequestDetail.getCustomUserInfo().getId(), orderId);
|
||||
if (orderEvaluateInfo == null) {
|
||||
throw new CustomException("当前订单未评价");
|
||||
}
|
||||
return R.ok(ConvertUtil.entityToVo(orderEvaluateInfo, PlayCustomOrderEvaluateReturnVo.class));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增订单投诉信息
|
||||
@@ -301,9 +419,6 @@ public class WxCustomController {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 顾客新增留言
|
||||
*
|
||||
@@ -348,12 +463,6 @@ public class WxCustomController {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 顾客修改对陪玩的关注状态
|
||||
*
|
||||
@@ -370,5 +479,21 @@ public class WxCustomController {
|
||||
return R.ok("修改成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 顾客查询已关注陪聊列表
|
||||
*
|
||||
* @param vo 陪玩的关注状态对象
|
||||
* @return com.starry.common.result.R
|
||||
* @author admin
|
||||
* @since 2024/5/8 15:57
|
||||
**/
|
||||
@CustomUserLogin
|
||||
@PostMapping("/follow/queryByPage")
|
||||
public R followQueryByPage(@Validated @RequestBody PlayClerkFollowQueryVo vo) {
|
||||
vo.setCustomId(ThreadLocalRequestDetail.getCustomUserInfo().getId());
|
||||
IPage<PlayClerkFollowReturnVo> iPage = playCustomFollowInfoService.selectByPage(vo);
|
||||
return R.ok(iPage);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,16 +1,23 @@
|
||||
package com.starry.admin.modules.weichat.controller;
|
||||
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.starry.admin.common.aspect.ClerkUserLogin;
|
||||
import com.starry.admin.common.conf.ThreadLocalRequestDetail;
|
||||
import com.starry.admin.common.exception.CustomException;
|
||||
import com.starry.admin.modules.gift.service.IPlayGiftInfoService;
|
||||
import com.starry.admin.modules.weichat.entity.PlayGiftInfoDto;
|
||||
import com.starry.admin.modules.weichat.entity.gift.PlayClerkGiftReturnVo;
|
||||
import com.starry.common.result.R;
|
||||
import com.starry.common.utils.ConvertUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
@@ -22,8 +29,35 @@ public class WxGiftController {
|
||||
@Resource
|
||||
private IPlayGiftInfoService giftInfoService;
|
||||
|
||||
/**
|
||||
* 顾客查询礼物列表
|
||||
*
|
||||
* @return 礼物列表
|
||||
*/
|
||||
@GetMapping("/listByAll")
|
||||
public R rewardToOrder() {
|
||||
public R customListByAll() {
|
||||
return R.ok(ConvertUtil.entityToVoList(giftInfoService.listByAll(),PlayGiftInfoDto.class));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 顾客查询礼物列表
|
||||
*
|
||||
* @param obtained 店员获得礼物状态,[0:未获得,1:已获得]
|
||||
* @return 礼物列表
|
||||
*/
|
||||
@ClerkUserLogin
|
||||
@GetMapping("/clerk/listByAll")
|
||||
public R clerkListByAll(@RequestParam("obtained") String obtained) {
|
||||
if (StrUtil.isBlankIfStr(obtained)) {
|
||||
throw new CustomException("obtained参数异常");
|
||||
}
|
||||
if (!"0".equals(obtained) && !"1".equals(obtained)) {
|
||||
throw new CustomException("obtained参数异常");
|
||||
}
|
||||
List<PlayClerkGiftReturnVo> list = giftInfoService.clerkListByAll(ThreadLocalRequestDetail.getClerkUserInfo().getId(), obtained);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.starry.admin.modules.weichat.controller;
|
||||
|
||||
|
||||
import com.starry.admin.common.aspect.CustomUserLogin;
|
||||
import com.starry.admin.modules.custom.module.entity.PlayCustomLevelInfoEntity;
|
||||
import com.starry.admin.modules.custom.service.IPlayCustomLevelInfoService;
|
||||
import com.starry.admin.modules.weichat.entity.vo.PlayCustomLevelInfoReturnVo;
|
||||
import com.starry.common.result.R;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/wx/level/")
|
||||
public class WxLevelController {
|
||||
|
||||
@Resource
|
||||
private IPlayCustomLevelInfoService levelInfoService;
|
||||
|
||||
|
||||
/**
|
||||
* 顾客查询登记列表
|
||||
*/
|
||||
@CustomUserLogin
|
||||
@GetMapping("/custom/queryAll")
|
||||
public R queryById() {
|
||||
List<PlayCustomLevelInfoEntity> list = levelInfoService.selectAll();
|
||||
List<PlayCustomLevelInfoReturnVo> result = new ArrayList<>();
|
||||
for (PlayCustomLevelInfoEntity entity : list) {
|
||||
PlayCustomLevelInfoReturnVo vo = new PlayCustomLevelInfoReturnVo();
|
||||
BeanUtils.copyProperties(entity, vo);
|
||||
result.add(vo);
|
||||
}
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -107,6 +107,7 @@ public class WxOauthController {
|
||||
clerkUserInfoService.updateTokenById(entity.getId(), tokenValue);
|
||||
return R.ok(jsonObject);
|
||||
} catch (Exception e) {
|
||||
log.error("顾客登录失败,", e);
|
||||
return R.unauthorized();
|
||||
}
|
||||
}
|
||||
@@ -155,8 +156,8 @@ public class WxOauthController {
|
||||
|
||||
|
||||
@PostMapping("/custom/login")
|
||||
|
||||
public R customLogin(@Validated @RequestBody WxUserLoginVo vo) {
|
||||
log.info("顾客登录接口调用,code = {}", vo.getCode());
|
||||
try {
|
||||
String userId = wxOauthService.customUserLogin(vo.getCode());
|
||||
PlayCustomUserInfoEntity entity = customUserInfoService.selectById(userId);
|
||||
@@ -174,6 +175,7 @@ public class WxOauthController {
|
||||
customUserInfoService.updateTokenById(entity.getId(), tokenValue);
|
||||
return R.ok(jsonObject);
|
||||
} catch (Exception e) {
|
||||
log.error("登录失败", e);
|
||||
return R.unauthorized();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,166 @@
|
||||
package com.starry.admin.modules.weichat.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.starry.admin.common.aspect.ClerkUserLogin;
|
||||
import com.starry.admin.common.aspect.CustomUserLogin;
|
||||
import com.starry.admin.common.conf.ThreadLocalRequestDetail;
|
||||
import com.starry.admin.common.exception.CustomException;
|
||||
import com.starry.admin.modules.order.module.entity.PlayOrderContinueInfoEntity;
|
||||
import com.starry.admin.modules.order.module.entity.PlayOrderInfoEntity;
|
||||
import com.starry.admin.modules.order.module.vo.PlayOrderContinueQueryVo;
|
||||
import com.starry.admin.modules.order.module.vo.PlayOrderContinueReturnVo;
|
||||
import com.starry.admin.modules.order.module.vo.PlayOrderReviewStateEditVo;
|
||||
import com.starry.admin.modules.order.service.IPlayOrderContinueInfoService;
|
||||
import com.starry.admin.modules.order.service.IPlayOrderInfoService;
|
||||
import com.starry.admin.modules.order.service.IPlayOrderRandomInfoService;
|
||||
import com.starry.admin.modules.weichat.entity.order.*;
|
||||
import com.starry.common.result.R;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 订单处理
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024/5/25 下午2:45
|
||||
**/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/wx/order")
|
||||
public class WxOrderInfoController {
|
||||
|
||||
@Resource
|
||||
private IPlayOrderInfoService playOrderInfoService;
|
||||
|
||||
@Resource
|
||||
private IPlayOrderContinueInfoService playOrderContinueInfoService;
|
||||
|
||||
|
||||
@Resource
|
||||
private IPlayOrderRandomInfoService playOrderRandomInfoService;
|
||||
|
||||
|
||||
/**
|
||||
* 续单申请-店员发起
|
||||
*
|
||||
* @param vo 续单申请提交对象
|
||||
*/
|
||||
@ClerkUserLogin
|
||||
@PostMapping("/clerk/continue")
|
||||
public R continueToOrdder(@Validated @RequestBody PlayOrderInfoContinueAdd vo) {
|
||||
PlayOrderInfoEntity entity = playOrderInfoService.selectOrderInfoById(vo.getOrderId());
|
||||
if (!entity.getAcceptBy().equals(ThreadLocalRequestDetail.getClerkUserInfo().getId())) {
|
||||
throw new CustomException("非本人订单;无法续单");
|
||||
}
|
||||
|
||||
PlayOrderContinueInfoEntity orderContinueInfo = playOrderContinueInfoService.selectPlayOrderId(vo.getOrderId());
|
||||
if (orderContinueInfo != null) {
|
||||
throw new CustomException("同一场订单只能续单一次");
|
||||
}
|
||||
PlayOrderContinueInfoEntity orderContinueInfoEntity = new PlayOrderContinueInfoEntity();
|
||||
orderContinueInfoEntity.setOrderId(entity.getId());
|
||||
orderContinueInfoEntity.setOrderNo(entity.getOrderNo());
|
||||
orderContinueInfoEntity.setCustomId(entity.getPurchaserBy());
|
||||
orderContinueInfoEntity.setClerkId(entity.getAcceptBy());
|
||||
orderContinueInfoEntity.setPlaceType(entity.getPlaceType());
|
||||
orderContinueInfoEntity.setOrderMoney(entity.getOrderMoney());
|
||||
orderContinueInfoEntity.setFinalAmount(entity.getFinalAmount());
|
||||
orderContinueInfoEntity.setContinueMsg(entity.getRemark());
|
||||
orderContinueInfoEntity.setReviewedRequired("1");
|
||||
orderContinueInfoEntity.setReviewedState("0");
|
||||
orderContinueInfoEntity.setImages(vo.getImages());
|
||||
playOrderContinueInfoService.create(orderContinueInfoEntity);
|
||||
return R.ok("下单成功");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 店员查询随机单列表
|
||||
*
|
||||
* @param vo 随机单列表查询对象
|
||||
* @return 订单列表
|
||||
*/
|
||||
@ClerkUserLogin
|
||||
@PostMapping("/clerk/selectRandomOrderByPage")
|
||||
public R selectUnacceptedOrderByPage(@Validated @RequestBody PlayOrderInfoRandomQueryVo vo) {
|
||||
return R.ok(playOrderRandomInfoService.selectByPage(vo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 店员查询随机单详情
|
||||
*
|
||||
* @param vo 随机单列表查询对象
|
||||
* @return 订单列表
|
||||
*/
|
||||
@ClerkUserLogin
|
||||
@GetMapping("/clerk/selectRandomOrderById")
|
||||
public R selectUnacceptedOrderByPage(@RequestParam("id") String id) {
|
||||
PlayClerkRandomOrderDetailReturnVo vo = playOrderRandomInfoService.clerkSelectOrderDetails(id,ThreadLocalRequestDetail.getClerkUserInfo().getId());
|
||||
if (vo == null) {
|
||||
throw new CustomException("订单不存在");
|
||||
}
|
||||
return R.ok(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 店员查询打赏动态
|
||||
*
|
||||
* @param vo 打赏动态查询列表
|
||||
* @return 打赏动态列表
|
||||
*/
|
||||
|
||||
@PostMapping("/clerk/selectRewardByPage")
|
||||
public R clerkSelectRewardByPage(@Validated @RequestBody PlayRewardOrderQueryVo vo) {
|
||||
return R.ok(playOrderInfoService.selectRewardByPage(vo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 顾客查询最新打赏动态
|
||||
*
|
||||
* @param vo 打赏动态查询列表
|
||||
* @return 打赏动态列表
|
||||
*/
|
||||
|
||||
@GetMapping("/custom/selectRewardByPage")
|
||||
public R customSelectReward() {
|
||||
PlayRewardOrderQueryVo vo = new PlayRewardOrderQueryVo();
|
||||
return R.ok(playOrderInfoService.selectRewardByPage(vo));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 顾客-分页查询续单列表
|
||||
*
|
||||
* @param vo PlayOrderInfoContinueQueryVo
|
||||
* @return 续单历史
|
||||
*/
|
||||
@CustomUserLogin
|
||||
@PostMapping("/custom/continueListByPage")
|
||||
public R continueListByPage(@Validated @RequestBody PlayOrderInfoContinueQueryVo vo) {
|
||||
PlayOrderContinueQueryVo queryVo = new PlayOrderContinueQueryVo();
|
||||
BeanUtils.copyProperties(vo, queryVo);
|
||||
queryVo.setCustomId(ThreadLocalRequestDetail.getCustomUserInfo().getId());
|
||||
IPage<PlayOrderContinueReturnVo> page = playOrderContinueInfoService.selectPlayByPage(queryVo);
|
||||
return R.ok(page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 审批续单申申请
|
||||
*/
|
||||
@CustomUserLogin
|
||||
@PostMapping("/custom/updateReviewState")
|
||||
public R updateReviewState(@Validated @RequestBody PlayOrderReviewStateEditVo vo) {
|
||||
PlayOrderContinueInfoEntity entity = playOrderContinueInfoService.selectPlayOrderContinueInfoById(vo.getId());
|
||||
if (!"0".equals(entity.getReviewedState())) {
|
||||
throw new CustomException("续单已处理");
|
||||
}
|
||||
playOrderContinueInfoService.updateReviewState(vo);
|
||||
return R.ok("成功");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.starry.admin.modules.weichat.controller;
|
||||
|
||||
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.starry.common.utils.IdUtils;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.github.binarywang.wxpay.bean.notify.WxPayNotifyResponse;
|
||||
@@ -17,6 +17,7 @@ import com.starry.admin.modules.custom.module.entity.PlayCustomUserInfoEntity;
|
||||
import com.starry.admin.modules.custom.service.IPlayCustomUserInfoService;
|
||||
import com.starry.admin.modules.order.module.entity.PlayOrderInfoEntity;
|
||||
import com.starry.admin.modules.order.service.IPlayOrderInfoService;
|
||||
import com.starry.admin.modules.order.service.impl.PlayOrderInfoServiceImpl;
|
||||
import com.starry.admin.modules.platform.entity.SysTenantEntity;
|
||||
import com.starry.admin.modules.platform.service.impl.SysTenantServiceImpl;
|
||||
import com.starry.admin.modules.weichat.service.WxCustomMpService;
|
||||
@@ -50,6 +51,9 @@ public class WxPlayController {
|
||||
@Resource
|
||||
private WxCustomMpService mpService;
|
||||
|
||||
@Resource
|
||||
PlayOrderInfoServiceImpl playOrderInfoService;
|
||||
|
||||
|
||||
/**
|
||||
* 微信支付-微信回调地址(https://pay.weixin.qq.com/wiki/doc/api/wxa/wxa_api.php?chapter=9_7&index=8)
|
||||
@@ -137,8 +141,8 @@ public class WxPlayController {
|
||||
// 订单总金额,单位为分
|
||||
long totalFee = getTotalFee(money);
|
||||
// 创建订单信息
|
||||
String orderId = IdUtil.fastSimpleUUID();
|
||||
orderInfoService.createRechargeOrder(orderId, new BigDecimal(totalFee * 1.0 / 100), new BigDecimal(totalFee * 1.0 / 100), customUserInfo.getId());
|
||||
String orderNo = playOrderInfoService.getOrderNo();
|
||||
orderInfoService.createRechargeOrder(orderNo, new BigDecimal(totalFee * 1.0 / 100), new BigDecimal(totalFee * 1.0 / 100), customUserInfo.getId());
|
||||
String body = "树洞充值";
|
||||
|
||||
WxPayService wxPayService = mpService.getWxPay();
|
||||
@@ -146,7 +150,7 @@ public class WxPlayController {
|
||||
request.setOpenid(customUserInfo.getOpenid());
|
||||
// 订单总金额,单位为分(开发阶段固定设置为支付1分钱)
|
||||
request.setTotalFee(1);
|
||||
request.setOutTradeNo(orderId);
|
||||
request.setOutTradeNo(orderNo);
|
||||
request.setTradeType("JSAPI");
|
||||
request.setSpbillCreateIp("101.43.206.16");
|
||||
request.setNotifyUrl(wxPayService.getConfig().getNotifyUrl());
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.starry.admin.modules.weichat.controller;
|
||||
|
||||
import com.starry.admin.common.aspect.ClerkUserLogin;
|
||||
import com.starry.admin.common.conf.ThreadLocalRequestDetail;
|
||||
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.PlayOrderRankingReturnVo;
|
||||
import com.starry.common.result.R;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
* @since 2024/5/25 下午10:25
|
||||
**/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/wx/orderRanking")
|
||||
public class WxPlayOrderRankingController {
|
||||
|
||||
|
||||
@Resource
|
||||
private IPlayClerkRankingInfoService playClerkRankingInfoService;
|
||||
|
||||
|
||||
/**
|
||||
* 查询当前排行
|
||||
*/
|
||||
@ClerkUserLogin
|
||||
@GetMapping("/clerk/selectCurrentRanking")
|
||||
public R selectCurrentRanking() {
|
||||
PlayOrderRankingReturnVo result = playClerkRankingInfoService.selectCurrentRanking(ThreadLocalRequestDetail.getClerkUserInfo().getId());
|
||||
return R.ok(result);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询历史排行
|
||||
*/
|
||||
@ClerkUserLogin
|
||||
@GetMapping("/clerk/selectHistoryRanking")
|
||||
public R selectHistoryRanking() {
|
||||
List<PlayOrderHistoryRankingReturnVo> result = playClerkRankingInfoService.selectHistoryRanking(ThreadLocalRequestDetail.getClerkUserInfo().getId());
|
||||
return R.ok(result);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.starry.admin.modules.weichat.entity;
|
||||
|
||||
|
||||
import com.starry.common.domain.BasePageEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 顾客查询已关注陪聊接口
|
||||
*
|
||||
* @author admin
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class PlayClerkFollowQueryVo extends BasePageEntity {
|
||||
|
||||
private String customId;
|
||||
|
||||
/**
|
||||
* 关注状态[0:未关注,1:已关注]
|
||||
*/
|
||||
private String followState = "1";
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package com.starry.admin.modules.weichat.entity;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 顾客查询已关注陪聊接口
|
||||
*
|
||||
* @author admin
|
||||
*/
|
||||
@Data
|
||||
public class PlayClerkFollowReturnVo {
|
||||
|
||||
private String id;
|
||||
/**
|
||||
* 顾客ID
|
||||
*
|
||||
* @since 2024/5/10 10:39
|
||||
**/
|
||||
private String customId;
|
||||
/**
|
||||
* 店员ID
|
||||
*/
|
||||
private String clerkId;
|
||||
|
||||
/**
|
||||
* 店员昵称
|
||||
*/
|
||||
private String nickname;
|
||||
|
||||
/**
|
||||
* 店员头像
|
||||
*/
|
||||
private String avatar;
|
||||
|
||||
/**
|
||||
* 关注状态[0:未关注,1:已关注]
|
||||
*/
|
||||
private String followState;
|
||||
|
||||
/**
|
||||
* 在线状态【1:在线,0:离线】
|
||||
*/
|
||||
private String onlineState;
|
||||
|
||||
/**
|
||||
* 最低消费
|
||||
*/
|
||||
private String latestConsumption = "最低1船票";
|
||||
|
||||
/**
|
||||
* 个性签名
|
||||
*/
|
||||
private String signature;
|
||||
|
||||
/**
|
||||
* 性别[0:未知;1:男;2:女]
|
||||
*/
|
||||
private String sex;
|
||||
|
||||
/**
|
||||
* 年龄
|
||||
*/
|
||||
private Integer age;
|
||||
|
||||
/**
|
||||
* 关注人数
|
||||
*
|
||||
* @since 2024/5/10 10:42
|
||||
**/
|
||||
private Integer followNumber;
|
||||
|
||||
|
||||
}
|
||||
@@ -106,7 +106,7 @@ public class PlayClerkUserLoginResponseVo {
|
||||
private String alipayImage;
|
||||
|
||||
/**
|
||||
* 是否必须实名【1:必须实名,0:非必须实名】
|
||||
* 是否必须实名【0:非必须实名;1:必须实名;2:跟随店铺设置】
|
||||
*/
|
||||
private String mandatoryRealState;
|
||||
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.starry.admin.modules.weichat.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 服务项目返回对象
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024/5/29 16:41
|
||||
**/
|
||||
@Data
|
||||
public class PlayCommodityReturnVo {
|
||||
|
||||
private String id;
|
||||
/**
|
||||
* 项目类型
|
||||
*/
|
||||
private String itemType;
|
||||
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
private String itemName;
|
||||
|
||||
/**
|
||||
* 服务时长(文字描述信息,不参与订单计算)
|
||||
*/
|
||||
private String serviceDuration;
|
||||
|
||||
|
||||
/**
|
||||
* 服务单价
|
||||
*/
|
||||
private BigDecimal price;
|
||||
|
||||
|
||||
List<PlayCommodityReturnVo> child;
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.starry.admin.modules.weichat.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
* @since 2024/5/10 下午5:15
|
||||
**/
|
||||
@Data
|
||||
public class PlayOrderCancellationVo {
|
||||
|
||||
|
||||
/**
|
||||
* 申请人ID
|
||||
*/
|
||||
private String customId;
|
||||
/**
|
||||
* 订单ID
|
||||
*/
|
||||
@NotBlank(message = "订单ID不能为空")
|
||||
private String orderId;
|
||||
|
||||
|
||||
/**
|
||||
* 取消原因
|
||||
*/
|
||||
@NotBlank(message = "取消原因不能为空")
|
||||
private String refundReason;
|
||||
|
||||
private List<String> images = new ArrayList<>();
|
||||
}
|
||||
@@ -12,7 +12,7 @@ import lombok.EqualsAndHashCode;
|
||||
**/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class PlayClerkUserQueryVo extends BasePageEntity {
|
||||
public class WxPlayClerkUserQueryVo extends BasePageEntity {
|
||||
|
||||
/**
|
||||
* 分类
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.starry.admin.modules.weichat.entity.article;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Pattern;
|
||||
import javax.validation.constraints.Size;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 店员新增动态
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024/5/20 下午11:24
|
||||
**/
|
||||
@Data
|
||||
public class PlayClerkAddArticleVo {
|
||||
|
||||
/**
|
||||
* 陪聊用户ID
|
||||
*/
|
||||
private String clerkId;
|
||||
|
||||
/**
|
||||
* 动态内容
|
||||
*/
|
||||
@NotBlank(message = "动态内容不能为空")
|
||||
private String articleCon;
|
||||
|
||||
|
||||
/**
|
||||
* 动态附件类型(0:图片;1:视频;3:录音)
|
||||
*/
|
||||
@NotBlank(message = "动态附件类型不能为空")
|
||||
@Pattern(regexp = "[012]", message = "动态附件类型只能位0或1")
|
||||
private String annexType;
|
||||
|
||||
/**
|
||||
* 动态附件内容
|
||||
*/
|
||||
@NotNull(message = "动态附件不能为空")
|
||||
@Size(min = 1, message = "附件数量必须大于0")
|
||||
@Size(max = 6, message = "附件数量必须小于6")
|
||||
private List<String> annexCon;
|
||||
|
||||
|
||||
/**
|
||||
* 发布时间
|
||||
*/
|
||||
private LocalDateTime releaseTime = LocalDateTime.now();
|
||||
|
||||
/**
|
||||
* 审核状态(0:未审核:1:审核通过,2:审核不通过)
|
||||
*/
|
||||
private String reviewState = "0";
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.starry.admin.modules.weichat.entity.article;
|
||||
|
||||
import com.starry.common.domain.BasePageEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
* 顾客查询动态信息查询返回对象
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class PlayClerkArticleCustomQueryVo extends BasePageEntity {
|
||||
|
||||
|
||||
/**
|
||||
* 收藏状态(0:未收藏,1:已收藏)
|
||||
*/
|
||||
private String followState;
|
||||
|
||||
/**
|
||||
* 店员ID
|
||||
*/
|
||||
private String clerkId;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
package com.starry.admin.modules.weichat.entity.article;
|
||||
|
||||
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 PlayClerkArticleCustomReturnVo {
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
private String id;
|
||||
/**
|
||||
* 陪聊用户ID
|
||||
*/
|
||||
private String clerkId;
|
||||
|
||||
/**
|
||||
* 陪聊用户昵称
|
||||
*/
|
||||
private String clerkNickname;
|
||||
|
||||
/**
|
||||
* 陪聊用户头像
|
||||
*/
|
||||
private String clerkAvatar;
|
||||
|
||||
/**
|
||||
* 陪聊用户性别
|
||||
*/
|
||||
private String clerkSex;
|
||||
|
||||
/**
|
||||
* 动态内容
|
||||
*/
|
||||
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 Integer agreedQuantity = 0;
|
||||
|
||||
/**
|
||||
* 点赞状态(0:未关注,1:已关注)
|
||||
*/
|
||||
private String greedState = "0";
|
||||
|
||||
/**
|
||||
* 收藏状态(0:未收藏,1:已收藏)
|
||||
*/
|
||||
private String followState = "0";
|
||||
|
||||
/**
|
||||
* 陪聊点赞动态
|
||||
*/
|
||||
@JsonIgnore
|
||||
private List<PlayCustomArticleInfoEntity> articleInfoEntities;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.starry.admin.modules.weichat.entity.article;
|
||||
|
||||
import com.starry.common.domain.BasePageEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Pattern;
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
* 顾客收藏动态状态修改
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class PlayClerkArticleFollowCustomFollowStateEditStateVo extends BasePageEntity {
|
||||
|
||||
|
||||
@NotBlank(message = "id不能为空")
|
||||
|
||||
private String id;
|
||||
/**
|
||||
* 收藏状态(0:未收藏,1:已收藏)
|
||||
*/
|
||||
@NotBlank(message = "followState不能为空")
|
||||
@Pattern(regexp = "[01]", message = "followState值必须为0或者1")
|
||||
private String followState;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.starry.admin.modules.weichat.entity.article;
|
||||
|
||||
import com.starry.common.domain.BasePageEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Pattern;
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
* 顾客点赞动态查询状态修改
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class PlayClerkArticleFollowCustomGreedStateEditStateVo extends BasePageEntity {
|
||||
|
||||
|
||||
@NotBlank(message = "不能为空")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 点赞状态(0:未点赞,1:已关注)
|
||||
*/
|
||||
@NotBlank(message = "greedState不能为空")
|
||||
@Pattern(regexp = "[01]", message = "greedState值必须为0或者1")
|
||||
private String greedState;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.starry.admin.modules.weichat.entity.clerk;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* 性别[0:未知;1:男;2:女]
|
||||
*/
|
||||
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,136 @@
|
||||
package com.starry.admin.modules.weichat.entity.clerk;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
*/
|
||||
@Data
|
||||
public class PlayClerkUserInfoResultVo {
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 店员昵称
|
||||
*/
|
||||
private String nickname;
|
||||
|
||||
/**
|
||||
* 店员等级
|
||||
*/
|
||||
private String levelId;
|
||||
|
||||
/**
|
||||
* 店员等级
|
||||
*/
|
||||
private String levelName;
|
||||
|
||||
|
||||
/**
|
||||
* 性别[0:未知;1:男;2:女]
|
||||
*/
|
||||
private String sex;
|
||||
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
private String avatar;
|
||||
|
||||
/**
|
||||
* 音频
|
||||
*/
|
||||
private String audio;
|
||||
|
||||
|
||||
/**
|
||||
* 星座
|
||||
*/
|
||||
private String constellation;
|
||||
|
||||
/**
|
||||
* 标签
|
||||
*/
|
||||
private List<String> label = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* 相册
|
||||
*/
|
||||
private List<String> album = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* 个性签名
|
||||
*/
|
||||
private String signature;
|
||||
|
||||
/**
|
||||
* 年龄
|
||||
*/
|
||||
private Integer age;
|
||||
|
||||
/**
|
||||
* 所在省份
|
||||
*/
|
||||
private String province;
|
||||
|
||||
/**
|
||||
* 所在城市
|
||||
*/
|
||||
private String city;
|
||||
|
||||
|
||||
/**
|
||||
* 关注(0:未关注,1:已关注)
|
||||
*/
|
||||
private String followState = "0";
|
||||
|
||||
/**
|
||||
* 在线状态【1:在线,0:离线】
|
||||
*/
|
||||
private String onlineState;
|
||||
|
||||
/**
|
||||
* 上架状态【1:上架,0:下架】
|
||||
*/
|
||||
private String listingState;
|
||||
|
||||
|
||||
/**
|
||||
* 实名状态【1:已实名,0:未实名】
|
||||
*/
|
||||
private String realState;
|
||||
|
||||
/**
|
||||
* 是否必须实名【1:必须实名,0:非必须实名,2:跟随店铺设置】
|
||||
*/
|
||||
private String mandatoryRealState;
|
||||
|
||||
/**
|
||||
* 随机接单状态【1:允许,0:禁止】
|
||||
*/
|
||||
private String randomOrderState;
|
||||
|
||||
|
||||
/**
|
||||
* 服务项目
|
||||
*/
|
||||
private List<String> commodity;
|
||||
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
private String address;
|
||||
|
||||
|
||||
/**
|
||||
* 最低消费
|
||||
*/
|
||||
private String latestConsumption = "最低1船票";
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.starry.admin.modules.weichat.entity.costom;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Pattern;
|
||||
|
||||
/**
|
||||
* 顾客状态修改
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024/5/21 下午10:38
|
||||
**/
|
||||
@Data
|
||||
public class PlayCustomHideLevelStateEditVo {
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 隐藏等级[0:不隐藏;1:隐藏]
|
||||
*/
|
||||
@NotNull(message = "hideLevelState不能为空")
|
||||
@Pattern(regexp = "[01]", message = "hideLevelState状态异常")
|
||||
private String hideLevelState;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.starry.admin.modules.weichat.entity.costom;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Pattern;
|
||||
|
||||
/**
|
||||
* 顾客状态修改
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024/5/21 下午10:38
|
||||
**/
|
||||
@Data
|
||||
public class PlayCustomHideRankingStateEditVo {
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 隐藏排名[0:不隐藏;1:隐藏]
|
||||
*/
|
||||
@NotNull(message = "hideRankingState不能为空")
|
||||
@Pattern(regexp = "[01]", message = "hideRankingState状态异常")
|
||||
private String hideRankingState;
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.starry.admin.modules.weichat.entity.evaluate;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 订单评价对象查询返回对象
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024/5/13 16:15
|
||||
**/
|
||||
@Data
|
||||
public class PlayCustomOrderEvaluateReturnVo {
|
||||
|
||||
private String id;
|
||||
|
||||
|
||||
/**
|
||||
* 匿名评价(0:匿名,1:非匿名)
|
||||
*/
|
||||
private String anonymous;
|
||||
|
||||
|
||||
/**
|
||||
* 评价等级【1-5星,最低1星,最高5星】
|
||||
*/
|
||||
private Integer evaluateLevel;
|
||||
|
||||
/**
|
||||
* 评价内容
|
||||
*/
|
||||
private String evaluateCon;
|
||||
|
||||
/**
|
||||
* 评价时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date evaluateTime;
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.starry.admin.modules.weichat.entity.gift;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 店员礼物查询对象
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024/5/26 上午12:20
|
||||
**/
|
||||
@Data
|
||||
public class PlayClerkGiftReturnVo {
|
||||
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 礼物名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 礼物类型(0:盲盒,1:普通礼物)
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 礼物图片地址
|
||||
*/
|
||||
private String url;
|
||||
|
||||
/**
|
||||
* 单价
|
||||
*/
|
||||
private BigDecimal price;
|
||||
|
||||
/**
|
||||
* 价格单位
|
||||
*/
|
||||
private String unit;
|
||||
|
||||
|
||||
/**
|
||||
* 礼物数量
|
||||
*/
|
||||
private long giffNumber;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.starry.admin.modules.weichat.entity.level;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
* @since 2024/5/29 上午6:29
|
||||
**/
|
||||
@Data
|
||||
public class PlayClerkLevelReturnVo {
|
||||
|
||||
private String id;
|
||||
|
||||
private String levelName;
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.starry.admin.modules.weichat.entity.order;
|
||||
|
||||
import com.starry.common.domain.BasePageEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 店员分行查询订单-查询对象
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-03-20
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class PlayClearOrderInfoQueryVo extends BasePageEntity {
|
||||
|
||||
|
||||
private String id;
|
||||
/**
|
||||
* 订单状态【0:1:2:3:4】
|
||||
* 0:已下单
|
||||
* 1:已接单
|
||||
* 2:已开始
|
||||
* 3:已完成
|
||||
* 4:已取消
|
||||
*/
|
||||
private String orderStatus;
|
||||
|
||||
/**
|
||||
* 订单类型【0:充值订单;1:提现订单;2:普通订单】
|
||||
*/
|
||||
private String orderType = "2";
|
||||
|
||||
/**
|
||||
* 下单类型(0:指定单,1:随机单。2:打赏单)
|
||||
*/
|
||||
private String placeType;
|
||||
|
||||
/**
|
||||
* 下单人
|
||||
*/
|
||||
private String purchaserBy;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,198 @@
|
||||
package com.starry.admin.modules.weichat.entity.order;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 店员订单详情返回信息
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024/5/12 下午9:16
|
||||
**/
|
||||
@Data
|
||||
public class PlayClerkOrderDetailsReturnVo {
|
||||
|
||||
/**
|
||||
* 订单ID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
private String orderNo;
|
||||
|
||||
/**
|
||||
* 订单状态【0:1:2:3:4】
|
||||
* 0:已下单(待接单)
|
||||
* 1:已接单(待开始)
|
||||
* 2:已开始(服务中)
|
||||
* 3:已完成
|
||||
* 4:已取消
|
||||
*/
|
||||
private String orderStatus;
|
||||
|
||||
/**
|
||||
* 下单类型(0:指定单,1:随机单。2:打赏单)
|
||||
*/
|
||||
private String placeType;
|
||||
|
||||
/**
|
||||
* 商品数量
|
||||
*/
|
||||
private int commodityNumber;
|
||||
|
||||
|
||||
/**
|
||||
* 支付方式,0:余额支付,1:微信支付,2:支付宝支付
|
||||
*/
|
||||
private String payMethod;
|
||||
|
||||
/**
|
||||
* 订单备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 买家微信号码
|
||||
*/
|
||||
private String weiChatCode;
|
||||
|
||||
|
||||
/**
|
||||
* 订单金额
|
||||
*/
|
||||
private BigDecimal orderMoney;
|
||||
|
||||
/**
|
||||
* 下单时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date purchaserTime;
|
||||
|
||||
/**
|
||||
* 接单时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date acceptTime;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date startTime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date endTime;
|
||||
|
||||
/**
|
||||
* 取消时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date cancelTime;
|
||||
|
||||
/**
|
||||
* 退款人类型[0:顾客;1:店员;2:管理员]
|
||||
*/
|
||||
private String refundByType;
|
||||
|
||||
/**
|
||||
* 退款人ID
|
||||
*/
|
||||
private String refundById;
|
||||
|
||||
/**
|
||||
* 退款原因
|
||||
**/
|
||||
private String refundReason;
|
||||
|
||||
/**
|
||||
* 订单最终金额(支付金额)
|
||||
*/
|
||||
private BigDecimal finalAmount;
|
||||
|
||||
/**
|
||||
* 预计收入
|
||||
*/
|
||||
private BigDecimal estimatedRevenue;
|
||||
|
||||
/**
|
||||
* 优惠金额
|
||||
*/
|
||||
private BigDecimal discountAmount;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
private String customId;
|
||||
|
||||
/**
|
||||
* 用户昵称
|
||||
*/
|
||||
private String customNickname;
|
||||
|
||||
/**
|
||||
* 用户头像
|
||||
*/
|
||||
private String customAvatar;
|
||||
|
||||
/**
|
||||
* 用户等级ID
|
||||
*/
|
||||
private String customLevelId;
|
||||
|
||||
/**
|
||||
* 用户等级名称
|
||||
*/
|
||||
private String customLevelName;
|
||||
|
||||
|
||||
/**
|
||||
* 店员ID
|
||||
*/
|
||||
private String clerkId;
|
||||
|
||||
/**
|
||||
* 店员昵称
|
||||
*/
|
||||
private String clerkNickname;
|
||||
|
||||
/**
|
||||
* 店员头像
|
||||
*/
|
||||
private String clerkAvatar;
|
||||
|
||||
/**
|
||||
* 商品ID
|
||||
*/
|
||||
private String commodityId;
|
||||
|
||||
/**
|
||||
* 商品类型[0:礼物,1:服务]
|
||||
*/
|
||||
private String commodityType;
|
||||
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
private String commodityName;
|
||||
/**
|
||||
* 商品单价
|
||||
*/
|
||||
private BigDecimal commodityPrice;
|
||||
|
||||
/**
|
||||
* 服务时长
|
||||
*
|
||||
* @since 2024/5/8 16:44
|
||||
**/
|
||||
private String serviceDuration;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.starry.admin.modules.weichat.entity.order;
|
||||
|
||||
import com.starry.common.domain.BasePageEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 订单查询对象
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-03-20
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class PlayClerkOrderInfoQueryVo extends BasePageEntity {
|
||||
|
||||
|
||||
private String id;
|
||||
/**
|
||||
* 订单状态【0:1:2:3:4】
|
||||
* 0:已下单
|
||||
* 1:已接单
|
||||
* 2:已开始
|
||||
* 3:已完成
|
||||
* 4:已取消
|
||||
*/
|
||||
private String orderStatus;
|
||||
|
||||
/**
|
||||
* 订单类型【0:充值订单;1:提现订单;2:普通订单】
|
||||
*/
|
||||
private String orderType = "2";
|
||||
|
||||
/**
|
||||
* 下单类型(0:指定单,1:随机单。2:打赏单)
|
||||
*/
|
||||
private String placeType;
|
||||
|
||||
/**
|
||||
* 下单人
|
||||
*/
|
||||
private String acceptBy;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
package com.starry.admin.modules.weichat.entity.order;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 店员查询订单列表返回对象
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-03-20
|
||||
*/
|
||||
@Data
|
||||
public class PlayClerkOrderListReturnVo {
|
||||
|
||||
|
||||
/**
|
||||
* 订单ID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
private String orderNo;
|
||||
|
||||
/**
|
||||
* 订单状态【0:1:2:3:4】
|
||||
* 0:已下单(待接单)
|
||||
* 1:已接单(待开始)
|
||||
* 2:已开始(服务中)
|
||||
* 3:已完成
|
||||
* 4:已取消
|
||||
*/
|
||||
private String orderStatus;
|
||||
|
||||
/**
|
||||
* 下单类型(0:指定单,1:随机单。2:打赏单)
|
||||
*/
|
||||
private String placeType;
|
||||
|
||||
/**
|
||||
* 是否是首单【0:不是,1:是】
|
||||
*/
|
||||
private String firstOrder;
|
||||
|
||||
|
||||
/**
|
||||
* 商品数量
|
||||
*/
|
||||
private int commodityNumber;
|
||||
|
||||
|
||||
/**
|
||||
* 订单备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 下单时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date purchaserTime;
|
||||
|
||||
|
||||
/**
|
||||
* 订单最终金额(支付金额)
|
||||
*/
|
||||
private BigDecimal finalAmount;
|
||||
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
private String customId;
|
||||
|
||||
/**
|
||||
* 用户昵称
|
||||
*/
|
||||
private String customNickname;
|
||||
|
||||
/**
|
||||
* 用户头像
|
||||
*/
|
||||
private String customAvatar;
|
||||
|
||||
/**
|
||||
* 用户等级ID
|
||||
*/
|
||||
private String customLevelId;
|
||||
|
||||
/**
|
||||
* 用户等级名称
|
||||
*/
|
||||
private String customLevelName;
|
||||
|
||||
/**
|
||||
* 店员ID
|
||||
*/
|
||||
private String clerkId;
|
||||
|
||||
/**
|
||||
* 店员昵称
|
||||
*/
|
||||
private String clerkNickname;
|
||||
|
||||
/**
|
||||
* 店员头像
|
||||
*/
|
||||
private String clerkAvatar;
|
||||
|
||||
/**
|
||||
* 商品ID
|
||||
*/
|
||||
private String commodityId;
|
||||
|
||||
/**
|
||||
* 商品类型[0:礼物,1:服务]
|
||||
*/
|
||||
private String commodityType;
|
||||
|
||||
/**
|
||||
* 商品类型[0:礼物,1:服务]
|
||||
*/
|
||||
private String commodityName;
|
||||
/**
|
||||
* 商品单价
|
||||
*/
|
||||
private BigDecimal commodityPrice;
|
||||
|
||||
/**
|
||||
* 服务时长
|
||||
*
|
||||
* @since 2024/5/8 16:44
|
||||
**/
|
||||
private String serviceDuration;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
package com.starry.admin.modules.weichat.entity.order;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 随机单详情返回接口
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024/5/30 10:00
|
||||
**/
|
||||
@Data
|
||||
public class PlayClerkRandomOrderDetailReturnVo {
|
||||
|
||||
/**
|
||||
* 订单ID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
private String orderNo;
|
||||
|
||||
/**
|
||||
* 订单状态【0:1:2:3:4】
|
||||
* 0:已下单(待接单)
|
||||
* 1:已接单(待开始)
|
||||
* 2:已开始(服务中)
|
||||
* 3:已完成
|
||||
* 4:已取消
|
||||
*/
|
||||
private final String orderStatus = "0";
|
||||
|
||||
/**
|
||||
* 下单类型(0:指定单,1:随机单。2:打赏单)
|
||||
*/
|
||||
private final String placeType = "1";
|
||||
|
||||
/**
|
||||
* 商品数量
|
||||
*/
|
||||
private int commodityNumber;
|
||||
|
||||
|
||||
/**
|
||||
* 支付方式,0:余额支付,1:微信支付,2:支付宝支付
|
||||
*/
|
||||
private String payMethod;
|
||||
|
||||
/**
|
||||
* 订单备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 买家微信号码
|
||||
*/
|
||||
private String weiChatCode;
|
||||
|
||||
|
||||
/**
|
||||
* 卖家要求
|
||||
*
|
||||
* @since 2024/5/30 10:02
|
||||
**/
|
||||
private List<String> labels;
|
||||
|
||||
|
||||
/**
|
||||
* 订单金额
|
||||
*/
|
||||
private BigDecimal orderMoney;
|
||||
|
||||
/**
|
||||
* 下单时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date purchaserTime;
|
||||
|
||||
/**
|
||||
* 订单最终金额(支付金额)
|
||||
*/
|
||||
private BigDecimal finalAmount;
|
||||
|
||||
/**
|
||||
* 预计收入
|
||||
*/
|
||||
private BigDecimal estimatedRevenue;
|
||||
|
||||
/**
|
||||
* 优惠金额
|
||||
*/
|
||||
private BigDecimal discountAmount;
|
||||
|
||||
/**
|
||||
* 商品ID
|
||||
*/
|
||||
private String commodityId;
|
||||
|
||||
/**
|
||||
* 商品类型[0:礼物,1:服务]
|
||||
*/
|
||||
private String commodityType;
|
||||
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
private String commodityName;
|
||||
/**
|
||||
* 商品单价
|
||||
*/
|
||||
private BigDecimal commodityPrice;
|
||||
|
||||
/**
|
||||
* 服务时长
|
||||
*
|
||||
* @since 2024/5/8 16:44
|
||||
**/
|
||||
private String serviceDuration;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,194 @@
|
||||
package com.starry.admin.modules.weichat.entity.order;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 顾客查询订单详情返回对象
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-03-20
|
||||
*/
|
||||
@Data
|
||||
public class PlayCustomOrderDetailsReturnVo {
|
||||
|
||||
|
||||
/**
|
||||
* 订单ID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
private String orderNo;
|
||||
|
||||
/**
|
||||
* 订单状态【0:1:2:3:4】
|
||||
* 0:已下单(待接单)
|
||||
* 1:已接单(待开始)
|
||||
* 2:已开始(服务中)
|
||||
* 3:已完成
|
||||
* 4:已取消
|
||||
*/
|
||||
private String orderStatus;
|
||||
|
||||
/**
|
||||
* 下单类型(0:指定单,1:随机单。2:打赏单)
|
||||
*/
|
||||
private String placeType;
|
||||
|
||||
/**
|
||||
* 商品数量
|
||||
*/
|
||||
private int commodityNumber;
|
||||
|
||||
|
||||
/**
|
||||
* 支付方式,0:余额支付,1:微信支付,2:支付宝支付
|
||||
*/
|
||||
private String payMethod;
|
||||
|
||||
/**
|
||||
* 订单备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
/**
|
||||
* 订单金额
|
||||
*/
|
||||
private BigDecimal orderMoney;
|
||||
|
||||
/**
|
||||
* 下单时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date purchaserTime;
|
||||
|
||||
/**
|
||||
* 接单时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date acceptTime;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date startTime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date endTime;
|
||||
|
||||
/**
|
||||
* 取消时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date cancelTime;
|
||||
|
||||
/**
|
||||
* 退款人类型[0:顾客;1:店员;2:管理员]
|
||||
*/
|
||||
private String refundByType;
|
||||
|
||||
/**
|
||||
* 退款人ID
|
||||
*/
|
||||
private String refundById;
|
||||
|
||||
/**
|
||||
* 退款原因
|
||||
**/
|
||||
private String refundReason;
|
||||
|
||||
/**
|
||||
* 是否评价(1:已评价;0:未评价)
|
||||
*/
|
||||
private String evaluate;
|
||||
|
||||
|
||||
/**
|
||||
* 订单最终金额(支付金额)
|
||||
*/
|
||||
private BigDecimal finalAmount;
|
||||
|
||||
|
||||
/**
|
||||
* 优惠金额
|
||||
*/
|
||||
private BigDecimal discountAmount;
|
||||
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
private String customId;
|
||||
|
||||
/**
|
||||
* 用户昵称
|
||||
*/
|
||||
private String customNickname;
|
||||
|
||||
/**
|
||||
* 用户头像
|
||||
*/
|
||||
private String customAvatar;
|
||||
|
||||
/**
|
||||
* 店员ID
|
||||
*/
|
||||
private String clerkId;
|
||||
|
||||
/**
|
||||
* 店员昵称
|
||||
*/
|
||||
private String clerkNickname;
|
||||
|
||||
/**
|
||||
* 店员头像
|
||||
*/
|
||||
private String clerkAvatar;
|
||||
|
||||
/**
|
||||
* 商品ID
|
||||
*/
|
||||
private String commodityId;
|
||||
|
||||
/**
|
||||
* 商品类型[0:礼物,1:服务]
|
||||
*/
|
||||
private String commodityType;
|
||||
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
private String commodityName;
|
||||
/**
|
||||
* 商品单价
|
||||
*/
|
||||
private BigDecimal commodityPrice;
|
||||
|
||||
/**
|
||||
* 服务时长
|
||||
*
|
||||
* @since 2024/5/8 16:44
|
||||
**/
|
||||
private String serviceDuration;
|
||||
|
||||
|
||||
/**
|
||||
* 微信号码
|
||||
*
|
||||
* @since 2024/5/13 11:29
|
||||
**/
|
||||
private String weiChatCode;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.starry.admin.modules.weichat.entity.order;
|
||||
|
||||
import com.starry.common.domain.BasePageEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 订单查询对象
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-03-20
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class PlayCustomOrderInfoQueryVo extends BasePageEntity {
|
||||
|
||||
|
||||
private String id;
|
||||
/**
|
||||
* 订单状态【0:1:2:3:4】
|
||||
* 0:已下单
|
||||
* 1:已接单
|
||||
* 2:已开始
|
||||
* 3:已完成
|
||||
* 4:已取消
|
||||
*/
|
||||
private String orderStatus;
|
||||
|
||||
/**
|
||||
* 订单类型【0:充值订单;1:提现订单;2:普通订单】
|
||||
*/
|
||||
private String orderType = "2";
|
||||
|
||||
/**
|
||||
* 下单类型(0:指定单,1:随机单。2:打赏单)
|
||||
*/
|
||||
private String placeType;
|
||||
|
||||
/**
|
||||
* 下单人
|
||||
*/
|
||||
private String purchaserBy;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,132 @@
|
||||
package com.starry.admin.modules.weichat.entity.order;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 顾客查询订单列表返回对象
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024-03-20
|
||||
*/
|
||||
@Data
|
||||
public class PlayCustomOrderListReturnVo {
|
||||
|
||||
|
||||
/**
|
||||
* 订单ID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
private String orderNo;
|
||||
|
||||
/**
|
||||
* 订单状态【0:1:2:3:4】
|
||||
* 0:已下单(待接单)
|
||||
* 1:已接单(待开始)
|
||||
* 2:已开始(服务中)
|
||||
* 3:已完成
|
||||
* 4:已取消
|
||||
*/
|
||||
private String orderStatus;
|
||||
|
||||
/**
|
||||
* 下单类型(0:指定单,1:随机单。2:打赏单)
|
||||
*/
|
||||
private String placeType;
|
||||
|
||||
/**
|
||||
* 商品数量
|
||||
*/
|
||||
private int commodityNumber;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 订单备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
/**
|
||||
* 下单时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date purchaserTime;
|
||||
|
||||
/**
|
||||
* 是否评价(1:已评价;0:未评价)
|
||||
*/
|
||||
private String evaluate;
|
||||
|
||||
|
||||
/**
|
||||
* 订单最终金额(支付金额)
|
||||
*/
|
||||
private BigDecimal finalAmount;
|
||||
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
private String customId;
|
||||
|
||||
/**
|
||||
* 用户昵称
|
||||
*/
|
||||
private String customNickname;
|
||||
|
||||
/**
|
||||
* 用户头像
|
||||
*/
|
||||
private String customAvatar;
|
||||
|
||||
/**
|
||||
* 店员ID
|
||||
*/
|
||||
private String clerkId;
|
||||
|
||||
/**
|
||||
* 店员昵称
|
||||
*/
|
||||
private String clerkNickname;
|
||||
|
||||
/**
|
||||
* 店员头像
|
||||
*/
|
||||
private String clerkAvatar;
|
||||
|
||||
/**
|
||||
* 商品ID
|
||||
*/
|
||||
private String commodityId;
|
||||
|
||||
/**
|
||||
* 商品类型[0:礼物,1:服务]
|
||||
*/
|
||||
private String commodityType;
|
||||
|
||||
/**
|
||||
* 商品类型[0:礼物,1:服务]
|
||||
*/
|
||||
private String commodityName;
|
||||
/**
|
||||
* 商品单价
|
||||
*/
|
||||
private BigDecimal commodityPrice;
|
||||
|
||||
/**
|
||||
* 服务时长
|
||||
*
|
||||
* @since 2024/5/8 16:44
|
||||
**/
|
||||
private String serviceDuration;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.starry.admin.modules.weichat.entity.order;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* 订单排行分页查询对象
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024/5/25 下午10:27
|
||||
**/
|
||||
@Data
|
||||
public class PlayOrderHistoryRankingReturnVo {
|
||||
|
||||
|
||||
/**
|
||||
* 开始统计时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate startCountDate;
|
||||
|
||||
/**
|
||||
* 结束统计时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate endCountDate;
|
||||
|
||||
/**
|
||||
* 排序名词
|
||||
*/
|
||||
private Long rankingIndex;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,8 +1,9 @@
|
||||
package com.starry.admin.modules.weichat.entity;
|
||||
package com.starry.admin.modules.weichat.entity.order;
|
||||
|
||||
|
||||
import com.starry.admin.modules.gift.module.constant.GiftConstant;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.Max;
|
||||
import javax.validation.constraints.Min;
|
||||
@@ -38,6 +39,7 @@ public class PlayOrderInfoCommodityAdd {
|
||||
|
||||
|
||||
@NotBlank(message = "微信号不能为空")
|
||||
@Length(max = 255, message = "微信号码长度不超过255个字符")
|
||||
private String weiChatCode;
|
||||
|
||||
/**
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.starry.admin.modules.weichat.entity.order;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 续单申请
|
||||
*
|
||||
* @author admin
|
||||
*/
|
||||
@Data
|
||||
public class PlayOrderInfoContinueAdd {
|
||||
|
||||
/**
|
||||
* orderId
|
||||
*/
|
||||
@NotBlank(message = "orderId不能为空")
|
||||
private String orderId;
|
||||
|
||||
|
||||
/**
|
||||
* 订单备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 图片列表
|
||||
*/
|
||||
@NotNull(message = "images不能为空")
|
||||
@Size(min = 1, max = 6, message = "图片张数必须大于1张且小于6张")
|
||||
private List<String> images;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.starry.admin.modules.weichat.entity.order;
|
||||
|
||||
|
||||
import com.starry.common.domain.BasePageEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 续单申请列表查询
|
||||
*
|
||||
* @author admin
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class PlayOrderInfoContinueQueryVo extends BasePageEntity {
|
||||
|
||||
/**
|
||||
* 顾客ID
|
||||
*/
|
||||
private String customId;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.starry.admin.modules.weichat.entity.order;
|
||||
|
||||
|
||||
import com.starry.common.domain.BasePageEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 待接单大厅
|
||||
*
|
||||
* @author admin
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class PlayOrderInfoRandomQueryVo extends BasePageEntity {
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,130 @@
|
||||
package com.starry.admin.modules.weichat.entity.order;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
* @since 2024/5/30 9:22
|
||||
**/
|
||||
public class PlayOrderInfoRandomReturnVo {
|
||||
|
||||
/**
|
||||
* 订单ID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
private String orderNo;
|
||||
|
||||
/**
|
||||
* 订单状态【0:1:2:3:4】
|
||||
* 0:已下单(待接单)
|
||||
* 1:已接单(待开始)
|
||||
* 2:已开始(服务中)
|
||||
* 3:已完成
|
||||
* 4:已取消
|
||||
*/
|
||||
private final String orderStatus = "0";
|
||||
|
||||
/**
|
||||
* 下单类型(0:指定单,1:随机单。2:打赏单)
|
||||
*/
|
||||
private final String placeType = "1";
|
||||
|
||||
|
||||
/**
|
||||
* 商品数量
|
||||
*/
|
||||
private int commodityNumber;
|
||||
|
||||
|
||||
/**
|
||||
* 订单备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 下单时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date purchaserTime;
|
||||
|
||||
|
||||
/**
|
||||
* 订单最终金额(支付金额)
|
||||
*/
|
||||
private BigDecimal finalAmount;
|
||||
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
private String customId;
|
||||
|
||||
/**
|
||||
* 用户昵称
|
||||
*/
|
||||
private String customNickname;
|
||||
|
||||
/**
|
||||
* 用户头像
|
||||
*/
|
||||
private String customAvatar;
|
||||
|
||||
/**
|
||||
* 用户等级ID
|
||||
*/
|
||||
private String customLevelId;
|
||||
|
||||
/**
|
||||
* 用户等级名称
|
||||
*/
|
||||
private String customLevelName;
|
||||
|
||||
/**
|
||||
* 店员ID
|
||||
*/
|
||||
private String clerkId;
|
||||
|
||||
/**
|
||||
* 店员昵称
|
||||
*/
|
||||
private String clerkNickname;
|
||||
|
||||
/**
|
||||
* 店员头像
|
||||
*/
|
||||
private String clerkAvatar;
|
||||
|
||||
/**
|
||||
* 商品ID
|
||||
*/
|
||||
private String commodityId;
|
||||
|
||||
/**
|
||||
* 商品类型[0:礼物,1:服务]
|
||||
*/
|
||||
private String commodityType;
|
||||
|
||||
/**
|
||||
* 商品类型[0:礼物,1:服务]
|
||||
*/
|
||||
private String commodityName;
|
||||
/**
|
||||
* 商品单价
|
||||
*/
|
||||
private BigDecimal commodityPrice;
|
||||
|
||||
/**
|
||||
* 服务时长
|
||||
*
|
||||
* @since 2024/5/8 16:44
|
||||
**/
|
||||
private String serviceDuration;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.starry.admin.modules.weichat.entity.order;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 订单排行分页查询对象
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024/5/25 下午10:27
|
||||
**/
|
||||
@Data
|
||||
public class PlayOrderRankingListVo {
|
||||
|
||||
|
||||
/**
|
||||
* 店员ID
|
||||
*/
|
||||
private String clerkId;
|
||||
|
||||
/**
|
||||
* 店员昵称
|
||||
*/
|
||||
private String clerkNickname;
|
||||
|
||||
/**
|
||||
* 店员头像
|
||||
*/
|
||||
private String clerkAvatar;
|
||||
|
||||
/**
|
||||
* 店员等级ID
|
||||
*/
|
||||
private String levelId;
|
||||
|
||||
/**
|
||||
* 店员等级名称
|
||||
*/
|
||||
private String levelName;
|
||||
|
||||
/**
|
||||
* 店员性别
|
||||
*/
|
||||
private String clerkSex;
|
||||
|
||||
/**
|
||||
* 排序名词
|
||||
*/
|
||||
private Long rankingIndex;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.starry.admin.modules.weichat.entity.order;
|
||||
|
||||
import com.starry.common.domain.BasePageEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 订单排行分页查询对象
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024/5/25 下午10:27
|
||||
**/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class PlayOrderRankingQueryVo extends BasePageEntity {
|
||||
|
||||
private String clerkId;
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
package com.starry.admin.modules.weichat.entity.order;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 订单排行分页查询对象
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024/5/25 下午10:27
|
||||
**/
|
||||
@Data
|
||||
public class PlayOrderRankingReturnVo {
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 店员ID
|
||||
*/
|
||||
private String clerkId;
|
||||
|
||||
/**
|
||||
* 店员昵称
|
||||
*/
|
||||
private String clerkNickname;
|
||||
|
||||
/**
|
||||
* 店员头像
|
||||
*/
|
||||
private String clerkAvatar;
|
||||
|
||||
/**
|
||||
* 店员等级ID
|
||||
*/
|
||||
private String levelId;
|
||||
|
||||
/**
|
||||
* 店员等级名称
|
||||
*/
|
||||
private String levelName;
|
||||
|
||||
/**
|
||||
* 店员性别
|
||||
*/
|
||||
private String clerkSex;
|
||||
|
||||
/**
|
||||
* 开始统计时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate startCountDate;
|
||||
|
||||
/**
|
||||
* 结束统计时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate endCountDate;
|
||||
|
||||
/**
|
||||
* 是否是当前排名
|
||||
*/
|
||||
private String currentRanking;
|
||||
|
||||
/**
|
||||
* 订单总数
|
||||
*/
|
||||
private String orderNumber;
|
||||
|
||||
/**
|
||||
* 订单金额
|
||||
*/
|
||||
private BigDecimal orderMoney;
|
||||
|
||||
/**
|
||||
* 续单数
|
||||
*/
|
||||
private Long orderContinueNumber;
|
||||
|
||||
/**
|
||||
* 续单金额
|
||||
*/
|
||||
private BigDecimal orderContinueMoney;
|
||||
|
||||
/**
|
||||
* 超时未接单数量
|
||||
*/
|
||||
private Long ordersExpiredNumber;
|
||||
|
||||
/**
|
||||
* 距离前一名相差金额
|
||||
*/
|
||||
private BigDecimal previousMoney;
|
||||
|
||||
/**
|
||||
* 排序列表
|
||||
*/
|
||||
private List<PlayOrderRankingListVo> rankings;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
package com.starry.admin.modules.weichat.entity.order;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
* @since 2024/6/1 下午11:20
|
||||
**/
|
||||
@Data
|
||||
public class PlayRandomOrderInfoReturnVo {
|
||||
|
||||
|
||||
/**
|
||||
* 订单ID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
private String orderNo;
|
||||
|
||||
/**
|
||||
* 订单状态【0:1:2:3:4】
|
||||
* 0:已下单(待接单)
|
||||
* 1:已接单(待开始)
|
||||
* 2:已开始(服务中)
|
||||
* 3:已完成
|
||||
* 4:已取消
|
||||
*/
|
||||
private String orderStatus;
|
||||
|
||||
/**
|
||||
* 下单类型(0:指定单,1:随机单。2:打赏单)
|
||||
*/
|
||||
private String placeType;
|
||||
|
||||
/**
|
||||
* 是否是首单【0:不是,1:是】
|
||||
*/
|
||||
private String firstOrder;
|
||||
|
||||
|
||||
/**
|
||||
* 商品数量
|
||||
*/
|
||||
private int commodityNumber;
|
||||
|
||||
|
||||
/**
|
||||
* 订单备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 下单时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date purchaserTime;
|
||||
|
||||
|
||||
/**
|
||||
* 订单最终金额(支付金额)
|
||||
*/
|
||||
private BigDecimal finalAmount;
|
||||
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
private String customId;
|
||||
|
||||
/**
|
||||
* 用户昵称
|
||||
*/
|
||||
private String customNickname;
|
||||
|
||||
/**
|
||||
* 用户头像
|
||||
*/
|
||||
private String customAvatar;
|
||||
|
||||
/**
|
||||
* 用户等级ID
|
||||
*/
|
||||
private String customLevelId;
|
||||
|
||||
/**
|
||||
* 用户等级名称
|
||||
*/
|
||||
private String customLevelName;
|
||||
|
||||
/**
|
||||
* 商品ID
|
||||
*/
|
||||
private String commodityId;
|
||||
|
||||
/**
|
||||
* 商品类型[0:礼物,1:服务]
|
||||
*/
|
||||
private String commodityType;
|
||||
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
private String commodityName;
|
||||
/**
|
||||
* 商品单价
|
||||
*/
|
||||
private BigDecimal commodityPrice;
|
||||
|
||||
/**
|
||||
* 服务时长
|
||||
*
|
||||
* @since 2024/5/8 16:44
|
||||
**/
|
||||
private String serviceDuration;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.starry.admin.modules.weichat.entity.order;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 打赏动态查询返回信息
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024/5/25 下午7:49
|
||||
**/
|
||||
@Data
|
||||
public class PlayRewardInfoReturnVo {
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 店员ID
|
||||
*/
|
||||
private String clerkId;
|
||||
|
||||
/**
|
||||
* 店员昵称
|
||||
*/
|
||||
private String clerkNickname;
|
||||
|
||||
/**
|
||||
* 店员头像
|
||||
*/
|
||||
private String clerkAvatar;
|
||||
|
||||
/**
|
||||
* 打赏类型(0:余额;1:礼物)
|
||||
*/
|
||||
private String rewardType;
|
||||
|
||||
/**
|
||||
* 商品数量
|
||||
*/
|
||||
private String commodityNumber;
|
||||
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
private String commodityName;
|
||||
|
||||
|
||||
/**
|
||||
* 订单金额
|
||||
*/
|
||||
private BigDecimal orderMoney;
|
||||
|
||||
|
||||
/**
|
||||
* 下单时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date purchaserTime;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.starry.admin.modules.weichat.entity.order;
|
||||
|
||||
import com.starry.common.domain.BasePageEntity;
|
||||
|
||||
/**
|
||||
* 打赏动态分页查询对象
|
||||
*
|
||||
* @author admin
|
||||
* @since 2024/5/25 下午7:36
|
||||
**/
|
||||
public class PlayRewardOrderQueryVo extends BasePageEntity {
|
||||
}
|
||||
@@ -0,0 +1,143 @@
|
||||
package com.starry.admin.modules.weichat.entity.user;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
* @since 2024/5/28 下午5:07
|
||||
**/
|
||||
@Data
|
||||
public class PlayCustomUserReturnDetailVo {
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
private String id;
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private String tenantId;
|
||||
/**
|
||||
* 用户的标识,对当前公众号唯一
|
||||
*/
|
||||
private String openid;
|
||||
/**
|
||||
* 用户的标识,对当前公众号唯一
|
||||
*/
|
||||
private String unionid;
|
||||
/**
|
||||
* 顾客昵称
|
||||
*/
|
||||
private String nickname;
|
||||
/**
|
||||
* 顾客性别(0:未知;1:男,2:女)
|
||||
*/
|
||||
private Integer sex;
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
private String avatar;
|
||||
/**
|
||||
* 手机号码
|
||||
*/
|
||||
private String phone;
|
||||
/**
|
||||
* 微信号码
|
||||
*/
|
||||
private String weiChatCode;
|
||||
/**
|
||||
* 等级ID
|
||||
*/
|
||||
private String levelId;
|
||||
/**
|
||||
* 所在国家
|
||||
*/
|
||||
private String country;
|
||||
/**
|
||||
* 所在省份
|
||||
*/
|
||||
private String province;
|
||||
/**
|
||||
* 所在城市
|
||||
*/
|
||||
private String city;
|
||||
/**
|
||||
* 账户余额
|
||||
*/
|
||||
private BigDecimal accountBalance;
|
||||
/**
|
||||
* 余额状态[0:不存在余额,1:存在余额]
|
||||
*/
|
||||
private String accountState;
|
||||
/**
|
||||
* 关注状态[0:未关注,1:已关注]
|
||||
*/
|
||||
private String subscribeState;
|
||||
/**
|
||||
* 黑名单状态[0:非黑名单,1:黑名单]
|
||||
*/
|
||||
private String blacklistState;
|
||||
/**
|
||||
* 违规状态[0:未违规,1:违规]
|
||||
*/
|
||||
private String violationState;
|
||||
/**
|
||||
* 是否下单状态[0:未下单过,1:下单过]
|
||||
*/
|
||||
private String purchaseState;
|
||||
/**
|
||||
* 绑定手机状态[0:未绑定,1:绑定]
|
||||
*/
|
||||
private String mobilePhoneState;
|
||||
/**
|
||||
* 实名状态【1:已实名,0:未实名】
|
||||
*/
|
||||
private String realState;
|
||||
/**
|
||||
* 是否必须实名【2:跟随店铺设置,1:必须实名,0:非必须实名】
|
||||
*/
|
||||
private String mandatoryRealState;
|
||||
/**
|
||||
* 注册时间
|
||||
*/
|
||||
private Date registrationTime;
|
||||
/**
|
||||
* 上次登录时间
|
||||
*/
|
||||
private Date lastLoginTime;
|
||||
/**
|
||||
* 首次下单时间
|
||||
*/
|
||||
private Date firstPurchaseTime;
|
||||
/**
|
||||
* 最后一次下单时间
|
||||
*/
|
||||
private Date lastPurchaseTime;
|
||||
/**
|
||||
* 隐藏等级[0:不隐藏;1:隐藏]
|
||||
*/
|
||||
private String hideLevelState;
|
||||
/**
|
||||
* 隐藏排名[0:不隐藏;1:隐藏]
|
||||
*/
|
||||
private String hideRankingState;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 最近一次登录token
|
||||
*/
|
||||
@JsonIgnore
|
||||
private String token;
|
||||
|
||||
|
||||
/**
|
||||
* 员工状态【1:是陪聊,0:不是陪聊】
|
||||
*/
|
||||
public String clerkState = "0";
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.starry.admin.modules.weichat.entity.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
* @since 2024/5/21 下午10:18
|
||||
**/
|
||||
@Data
|
||||
public class PlayCustomLevelInfoReturnVo {
|
||||
|
||||
/**
|
||||
* 等级名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 等级数字(排序字段)
|
||||
*/
|
||||
private Integer level;
|
||||
|
||||
/**
|
||||
* 上一级消费金额
|
||||
*/
|
||||
private String consumptionAmount;
|
||||
|
||||
/**
|
||||
* 满减比例
|
||||
*/
|
||||
private Integer discount;
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.starry.admin.modules.weichat.entity.wages;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
* @since 2024/6/1 上午11:44
|
||||
**/
|
||||
@Data
|
||||
public class ClerkCurrentPeriodWagesReturnVo {
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
|
||||
/**
|
||||
* 总金额
|
||||
*/
|
||||
private BigDecimal totalMoney;
|
||||
|
||||
/**
|
||||
* 开始统计时间
|
||||
*/
|
||||
@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;
|
||||
|
||||
|
||||
/**
|
||||
* 平台工资(订单)
|
||||
*/
|
||||
private OrderWagesReturnVo orderWages;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.starry.admin.modules.weichat.entity.wages;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
* @since 2024/6/1 上午11:44
|
||||
**/
|
||||
@Data
|
||||
public class ClerkHistoricalWagesReturnVo {
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
|
||||
/**
|
||||
* 订单金额
|
||||
*/
|
||||
private BigDecimal orderMoney;
|
||||
|
||||
/**
|
||||
* 开始统计时间
|
||||
*/
|
||||
@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;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.starry.admin.modules.weichat.entity.wages;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
* @since 2024/6/1 下午1:52
|
||||
**/
|
||||
@Data
|
||||
public class ClerkUnsettledWagesReturnVo {
|
||||
|
||||
|
||||
/**
|
||||
* 订单金额
|
||||
*/
|
||||
private BigDecimal orderMoney;
|
||||
|
||||
|
||||
/**
|
||||
* 订单总数
|
||||
*/
|
||||
private Integer orderNumber;
|
||||
|
||||
/**
|
||||
* 预计收入
|
||||
*/
|
||||
private BigDecimal estimatedRevenue;
|
||||
|
||||
|
||||
|
||||
public ClerkUnsettledWagesReturnVo(BigDecimal orderMoney, Integer orderNumber, BigDecimal estimatedRevenue) {
|
||||
this.orderMoney = orderMoney;
|
||||
this.orderNumber = orderNumber;
|
||||
this.estimatedRevenue = estimatedRevenue;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.starry.admin.modules.weichat.entity.wages;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
* @since 2024/6/1 下午1:22
|
||||
**/
|
||||
@Data
|
||||
public class ClerkWagesDetailsReturnVo {
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 工资统计ID
|
||||
*/
|
||||
private Long wagesId;
|
||||
|
||||
/**
|
||||
* 店员ID
|
||||
*/
|
||||
private String clerkId;
|
||||
|
||||
/**
|
||||
* 订单ID
|
||||
*/
|
||||
private String orderId;
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
private String orderNo;
|
||||
|
||||
/**
|
||||
* 订单最终金额(支付金额)
|
||||
*/
|
||||
private BigDecimal finalAmount;
|
||||
|
||||
/**
|
||||
* 订单工资
|
||||
*/
|
||||
private BigDecimal estimatedRevenue;
|
||||
|
||||
/**
|
||||
* 订单完成时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private LocalDateTime endOrderTime;
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.starry.admin.modules.weichat.entity.wages;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
* @since 2024/6/1 上午11:44
|
||||
**/
|
||||
@Data
|
||||
public class OrderWagesReturnVo {
|
||||
|
||||
/**
|
||||
* 订单总数
|
||||
*/
|
||||
private Integer orderNumber = 0;
|
||||
|
||||
/**
|
||||
* 订单金额
|
||||
*/
|
||||
private BigDecimal orderMoney = BigDecimal.ZERO;
|
||||
|
||||
/**
|
||||
* 续单数
|
||||
*/
|
||||
private Integer orderContinueNumber = 0;
|
||||
|
||||
/**
|
||||
* 续单比例
|
||||
*/
|
||||
private double orderContinueProportion = 0.0;
|
||||
|
||||
/**
|
||||
* 续单金额
|
||||
*/
|
||||
private BigDecimal orderContinueMoney = BigDecimal.ZERO;
|
||||
|
||||
/**
|
||||
* 超时未接单数
|
||||
*/
|
||||
private Integer ordersExpiredNumber = 0;
|
||||
|
||||
/**
|
||||
* 店员收入
|
||||
*/
|
||||
private BigDecimal estimatedRevenue = BigDecimal.ZERO;
|
||||
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.starry.admin.modules.weichat.service;
|
||||
|
||||
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.starry.common.utils.IdUtils;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.starry.admin.common.exception.ServiceException;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkUserInfoEntity;
|
||||
@@ -66,7 +66,7 @@ public class WxOauthService {
|
||||
if (item == null) {
|
||||
PlayClerkUserInfoEntity entity = ConvertUtil.entityToVo(userInfo, PlayClerkUserInfoEntity.class);
|
||||
entity.setAvatar(userInfo.getHeadImgUrl());
|
||||
entity.setId(IdUtil.fastSimpleUUID());
|
||||
entity.setId(IdUtils.getUuid());
|
||||
entity.setLevelId(playClerkLevelInfoService.getDefaultLevel().getId());
|
||||
clerkUserInfoService.create(entity);
|
||||
return entity.getId();
|
||||
@@ -96,7 +96,7 @@ public class WxOauthService {
|
||||
entity.setAvatar(userInfo.getHeadImgUrl());
|
||||
PlayCustomUserInfoEntity item = customUserInfoService.selectByOpenid(openId);
|
||||
if (item == null) {
|
||||
entity.setId(IdUtil.fastSimpleUUID());
|
||||
entity.setId(IdUtils.getUuid());
|
||||
entity.setRegistrationTime(new Date());
|
||||
entity.setLevelId(playCustomLevelInfoService.getDefaultLevel().getId());
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user