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