|
@@ -103,7 +103,7 @@ public class OrderHandler {
|
|
|
*/
|
|
|
@ResponseBody
|
|
|
@RequestMapping(value = "/payBefore", method = RequestMethod.POST)
|
|
|
- public ResultMsg payBefore(HttpServletRequest request) throws Exception {
|
|
|
+ public ResultMsg payBefore(HttpServletRequest request) {
|
|
|
|
|
|
ResultMsg msg = new ResultMsg();
|
|
|
msg.setResultCode(ResultInfo.ERRORCODE);
|
|
@@ -306,7 +306,7 @@ public class OrderHandler {
|
|
|
public ResultMsg requestPay(
|
|
|
TempOrderDto temp,
|
|
|
HttpServletRequest request
|
|
|
- ) throws Exception {
|
|
|
+ ) {
|
|
|
|
|
|
ResultMsg msg = new ResultMsg();
|
|
|
msg.setResultCode(ResultInfo.ERRORCODE);
|
|
@@ -366,6 +366,8 @@ public class OrderHandler {
|
|
|
int templateId = systemService.selectOneShopRuleById(114).getRuleNum().intValue();
|
|
|
UserGiftDto userGift = null;
|
|
|
int giftNum = 0;
|
|
|
+ //vip会员买年套滤芯减价,此表示为减价金额
|
|
|
+ int priceReduction = 0;
|
|
|
|
|
|
/** 提前准备订单项数据 */
|
|
|
/** 准备数据 */
|
|
@@ -391,7 +393,7 @@ public class OrderHandler {
|
|
|
}
|
|
|
//VIP用户滤芯年套减一百
|
|
|
if(cartDto.getCartColorId() == 5 && member.getUserIsVip() == 2){
|
|
|
- cartDto.setProductPrice(cartDto.getProductPrice()-10000);
|
|
|
+ priceReduction += 10000*cartDto.getCartNum();
|
|
|
}
|
|
|
|
|
|
//如果模板id等于金牌会模板id,则该用户为金牌会员下线
|
|
@@ -430,7 +432,7 @@ public class OrderHandler {
|
|
|
list.add(item);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
//如果模板id等于金牌会模板id,来源是3,则该用户为金牌会员直接下线,直接下线送三年滤芯
|
|
|
if (member.getUserDealers() != null && member.getTemplateId() != null &&
|
|
|
templateId == member.getTemplateId().intValue() && member.getUserResType().intValue() == 3) {
|
|
@@ -455,6 +457,7 @@ public class OrderHandler {
|
|
|
// 准备订单对象
|
|
|
order.setSalesOpenid(member.getUserOpenid()); // openid
|
|
|
order.setSalesAmount(total); // 订单金额
|
|
|
+ total -= priceReduction;
|
|
|
|
|
|
int mustPay=0;
|
|
|
|