huminmin
2026-04-25 4ab75b0214e47fd4b2cde6f0eddf5f6cf2981d6d
src/main/java/com/ruoyi/basic/controller/CustomerPrivatePoolController.java
@@ -3,21 +3,13 @@
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.basic.dto.CustomerPrivatePoolDto;
import com.ruoyi.basic.pojo.Customer;
import com.ruoyi.basic.pojo.CustomerPrivatePool;
import com.ruoyi.basic.service.CustomerPrivatePoolService;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.framework.web.domain.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;
import jakarta.servlet.http.HttpServletResponse;
import java.util.List;
/**
 * <p>
@@ -28,16 +20,16 @@
 * @since 2026-04-16 04:43:00
 */
@RestController
@Api(tags = "客户(私海)")
@Tag(name = "客户(私海)")
@RequestMapping("/customerPrivatePool")
@AllArgsConstructor
public class CustomerPrivatePoolController {
    @Autowired
    private CustomerPrivatePoolService customerPrivatePoolService;
    private final CustomerPrivatePoolService customerPrivatePoolService;
    @GetMapping("/listPage")
    @ApiOperation("客户(私海)列表")
    @Operation(summary = "客户(私海)列表")
    public R listPage(CustomerPrivatePoolDto customerPrivatePoolDto, Page<CustomerPrivatePoolDto> page){
        //查询当前用户的客户信息
        customerPrivatePoolDto.setBoundId(SecurityUtils.getUserId());
@@ -46,7 +38,7 @@
    }
    @PostMapping("/add")
    @ApiOperation("分配客户(私海)")
    @Operation(summary = "分配客户(私海)")
    public R add(@RequestBody CustomerPrivatePoolDto customerPrivatePool){
        boolean result = customerPrivatePoolService.add(customerPrivatePool);
        return R.ok(result);
@@ -59,28 +51,28 @@
    @DeleteMapping("/delete/{id}")
    @ApiOperation("删除客户(私海)")
    @Operation(summary = "删除客户(私海)")
    public R delete(@PathVariable Long id){
        boolean result = customerPrivatePoolService.deleteCustomerPrivatePool(id);
        return R.ok(result);
    }
    @PostMapping("/together")
    @ApiOperation("共享")
    @Operation(summary = "共享")
    public R together( @RequestBody CustomerPrivatePoolDto customerPrivatePool){
        boolean result = customerPrivatePoolService.together(customerPrivatePool);
        return R.ok(result);
    }
    @GetMapping("/info/{id}")
    @ApiOperation("详情")
    @Operation(summary = "详情")
    public R getInfo(@PathVariable Long id){
        CustomerPrivatePoolDto customerPrivatePool = customerPrivatePoolService.getInfo(id);
        return R.ok(customerPrivatePool);
    }
    @GetMapping("/getbyId/{id}")
    @ApiOperation("详情")
    @Operation(summary = "详情")
    public R getbyId(@PathVariable Long id){
        CustomerPrivatePoolDto customerPrivatePool = customerPrivatePoolService.getbyId(id);
        return R.ok(customerPrivatePool);