|
|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
package cn.jyjz.xiaoyao.ocr.controller;
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
|
|
import cn.jyjz.xiaoyao.admin.dataobject.Post;
|
|
|
|
|
import cn.jyjz.xiaoyao.admin.service.UserService;
|
|
|
|
|
import cn.jyjz.xiaoyao.common.base.controller.BaseController;
|
|
|
|
|
@ -35,6 +36,7 @@ import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
import java.util.Arrays;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
@RestController
|
|
|
|
|
@RequestMapping("/ocr/field")
|
|
|
|
|
@ -48,6 +50,7 @@ public class OcrFieldController extends BaseController {
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private UserService userService;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 自定义筛选字段列表查询
|
|
|
|
|
* @return
|
|
|
|
|
@ -106,8 +109,14 @@ public class OcrFieldController extends BaseController {
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value="详情", notes="详情")
|
|
|
|
|
@GetMapping(value = "/getData/{id}")
|
|
|
|
|
public ResultVo getData(@PathVariable(name="id") @ApiParam(value = "字段ID", required = true) Long id) {
|
|
|
|
|
return ResultVoUtil.success(ocrFieldService.getById(id));
|
|
|
|
|
public ResultVo getData(@PathVariable(name="id") @ApiParam(value = "字段ID", required = true) String ids) {
|
|
|
|
|
List<OcrField> ocrFields = ocrFieldService.listByIds(Arrays.asList(ids.split(",")));
|
|
|
|
|
List<OcrField> newOcrField = ocrFields.stream().peek(s -> {
|
|
|
|
|
s.setUpdateTime(DateUtil.date().toSqlDate());
|
|
|
|
|
s.setDel(1);
|
|
|
|
|
}).collect(Collectors.toList());
|
|
|
|
|
ocrFieldService.updateBatchById(newOcrField);
|
|
|
|
|
return ResultVoUtil.success();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|