docs: swagger docs refacto & perf
This commit is contained in:
@@ -17,6 +17,12 @@ import com.starry.admin.modules.weichat.entity.article.PlayClerkArticleFollowCus
|
||||
import com.starry.admin.modules.weichat.service.WxCustomUserService;
|
||||
import com.starry.common.result.R;
|
||||
import com.starry.common.utils.ConvertUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
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.*;
|
||||
@@ -30,6 +36,7 @@ import java.time.LocalDateTime;
|
||||
* @author admin
|
||||
* @since 2024/5/20 下午11:19
|
||||
**/
|
||||
@Api(tags = "微信文章动态接口", description = "微信端文章动态相关接口")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/wx/article")
|
||||
@@ -52,9 +59,13 @@ public class WxArticleController {
|
||||
/**
|
||||
* 店员新增动态
|
||||
*/
|
||||
@ApiOperation(value = "店员新增动态", notes = "店员发布新的动态文章")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功")
|
||||
})
|
||||
@ClerkUserLogin
|
||||
@PostMapping("/clerk/add")
|
||||
public R clerkAdd(@Validated @RequestBody PlayClerkAddArticleVo vo) {
|
||||
public R clerkAdd(@ApiParam(value = "动态信息", required = true) @Validated @RequestBody PlayClerkAddArticleVo vo) {
|
||||
vo.setClerkId(ThreadLocalRequestDetail.getClerkUserInfo().getId());
|
||||
playClerkArticleInfoService.create(ConvertUtil.entityToVo(vo, PlayClerkArticleInfoEntity.class));
|
||||
return R.ok("成功");
|
||||
@@ -64,6 +75,11 @@ public class WxArticleController {
|
||||
/**
|
||||
* 店员删除
|
||||
*/
|
||||
@ApiOperation(value = "店员删除动态", notes = "店员删除自己发布的动态")
|
||||
@ApiImplicitParam(name = "id", value = "动态ID", required = true, dataType = "String", paramType = "query")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功")
|
||||
})
|
||||
@ClerkUserLogin
|
||||
@GetMapping("/clerk/deleteById")
|
||||
public R clerkDeleteById(@RequestParam("id") String id) {
|
||||
@@ -75,9 +91,13 @@ public class WxArticleController {
|
||||
/**
|
||||
* 店员分页查询本人动态列表
|
||||
*/
|
||||
@ApiOperation(value = "店员查询动态", notes = "店员分页查询自己的动态列表")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkArticleInfoEntity.class, responseContainer = "Page")
|
||||
})
|
||||
@ClerkUserLogin
|
||||
@PostMapping("/clerk/listByPage")
|
||||
public R clerkListByPage(@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));
|
||||
}
|
||||
@@ -86,8 +106,12 @@ public class WxArticleController {
|
||||
/**
|
||||
* 顾客查询动态列表
|
||||
*/
|
||||
@ApiOperation(value = "顾客查询动态列表", notes = "顾客分页查询所有动态列表")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkArticleInfoEntity.class, responseContainer = "Page")
|
||||
})
|
||||
@PostMapping("/custom/listByPage")
|
||||
public R customListByPage(@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()));
|
||||
}
|
||||
@@ -95,9 +119,13 @@ public class WxArticleController {
|
||||
/**
|
||||
* 顾客查询已收藏动态列表
|
||||
*/
|
||||
@ApiOperation(value = "查询收藏动态", notes = "顾客查询已收藏的动态列表")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkArticleInfoEntity.class, responseContainer = "Page")
|
||||
})
|
||||
@CustomUserLogin
|
||||
@PostMapping("/custom/listFollowByPage")
|
||||
public R customListFollowByPage(@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()));
|
||||
}
|
||||
@@ -108,6 +136,11 @@ public class WxArticleController {
|
||||
* @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")
|
||||
})
|
||||
@GetMapping("/custom/queryByClerkId")
|
||||
public R queryTrendsById(@RequestParam("id") String id) {
|
||||
PlayClerkUserInfoEntity entity = playClerkUserInfoService.selectById(id);
|
||||
@@ -120,9 +153,13 @@ public class WxArticleController {
|
||||
/**
|
||||
* 顾客查询已收藏动态列表
|
||||
*/
|
||||
@ApiOperation(value = "更新点赞状态", notes = "顾客更新对动态的点赞状态")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功")
|
||||
})
|
||||
@CustomUserLogin
|
||||
@PostMapping("/custom/updateGreedState")
|
||||
public R customUpdateGreedState(@Validated @RequestBody PlayClerkArticleFollowCustomGreedStateEditStateVo vo) {
|
||||
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) {
|
||||
@@ -138,9 +175,13 @@ public class WxArticleController {
|
||||
return R.ok("成功");
|
||||
}
|
||||
|
||||
@ApiOperation(value = "更新收藏状态", notes = "顾客更新对动态的收藏状态")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功")
|
||||
})
|
||||
@CustomUserLogin
|
||||
@PostMapping("/custom/updateFollowState")
|
||||
public R customUpdateFollowState(@Validated @RequestBody PlayClerkArticleFollowCustomFollowStateEditStateVo vo) {
|
||||
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) {
|
||||
|
||||
@@ -12,6 +12,11 @@ import com.starry.admin.modules.shop.service.IPlayCommodityAndLevelInfoService;
|
||||
import com.starry.admin.modules.shop.service.IPlayCommodityInfoService;
|
||||
import com.starry.admin.modules.weichat.entity.PlayCommodityReturnVo;
|
||||
import com.starry.common.result.R;
|
||||
import io.swagger.annotations.Api;
|
||||
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.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@@ -30,6 +35,7 @@ import java.util.stream.Collectors;
|
||||
* @author admin
|
||||
* @since 2024/5/29 上午6:24
|
||||
**/
|
||||
@Api(tags = "微信店员商品接口", description = "微信端店员商品相关接口")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/wx/commodity/")
|
||||
@@ -48,6 +54,11 @@ public class WxClerkCommodityController {
|
||||
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")
|
||||
})
|
||||
@GetMapping("/custom/queryClerkAllCommodityByLevel")
|
||||
public R queryClerkAllCommodityByLevel(@RequestParam("id") String levelId) {
|
||||
List<PlayCommodityAndLevelInfoEntity> levelInfoEntities = iPlayCommodityAndLevelInfoService.selectAll();
|
||||
@@ -66,6 +77,12 @@ public class WxClerkCommodityController {
|
||||
*
|
||||
* @return 店员所有服务项目
|
||||
*/
|
||||
@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不能为空")
|
||||
})
|
||||
@GetMapping("/custom/queryClerkAllCommodity")
|
||||
public R customQueryClerkAllCommodity(@RequestParam("id") String clerkId) {
|
||||
if (clerkId == null || clerkId.isEmpty()) {
|
||||
@@ -87,6 +104,10 @@ public class WxClerkCommodityController {
|
||||
*
|
||||
* @return 店员所有服务项目
|
||||
*/
|
||||
@ApiOperation(value = "店员查询自己的商品", notes = "当前登录店员查询自己提供的所有商品服务")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功", response = PlayCommodityReturnVo.class, responseContainer = "List")
|
||||
})
|
||||
@ClerkUserLogin
|
||||
@GetMapping("/clerk/queryAllCommodity")
|
||||
public R clerkQueryAllCommodity() {
|
||||
|
||||
@@ -39,6 +39,11 @@ import com.starry.common.redis.RedisCache;
|
||||
import com.starry.common.result.R;
|
||||
import com.starry.common.utils.ConvertUtil;
|
||||
import com.starry.common.utils.VerificationCodeUtils;
|
||||
import io.swagger.annotations.Api;
|
||||
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;
|
||||
@@ -55,6 +60,7 @@ import java.util.concurrent.TimeUnit;
|
||||
/**
|
||||
* @author admin
|
||||
*/
|
||||
@Api(tags = "微信店员接口", description = "微信端店员相关接口")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/wx/clerk/")
|
||||
@@ -112,9 +118,13 @@ public class WxClerkController {
|
||||
/**
|
||||
* 店员获取个人业绩信息
|
||||
*/
|
||||
@ApiOperation(value = "查询店员业绩", notes = "店员获取个人业绩信息")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功")
|
||||
})
|
||||
@ClerkUserLogin
|
||||
@PostMapping("/user/queryPerformanceInfo")
|
||||
public R queryPerformanceInfo(@Validated @RequestBody PlayClerkWxPerformanceInfoQueryVo vo) {
|
||||
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());
|
||||
@@ -126,6 +136,10 @@ public class WxClerkController {
|
||||
/**
|
||||
* 店员获取个人等级信息
|
||||
*/
|
||||
@ApiOperation(value = "查询店员等级", notes = "店员获取个人等级信息")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkLevelInfoReturnVo.class)
|
||||
})
|
||||
@ClerkUserLogin
|
||||
@GetMapping("/user/queryLevelInfo")
|
||||
public R queryLevelInfo() {
|
||||
@@ -149,6 +163,11 @@ public class WxClerkController {
|
||||
/**
|
||||
* 店员获取个人信息
|
||||
*/
|
||||
@ApiOperation(value = "查询店员信息", notes = "店员获取个人详细信息")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkUserInfoResultVo.class),
|
||||
@ApiResponse(code = 500, message = "用户不存在")
|
||||
})
|
||||
@ClerkUserLogin
|
||||
@GetMapping("/user/queryById")
|
||||
public R queryById() {
|
||||
@@ -160,9 +179,13 @@ public class WxClerkController {
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "发送验证码", notes = "店员绑定手机号发送验证码")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功", response = String.class)
|
||||
})
|
||||
@ClerkUserLogin
|
||||
@PostMapping("/user/sendCode")
|
||||
public R sendCode(@Validated @RequestBody PlayClerkUserSendCodeVo vo) {
|
||||
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);
|
||||
@@ -170,9 +193,14 @@ public class WxClerkController {
|
||||
return R.ok(code);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "绑定手机号", notes = "店员绑定手机号")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功"),
|
||||
@ApiResponse(code = 500, message = "验证码错误")
|
||||
})
|
||||
@ClerkUserLogin
|
||||
@PostMapping("/user/bindCode")
|
||||
public R bindCode(@Validated @RequestBody PlayClerkUserBindCodeVo vo) {
|
||||
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())) {
|
||||
@@ -190,10 +218,17 @@ public class WxClerkController {
|
||||
return R.ok("成功");
|
||||
}
|
||||
|
||||
@ApiOperation(value = "店员申请", notes = "用户申请成为店员")
|
||||
@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)
|
||||
public R userAdd(@Validated @RequestBody PlayClerkUserByWxAddVo vo) {
|
||||
public R userAdd(@ApiParam(value = "店员申请信息", required = true) @Validated @RequestBody PlayClerkUserByWxAddVo vo) {
|
||||
String clerkId = ThreadLocalRequestDetail.getClerkUserInfo().getId();
|
||||
PlayClerkUserInfoEntity userInfo = playClerkUserInfoService.selectById(clerkId);
|
||||
if (userInfo == null) {
|
||||
@@ -218,9 +253,13 @@ public class WxClerkController {
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "更新头像", notes = "店员更新头像")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功")
|
||||
})
|
||||
@ClerkUserLogin
|
||||
@PostMapping("/user/updateAvatar")
|
||||
public R updateAvatar(@Validated @RequestBody PlayClerkUserAvatarVo vo) {
|
||||
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) {
|
||||
|
||||
@@ -4,6 +4,10 @@ import com.starry.admin.modules.clerk.module.entity.PlayClerkLevelInfoEntity;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkLevelInfoService;
|
||||
import com.starry.admin.modules.weichat.entity.level.PlayClerkLevelReturnVo;
|
||||
import com.starry.common.result.R;
|
||||
import io.swagger.annotations.Api;
|
||||
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.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@@ -19,6 +23,7 @@ import java.util.List;
|
||||
* @author admin
|
||||
* @since 2024/5/29 上午6:24
|
||||
**/
|
||||
@Api(tags = "微信店员等级接口", description = "微信端店员等级相关接口")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/wx/level/")
|
||||
@@ -33,6 +38,10 @@ public class WxClerkLeveController {
|
||||
*
|
||||
* @return 店员所有等级列表
|
||||
*/
|
||||
@ApiOperation(value = "查询店员等级列表", notes = "顾客查询所有店员等级列表")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功", response = PlayClerkLevelReturnVo.class, responseContainer = "List")
|
||||
})
|
||||
@GetMapping("/custom/queryClerkAllLevel")
|
||||
public R customQueryClerkAllLevel() {
|
||||
List<PlayClerkLevelInfoEntity> list = playClerkLevelInfoService.selectAll();
|
||||
|
||||
@@ -4,6 +4,10 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.starry.admin.modules.clerk.module.entity.PlayClerkTypeInfoEntity;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkTypeInfoService;
|
||||
import com.starry.common.result.R;
|
||||
import io.swagger.annotations.Api;
|
||||
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.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@@ -18,6 +22,7 @@ import java.util.List;
|
||||
* @author admin
|
||||
* @since 2024/5/29 上午6:24
|
||||
**/
|
||||
@Api(tags = "微信店员类型接口", description = "微信端店员类型相关接口")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/wx/clerk/type")
|
||||
@@ -32,6 +37,10 @@ public class WxClerkTypeController {
|
||||
*
|
||||
* @return 店员所有等级列表
|
||||
*/
|
||||
@ApiOperation(value = "查询店员类型列表", notes = "查询所有店员类型列表")
|
||||
@ApiResponses({
|
||||
@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));
|
||||
|
||||
@@ -16,6 +16,11 @@ import com.starry.admin.modules.weichat.entity.wages.*;
|
||||
import com.starry.common.result.R;
|
||||
import com.starry.common.utils.ConvertUtil;
|
||||
import com.starry.common.utils.IdUtils;
|
||||
import io.swagger.annotations.Api;
|
||||
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.*;
|
||||
|
||||
@@ -31,6 +36,7 @@ import java.util.List;
|
||||
* @author admin
|
||||
* @since 2024/5/31 16:18
|
||||
**/
|
||||
@Api(tags = "微信店员工资接口", description = "微信端店员工资相关接口")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/wx/wages")
|
||||
@@ -52,6 +58,10 @@ public class WxClerkWagesController {
|
||||
* @author admin
|
||||
* @since 2024/5/31 16:20
|
||||
**/
|
||||
@ApiOperation(value = "查询未结算工资", notes = "店员查询本人未结算工资")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功", response = ClerkUnsettledWagesReturnVo.class)
|
||||
})
|
||||
@ClerkUserLogin
|
||||
@GetMapping("clerk/queryUnsettledWages")
|
||||
public R clerkQueryUnsettledWages() {
|
||||
@@ -72,6 +82,10 @@ public class WxClerkWagesController {
|
||||
* @author admin
|
||||
* @since 2024/5/31 16:20
|
||||
**/
|
||||
@ApiOperation(value = "查询当期工资", notes = "店员查询本人当期工资")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功", response = ClerkCurrentPeriodWagesReturnVo.class)
|
||||
})
|
||||
@ClerkUserLogin
|
||||
@GetMapping("clerk/queryCurrentPeriodWages")
|
||||
public R clerkQueryCurrentPeriodWages() {
|
||||
@@ -101,6 +115,10 @@ public class WxClerkWagesController {
|
||||
* @author admin
|
||||
* @since 2024/5/31 16:20
|
||||
**/
|
||||
@ApiOperation(value = "查询历史工资", notes = "店员查询本人历史工资")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功", response = ClerkHistoricalWagesReturnVo.class, responseContainer = "Page")
|
||||
})
|
||||
@ClerkUserLogin
|
||||
@PostMapping("clerk/queryHistoricalWages")
|
||||
public R clerkQueryHistoricalWages() {
|
||||
@@ -124,6 +142,12 @@ public class WxClerkWagesController {
|
||||
* @author admin
|
||||
* @since 2024/5/31 16:20
|
||||
**/
|
||||
@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不能为空")
|
||||
})
|
||||
@ClerkUserLogin
|
||||
@GetMapping("clerk/queryWagesDetails")
|
||||
public R clerkQueryWagesDetails(@RequestParam("id") String id) {
|
||||
|
||||
@@ -5,6 +5,11 @@ 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;
|
||||
import com.starry.common.result.R;
|
||||
import io.swagger.annotations.Api;
|
||||
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.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@@ -20,6 +25,7 @@ import java.util.stream.Collectors;
|
||||
/**
|
||||
* @author admin
|
||||
*/
|
||||
@Api(tags = "微信商品接口", description = "微信端商品相关接口")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/wx/commodity/")
|
||||
@@ -27,6 +33,11 @@ public class WxCommodityController {
|
||||
@Resource
|
||||
private IPlayClerkCommodityService clerkCommodityService;
|
||||
|
||||
@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")
|
||||
})
|
||||
@GetMapping("/getTree")
|
||||
public R getTree(@RequestParam("userId") String userId) {
|
||||
List<PlayClerkCommodityEntity> commodityEntities = clerkCommodityService.selectByUser(userId);
|
||||
|
||||
@@ -11,6 +11,12 @@ import com.starry.admin.modules.weichat.utils.WxFileUtils;
|
||||
import com.starry.admin.utils.SecurityUtils;
|
||||
import com.starry.common.result.R;
|
||||
import com.starry.common.utils.IdUtils;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
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.*;
|
||||
@@ -27,6 +33,7 @@ import java.nio.file.Files;
|
||||
* @author admin
|
||||
* @since 2024/4/10 16:18
|
||||
**/
|
||||
@Api(tags = "微信通用接口", description = "微信公共功能相关接口")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/wx/common/")
|
||||
@@ -45,22 +52,40 @@ public class WxCommonController {
|
||||
private IShopUiSettingService shopUiSettingService;
|
||||
|
||||
|
||||
@ApiOperation(value = "获取行政区域树", notes = "获取省市区县的树形结构数据")
|
||||
@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 = "操作成功")
|
||||
})
|
||||
@GetMapping("setting/info")
|
||||
public R selectShopUiSettingInfo() {
|
||||
return R.ok(shopUiSettingService.selectShopUiSettingInfo());
|
||||
}
|
||||
|
||||
@ApiOperation(value = "上传文件", notes = "上传文件到OSS存储")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功,返回文件访问地址")
|
||||
})
|
||||
@PostMapping("file/upload")
|
||||
public R fileUpload(@RequestParam("file") MultipartFile file) throws IOException {
|
||||
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为空或文件不存在")
|
||||
})
|
||||
@GetMapping("audio/upload")
|
||||
public R audioUpload(@RequestParam("mediaId") String mediaId) throws IOException, WxErrorException {
|
||||
if (StrUtil.isBlankIfStr(mediaId)) {
|
||||
|
||||
@@ -19,6 +19,12 @@ import com.starry.admin.modules.weichat.entity.WxCouponOrderReturnVo;
|
||||
import com.starry.admin.modules.weichat.entity.WxCouponReceiveReturnVo;
|
||||
import com.starry.common.result.R;
|
||||
import com.starry.common.utils.ConvertUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
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.*;
|
||||
@@ -33,6 +39,7 @@ import java.util.Map;
|
||||
* @author admin
|
||||
* @since 2024/7/4 11:33
|
||||
**/
|
||||
@Api(tags = "微信优惠券接口", description = "微信端优惠券相关接口")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/wx/coupon/")
|
||||
@@ -52,6 +59,12 @@ public class WxCouponController {
|
||||
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不能为空")
|
||||
})
|
||||
@CustomUserLogin
|
||||
@GetMapping("/custom/obtainCoupon")
|
||||
public R queryAll(@RequestParam("id") String id) {
|
||||
@@ -80,6 +93,10 @@ public class WxCouponController {
|
||||
* @author admin
|
||||
* @since 2024/7/8 13:53
|
||||
**/
|
||||
@ApiOperation(value = "查询所有优惠券", notes = "查询所有优惠券并标记用户是否已领取")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功", response = WxCouponReceiveReturnVo.class, responseContainer = "List")
|
||||
})
|
||||
@CustomUserLogin
|
||||
@PostMapping("/custom/queryAll")
|
||||
public R queryAll() {
|
||||
@@ -105,9 +122,14 @@ public class WxCouponController {
|
||||
/**
|
||||
* 顾客查询订单可使用优惠券
|
||||
*/
|
||||
@ApiOperation(value = "查询订单可用优惠券", notes = "查询当前订单可使用的优惠券列表")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功", response = WxCouponOrderReturnVo.class, responseContainer = "List"),
|
||||
@ApiResponse(code = 500, message = "请求参数异常,店员ID不能为空,等级ID不能为空")
|
||||
})
|
||||
@CustomUserLogin
|
||||
@PostMapping("/custom/queryByOrder")
|
||||
public R queryByOrder(@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不能为空");
|
||||
}
|
||||
|
||||
@@ -49,6 +49,12 @@ import com.starry.common.result.R;
|
||||
import com.starry.common.utils.ConvertUtil;
|
||||
import com.starry.common.utils.IdUtils;
|
||||
import com.starry.common.utils.StringUtils;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
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;
|
||||
@@ -63,6 +69,7 @@ import java.util.Objects;
|
||||
/**
|
||||
* @author admin
|
||||
*/
|
||||
@Api(tags = "微信顾客接口", description = "微信端顾客相关接口")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/wx/custom/")
|
||||
@@ -126,6 +133,11 @@ public class WxCustomController {
|
||||
* @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)
|
||||
})
|
||||
@GetMapping("/queryClerkDetailedById")
|
||||
public R queryClerkDetailedById(@RequestParam("id") String id) {
|
||||
PlayClerkUserInfoEntity entity = clerkUserInfoService.selectById(id);
|
||||
@@ -144,6 +156,10 @@ public class WxCustomController {
|
||||
/**
|
||||
* 顾客本人刷新头像
|
||||
*/
|
||||
@ApiOperation(value = "刷新顾客头像", notes = "刷新当前登录顾客的头像信息")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功")
|
||||
})
|
||||
@CustomUserLogin
|
||||
@GetMapping("/refreshAvatar")
|
||||
public R refreshAvatar() {
|
||||
@@ -153,6 +169,10 @@ public class WxCustomController {
|
||||
/**
|
||||
* 根据顾客ID查询当前顾客详细信息
|
||||
*/
|
||||
@ApiOperation(value = "查询顾客详细信息", notes = "查询当前登录顾客的详细信息")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功", response = PlayCustomUserReturnDetailVo.class)
|
||||
})
|
||||
@CustomUserLogin
|
||||
@GetMapping("/queryById")
|
||||
public R queryById() {
|
||||
@@ -169,9 +189,13 @@ public class WxCustomController {
|
||||
/**
|
||||
* 顾客本人修改隐藏等级状态
|
||||
*/
|
||||
@ApiOperation(value = "修改隐藏等级状态", notes = "顾客修改自己的隐藏等级状态")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功")
|
||||
})
|
||||
@CustomUserLogin
|
||||
@PostMapping("/updateHideLevelState")
|
||||
public R updateHideLevelState(@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);
|
||||
@@ -182,9 +206,13 @@ public class WxCustomController {
|
||||
/**
|
||||
* 顾客本人修改隐藏排名状态
|
||||
*/
|
||||
@ApiOperation(value = "修改隐藏排名状态", notes = "顾客修改自己的隐藏排名状态")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功")
|
||||
})
|
||||
@CustomUserLogin
|
||||
@PostMapping("/updateHideRankingState")
|
||||
public R updateHideRankingState(@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);
|
||||
@@ -196,9 +224,14 @@ public class WxCustomController {
|
||||
/**
|
||||
* 打赏店员-打赏余额
|
||||
*/
|
||||
@ApiOperation(value = "打赏店员", notes = "使用余额打赏店员")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功"),
|
||||
@ApiResponse(code = 998, message = "余额不足")
|
||||
})
|
||||
@CustomUserLogin
|
||||
@PostMapping("/order/reward")
|
||||
public R rewardToOrder(@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);
|
||||
@@ -217,9 +250,14 @@ public class WxCustomController {
|
||||
/**
|
||||
* 顾客下单-赠送礼物
|
||||
**/
|
||||
@ApiOperation(value = "赠送礼物", notes = "顾客向店员赠送礼物")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功"),
|
||||
@ApiResponse(code = 998, message = "余额不足")
|
||||
})
|
||||
@CustomUserLogin
|
||||
@PostMapping("/order/gift")
|
||||
public R giftToOdder(@Validated @RequestBody PlayOrderInfoGiftAdd vo) {
|
||||
public R giftToOdder(@ApiParam(value = "礼物信息", required = true) @Validated @RequestBody PlayOrderInfoGiftAdd vo) {
|
||||
String userId = ThreadLocalRequestDetail.getCustomUserInfo().getId();
|
||||
PlayGiftInfoEntity giftInfo = giftInfoService.selectPlayGiftInfoById(vo.getGiftId());
|
||||
PlayCustomUserInfoEntity customUserInfo = customUserInfoService.selectById(userId);
|
||||
@@ -271,9 +309,15 @@ public class WxCustomController {
|
||||
* @author admin
|
||||
* @since 2024/5/8 16:31
|
||||
**/
|
||||
@ApiOperation(value = "商品下单", notes = "顾客购买店员服务商品")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功"),
|
||||
@ApiResponse(code = 998, message = "余额不足"),
|
||||
@ApiResponse(code = 500, message = "请求参数异常")
|
||||
})
|
||||
@CustomUserLogin
|
||||
@PostMapping("/order/commodity")
|
||||
public R commodityToOrdder(@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());
|
||||
|
||||
|
||||
@@ -11,6 +11,11 @@ import com.starry.admin.modules.weichat.entity.PlayGiftInfoDto;
|
||||
import com.starry.admin.modules.weichat.entity.gift.PlayClerkGiftReturnVo;
|
||||
import com.starry.common.result.R;
|
||||
import com.starry.common.utils.ConvertUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
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.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@@ -23,6 +28,7 @@ import java.util.List;
|
||||
/**
|
||||
* @author admin
|
||||
*/
|
||||
@Api(tags = "微信礼物接口", description = "微信端礼物相关接口")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/wx/gift/")
|
||||
@@ -35,6 +41,10 @@ public class WxGiftController {
|
||||
*
|
||||
* @return 礼物列表
|
||||
*/
|
||||
@ApiOperation(value = "查询所有礼物", notes = "查询系统中所有礼物列表")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功", response = PlayGiftInfoDto.class, responseContainer = "List")
|
||||
})
|
||||
@GetMapping("/listByAll")
|
||||
public R customListByAll() {
|
||||
return R.ok(ConvertUtil.entityToVoList(giftInfoService.listByAll(),PlayGiftInfoDto.class));
|
||||
@@ -47,6 +57,12 @@ public class WxGiftController {
|
||||
* @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参数异常")
|
||||
})
|
||||
@ClerkUserLogin
|
||||
@GetMapping("/clerk/listByAll")
|
||||
public R clerkListByAll(@RequestParam("obtained") String obtained) {
|
||||
@@ -67,6 +83,12 @@ public class WxGiftController {
|
||||
* @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参数异常")
|
||||
})
|
||||
@CustomUserLogin
|
||||
@GetMapping("/custom/listByAll")
|
||||
public R customListByAll(@RequestParam("obtained") String obtained) {
|
||||
|
||||
@@ -6,6 +6,10 @@ import com.starry.admin.modules.custom.module.entity.PlayCustomLevelInfoEntity;
|
||||
import com.starry.admin.modules.custom.service.IPlayCustomLevelInfoService;
|
||||
import com.starry.admin.modules.weichat.entity.vo.PlayCustomLevelInfoReturnVo;
|
||||
import com.starry.common.result.R;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiResponse;
|
||||
import io.swagger.annotations.ApiResponses;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@@ -19,6 +23,7 @@ import java.util.List;
|
||||
/**
|
||||
* @author admin
|
||||
*/
|
||||
@Api(tags = "微信等级接口", description = "微信端用户等级相关接口")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/wx/level/")
|
||||
@@ -31,6 +36,10 @@ public class WxLevelController {
|
||||
/**
|
||||
* 顾客查询登记列表
|
||||
*/
|
||||
@ApiOperation(value = "查询等级列表", notes = "查询所有顾客等级列表")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功", response = PlayCustomLevelInfoReturnVo.class, responseContainer = "List")
|
||||
})
|
||||
@CustomUserLogin
|
||||
@GetMapping("/custom/queryAll")
|
||||
public R queryById() {
|
||||
|
||||
@@ -18,6 +18,12 @@ import com.starry.admin.modules.weichat.service.WxOauthService;
|
||||
import com.starry.admin.modules.weichat.service.WxTokenService;
|
||||
import com.starry.common.redis.RedisCache;
|
||||
import com.starry.common.result.R;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
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.bean.WxJsapiSignature;
|
||||
import me.chanjar.weixin.common.error.WxErrorException;
|
||||
@@ -35,6 +41,7 @@ import static com.starry.common.constant.Constants.*;
|
||||
* @author admin
|
||||
* @since 2019-03-25 15:39:39
|
||||
*/
|
||||
@Api(tags = "微信授权接口", description = "微信端用户授权相关接口")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/wx/oauth2")
|
||||
@@ -55,8 +62,12 @@ public class WxOauthController {
|
||||
private RedisCache redisCache;
|
||||
|
||||
|
||||
@ApiOperation(value = "获取配置地址", notes = "获取微信JSAPI配置签名")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功", response = WxJsapiSignature.class)
|
||||
})
|
||||
@PostMapping("/getConfigAddress")
|
||||
public R getConfigAddress(@RequestBody WxUserQueryAddressVo vo) throws WxErrorException {
|
||||
public R getConfigAddress(@ApiParam(value = "地址查询信息", required = true) @RequestBody WxUserQueryAddressVo vo) throws WxErrorException {
|
||||
// 默认回调地址
|
||||
String defaultAddress = "http://july.hucs.top/api/wx/oauth2/clerkLoginCallback";
|
||||
if (!StrUtil.isBlankIfStr(vo.getUrl())) {
|
||||
@@ -66,8 +77,12 @@ public class WxOauthController {
|
||||
return R.ok(wxJsapiSignature);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取店员登录地址", notes = "获取微信店员授权登录地址")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功", response = String.class)
|
||||
})
|
||||
@PostMapping("/getClerkLoginAddress")
|
||||
public R getClerkLoginAddress(@RequestBody WxUserQueryAddressVo vo) {
|
||||
public R getClerkLoginAddress(@ApiParam(value = "地址查询信息", required = true) @RequestBody WxUserQueryAddressVo vo) {
|
||||
// 默认回调地址
|
||||
String defaultAddress = "http://july.hucs.top/api/wx/oauth2/clerkLoginCallback";
|
||||
if (!StrUtil.isBlankIfStr(vo.getUrl())) {
|
||||
@@ -78,13 +93,21 @@ public class WxOauthController {
|
||||
}
|
||||
|
||||
|
||||
@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 = "用户不存在")
|
||||
})
|
||||
@PostMapping("/clerk/login")
|
||||
public R clerkLogin(@Validated @RequestBody WxUserLoginVo vo) {
|
||||
public R clerkLogin(@ApiParam(value = "登录信息", required = true) @Validated @RequestBody WxUserLoginVo vo) {
|
||||
try {
|
||||
String userId = wxOauthService.clerkUserLogin(vo.getCode());
|
||||
PlayClerkUserInfoEntity entity = clerkUserInfoService.selectById(userId);
|
||||
@@ -108,8 +131,14 @@ public class WxOauthController {
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "店员开发登录", notes = "微信店员开发环境登录(固定用户)")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功", response = JSONObject.class),
|
||||
@ApiResponse(code = 401, message = "登录失败"),
|
||||
@ApiResponse(code = 500, message = "用户不存在")
|
||||
})
|
||||
@PostMapping("/clerk/login/dev")
|
||||
public R clerkLoginDev(@Validated @RequestBody WxUserLoginVo vo) {
|
||||
public R clerkLoginDev(@ApiParam(value = "登录信息", required = true) @Validated @RequestBody WxUserLoginVo vo) {
|
||||
try {
|
||||
String userId = "a4471ef596a1";
|
||||
PlayClerkUserInfoEntity entity = clerkUserInfoService.selectById(userId);
|
||||
@@ -133,8 +162,13 @@ public class WxOauthController {
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "店员ID登录", notes = "根据店员ID直接登录")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功", response = JSONObject.class),
|
||||
@ApiResponse(code = 500, message = "用户不存在")
|
||||
})
|
||||
@PostMapping("/clerk/loginById")
|
||||
public R loginById(@Validated @RequestBody WxUserLoginVo vo) {
|
||||
public R loginById(@ApiParam(value = "登录信息", required = true) @Validated @RequestBody WxUserLoginVo vo) {
|
||||
PlayClerkUserInfoEntity entity = clerkUserInfoService.selectById(vo.getCode());
|
||||
if (entity == null) {
|
||||
throw new CustomException("用户不存在");
|
||||
@@ -151,6 +185,10 @@ public class WxOauthController {
|
||||
return R.ok(jsonObject);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "店员登出", notes = "店员退出登录")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "登出成功")
|
||||
})
|
||||
@ClerkUserLogin
|
||||
@GetMapping("/clerk/logout")
|
||||
public R clerkLogout() {
|
||||
@@ -159,8 +197,12 @@ public class WxOauthController {
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "获取顾客登录地址", notes = "获取微信顾客授权登录地址")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功", response = String.class)
|
||||
})
|
||||
@PostMapping("/getCustomLoginAddress")
|
||||
public R getCustomLoginAddress(@RequestBody WxUserQueryAddressVo vo) {
|
||||
public R getCustomLoginAddress(@ApiParam(value = "地址查询信息", required = true) @RequestBody WxUserQueryAddressVo vo) {
|
||||
// 默认回调地址
|
||||
String defaultAddress = "http://july.hucs.top/api/wx/oauth2/customLoginCallback";
|
||||
if (!StrUtil.isBlankIfStr(vo.getUrl())) {
|
||||
@@ -170,14 +212,22 @@ public class WxOauthController {
|
||||
return R.ok(url);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "顾客登录回调", notes = "微信顾客授权登录回调处理")
|
||||
@ApiImplicitParam(name = "code", value = "授权码", required = true, dataType = "String", paramType = "query")
|
||||
@GetMapping("/customLoginCallback")
|
||||
public void customLoginCallback(@RequestParam("code") String code) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "顾客登录", notes = "微信顾客授权登录")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功", response = JSONObject.class),
|
||||
@ApiResponse(code = 401, message = "登录失败"),
|
||||
@ApiResponse(code = 500, message = "用户不存在")
|
||||
})
|
||||
@PostMapping("/custom/login")
|
||||
public R customLogin(@Validated @RequestBody WxUserLoginVo vo) {
|
||||
public R customLogin(@ApiParam(value = "登录信息", required = true) @Validated @RequestBody WxUserLoginVo vo) {
|
||||
log.info("顾客登录接口调用,code = {}", vo.getCode());
|
||||
try {
|
||||
String userId = wxOauthService.customUserLogin(vo.getCode());
|
||||
@@ -201,8 +251,13 @@ public class WxOauthController {
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "顾客ID登录", notes = "根据顾客ID直接登录")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功", response = JSONObject.class),
|
||||
@ApiResponse(code = 500, message = "用户不存在")
|
||||
})
|
||||
@PostMapping("/custom/loginById")
|
||||
public R loginById1(@Validated @RequestBody WxUserLoginVo vo) {
|
||||
public R loginById1(@ApiParam(value = "登录信息", required = true) @Validated @RequestBody WxUserLoginVo vo) {
|
||||
PlayCustomUserInfoEntity entity = customUserInfoService.selectById(vo.getCode());
|
||||
if (entity == null) {
|
||||
throw new CustomException("用户不存在");
|
||||
@@ -220,6 +275,10 @@ public class WxOauthController {
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "顾客登出", notes = "顾客退出登录")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "登出成功")
|
||||
})
|
||||
@GetMapping("/custom/logout")
|
||||
@CustomUserLogin
|
||||
public R customLogout() {
|
||||
|
||||
@@ -18,6 +18,12 @@ import com.starry.admin.modules.weichat.entity.order.PlayOrderInfoContinueQueryV
|
||||
import com.starry.admin.modules.weichat.entity.order.PlayOrderInfoRandomQueryVo;
|
||||
import com.starry.admin.modules.weichat.entity.order.PlayRewardOrderQueryVo;
|
||||
import com.starry.common.result.R;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
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;
|
||||
@@ -32,6 +38,7 @@ import java.time.LocalDateTime;
|
||||
* @author admin
|
||||
* @since 2024/5/25 下午2:45
|
||||
**/
|
||||
@Api(tags = "微信订单接口", description = "微信端订单相关接口")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/wx/order")
|
||||
@@ -49,9 +56,15 @@ public class WxOrderInfoController {
|
||||
*
|
||||
* @param vo 续单申请提交对象
|
||||
*/
|
||||
@ApiOperation(value = "店员申请续单", notes = "店员为当前订单发起续单申请")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功"),
|
||||
@ApiResponse(code = 500, message = "非本人订单;无法续单"),
|
||||
@ApiResponse(code = 500, message = "同一场订单只能续单一次")
|
||||
})
|
||||
@ClerkUserLogin
|
||||
@PostMapping("/clerk/continue")
|
||||
public R continueToOrdder(@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("非本人订单;无法续单");
|
||||
@@ -85,9 +98,13 @@ public class WxOrderInfoController {
|
||||
* @param vo 随机单列表查询对象
|
||||
* @return 订单列表
|
||||
*/
|
||||
@ApiOperation(value = "查询随机单列表", notes = "店员查询可接的随机订单列表")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功")
|
||||
})
|
||||
@ClerkUserLogin
|
||||
@PostMapping("/clerk/selectRandomOrderByPage")
|
||||
public R selectUnacceptedOrderByPage(@Validated @RequestBody PlayOrderInfoRandomQueryVo vo) {
|
||||
public R selectUnacceptedOrderByPage(@ApiParam(value = "查询条件", required = true) @Validated @RequestBody PlayOrderInfoRandomQueryVo vo) {
|
||||
return R.ok(playOrderInfoService.selectRandomOrderByPage(vo,ThreadLocalRequestDetail.getClerkUserInfo().getId()));
|
||||
}
|
||||
|
||||
@@ -97,6 +114,12 @@ public class WxOrderInfoController {
|
||||
* @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 = "订单不存在")
|
||||
})
|
||||
@ClerkUserLogin
|
||||
@GetMapping("/clerk/selectRandomOrderById")
|
||||
public R selectUnacceptedOrderByPage(@RequestParam("id") String id) {
|
||||
@@ -113,9 +136,12 @@ public class WxOrderInfoController {
|
||||
* @param vo 打赏动态查询列表
|
||||
* @return 打赏动态列表
|
||||
*/
|
||||
|
||||
@ApiOperation(value = "店员查询打赏动态", notes = "店员查询打赏订单动态")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功")
|
||||
})
|
||||
@PostMapping("/clerk/selectRewardByPage")
|
||||
public R clerkSelectRewardByPage(@Validated @RequestBody PlayRewardOrderQueryVo vo) {
|
||||
public R clerkSelectRewardByPage(@ApiParam(value = "查询条件", required = true) @Validated @RequestBody PlayRewardOrderQueryVo vo) {
|
||||
return R.ok(playOrderInfoService.selectRewardByPage(vo));
|
||||
}
|
||||
|
||||
@@ -124,7 +150,10 @@ public class WxOrderInfoController {
|
||||
*
|
||||
* @return 打赏动态列表
|
||||
*/
|
||||
|
||||
@ApiOperation(value = "顾客查询打赏动态", notes = "顾客查询最新打赏订单动态")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功")
|
||||
})
|
||||
@GetMapping("/custom/selectRewardByPage")
|
||||
public R customSelectReward() {
|
||||
PlayRewardOrderQueryVo vo = new PlayRewardOrderQueryVo();
|
||||
@@ -138,9 +167,13 @@ public class WxOrderInfoController {
|
||||
* @param vo PlayOrderInfoContinueQueryVo
|
||||
* @return 续单历史
|
||||
*/
|
||||
@ApiOperation(value = "查询续单列表", notes = "顾客分页查询续单申请列表")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功", response = PlayOrderContinueReturnVo.class, responseContainer = "Page")
|
||||
})
|
||||
@CustomUserLogin
|
||||
@PostMapping("/custom/continueListByPage")
|
||||
public R continueListByPage(@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());
|
||||
@@ -152,9 +185,14 @@ public class WxOrderInfoController {
|
||||
/**
|
||||
* 审批续单申申请
|
||||
*/
|
||||
@ApiOperation(value = "审批续单申请", notes = "顾客审批店员发起的续单申请")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功"),
|
||||
@ApiResponse(code = 500, message = "续单已处理")
|
||||
})
|
||||
@CustomUserLogin
|
||||
@PostMapping("/custom/updateReviewState")
|
||||
public R updateReviewState(@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("续单已处理");
|
||||
|
||||
@@ -6,6 +6,11 @@ import com.starry.admin.modules.personnel.service.IPlayPersonnelGroupInfoService
|
||||
import com.starry.admin.modules.weichat.entity.PlayGroupWagesQueryVo;
|
||||
import com.starry.admin.modules.weichat.entity.PlayGroupWagesReturnVo;
|
||||
import com.starry.common.result.R;
|
||||
import io.swagger.annotations.Api;
|
||||
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.PostMapping;
|
||||
@@ -23,6 +28,7 @@ import java.util.List;
|
||||
* @author admin
|
||||
* @since 2024/7/6 下午3:46
|
||||
**/
|
||||
@Api(tags = "微信分组管理", description = "微信端店员分组相关接口")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/wx/group")
|
||||
@@ -36,9 +42,13 @@ public class WxPersonnelGroupInfoController {
|
||||
/**
|
||||
* 查询组长公工资
|
||||
*/
|
||||
@ApiOperation(value = "查询分组工资", notes = "获取所有店员分组的工资信息")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功", response = PlayGroupWagesReturnVo.class, responseContainer = "List")
|
||||
})
|
||||
@ClerkUserLogin
|
||||
@PostMapping("/wages/listAll")
|
||||
public R listGroupWagesAll(@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) {
|
||||
|
||||
@@ -29,6 +29,11 @@ import com.starry.admin.modules.weichat.service.WxCustomMpService;
|
||||
import com.starry.admin.utils.SecurityUtils;
|
||||
import com.starry.common.result.R;
|
||||
import com.starry.common.utils.StringUtils;
|
||||
import io.swagger.annotations.Api;
|
||||
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.dom4j.Document;
|
||||
import org.dom4j.DocumentHelper;
|
||||
@@ -51,6 +56,7 @@ import java.util.Objects;
|
||||
/**
|
||||
* @author admin
|
||||
*/
|
||||
@Api(tags = "微信支付接口", description = "微信端支付相关接口")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/wx/pay/")
|
||||
@@ -75,6 +81,10 @@ public class WxPlayController {
|
||||
* @author admin
|
||||
* @since 2024/5/8 11:25
|
||||
**/
|
||||
@ApiOperation(value = "微信支付回调", notes = "微信支付后的回调接口")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "成功")
|
||||
})
|
||||
@RequestMapping("/jsCallback")
|
||||
public String wxPayNotify(HttpServletRequest request) {
|
||||
try (InputStream inStream = request.getInputStream(); ByteArrayOutputStream outSteam = new ByteArrayOutputStream()) {
|
||||
@@ -130,15 +140,24 @@ public class WxPlayController {
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "测试消息推送", notes = "测试充值消息推送功能")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功")
|
||||
})
|
||||
@GetMapping("/test")
|
||||
public R test() {
|
||||
|
||||
PlayOrderInfoEntity orderInfo = playOrderInfoService.getById("0e3e7d7ec69a");
|
||||
mpService.sendBalanceMessage(orderInfo);
|
||||
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不能为空")
|
||||
})
|
||||
@CustomUserLogin
|
||||
@GetMapping("/custom/getCustomPaymentAmount")
|
||||
public R getCustomPaymentAmount(@RequestParam("money") String money) {
|
||||
@@ -149,6 +168,14 @@ public class WxPlayController {
|
||||
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获取失败")
|
||||
})
|
||||
@CustomUserLogin
|
||||
@GetMapping("/custom/createOrder")
|
||||
public R createOrder(@RequestParam("money") String money) {
|
||||
|
||||
@@ -6,6 +6,10 @@ import com.starry.admin.modules.clerk.service.IPlayClerkRankingInfoService;
|
||||
import com.starry.admin.modules.weichat.entity.order.PlayOrderHistoryRankingReturnVo;
|
||||
import com.starry.admin.modules.weichat.entity.order.PlayOrderRankingReturnVo;
|
||||
import com.starry.common.result.R;
|
||||
import io.swagger.annotations.Api;
|
||||
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.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@@ -18,6 +22,7 @@ import java.util.List;
|
||||
* @author admin
|
||||
* @since 2024/5/25 下午10:25
|
||||
**/
|
||||
@Api(tags = "微信订单排行接口", description = "微信端订单排行相关接口")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/wx/orderRanking")
|
||||
@@ -31,6 +36,10 @@ public class WxPlayOrderRankingController {
|
||||
/**
|
||||
* 查询当前排行
|
||||
*/
|
||||
@ApiOperation(value = "查询当前排行", notes = "查询店员当前排行榜信息")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功", response = PlayOrderRankingReturnVo.class)
|
||||
})
|
||||
@ClerkUserLogin
|
||||
@GetMapping("/clerk/selectCurrentRanking")
|
||||
public R selectCurrentRanking() {
|
||||
@@ -42,6 +51,10 @@ public class WxPlayOrderRankingController {
|
||||
/**
|
||||
* 查询历史排行
|
||||
*/
|
||||
@ApiOperation(value = "查询历史排行", notes = "查询店员历史排行榜信息")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功", response = PlayOrderHistoryRankingReturnVo.class, responseContainer = "List")
|
||||
})
|
||||
@ClerkUserLogin
|
||||
@GetMapping("/clerk/selectHistoryRanking")
|
||||
public R selectHistoryRanking() {
|
||||
|
||||
@@ -9,6 +9,11 @@ import com.starry.admin.modules.weichat.entity.PlayShopReadArticleVo;
|
||||
import com.starry.admin.modules.weichat.entity.shop.ShopHomeCarouseInfoReturnVo;
|
||||
import com.starry.common.result.R;
|
||||
import com.starry.common.utils.ConvertUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
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.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
@@ -24,6 +29,7 @@ import java.util.List;
|
||||
* @author admin
|
||||
* @since 2024/5/20 下午11:19
|
||||
**/
|
||||
@Api(tags = "微信店铺接口", description = "微信端店铺相关接口")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/wx/shop")
|
||||
@@ -39,6 +45,10 @@ public class WxShopController {
|
||||
/**
|
||||
* 获取首页轮播图
|
||||
*/
|
||||
@ApiOperation(value = "获取首页轮播图", notes = "获取店铺首页轮播图信息")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功", response = ShopHomeCarouseInfoReturnVo.class, responseContainer = "List")
|
||||
})
|
||||
@GetMapping(value = "custom/getShopHomeCarouseInfo")
|
||||
public R getShopHomeCarouseInfo() {
|
||||
List<PlayShopCarouselInfoEntity> entities = playShopCarouselInfoService.selectHomeCarouselInfo();
|
||||
@@ -49,6 +59,10 @@ public class WxShopController {
|
||||
/**
|
||||
* 获取店铺文章列表
|
||||
*/
|
||||
@ApiOperation(value = "获取文章列表", notes = "获取店铺所有文章列表")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功", response = PlayShopArticleInfoEntity.class, responseContainer = "List")
|
||||
})
|
||||
@ClerkUserLogin
|
||||
@GetMapping(value = "clerk/getArticleList")
|
||||
public R getArticleList() {
|
||||
@@ -59,9 +73,13 @@ public class WxShopController {
|
||||
/**
|
||||
* 阅读店铺文章
|
||||
*/
|
||||
@ApiOperation(value = "阅读文章", notes = "阅读店铺文章并增加访问次数")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功")
|
||||
})
|
||||
@ClerkUserLogin
|
||||
@GetMapping(value = "clerk/readShopArticleInfo")
|
||||
public R readShopArticleInfo(@RequestBody PlayShopReadArticleVo vo) {
|
||||
public R readShopArticleInfo(@ApiParam(value = "文章参数", required = true) @RequestBody PlayShopReadArticleVo vo) {
|
||||
PlayShopArticleInfoEntity entity = playShopArticleInfoService.selectById(vo.getId());
|
||||
entity.setVisitsNumber(entity.getVisitsNumber() + 1);
|
||||
playShopArticleInfoService.update(entity);
|
||||
|
||||
@@ -2,6 +2,11 @@ package com.starry.admin.modules.weichat.controller;
|
||||
|
||||
import com.starry.admin.utils.SmsUtils;
|
||||
import com.starry.common.result.R;
|
||||
import io.swagger.annotations.Api;
|
||||
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.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@@ -16,6 +21,7 @@ import javax.annotation.Resource;
|
||||
* @author admin
|
||||
* @since 2024/5/20 下午11:19
|
||||
**/
|
||||
@Api(tags = "微信短信接口", description = "微信端短信发送相关接口")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/wx/sms")
|
||||
@@ -23,6 +29,11 @@ public class WxSmsController {
|
||||
@Resource
|
||||
private SmsUtils smsUtils;
|
||||
|
||||
@ApiOperation(value = "发送短信", notes = "向指定手机号发送短信验证码")
|
||||
@ApiImplicitParam(name = "phone", value = "手机号码", required = true, dataType = "String", paramType = "query")
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "操作成功")
|
||||
})
|
||||
@GetMapping("/send")
|
||||
public R sendSms(@RequestParam("phone") String phone) {
|
||||
smsUtils.sendSmsApi(phone);
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.starry.admin.modules.weichat.entity.clerk;
|
||||
|
||||
import com.starry.common.domain.BasePageEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@@ -12,56 +14,67 @@ import lombok.EqualsAndHashCode;
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "店员查询参数", description = "分页查询店员的条件参数对象")
|
||||
public class PlayClerkUserInfoQueryVo extends BasePageEntity {
|
||||
|
||||
|
||||
/**
|
||||
* 店员昵称
|
||||
**/
|
||||
@ApiModelProperty(value = "店员昵称", example = "张三", notes = "支持模糊查询")
|
||||
private String nickname;
|
||||
/**
|
||||
* 店员等级
|
||||
*/
|
||||
@ApiModelProperty(value = "店员等级ID")
|
||||
private String levelId;
|
||||
|
||||
/**
|
||||
* 店员类型
|
||||
*/
|
||||
@ApiModelProperty(value = "店员类型ID")
|
||||
private String typeId;
|
||||
|
||||
/**
|
||||
* 性别[0:未知;1:男;2:女]
|
||||
*/
|
||||
@ApiModelProperty(value = "性别", example = "1", notes = "0:未知;1:男;2:女")
|
||||
private String sex;
|
||||
|
||||
/**
|
||||
* 所在省份
|
||||
*/
|
||||
@ApiModelProperty(value = "所在省份", example = "广东省")
|
||||
private String province;
|
||||
|
||||
/**
|
||||
* 上架状态【1:上架,0:下架】
|
||||
*/
|
||||
@ApiModelProperty(value = "上架状态", example = "1", notes = "1:上架,0:下架")
|
||||
private String listingState;
|
||||
|
||||
/**
|
||||
* 是否推荐状态(1:已推荐,0:未推荐)
|
||||
*/
|
||||
@ApiModelProperty(value = "是否推荐", example = "1", notes = "1:已推荐,0:未推荐")
|
||||
private String recommendationState;
|
||||
|
||||
/**
|
||||
* 员工状态【1:是陪聊,0:不是陪聊】
|
||||
*/
|
||||
@ApiModelProperty(value = "员工状态", example = "1", notes = "1:是陪聊,0:不是陪聊", required = true)
|
||||
private String clerkState = "1";
|
||||
|
||||
/**
|
||||
* 在职状态(1:在职,0:离职)
|
||||
*/
|
||||
@ApiModelProperty(value = "在职状态", example = "1", notes = "1:在职,0:离职", required = true)
|
||||
private String onboardingState = "1";
|
||||
|
||||
/**
|
||||
* 手机号码
|
||||
*/
|
||||
@ApiModelProperty(value = "手机号码", example = "13800138000")
|
||||
private String phone;
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.starry.admin.modules.weichat.entity.clerk;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -9,127 +11,151 @@ import java.util.List;
|
||||
* @author admin
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "店员信息返回对象", description = "查询店员列表的返回结果对象")
|
||||
public class PlayClerkUserInfoResultVo {
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
@ApiModelProperty(value = "店员ID", notes = "唯一标识")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 店员昵称
|
||||
*/
|
||||
@ApiModelProperty(value = "店员昵称")
|
||||
private String nickname;
|
||||
|
||||
/**
|
||||
* 店员等级
|
||||
*/
|
||||
@ApiModelProperty(value = "店员等级ID")
|
||||
private String levelId;
|
||||
|
||||
/**
|
||||
* 店员等级
|
||||
*/
|
||||
@ApiModelProperty(value = "店员等级名称")
|
||||
private String levelName;
|
||||
|
||||
|
||||
/**
|
||||
* 性别[0:未知;1:男;2:女]
|
||||
*/
|
||||
@ApiModelProperty(value = "性别", notes = "0:未知;1:男;2:女")
|
||||
private String sex;
|
||||
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
@ApiModelProperty(value = "头像", notes = "头像图片URL")
|
||||
private String avatar;
|
||||
|
||||
/**
|
||||
* 音频
|
||||
*/
|
||||
@ApiModelProperty(value = "音频", notes = "音频文件URL")
|
||||
private String audio;
|
||||
|
||||
|
||||
/**
|
||||
* 星座
|
||||
*/
|
||||
@ApiModelProperty(value = "星座", example = "天蝎座")
|
||||
private String constellation;
|
||||
|
||||
/**
|
||||
* 标签
|
||||
*/
|
||||
@ApiModelProperty(value = "标签列表", notes = "店员个人标签")
|
||||
private List<String> label = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* 相册
|
||||
*/
|
||||
@ApiModelProperty(value = "相册列表", notes = "店员相册图片URL列表")
|
||||
private List<String> album = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* 个性签名
|
||||
*/
|
||||
@ApiModelProperty(value = "个性签名")
|
||||
private String signature;
|
||||
|
||||
/**
|
||||
* 年龄
|
||||
*/
|
||||
@ApiModelProperty(value = "年龄", example = "25")
|
||||
private Integer age;
|
||||
|
||||
/**
|
||||
* 所在省份
|
||||
*/
|
||||
@ApiModelProperty(value = "所在省份", example = "广东省")
|
||||
private String province;
|
||||
|
||||
/**
|
||||
* 所在城市
|
||||
*/
|
||||
@ApiModelProperty(value = "所在城市", example = "深圳市")
|
||||
private String city;
|
||||
|
||||
|
||||
/**
|
||||
* 关注(0:未关注,1:已关注)
|
||||
*/
|
||||
@ApiModelProperty(value = "关注状态", notes = "0:未关注,1:已关注", example = "0")
|
||||
private String followState = "0";
|
||||
|
||||
/**
|
||||
* 在线状态【1:在线,0:离线】
|
||||
*/
|
||||
@ApiModelProperty(value = "在线状态", notes = "1:在线,0:离线")
|
||||
private String onlineState;
|
||||
|
||||
/**
|
||||
* 上架状态【1:上架,0:下架】
|
||||
*/
|
||||
@ApiModelProperty(value = "上架状态", notes = "1:上架,0:下架")
|
||||
private String listingState;
|
||||
|
||||
|
||||
/**
|
||||
* 实名状态【1:已实名,0:未实名】
|
||||
*/
|
||||
@ApiModelProperty(value = "实名状态", notes = "1:已实名,0:未实名")
|
||||
private String realState;
|
||||
|
||||
/**
|
||||
* 是否必须实名【1:必须实名,0:非必须实名,2:跟随店铺设置】
|
||||
*/
|
||||
@ApiModelProperty(value = "是否必须实名", notes = "1:必须实名,0:非必须实名,2:跟随店铺设置")
|
||||
private String mandatoryRealState;
|
||||
|
||||
/**
|
||||
* 随机接单状态【1:允许,0:禁止】
|
||||
*/
|
||||
@ApiModelProperty(value = "随机接单状态", notes = "1:允许,0:禁止")
|
||||
private String randomOrderState;
|
||||
|
||||
|
||||
/**
|
||||
* 服务项目
|
||||
*/
|
||||
@ApiModelProperty(value = "服务项目列表", notes = "店员提供的服务项目")
|
||||
private List<String> commodity;
|
||||
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
@ApiModelProperty(value = "地址", notes = "店员所在详细地址")
|
||||
private String address;
|
||||
|
||||
|
||||
/**
|
||||
* 最低消费
|
||||
*/
|
||||
@ApiModelProperty(value = "最低消费", notes = "店员服务的最低消费", example = "最低1船票")
|
||||
private String latestConsumption = "最低1船票";
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user