style: 应用 Spotless 代码格式化

- 对所有 Java 源文件应用统一的代码格式化
- 统一缩进为 4 个空格
- 清理尾随空白字符和文件末尾换行
- 优化导入语句组织
- 总计格式化 654 个 Java 文件

有问题可以回滚或者找我聊
This commit is contained in:
irving
2025-08-30 21:21:08 -04:00
parent 7cafe17cd3
commit d719a047d8
619 changed files with 6491 additions and 6625 deletions

View File

@@ -3,8 +3,7 @@ package com.starry.admin.modules.weichat.constant;
/**
* 全局常量
*
* @author admin
* 2019年1月21日
* @author admin 2019年1月21日
*/
public interface ConfigConstant {

View File

@@ -1,26 +1,33 @@
package com.starry.admin.modules.weichat.constant;
/**
* 全局返回码
* 微信用6开头例60001
* 全局返回码 微信用6开头例60001
*
* @author admin
* 2019年7月25日
* @author admin 2019年7月25日
*/
public enum MyReturnCode {
// 其它错误
ERR_60000(60000, "系统错误,请稍候再试") {},
ERR_60001(60001, "登录超时,请重新登录") {},
ERR_60002(60002, "session不能为空") {},
ERR_60000(60000, "系统错误,请稍候再试") {
},
ERR_60001(60001, "登录超时,请重新登录") {
},
ERR_60002(60002, "session不能为空") {
},
ERR_70001(70001, "该状态订单不允许操作") {},
ERR_70002(70002, "请选择付款方式") {},
ERR_70003(70003, "没有符合下单条件的规格商品,商品已下架或库存不足") {},
ERR_70004(70004, "只有未支付的详单能发起支付") {},
ERR_70005(70005, "无效订单") {},
ERR_70001(70001, "该状态订单不允许操作") {
},
ERR_70002(70002, "请选择付款方式") {
},
ERR_70003(70003, "没有符合下单条件的规格商品,商品已下架或库存不足") {
},
ERR_70004(70004, "只有未支付的详单能发起支付") {
},
ERR_70005(70005, "无效订单") {
},
ERR_80004(80004, "该商品已删除") {},
ERR_80004(80004, "该商品已删除") {
},
;

File diff suppressed because one or more lines are too long

View File

@@ -23,13 +23,12 @@ import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import java.time.LocalDateTime;
import javax.annotation.Resource;
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;
/**
* 动态接口
*
@@ -42,7 +41,6 @@ import java.time.LocalDateTime;
@RequestMapping("/wx/article")
public class WxArticleController {
@Resource
private PlayClerkArticleInfoServiceImpl playClerkArticleInfoService;
@@ -55,14 +53,11 @@ public class WxArticleController {
@Resource
private WxCustomUserService customUserService;
/**
* 店员新增动态
*/
@ApiOperation(value = "店员新增动态", notes = "店员发布新的动态文章")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
@ClerkUserLogin
@PostMapping("/clerk/add")
public R clerkAdd(@ApiParam(value = "动态信息", required = true) @Validated @RequestBody PlayClerkAddArticleVo vo) {
@@ -71,15 +66,12 @@ public class WxArticleController {
return R.ok("成功");
}
/**
* 店员删除
*/
@ApiOperation(value = "店员删除动态", notes = "店员删除自己发布的动态")
@ApiImplicitParam(name = "id", value = "动态ID", required = true, dataType = "String", paramType = "query")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
@ClerkUserLogin
@GetMapping("/clerk/deleteById")
public R clerkDeleteById(@RequestParam("id") String id) {
@@ -93,27 +85,26 @@ public class WxArticleController {
*/
@ApiOperation(value = "店员查询动态", notes = "店员分页查询自己的动态列表")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkArticleInfoEntity.class, responseContainer = "Page")
})
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkArticleInfoEntity.class, responseContainer = "Page")})
@ClerkUserLogin
@PostMapping("/clerk/listByPage")
public R clerkListByPage(@ApiParam(value = "查询条件", required = true) @Validated @RequestBody PlayClerkArticleQueryVo vo) {
public R clerkListByPage(
@ApiParam(value = "查询条件", required = true) @Validated @RequestBody PlayClerkArticleQueryVo vo) {
vo.setClerkId(ThreadLocalRequestDetail.getClerkUserInfo().getId());
return R.ok(playClerkArticleInfoService.selectByPage(vo,true));
return R.ok(playClerkArticleInfoService.selectByPage(vo, true));
}
/**
* 顾客查询动态列表
*/
@ApiOperation(value = "顾客查询动态列表", notes = "顾客分页查询所有动态列表")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkArticleInfoEntity.class, responseContainer = "Page")
})
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkArticleInfoEntity.class, responseContainer = "Page")})
@PostMapping("/custom/listByPage")
public R customListByPage(@ApiParam(value = "查询条件", required = true) @Validated @RequestBody PlayClerkArticleCustomQueryVo vo) {
public R customListByPage(
@ApiParam(value = "查询条件", required = true) @Validated @RequestBody PlayClerkArticleCustomQueryVo vo) {
vo.setFollowState("0");
return R.ok(playClerkArticleInfoService.customSelectByPage(vo,customUserService.getLoginUserId()));
return R.ok(playClerkArticleInfoService.customSelectByPage(vo, customUserService.getLoginUserId()));
}
/**
@@ -121,11 +112,11 @@ public class WxArticleController {
*/
@ApiOperation(value = "查询收藏动态", notes = "顾客查询已收藏的动态列表")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkArticleInfoEntity.class, responseContainer = "Page")
})
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkArticleInfoEntity.class, responseContainer = "Page")})
@CustomUserLogin
@PostMapping("/custom/listFollowByPage")
public R customListFollowByPage(@ApiParam(value = "查询条件", required = true) @Validated @RequestBody PlayClerkArticleCustomQueryVo vo) {
public R customListFollowByPage(
@ApiParam(value = "查询条件", required = true) @Validated @RequestBody PlayClerkArticleCustomQueryVo vo) {
vo.setFollowState("1");
return R.ok(playClerkArticleInfoService.customSelectByPage(vo, customUserService.getLoginUserId()));
}
@@ -133,14 +124,14 @@ public class WxArticleController {
/**
* 分页获取店员动态
*
* @param id 店员ID
* @param id
* 店员ID
* @return 店员动态
*/
@ApiOperation(value = "获取店员动态", notes = "根据店员ID查询该店员的动态")
@ApiImplicitParam(name = "id", value = "店员ID", required = true, dataType = "String", paramType = "query")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkArticleInfoEntity.class, responseContainer = "Page")
})
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkArticleInfoEntity.class, responseContainer = "Page")})
@GetMapping("/custom/queryByClerkId")
public R queryTrendsById(@RequestParam("id") String id) {
PlayClerkUserInfoEntity entity = playClerkUserInfoService.selectById(id);
@@ -149,19 +140,19 @@ public class WxArticleController {
return R.ok(playClerkArticleInfoService.customSelectByPage(vo, customUserService.getLoginUserId()));
}
/**
* 顾客查询已收藏动态列表
*/
@ApiOperation(value = "更新点赞状态", notes = "顾客更新对动态的点赞状态")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
@CustomUserLogin
@PostMapping("/custom/updateGreedState")
public R customUpdateGreedState(@ApiParam(value = "点赞信息", required = true) @Validated @RequestBody PlayClerkArticleFollowCustomGreedStateEditStateVo vo) {
PlayClerkArticleInfoEntity articleInfoEntity = playClerkArticleInfoService.selectPlayClerkArticleInfoById(vo.getId());
PlayCustomArticleInfoEntity entity = playCustomArticleInfoService.selectByArticleId(articleInfoEntity.getId(), ThreadLocalRequestDetail.getCustomUserInfo().getId(), "0");
public R customUpdateGreedState(
@ApiParam(value = "点赞信息", required = true) @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());
@@ -176,14 +167,15 @@ public class WxArticleController {
}
@ApiOperation(value = "更新收藏状态", notes = "顾客更新对动态的收藏状态")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
@CustomUserLogin
@PostMapping("/custom/updateFollowState")
public R customUpdateFollowState(@ApiParam(value = "收藏信息", required = true) @Validated @RequestBody PlayClerkArticleFollowCustomFollowStateEditStateVo vo) {
PlayClerkArticleInfoEntity articleInfoEntity = playClerkArticleInfoService.selectPlayClerkArticleInfoById(vo.getId());
PlayCustomArticleInfoEntity entity = playCustomArticleInfoService.selectByArticleId(articleInfoEntity.getId(), ThreadLocalRequestDetail.getCustomUserInfo().getId(), "1");
public R customUpdateFollowState(
@ApiParam(value = "收藏信息", required = true) @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());
@@ -197,5 +189,4 @@ public class WxArticleController {
return R.ok("成功");
}
}

View File

@@ -17,18 +17,17 @@ import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import javax.annotation.Resource;
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.Iterator;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* 店员等级
*
@@ -53,12 +52,10 @@ public class WxClerkCommodityController {
@Resource
IPlayClerkCommodityService playClerkCommodityService;
@ApiOperation(value = "根据等级查询商品", notes = "根据等级ID查询对应等级的所有商品")
@ApiImplicitParam(name = "id", value = "等级ID", dataType = "String", paramType = "query")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayCommodityReturnVo.class, responseContainer = "List")
})
@ApiResponse(code = 200, message = "操作成功", response = PlayCommodityReturnVo.class, responseContainer = "List")})
@GetMapping("/custom/queryClerkAllCommodityByLevel")
public R queryClerkAllCommodityByLevel(@RequestParam("id") String levelId) {
List<PlayCommodityAndLevelInfoEntity> levelInfoEntities = iPlayCommodityAndLevelInfoService.selectAll();
@@ -71,7 +68,6 @@ public class WxClerkCommodityController {
return R.ok(tree);
}
/**
* 顾客查询当前店员所有服务项目
*
@@ -80,16 +76,17 @@ public class WxClerkCommodityController {
@ApiOperation(value = "查询店员商品", notes = "根据店员ID查询该店员提供的所有商品服务")
@ApiImplicitParam(name = "id", value = "店员ID", required = true, dataType = "String", paramType = "query")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayCommodityReturnVo.class, responseContainer = "List"),
@ApiResponse(code = 500, message = "请求参数异常,id不能为空")
})
@ApiResponse(code = 200, message = "操作成功", response = PlayCommodityReturnVo.class, responseContainer = "List"),
@ApiResponse(code = 500, message = "请求参数异常,id不能为空")})
@GetMapping("/custom/queryClerkAllCommodity")
public R customQueryClerkAllCommodity(@RequestParam("id") String clerkId) {
if (clerkId == null || clerkId.isEmpty()) {
throw new CustomException("请求参数异常,id不能为空");
}
PlayClerkUserInfoEntity clerkUserInfo = clerkUserInfoService.selectById(clerkId);
Map<String, List<PlayClerkCommodityEntity>> clerkCommodityEntities = playClerkCommodityService.selectCommodityTypeByUser(clerkId, "1").stream().collect(Collectors.groupingBy(PlayClerkCommodityEntity::getCommodityId));
Map<String, List<PlayClerkCommodityEntity>> clerkCommodityEntities = playClerkCommodityService
.selectCommodityTypeByUser(clerkId, "1").stream()
.collect(Collectors.groupingBy(PlayClerkCommodityEntity::getCommodityId));
List<PlayCommodityAndLevelInfoEntity> levelInfoEntities = iPlayCommodityAndLevelInfoService.selectAll();
List<PlayCommodityReturnVo> tree = playCommodityInfoService.selectTree();
tree = formatPlayCommodityReturnVoTree(tree, levelInfoEntities, clerkUserInfo.getLevelId());
@@ -97,8 +94,6 @@ public class WxClerkCommodityController {
return R.ok(tree);
}
/**
* 店员查询自己的服务项目
*
@@ -106,14 +101,15 @@ public class WxClerkCommodityController {
*/
@ApiOperation(value = "店员查询自己的商品", notes = "当前登录店员查询自己提供的所有商品服务")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayCommodityReturnVo.class, responseContainer = "List")
})
@ApiResponse(code = 200, message = "操作成功", response = PlayCommodityReturnVo.class, responseContainer = "List")})
@ClerkUserLogin
@GetMapping("/clerk/queryAllCommodity")
public R clerkQueryAllCommodity() {
String levelId = ThreadLocalRequestDetail.getClerkUserInfo().getLevelId();
List<PlayCommodityAndLevelInfoEntity> levelInfoEntities = iPlayCommodityAndLevelInfoService.selectAll();
Map<String, List<PlayClerkCommodityEntity>> clerkCommodityEntities = playClerkCommodityService.selectCommodityTypeByUser(ThreadLocalRequestDetail.getClerkUserInfo().getId(), "1").stream().collect(Collectors.groupingBy(PlayClerkCommodityEntity::getCommodityId));
Map<String, List<PlayClerkCommodityEntity>> clerkCommodityEntities = playClerkCommodityService
.selectCommodityTypeByUser(ThreadLocalRequestDetail.getClerkUserInfo().getId(), "1").stream()
.collect(Collectors.groupingBy(PlayClerkCommodityEntity::getCommodityId));
List<PlayCommodityReturnVo> tree = playCommodityInfoService.selectTree();
tree = formatPlayCommodityReturnVoTree(tree, levelInfoEntities, levelId);
@@ -121,18 +117,19 @@ public class WxClerkCommodityController {
return R.ok(tree);
}
public List<PlayCommodityReturnVo> formatPlayCommodityReturnVoTree(List<PlayCommodityReturnVo> tree, List<PlayCommodityAndLevelInfoEntity> levelInfoEntities, String levelId) {
public List<PlayCommodityReturnVo> formatPlayCommodityReturnVoTree(List<PlayCommodityReturnVo> tree,
List<PlayCommodityAndLevelInfoEntity> levelInfoEntities, String levelId) {
Iterator<PlayCommodityReturnVo> it = tree.iterator();
while (it.hasNext()) {
PlayCommodityReturnVo item = it.next();
//查找当前服务项目对应的价格
// 查找当前服务项目对应的价格
for (PlayCommodityAndLevelInfoEntity levelInfoEntity : levelInfoEntities) {
if (item.getId().equals(levelInfoEntity.getCommodityId()) && levelId.equals(levelInfoEntity.getLevelId())) {
if (item.getId().equals(levelInfoEntity.getCommodityId())
&& levelId.equals(levelInfoEntity.getLevelId())) {
item.setPrice(levelInfoEntity.getPrice());
}
}
//如果未设置价格,删除元素
// 如果未设置价格,删除元素
if (!"00".equals(item.getPId()) && item.getPrice() == null) {
it.remove();
}
@@ -141,13 +138,15 @@ public class WxClerkCommodityController {
return tree;
}
public List<PlayCommodityReturnVo> formatPlayCommodityReturnVoTree(List<PlayCommodityReturnVo> tree, Map<String, List<PlayClerkCommodityEntity>> clerkCommodityEntities) {
public List<PlayCommodityReturnVo> formatPlayCommodityReturnVoTree(List<PlayCommodityReturnVo> tree,
Map<String, List<PlayClerkCommodityEntity>> clerkCommodityEntities) {
Iterator<PlayCommodityReturnVo> it = tree.iterator();
while (it.hasNext()) {
PlayCommodityReturnVo item = it.next();
if ("00".equals(item.getPId()) && item.getChild().isEmpty()) {
it.remove();
} else if (clerkCommodityEntities != null && "00".equals(item.getPId()) && !clerkCommodityEntities.containsKey(item.getId())) {
} else if (clerkCommodityEntities != null && "00".equals(item.getPId())
&& !clerkCommodityEntities.containsKey(item.getId())) {
it.remove();
}
formatPlayCommodityReturnVoTree(item.getChild(), clerkCommodityEntities);
@@ -155,5 +154,4 @@ public class WxClerkCommodityController {
return tree;
}
}

View File

@@ -1,6 +1,5 @@
package com.starry.admin.modules.weichat.controller;
import cn.hutool.crypto.SecureUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.starry.admin.common.aspect.ClerkUserLogin;
@@ -44,18 +43,17 @@ import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import lombok.extern.slf4j.Slf4j;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import javax.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
/**
* @author admin
@@ -66,7 +64,6 @@ import java.util.concurrent.TimeUnit;
@RequestMapping("/wx/clerk/")
public class WxClerkController {
@Resource
RedisCache redisCache;
@@ -97,7 +94,6 @@ public class WxClerkController {
@Resource
private IPlayClerkDataReviewInfoService playClerkDataReviewInfoService;
@Resource
private IPlayClerkClassificationInfoService playClerkClassificationInfoService;
@@ -114,36 +110,35 @@ public class WxClerkController {
@Resource
private WxCustomMpService wxCustomMpService;
/**
* 店员获取个人业绩信息
*/
@ApiOperation(value = "查询店员业绩", notes = "店员获取个人业绩信息")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
@ClerkUserLogin
@PostMapping("/user/queryPerformanceInfo")
public R queryPerformanceInfo(@ApiParam(value = "业绩查询条件", required = true) @Validated @RequestBody PlayClerkWxPerformanceInfoQueryVo vo) {
PlayClerkUserInfoEntity entity = clerkUserInfoService.selectById(ThreadLocalRequestDetail.getClerkUserInfo().getId());
public R queryPerformanceInfo(
@ApiParam(value = "业绩查询条件", required = true) @Validated @RequestBody PlayClerkWxPerformanceInfoQueryVo vo) {
PlayClerkUserInfoEntity entity = clerkUserInfoService
.selectById(ThreadLocalRequestDetail.getClerkUserInfo().getId());
List<PlayClerkLevelInfoEntity> clerkLevelInfoEntity = playClerkLevelInfoService.selectAll();
List<PlayOrderInfoEntity> orderInfoEntities = playOrderInfoService.clerkSelectOrderInfoList(entity.getId(), vo.getStartTime(), vo.getEndTime());
List<PlayOrderInfoEntity> orderInfoEntities = playOrderInfoService.clerkSelectOrderInfoList(entity.getId(),
vo.getStartTime(), vo.getEndTime());
List<PlayPersonnelGroupInfoEntity> groupInfoEntities = playPersonnelGroupInfoService.selectAll();
return R.ok(playClerkPerformanceService.getClerkPerformanceInfo(entity, orderInfoEntities, clerkLevelInfoEntity, groupInfoEntities));
return R.ok(playClerkPerformanceService.getClerkPerformanceInfo(entity, orderInfoEntities, clerkLevelInfoEntity,
groupInfoEntities));
}
/**
* 店员获取个人等级信息
*/
@ApiOperation(value = "查询店员等级", notes = "店员获取个人等级信息")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkLevelInfoReturnVo.class)
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = PlayClerkLevelInfoReturnVo.class)})
@ClerkUserLogin
@GetMapping("/user/queryLevelInfo")
public R queryLevelInfo() {
PlayClerkUserInfoEntity entity = clerkUserInfoService.selectById(ThreadLocalRequestDetail.getClerkUserInfo().getId());
PlayClerkUserInfoEntity entity = clerkUserInfoService
.selectById(ThreadLocalRequestDetail.getClerkUserInfo().getId());
PlayClerkLevelInfoEntity level = playClerkLevelInfoService.selectPlayClerkLevelInfoById(entity.getLevelId());
PlayClerkLevelInfoReturnVo returnVo = new PlayClerkLevelInfoReturnVo();
returnVo.setLevelName(level.getName());
@@ -159,34 +154,31 @@ public class WxClerkController {
return R.ok(returnVo);
}
/**
* 店员获取个人信息
*/
@ApiOperation(value = "查询店员信息", notes = "店员获取个人详细信息")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkUserInfoResultVo.class),
@ApiResponse(code = 500, message = "用户不存在")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = PlayClerkUserInfoResultVo.class),
@ApiResponse(code = 500, message = "用户不存在")})
@ClerkUserLogin
@GetMapping("/user/queryById")
public R queryById() {
PlayClerkUserInfoEntity entity = clerkUserInfoService.selectById(ThreadLocalRequestDetail.getClerkUserInfo().getId());
PlayClerkUserInfoEntity entity = clerkUserInfoService
.selectById(ThreadLocalRequestDetail.getClerkUserInfo().getId());
if (entity == null) {
throw new CustomException("用户不存在");
}
return R.ok(clerkUserInfoService.getVo(entity));
}
@ApiOperation(value = "发送验证码", notes = "店员绑定手机号发送验证码")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = String.class)
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = String.class)})
@ClerkUserLogin
@PostMapping("/user/sendCode")
public R sendCode(@ApiParam(value = "发送验证码信息", required = true) @Validated @RequestBody PlayClerkUserSendCodeVo vo) {
String codeKey = "login_codes:" + SecurityUtils.getTenantId() + "_" + SecureUtil.md5(vo.getAreaCode() + vo.getPhone());
public R sendCode(
@ApiParam(value = "发送验证码信息", required = true) @Validated @RequestBody PlayClerkUserSendCodeVo vo) {
String codeKey = "login_codes:" + SecurityUtils.getTenantId() + "_"
+ SecureUtil.md5(vo.getAreaCode() + vo.getPhone());
String code = VerificationCodeUtils.getVerificationCode(4);
redisCache.setCacheObject(codeKey, code, 5L, TimeUnit.MINUTES);
// 发送验证码,
@@ -194,14 +186,13 @@ public class WxClerkController {
}
@ApiOperation(value = "绑定手机号", notes = "店员绑定手机号")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功"),
@ApiResponse(code = 500, message = "验证码错误")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "验证码错误")})
@ClerkUserLogin
@PostMapping("/user/bindCode")
public R bindCode(@ApiParam(value = "绑定验证码信息", required = true) @Validated @RequestBody PlayClerkUserBindCodeVo vo) {
String codeKey = "login_codes:" + SecurityUtils.getTenantId() + "_" + SecureUtil.md5(vo.getAreaCode() + vo.getPhone());
public R bindCode(
@ApiParam(value = "绑定验证码信息", required = true) @Validated @RequestBody PlayClerkUserBindCodeVo vo) {
String codeKey = "login_codes:" + SecurityUtils.getTenantId() + "_"
+ SecureUtil.md5(vo.getAreaCode() + vo.getPhone());
String code = redisCache.getCacheObject(codeKey);
if (code == null || !code.equals(vo.getCode())) {
throw new CustomException("验证码错误");
@@ -219,12 +210,8 @@ public class WxClerkController {
}
@ApiOperation(value = "店员申请", notes = "用户申请成为店员")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功"),
@ApiResponse(code = 500, message = "系统错误,用户不存在"),
@ApiResponse(code = 500, message = "当前用户已经是店员"),
@ApiResponse(code = 500, message = "已有申请未审核")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "系统错误,用户不存在"),
@ApiResponse(code = 500, message = "当前用户已经是店员"), @ApiResponse(code = 500, message = "已有申请未审核")})
@ClerkUserLogin
@PostMapping("/user/add")
@Transactional(rollbackFor = Exception.class)
@@ -252,19 +239,17 @@ public class WxClerkController {
return R.ok("申请成功");
}
@ApiOperation(value = "更新头像", notes = "店员更新头像")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
@ClerkUserLogin
@PostMapping("/user/updateAvatar")
public R updateAvatar(@ApiParam(value = "头像信息", required = true) @Validated @RequestBody PlayClerkUserAvatarVo vo) {
PlayClerkUserInfoEntity userInfo = ThreadLocalRequestDetail.getClerkUserInfo();
// PlayClerkDataReviewInfoEntity entity = playClerkDataReviewInfoService.queryByClerkId(userInfo.getId(), "1", "0");
// if (entity != null) {
// throw new CustomException("已有申请未审核");
// }
// PlayClerkDataReviewInfoEntity entity =
// playClerkDataReviewInfoService.queryByClerkId(userInfo.getId(), "1", "0");
// if (entity != null) {
// throw new CustomException("已有申请未审核");
// }
PlayClerkDataReviewInfoEntity entity = new PlayClerkDataReviewInfoEntity();
entity.setClerkId(userInfo.getId());
entity.setDataType("1");
@@ -280,10 +265,11 @@ public class WxClerkController {
@PostMapping("/user/updateAlbum")
public R updateAlbum(@Validated @RequestBody PlayClerkUserAlbumVo vo) {
PlayClerkUserInfoEntity userInfo = ThreadLocalRequestDetail.getClerkUserInfo();
// PlayClerkDataReviewInfoEntity entity = playClerkDataReviewInfoService.queryByClerkId(userInfo.getId(), "2", "0");
// if (entity != null) {
// throw new CustomException("已有申请未审核");
// }
// PlayClerkDataReviewInfoEntity entity =
// playClerkDataReviewInfoService.queryByClerkId(userInfo.getId(), "2", "0");
// if (entity != null) {
// throw new CustomException("已有申请未审核");
// }
PlayClerkDataReviewInfoEntity entity = new PlayClerkDataReviewInfoEntity();
entity.setClerkId(userInfo.getId());
entity.setDataType("2");
@@ -297,10 +283,11 @@ public class WxClerkController {
@PostMapping("/user/updateAudio")
public R updateAudio(@Validated @RequestBody PlayClerkUserAudioVo vo) {
PlayClerkUserInfoEntity userInfo = ThreadLocalRequestDetail.getClerkUserInfo();
// PlayClerkDataReviewInfoEntity entity = playClerkDataReviewInfoService.queryByClerkId(userInfo.getId(), "3", "0");
// if (entity != null) {
// throw new CustomException("已有申请未审核");
// }
// PlayClerkDataReviewInfoEntity entity =
// playClerkDataReviewInfoService.queryByClerkId(userInfo.getId(), "3", "0");
// if (entity != null) {
// throw new CustomException("已有申请未审核");
// }
PlayClerkDataReviewInfoEntity entity = new PlayClerkDataReviewInfoEntity();
entity.setClerkId(userInfo.getId());
entity.setDataType("3");
@@ -312,7 +299,6 @@ public class WxClerkController {
return R.ok("提交成功,等待审核~");
}
@ClerkUserLogin
@PostMapping("/user/updateOnlineState")
public R updateAudio(@Validated @RequestBody PlayClerkUserOnlineStateVo vo) {
@@ -327,11 +313,11 @@ public class WxClerkController {
@ClerkUserLogin
@PostMapping("/user/updateCommodity")
public R updateAudio(@Validated @RequestBody PlayClerkCommodityEditVo vo) {
playClerkCommodityService.startStopClerkItem(vo.getCommodityType(), vo.getEnablingState(), ThreadLocalRequestDetail.getClerkUserInfo().getId());
playClerkCommodityService.startStopClerkItem(vo.getCommodityType(), vo.getEnablingState(),
ThreadLocalRequestDetail.getClerkUserInfo().getId());
return R.ok("成功");
}
@ClerkUserLogin
@PostMapping("/user/updateOther")
public R updateOther(@Validated @RequestBody PlayClerkUserOtherVo vo) {
@@ -341,7 +327,6 @@ public class WxClerkController {
return R.ok("申请成功");
}
/**
* 查询陪聊服务项目列表
*/
@@ -354,16 +339,17 @@ public class WxClerkController {
/**
* 分页获取店员列表
*
* @param vo PlayClerkUserInfoQueryVo
* @param vo
* PlayClerkUserInfoQueryVo
* @return 店员列表
*/
@PostMapping("/user/queryByPage")
public R queryByPage(@RequestBody PlayClerkUserInfoQueryVo vo) {
IPage<PlayClerkUserInfoResultVo> page = playClerkUserInfoService.selectByPage(vo, customUserService.getLoginUserId());
IPage<PlayClerkUserInfoResultVo> page = playClerkUserInfoService.selectByPage(vo,
customUserService.getLoginUserId());
return R.ok(page);
}
/**
* 获取推荐用户列表
*
@@ -379,11 +365,11 @@ public class WxClerkController {
return R.ok(page);
}
/**
* 获取店员礼物信息
*
* @param id 店员ID
* @param id
* 店员ID
* @return 店员礼物
*/
@@ -393,11 +379,11 @@ public class WxClerkController {
if (entity == null) {
throw new CustomException("用户不存在");
}
//获取所有礼物列表
// 获取所有礼物列表
List<PlayGiftInfoEntity> giftInfoEntities = giftInfoService.listByAll();
//获取已点亮礼物
// 获取已点亮礼物
List<PlayClerkGiftReturnVo> clerkListByAll = giftInfoService.clerkListByAll(id, "1");
//组装数据
// 组装数据
List<PlayClerkGiftReturnVo> result = new ArrayList<>();
for (PlayGiftInfoEntity giftInfoEntity : giftInfoEntities) {
PlayClerkGiftReturnVo item = ConvertUtil.entityToVo(giftInfoEntity, PlayClerkGiftReturnVo.class);
@@ -415,11 +401,11 @@ public class WxClerkController {
return R.ok(resuleMap);
}
/**
* 获取店员价格
*
* @param id 店员ID
* @param id
* 店员ID
* @return 店员价格
*/
@GetMapping("/user/queryPriceById")
@@ -427,11 +413,11 @@ public class WxClerkController {
return R.ok();
}
/**
* 店员分页查询本人订单列表
*
* @param vo 订单列表分页查询对象
* @param vo
* 订单列表分页查询对象
* @return com.starry.common.result.R
* @author admin
* @since 2024/5/8 15:57
@@ -447,7 +433,8 @@ public class WxClerkController {
/**
* 店员查询本人订单详情
*
* @param id 订单ID
* @param id
* 订单ID
* @return com.starry.common.result.R
* @author admin
* @since 2024/5/8 15:57
@@ -455,15 +442,16 @@ public class WxClerkController {
@ClerkUserLogin
@GetMapping("/order/queryById")
public R queryById(@RequestParam("id") String id) {
PlayClerkOrderDetailsReturnVo orderInfo = playOrderInfoService.clerkSelectOrderDetails(ThreadLocalRequestDetail.getClerkUserInfo().getId(), id);
PlayClerkOrderDetailsReturnVo orderInfo = playOrderInfoService
.clerkSelectOrderDetails(ThreadLocalRequestDetail.getClerkUserInfo().getId(), id);
return R.ok(orderInfo);
}
/**
* 店员-接单
*
* @param id 订单ID
* @param id
* 订单ID
* @return com.starry.common.result.R
* @author admin
* @since 2024/5/8 15:57
@@ -471,14 +459,16 @@ public class WxClerkController {
@ClerkUserLogin
@GetMapping("/order/accept")
public R acceptOrder(@RequestParam("id") String id) {
playOrderInfoService.updateStateTo1("1", ThreadLocalRequestDetail.getClerkUserInfo().getId(), ThreadLocalRequestDetail.getClerkUserInfo().getId(), id);
playOrderInfoService.updateStateTo1("1", ThreadLocalRequestDetail.getClerkUserInfo().getId(),
ThreadLocalRequestDetail.getClerkUserInfo().getId(), id);
return R.ok("成功");
}
/**
* 店员-开始订单
*
* @param id 订单ID
* @param id
* 订单ID
* @return com.starry.common.result.R
* @author admin
* @since 2024/5/8 15:57
@@ -493,7 +483,8 @@ public class WxClerkController {
/**
* 店员-取消订单
*
* @param vo 取消订单传参
* @param vo
* 取消订单传参
* @return com.starry.common.result.R
* @author admin
* @since 2024/5/8 15:57
@@ -501,15 +492,16 @@ public class WxClerkController {
@ClerkUserLogin
@PostMapping("/order/cancellation")
public R endOrder(@Validated @RequestBody PlayOrderStateEditVo vo) {
playOrderInfoService.updateStateTo4("1", ThreadLocalRequestDetail.getClerkUserInfo().getId(), vo.getOrderId(), vo.getRefundReason(), vo.getImages());
playOrderInfoService.updateStateTo4("1", ThreadLocalRequestDetail.getClerkUserInfo().getId(), vo.getOrderId(),
vo.getRefundReason(), vo.getImages());
return R.ok("成功");
}
/**
* 分页获取店员评价(订单评价)
*
* @param vo 店员评价查询对象
* @param vo
* 店员评价查询对象
* @return 店员评价
*/
@PostMapping("/user/queryEvaluateByPage")
@@ -518,7 +510,6 @@ public class WxClerkController {
return R.ok(playOrderEvaluateInfoService.selectByPage(vo));
}
@GetMapping("/level/queryAll")
public R userAdd() {
return R.ok(playClerkLevelInfoService.selectAll());

View File

@@ -8,15 +8,14 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Resource;
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;
/**
* 店员等级
*
@@ -32,7 +31,6 @@ public class WxClerkLeveController {
@Resource
private IPlayClerkLevelInfoService playClerkLevelInfoService;
/**
* 顾客查询所有店员所有等级列表
*
@@ -40,8 +38,7 @@ public class WxClerkLeveController {
*/
@ApiOperation(value = "查询店员等级列表", notes = "顾客查询所有店员等级列表")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkLevelReturnVo.class, responseContainer = "List")
})
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkLevelReturnVo.class, responseContainer = "List")})
@GetMapping("/custom/queryClerkAllLevel")
public R customQueryClerkAllLevel() {
List<PlayClerkLevelInfoEntity> list = playClerkLevelInfoService.selectAll();
@@ -55,5 +52,4 @@ public class WxClerkLeveController {
return R.ok(returnVoList);
}
}

View File

@@ -8,14 +8,13 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import java.util.List;
import javax.annotation.Resource;
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;
/**
* 店员等级
*
@@ -31,7 +30,6 @@ public class WxClerkTypeController {
@Resource
private IPlayClerkTypeInfoService clerkTypeInfoService;
/**
* 顾客查询所有店员所有等级列表
*
@@ -39,13 +37,13 @@ public class WxClerkTypeController {
*/
@ApiOperation(value = "查询店员类型列表", notes = "查询所有店员类型列表")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkTypeInfoEntity.class, responseContainer = "List")
})
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkTypeInfoEntity.class, responseContainer = "List")})
@GetMapping("/list")
public R clerkTypeList() {
List<PlayClerkTypeInfoEntity> list = clerkTypeInfoService.list(Wrappers.lambdaQuery(PlayClerkTypeInfoEntity.class).eq(PlayClerkTypeInfoEntity::getHomeDisplayed,1).orderByDesc(PlayClerkTypeInfoEntity::getSort));
List<PlayClerkTypeInfoEntity> list = clerkTypeInfoService.list(
Wrappers.lambdaQuery(PlayClerkTypeInfoEntity.class).eq(PlayClerkTypeInfoEntity::getHomeDisplayed, 1)
.orderByDesc(PlayClerkTypeInfoEntity::getSort));
return R.ok(list);
}
}

View File

@@ -21,14 +21,13 @@ import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
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;
import javax.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
/**
* 店员工资接口
@@ -50,22 +49,19 @@ public class WxClerkWagesController {
@Resource
private IPlayOrderInfoService playOrderInfoService;
/**
* 店员查询本人未结算工资
* 订单完成之后24小时之后进行订单结算并且一旦订单结算了就无法进行退款。想要退款只能在24小时之内进行。
* 店员查询本人未结算工资 订单完成之后24小时之后进行订单结算并且一旦订单结算了就无法进行退款。想要退款只能在24小时之内进行。
*
* @author admin
* @since 2024/5/31 16:20
**/
@ApiOperation(value = "查询未结算工资", notes = "店员查询本人未结算工资")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = ClerkUnsettledWagesReturnVo.class)
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = ClerkUnsettledWagesReturnVo.class)})
@ClerkUserLogin
@GetMapping("clerk/queryUnsettledWages")
public R clerkQueryUnsettledWages() {
List<PlayOrderInfoEntity> list = playOrderInfoService.queryBySettlementOrder(ThreadLocalRequestDetail.getClerkUserInfo().getId(),"0");
List<PlayOrderInfoEntity> list = playOrderInfoService
.queryBySettlementOrder(ThreadLocalRequestDetail.getClerkUserInfo().getId(), "0");
BigDecimal orderMoney = BigDecimal.ZERO;
BigDecimal estimatedRevenue = BigDecimal.ZERO;
for (PlayOrderInfoEntity entity : list) {
@@ -83,13 +79,12 @@ public class WxClerkWagesController {
* @since 2024/5/31 16:20
**/
@ApiOperation(value = "查询当期工资", notes = "店员查询本人当期工资")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = ClerkCurrentPeriodWagesReturnVo.class)
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = ClerkCurrentPeriodWagesReturnVo.class)})
@ClerkUserLogin
@GetMapping("clerk/queryCurrentPeriodWages")
public R clerkQueryCurrentPeriodWages() {
PlayClerkWagesInfoEntity entity = playClerkWagesInfoService.selectCurrentPeriodWagesByClerkId(ThreadLocalRequestDetail.getClerkUserInfo().getId());
PlayClerkWagesInfoEntity entity = playClerkWagesInfoService
.selectCurrentPeriodWagesByClerkId(ThreadLocalRequestDetail.getClerkUserInfo().getId());
if (entity == null) {
entity = new PlayClerkWagesInfoEntity();
entity.setClerkId(ThreadLocalRequestDetail.getClerkUserInfo().getId());
@@ -103,7 +98,8 @@ public class WxClerkWagesController {
entity.setOrderContinueProportion(0);
entity.setOrderContinueMoney(BigDecimal.ZERO);
}
ClerkCurrentPeriodWagesReturnVo returnVo = ConvertUtil.entityToVo(entity, ClerkCurrentPeriodWagesReturnVo.class);
ClerkCurrentPeriodWagesReturnVo returnVo = ConvertUtil.entityToVo(entity,
ClerkCurrentPeriodWagesReturnVo.class);
returnVo.setTotalMoney(entity.getFinalAmount());
returnVo.setOrderWages(ConvertUtil.entityToVo(entity, OrderWagesReturnVo.class));
return R.ok(returnVo);
@@ -117,12 +113,12 @@ public class WxClerkWagesController {
**/
@ApiOperation(value = "查询历史工资", notes = "店员查询本人历史工资")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = ClerkHistoricalWagesReturnVo.class, responseContainer = "Page")
})
@ApiResponse(code = 200, message = "操作成功", response = ClerkHistoricalWagesReturnVo.class, responseContainer = "Page")})
@ClerkUserLogin
@PostMapping("clerk/queryHistoricalWages")
public R clerkQueryHistoricalWages() {
List<PlayClerkWagesInfoEntity> list = playClerkWagesInfoService.selectHistoricalWagesByClerkId(ThreadLocalRequestDetail.getClerkUserInfo().getId());
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));
@@ -145,9 +141,8 @@ public class WxClerkWagesController {
@ApiOperation(value = "查询工资详情", notes = "店员查询本人工资详情")
@ApiImplicitParam(name = "id", value = "工资ID", required = true, dataType = "String", paramType = "query")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = ClerkWagesDetailsReturnVo.class, responseContainer = "List"),
@ApiResponse(code = 500, message = "ID不能为空")
})
@ApiResponse(code = 200, message = "操作成功", response = ClerkWagesDetailsReturnVo.class, responseContainer = "List"),
@ApiResponse(code = 500, message = "ID不能为空")})
@ClerkUserLogin
@GetMapping("clerk/queryWagesDetails")
public R clerkQueryWagesDetails(@RequestParam("id") String id) {

View File

@@ -1,6 +1,5 @@
package com.starry.admin.modules.weichat.controller;
import com.starry.admin.modules.clerk.module.entity.PlayClerkCommodityEntity;
import com.starry.admin.modules.clerk.service.IPlayClerkCommodityService;
import com.starry.admin.modules.weichat.entity.PlayClerkCommodityTreeData;
@@ -10,18 +9,17 @@ import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import javax.annotation.Resource;
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.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* @author admin
*/
@@ -36,16 +34,16 @@ public class WxCommodityController {
@ApiOperation(value = "获取商品树", notes = "根据用户ID获取商品树形结构")
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "String", paramType = "query")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkCommodityTreeData.class, responseContainer = "List")
})
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkCommodityTreeData.class, responseContainer = "List")})
@GetMapping("/getTree")
public R getTree(@RequestParam("userId") String userId) {
List<PlayClerkCommodityEntity> commodityEntities = clerkCommodityService.selectByUser(userId);
Map<String, List<PlayClerkCommodityEntity>> item = commodityEntities.stream().collect(Collectors.groupingBy(PlayClerkCommodityEntity::getCommodityName));
Map<String, List<PlayClerkCommodityEntity>> item = commodityEntities.stream()
.collect(Collectors.groupingBy(PlayClerkCommodityEntity::getCommodityName));
List<PlayClerkCommodityTreeData> result = new ArrayList<>();
for (Map.Entry<String, List<PlayClerkCommodityEntity>> entry : item.entrySet()) {
PlayClerkCommodityTreeData treeData = new PlayClerkCommodityTreeData(entry.getKey(),entry.getValue());
PlayClerkCommodityTreeData treeData = new PlayClerkCommodityTreeData(entry.getKey(), entry.getValue());
result.add(treeData);
}
return R.ok(result);

View File

@@ -17,17 +17,16 @@ import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import lombok.extern.slf4j.Slf4j;
import me.chanjar.weixin.common.error.WxErrorException;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Files;
import javax.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import me.chanjar.weixin.common.error.WxErrorException;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
/**
* @author admin
@@ -49,41 +48,34 @@ public class WxCommonController {
@Resource
private IShopUiSettingService shopUiSettingService;
@ApiOperation(value = "获取行政区域树", notes = "获取省市区县的树形结构数据")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
@GetMapping("area/tree")
public R areaTree() {
return R.ok(areaDictInfoService.selectTree("2"));
}
@ApiOperation(value = "获取店铺UI设置", notes = "获取当前店铺的UI配置信息")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
@GetMapping("setting/info")
public R selectShopUiSettingInfo() {
return R.ok(shopUiSettingService.selectShopUiSettingInfo());
}
@ApiOperation(value = "上传文件", notes = "上传文件到OSS存储")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功,返回文件访问地址")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功,返回文件访问地址")})
@PostMapping("file/upload")
public R fileUpload(@ApiParam(value = "上传的文件", required = true) @RequestParam("file") MultipartFile file) throws IOException {
String fileAddress = ossFileService.upload(file.getInputStream(), SecurityUtils.getTenantId(), file.getOriginalFilename());
public R fileUpload(@ApiParam(value = "上传的文件", required = true) @RequestParam("file") MultipartFile file)
throws IOException {
String fileAddress = ossFileService.upload(file.getInputStream(), SecurityUtils.getTenantId(),
file.getOriginalFilename());
return R.ok(fileAddress);
}
@ApiOperation(value = "上传音频", notes = "通过微信媒体ID上传音频文件自动转换为MP3格式")
@ApiImplicitParam(name = "mediaId", value = "微信媒体ID", required = true, dataType = "String", paramType = "query")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功,返回文件访问地址"),
@ApiResponse(code = 500, message = "上传失败mediaId为空或文件不存在")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功,返回文件访问地址"),
@ApiResponse(code = 500, message = "上传失败mediaId为空或文件不存在")})
@GetMapping("audio/upload")
public R audioUpload(@RequestParam("mediaId") String mediaId) throws IOException, WxErrorException {
if (StrUtil.isBlankIfStr(mediaId)) {
@@ -92,7 +84,8 @@ public class WxCommonController {
String accessToken = wxAccessTokenService.getAccessToken();
// 下载录音文件并转化为InputStream
InputStream inputStream = WxFileUtils.getTemporaryMaterial(accessToken, mediaId);
File tempFile = FileUtil.createTempFile("wx_" + SecurityUtils.getTenantId(), IdUtils.getUuid() + ".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)) {
@@ -106,13 +99,15 @@ public class WxCommonController {
if (FileUtil.size(tempFile) <= 0) {
throw new CustomException("音频文件上传失败,文件不存在");
}
//将下载的微信素材文件转化为MP3文件
File targetFile = FileUtil.createTempFile("wx_" + SecurityUtils.getTenantId(), IdUtils.getUuid() + ".mp3", null).toFile();
// 将下载的微信素材文件转化为MP3文件
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(), IdUtils.getUuid() + ".mp3");
//删除临时文件
// 将MP3文件上传到OSS
String fileAddress = ossFileService.upload(Files.newInputStream(targetFile.toPath()),
SecurityUtils.getTenantId(), IdUtils.getUuid() + ".mp3");
// 删除临时文件
FileUtil.del(tempFile);
FileUtil.del(targetFile);
return R.ok(fileAddress);

View File

@@ -25,15 +25,14 @@ import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
/**
* @author admin
@@ -45,7 +44,6 @@ import java.util.Map;
@RequestMapping("/wx/coupon/")
public class WxCouponController {
@Resource
IPlayCouponDetailsService couponDetailsService;
@@ -58,13 +56,10 @@ public class WxCouponController {
@Resource
private IPlayCommodityInfoService playCommodityInfoService;
@ApiOperation(value = "领取优惠券", notes = "顾客领取指定ID的优惠券")
@ApiImplicitParam(name = "id", value = "优惠券ID", required = true, dataType = "String", paramType = "query")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = Map.class),
@ApiResponse(code = 500, message = "请求参数异常,优惠券ID不能为空")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = Map.class),
@ApiResponse(code = 500, message = "请求参数异常,优惠券ID不能为空")})
@CustomUserLogin
@GetMapping("/custom/obtainCoupon")
public R queryAll(@RequestParam("id") String id) {
@@ -77,7 +72,8 @@ public class WxCouponController {
boolean success = StrUtil.isBlank(msg);
// 优惠券领取验证通过,发放优惠券
if (success) {
couponDetailsService.create(customUserInfo.getId(), customUserInfo.getNickname(), customUserInfo.getLevelId(), entity.getId(), "1", "1");
couponDetailsService.create(customUserInfo.getId(), customUserInfo.getNickname(),
customUserInfo.getLevelId(), entity.getId(), "1", "1");
}
Map<String, Object> result = new HashMap<>();
result.put("success", success);
@@ -85,7 +81,6 @@ public class WxCouponController {
return R.ok(result);
}
/**
* 查询所有优惠券,以及本人是否可领取
*
@@ -95,12 +90,12 @@ public class WxCouponController {
**/
@ApiOperation(value = "查询所有优惠券", notes = "查询所有优惠券并标记用户是否已领取")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = WxCouponReceiveReturnVo.class, responseContainer = "List")
})
@ApiResponse(code = 200, message = "操作成功", response = WxCouponReceiveReturnVo.class, responseContainer = "List")})
@CustomUserLogin
@PostMapping("/custom/queryAll")
public R queryAll() {
List<PlayCouponDetailsReturnVo> obtainedCoupons = couponDetailsService.selectByCustomId(ThreadLocalRequestDetail.getCustomUserInfo().getId());
List<PlayCouponDetailsReturnVo> obtainedCoupons = couponDetailsService
.selectByCustomId(ThreadLocalRequestDetail.getCustomUserInfo().getId());
List<PlayCouponInfoEntity> couponInfoEntities = couponInfoService.queryAll();
List<WxCouponReceiveReturnVo> returnVos = new ArrayList<>(couponInfoEntities.size());
for (PlayCouponInfoEntity couponInfoEntity : couponInfoEntities) {
@@ -118,18 +113,17 @@ public class WxCouponController {
return R.ok(returnVos);
}
/**
* 顾客查询订单可使用优惠券
*/
@ApiOperation(value = "查询订单可用优惠券", notes = "查询当前订单可使用的优惠券列表")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = WxCouponOrderReturnVo.class, responseContainer = "List"),
@ApiResponse(code = 500, message = "请求参数异常,店员ID不能为空,等级ID不能为空")
})
@ApiResponse(code = 200, message = "操作成功", response = WxCouponOrderReturnVo.class, responseContainer = "List"),
@ApiResponse(code = 500, message = "请求参数异常,店员ID不能为空,等级ID不能为空")})
@CustomUserLogin
@PostMapping("/custom/queryByOrder")
public R queryByOrder(@ApiParam(value = "订单查询条件", required = true) @Validated @RequestBody WxCouponOrderQueryVo vo) {
public R queryByOrder(
@ApiParam(value = "订单查询条件", required = true) @Validated @RequestBody WxCouponOrderQueryVo vo) {
if (vo.getLevelId().isEmpty() && vo.getClerkId().isEmpty()) {
throw new CustomException("请求参数异常,店员ID不能为空,等级ID不能为空");
}
@@ -139,14 +133,17 @@ public class WxCouponController {
levelId = clerkUserInfo.getLevelId();
}
log.info(JSON.toJSONString(vo));
List<PlayCouponDetailsReturnVo> list = couponDetailsService.selectByCustomId(ThreadLocalRequestDetail.getCustomUserInfo().getId());
List<PlayCouponDetailsReturnVo> list = couponDetailsService
.selectByCustomId(ThreadLocalRequestDetail.getCustomUserInfo().getId());
PlayCommodityInfoVo commodityInfo = playCommodityInfoService.queryCommodityInfo(vo.getCommodityId(), levelId);
// 优惠券列表
List<WxCouponOrderReturnVo> couponReturnVos = new ArrayList<>();
for (PlayCouponDetailsReturnVo couponDetails : list) {
PlayCouponInfoEntity couponInfo = couponInfoService.selectPlayCouponInfoById(couponDetails.getCouponId());
WxCouponOrderReturnVo wxCouponReturnVo = ConvertUtil.entityToVo(couponDetails, WxCouponOrderReturnVo.class);
String couponReasonForUnavailableUse = couponInfoService.getCouponReasonForUnavailableUse(couponInfo, vo.getPlaceType(), vo.getCommodityId(), vo.getCommodityQuantity(), commodityInfo.getCommodityPrice());
String couponReasonForUnavailableUse = couponInfoService.getCouponReasonForUnavailableUse(couponInfo,
vo.getPlaceType(), vo.getCommodityId(), vo.getCommodityQuantity(),
commodityInfo.getCommodityPrice());
if (StrUtil.isEmpty(couponReasonForUnavailableUse)) {
wxCouponReturnVo.setAvailable("1");
} else {
@@ -158,6 +155,4 @@ public class WxCouponController {
return R.ok(couponReturnVos);
}
}

View File

@@ -1,6 +1,5 @@
package com.starry.admin.modules.weichat.controller;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -55,16 +54,15 @@ import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
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;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.Objects;
import javax.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
/**
* @author admin
@@ -108,7 +106,6 @@ public class WxCustomController {
@Resource
private IPlayOrderEvaluateInfoService playOrderEvaluateInfoService;
@Resource
private IPlayCustomGiftInfoService playCustomGiftInfoService;
@@ -126,18 +123,16 @@ public class WxCustomController {
@Resource
OverdueOrderHandlerTask overdueOrderHandlerTask;
/**
* 根据店员ID查询店员详细信息
*
* @param id 店员ID
* @param id
* 店员ID
* @return 店员详细信息
*/
@ApiOperation(value = "查询店员详细信息", notes = "根据店员ID查询店员的详细信息")
@ApiImplicitParam(name = "id", value = "店员ID", required = true, dataType = "String", paramType = "query")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkUserInfoResultVo.class)
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = PlayClerkUserInfoResultVo.class)})
@GetMapping("/queryClerkDetailedById")
public R queryClerkDetailedById(@RequestParam("id") String id) {
PlayClerkUserInfoEntity entity = clerkUserInfoService.selectById(id);
@@ -157,9 +152,7 @@ public class WxCustomController {
* 顾客本人刷新头像
*/
@ApiOperation(value = "刷新顾客头像", notes = "刷新当前登录顾客的头像信息")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
@CustomUserLogin
@GetMapping("/refreshAvatar")
public R refreshAvatar() {
@@ -170,9 +163,7 @@ public class WxCustomController {
* 根据顾客ID查询当前顾客详细信息
*/
@ApiOperation(value = "查询顾客详细信息", notes = "查询当前登录顾客的详细信息")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayCustomUserReturnDetailVo.class)
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = PlayCustomUserReturnDetailVo.class)})
@CustomUserLogin
@GetMapping("/queryById")
public R queryById() {
@@ -190,12 +181,11 @@ public class WxCustomController {
* 顾客本人修改隐藏等级状态
*/
@ApiOperation(value = "修改隐藏等级状态", notes = "顾客修改自己的隐藏等级状态")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
@CustomUserLogin
@PostMapping("/updateHideLevelState")
public R updateHideLevelState(@ApiParam(value = "隐藏等级状态信息", required = true) @Validated @RequestBody PlayCustomHideLevelStateEditVo vo) {
public R updateHideLevelState(
@ApiParam(value = "隐藏等级状态信息", required = true) @Validated @RequestBody PlayCustomHideLevelStateEditVo vo) {
vo.setId(ThreadLocalRequestDetail.getCustomUserInfo().getId());
PlayCustomUserInfoEntity entity = new PlayCustomUserInfoEntity();
BeanUtils.copyProperties(vo, entity);
@@ -207,12 +197,11 @@ public class WxCustomController {
* 顾客本人修改隐藏排名状态
*/
@ApiOperation(value = "修改隐藏排名状态", notes = "顾客修改自己的隐藏排名状态")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
@CustomUserLogin
@PostMapping("/updateHideRankingState")
public R updateHideRankingState(@ApiParam(value = "隐藏排名状态信息", required = true) @Validated @RequestBody PlayCustomHideRankingStateEditVo vo) {
public R updateHideRankingState(
@ApiParam(value = "隐藏排名状态信息", required = true) @Validated @RequestBody PlayCustomHideRankingStateEditVo vo) {
vo.setId(ThreadLocalRequestDetail.getCustomUserInfo().getId());
PlayCustomUserInfoEntity entity = new PlayCustomUserInfoEntity();
BeanUtils.copyProperties(vo, entity);
@@ -220,18 +209,15 @@ public class WxCustomController {
return R.ok("成功");
}
/**
* 打赏店员-打赏余额
*/
@ApiOperation(value = "打赏店员", notes = "使用余额打赏店员")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功"),
@ApiResponse(code = 998, message = "余额不足")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 998, message = "余额不足")})
@CustomUserLogin
@PostMapping("/order/reward")
public R rewardToOrder(@ApiParam(value = "打赏信息", required = true) @Validated @RequestBody PlayOrderInfoRewardAdd vo) {
public R rewardToOrder(
@ApiParam(value = "打赏信息", required = true) @Validated @RequestBody PlayOrderInfoRewardAdd vo) {
MoneyUtils.verificationTypeIsNormal(vo.getMoney());
String userId = ThreadLocalRequestDetail.getCustomUserInfo().getId();
PlayCustomUserInfoEntity customUserInfo = customUserInfoService.selectById(userId);
@@ -240,21 +226,22 @@ public class WxCustomController {
}
String orderId = IdUtils.getUuid();
// 记录订单信息
playOrderInfoService.createOrderInfo(orderId, playOrderInfoService.getOrderNo(), "3", "2", "2", "0", "1", "", "0", BigDecimal.ZERO, "", "", "0", new BigDecimal(vo.getMoney()), new BigDecimal(vo.getMoney()), BigDecimal.ZERO, userId, vo.getClerkId(), vo.getWeiChatCode(), new ArrayList<>(), vo.getRemark(), "", "", "");
playOrderInfoService.createOrderInfo(orderId, playOrderInfoService.getOrderNo(), "3", "2", "2", "0", "1", "",
"0", BigDecimal.ZERO, "", "", "0", new BigDecimal(vo.getMoney()), new BigDecimal(vo.getMoney()),
BigDecimal.ZERO, userId, vo.getClerkId(), vo.getWeiChatCode(), new ArrayList<>(), vo.getRemark(), "",
"", "");
// 顾客减少余额
customUserInfoService.updateAccountBalanceById(customUserInfo.getId(), customUserInfo.getAccountBalance(), customUserInfo.getAccountBalance().subtract(new BigDecimal(vo.getMoney())), "1", "打赏", new BigDecimal(vo.getMoney()), BigDecimal.ZERO, orderId);
customUserInfoService.updateAccountBalanceById(customUserInfo.getId(), customUserInfo.getAccountBalance(),
customUserInfo.getAccountBalance().subtract(new BigDecimal(vo.getMoney())), "1", "打赏",
new BigDecimal(vo.getMoney()), BigDecimal.ZERO, orderId);
return R.ok("成功");
}
/**
* 顾客下单-赠送礼物
**/
@ApiOperation(value = "赠送礼物", notes = "顾客向店员赠送礼物")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功"),
@ApiResponse(code = 998, message = "余额不足")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 998, message = "余额不足")})
@CustomUserLogin
@PostMapping("/order/gift")
public R giftToOdder(@ApiParam(value = "礼物信息", required = true) @Validated @RequestBody PlayOrderInfoGiftAdd vo) {
@@ -267,12 +254,17 @@ public class WxCustomController {
}
String orderId = IdUtils.getUuid();
// 记录订单信息
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(), new ArrayList<>(), vo.getRemark(), "", "", "");
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(), new ArrayList<>(), vo.getRemark(), "", "", "");
// 顾客减少余额
customUserInfoService.updateAccountBalanceById(customUserInfo.getId(), customUserInfo.getAccountBalance(), customUserInfo.getAccountBalance().subtract(money), "1", "赠送礼物", money, BigDecimal.ZERO, orderId);
customUserInfoService.updateAccountBalanceById(customUserInfo.getId(), customUserInfo.getAccountBalance(),
customUserInfo.getAccountBalance().subtract(money), "1", "赠送礼物", money, BigDecimal.ZERO, orderId);
// 陪聊增加余额
// 修改顾客和礼物消息
PlayCustomGiftInfoEntity customGiftInfoEntity = playCustomGiftInfoService.selectByGiftIdAndCustomId(vo.getGiftId(), userId);
PlayCustomGiftInfoEntity customGiftInfoEntity = playCustomGiftInfoService
.selectByGiftIdAndCustomId(vo.getGiftId(), userId);
if (customGiftInfoEntity == null) {
customGiftInfoEntity = new PlayCustomGiftInfoEntity();
customGiftInfoEntity.setGiffId(vo.getGiftId());
@@ -285,7 +277,8 @@ public class WxCustomController {
}
// 修改陪玩和礼物数据
PlayClerkGiftInfoEntity clerkGiftInfoEntity = playClerkGiftInfoService.selectByGiftIdAndClerkId(vo.getGiftId(), vo.getClerkId());
PlayClerkGiftInfoEntity clerkGiftInfoEntity = playClerkGiftInfoService.selectByGiftIdAndClerkId(vo.getGiftId(),
vo.getClerkId());
if (clerkGiftInfoEntity == null) {
clerkGiftInfoEntity = new PlayClerkGiftInfoEntity();
clerkGiftInfoEntity.setGiffId(vo.getGiftId());
@@ -300,28 +293,27 @@ public class WxCustomController {
return R.ok("成功");
}
/**
* 新增指定订单
*
* @param vo 指定订单查询对象
* @param vo
* 指定订单查询对象
* @return com.starry.common.result.R
* @author admin
* @since 2024/5/8 16:31
**/
@ApiOperation(value = "商品下单", notes = "顾客购买店员服务商品")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功"),
@ApiResponse(code = 998, message = "余额不足"),
@ApiResponse(code = 500, message = "请求参数异常")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 998, message = "余额不足"),
@ApiResponse(code = 500, message = "请求参数异常")})
@CustomUserLogin
@PostMapping("/order/commodity")
public R commodityToOrdder(@ApiParam(value = "商品订单信息", required = true) @Validated @RequestBody PlayOrderInfoCommodityAdd vo) {
public R commodityToOrdder(
@ApiParam(value = "商品订单信息", required = true) @Validated @RequestBody PlayOrderInfoCommodityAdd vo) {
String customId = ThreadLocalRequestDetail.getCustomUserInfo().getId();
PlayClerkUserInfoEntity clerkUserInfo = clerkUserInfoService.selectById(vo.getClerkId());
PlayCommodityInfoVo commodityInfo = playCommodityInfoService.queryCommodityInfo(vo.getCommodityId(), clerkUserInfo.getLevelId());
PlayCommodityInfoVo commodityInfo = playCommodityInfoService.queryCommodityInfo(vo.getCommodityId(),
clerkUserInfo.getLevelId());
BigDecimal couponMoney = BigDecimal.ZERO;
for (String couponId : vo.getCouponIds()) {
@@ -329,8 +321,10 @@ public class WxCustomController {
if (Objects.isNull(couponDetailsEntity)) {
throw new CustomException("优惠券不存在");
}
PlayCouponInfoEntity couponInfo = playCouponInfoService.selectPlayCouponInfoById(couponDetailsEntity.getCouponId());
String couponReasonForUnavailableUse = playCouponInfoService.getCouponReasonForUnavailableUse(couponInfo, "0", vo.getCommodityId(), vo.getCommodityQuantity(), commodityInfo.getCommodityPrice());
PlayCouponInfoEntity couponInfo = playCouponInfoService
.selectPlayCouponInfoById(couponDetailsEntity.getCouponId());
String couponReasonForUnavailableUse = playCouponInfoService.getCouponReasonForUnavailableUse(couponInfo,
"0", vo.getCommodityId(), vo.getCommodityQuantity(), commodityInfo.getCommodityPrice());
if (StrUtil.isNotBlank(couponReasonForUnavailableUse)) {
throw new CustomException("优惠券不可用");
}
@@ -339,7 +333,6 @@ public class WxCustomController {
}
}
PlayCustomUserInfoEntity customUserInfo = customUserInfoService.selectById(customId);
BigDecimal money = commodityInfo.getCommodityPrice().multiply(new BigDecimal(vo.getCommodityQuantity()));
@@ -355,19 +348,25 @@ public class WxCustomController {
String orderId = IdUtils.getUuid();
String orderNo = playOrderInfoService.getOrderNo();
// 记录订单信息
playOrderInfoService.createOrderInfo(orderId, orderNo, "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.getCouponIds(), vo.getRemark(), "", "", "");
playOrderInfoService.createOrderInfo(orderId, orderNo, "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.getCouponIds(),
vo.getRemark(), "", "", "");
// 顾客减少余额
customUserInfoService.updateAccountBalanceById(customUserInfo.getId(), customUserInfo.getAccountBalance(), customUserInfo.getAccountBalance().subtract(money), "1", "下单-指定单", money, BigDecimal.ZERO, orderId);
customUserInfoService.updateAccountBalanceById(customUserInfo.getId(), customUserInfo.getAccountBalance(),
customUserInfo.getAccountBalance().subtract(money), "1", "下单-指定单", money, BigDecimal.ZERO, orderId);
// 发送通知给店员
wxCustomMpService.sendCreateOrderMessage(clerkUserInfo.getTenantId(), clerkUserInfo.getOpenid(), orderNo, money.toString(), commodityInfo.getCommodityName());
wxCustomMpService.sendCreateOrderMessage(clerkUserInfo.getTenantId(), clerkUserInfo.getOpenid(), orderNo,
money.toString(), commodityInfo.getCommodityName());
return R.ok("成功");
}
/**
* 新增随机订单
*
* @param vo 随机单创建对象
* @param vo
* 随机单创建对象
* @return R
*/
@CustomUserLogin
@@ -376,27 +375,34 @@ public class WxCustomController {
// 验证当前顾客余额是否充足
String customId = ThreadLocalRequestDetail.getCustomUserInfo().getId();
PlayCustomUserInfoEntity customUserInfo = customUserInfoService.selectById(customId);
PlayCommodityInfoVo commodityInfo = playCommodityInfoService.queryCommodityInfo(vo.getCommodityId(), vo.getLevelId());
PlayCommodityInfoVo commodityInfo = playCommodityInfoService.queryCommodityInfo(vo.getCommodityId(),
vo.getLevelId());
BigDecimal money = commodityInfo.getCommodityPrice().multiply(new BigDecimal(vo.getCommodityQuantity()));
if (money.compareTo(customUserInfo.getAccountBalance()) > 0) {
throw new ServiceException("余额不足", 998);
}
String orderId = IdUtils.getUuid();
// 记录订单信息
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.getCouponIds(), vo.getRemark(), vo.getSex(), vo.getLevelId(), vo.getExcludeHistory());
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.getCouponIds(), vo.getRemark(), vo.getSex(), vo.getLevelId(),
vo.getExcludeHistory());
// 顾客减少余额
customUserInfoService.updateAccountBalanceById(customUserInfo.getId(), customUserInfo.getAccountBalance(), customUserInfo.getAccountBalance().subtract(money), "1", "下单-随机单", money, BigDecimal.ZERO, orderId);
customUserInfoService.updateAccountBalanceById(customUserInfo.getId(), customUserInfo.getAccountBalance(),
customUserInfo.getAccountBalance().subtract(money), "1", "下单-随机单", money, BigDecimal.ZERO, orderId);
// 记录订单,指定指定未接单后,进行退款处理
overdueOrderHandlerTask.enqueue(orderId + "_" + SecurityUtils.getTenantId());
// 下单成功后,先根据用户条件进行随机分配
return R.ok("下单成功");
}
/**
* 顾客分页查询本人订单列表
*
* @param vo 订单列表分页查询对象
* @param vo
* 订单列表分页查询对象
* @return com.starry.common.result.R
* @author admin
* @since 2024/5/8 15:57
@@ -412,7 +418,8 @@ public class WxCustomController {
/**
* 顾客分页查询本人订单详细信息
*
* @param id 订单ID
* @param id
* 订单ID
* @return com.starry.common.result.R
* @author admin
* @since 2024/5/8 15:57
@@ -420,15 +427,16 @@ public class WxCustomController {
@CustomUserLogin
@GetMapping("/order/queryById")
public R queryById(@RequestParam("id") String id) {
PlayCustomOrderDetailsReturnVo vo = playOrderInfoService.customSelectOrderDetails(ThreadLocalRequestDetail.getCustomUserInfo().getId(), id);
PlayCustomOrderDetailsReturnVo vo = playOrderInfoService
.customSelectOrderDetails(ThreadLocalRequestDetail.getCustomUserInfo().getId(), id);
return R.ok(vo);
}
/**
* 顾客-完成订单
*
* @param id 订单ID
* @param id
* 订单ID
* @return com.starry.common.result.R
* @author admin
* @since 2024/5/8 15:57
@@ -440,11 +448,11 @@ public class WxCustomController {
return R.ok("成功");
}
/**
* 顾客取消订单
*
* @param vo 订单取消对象
* @param vo
* 订单取消对象
* @return com.starry.common.result.R
* @author admin
* @since 2024/5/8 15:57
@@ -452,14 +460,16 @@ public class WxCustomController {
@CustomUserLogin
@PostMapping("/order/cancellation")
public R cancellationOrder(@Validated @RequestBody PlayOrderCancellationVo vo) {
playOrderInfoService.updateStateTo4("0", ThreadLocalRequestDetail.getCustomUserInfo().getId(), vo.getOrderId(), vo.getRefundReason(), vo.getImages());
playOrderInfoService.updateStateTo4("0", ThreadLocalRequestDetail.getCustomUserInfo().getId(), vo.getOrderId(),
vo.getRefundReason(), vo.getImages());
return R.ok("取消成功");
}
/**
* 新增订单评价信息
*
* @param vo 订单评价信息实体
* @param vo
* 订单评价信息实体
* @return com.starry.common.result.R
* @author admin
* @since 2024/5/8 15:57
@@ -480,7 +490,8 @@ public class WxCustomController {
/**
* 根据订单ID查询当前顾客对当前人的评价
*
* @param orderId 订单ID
* @param orderId
* 订单ID
* @return com.starry.common.result.R
* @author admin
* @since 2024/5/8 15:57
@@ -488,18 +499,19 @@ public class WxCustomController {
@CustomUserLogin
@GetMapping("/order/evaluate/queryByOrderId")
public R addOrderEvaluateByOrderId(@RequestParam("id") String orderId) {
PlayOrderEvaluateInfoEntity orderEvaluateInfo = playOrderEvaluateInfoService.queryCustomToOrderEvaluateInfo(ThreadLocalRequestDetail.getCustomUserInfo().getId(), orderId);
PlayOrderEvaluateInfoEntity orderEvaluateInfo = playOrderEvaluateInfoService
.queryCustomToOrderEvaluateInfo(ThreadLocalRequestDetail.getCustomUserInfo().getId(), orderId);
if (orderEvaluateInfo == null) {
throw new CustomException("当前订单未评价");
}
return R.ok(ConvertUtil.entityToVo(orderEvaluateInfo, PlayCustomOrderEvaluateReturnVo.class));
}
/**
* 新增订单投诉信息
*
* @param vo 订单评价信息实体
* @param vo
* 订单评价信息实体
* @return com.starry.common.result.R
* @author admin
* @since 2024/5/8 15:57
@@ -517,11 +529,11 @@ public class WxCustomController {
return R.ok("新增成功");
}
/**
* 顾客新增留言
*
* @param vo 顾客新增留言对象
* @param vo
* 顾客新增留言对象
* @return com.starry.common.result.R
* @author admin
* @since 2024/5/8 15:57
@@ -547,7 +559,8 @@ public class WxCustomController {
@GetMapping("/leave/queryPermission")
public R queryLeavePermission() {
// 不允许留言的原因,如果原因为空,说明允许留言
String noMessagesAllowedReason = playCustomLeaveMsgService.queryNoMessagesAllowedReason(ThreadLocalRequestDetail.getCustomUserInfo().getId());
String noMessagesAllowedReason = playCustomLeaveMsgService
.queryNoMessagesAllowedReason(ThreadLocalRequestDetail.getCustomUserInfo().getId());
if (StringUtils.isEmpty(noMessagesAllowedReason)) {
JSONObject jsonObject = new JSONObject();
jsonObject.put("permission", true);
@@ -561,11 +574,11 @@ public class WxCustomController {
}
}
/**
* 顾客修改对陪玩的关注状态
*
* @param vo 陪玩的关注状态对象
* @param vo
* 陪玩的关注状态对象
* @return com.starry.common.result.R
* @author admin
* @since 2024/5/8 15:57
@@ -574,14 +587,16 @@ public class WxCustomController {
@PostMapping("/followState/update")
public R followStateUpdate(@Validated @RequestBody PlayClerkFollowStateUpdate vo) {
PlayClerkUserInfoEntity clerkUserInfo = clerkUserInfoService.selectById(vo.getClerkId());
playCustomFollowInfoService.updateFollowState(ThreadLocalRequestDetail.getCustomUserInfo().getId(), clerkUserInfo.getId(), vo.getFollowState());
playCustomFollowInfoService.updateFollowState(ThreadLocalRequestDetail.getCustomUserInfo().getId(),
clerkUserInfo.getId(), vo.getFollowState());
return R.ok("修改成功");
}
/**
* 顾客查询已关注陪聊列表
*
* @param vo 陪玩的关注状态对象
* @param vo
* 陪玩的关注状态对象
* @return com.starry.common.result.R
* @author admin
* @since 2024/5/8 15:57
@@ -594,5 +609,4 @@ public class WxCustomController {
return R.ok(iPage);
}
}

View File

@@ -1,6 +1,5 @@
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.aspect.CustomUserLogin;
@@ -16,15 +15,14 @@ import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import java.util.List;
import javax.annotation.Resource;
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
*/
@@ -43,26 +41,24 @@ public class WxGiftController {
*/
@ApiOperation(value = "查询所有礼物", notes = "查询系统中所有礼物列表")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayGiftInfoDto.class, responseContainer = "List")
})
@ApiResponse(code = 200, message = "操作成功", response = PlayGiftInfoDto.class, responseContainer = "List")})
@GetMapping("/listByAll")
public R customListByAll() {
return R.ok(ConvertUtil.entityToVoList(giftInfoService.listByAll(),PlayGiftInfoDto.class));
return R.ok(ConvertUtil.entityToVoList(giftInfoService.listByAll(), PlayGiftInfoDto.class));
}
/**
* 顾客查询礼物列表
*
* @param obtained 店员获得礼物状态,[0:未获得,1:已获得]
* @param obtained
* 店员获得礼物状态,[0:未获得,1:已获得]
* @return 礼物列表
*/
@ApiOperation(value = "店员查询礼物", notes = "根据获得状态查询店员礼物列表")
@ApiImplicitParam(name = "obtained", value = "获得状态[0:未获得,1:已获得]", required = true, dataType = "String", paramType = "query", allowableValues = "0,1")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkGiftReturnVo.class, responseContainer = "List"),
@ApiResponse(code = 500, message = "obtained参数异常")
})
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkGiftReturnVo.class, responseContainer = "List"),
@ApiResponse(code = 500, message = "obtained参数异常")})
@ClerkUserLogin
@GetMapping("/clerk/listByAll")
public R clerkListByAll(@RequestParam("obtained") String obtained) {
@@ -72,23 +68,23 @@ public class WxGiftController {
if (!"0".equals(obtained) && !"1".equals(obtained)) {
throw new CustomException("obtained参数异常");
}
List<PlayClerkGiftReturnVo> list = giftInfoService.clerkListByAll(ThreadLocalRequestDetail.getClerkUserInfo().getId(), obtained);
List<PlayClerkGiftReturnVo> list = giftInfoService
.clerkListByAll(ThreadLocalRequestDetail.getClerkUserInfo().getId(), obtained);
return R.ok(list);
}
/**
* 顾客获取礼物图鉴信息
*
* @param vo 顾客获得礼物查询对象
* @param vo
* 顾客获得礼物查询对象
* @return 礼物列表
*/
@ApiOperation(value = "顾客查询礼物", notes = "根据获得状态查询顾客礼物列表")
@ApiImplicitParam(name = "obtained", value = "获得状态[0:未获得,1:已获得]", required = true, dataType = "String", paramType = "query", allowableValues = "0,1")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkGiftReturnVo.class, responseContainer = "List"),
@ApiResponse(code = 500, message = "obtained参数异常")
})
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkGiftReturnVo.class, responseContainer = "List"),
@ApiResponse(code = 500, message = "obtained参数异常")})
@CustomUserLogin
@GetMapping("/custom/listByAll")
public R customListByAll(@RequestParam("obtained") String obtained) {
@@ -98,9 +94,9 @@ public class WxGiftController {
if (!"0".equals(obtained) && !"1".equals(obtained)) {
throw new CustomException("obtained参数异常");
}
List<PlayClerkGiftReturnVo> list = giftInfoService.customListByAll(ThreadLocalRequestDetail.getCustomUserInfo().getId(), obtained);
List<PlayClerkGiftReturnVo> list = giftInfoService
.customListByAll(ThreadLocalRequestDetail.getCustomUserInfo().getId(), obtained);
return R.ok(list);
}
}

View File

@@ -1,6 +1,5 @@
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;
@@ -10,16 +9,15 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Resource;
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
*/
@@ -32,14 +30,12 @@ public class WxLevelController {
@Resource
private IPlayCustomLevelInfoService levelInfoService;
/**
* 顾客查询登记列表
*/
@ApiOperation(value = "查询等级列表", notes = "查询所有顾客等级列表")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayCustomLevelInfoReturnVo.class, responseContainer = "List")
})
@ApiResponse(code = 200, message = "操作成功", response = PlayCustomLevelInfoReturnVo.class, responseContainer = "List")})
@CustomUserLogin
@GetMapping("/custom/queryAll")
public R queryById() {
@@ -53,5 +49,4 @@ public class WxLevelController {
return R.ok(result);
}
}

View File

@@ -1,5 +1,7 @@
package com.starry.admin.modules.weichat.controller;
import static com.starry.common.constant.Constants.*;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson2.JSONObject;
@@ -24,17 +26,14 @@ import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import java.util.Date;
import javax.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import me.chanjar.weixin.common.bean.WxJsapiSignature;
import me.chanjar.weixin.common.error.WxErrorException;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.Date;
import static com.starry.common.constant.Constants.*;
/**
* 微信用户
*
@@ -47,7 +46,6 @@ import static com.starry.common.constant.Constants.*;
@RequestMapping("/wx/oauth2")
public class WxOauthController {
@Resource
private WxCustomMpService wxCustomMpService;
@Resource
@@ -61,13 +59,11 @@ public class WxOauthController {
@Resource
private RedisCache redisCache;
@ApiOperation(value = "获取配置地址", notes = "获取微信JSAPI配置签名")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = WxJsapiSignature.class)
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = WxJsapiSignature.class)})
@PostMapping("/getConfigAddress")
public R getConfigAddress(@ApiParam(value = "地址查询信息", required = true) @RequestBody WxUserQueryAddressVo vo) throws WxErrorException {
public R getConfigAddress(@ApiParam(value = "地址查询信息", required = true) @RequestBody WxUserQueryAddressVo vo)
throws WxErrorException {
// 默认回调地址
String defaultAddress = "https://julyharbor.com/api/wx/oauth2/clerkLoginCallback";
if (!StrUtil.isBlankIfStr(vo.getUrl())) {
@@ -78,9 +74,7 @@ public class WxOauthController {
}
@ApiOperation(value = "获取店员登录地址", notes = "获取微信店员授权登录地址")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = String.class)
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = String.class)})
@PostMapping("/getClerkLoginAddress")
public R getClerkLoginAddress(@ApiParam(value = "地址查询信息", required = true) @RequestBody WxUserQueryAddressVo vo) {
// 默认回调地址
@@ -88,24 +82,20 @@ public class WxOauthController {
if (!StrUtil.isBlankIfStr(vo.getUrl())) {
defaultAddress = vo.getUrl();
}
String url = wxCustomMpService.proxyWxMpService().getOAuth2Service().buildAuthorizationUrl(defaultAddress, "snsapi_userinfo", "STATE");
String url = wxCustomMpService.proxyWxMpService().getOAuth2Service().buildAuthorizationUrl(defaultAddress,
"snsapi_userinfo", "STATE");
return R.ok(url);
}
@ApiOperation(value = "店员登录回调", notes = "微信店员授权登录回调处理")
@ApiImplicitParam(name = "code", value = "授权码", required = true, dataType = "String", paramType = "query")
@GetMapping("/clerkLoginCallback")
public void clerkLoginCallback(@RequestParam("code") String code) {
}
@ApiOperation(value = "店员登录", notes = "微信店员授权登录")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = JSONObject.class),
@ApiResponse(code = 401, message = "登录失败"),
@ApiResponse(code = 500, message = "用户不存在")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = JSONObject.class),
@ApiResponse(code = 401, message = "登录失败"), @ApiResponse(code = 500, message = "用户不存在")})
@PostMapping("/clerk/login")
public R clerkLogin(@ApiParam(value = "登录信息", required = true) @Validated @RequestBody WxUserLoginVo vo) {
try {
@@ -132,11 +122,8 @@ public class WxOauthController {
}
@ApiOperation(value = "店员开发登录", notes = "微信店员开发环境登录(固定用户)")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = JSONObject.class),
@ApiResponse(code = 401, message = "登录失败"),
@ApiResponse(code = 500, message = "用户不存在")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = JSONObject.class),
@ApiResponse(code = 401, message = "登录失败"), @ApiResponse(code = 500, message = "用户不存在")})
@PostMapping("/clerk/login/dev")
public R clerkLoginDev(@ApiParam(value = "登录信息", required = true) @Validated @RequestBody WxUserLoginVo vo) {
try {
@@ -163,10 +150,8 @@ public class WxOauthController {
}
@ApiOperation(value = "店员ID登录", notes = "根据店员ID直接登录")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = JSONObject.class),
@ApiResponse(code = 500, message = "用户不存在")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = JSONObject.class),
@ApiResponse(code = 500, message = "用户不存在")})
@PostMapping("/clerk/loginById")
public R loginById(@ApiParam(value = "登录信息", required = true) @Validated @RequestBody WxUserLoginVo vo) {
PlayClerkUserInfoEntity entity = clerkUserInfoService.selectById(vo.getCode());
@@ -186,9 +171,7 @@ public class WxOauthController {
}
@ApiOperation(value = "店员登出", notes = "店员退出登录")
@ApiResponses({
@ApiResponse(code = 200, message = "登出成功")
})
@ApiResponses({@ApiResponse(code = 200, message = "登出成功")})
@ClerkUserLogin
@GetMapping("/clerk/logout")
public R clerkLogout() {
@@ -196,11 +179,8 @@ public class WxOauthController {
return R.ok("登出成功");
}
@ApiOperation(value = "获取顾客登录地址", notes = "获取微信顾客授权登录地址")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = String.class)
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = String.class)})
@PostMapping("/getCustomLoginAddress")
public R getCustomLoginAddress(@ApiParam(value = "地址查询信息", required = true) @RequestBody WxUserQueryAddressVo vo) {
// 默认回调地址
@@ -208,7 +188,8 @@ public class WxOauthController {
if (!StrUtil.isBlankIfStr(vo.getUrl())) {
defaultAddress = vo.getUrl();
}
String url = wxCustomMpService.proxyWxMpService().getOAuth2Service().buildAuthorizationUrl(defaultAddress, "snsapi_userinfo", "STATE");
String url = wxCustomMpService.proxyWxMpService().getOAuth2Service().buildAuthorizationUrl(defaultAddress,
"snsapi_userinfo", "STATE");
return R.ok(url);
}
@@ -219,13 +200,9 @@ public class WxOauthController {
}
@ApiOperation(value = "顾客登录", notes = "微信顾客授权登录")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = JSONObject.class),
@ApiResponse(code = 401, message = "登录失败"),
@ApiResponse(code = 500, message = "用户不存在")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = JSONObject.class),
@ApiResponse(code = 401, message = "登录失败"), @ApiResponse(code = 500, message = "用户不存在")})
@PostMapping("/custom/login")
public R customLogin(@ApiParam(value = "登录信息", required = true) @Validated @RequestBody WxUserLoginVo vo) {
log.info("顾客登录接口调用code = {}", vo.getCode());
@@ -252,10 +229,8 @@ public class WxOauthController {
}
@ApiOperation(value = "顾客ID登录", notes = "根据顾客ID直接登录")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = JSONObject.class),
@ApiResponse(code = 500, message = "用户不存在")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = JSONObject.class),
@ApiResponse(code = 500, message = "用户不存在")})
@PostMapping("/custom/loginById")
public R loginById1(@ApiParam(value = "登录信息", required = true) @Validated @RequestBody WxUserLoginVo vo) {
PlayCustomUserInfoEntity entity = customUserInfoService.selectById(vo.getCode());
@@ -274,11 +249,8 @@ public class WxOauthController {
return R.ok(jsonObject);
}
@ApiOperation(value = "顾客登出", notes = "顾客退出登录")
@ApiResponses({
@ApiResponse(code = 200, message = "登出成功")
})
@ApiResponses({@ApiResponse(code = 200, message = "登出成功")})
@GetMapping("/custom/logout")
@CustomUserLogin
public R customLogout() {

View File

@@ -24,14 +24,13 @@ import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import java.time.LocalDateTime;
import javax.annotation.Resource;
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;
import java.time.LocalDateTime;
/**
* 订单处理
*
@@ -50,21 +49,19 @@ public class WxOrderInfoController {
@Resource
private IPlayOrderContinueInfoService playOrderContinueInfoService;
/**
* 续单申请-店员发起
*
* @param vo 续单申请提交对象
* @param vo
* 续单申请提交对象
*/
@ApiOperation(value = "店员申请续单", notes = "店员为当前订单发起续单申请")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功"),
@ApiResponse(code = 500, message = "非本人订单;无法续单"),
@ApiResponse(code = 500, message = "同一场订单只能续单一次")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "非本人订单;无法续单"),
@ApiResponse(code = 500, message = "同一场订单只能续单一次")})
@ClerkUserLogin
@PostMapping("/clerk/continue")
public R continueToOrdder(@ApiParam(value = "续单信息", required = true) @Validated @RequestBody PlayOrderInfoContinueAdd vo) {
public R continueToOrdder(
@ApiParam(value = "续单信息", required = true) @Validated @RequestBody PlayOrderInfoContinueAdd vo) {
PlayOrderInfoEntity entity = playOrderInfoService.selectOrderInfoById(vo.getOrderId());
if (!entity.getAcceptBy().equals(ThreadLocalRequestDetail.getClerkUserInfo().getId())) {
throw new CustomException("非本人订单;无法续单");
@@ -91,35 +88,34 @@ public class WxOrderInfoController {
return R.ok("下单成功");
}
/**
* 店员查询随机单列表
*
* @param vo 随机单列表查询对象
* @param vo
* 随机单列表查询对象
* @return 订单列表
*/
@ApiOperation(value = "查询随机单列表", notes = "店员查询可接的随机订单列表")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
@ClerkUserLogin
@PostMapping("/clerk/selectRandomOrderByPage")
public R selectUnacceptedOrderByPage(@ApiParam(value = "查询条件", required = true) @Validated @RequestBody PlayOrderInfoRandomQueryVo vo) {
return R.ok(playOrderInfoService.selectRandomOrderByPage(vo,ThreadLocalRequestDetail.getClerkUserInfo().getId()));
public R selectUnacceptedOrderByPage(
@ApiParam(value = "查询条件", required = true) @Validated @RequestBody PlayOrderInfoRandomQueryVo vo) {
return R.ok(
playOrderInfoService.selectRandomOrderByPage(vo, ThreadLocalRequestDetail.getClerkUserInfo().getId()));
}
/**
* 店员查询随机单详情
*
* @param id 订单ID
* @param id
* 订单ID
* @return 订单列表
*/
@ApiOperation(value = "查询随机单详情", notes = "店员查询随机订单的详细信息")
@ApiImplicitParam(name = "id", value = "订单ID", required = true, dataType = "String", paramType = "query")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayOrderDetailsReturnVo.class),
@ApiResponse(code = 500, message = "订单不存在")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = PlayOrderDetailsReturnVo.class),
@ApiResponse(code = 500, message = "订单不存在")})
@ClerkUserLogin
@GetMapping("/clerk/selectRandomOrderById")
public R selectUnacceptedOrderByPage(@RequestParam("id") String id) {
@@ -133,15 +129,15 @@ public class WxOrderInfoController {
/**
* 店员查询打赏动态
*
* @param vo 打赏动态查询列表
* @param vo
* 打赏动态查询列表
* @return 打赏动态列表
*/
@ApiOperation(value = "店员查询打赏动态", notes = "店员查询打赏订单动态")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
@PostMapping("/clerk/selectRewardByPage")
public R clerkSelectRewardByPage(@ApiParam(value = "查询条件", required = true) @Validated @RequestBody PlayRewardOrderQueryVo vo) {
public R clerkSelectRewardByPage(
@ApiParam(value = "查询条件", required = true) @Validated @RequestBody PlayRewardOrderQueryVo vo) {
return R.ok(playOrderInfoService.selectRewardByPage(vo));
}
@@ -151,29 +147,27 @@ public class WxOrderInfoController {
* @return 打赏动态列表
*/
@ApiOperation(value = "顾客查询打赏动态", notes = "顾客查询最新打赏订单动态")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
@GetMapping("/custom/selectRewardByPage")
public R customSelectReward() {
PlayRewardOrderQueryVo vo = new PlayRewardOrderQueryVo();
return R.ok(playOrderInfoService.selectRewardByPage(vo));
}
/**
* 顾客-分页查询续单列表
*
* @param vo PlayOrderInfoContinueQueryVo
* @param vo
* PlayOrderInfoContinueQueryVo
* @return 续单历史
*/
@ApiOperation(value = "查询续单列表", notes = "顾客分页查询续单申请列表")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayOrderContinueReturnVo.class, responseContainer = "Page")
})
@ApiResponse(code = 200, message = "操作成功", response = PlayOrderContinueReturnVo.class, responseContainer = "Page")})
@CustomUserLogin
@PostMapping("/custom/continueListByPage")
public R continueListByPage(@ApiParam(value = "查询条件", required = true) @Validated @RequestBody PlayOrderInfoContinueQueryVo vo) {
public R continueListByPage(
@ApiParam(value = "查询条件", required = true) @Validated @RequestBody PlayOrderInfoContinueQueryVo vo) {
PlayOrderContinueQueryVo queryVo = new PlayOrderContinueQueryVo();
BeanUtils.copyProperties(vo, queryVo);
queryVo.setCustomId(ThreadLocalRequestDetail.getCustomUserInfo().getId());
@@ -181,18 +175,15 @@ public class WxOrderInfoController {
return R.ok(page);
}
/**
* 审批续单申申请
*/
@ApiOperation(value = "审批续单申请", notes = "顾客审批店员发起的续单申请")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功"),
@ApiResponse(code = 500, message = "续单已处理")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "续单已处理")})
@CustomUserLogin
@PostMapping("/custom/updateReviewState")
public R updateReviewState(@ApiParam(value = "审批信息", required = true) @Validated @RequestBody PlayOrderReviewStateEditVo vo) {
public R updateReviewState(
@ApiParam(value = "审批信息", required = true) @Validated @RequestBody PlayOrderReviewStateEditVo vo) {
PlayOrderContinueInfoEntity entity = playOrderContinueInfoService.selectPlayOrderContinueInfoById(vo.getId());
if (!"0".equals(entity.getReviewedState())) {
throw new CustomException("续单已处理");

View File

@@ -11,6 +11,9 @@ import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
@@ -18,10 +21,6 @@ import org.springframework.web.bind.annotation.RequestBody;
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;
/**
* 微信查询组长工资
*
@@ -34,21 +33,19 @@ import java.util.List;
@RequestMapping("/wx/group")
public class WxPersonnelGroupInfoController {
@Resource
private IPlayPersonnelGroupInfoService playClerkGroupInfoService;
/**
* 查询组长公工资
*/
@ApiOperation(value = "查询分组工资", notes = "获取所有店员分组的工资信息")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayGroupWagesReturnVo.class, responseContainer = "List")
})
@ApiResponse(code = 200, message = "操作成功", response = PlayGroupWagesReturnVo.class, responseContainer = "List")})
@ClerkUserLogin
@PostMapping("/wages/listAll")
public R listGroupWagesAll(@ApiParam(value = "查询条件", required = true) @Validated @RequestBody PlayGroupWagesQueryVo vo) {
public R listGroupWagesAll(
@ApiParam(value = "查询条件", required = true) @Validated @RequestBody PlayGroupWagesQueryVo vo) {
List<PlayPersonnelGroupInfoEntity> list = playClerkGroupInfoService.selectAll();
List<PlayGroupWagesReturnVo> data = new ArrayList<>();
for (PlayPersonnelGroupInfoEntity entity : list) {
@@ -59,5 +56,4 @@ public class WxPersonnelGroupInfoController {
return R.ok(data);
}
}

View File

@@ -1,6 +1,5 @@
package com.starry.admin.modules.weichat.controller;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
@@ -34,6 +33,15 @@ import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import lombok.extern.slf4j.Slf4j;
import org.dom4j.Document;
import org.dom4j.DocumentHelper;
@@ -43,16 +51,6 @@ 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 javax.servlet.http.HttpServletRequest;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
/**
* @author admin
*/
@@ -74,7 +72,6 @@ public class WxPlayController {
@Resource
private WxCustomMpService mpService;
/**
* 微信支付-微信回调地址https://pay.weixin.qq.com/wiki/doc/api/wxa/wxa_api.php?chapter=9_7&index=8
*
@@ -82,12 +79,11 @@ public class WxPlayController {
* @since 2024/5/8 11:25
**/
@ApiOperation(value = "微信支付回调", notes = "微信支付后的回调接口")
@ApiResponses({
@ApiResponse(code = 200, message = "成功")
})
@ApiResponses({@ApiResponse(code = 200, message = "成功")})
@RequestMapping("/jsCallback")
public String wxPayNotify(HttpServletRequest request) {
try (InputStream inStream = request.getInputStream(); ByteArrayOutputStream outSteam = new ByteArrayOutputStream()) {
try (InputStream inStream = request.getInputStream();
ByteArrayOutputStream outSteam = new ByteArrayOutputStream()) {
byte[] buffer = new byte[1024];
int len;
while ((len = inStream.read(buffer)) != -1) {
@@ -104,7 +100,6 @@ public class WxPlayController {
return WxPayNotifyResponse.success("成功");
}
public void dealNotify(String xmlData) {
try {
Map<String, String> orderMap = readStringXmlOut(xmlData);
@@ -124,26 +119,26 @@ public class WxPlayController {
log.error("支付对应业务处理异常-支付记录状态异常支付记录xmlData={}", xmlData);
return;
}
//修养订单状态
// 修养订单状态
orderInfoEntity.setPayState("1");
orderInfoService.updateById(orderInfoEntity);
//修改账户余额
customUserInfoService.customAccountBalanceRecharge(orderInfoEntity.getOrderMoney(), orderInfoEntity.getPurchaserBy(), orderInfoEntity.getId());
// 修改账户余额
customUserInfoService.customAccountBalanceRecharge(orderInfoEntity.getOrderMoney(),
orderInfoEntity.getPurchaserBy(), orderInfoEntity.getId());
log.info("*********支付处理完成");
// 推送通知
mpService.sendBalanceMessage(orderInfoEntity);
// 请求分账
WxPayService wxPayService = mpService.getWxPay();
this.profitSharing(wxPayService, orderMap, orderInfoEntity, tenantService.selectSysTenantByTenantId(orderInfoEntity.getTenantId()));
this.profitSharing(wxPayService, orderMap, orderInfoEntity,
tenantService.selectSysTenantByTenantId(orderInfoEntity.getTenantId()));
} catch (Exception e) {
log.error("订单回调业务处理异常,xmlData={}", xmlData);
}
}
@ApiOperation(value = "测试消息推送", notes = "测试充值消息推送功能")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
@GetMapping("/test")
public R test() {
PlayOrderInfoEntity orderInfo = playOrderInfoService.getById("0e3e7d7ec69a");
@@ -151,31 +146,24 @@ public class WxPlayController {
return R.ok(true);
}
@ApiOperation(value = "获取支付金额", notes = "根据充值金额获取实际支付金额")
@ApiImplicitParam(name = "money", value = "充值金额", required = true, dataType = "String", paramType = "query")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功"),
@ApiResponse(code = 500, message = "请求参数错误,money不能为空")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "请求参数错误,money不能为空")})
@CustomUserLogin
@GetMapping("/custom/getCustomPaymentAmount")
public R getCustomPaymentAmount(@RequestParam("money") String money) {
if (StringUtils.isEmpty(money)) {
throw new CustomException("请求参数错误,money不能为空");
}
BigDecimal paymentAmount = customUserInfoService.getCustomPaymentAmount(new BigDecimal(money), ThreadLocalRequestDetail.getCustomUserInfo().getId());
BigDecimal paymentAmount = customUserInfoService.getCustomPaymentAmount(new BigDecimal(money),
ThreadLocalRequestDetail.getCustomUserInfo().getId());
return R.ok(paymentAmount);
}
@ApiOperation(value = "创建充值订单", notes = "创建微信支付充值订单")
@ApiImplicitParam(name = "money", value = "充值金额", required = true, dataType = "String", paramType = "query")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功"),
@ApiResponse(code = 500, message = "请求参数错误,money不能为空"),
@ApiResponse(code = 500, message = "充值金额不能小于10元"),
@ApiResponse(code = 500, message = "系统错误,租户ID获取失败")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功"), @ApiResponse(code = 500, message = "请求参数错误,money不能为空"),
@ApiResponse(code = 500, message = "充值金额不能小于10元"), @ApiResponse(code = 500, message = "系统错误,租户ID获取失败")})
@CustomUserLogin
@GetMapping("/custom/createOrder")
public R createOrder(@RequestParam("money") String money) {
@@ -190,7 +178,8 @@ public class WxPlayController {
throw new CustomException("系统错误,租户ID获取失败");
}
// 用户信息
PlayCustomUserInfoEntity customUserInfo = customUserInfoService.selectById(ThreadLocalRequestDetail.getCustomUserInfo().getId());
PlayCustomUserInfoEntity customUserInfo = customUserInfoService
.selectById(ThreadLocalRequestDetail.getCustomUserInfo().getId());
// 租户信息
SysTenantEntity tenant = tenantService.selectSysTenantByTenantId(tenantId);
Boolean profitSharing = tenant.getProfitsharingRate() > 0;
@@ -198,8 +187,8 @@ public class WxPlayController {
long totalFee = getTotalFee(money);
// 创建订单信息
String orderNo = playOrderInfoService.getOrderNo();
orderInfoService.createRechargeOrder(orderNo, new BigDecimal(totalFee * 1.0 / 100), new BigDecimal(totalFee * 1.0 / 100), customUserInfo.getId());
orderInfoService.createRechargeOrder(orderNo, new BigDecimal(totalFee * 1.0 / 100),
new BigDecimal(totalFee * 1.0 / 100), customUserInfo.getId());
WxPayService wxPayService = mpService.getWxPay();
WxPayUnifiedOrderRequest request = new WxPayUnifiedOrderRequest();
@@ -220,14 +209,14 @@ public class WxPlayController {
WxPayUnifiedOrderResult orderResult;
try {
//统一下单商户系统先调用该接口在微信支付服务后台生成预支付交易单返回正确的预支付交易会话标识后再在APP里面调起支付
// 统一下单商户系统先调用该接口在微信支付服务后台生成预支付交易单返回正确的预支付交易会话标识后再在APP里面调起支付
orderResult = wxPayService.unifiedOrder(request);
} catch (WxPayException e) {
throw new RuntimeException(e);
}
//
//
String prepayId = orderResult.getPrepayId();
//组合参数构建支付
// 组合参数构建支付
Map<String, String> paySignInfo = new HashMap<>(5);
String timeStamp = String.valueOf(System.currentTimeMillis());
String nonceStr = "dalfhh241lnandnsklajax";
@@ -239,8 +228,11 @@ public class WxPlayController {
String[] signInfo = new String[0];
String paySign = SignUtils.createSign(paySignInfo, "MD5", wxPayService.getConfig().getMchKey(), signInfo);
//组合支付参数
JSONObject jsonObject = new JSONObject().fluentPut("appId", wxPayService.getConfig().getAppId()).fluentPut("timeStamp", timeStamp).fluentPut("nonceStr", nonceStr).fluentPut("package", "prepay_id=" + prepayId).fluentPut("signType", "MD5").fluentPut("paySign", paySign);
// 组合支付参数
JSONObject jsonObject = new JSONObject().fluentPut("appId", wxPayService.getConfig().getAppId())
.fluentPut("timeStamp", timeStamp).fluentPut("nonceStr", nonceStr)
.fluentPut("package", "prepay_id=" + prepayId).fluentPut("signType", "MD5")
.fluentPut("paySign", paySign);
return R.ok(jsonObject);
}
@@ -251,7 +243,9 @@ public class WxPlayController {
String nonceStr = "dalfhh241lnandnsklajax";
request.setNonceStr(nonceStr);
request.setSignType("HMAC-SHA256");
request.setReceiver(new JSONObject().fluentPut("type", "MERCHANT_ID").fluentPut("account", "1681470208").fluentPut("name", "合肥经济技术开发区陪陪信息技术服务部(个体工商户)").fluentPut("relation_type", "SERVICE_PROVIDER").toString());
request.setReceiver(new JSONObject().fluentPut("type", "MERCHANT_ID").fluentPut("account", "1681470208")
.fluentPut("name", "合肥经济技术开发区陪陪信息技术服务部(个体工商户)").fluentPut("relation_type", "SERVICE_PROVIDER")
.toString());
try {
ProfitSharingReceiverResult result = wxPayService.getProfitSharingService().addReceiver(request);
log.info("请求添加分账结果:" + JSONObject.toJSONString(result));
@@ -261,9 +255,9 @@ public class WxPlayController {
}
/**
* @param money 金额,单位-元
* @param money
* 金额,单位-元
* @return 金额, 单位-分
*/
public long getTotalFee(String money) {
@@ -285,9 +279,9 @@ public class WxPlayController {
try {
doc = DocumentHelper.parseText(xml); // 将字符串转为XML
Element rootElt = doc.getRootElement(); // 获取根节点
List<Element> list = rootElt.elements();//获取根节点下所有节点
for (Element element : list) { //遍历节点
map.put(element.getName(), element.getText()); //节点的name为map的keytext为map的value
List<Element> list = rootElt.elements();// 获取根节点下所有节点
for (Element element : list) { // 遍历节点
map.put(element.getName(), element.getText()); // 节点的name为map的keytext为map的value
}
} catch (Exception e) {
throw new RuntimeException(e);
@@ -295,15 +289,16 @@ public class WxPlayController {
return map;
}
private void profitSharing(WxPayService wxPayService, Map<String, String> orderMap, PlayOrderInfoEntity orderInfoEntity, SysTenantEntity tenant) throws WxPayException {
private void profitSharing(WxPayService wxPayService, Map<String, String> orderMap,
PlayOrderInfoEntity orderInfoEntity, SysTenantEntity tenant) throws WxPayException {
Boolean profitSharing = tenant.getProfitsharingRate() > 0;
if (!profitSharing) {
return;
}
log.info("开始进行分账。。。。。。。。。。。。。。。");
long totalFee = getTotalFee(orderInfoEntity.getOrderMoney().toString());
int amount = new BigDecimal(totalFee).multiply(BigDecimal.valueOf((double) tenant.getProfitsharingRate() / 100)).intValue();
int amount = new BigDecimal(totalFee).multiply(BigDecimal.valueOf((double) tenant.getProfitsharingRate() / 100))
.intValue();
if (amount == 0) {
return;
}
@@ -312,12 +307,17 @@ public class WxPlayController {
request.setTransactionId(orderMap.get("transaction_id"));
request.setOutOrderNo("ps" + orderMap.get("out_trade_no"));
request.setReceivers(new JSONArray().fluentAdd(new JSONObject().fluentPut("type", "MERCHANT_ID").fluentPut("name", "合肥经济技术开发区陪陪信息技术服务部(个体工商户)").fluentPut("account", "1681470208").fluentPut("amount", amount)).toString());
request.setReceivers(new JSONArray().fluentAdd(
new JSONObject().fluentPut("type", "MERCHANT_ID").fluentPut("name", "合肥经济技术开发区陪陪信息技术服务部(个体工商户)")
.fluentPut("account", "1681470208").fluentPut("amount", amount))
.toString());
ProfitSharingResult result = wxPayService.getProfitSharingService().profitSharing(request);
log.info("分账结果:" + JSONObject.toJSONString(result));
// 保存分账金额
BigDecimal profitSharingAmount = new BigDecimal(amount).divide(new BigDecimal(100));
orderInfoService.update(null, Wrappers.lambdaUpdate(PlayOrderInfoEntity.class).eq(PlayOrderInfoEntity::getId, orderInfoEntity.getId()).set(PlayOrderInfoEntity::getProfitSharingAmount, profitSharingAmount));
orderInfoService.update(null,
Wrappers.lambdaUpdate(PlayOrderInfoEntity.class).eq(PlayOrderInfoEntity::getId, orderInfoEntity.getId())
.set(PlayOrderInfoEntity::getProfitSharingAmount, profitSharingAmount));
}
}

View File

@@ -10,14 +10,13 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import java.util.List;
import javax.annotation.Resource;
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
@@ -28,22 +27,19 @@ import java.util.List;
@RequestMapping("/wx/orderRanking")
public class WxPlayOrderRankingController {
@Resource
private IPlayClerkRankingInfoService playClerkRankingInfoService;
/**
* 查询当前排行
*/
@ApiOperation(value = "查询当前排行", notes = "查询店员当前排行榜信息")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayOrderRankingReturnVo.class)
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功", response = PlayOrderRankingReturnVo.class)})
@ClerkUserLogin
@GetMapping("/clerk/selectCurrentRanking")
public R selectCurrentRanking() {
PlayOrderRankingReturnVo result = playClerkRankingInfoService.selectCurrentRanking(ThreadLocalRequestDetail.getClerkUserInfo().getId());
PlayOrderRankingReturnVo result = playClerkRankingInfoService
.selectCurrentRanking(ThreadLocalRequestDetail.getClerkUserInfo().getId());
return R.ok(result);
}
@@ -53,12 +49,12 @@ public class WxPlayOrderRankingController {
*/
@ApiOperation(value = "查询历史排行", notes = "查询店员历史排行榜信息")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayOrderHistoryRankingReturnVo.class, responseContainer = "List")
})
@ApiResponse(code = 200, message = "操作成功", response = PlayOrderHistoryRankingReturnVo.class, responseContainer = "List")})
@ClerkUserLogin
@GetMapping("/clerk/selectHistoryRanking")
public R selectHistoryRanking() {
List<PlayOrderHistoryRankingReturnVo> result = playClerkRankingInfoService.selectHistoryRanking(ThreadLocalRequestDetail.getClerkUserInfo().getId());
List<PlayOrderHistoryRankingReturnVo> result = playClerkRankingInfoService
.selectHistoryRanking(ThreadLocalRequestDetail.getClerkUserInfo().getId());
return R.ok(result);
}

View File

@@ -14,15 +14,14 @@ import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import java.util.List;
import javax.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
/**
* 店铺接口
*
@@ -35,7 +34,6 @@ import java.util.List;
@RequestMapping("/wx/shop")
public class WxShopController {
@Resource
private IPlayShopCarouselInfoService playShopCarouselInfoService;
@@ -47,36 +45,30 @@ public class WxShopController {
*/
@ApiOperation(value = "获取首页轮播图", notes = "获取店铺首页轮播图信息")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = ShopHomeCarouseInfoReturnVo.class, responseContainer = "List")
})
@ApiResponse(code = 200, message = "操作成功", response = ShopHomeCarouseInfoReturnVo.class, responseContainer = "List")})
@GetMapping(value = "custom/getShopHomeCarouseInfo")
public R getShopHomeCarouseInfo() {
List<PlayShopCarouselInfoEntity> entities = playShopCarouselInfoService.selectHomeCarouselInfo();
return R.ok(ConvertUtil.entityToVoList(entities, ShopHomeCarouseInfoReturnVo.class));
}
/**
* 获取店铺文章列表
*/
@ApiOperation(value = "获取文章列表", notes = "获取店铺所有文章列表")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功", response = PlayShopArticleInfoEntity.class, responseContainer = "List")
})
@ApiResponse(code = 200, message = "操作成功", response = PlayShopArticleInfoEntity.class, responseContainer = "List")})
@ClerkUserLogin
@GetMapping(value = "clerk/getArticleList")
public R getArticleList() {
return R.ok(playShopArticleInfoService.selectByList());
}
/**
* 阅读店铺文章
*/
@ApiOperation(value = "阅读文章", notes = "阅读店铺文章并增加访问次数")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
@ClerkUserLogin
@GetMapping(value = "clerk/readShopArticleInfo")
public R readShopArticleInfo(@ApiParam(value = "文章参数", required = true) @RequestBody PlayShopReadArticleVo vo) {
@@ -86,5 +78,4 @@ public class WxShopController {
return R.ok("成功");
}
}

View File

@@ -7,14 +7,13 @@ import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import javax.annotation.Resource;
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;
/**
* 动态接口
*
@@ -31,14 +30,11 @@ public class WxSmsController {
@ApiOperation(value = "发送短信", notes = "向指定手机号发送短信验证码")
@ApiImplicitParam(name = "phone", value = "手机号码", required = true, dataType = "String", paramType = "query")
@ApiResponses({
@ApiResponse(code = 200, message = "操作成功")
})
@ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
@GetMapping("/send")
public R sendSms(@RequestParam("phone") String phone) {
smsUtils.sendSmsApi(phone);
return R.ok();
}
}

View File

@@ -2,10 +2,9 @@ package com.starry.admin.modules.weichat.entity;
import com.starry.admin.modules.clerk.module.entity.PlayClerkCommodityEntity;
import com.starry.common.utils.ConvertUtil;
import lombok.Data;
import java.math.BigDecimal;
import java.util.List;
import lombok.Data;
/**
* 店员商品树状数据
@@ -17,10 +16,8 @@ public class PlayClerkCommodityTreeData {
private String commodityType;
private List<ClerkCommodityInfo> value;
public PlayClerkCommodityTreeData(String commodityType, List<PlayClerkCommodityEntity> value) {
this.commodityType = commodityType;
this.value = ConvertUtil.entityToVoList(value, ClerkCommodityInfo.class);
@@ -37,6 +34,5 @@ public class PlayClerkCommodityTreeData {
private String serviceDuration;
}
}

View File

@@ -1,6 +1,5 @@
package com.starry.admin.modules.weichat.entity;
import com.starry.common.domain.BasePageEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

View File

@@ -1,6 +1,5 @@
package com.starry.admin.modules.weichat.entity;
import lombok.Data;
/**
@@ -70,5 +69,4 @@ public class PlayClerkFollowReturnVo {
**/
private Integer followNumber;
}

View File

@@ -1,10 +1,8 @@
package com.starry.admin.modules.weichat.entity;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import lombok.Data;
/**
* 店员和陪聊关注状态
@@ -14,7 +12,6 @@ import javax.validation.constraints.Pattern;
@Data
public class PlayClerkFollowStateUpdate {
/**
* 店员用户ID
*/

View File

@@ -1,10 +1,9 @@
package com.starry.admin.modules.weichat.entity;
import lombok.Data;
import java.util.List;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;
import lombok.Data;
/**
* 店员相册实体

View File

@@ -1,8 +1,7 @@
package com.starry.admin.modules.weichat.entity;
import lombok.Data;
import javax.validation.constraints.NotNull;
import lombok.Data;
/**
* 店员录音文件

View File

@@ -1,8 +1,7 @@
package com.starry.admin.modules.weichat.entity;
import lombok.Data;
import javax.validation.constraints.NotNull;
import lombok.Data;
/**
* 店员头像信息

View File

@@ -1,9 +1,7 @@
package com.starry.admin.modules.weichat.entity;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import lombok.Data;
/**
* @author admin
@@ -11,7 +9,6 @@ import javax.validation.constraints.NotBlank;
@Data
public class PlayClerkUserBindCodeVo {
/**
* 手机号码区号
*/
@@ -30,5 +27,4 @@ public class PlayClerkUserBindCodeVo {
@NotBlank(message = "验证码不能为空")
private String code;
}

View File

@@ -1,12 +1,10 @@
package com.starry.admin.modules.weichat.entity;
import lombok.Data;
import java.util.List;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;
import lombok.Data;
/**
* 微信端申请成为店员
@@ -16,7 +14,6 @@ import java.util.List;
@Data
public class PlayClerkUserByWxAddVo {
/**
* 店员昵称
*/
@@ -41,7 +38,6 @@ public class PlayClerkUserByWxAddVo {
@NotNull(message = "微信号码不能为空")
private String weiChatCode;
/**
* 手机号码区号
*/
@@ -77,12 +73,10 @@ public class PlayClerkUserByWxAddVo {
@NotBlank(message = "音频不能为空")
private String audio;
@NotNull(message = "album不能为空")
@Size(min = 1, max = 5, message = "照片必须为1-5张")
private List<String> album;
/**
* 个性签名
*/

View File

@@ -1,10 +1,8 @@
package com.starry.admin.modules.weichat.entity;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import lombok.Data;
/**
* 微信端申请成为店员
@@ -14,7 +12,6 @@ import javax.validation.constraints.NotNull;
@Data
public class PlayClerkUserByWxEditVo {
/**
* 店员昵称
*/
@@ -39,7 +36,6 @@ public class PlayClerkUserByWxEditVo {
@NotNull(message = "微信号码不能为空")
private Integer weiChatCode;
/**
* 手机号码区号
*/

View File

@@ -3,11 +3,9 @@ package com.starry.admin.modules.weichat.entity;
import com.alibaba.fastjson2.JSONObject;
import com.starry.admin.modules.clerk.module.entity.PlayClerkLevelInfoEntity;
import com.starry.admin.modules.clerk.module.vo.PlayClerkCommodityQueryVo;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
import lombok.Data;
/**
* 微信端店员登录返回值
@@ -132,7 +130,6 @@ public class PlayClerkUserLoginResponseVo {
*/
private List<PlayClerkCommodityQueryVo> commodity = new ArrayList<>();
/**
* 是否允许登录(0:允许1:不允许)
*/
@@ -147,7 +144,4 @@ public class PlayClerkUserLoginResponseVo {
private PlayClerkLevelInfoEntity levelInfo;
}

View File

@@ -1,9 +1,8 @@
package com.starry.admin.modules.weichat.entity;
import lombok.Data;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import lombok.Data;
/**
* 店员在线状态【1在线0离线】

View File

@@ -1,9 +1,8 @@
package com.starry.admin.modules.weichat.entity;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
import lombok.Data;
/**
* 店员录音文件
@@ -29,7 +28,6 @@ public class PlayClerkUserOtherVo {
*/
private String signature;
/**
* 星座
*/
@@ -71,9 +69,8 @@ public class PlayClerkUserOtherVo {
private String weChatPayImage;
/**
* 支付宝收款码图片
* 支付宝收款码图片
**/
private String alipayImage;
}

View File

@@ -1,9 +1,7 @@
package com.starry.admin.modules.weichat.entity;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import lombok.Data;
/**
* @author admin
@@ -11,7 +9,6 @@ import javax.validation.constraints.NotBlank;
@Data
public class PlayClerkUserSendCodeVo {
/**
* 手机号码区号
*/

View File

@@ -14,13 +14,11 @@ public class PlayClerkWxPerformanceInfoQueryVo {
*/
private String clerkId;
/**
* 订单开始时间
*/
private String startTime;
/**
* 订单结束时间
*/

View File

@@ -1,9 +1,8 @@
package com.starry.admin.modules.weichat.entity;
import lombok.Data;
import java.math.BigDecimal;
import java.util.List;
import lombok.Data;
/**
* 服务项目返回对象
@@ -32,12 +31,10 @@ public class PlayCommodityReturnVo {
*/
private String serviceDuration;
/**
* 服务单价
*/
private BigDecimal price;
List<PlayCommodityReturnVo> child;
}

View File

@@ -1,12 +1,11 @@
package com.starry.admin.modules.weichat.entity;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import java.util.List;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
/**
* 顾客新增留言对象

View File

@@ -1,8 +1,7 @@
package com.starry.admin.modules.weichat.entity;
import lombok.Data;
import java.math.BigDecimal;
import lombok.Data;
@Data
public class PlayGiftInfoDto {

View File

@@ -1,8 +1,7 @@
package com.starry.admin.modules.weichat.entity;
import lombok.Data;
import java.util.List;
import lombok.Data;
/**
* 组长工资查询对象

View File

@@ -1,8 +1,7 @@
package com.starry.admin.modules.weichat.entity;
import lombok.Data;
import java.math.BigDecimal;
import lombok.Data;
/**
* 组长工资查询对象
@@ -23,7 +22,6 @@ public class PlayGroupWagesReturnVo {
*/
private BigDecimal orderMoney = BigDecimal.ZERO;
/**
* 订单最终金额(支付金额)
*/
@@ -56,7 +54,6 @@ public class PlayGroupWagesReturnVo {
*/
private final BigDecimal averageUnitPrice = BigDecimal.ZERO;
/**
* 组长工资
*/

View File

@@ -1,10 +1,9 @@
package com.starry.admin.modules.weichat.entity;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.util.ArrayList;
import java.util.List;
import javax.validation.constraints.NotBlank;
import lombok.Data;
/**
* @author admin
@@ -13,7 +12,6 @@ import java.util.List;
@Data
public class PlayOrderCancellationVo {
/**
* 申请人ID
*/
@@ -24,7 +22,6 @@ public class PlayOrderCancellationVo {
@NotBlank(message = "订单ID不能为空")
private String orderId;
/**
* 取消原因
*/

View File

@@ -1,11 +1,10 @@
package com.starry.admin.modules.weichat.entity;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.util.Date;
import java.util.List;
import javax.validation.constraints.NotBlank;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
/**
* 订单投诉新增VO

View File

@@ -1,11 +1,10 @@
package com.starry.admin.modules.weichat.entity;
import java.util.Date;
import javax.validation.constraints.*;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.*;
import java.util.Date;
/**
* 订单评价新增VO
*

View File

@@ -1,13 +1,11 @@
package com.starry.admin.modules.weichat.entity;
import com.starry.admin.modules.shop.module.constant.GiftConstant;
import lombok.Data;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import lombok.Data;
/**
* 新增赠礼订单实体
@@ -23,16 +21,16 @@ public class PlayOrderInfoGiftAdd {
@NotBlank(message = "打赏对象不能为空")
private String clerkId;
@NotBlank(message = "礼物ID不能为空")
private String giftId;
@NotNull(message = "礼物数量不能为空")
@Min(value = GiftConstant.MINIMUM_SINGLE_GIFT_QUANTITY, message = "礼物数量不能小于" + GiftConstant.MINIMUM_SINGLE_GIFT_QUANTITY)
@Max(value = GiftConstant.MAXIMUM_SINGLE_GIFT_QUANTITY, message = "礼物数量不能大于" + GiftConstant.MAXIMUM_SINGLE_GIFT_QUANTITY)
@Min(value = GiftConstant.MINIMUM_SINGLE_GIFT_QUANTITY, message = "礼物数量不能小于"
+ GiftConstant.MINIMUM_SINGLE_GIFT_QUANTITY)
@Max(value = GiftConstant.MAXIMUM_SINGLE_GIFT_QUANTITY, message = "礼物数量不能大于"
+ GiftConstant.MAXIMUM_SINGLE_GIFT_QUANTITY)
private int giftQuantity;
private String weiChatCode;
/**

View File

@@ -1,14 +1,12 @@
package com.starry.admin.modules.weichat.entity;
import com.starry.admin.modules.shop.module.constant.GiftConstant;
import lombok.Data;
import java.util.List;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;
import lombok.Data;
/**
* 新增随机订单实体
@@ -37,16 +35,16 @@ public class PlayOrderInfoRandomAdd {
**/
private List<String> labels;
@NotBlank(message = "商品ID不能为空")
private String commodityId;
@NotNull(message = "数量不能为空")
@Min(value = GiftConstant.MINIMUM_SINGLE_GIFT_QUANTITY, message = "数量不能小于" + GiftConstant.MINIMUM_SINGLE_GIFT_QUANTITY)
@Max(value = GiftConstant.MAXIMUM_SINGLE_GIFT_QUANTITY, message = "数量不能大于" + GiftConstant.MAXIMUM_SINGLE_GIFT_QUANTITY)
@Min(value = GiftConstant.MINIMUM_SINGLE_GIFT_QUANTITY, message = "数量不能小于"
+ GiftConstant.MINIMUM_SINGLE_GIFT_QUANTITY)
@Max(value = GiftConstant.MAXIMUM_SINGLE_GIFT_QUANTITY, message = "数量不能大于"
+ GiftConstant.MAXIMUM_SINGLE_GIFT_QUANTITY)
private int commodityQuantity;
@NotBlank(message = "微信号不能为空")
private String weiChatCode;

View File

@@ -1,18 +1,16 @@
package com.starry.admin.modules.weichat.entity;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import lombok.Data;
/**
* 新增打赏订单实体
*
* @author admin
*/
@Data
public class PlayOrderInfoRewardAdd {
/**
* 店员用户ID
*/

View File

@@ -1,8 +1,7 @@
package com.starry.admin.modules.weichat.entity;
import lombok.Data;
import javax.validation.constraints.NotNull;
import lombok.Data;
/**
* @author admin

View File

@@ -11,10 +11,8 @@ import lombok.Data;
@Data
public class WxCouponOrderQueryVo {
private String commodityId;
/***
* 店员等级ID
*/
@@ -30,6 +28,5 @@ public class WxCouponOrderQueryVo {
*/
private String placeType;
private int commodityQuantity;
}

View File

@@ -1,11 +1,10 @@
package com.starry.admin.modules.weichat.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
/**
* 顾客优惠券下单查询返回对象
@@ -21,12 +20,10 @@ public class WxCouponOrderReturnVo {
*/
private String id;
/**
* 优惠券名称
**/
private String couponName ="测试券";
private String couponName = "测试券";
/**
* 有效期类型0:永久有效;1:固定时间内有效;2:领取后几天内有效)
@@ -79,5 +76,4 @@ public class WxCouponOrderReturnVo {
*/
private String reasonForUnavailableUse;
}

View File

@@ -1,9 +1,8 @@
package com.starry.admin.modules.weichat.entity;
import lombok.Data;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import lombok.Data;
/**
* 顾客优惠券查询对象
@@ -14,10 +13,8 @@ import javax.validation.constraints.Pattern;
@Data
public class WxCouponQueryVo {
private String commodityId;
/**
* 下单类型(-1:其他类型;0:指定单;1:随机单;2:打赏单)
*/
@@ -25,6 +22,5 @@ public class WxCouponQueryVo {
@Pattern(regexp = "[0|1]", message = "订单类型必须为0或者1")
private String placeType;
private int commodityQuantity;
}

View File

@@ -3,12 +3,11 @@ package com.starry.admin.modules.weichat.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.starry.admin.common.conf.StringTypeHandler;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
/**
* 顾客优惠券领取查询返回对象
@@ -24,13 +23,11 @@ public class WxCouponReceiveReturnVo {
*/
private String id;
/**
* 优惠券名称
**/
private String couponName;
/**
* 有效期类型0:永久有效;1:固定时间内有效;2:领取后几天内有效)
*/
@@ -86,5 +83,4 @@ public class WxCouponReceiveReturnVo {
*/
private String obtained = "0";
}

View File

@@ -1,11 +1,10 @@
package com.starry.admin.modules.weichat.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
/**
* 顾客优惠券查询对象
@@ -21,13 +20,11 @@ public class WxCouponReturnVo {
*/
private String id;
/**
* 优惠券名称
**/
private String couponName;
/**
* 有效期类型0:永久有效;1:固定时间内有效;2:领取后几天内有效)
*/
@@ -77,5 +74,4 @@ public class WxCouponReturnVo {
*/
private String reasonForUnavailableUse;
}

View File

@@ -19,7 +19,8 @@ public class WxPayReturnVo {
private String prepayId;
private String callback;
public WxPayReturnVo(String orderId, String timeStamp, String nonceStr, String signType, String paySign, String prepayId, String callback) {
public WxPayReturnVo(String orderId, String timeStamp, String nonceStr, String signType, String paySign,
String prepayId, String callback) {
this.orderId = orderId;
this.timeStamp = timeStamp;
this.nonceStr = nonceStr;

View File

@@ -33,5 +33,4 @@ public class WxPlayClerkUserQueryVo extends BasePageEntity {
**/
private String province;
}

View File

@@ -1,13 +1,11 @@
package com.starry.admin.modules.weichat.entity;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import lombok.Data;
@Data
public class WxUserLoginVo {
@NotBlank(message = "code不能为空")
private String code;
}

View File

@@ -8,6 +8,5 @@ import lombok.Data;
@Data
public class WxUserQueryAddressVo {
private String url;
}

View File

@@ -1,13 +1,12 @@
package com.starry.admin.modules.weichat.entity.article;
import lombok.Data;
import java.time.LocalDateTime;
import java.util.List;
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;
import lombok.Data;
/**
* 店员新增动态
@@ -29,7 +28,6 @@ public class PlayClerkAddArticleVo {
@NotBlank(message = "动态内容不能为空")
private String articleCon;
/**
* 动态附件类型0图片;1视频;3:录音)
*/
@@ -45,7 +43,6 @@ public class PlayClerkAddArticleVo {
@Size(max = 6, message = "附件数量必须小于6")
private List<String> annexCon;
/**
* 发布时间
*/

View File

@@ -5,14 +5,12 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* @author admin
* 顾客查询动态信息查询返回对象
* @author admin 顾客查询动态信息查询返回对象
*/
@EqualsAndHashCode(callSuper = true)
@Data
public class PlayClerkArticleCustomQueryVo extends BasePageEntity {
/**
* 收藏状态0未收藏1:已收藏)
*/
@@ -23,5 +21,4 @@ public class PlayClerkArticleCustomQueryVo extends BasePageEntity {
*/
private String clerkId;
}

View File

@@ -3,15 +3,13 @@ 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 java.time.LocalDateTime;
import java.util.List;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import java.util.List;
/**
* @author admin
* 顾客查询动态信息查询返回对象
* @author admin 顾客查询动态信息查询返回对象
*/
@Data
public class PlayClerkArticleCustomReturnVo {
@@ -45,7 +43,6 @@ public class PlayClerkArticleCustomReturnVo {
*/
private String articleCon;
/**
* 动态附件类型0:图片;1:视频;2:音频)
*/
@@ -56,7 +53,6 @@ public class PlayClerkArticleCustomReturnVo {
*/
private List<String> annexCon;
/**
* 发布时间
*/

View File

@@ -1,21 +1,18 @@
package com.starry.admin.modules.weichat.entity.article;
import com.starry.common.domain.BasePageEntity;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
/**
* @author admin
* 顾客收藏动态状态修改
* @author admin 顾客收藏动态状态修改
*/
@EqualsAndHashCode(callSuper = true)
@Data
public class PlayClerkArticleFollowCustomFollowStateEditStateVo extends BasePageEntity {
@NotBlank(message = "id不能为空")
private String id;
@@ -26,5 +23,4 @@ public class PlayClerkArticleFollowCustomFollowStateEditStateVo extends BasePage
@Pattern(regexp = "[01]", message = "followState值必须为0或者1")
private String followState;
}

View File

@@ -1,21 +1,18 @@
package com.starry.admin.modules.weichat.entity.article;
import com.starry.common.domain.BasePageEntity;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
/**
* @author admin
* 顾客点赞动态查询状态修改
* @author admin 顾客点赞动态查询状态修改
*/
@EqualsAndHashCode(callSuper = true)
@Data
public class PlayClerkArticleFollowCustomGreedStateEditStateVo extends BasePageEntity {
@NotBlank(message = "不能为空")
private String id;
@@ -26,5 +23,4 @@ public class PlayClerkArticleFollowCustomGreedStateEditStateVo extends BasePageE
@Pattern(regexp = "[01]", message = "greedState值必须为0或者1")
private String greedState;
}

View File

@@ -14,7 +14,6 @@ public class PlayClerkLevelAndRankingVo {
*/
private String levelName;
/**
* 开始名次
*/
@@ -25,11 +24,9 @@ public class PlayClerkLevelAndRankingVo {
*/
private Integer endRanking;
private Integer sort;
public PlayClerkLevelAndRankingVo(String levelName, Integer startRanking, Integer endRanking,Integer sort) {
public PlayClerkLevelAndRankingVo(String levelName, Integer startRanking, Integer endRanking, Integer sort) {
this.levelName = levelName;
this.startRanking = startRanking;
this.endRanking = endRanking;

View File

@@ -1,8 +1,7 @@
package com.starry.admin.modules.weichat.entity.clerk;
import lombok.Data;
import java.util.List;
import lombok.Data;
/**
* @author admin
@@ -16,14 +15,11 @@ public class PlayClerkLevelInfoReturnVo {
*/
private String levelId;
/**
* 等级名称
*/
private String levelName;
private List<PlayClerkLevelAndRankingVo> levelAndRanking;
}

View File

@@ -17,7 +17,6 @@ import lombok.EqualsAndHashCode;
@ApiModel(value = "店员查询参数", description = "分页查询店员的条件参数对象")
public class PlayClerkUserInfoQueryVo extends BasePageEntity {
/**
* 店员昵称
**/
@@ -77,5 +76,4 @@ public class PlayClerkUserInfoQueryVo extends BasePageEntity {
@ApiModelProperty(value = "手机号码", example = "13800138000")
private String phone;
}

View File

@@ -3,10 +3,9 @@ package com.starry.admin.modules.weichat.entity.clerk;
import com.starry.admin.modules.clerk.module.entity.PlayClerkLevelInfoEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
import lombok.Data;
/**
* @author admin
@@ -40,7 +39,6 @@ public class PlayClerkUserInfoResultVo {
@ApiModelProperty(value = "店员等级名称")
private String levelName;
/**
* 性别[0:未知;1:男;2:女]
*/
@@ -59,7 +57,6 @@ public class PlayClerkUserInfoResultVo {
@ApiModelProperty(value = "音频", notes = "音频文件URL")
private String audio;
/**
* 星座
*/
@@ -102,7 +99,6 @@ public class PlayClerkUserInfoResultVo {
@ApiModelProperty(value = "所在城市", example = "深圳市")
private String city;
/**
* 关注0未关注1:已关注)
*/
@@ -121,7 +117,6 @@ public class PlayClerkUserInfoResultVo {
@ApiModelProperty(value = "上架状态", notes = "1上架0下架")
private String listingState;
/**
* 实名状态【1已实名0未实名】
*/
@@ -140,7 +135,6 @@ public class PlayClerkUserInfoResultVo {
@ApiModelProperty(value = "随机接单状态", notes = "1允许0禁止")
private String randomOrderState;
/**
* 服务项目
*/
@@ -153,12 +147,10 @@ public class PlayClerkUserInfoResultVo {
@ApiModelProperty(value = "地址", notes = "店员所在详细地址")
private String address;
/**
* 最低消费
*/
@ApiModelProperty(value = "最低消费", notes = "店员服务的最低消费", example = "最低1船票")
private String latestConsumption = "最低1船票";
}

View File

@@ -1,9 +1,8 @@
package com.starry.admin.modules.weichat.entity.costom;
import lombok.Data;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import lombok.Data;
/**
* 顾客状态修改

View File

@@ -1,9 +1,8 @@
package com.starry.admin.modules.weichat.entity.costom;
import lombok.Data;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import lombok.Data;
/**
* 顾客状态修改

View File

@@ -1,9 +1,8 @@
package com.starry.admin.modules.weichat.entity.evaluate;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
import lombok.Data;
/**
* 订单评价对象查询返回对象
@@ -16,13 +15,11 @@ public class PlayCustomOrderEvaluateReturnVo {
private String id;
/**
* 匿名评价(0:匿名1:非匿名)
*/
private String anonymous;
/**
* 评价等级【1-5星最低1星最高5星】
*/

View File

@@ -1,8 +1,7 @@
package com.starry.admin.modules.weichat.entity.gift;
import lombok.Data;
import java.math.BigDecimal;
import lombok.Data;
/**
* 店员礼物查询对象
@@ -13,7 +12,6 @@ import java.math.BigDecimal;
@Data
public class PlayClerkGiftReturnVo {
/**
* UUID
*/
@@ -44,13 +42,11 @@ public class PlayClerkGiftReturnVo {
*/
private String unit;
/**
* 礼物数量
*/
private long giffNumber;
/**
* 礼物状态0正常1已下架
*/

View File

@@ -11,17 +11,14 @@ import lombok.Data;
@Data
public class PlayCustomGiftQueryVo {
/**
* 是否已获得礼物0:已获取1:所有礼物)
*/
private String obtained;
/**
* 是否是历史礼物(0:不是,1:是)
*/
private String history;
}

View File

@@ -14,15 +14,9 @@ import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = false)
public class PlayClearOrderInfoQueryVo extends BasePageEntity {
private String id;
/**
* 订单状态【0:1:2:3:4】
* 0已下单
* 1已接单
* 2已开始
* 3已完成
* 4已取消
* 订单状态【0:1:2:3:4】 0已下单 1已接单 2已开始 3已完成 4已取消
*/
private String orderStatus;
@@ -41,5 +35,4 @@ public class PlayClearOrderInfoQueryVo extends BasePageEntity {
*/
private String purchaserBy;
}
}

View File

@@ -1,10 +1,9 @@
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 lombok.Data;
/**
* 店员订单详情返回信息
@@ -26,12 +25,7 @@ public class PlayClerkOrderDetailsReturnVo {
private String orderNo;
/**
* 订单状态【0:1:2:3:4】
* 0已下单待接单
* 1已接单待开始
* 2已开始服务中
* 3已完成
* 4已取消
* 订单状态【0:1:2:3:4】 0已下单待接单 1已接单待开始 2已开始服务中 3已完成 4已取消
*/
private String orderStatus;
@@ -45,7 +39,6 @@ public class PlayClerkOrderDetailsReturnVo {
*/
private int commodityNumber;
/**
* 支付方式0余额支付,1:微信支付,2:支付宝支付
*/
@@ -61,7 +54,6 @@ public class PlayClerkOrderDetailsReturnVo {
*/
private String weiChatCode;
/**
* 订单金额
*/
@@ -152,7 +144,6 @@ public class PlayClerkOrderDetailsReturnVo {
*/
private String customLevelName;
/**
* 店员ID
*/
@@ -194,5 +185,4 @@ public class PlayClerkOrderDetailsReturnVo {
**/
private String serviceDuration;
}

View File

@@ -14,15 +14,9 @@ import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = false)
public class PlayClerkOrderInfoQueryVo extends BasePageEntity {
private String id;
/**
* 订单状态【0:1:2:3:4】
* 0已下单
* 1已接单
* 2已开始
* 3已完成
* 4已取消
* 订单状态【0:1:2:3:4】 0已下单 1已接单 2已开始 3已完成 4已取消
*/
private String orderStatus;
@@ -41,5 +35,4 @@ public class PlayClerkOrderInfoQueryVo extends BasePageEntity {
*/
private String acceptBy;
}
}

View File

@@ -1,10 +1,9 @@
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 lombok.Data;
/**
* 店员查询订单列表返回对象
@@ -15,7 +14,6 @@ import java.util.Date;
@Data
public class PlayClerkOrderListReturnVo {
/**
* 订单ID
*/
@@ -27,12 +25,7 @@ public class PlayClerkOrderListReturnVo {
private String orderNo;
/**
* 订单状态【0:1:2:3:4】
* 0已下单待接单
* 1已接单待开始
* 2已开始服务中
* 3已完成
* 4已取消
* 订单状态【0:1:2:3:4】 0已下单待接单 1已接单待开始 2已开始服务中 3已完成 4已取消
*/
private String orderStatus;
@@ -46,13 +39,11 @@ public class PlayClerkOrderListReturnVo {
*/
private String firstOrder;
/**
* 商品数量
*/
private int commodityNumber;
/**
* 订单备注
*/
@@ -64,13 +55,11 @@ public class PlayClerkOrderListReturnVo {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date purchaserTime;
/**
* 订单最终金额(支付金额)
*/
private BigDecimal finalAmount;
/**
* 用户ID
*/
@@ -137,5 +126,4 @@ public class PlayClerkOrderListReturnVo {
**/
private String serviceDuration;
}
}

View File

@@ -1,11 +1,10 @@
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;
import lombok.Data;
/**
* 随机单详情返回接口
@@ -27,12 +26,7 @@ public class PlayClerkRandomOrderDetailReturnVo {
private String orderNo;
/**
* 订单状态【0:1:2:3:4】
* 0已下单待接单
* 1已接单待开始
* 2已开始服务中
* 3已完成
* 4已取消
* 订单状态【0:1:2:3:4】 0已下单待接单 1已接单待开始 2已开始服务中 3已完成 4已取消
*/
private final String orderStatus = "0";
@@ -46,7 +40,6 @@ public class PlayClerkRandomOrderDetailReturnVo {
*/
private int commodityNumber;
/**
* 支付方式0余额支付,1:微信支付,2:支付宝支付
*/
@@ -62,7 +55,6 @@ public class PlayClerkRandomOrderDetailReturnVo {
*/
private String weiChatCode;
/**
* 卖家要求
*
@@ -70,7 +62,6 @@ public class PlayClerkRandomOrderDetailReturnVo {
**/
private List<String> labels;
/**
* 订单金额
*/
@@ -97,7 +88,6 @@ public class PlayClerkRandomOrderDetailReturnVo {
*/
private Integer estimatedRevenueRatio;
/**
* 优惠金额
*/

View File

@@ -1,10 +1,9 @@
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 lombok.Data;
/**
* 顾客查询订单详情返回对象
@@ -15,7 +14,6 @@ import java.util.Date;
@Data
public class PlayCustomOrderDetailsReturnVo {
/**
* 订单ID
*/
@@ -27,12 +25,7 @@ public class PlayCustomOrderDetailsReturnVo {
private String orderNo;
/**
* 订单状态【0:1:2:3:4】
* 0已下单待接单
* 1已接单待开始
* 2已开始服务中
* 3已完成
* 4已取消
* 订单状态【0:1:2:3:4】 0已下单待接单 1已接单待开始 2已开始服务中 3已完成 4已取消
*/
private String orderStatus;
@@ -46,7 +39,6 @@ public class PlayCustomOrderDetailsReturnVo {
*/
private int commodityNumber;
/**
* 支付方式0余额支付,1:微信支付,2:支付宝支付
*/
@@ -57,7 +49,6 @@ public class PlayCustomOrderDetailsReturnVo {
*/
private String remark;
/**
* 订单金额
*/
@@ -118,19 +109,16 @@ public class PlayCustomOrderDetailsReturnVo {
*/
private String complaint = "0";
/**
* 订单最终金额(支付金额)
*/
private BigDecimal finalAmount;
/**
* 优惠金额
*/
private BigDecimal discountAmount;
/**
* 用户ID
*/
@@ -187,7 +175,6 @@ public class PlayCustomOrderDetailsReturnVo {
**/
private String serviceDuration;
/**
* 微信号码
*
@@ -195,5 +182,4 @@ public class PlayCustomOrderDetailsReturnVo {
**/
private String weiChatCode;
}
}

View File

@@ -14,15 +14,9 @@ import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = false)
public class PlayCustomOrderInfoQueryVo extends BasePageEntity {
private String id;
/**
* 订单状态【0:1:2:3:4】
* 0已下单
* 1已接单
* 2已开始
* 3已完成
* 4已取消
* 订单状态【0:1:2:3:4】 0已下单 1已接单 2已开始 3已完成 4已取消
*/
private String orderStatus;
@@ -41,5 +35,4 @@ public class PlayCustomOrderInfoQueryVo extends BasePageEntity {
*/
private String purchaserBy;
}
}

View File

@@ -1,10 +1,9 @@
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 lombok.Data;
/**
* 顾客查询订单列表返回对象
@@ -15,7 +14,6 @@ import java.util.Date;
@Data
public class PlayCustomOrderListReturnVo {
/**
* 订单ID
*/
@@ -27,12 +25,7 @@ public class PlayCustomOrderListReturnVo {
private String orderNo;
/**
* 订单状态【0:1:2:3:4】
* 0已下单待接单
* 1已接单待开始
* 2已开始服务中
* 3已完成
* 4已取消
* 订单状态【0:1:2:3:4】 0已下单待接单 1已接单待开始 2已开始服务中 3已完成 4已取消
*/
private String orderStatus;
@@ -46,14 +39,11 @@ public class PlayCustomOrderListReturnVo {
*/
private int commodityNumber;
/**
* 订单备注
*/
private String remark;
/**
* 下单时间
*/
@@ -70,13 +60,11 @@ public class PlayCustomOrderListReturnVo {
*/
private String complaint = "0";
/**
* 订单最终金额(支付金额)
*/
private BigDecimal finalAmount;
/**
* 用户ID
*/
@@ -133,5 +121,4 @@ public class PlayCustomOrderListReturnVo {
**/
private String serviceDuration;
}
}

View File

@@ -1,10 +1,9 @@
package com.starry.admin.modules.weichat.entity.order;
import java.time.LocalDate;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDate;
/**
* 订单排行分页查询对象
*
@@ -14,7 +13,6 @@ import java.time.LocalDate;
@Data
public class PlayOrderHistoryRankingReturnVo {
/**
* 开始统计时间
*/
@@ -32,5 +30,4 @@ public class PlayOrderHistoryRankingReturnVo {
*/
private Long rankingIndex;
}

View File

@@ -1,15 +1,13 @@
package com.starry.admin.modules.weichat.entity.order;
import com.starry.admin.modules.shop.module.constant.GiftConstant;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import java.util.List;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
/**
* 新增赠礼订单实体
@@ -19,25 +17,22 @@ import java.util.List;
@Data
public class PlayOrderInfoCommodityAdd {
/**
* 店员用户ID
*/
@NotBlank(message = "打赏对象不能为空")
private String clerkId;
@NotBlank(message = "商品ID不能为空")
private String commodityId;
@NotNull(message = "数量不能为空")
@Min(value = GiftConstant.MINIMUM_SINGLE_GIFT_QUANTITY, message = "数量不能小于" + GiftConstant.MINIMUM_SINGLE_GIFT_QUANTITY)
@Max(value = GiftConstant.MAXIMUM_SINGLE_GIFT_QUANTITY, message = "数量不能大于" + GiftConstant.MAXIMUM_SINGLE_GIFT_QUANTITY)
@Min(value = GiftConstant.MINIMUM_SINGLE_GIFT_QUANTITY, message = "数量不能小于"
+ GiftConstant.MINIMUM_SINGLE_GIFT_QUANTITY)
@Max(value = GiftConstant.MAXIMUM_SINGLE_GIFT_QUANTITY, message = "数量不能大于"
+ GiftConstant.MAXIMUM_SINGLE_GIFT_QUANTITY)
private int commodityQuantity;
@NotBlank(message = "微信号不能为空")
@Length(max = 255, message = "微信号码长度不超过255个字符")
private String weiChatCode;

View File

@@ -1,12 +1,10 @@
package com.starry.admin.modules.weichat.entity.order;
import lombok.Data;
import java.util.List;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;
import lombok.Data;
/**
* 续单申请
@@ -22,7 +20,6 @@ public class PlayOrderInfoContinueAdd {
@NotBlank(message = "orderId不能为空")
private String orderId;
/**
* 订单备注
*/

View File

@@ -1,6 +1,5 @@
package com.starry.admin.modules.weichat.entity.order;
import com.starry.common.domain.BasePageEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

View File

@@ -1,6 +1,5 @@
package com.starry.admin.modules.weichat.entity.order;
import com.starry.common.domain.BasePageEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -14,5 +13,4 @@ import lombok.EqualsAndHashCode;
@Data
public class PlayOrderInfoRandomQueryVo extends BasePageEntity {
}

View File

@@ -1,7 +1,6 @@
package com.starry.admin.modules.weichat.entity.order;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.math.BigDecimal;
import java.util.Date;
@@ -22,12 +21,7 @@ public class PlayOrderInfoRandomReturnVo {
private String orderNo;
/**
* 订单状态【0:1:2:3:4】
* 0已下单待接单
* 1已接单待开始
* 2已开始服务中
* 3已完成
* 4已取消
* 订单状态【0:1:2:3:4】 0已下单待接单 1已接单待开始 2已开始服务中 3已完成 4已取消
*/
private final String orderStatus = "0";
@@ -36,13 +30,11 @@ public class PlayOrderInfoRandomReturnVo {
*/
private final String placeType = "1";
/**
* 商品数量
*/
private int commodityNumber;
/**
* 订单备注
*/
@@ -54,13 +46,11 @@ public class PlayOrderInfoRandomReturnVo {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date purchaserTime;
/**
* 订单最终金额(支付金额)
*/
private BigDecimal finalAmount;
/**
* 用户ID
*/

View File

@@ -11,7 +11,6 @@ import lombok.Data;
@Data
public class PlayOrderRankingListVo {
/**
* 店员ID
*/

View File

@@ -1,11 +1,10 @@
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;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
/**
* 订单排行分页查询对象

View File

@@ -1,10 +1,9 @@
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 lombok.Data;
/**
* @author admin
@@ -13,7 +12,6 @@ import java.util.Date;
@Data
public class PlayRandomOrderInfoReturnVo {
/**
* 订单ID
*/
@@ -25,12 +23,7 @@ public class PlayRandomOrderInfoReturnVo {
private String orderNo;
/**
* 订单状态【0:1:2:3:4】
* 0已下单待接单
* 1已接单待开始
* 2已开始服务中
* 3已完成
* 4已取消
* 订单状态【0:1:2:3:4】 0已下单待接单 1已接单待开始 2已开始服务中 3已完成 4已取消
*/
private String orderStatus;
@@ -44,13 +37,11 @@ public class PlayRandomOrderInfoReturnVo {
*/
private String firstOrder;
/**
* 商品数量
*/
private int commodityNumber;
/**
* 订单备注
*/
@@ -62,13 +53,11 @@ public class PlayRandomOrderInfoReturnVo {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date purchaserTime;
/**
* 订单最终金额(支付金额)
*/
private BigDecimal finalAmount;
/**
* 用户ID
*/

View File

@@ -1,10 +1,9 @@
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 lombok.Data;
/**
* 打赏动态查询返回信息
@@ -50,18 +49,15 @@ public class PlayRewardInfoReturnVo {
*/
private String commodityName;
/**
* 订单金额
*/
private BigDecimal orderMoney;
/**
* 下单时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date purchaserTime;
}

View File

@@ -1,10 +1,9 @@
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;
import lombok.Data;
/**
* @author admin
@@ -134,7 +133,6 @@ public class PlayCustomUserReturnDetailVo {
@JsonIgnore
private String token;
/**
* 员工状态【1是陪聊0不是陪聊】
*/

View File

@@ -1,11 +1,10 @@
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;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
/**
* @author admin
@@ -19,7 +18,6 @@ public class ClerkCurrentPeriodWagesReturnVo {
*/
private String id;
/**
* 总金额
*/
@@ -39,11 +37,9 @@ public class ClerkCurrentPeriodWagesReturnVo {
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private LocalDate endCountDate;
/**
* 平台工资(订单)
*/
private OrderWagesReturnVo orderWages;
}

View File

@@ -1,11 +1,10 @@
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;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
/**
* @author admin
@@ -19,7 +18,6 @@ public class ClerkHistoricalWagesReturnVo {
*/
private String id;
/**
* 订单金额
*/
@@ -39,5 +37,4 @@ public class ClerkHistoricalWagesReturnVo {
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private LocalDate endCountDate;
}

View File

@@ -1,8 +1,7 @@
package com.starry.admin.modules.weichat.entity.wages;
import lombok.Data;
import java.math.BigDecimal;
import lombok.Data;
/**
* @author admin
@@ -11,13 +10,11 @@ import java.math.BigDecimal;
@Data
public class ClerkUnsettledWagesReturnVo {
/**
* 订单金额
*/
private BigDecimal orderMoney;
/**
* 订单总数
*/
@@ -28,8 +25,6 @@ public class ClerkUnsettledWagesReturnVo {
*/
private BigDecimal estimatedRevenue;
public ClerkUnsettledWagesReturnVo(BigDecimal orderMoney, Integer orderNumber, BigDecimal estimatedRevenue) {
this.orderMoney = orderMoney;
this.orderNumber = orderNumber;

View File

@@ -1,11 +1,10 @@
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;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
/**
* @author admin

View File

@@ -1,8 +1,7 @@
package com.starry.admin.modules.weichat.entity.wages;
import lombok.Data;
import java.math.BigDecimal;
import lombok.Data;
/**
* @author admin

View File

@@ -4,11 +4,10 @@ import io.jsonwebtoken.Claims;
/**
* 通用常量信息
*
*
* @author ruoyi
*/
public class Constants
{
public class Constants {
/**
* UTF-8 字符集
*/
@@ -65,7 +64,7 @@ public class Constants
* 登录失败
*/
public static final String LOGIN_FAIL = "Error";
/**
* 验证码有效期(分钟)
*/
@@ -142,11 +141,11 @@ public class Constants
/**
* 定时任务白名单配置(仅允许访问的包名,如其他需要可以自行添加)
*/
public static final String[] JOB_WHITELIST_STR = { "com.ruoyi" };
public static final String[] JOB_WHITELIST_STR = {"com.ruoyi"};
/**
* 定时任务违规的字符
*/
public static final String[] JOB_ERROR_STR = { "java.net.URL", "javax.naming.InitialContext", "org.yaml.snakeyaml",
"org.springframework", "org.apache", "com.ruoyi.common.utils.file", "com.ruoyi.common.config" };
public static final String[] JOB_ERROR_STR = {"java.net.URL", "javax.naming.InitialContext", "org.yaml.snakeyaml",
"org.springframework", "org.apache", "com.ruoyi.common.utils.file", "com.ruoyi.common.config"};
}

View File

@@ -1,12 +1,10 @@
package com.starry.admin.modules.weichat.service;
import javax.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import me.chanjar.weixin.common.error.WxErrorException;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
/**
* 微信公众号开发
*
@@ -16,11 +14,9 @@ import javax.annotation.Resource;
@Service
public class WxAccessTokenService {
@Resource
private WxCustomMpService wxCustomMpService;
/**
* 获取微信AccessToken
*
@@ -29,7 +25,7 @@ public class WxAccessTokenService {
public String getAccessToken() throws WxErrorException {
String token = wxCustomMpService.proxyWxMpService().getAccessToken();
log.error("token = " + token);
//缓存业务处理
// 缓存业务处理
return token;
}

View File

@@ -19,6 +19,11 @@ import com.starry.admin.modules.personnel.service.IPlayPersonnelAdminInfoService
import com.starry.admin.modules.system.module.entity.SysTenantEntity;
import com.starry.admin.modules.system.service.impl.SysTenantServiceImpl;
import com.starry.admin.utils.SecurityUtils;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import javax.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import me.chanjar.weixin.common.error.WxErrorException;
import me.chanjar.weixin.mp.api.WxMpService;
@@ -28,12 +33,6 @@ import me.chanjar.weixin.mp.config.impl.WxMpMapConfigImpl;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;
/**
* @author admin
*/
@@ -53,13 +52,11 @@ public class WxCustomMpService {
@Resource
private IPlayClerkUserInfoService clerkUserInfoService;
/**
* 支付成功回调地址
*/
public static String NOTIFY_URL = "https://julyharbor.com/api/wx/pay/jsCallback";
public WxMpService proxyWxMpService() {
String tenantId = SecurityUtils.getTenantId();
if (StrUtil.isBlankIfStr(tenantId)) {
@@ -103,16 +100,17 @@ public class WxCustomMpService {
return wxPayService;
}
/**
* 充值成功-发送微信消息
*
* @param order 订单信息
* @param order
* 订单信息
*/
public void sendBalanceMessage(PlayOrderInfoEntity order) {
PlayCustomUserInfoEntity customUserInfo = customUserInfoService.selectById(order.getPurchaserBy());
SysTenantEntity tenant = tenantService.selectSysTenantByTenantId(order.getTenantId());
WxMpTemplateMessage templateMessage = getWxMpTemplateMessage(tenant.getChongzhichenggongTemplateId(), customUserInfo.getOpenid(), "http://" + tenant.getTenantKey() + ".julyharbor.com/user/");
WxMpTemplateMessage templateMessage = getWxMpTemplateMessage(tenant.getChongzhichenggongTemplateId(),
customUserInfo.getOpenid(), "http://" + tenant.getTenantKey() + ".julyharbor.com/user/");
List<WxMpTemplateData> data = new ArrayList<>();
data.add(new WxMpTemplateData("time4", DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss")));
data.add(new WxMpTemplateData("amount2", order.getOrderMoney().toString()));
@@ -126,21 +124,24 @@ public class WxCustomMpService {
}
}
/**
* 顾客下指定单后,给店员发新订单通知
* 通过微信公众号发送消息
* 顾客下指定单后,给店员发新订单通知 通过微信公众号发送消息
*
* @param tenantId 租户ID
* @param openId 消息接收人openID
* @param orderNo 消息内容-订单编号
* @param tenantId
* 租户ID
* @param openId
* 消息接收人openID
* @param orderNo
* 消息内容-订单编号
* @param money
* @param commodityName
*/
public void sendCreateOrderMessage(String tenantId, String openId, String orderNo, String money, String commodityName) {
public void sendCreateOrderMessage(String tenantId, String openId, String orderNo, String money,
String commodityName) {
SysTenantEntity tenant = tenantService.selectSysTenantByTenantId(tenantId);
WxMpTemplateMessage templateMessage = getWxMpTemplateMessage(tenant.getXindingdanshoulitongzhiTemplateId(), openId, "http://" + tenant.getTenantKey() + ".julyharbor.com/clerk/#/orderDetail/");
WxMpTemplateMessage templateMessage = getWxMpTemplateMessage(tenant.getXindingdanshoulitongzhiTemplateId(),
openId, "http://" + tenant.getTenantKey() + ".julyharbor.com/clerk/#/orderDetail/");
List<WxMpTemplateData> data = new ArrayList<>();
data.add(new WxMpTemplateData("time6", DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss")));
data.add(new WxMpTemplateData("character_string9", orderNo));
@@ -168,7 +169,9 @@ public class WxCustomMpService {
PlayClerkUserInfoEntity clerkUserInfo = clerkUserInfoService.selectById(orderInfo.getAcceptBy());
PlayCustomUserInfoEntity customUserInfo = customUserInfoService.selectById(orderInfo.getPurchaserBy());
WxMpTemplateMessage templateMessage = getWxMpTemplateMessage(tenant.getJiedanchenggongtongzhiTemplateId(), clerkUserInfo.getOpenid(), "http://" + tenant.getTenantKey() + ".julyharbor.com/clerk/#/orderDetail/" + orderInfo.getId());
WxMpTemplateMessage templateMessage = getWxMpTemplateMessage(tenant.getJiedanchenggongtongzhiTemplateId(),
clerkUserInfo.getOpenid(),
"http://" + tenant.getTenantKey() + ".julyharbor.com/clerk/#/orderDetail/" + orderInfo.getId());
List<WxMpTemplateData> data = new ArrayList<>();
data.add(new WxMpTemplateData("character_string1", orderInfo.getOrderNo()));
data.add(new WxMpTemplateData("time2", DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss")));
@@ -180,7 +183,8 @@ public class WxCustomMpService {
}
templateMessage.setToUser(customUserInfo.getOpenid());
templateMessage.setUrl("http://" + tenant.getTenantKey() + ".julyharbor.com/user/#/orderDetail/" + orderInfo.getId());
templateMessage
.setUrl("http://" + tenant.getTenantKey() + ".julyharbor.com/user/#/orderDetail/" + orderInfo.getId());
try {
proxyWxMpService().getTemplateMsgService().sendTemplateMsg(templateMessage);
} catch (WxErrorException e) {
@@ -189,7 +193,8 @@ public class WxCustomMpService {
}
public void sendCheckMessage(PlayClerkUserReviewInfoEntity entity, PlayClerkUserInfoEntity userInfo, String reviewState) {
public void sendCheckMessage(PlayClerkUserReviewInfoEntity entity, PlayClerkUserInfoEntity userInfo,
String reviewState) {
String touser = userInfo.getOpenid();
SysTenantEntity tenant = tenantService.selectSysTenantByTenantId(userInfo.getTenantId());
@@ -221,9 +226,12 @@ public class WxCustomMpService {
String template_id = tenant.getRzsqAdminTemplateId();
String tenantKey = tenant.getTenantKey();
String url = "http://" + tenantKey + ".julyharbor.com/clerk/#/admin/clerk-apply-list";
List<PlayPersonnelAdminInfoEntity> adminInfoEntityList = playPersonnelAdminInfoService.list(Wrappers.lambdaQuery(PlayPersonnelAdminInfoEntity.class).select(PlayPersonnelAdminInfoEntity::getSysUserId));
List<PlayPersonnelAdminInfoEntity> adminInfoEntityList = playPersonnelAdminInfoService.list(Wrappers
.lambdaQuery(PlayPersonnelAdminInfoEntity.class).select(PlayPersonnelAdminInfoEntity::getSysUserId));
for (PlayPersonnelAdminInfoEntity adminInfoEntity : adminInfoEntityList) {
PlayClerkUserInfoEntity clerkUserInfo = clerkUserInfoService.getOne(Wrappers.lambdaQuery(PlayClerkUserInfoEntity.class).eq(PlayClerkUserInfoEntity::getSysUserId, adminInfoEntity.getSysUserId()), false);
PlayClerkUserInfoEntity clerkUserInfo = clerkUserInfoService
.getOne(Wrappers.lambdaQuery(PlayClerkUserInfoEntity.class)
.eq(PlayClerkUserInfoEntity::getSysUserId, adminInfoEntity.getSysUserId()), false);
if (Objects.isNull(clerkUserInfo)) {
continue;
}
@@ -234,7 +242,7 @@ public class WxCustomMpService {
List<WxMpTemplateData> data = new ArrayList<>();
data.add(new WxMpTemplateData("phone_number15", entity.getPhone()));
data.add(new WxMpTemplateData("thing11", entity.getNickname()));
//data.add(new WxMpTemplateData("thing3", "有新的店员提交了审核,请前去查看"));
// data.add(new WxMpTemplateData("thing3", "有新的店员提交了审核,请前去查看"));
data.add(new WxMpTemplateData("thing2", "有新的店员提交了审核,请前去查看"));
templateMessage.setData(data);
try {
@@ -250,9 +258,12 @@ public class WxCustomMpService {
/**
* 获取微信发啥消息模板
*
* @param templateId 消息模板ID
* @param toUser 发送目标用户ID
* @param url 消息回调地址
* @param templateId
* 消息模板ID
* @param toUser
* 发送目标用户ID
* @param url
* 消息回调地址
* @return WxMpTemplateMessage
*/
public WxMpTemplateMessage getWxMpTemplateMessage(String templateId, String toUser, String url) {
@@ -266,14 +277,19 @@ public class WxCustomMpService {
public void sendComplaintMessage(PlayOrderComplaintInfoEntity info, PlayOrderInfoEntity orderInfo) {
SysTenantEntity tenant = tenantService.selectSysTenantByTenantId(info.getTenantId());
List<PlayPersonnelAdminInfoEntity> adminInfoEntityList = playPersonnelAdminInfoService.list(Wrappers.lambdaQuery(PlayPersonnelAdminInfoEntity.class).select(PlayPersonnelAdminInfoEntity::getSysUserId));
List<PlayPersonnelAdminInfoEntity> adminInfoEntityList = playPersonnelAdminInfoService.list(Wrappers
.lambdaQuery(PlayPersonnelAdminInfoEntity.class).select(PlayPersonnelAdminInfoEntity::getSysUserId));
for (PlayPersonnelAdminInfoEntity adminInfo : adminInfoEntityList) {
PlayClerkUserInfoEntity clerkUserInfo = clerkUserInfoService.getOne(Wrappers.lambdaQuery(PlayClerkUserInfoEntity.class).eq(PlayClerkUserInfoEntity::getSysUserId, adminInfo.getSysUserId()), false);
PlayClerkUserInfoEntity clerkUserInfo = clerkUserInfoService
.getOne(Wrappers.lambdaQuery(PlayClerkUserInfoEntity.class)
.eq(PlayClerkUserInfoEntity::getSysUserId, adminInfo.getSysUserId()), false);
if (Objects.isNull(clerkUserInfo)) {
continue;
}
WxMpTemplateMessage templateMessage = getWxMpTemplateMessage(tenant.getDingdantousuchuliTemplateId(), clerkUserInfo.getOpenid(), "http://" + tenant.getTenantKey() + ".julyharbor.com/clerk/#/admin/order/complain-list");
WxMpTemplateMessage templateMessage = getWxMpTemplateMessage(tenant.getDingdantousuchuliTemplateId(),
clerkUserInfo.getOpenid(),
"http://" + tenant.getTenantKey() + ".julyharbor.com/clerk/#/admin/order/complain-list");
List<WxMpTemplateData> data = new ArrayList<>();
data.add(new WxMpTemplateData("character_string", orderInfo.getOrderNo()));
data.add(new WxMpTemplateData("time2", DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss")));
@@ -285,14 +301,15 @@ public class WxCustomMpService {
}
}
}
public void sendOrderFinishMessage(PlayOrderInfoEntity order) {
if (order.getPlaceType().equals("1") || order.getPlaceType().equals("2")) {
SysTenantEntity tenant = tenantService.selectSysTenantByTenantId(order.getTenantId());
PlayCustomUserInfoEntity customUserInfo = customUserInfoService.selectById(order.getPurchaserBy());
WxMpTemplateMessage templateMessage = getWxMpTemplateMessage(tenant.getDingdanwanchengtongzhiTemplateId(), customUserInfo.getOpenid(), "http://" + tenant.getTenantKey() + ".julyharbor.com/user/#/orderDetail/" + order.getId());
WxMpTemplateMessage templateMessage = getWxMpTemplateMessage(tenant.getDingdanwanchengtongzhiTemplateId(),
customUserInfo.getOpenid(),
"http://" + tenant.getTenantKey() + ".julyharbor.com/user/#/orderDetail/" + order.getId());
List<WxMpTemplateData> data = new ArrayList<>();
data.add(new WxMpTemplateData("time18", DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss")));
data.add(new WxMpTemplateData("character_string8", order.getOrderNo()));
@@ -312,7 +329,9 @@ public class WxCustomMpService {
PlayCustomUserInfoEntity customUserInfo = customUserInfoService.selectById(orderInfo.getPurchaserBy());
WxMpTemplateMessage templateMessage = getWxMpTemplateMessage(tenant.getQuxiaodingdantongzhiTemplateId(), customUserInfo.getOpenid(), "http://" + tenant.getTenantKey() + ".julyharbor.com/user/#/orderDetail/" + orderInfo.getId());
WxMpTemplateMessage templateMessage = getWxMpTemplateMessage(tenant.getQuxiaodingdantongzhiTemplateId(),
customUserInfo.getOpenid(),
"http://" + tenant.getTenantKey() + ".julyharbor.com/user/#/orderDetail/" + orderInfo.getId());
List<WxMpTemplateData> data = new ArrayList<>();
data.add(new WxMpTemplateData("character_string2", orderInfo.getOrderNo()));
data.add(new WxMpTemplateData("thing5", StringUtils.isEmpty(refundReason) ? "已取消" : refundReason));
@@ -324,11 +343,12 @@ public class WxCustomMpService {
log.error(e.getMessage(), e);
}
if(StringUtils.isNotEmpty(orderInfo.getAcceptBy())){
if (StringUtils.isNotEmpty(orderInfo.getAcceptBy())) {
PlayClerkUserInfoEntity clerkUserInfo = clerkUserInfoService.selectById(orderInfo.getAcceptBy());
templateMessage.setToUser(clerkUserInfo.getOpenid());
templateMessage.setUrl("http://" + tenant.getTenantKey() + ".julyharbor.com/clerk/#/orderDetail/" + orderInfo.getId());
templateMessage.setUrl(
"http://" + tenant.getTenantKey() + ".julyharbor.com/clerk/#/orderDetail/" + orderInfo.getId());
try {
proxyWxMpService().getTemplateMsgService().sendTemplateMsg(templateMessage);
} catch (WxErrorException e) {

View File

@@ -4,30 +4,25 @@ import com.starry.admin.modules.custom.module.entity.PlayCustomUserInfoEntity;
import com.starry.admin.modules.custom.service.IPlayCustomUserInfoService;
import com.starry.common.constant.Constants;
import com.starry.common.utils.StringUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import java.util.Objects;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.Objects;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
@Slf4j
@Service
public class WxCustomUserService {
@Resource
private IPlayCustomUserInfoService customUserInfoService;
@Resource
private HttpServletRequest request;
@Resource
private WxTokenService tokenService;
/**
* 获取当前登录顾客ID
*
@@ -55,5 +50,4 @@ public class WxCustomUserService {
return userToken.equals(entity.getToken()) ? userId : "";
}
}

Some files were not shown because too many files have changed in this diff Show More