提交实物

dev-discount
袁野 2 years ago
parent d12bef55c3
commit d908289faf
  1. 1
      hai-bweb/src/main/java/com/bweb/controller/HighCouponController.java
  2. 14
      hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java
  3. 1
      hai-service/src/main/java/com/hai/dao/HighOrderMapperExt.java
  4. 6
      hai-service/src/main/java/com/hai/entity/HighCoupon.java
  5. 12
      hai-service/src/main/java/com/hai/entity/HighOrder.java

@ -272,6 +272,7 @@ public class HighCouponController {
coupon.setDiscountPrice(highCoupon.getDiscountPrice()); coupon.setDiscountPrice(highCoupon.getDiscountPrice());
coupon.setIsPresent(highCoupon.getIsPresent()); coupon.setIsPresent(highCoupon.getIsPresent());
coupon.setBuyPoints(highCoupon.getBuyPoints()); coupon.setBuyPoints(highCoupon.getBuyPoints());
coupon.setWherePost(highCoupon.getWherePost());
coupon.setOperatorId(userInfoModel.getSecUser().getId()); coupon.setOperatorId(userInfoModel.getSecUser().getId());
coupon.setGoodsTypeId(highCoupon.getGoodsTypeId()); coupon.setGoodsTypeId(highCoupon.getGoodsTypeId());
coupon.setBrandId(highCoupon.getBrandId()); coupon.setBrandId(highCoupon.getBrandId());

@ -145,7 +145,6 @@ public class HighOrderController {
// 定义当前卡券是否可以直冲积分 // 定义当前卡券是否可以直冲积分
boolean buyPoints = false; boolean buyPoints = false;
BigDecimal totalPrice = new BigDecimal("0"); BigDecimal totalPrice = new BigDecimal("0");
BigDecimal totalActualPrice = new BigDecimal("0"); BigDecimal totalActualPrice = new BigDecimal("0");
for (HighChildOrder childOrder : highOrder.getHighChildOrderList()) { for (HighChildOrder childOrder : highOrder.getHighChildOrderList()) {
@ -162,6 +161,19 @@ public class HighOrderController {
} }
// 查询卡卷信息 // 查询卡卷信息
HighCoupon coupon = highCouponService.getCouponById(childOrder.getGoodsId()); HighCoupon coupon = highCouponService.getCouponById(childOrder.getGoodsId());
// 判断是否实物商品
if (coupon.getWherePost() != null && coupon.getWherePost()) {
if (highOrder.getPostData().getString("address").length() == 0 || highOrder.getPostData().getString("user").length() == 0 || highOrder.getPostData().getString("phone").length() == 0 ) {
log.error("HighOrderController --> addOrder() error!", "请输入收货相关信息");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "请输入收货相关信息");
}
// 先把String对象转换成Json对象
highOrder.setRemarks(highOrder.getPostData().toString());
}
if (coupon == null) { if (coupon == null) {
log.error("HighOrderController --> addOrder() error!", "未找到卡卷信息"); log.error("HighOrderController --> addOrder() error!", "未找到卡卷信息");
throw ErrorHelp.genException(SysCode.System, ErrorCode.NOT_FOUND_COUPON, ""); throw ErrorHelp.genException(SysCode.System, ErrorCode.NOT_FOUND_COUPON, "");

@ -142,6 +142,7 @@ public interface HighOrderMapperExt {
" (select mer.merchant_name from high_merchant mer where EXISTS (select 1 from high_coupon cou where cou.id = a.goods_id and mer.id = cou.merchant_id)) merchantName," + " (select mer.merchant_name from high_merchant mer where EXISTS (select 1 from high_coupon cou where cou.id = a.goods_id and mer.id = cou.merchant_id)) merchantName," +
" case a.goods_type when 1 then '卡券' when 2 then '金币充值' when 3 then '加油缴费' end goodsType, " + " case a.goods_type when 1 then '卡券' when 2 then '金币充值' when 3 then '加油缴费' end goodsType, " +
" a.goods_name goodsName, " + " a.goods_name goodsName, " +
" b.id orderId, " +
" a.goods_type goodsTypeId," + " a.goods_type goodsTypeId," +
" case a.giveaway_type when 1 then '赠送' when 0 then '购买' end giveawayType," + " case a.giveaway_type when 1 then '赠送' when 0 then '购买' end giveawayType," +
" b.order_no orderNo," + " b.order_no orderNo," +

@ -1,5 +1,7 @@
package com.hai.entity; package com.hai.entity;
import com.hai.model.HighCouponModel;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
@ -13,7 +15,7 @@ import java.util.Date;
* 代码由工具生成 * 代码由工具生成
* *
**/ **/
public class HighCoupon implements Serializable { public class HighCoupon extends HighCouponModel implements Serializable {
/** /**
* 主键 * 主键
*/ */
@ -582,4 +584,4 @@ public class HighCoupon implements Serializable {
sb.append("]"); sb.append("]");
return sb.toString(); return sb.toString();
} }
} }

@ -1,5 +1,7 @@
package com.hai.entity; package com.hai.entity;
import com.alibaba.fastjson.JSONObject;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
@ -252,6 +254,16 @@ public class HighOrder implements Serializable {
private String agentName; private String agentName;
private JSONObject postData;
public JSONObject getPostData() {
return postData;
}
public void setPostData(JSONObject postData) {
this.postData = postData;
}
public String getAgentName() { public String getAgentName() {
return agentName; return agentName;
} }

Loading…
Cancel
Save