| @@ -106,9 +106,12 @@ public class WxCouponController extends BaseController { | |||||
| private ResultData couponList(WxCoupon wxCoupon, Integer pageNum, Integer pageSize,Boolean isList) { | private ResultData couponList(WxCoupon wxCoupon, Integer pageNum, Integer pageSize,Boolean isList) { | ||||
| //默认A端建券 | //默认A端建券 | ||||
| if(null == wxCoupon.getSourceType()){ | |||||
| if(wxCoupon.getSourceType() == null){ | |||||
| wxCoupon.setSourceType(EnumCouponSourceType.COUPONSource_Admin.getCode()); | wxCoupon.setSourceType(EnumCouponSourceType.COUPONSource_Admin.getCode()); | ||||
| }else if(wxCoupon.getSourceType() == -1){ | |||||
| wxCoupon.setSourceType(null); | |||||
| } | } | ||||
| //排序处理 | //排序处理 | ||||
| if(StringUtils.isNotBlank(wxCoupon.getSortColumn())){ | if(StringUtils.isNotBlank(wxCoupon.getSortColumn())){ | ||||
| String coryColumn = "c."+wxCoupon.getSortColumns(); | String coryColumn = "c."+wxCoupon.getSortColumns(); | ||||
| @@ -201,10 +201,8 @@ public class WxCouponController extends BaseController { | |||||
| logger.debug("[" + getIpAddr() + "] WxCouponController::add"); | logger.debug("[" + getIpAddr() + "] WxCouponController::add"); | ||||
| TenantEntity tenantEntity = getTenantInfo(); | TenantEntity tenantEntity = getTenantInfo(); | ||||
| wxCoupon.updateTenantInfo(tenantEntity); | wxCoupon.updateTenantInfo(tenantEntity); | ||||
| wxCoupon.setSourceType(EnumCouponSourceType.COUPONSource_Bapi.getCode()); | |||||
| if(null == wxCoupon.getSourceType()){ | |||||
| wxCoupon.setSourceType(EnumCouponSourceType.COUPONSource_Bapi.getCode()); | |||||
| } | |||||
| List<WxMerchant> merchantList = new ArrayList<>(); | List<WxMerchant> merchantList = new ArrayList<>(); | ||||
| WxMerchant wxMerchant = wxMerchantService.getById(getLoginBUser().getMerchantId()); | WxMerchant wxMerchant = wxMerchantService.getById(getLoginBUser().getMerchantId()); | ||||
| merchantList.add(wxMerchant); | merchantList.add(wxMerchant); | ||||
| @@ -5,9 +5,9 @@ package com.iformall.enums; | |||||
| */ | */ | ||||
| public enum EnumCouponSourceType { | public enum EnumCouponSourceType { | ||||
| // 1:A端发卷,2:B端发卷 | |||||
| COUPONSource_Admin(1, "A端发卷"), | |||||
| COUPONSource_Bapi(2, "B端发卷") | |||||
| // 1:A端建券,2:B端建券 | |||||
| COUPONSource_Admin(1, "A端建券"), | |||||
| COUPONSource_Bapi(2, "B端建券") | |||||
| ; | ; | ||||
| public static EnumCouponSourceType getEnum(Integer code) { | public static EnumCouponSourceType getEnum(Integer code) { | ||||