|
@@ -1,22 +1,16 @@
|
|
|
package com.miaxis.app.controller.customer;
|
|
|
|
|
|
-import com.miaxis.collection.mapper.CollectionInfoMapper;
|
|
|
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.Response;
|
|
|
-import com.miaxis.common.core.domain.entity.SysUser;
|
|
|
-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.CustomerInfoVo;
|
|
|
+import com.miaxis.customer.vo.ExhibitionCustomerInfoVo;
|
|
|
import io.swagger.annotations.*;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
-import java.util.Arrays;
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
@@ -33,7 +27,6 @@ public class AppletCustomerInfoController extends BaseController {
|
|
|
|
|
|
private final ICustomerInfoService customerInfoService;
|
|
|
|
|
|
- private final ICollectionInfoService collectionInfoService;
|
|
|
|
|
|
/**
|
|
|
* 查询客户信息列表
|
|
@@ -60,12 +53,12 @@ public class AppletCustomerInfoController extends BaseController {
|
|
|
@ApiImplicitParam(name = "pageNum", 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)
|
|
|
@PathVariable("id") Long id
|
|
|
) {
|
|
|
startPage();
|
|
|
- List<CustomerInfoVo> list = customerInfoService.getCustomerListByProductId(id);
|
|
|
+ List<ExhibitionCustomerInfoVo> list = customerInfoService.getCustomerListByProductId(id);
|
|
|
return toResponsePageInfo(list);
|
|
|
}
|
|
|
|
|
@@ -78,38 +71,11 @@ public class AppletCustomerInfoController extends BaseController {
|
|
|
@ApiImplicitParam(name = "pageNum", 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();
|
|
|
- List<CustomerInfoVo> list = customerInfoService.getCustomerListByCollectionCount();
|
|
|
+ List<ExhibitionCustomerInfoVo> list = customerInfoService.getCustomerListByCollectionCount();
|
|
|
return toResponsePageInfo(list);
|
|
|
}
|
|
|
|
|
|
|
|
|
- /**
|
|
|
- * 收藏商家
|
|
|
- */
|
|
|
- @PutMapping(value = "/collectionBusiness/{id}")
|
|
|
- @ApiOperation("收藏商家")
|
|
|
- public Response collectionBusiness(
|
|
|
- @ApiParam(name = "id",value = "商家id",required = true)
|
|
|
- @PathVariable("id") Long id
|
|
|
- ){
|
|
|
- //当前用户
|
|
|
- UserInfo userInfo = SecurityUtils.getLoginUser().getStudent();
|
|
|
- return customerInfoService.collectionBusiness(userInfo,id);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 取消收藏商家
|
|
|
- */
|
|
|
- @DeleteMapping(value = "/cancelCollection/{ids}")
|
|
|
- @ApiOperation("取消收藏")
|
|
|
- public Response cancelCollection(
|
|
|
- @ApiParam(name = "ids", value = "收藏ids参数", required = true)
|
|
|
- @PathVariable Long[] ids
|
|
|
- ){
|
|
|
- return toResponse(collectionInfoService.removeByIds(Arrays.asList(ids)) ? 1 : 0);
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
}
|