|
@@ -37,6 +37,7 @@ import java.math.BigDecimal;
|
|
|
import java.text.ParseException;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
@Component
|
|
|
@Slf4j
|
|
@@ -244,6 +245,8 @@ public class CouponLogic {
|
|
|
List<UserCoupon> userCouponList = new ArrayList<>();
|
|
|
List<User> userList = userService.lambdaQuery()
|
|
|
.eq(User::getType, UserTypeEnum.SERVICE.toString())
|
|
|
+ .in(CollectionUtils.isNotEmpty(couponBean.getCouponCompanyList()),User::getCompanyId, couponBean.getCouponCompanyList().stream().map(CouponCompany::getCompanyId).collect(Collectors.toList()))
|
|
|
+ .in(CollectionUtils.isNotEmpty(couponBean.getCouponWebsitList()),User::getWebsitId, couponBean.getCouponWebsitList().stream().map(CouponWebsit::getWebsitId).collect(Collectors.toList()))
|
|
|
.list();
|
|
|
List<CouponUser> couponUserList = new ArrayList<>();
|
|
|
for (User user : userList) {
|
|
@@ -267,6 +270,8 @@ public class CouponLogic {
|
|
|
List<CouponUser> couponUserList = new ArrayList<>();
|
|
|
List<User> userList = userService.lambdaQuery()
|
|
|
.eq(User::getType, UserTypeEnum.GENERAL.toString())
|
|
|
+ .in(CollectionUtils.isNotEmpty(couponBean.getCouponCompanyList()),User::getCompanyId, couponBean.getCouponCompanyList().stream().map(CouponCompany::getCompanyId).collect(Collectors.toList()))
|
|
|
+ .in(CollectionUtils.isNotEmpty(couponBean.getCouponWebsitList()),User::getWebsitId, couponBean.getCouponWebsitList().stream().map(CouponWebsit::getWebsitId).collect(Collectors.toList()))
|
|
|
.list();
|
|
|
for (User user : userList) {
|
|
|
CouponUser couponUser = new CouponUser();
|
|
@@ -714,9 +719,9 @@ public class CouponLogic {
|
|
|
AdminUserCom adminUser = commonLogic.getAdminUser();
|
|
|
|
|
|
//1.组装查询条件
|
|
|
- FieldUtils.supplyParam(zfireParam, CouponVO.class,adminUser);
|
|
|
+ FieldUtils.supplyParam(zfireParam, CouponVO.class);
|
|
|
|
|
|
- IPage<CouponVO> couponVOIPage = couponDateMapper.couponList(page, zfireParam);
|
|
|
+ IPage<CouponVO> couponVOIPage = couponDateMapper.couponList(page, zfireParam,adminUser.getAdminCompanyIds(),(adminUser.getType().equals(2) || adminUser.getType().equals(4))?adminUser.getAdminWebsitIds():null);
|
|
|
return couponVOIPage;
|
|
|
}
|
|
|
}
|