|
|
|
@@ -4,10 +4,12 @@ import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
import com.iformall.annotation.AuthIgnore; |
|
|
|
import com.iformall.annotation.RedisCache; |
|
|
|
import com.iformall.annotation.TenantIgnore; |
|
|
|
import com.iformall.common.ErrorCode; |
|
|
|
import com.iformall.common.Result; |
|
|
|
import com.iformall.common.ResultData; |
|
|
|
import com.iformall.domain.po.*; |
|
|
|
import com.iformall.domain.po.base.TenantEntity; |
|
|
|
import com.iformall.domain.vo.WxCouponCVo; |
|
|
|
import com.iformall.domain.vo.WxCouponOrderBVo; |
|
|
|
import com.iformall.domain.vo.WxCouponOrderCVo; |
|
|
|
@@ -282,6 +284,7 @@ public class WxCouponOrderController extends BaseController { |
|
|
|
return new ResultData(wxCouponOrderCVo); |
|
|
|
} |
|
|
|
|
|
|
|
@TenantIgnore |
|
|
|
@ApiOperation(value = "核销接口", notes = "{\"couponOrderId\":\"string\"}") |
|
|
|
@PostMapping("verify") |
|
|
|
public ResultData verify(@RequestBody Map<String, String> paramMap) { |
|
|
|
@@ -313,8 +316,19 @@ public class WxCouponOrderController extends BaseController { |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); |
|
|
|
} |
|
|
|
|
|
|
|
WxCouponOrderCVo wxCouponOrderCVo = wxCouponOrderService.detailCUserVo(couponOrderIdStr,getTenantInfo()); |
|
|
|
|
|
|
|
TenantEntity tenantEntity = getTenantInfo(); |
|
|
|
|
|
|
|
WxCouponOrderCVo wxCouponOrderCVo = null; |
|
|
|
if (tenantEntity.isChildMall()) { |
|
|
|
//查询父 |
|
|
|
TenantEntity parentTenant = new TenantEntity(); |
|
|
|
parentTenant.setTenantId(tenantEntity.getParentTenantId()); |
|
|
|
parentTenant.setParentTenantId(null); |
|
|
|
wxCouponOrderCVo = wxCouponOrderService.detailCUserVo(couponOrderIdStr,parentTenant); |
|
|
|
}else { |
|
|
|
wxCouponOrderCVo = wxCouponOrderService.detailCUserVo(couponOrderIdStr,tenantEntity); |
|
|
|
} |
|
|
|
|
|
|
|
if (wxCouponOrderCVo == null) |
|
|
|
return new ResultData(ErrorCode.COUPON_ORDER_IS_NULL); |
|
|
|
|
|
|
|
@@ -353,7 +367,12 @@ public class WxCouponOrderController extends BaseController { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
WxCouponOrder wxCouponOrder = wxCouponOrderService.getById(couponOrderId,getTenantInfo().getTenantId()); |
|
|
|
WxCouponOrder wxCouponOrder = null; |
|
|
|
if (tenantEntity.isChildMall()) { |
|
|
|
wxCouponOrder = wxCouponOrderService.getById(couponOrderId,tenantEntity.getParentTenantId()); |
|
|
|
}else { |
|
|
|
wxCouponOrder = wxCouponOrderService.getById(couponOrderId,tenantEntity.getTenantId()); |
|
|
|
} |
|
|
|
if (wxCouponOrder == null) { |
|
|
|
logger.error("券ID不存在:" + couponOrderId); |
|
|
|
return new ResultData(ErrorCode.COUPON_ORDER_IS_NULL); |
|
|
|
|