领取优惠券操作
This commit is contained in:
@@ -79,8 +79,16 @@ public class OrderController {
|
||||
private Result getYhqPara(){
|
||||
return orderService.getYhqPara();
|
||||
}
|
||||
@GetMapping("/testPay")
|
||||
private Result testPay(@RequestParam Integer orderId){
|
||||
return orderService.testPay(orderId);
|
||||
@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("/testPay")
|
||||
// private Result testPay(@RequestParam Integer orderId){
|
||||
// return orderService.testPay(orderId);
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -7,8 +7,10 @@ import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.chaozhanggui.system.cashierservice.dao.TbMerchantAccountMapper;
|
||||
import com.chaozhanggui.system.cashierservice.dao.TbShopUserMapper;
|
||||
import com.chaozhanggui.system.cashierservice.dao.TbUserInfoMapper;
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbMerchantAccount;
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbShopUser;
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbUserInfo;
|
||||
import com.chaozhanggui.system.cashierservice.entity.dto.AuthUserDto;
|
||||
import com.chaozhanggui.system.cashierservice.entity.dto.OnlineUserDto;
|
||||
import com.chaozhanggui.system.cashierservice.entity.vo.IntegralFlowVo;
|
||||
@@ -49,11 +51,12 @@ public class UserContoller {
|
||||
|
||||
@Autowired
|
||||
private TbShopUserMapper shopUserMapper;
|
||||
|
||||
@Autowired
|
||||
private TbUserInfoMapper userInfoMapper;
|
||||
|
||||
@GetMapping("/userInfo")
|
||||
public JSONObject userInfo(@RequestParam("openId") String openId ) throws Exception {
|
||||
TbShopUser shopUser = shopUserMapper.selectByOpenId(openId);
|
||||
TbUserInfo shopUser = userInfoMapper.selectByOpenId(openId);
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
if (Objects.isNull(shopUser)){
|
||||
jsonObject.put("status","fail");
|
||||
@@ -65,7 +68,7 @@ public class UserContoller {
|
||||
JSONObject object = new JSONObject();
|
||||
object.put("token",token);
|
||||
object.put("userSign",userSign);
|
||||
object.put("num",shopUser.getLevelConsume());
|
||||
object.put("num",shopUser.getTotalScore());
|
||||
jsonObject.put("status","success");
|
||||
jsonObject.put("msg","成功");
|
||||
jsonObject.put("data",object);
|
||||
@@ -77,10 +80,22 @@ public class UserContoller {
|
||||
String userSign = jsonObject.getString("userSign");
|
||||
return userService.modityIntegral(integralVo,userSign);
|
||||
}
|
||||
@GetMapping("/userIntegral")
|
||||
@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