fix: labeling_template

This commit is contained in:
yanps
2023-12-07 11:00:30 +08:00
parent 92fdf0ccd6
commit 92548160ab
3 changed files with 58 additions and 1 deletions

View File

@@ -27,6 +27,12 @@ public class LabelingTemplateController {
private final LabelingTemplateService labelingTemplateService; private final LabelingTemplateService labelingTemplateService;
/**
* 查询贴标模板基本信息
* @param query
* @param pageable
* @return
*/
@GetMapping @GetMapping
@Log("查询贴标模板基本信息") @Log("查询贴标模板基本信息")
@ApiOperation("查询贴标模板基本信息") @ApiOperation("查询贴标模板基本信息")
@@ -35,6 +41,11 @@ public class LabelingTemplateController {
return new ResponseEntity<>(labelingTemplateService.queryAll(query, pageable), HttpStatus.OK); return new ResponseEntity<>(labelingTemplateService.queryAll(query, pageable), HttpStatus.OK);
} }
/**
* 新增贴标模板基本信息
* @param resources
* @return
*/
@PostMapping @PostMapping
@Log("新增贴标模板基本信息") @Log("新增贴标模板基本信息")
@ApiOperation("新增贴标模板基本信息") @ApiOperation("新增贴标模板基本信息")
@@ -43,6 +54,11 @@ public class LabelingTemplateController {
return new ResponseEntity<>(labelingTemplateService.insert(resources), HttpStatus.CREATED); return new ResponseEntity<>(labelingTemplateService.insert(resources), HttpStatus.CREATED);
} }
/**
* 修改贴标模板基本信息
* @param resources
* @return
*/
@PutMapping @PutMapping
@Log("修改贴标模板基本信息") @Log("修改贴标模板基本信息")
@ApiOperation("修改贴标模板基本信息") @ApiOperation("修改贴标模板基本信息")
@@ -52,6 +68,11 @@ public class LabelingTemplateController {
return new ResponseEntity<>(HttpStatus.NO_CONTENT); return new ResponseEntity<>(HttpStatus.NO_CONTENT);
} }
/**
* 删除贴标模板基本信息
* @param ids
* @return
*/
@DeleteMapping @DeleteMapping
@Log("删除贴标模板基本信息") @Log("删除贴标模板基本信息")
@ApiOperation("删除贴标模板基本信息") @ApiOperation("删除贴标模板基本信息")

View File

@@ -35,19 +35,48 @@ public interface LabelingTemplateService extends CommonService<LabelingTemplate>
*/ */
List<LabelingTemplateDto> queryAll(LabelingTemplateQueryParam query); List<LabelingTemplateDto> queryAll(LabelingTemplateQueryParam query);
/**
* 根据ID查询
*
* @param id ID
* @return LabelingTemplateDto
*/
LabelingTemplate getById(String id); LabelingTemplate getById(String id);
/**
*
* @param id
* @return
*/
LabelingTemplateDto findById(String id); LabelingTemplateDto findById(String id);
/** /**
*
* 插入一条新数据。 * 插入一条新数据。
* @param resources
* @return
*/ */
int insert(LabelingTemplateDto resources); int insert(LabelingTemplateDto resources);
/**
*
* @param resources
* @return
*/
int updateById(LabelingTemplateDto resources); int updateById(LabelingTemplateDto resources);
/**
*
* @param id
* @return
*/
int removeById(String id); int removeById(String id);
/**
*
* @param ids
* @return
*/
int removeByIds(Set<String> ids); int removeByIds(Set<String> ids);
/** /**

View File

@@ -29,7 +29,9 @@ import java.util.*;
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
public class LabelingTemplateServiceImpl extends CommonServiceImpl<LabelingTemplateMapper, LabelingTemplate> implements LabelingTemplateService { public class LabelingTemplateServiceImpl extends CommonServiceImpl<LabelingTemplateMapper, LabelingTemplate> implements LabelingTemplateService {
// private final RedisUtils redisUtils; /**
* private final RedisUtils redisUtils;
*/
private final LabelingTemplateMapper labelingTemplateMapper; private final LabelingTemplateMapper labelingTemplateMapper;
@Override @Override
@@ -49,6 +51,11 @@ public class LabelingTemplateServiceImpl extends CommonServiceImpl<LabelingTempl
return labelingTemplateMapper.selectById(id); return labelingTemplateMapper.selectById(id);
} }
/**
*
* @param id
* @return
*/
@Override @Override
// @Cacheable(key = "'id:' + #p0") // @Cacheable(key = "'id:' + #p0")
public LabelingTemplateDto findById(String id) { public LabelingTemplateDto findById(String id) {