|
@@ -3,7 +3,9 @@ package com.miaxis.app.controller.customer;
|
|
|
import com.miaxis.collection.service.ICollectionInfoService;
|
|
|
import com.miaxis.common.constant.Constants;
|
|
|
import com.miaxis.common.core.controller.BaseController;
|
|
|
+import com.miaxis.common.core.domain.entity.UserInfo;
|
|
|
import com.miaxis.common.core.page.ResponsePageInfo;
|
|
|
+import com.miaxis.common.utils.SecurityUtils;
|
|
|
import com.miaxis.customer.domain.CustomerInfo;
|
|
|
import com.miaxis.customer.service.ICustomerInfoService;
|
|
|
import com.miaxis.customer.vo.ExhibitionCustomerInfoVo;
|
|
@@ -29,51 +31,22 @@ public class AppletCustomerInfoController extends BaseController {
|
|
|
|
|
|
|
|
|
/**
|
|
|
- * 查询客户信息列表
|
|
|
- */
|
|
|
- @GetMapping("/list")
|
|
|
- @ApiOperation("查询客户信息列表")
|
|
|
- @ApiImplicitParams({
|
|
|
- @ApiImplicitParam(name = "pageNum", value = "当前页码", dataType = "int", paramType = "query", required = false),
|
|
|
- @ApiImplicitParam(name = "pageSize", value = "每页数据量", dataType = "int", paramType = "query", required = false),
|
|
|
- })
|
|
|
- public ResponsePageInfo<CustomerInfo> list(@ModelAttribute CustomerInfo customerInfo) {
|
|
|
- startPage();
|
|
|
- List<CustomerInfo> list = customerInfoService.selectCustomerInfoList(customerInfo);
|
|
|
- return toResponsePageInfo(list);
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- /**
|
|
|
- * 查询所属品类商家
|
|
|
+ * 查询商家列表
|
|
|
*/
|
|
|
@GetMapping(value = "/getCustomerListByProductId/{id}")
|
|
|
- @ApiOperation("查询所属品类商家")
|
|
|
+ @ApiOperation("查询商家列表")
|
|
|
@ApiImplicitParams({
|
|
|
@ApiImplicitParam(name = "pageNum", value = "当前页码", dataType = "int", paramType = "query", required = false),
|
|
|
@ApiImplicitParam(name = "pageSize", value = "每页数据量", dataType = "int", paramType = "query", required = false),
|
|
|
})
|
|
|
public ResponsePageInfo<ExhibitionCustomerInfoVo> getCustomerListByProductId(
|
|
|
- @ApiParam(name = "id", value = "品类id", required = true)
|
|
|
+ @ApiParam(name = "id", value = "品类id (0:精选列表)", required = true)
|
|
|
@PathVariable("id") Long id
|
|
|
) {
|
|
|
startPage();
|
|
|
- List<ExhibitionCustomerInfoVo> list = customerInfoService.getCustomerListByProductId(id);
|
|
|
- return toResponsePageInfo(list);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 查询精选商家列表 根据收藏数排行
|
|
|
- */
|
|
|
- @GetMapping(value = "/getCustomerListByCollectionCount")
|
|
|
- @ApiOperation("查询精选商家列表")
|
|
|
- @ApiImplicitParams({
|
|
|
- @ApiImplicitParam(name = "pageNum", value = "当前页码", dataType = "int", paramType = "query", required = false),
|
|
|
- @ApiImplicitParam(name = "pageSize", value = "每页数据量", dataType = "int", paramType = "query", required = false),
|
|
|
- })
|
|
|
- public ResponsePageInfo<ExhibitionCustomerInfoVo> getCustomerListByCollectionCount() {
|
|
|
- startPage();
|
|
|
- List<ExhibitionCustomerInfoVo> list = customerInfoService.getCustomerListByCollectionCount();
|
|
|
+ //获取当前用户
|
|
|
+ UserInfo userInfo = SecurityUtils.getLoginUser().getStudent();
|
|
|
+ List<ExhibitionCustomerInfoVo> list = customerInfoService.getCustomerListByProductId(id,userInfo.getId());
|
|
|
return toResponsePageInfo(list);
|
|
|
}
|
|
|
|