package com.fs.user; import com.fs.common.constant.HttpStatus; import com.fs.common.core.controller.BaseController; import com.fs.common.core.page.TableDataInfo; import com.fs.common.utils.ServletUtils; import com.fs.core.security.LoginUser; import com.fs.core.web.service.TokenService; import com.fs.store.param.h5.FsUserPageListParam; import com.fs.store.service.IFsUserService; import com.fs.store.vo.h5.FsUserPageListVO; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.AllArgsConstructor; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.util.List; @Api(tags = "会员管理接口") @RestController @RequestMapping("/user/fsUser") @AllArgsConstructor public class FsUserAdminController extends BaseController { @Autowired private IFsUserService fsUserService; @Autowired private TokenService tokenService; @PreAuthorize("@ss.hasPermi('user:fsUser:list')") @PostMapping("/list") @ApiOperation("会员列表(与移动端使用的相同查询)") public TableDataInfo pageList(@RequestBody FsUserPageListParam param) { LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); param.setCompanyId(loginUser.getCompany().getCompanyId()); List list = fsUserService.selectFsUserPageListNew(param); Long total = fsUserService.selectFsUserCount(param); TableDataInfo rspData = new TableDataInfo(); rspData.setCode(HttpStatus.SUCCESS); rspData.setMsg("查询成功"); rspData.setRows(list); rspData.setTotal(total); return rspData; } }