添加线索导入与新增
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
package com.cool.store.controller;
|
||||
|
||||
|
||||
import com.cool.store.entity.HyPartnerLineDO;
|
||||
import com.cool.store.exception.ApiException;
|
||||
import com.cool.store.request.AddLineRequest;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.LineHighSeasService;
|
||||
import com.cool.store.utils.poi.ExcelUtil;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: hxd
|
||||
* @Date: 2023-06-06 15:22
|
||||
* @Description:
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/line/highSeas")
|
||||
public class LineHighSeasController {
|
||||
|
||||
|
||||
@Resource
|
||||
private LineHighSeasService lineHighSeasService;
|
||||
|
||||
@PostMapping("/add")
|
||||
@ApiOperation("新建线索")
|
||||
public ResponseResult addLine(@RequestBody @Valid AddLineRequest request) throws ApiException {
|
||||
|
||||
return ResponseResult.success(lineHighSeasService.addLine(request));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@PostMapping("/import")
|
||||
@ApiOperation("批量导入线索")
|
||||
public ResponseResult importLine(MultipartFile file) throws Exception {
|
||||
return lineHighSeasService.importLine(file);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user