多余内容删除
This commit is contained in:
@@ -11,8 +11,6 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.text.ParseException;
|
||||
import java.util.Map;
|
||||
|
||||
@CrossOrigin(origins = "*")
|
||||
@@ -42,19 +40,6 @@ public class OrderController {
|
||||
// return orderService.createOrder(shopTable.getTableId(),shopTable.getShopId(),shopTable.getUserId());
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单回显
|
||||
* @param orderId
|
||||
* @return
|
||||
*/
|
||||
// @GetMapping ("/orderInfo")
|
||||
private Result orderInfo(@RequestParam(required = false) Integer orderId){
|
||||
if (orderId==null) {
|
||||
return Result.fail("请返回首页订单列表查看");
|
||||
}
|
||||
return orderService.orderInfo(orderId);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 订单详情
|
||||
@@ -81,56 +66,4 @@ public class OrderController {
|
||||
}
|
||||
return orderService.rmOrder(Integer.valueOf(map.get("orderId").toString()));
|
||||
}
|
||||
|
||||
@GetMapping("/tradeIntegral")
|
||||
private Result tradeIntegral(@RequestParam("userId") String userId, @RequestParam("id") String id) throws IOException, ParseException {
|
||||
return orderService.tradeIntegral(userId,id);
|
||||
}
|
||||
// @GetMapping("/我的积分")
|
||||
// private Result mineYhq(@RequestParam("userId") String userId) throws IOException {
|
||||
// return orderService.mineYhq(userId);
|
||||
// }
|
||||
@GetMapping("/mineCoupons")
|
||||
private Result mineCoupons(@RequestHeader String token,
|
||||
@RequestParam("userId") String userId,
|
||||
@RequestParam("status") String status,
|
||||
@RequestParam(value = "page", required = false, defaultValue = "1") Integer page,
|
||||
@RequestParam(value = "size", required = false, defaultValue = "1") Integer size,
|
||||
@RequestParam("orderId") String orderId
|
||||
) throws IOException {
|
||||
return orderService.mineCoupons(userId,orderId,status,page,size);
|
||||
}
|
||||
@GetMapping("/findCoupons")
|
||||
private Result findCoupons(@RequestHeader String token,String type,
|
||||
@RequestParam(value = "page", required = false, defaultValue = "1") Integer page,
|
||||
@RequestParam(value = "size", required = false, defaultValue = "1") Integer size) throws IOException {
|
||||
return orderService.findCoupons(type,page,size);
|
||||
}
|
||||
|
||||
@GetMapping("/findWiningUser")
|
||||
private Result findWiningUser(){
|
||||
return orderService.findWiningUser();
|
||||
}
|
||||
@GetMapping("/mineWinner")
|
||||
private Result mineWinner(@RequestHeader String token,@RequestParam Integer userId,
|
||||
@RequestParam(value = "page", required = false, defaultValue = "1") Integer page,
|
||||
@RequestParam(value = "size", required = false, defaultValue = "1") Integer size){
|
||||
return orderService.mineWinner(userId,page,size);
|
||||
}
|
||||
@GetMapping("/getYhqPara")
|
||||
private Result getYhqPara(){
|
||||
return orderService.getYhqPara();
|
||||
}
|
||||
@GetMapping("/getYhqDouble")
|
||||
private Result getYhqDouble(@RequestParam Integer orderId){
|
||||
return orderService.getYhqDouble(orderId);
|
||||
}
|
||||
@PostMapping("/yhqDouble")
|
||||
private Result yhqDouble(@RequestParam Integer conponsId){
|
||||
return orderService.yhqDouble(conponsId);
|
||||
}
|
||||
@GetMapping("/kc")
|
||||
private Result kc(){
|
||||
return orderService.kc();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
package com.chaozhanggui.system.cashierservice.controller;
|
||||
|
||||
import com.chaozhanggui.system.cashierservice.entity.dto.UserCouponDto;
|
||||
import com.chaozhanggui.system.cashierservice.service.TbUserCouponsService;
|
||||
import com.chaozhanggui.system.cashierservice.sign.Result;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
|
||||
@RestController
|
||||
@RequestMapping("userConpons")
|
||||
public class TbUserCouponsController {
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Autowired
|
||||
private TbUserCouponsService tbUserCouponsService;
|
||||
|
||||
/**
|
||||
* 查询优惠卷
|
||||
* @param conponDto
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("find")
|
||||
public Result queryByPage(@RequestBody UserCouponDto conponDto) {
|
||||
return tbUserCouponsService.queryByPage(conponDto);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,26 +3,21 @@ package com.chaozhanggui.system.cashierservice.controller;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.RandomUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.chaozhanggui.system.cashierservice.dao.TbShopInfoMapper;
|
||||
import com.chaozhanggui.system.cashierservice.dao.TbShopUserMapper;
|
||||
import com.chaozhanggui.system.cashierservice.dao.TbUserInfoMapper;
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbShopInfo;
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbShopUser;
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbUserInfo;
|
||||
import com.chaozhanggui.system.cashierservice.entity.vo.IntegralFlowVo;
|
||||
import com.chaozhanggui.system.cashierservice.entity.vo.IntegralVo;
|
||||
import com.chaozhanggui.system.cashierservice.entity.vo.OpenMemberVo;
|
||||
import com.chaozhanggui.system.cashierservice.service.UserService;
|
||||
import com.chaozhanggui.system.cashierservice.sign.CodeEnum;
|
||||
import com.chaozhanggui.system.cashierservice.sign.Result;
|
||||
import com.chaozhanggui.system.cashierservice.util.TokenUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@CrossOrigin(origins = "*")
|
||||
@@ -42,27 +37,6 @@ public class UserContoller {
|
||||
@Autowired
|
||||
private TbUserInfoMapper userInfoMapper;
|
||||
|
||||
// @GetMapping("/userInfo")
|
||||
// public JSONObject userInfo(@RequestParam("openId") String openId ) throws Exception {
|
||||
// TbUserInfo shopUser = userInfoMapper.selectByOpenId(openId);
|
||||
// JSONObject jsonObject = new JSONObject();
|
||||
// if (Objects.isNull(shopUser)){
|
||||
// jsonObject.put("status","fail");
|
||||
// jsonObject.put("msg","用户不存在");
|
||||
// return jsonObject;
|
||||
// }
|
||||
// String userSign = UUID.randomUUID().toString().replaceAll("-","");
|
||||
// String token = TokenUtil.generateJfToken(openId,userSign);
|
||||
// JSONObject object = new JSONObject();
|
||||
// object.put("token",token);
|
||||
// object.put("userSign",userSign);
|
||||
// object.put("num",shopUser.getTotalScore());
|
||||
// jsonObject.put("status","success");
|
||||
// jsonObject.put("msg","成功");
|
||||
// jsonObject.put("data",object);
|
||||
// return jsonObject;
|
||||
// }
|
||||
|
||||
@PostMapping("/openMember")
|
||||
public Result openMember(@RequestBody OpenMemberVo memberVo){
|
||||
if(StringUtils.isBlank(memberVo.getTelephone())){
|
||||
@@ -138,41 +112,6 @@ public class UserContoller {
|
||||
return Result.success(CodeEnum.SUCCESS, shopUser);
|
||||
}
|
||||
|
||||
@GetMapping("/userCoupon")
|
||||
public Result userCoupon(@RequestParam("userId") String userId, @RequestParam("orderNum") BigDecimal orderNum) throws Exception {
|
||||
int num = userService.userCoupon(userId, orderNum);
|
||||
return Result.success(CodeEnum.SUCCESS, num);
|
||||
}
|
||||
|
||||
@PostMapping("/modityIntegral")
|
||||
public JSONObject modityIntegral(@RequestHeader String token, @RequestBody IntegralVo integralVo) throws Exception {
|
||||
JSONObject jsonObject = TokenUtil.parseParamFromToken(token);
|
||||
String userSign = jsonObject.getString("userSign");
|
||||
return userService.modityIntegral(integralVo, userSign);
|
||||
}
|
||||
|
||||
@PostMapping("/userIntegral")
|
||||
public JSONObject userIntegral(@RequestHeader String token, @RequestBody IntegralFlowVo integralFlowVo) throws Exception {
|
||||
JSONObject jsonObject = TokenUtil.parseParamFromToken(token);
|
||||
String userSign = jsonObject.getString("userSign");
|
||||
return userService.userIntegral(integralFlowVo, userSign);
|
||||
}
|
||||
|
||||
@PostMapping("/userAllIntegral")
|
||||
public JSONObject userAllIntegral(@RequestBody IntegralFlowVo integralFlowVo) throws Exception {
|
||||
// JSONObject jsonObject = TokenUtil.parseParamFromToken(token);
|
||||
// String userSign = jsonObject.getString("userSign");
|
||||
return userService.userAllIntegral(integralFlowVo, "userSign");
|
||||
}
|
||||
|
||||
@PostMapping("/userAll")
|
||||
public JSONObject userAll(@RequestBody IntegralFlowVo integralFlowVo) throws Exception {
|
||||
// JSONObject jsonObject = TokenUtil.parseParamFromToken(token);
|
||||
// String userSign = jsonObject.getString("userSign");
|
||||
return userService.userAll(integralFlowVo, "userSign");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取订阅当前用户店库存预警消息的二维码
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user