Merge remote-tracking branch 'origin/test' into test

This commit is contained in:
2026-01-28 14:40:06 +08:00
12 changed files with 505 additions and 9 deletions

View File

@@ -4,12 +4,14 @@ import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import com.czg.account.dto.shopuser.*;
import com.czg.account.entity.ShopInfo;
import com.czg.account.entity.ShopUser;
import com.czg.account.entity.UserInfo;
import com.czg.account.service.AShopUserService;
import com.czg.account.service.ShopInfoService;
import com.czg.account.service.ShopUserService;
import com.czg.account.service.UserInfoService;
import com.czg.excel.ExcelExportUtil;
import com.czg.exception.CzgException;
import com.czg.market.entity.MemberLevelConfig;
import com.czg.market.entity.MkShopCouponRecord;
@@ -28,6 +30,7 @@ import com.github.pagehelper.PageInfo;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.query.QueryWrapper;
import jakarta.annotation.Resource;
import jakarta.servlet.http.HttpServletResponse;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;
@@ -124,6 +127,18 @@ public class AShopUserServiceImpl implements AShopUserService {
}
}
@Override
public void exportUserList(String key, Integer isVip, HttpServletResponse response) {
Long mainIdByShopId = shopInfoService.getMainIdByShopId(StpKit.USER.getShopId());
ShopInfo shopInfo = shopInfoService.getById(StpKit.USER.getShopId());
PageHelper.startPage(PageUtil.buildPageHelp());
List<ShopUserDTO> dtoList = shopUserMapper.selectPageByKeyAndIsVip(mainIdByShopId, isVip, key, null);
// 将 dtoList 转换为 ShopUserExportDTO 列表
List<ShopUserExportDTO> exportList = BeanUtil.copyToList(dtoList, ShopUserExportDTO.class);
ExcelExportUtil.exportToResponse(exportList, ShopUserExportDTO.class, shopInfo == null ? "店铺用户列表" : shopInfo.getShopName() + "_用户列表", response);
}
@Override
public Boolean updateInfo(Long shopId, ShopUserEditDTO shopUserEditDTO) {