|
|
|
@@ -72,10 +72,8 @@ public class WxCouponController extends BaseController { |
|
|
|
logger.debug("[" + getIpAddr() + "] WxCouponController::list"); |
|
|
|
if (wxCoupon == null) wxCoupon = new WxCoupon(); |
|
|
|
wxCoupon.updateTenantInfo(getTenantInfo()); |
|
|
|
if(null == wxCoupon.getSourceType()){ |
|
|
|
wxCoupon.setSourceType(EnumCouponSourceType.COUPONSource_Bapi.getCode()); |
|
|
|
} |
|
|
|
wxCoupon.setMerchantId(getLoginBUser().getMerchantId()); |
|
|
|
wxCoupon.setSourceType(EnumCouponSourceType.COUPONSource_Bapi.getCode()); |
|
|
|
|
|
|
|
if(StringUtils.isNotBlank(wxCoupon.getSortColumn())){ |
|
|
|
String coryColumn = "c."+wxCoupon.getSortColumns(); |
|
|
|
@@ -178,7 +176,7 @@ public class WxCouponController extends BaseController { |
|
|
|
} |
|
|
|
WxCoupon coupon = wxCouponService.getById(wxCoupon.getId(),getTenantInfo().getTenantId()); |
|
|
|
|
|
|
|
if(coupon.getSourceType().intValue() != EnumCouponSourceType.COUPONSource_Bapi.getCode().intValue()){ |
|
|
|
if(!EnumCouponSourceType.COUPONSource_Bapi.getCode().equals(coupon.getSourceType())){ |
|
|
|
return new ResultData(Result.ERROR,"非B端券,不能进行此操作"); |
|
|
|
} |
|
|
|
|
|
|
|
@@ -423,6 +421,7 @@ public class WxCouponController extends BaseController { |
|
|
|
wxCoupon.setEnddate(DateUtils.stringToDate(DateUtils.getSystemTime("yyyy-MM-dd") + " 23:59:59")); |
|
|
|
} |
|
|
|
wxCoupon.setSourceType(EnumCouponSourceType.COUPONSource_Bapi.getCode()); |
|
|
|
|
|
|
|
PageInfo<WxCouponStatisVo> pageInfo = wxCouponService.findCountData(wxCoupon, tenantEntitys, pageNum, pageSize); |
|
|
|
for (WxCouponStatisVo coupon : pageInfo.getList()) { |
|
|
|
if (coupon.getSaleAmount() == null) { |
|
|
|
@@ -481,6 +480,7 @@ public class WxCouponController extends BaseController { |
|
|
|
|
|
|
|
wxCoupon.updateTenantInfo(tenantEntity); |
|
|
|
wxCoupon.setSourceType(EnumCouponSourceType.COUPONSource_Bapi.getCode()); |
|
|
|
|
|
|
|
PageInfo<WxCouponStatisVo> pages = wxCouponService.findPressData(wxCoupon,tenantEntitys,pageNum,pageSize); |
|
|
|
return new ResultData(pages); |
|
|
|
} |
|
|
|
|