|
|
|
@ -3,6 +3,7 @@ package au.com.royalpay.payment.manage.customers.web;
|
|
|
|
|
import au.com.royalpay.payment.manage.customers.core.EncourageService;
|
|
|
|
|
import au.com.royalpay.payment.tools.CommonConsts;
|
|
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
@ -30,17 +31,18 @@ public class EncourageMoneyController {
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/orders/{orderId}", method = RequestMethod.GET)
|
|
|
|
|
public JSONObject takeEncourageMoney(@PathVariable String orderId, @ModelAttribute(CommonConsts.WECHATINFO) JSONObject wxUser,
|
|
|
|
|
@ModelAttribute(CommonConsts.ALIUSER) JSONObject aliuser) {
|
|
|
|
|
String user_id = "";
|
|
|
|
|
if (wxUser == null) {
|
|
|
|
|
user_id = aliuser.getString("user_id");
|
|
|
|
|
} else {
|
|
|
|
|
user_id = wxUser.getString("openid");
|
|
|
|
|
}
|
|
|
|
|
if (StringUtils.isEmpty(user_id)) {
|
|
|
|
|
return new JSONObject();
|
|
|
|
|
}
|
|
|
|
|
return encourageService.takeEncourageMoney(orderId, user_id);
|
|
|
|
|
@ModelAttribute(CommonConsts.ALIUSER) JSONObject aliuser) {
|
|
|
|
|
throw new BadRequestException("当前活动暂不支持");
|
|
|
|
|
// String user_id = "";
|
|
|
|
|
// if (wxUser == null) {
|
|
|
|
|
// user_id = aliuser.getString("user_id");
|
|
|
|
|
// } else {
|
|
|
|
|
// user_id = wxUser.getString("openid");
|
|
|
|
|
// }
|
|
|
|
|
// if (StringUtils.isEmpty(user_id)) {
|
|
|
|
|
// return new JSONObject();
|
|
|
|
|
// }
|
|
|
|
|
// return encourageService.takeEncourageMoney(orderId, user_id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/orders/{orderId}/crit", method = RequestMethod.PUT)
|
|
|
|
|