|
|
|
@@ -8,6 +8,7 @@ import com.iformall.enums.*; |
|
|
|
import com.iformall.exception.MallinkException; |
|
|
|
import com.iformall.service.*; |
|
|
|
import com.iformall.service.order.OrderFactory; |
|
|
|
import com.iformall.service.order.entity.WxComposeOrder; |
|
|
|
import com.iformall.utils.Constant; |
|
|
|
import io.swagger.annotations.Api; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
@@ -38,6 +39,9 @@ public class WxCouponPasswordController extends BaseController { |
|
|
|
@Autowired |
|
|
|
private WxCUserBasicInfoService userService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
OrderFactory orderFactory; |
|
|
|
|
|
|
|
@ApiOperation(value = "根据卡密领卡", notes = "{\"password\":\"String\",\"formId\":\"String\"}") |
|
|
|
@PostMapping("getCouponOrderByPassword") |
|
|
|
public ResultData getCouponOrderByPassword(@RequestBody Map<String, String> params) { |
|
|
|
@@ -97,7 +101,8 @@ public class WxCouponPasswordController extends BaseController { |
|
|
|
|
|
|
|
// 3. 领取free coupon |
|
|
|
try { |
|
|
|
WxOrder order = orderService.saveFreeOrderForCoupon(false,null,member, coupon, 1, |
|
|
|
WxComposeOrder composeOrder = orderFactory.getOrderAdapterService(EnumComposeOrder.SINGLE.getCode()).createDBMainOrder(coupon, member, 0, payWay); |
|
|
|
WxOrder order = orderService.saveFreeOrderForCoupon(false,composeOrder,member, coupon, 1, |
|
|
|
null, formId, couponPassword.getId(),payWay, |
|
|
|
EnumOrderShopingType.ONLINE_PURCHASE.getCode(),null); |
|
|
|
} catch (MallinkException e) { |
|
|
|
|