|
@@ -1,16 +1,15 @@
|
|
package com.miaxis.app.controller.customer;
|
|
package com.miaxis.app.controller.customer;
|
|
|
|
|
|
-import com.miaxis.collection.mapper.CollectionInfoMapper;
|
|
|
|
import com.miaxis.collection.service.ICollectionInfoService;
|
|
import com.miaxis.collection.service.ICollectionInfoService;
|
|
|
|
+import com.miaxis.collection.vo.CollectionCustomerVo;
|
|
import com.miaxis.common.core.controller.BaseController;
|
|
import com.miaxis.common.core.controller.BaseController;
|
|
import com.miaxis.common.core.domain.Response;
|
|
import com.miaxis.common.core.domain.Response;
|
|
-import com.miaxis.common.core.domain.entity.SysUser;
|
|
|
|
import com.miaxis.common.core.domain.entity.UserInfo;
|
|
import com.miaxis.common.core.domain.entity.UserInfo;
|
|
import com.miaxis.common.core.page.ResponsePageInfo;
|
|
import com.miaxis.common.core.page.ResponsePageInfo;
|
|
import com.miaxis.common.utils.SecurityUtils;
|
|
import com.miaxis.common.utils.SecurityUtils;
|
|
import com.miaxis.customer.domain.CustomerInfo;
|
|
import com.miaxis.customer.domain.CustomerInfo;
|
|
import com.miaxis.customer.service.ICustomerInfoService;
|
|
import com.miaxis.customer.service.ICustomerInfoService;
|
|
-import com.miaxis.customer.vo.CustomerInfoVo;
|
|
|
|
|
|
+import com.miaxis.customer.vo.ExhibitionCustomerInfoVo;
|
|
import io.swagger.annotations.*;
|
|
import io.swagger.annotations.*;
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.RequiredArgsConstructor;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
@@ -59,12 +58,12 @@ public class AppletCustomerInfoController extends BaseController {
|
|
@ApiImplicitParam(name = "pageNum", value = "当前页码", dataType = "int", paramType = "query", required = false),
|
|
@ApiImplicitParam(name = "pageNum", value = "当前页码", dataType = "int", paramType = "query", required = false),
|
|
@ApiImplicitParam(name = "pageSize", value = "每页数据量", dataType = "int", paramType = "query", required = false),
|
|
@ApiImplicitParam(name = "pageSize", value = "每页数据量", dataType = "int", paramType = "query", required = false),
|
|
})
|
|
})
|
|
- public ResponsePageInfo<CustomerInfoVo> getCustomerListByProductId(
|
|
|
|
|
|
+ public ResponsePageInfo<ExhibitionCustomerInfoVo> getCustomerListByProductId(
|
|
@ApiParam(name = "id", value = "品类id", required = true)
|
|
@ApiParam(name = "id", value = "品类id", required = true)
|
|
@PathVariable("id") Long id
|
|
@PathVariable("id") Long id
|
|
) {
|
|
) {
|
|
startPage();
|
|
startPage();
|
|
- List<CustomerInfoVo> list = customerInfoService.getCustomerListByProductId(id);
|
|
|
|
|
|
+ List<ExhibitionCustomerInfoVo> list = customerInfoService.getCustomerListByProductId(id);
|
|
return toResponsePageInfo(list);
|
|
return toResponsePageInfo(list);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -77,9 +76,27 @@ public class AppletCustomerInfoController extends BaseController {
|
|
@ApiImplicitParam(name = "pageNum", value = "当前页码", dataType = "int", paramType = "query", required = false),
|
|
@ApiImplicitParam(name = "pageNum", value = "当前页码", dataType = "int", paramType = "query", required = false),
|
|
@ApiImplicitParam(name = "pageSize", value = "每页数据量", dataType = "int", paramType = "query", required = false),
|
|
@ApiImplicitParam(name = "pageSize", value = "每页数据量", dataType = "int", paramType = "query", required = false),
|
|
})
|
|
})
|
|
- public ResponsePageInfo<CustomerInfoVo> getCustomerListByCollectionCount() {
|
|
|
|
|
|
+ public ResponsePageInfo<ExhibitionCustomerInfoVo> getCustomerListByCollectionCount() {
|
|
startPage();
|
|
startPage();
|
|
- List<CustomerInfoVo> list = customerInfoService.getCustomerListByCollectionCount();
|
|
|
|
|
|
+ List<ExhibitionCustomerInfoVo> list = customerInfoService.getCustomerListByCollectionCount();
|
|
|
|
+ return toResponsePageInfo(list);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 查询用户收藏列表
|
|
|
|
+ */
|
|
|
|
+ @GetMapping("/collectionList")
|
|
|
|
+ @ApiOperation("查询用户收藏列表")
|
|
|
|
+ @ApiImplicitParams({
|
|
|
|
+ @ApiImplicitParam(name = "pageNum", value = "当前页码", dataType = "int", paramType = "query", required = false),
|
|
|
|
+ @ApiImplicitParam(name = "pageSize", value = "每页数据量", dataType = "int", paramType = "query", required = false),
|
|
|
|
+ })
|
|
|
|
+ public ResponsePageInfo<CollectionCustomerVo> collectionList() {
|
|
|
|
+ startPage();
|
|
|
|
+ //当前用户
|
|
|
|
+ UserInfo userInfo = SecurityUtils.getLoginUser().getStudent();
|
|
|
|
+ List<CollectionCustomerVo> list = collectionInfoService.collectionList(userInfo);
|
|
return toResponsePageInfo(list);
|
|
return toResponsePageInfo(list);
|
|
}
|
|
}
|
|
|
|
|