|
@@ -154,23 +154,22 @@ public class BuyOrderController extends AbstractController {
|
|
|
UserInfoBean userInfo = this.getUserInfo();
|
|
|
UserBean user = userInfo.getUser();
|
|
|
AccountBean account = userInfo.getAccount();
|
|
|
- ControllerResult result = userCenterService.createQRCode(account, user, buyOrder, goodBase, paytype);
|
|
|
+ String orderid = buyOrderService.createOrderId(buyOrder, paytype);
|
|
|
+ buyOrderService.saveOrderId(buyOrder, orderid);
|
|
|
+ ControllerResult result = userCenterService.createQRCode(account, user, buyOrder, goodBase, paytype, orderid);
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
@RequestMapping("/payed")
|
|
|
@ResponseBody
|
|
|
public ControllerResult payed(@RequestParam("apporderid") String apporderid, @RequestParam("money") String money, @RequestParam("sign") String sign ){
|
|
|
- String[] arr = apporderid.split("-");
|
|
|
- apporderid = arr[0];
|
|
|
-
|
|
|
Map<String, String> params = new HashMap<>();
|
|
|
params.put("apporderid", apporderid);
|
|
|
params.put("money", money);
|
|
|
if (!sign.equals(userCenterService.sign(params))){
|
|
|
return new ControllerResult(ErrorConstant.SIGN_ERROR);
|
|
|
}
|
|
|
- Boolean result = buyOrderService.payed(Long.parseLong(apporderid), money);
|
|
|
+ Boolean result = buyOrderService.payed(apporderid, money);
|
|
|
if (result){
|
|
|
return new ControllerResult(result);
|
|
|
}else{
|