update 集团列表

This commit is contained in:
2024-01-20 14:09:09 +08:00
parent 0e778e77c2
commit 8ed2ab56f2
6 changed files with 42 additions and 21 deletions

View File

@@ -1,5 +1,6 @@
package com.jsowell.pile.controller;
import com.alibaba.fastjson2.JSON;
import com.jsowell.common.annotation.Log;
import com.jsowell.common.core.controller.BaseController;
import com.jsowell.common.core.domain.AjaxResult;
@@ -9,6 +10,9 @@ import com.jsowell.common.util.poi.ExcelUtil;
import com.jsowell.pile.domain.MemberGroup;
import com.jsowell.pile.dto.MemberGroupDTO;
import com.jsowell.pile.service.MemberGroupService;
import com.jsowell.pile.util.UserUtils;
import com.jsowell.pile.vo.base.LoginUserDetailVO;
import com.jsowell.pile.vo.base.MerchantInfoVO;
import com.jsowell.pile.vo.web.MemberGroupVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
@@ -16,6 +20,7 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.stream.Collectors;
/**
* 会员组Controller
@@ -34,7 +39,12 @@ public class MemberGroupController extends BaseController {
*/
@PreAuthorize("@ss.hasPermi('member:memberGroup:list')")
@GetMapping("/list")
public TableDataInfo list(MemberGroup memberGroup) {
public TableDataInfo list(MemberGroupDTO memberGroup) {
LoginUserDetailVO loginUserDetail = UserUtils.getLoginUserDetail();
logger.info("获取登录用户信息:{}", JSON.toJSONString(loginUserDetail));
List<MerchantInfoVO> merchantInfoVOList = loginUserDetail.getMerchantInfoVOList();
List<String> collect = merchantInfoVOList.stream().map(MerchantInfoVO::getMerchantId).collect(Collectors.toList());
memberGroup.setMerchantIdList(collect);
startPage();
List<MemberGroupVO> list = memberGroupService.selectMemberGroupList(memberGroup);
return getDataTable(list);
@@ -46,7 +56,7 @@ public class MemberGroupController extends BaseController {
@PreAuthorize("@ss.hasPermi('member:memberGroup:export')")
@Log(title = "会员组", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, MemberGroup memberGroup) {
public void export(HttpServletResponse response, MemberGroupDTO memberGroup) {
List<MemberGroupVO> list = memberGroupService.selectMemberGroupList(memberGroup);
ExcelUtil<MemberGroup> util = new ExcelUtil<MemberGroup>(MemberGroup.class);
// util.exportExcel(response, list, "会员组数据");