|
|
|
@@ -11,6 +11,7 @@ import java.util.stream.Collectors; |
|
|
|
|
|
|
|
import com.iformall.domain.po.WxMerchant; |
|
|
|
import com.iformall.domain.po.WxMiniappThemeValue; |
|
|
|
import com.iformall.domain.po.base.TenantEntity; |
|
|
|
import com.iformall.enums.EnumCouponType; |
|
|
|
import com.iformall.enums.EnumMerchantStatus; |
|
|
|
import com.iformall.utils.*; |
|
|
|
@@ -393,7 +394,8 @@ public class WxCouponController extends BaseController { |
|
|
|
//WxCouponCVo wxCouponCVo = wxCouponChannelService.findDetailVo(couponChannelIdL); |
|
|
|
WxCouponCVo wxCouponCVo = null; |
|
|
|
try { |
|
|
|
wxCouponCVo = generateWxCouponCVoex(couponChannelIdL,couponIdL,getTenantInfo().getTenantId()); |
|
|
|
TenantEntity tenantEntity = getTenantInfo(); |
|
|
|
wxCouponCVo = generateWxCouponCVoex(couponChannelIdL,couponIdL,tenantEntity.getTenantId(),tenantEntity); |
|
|
|
} catch (IllegalAccessException e) { |
|
|
|
logger.error("coupon detail fail,copyproperties error" + couponChannelId,e); |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "coupon detail fail,copyproperties error" + couponChannelId); |
|
|
|
@@ -529,13 +531,13 @@ public class WxCouponController extends BaseController { |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private WxCouponCVo generateWxCouponCVoex(Long couponChannelIdL,Long couponIdL,String tenantId) throws IllegalAccessException, InvocationTargetException { |
|
|
|
private WxCouponCVo generateWxCouponCVoex(Long couponChannelIdL,Long couponIdL,String couponTenantId,TenantEntity mallTenantEntity) throws IllegalAccessException, InvocationTargetException { |
|
|
|
if(couponChannelIdL > 0l){ |
|
|
|
WxCouponChannel cc = wxCouponChannelService.getById(couponChannelIdL,tenantId); |
|
|
|
WxCouponChannel cc = wxCouponChannelService.getById(couponChannelIdL,couponTenantId); |
|
|
|
if(cc == null){ |
|
|
|
return null; |
|
|
|
} |
|
|
|
WxCouponCVo wxcv = couponService.getVoById(cc.getCouponId(),tenantId); |
|
|
|
WxCouponCVo wxcv = couponService.getVoById(cc.getCouponId(),couponTenantId,mallTenantEntity); |
|
|
|
if(wxcv == null){ |
|
|
|
return null; |
|
|
|
} |
|
|
|
@@ -554,7 +556,7 @@ public class WxCouponController extends BaseController { |
|
|
|
wxcv.setTtSpuId(cc.getTtSpuId()); |
|
|
|
return wxcv; |
|
|
|
}else if(couponIdL > 0l){ |
|
|
|
WxCouponCVo wxcv = couponService.getVoById(couponIdL,tenantId); |
|
|
|
WxCouponCVo wxcv = couponService.getVoById(couponIdL,couponTenantId,mallTenantEntity); |
|
|
|
return wxcv; |
|
|
|
} |
|
|
|
return null; |
|
|
|
|