获取营销推送任务用户列表失败 问题

This commit is contained in:
2025-10-16 09:17:00 +08:00
parent eb49945e0f
commit c3bc743f71

View File

@@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.RandomUtil; import cn.hutool.core.util.RandomUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import cn.hutool.log.Log;
import com.czg.account.dto.shopuser.*; import com.czg.account.dto.shopuser.*;
import com.czg.account.entity.ShopUser; import com.czg.account.entity.ShopUser;
import com.czg.account.entity.UserInfo; import com.czg.account.entity.UserInfo;
@@ -29,6 +30,7 @@ import com.github.pagehelper.PageInfo;
import com.mybatisflex.core.paginate.Page; import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.query.QueryWrapper; import com.mybatisflex.core.query.QueryWrapper;
import jakarta.annotation.Resource; import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboReference; import org.apache.dubbo.config.annotation.DubboReference;
import org.apache.dubbo.config.annotation.DubboService; import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@@ -46,6 +48,7 @@ import java.util.stream.Collectors;
* @author Administrator * @author Administrator
* @since 2025-02-08 * @since 2025-02-08
*/ */
@Slf4j
@DubboService @DubboService
public class AShopUserServiceImpl implements AShopUserService { public class AShopUserServiceImpl implements AShopUserService {
@Resource @Resource
@@ -95,14 +98,19 @@ public class AShopUserServiceImpl implements AShopUserService {
@Override @Override
public Page<ShopUser> getPushEventUser(SmsPushEventUser smsPushEventUser) { public Page<ShopUser> getPushEventUser(SmsPushEventUser smsPushEventUser) {
PageHelper.startPage(new Page<>(smsPushEventUser.getPage(), smsPushEventUser.getSize())); try {
Long mainShopId = shopInfoService.getMainIdByShopId(smsPushEventUser.getShopId()); PageHelper.startPage(smsPushEventUser.getPage(), smsPushEventUser.getSize());
// 调用Mapper层查询 Long mainShopId = shopInfoService.getMainIdByShopId(smsPushEventUser.getShopId());
return shopUserMapper.selectPushEventUser( // 调用Mapper层查询
mainShopId, return shopUserMapper.selectPushEventUser(
smsPushEventUser.getShopId(), mainShopId,
smsPushEventUser smsPushEventUser.getShopId(),
); smsPushEventUser
);
}catch (Exception e){
log.info("获取营销推送任务用户列表失败{},{}", smsPushEventUser, e.getMessage());
return new Page<>();
}
} }
@Override @Override