|
@@ -28,6 +28,7 @@ import com.chelvc.framework.common.model.Paging;
|
|
|
import com.chelvc.framework.common.util.AssertUtils;
|
|
|
import com.chelvc.framework.common.util.DateUtils;
|
|
|
import com.chelvc.framework.common.util.ObjectUtils;
|
|
|
+import com.chelvc.framework.common.util.StringUtils;
|
|
|
import com.chelvc.framework.database.context.DatabaseContextHolder;
|
|
|
import lombok.NonNull;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
@@ -65,7 +66,15 @@ public class UserCouponServiceImpl extends ServiceImpl<UserCouponMapper, UserCou
|
|
|
|
|
|
@Override
|
|
|
public List<UserCouponDTO> listUserCanUseCoupons(@NonNull UserCouponQueryParam param) {
|
|
|
- List<String> merchantIds = new ArrayList<>(Arrays.asList(param.getMerchantId().split(",")));
|
|
|
+ String merchantId = param.getMerchantId();
|
|
|
+ List<String> merchantIds = new ArrayList<>();
|
|
|
+ if(!StringUtils.isBlank(merchantId)){
|
|
|
+ if(merchantId.contains(",")){
|
|
|
+ merchantIds.addAll(Arrays.asList(merchantId.split(",")));
|
|
|
+ } else {
|
|
|
+ merchantIds.add(merchantId);
|
|
|
+ }
|
|
|
+ }
|
|
|
merchantIds.add(PromotionUtils.PLATFORM_ID);
|
|
|
param.setMerchantIds(merchantIds);
|
|
|
Long userId = SessionContextHolder.getId();
|