Browse Source

查询销售下的企微用户改为分页查询

Long 1 week ago
parent
commit
bfeab2d6c7

+ 7 - 2
fs-company-app/src/main/java/com/fs/app/controller/QwWorkTaskController.java

@@ -7,6 +7,7 @@ import com.fs.qw.domain.QwWorkTask;
 import com.fs.qw.service.IQwUserService;
 import com.fs.qw.service.IQwWorkTaskService;
 import com.fs.app.param.QwWorkTaskQueryParam;
+import com.fs.qw.vo.QwOptionsVO;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 import io.swagger.annotations.Api;
@@ -15,6 +16,7 @@ import lombok.AllArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
 import javax.validation.Valid;
@@ -52,9 +54,12 @@ public class QwWorkTaskController extends AppBaseController {
     @Login
     @ApiOperation("销售下的企微用户")
     @GetMapping("/getMyQwUserList")
-    public R userList() {
+    public R userList(@RequestParam(required = false, defaultValue = "1") Integer pageNum,
+                      @RequestParam(required = false, defaultValue = "10") Integer pageSize) {
         Long userId = Long.parseLong(getUserId());
-        return R.ok().put("data", qwUserService.selectQwUserListOptionsVOByCompanyUserId(userId));
+        PageHelper.startPage(pageNum, pageSize);
+        List<QwOptionsVO> list = qwUserService.selectQwUserListOptionsVOByCompanyUserId(userId);
+        return R.ok().put("data", new PageInfo<>(list));
     }
 
 }