code review:分销逻辑

This commit is contained in:
YunaiV
2023-09-24 11:56:00 +08:00
parent 51899c4c13
commit 421bb7d154
21 changed files with 71 additions and 35 deletions

View File

@ -38,6 +38,7 @@ public class DictDataApiImpl implements DictDataApi {
@Override
public List<DictDataRespDTO> getDictDataList(String type) {
// TODO @疯狂:不用 DictDataExportReqVO 哈;可以考虑直接加个允许传递 type 传递的
List<DictDataDO> list = dictDataService.getDictDataList(new DictDataExportReqVO().setDictType(type));
return DictDataConvert.INSTANCE.convertList04(list);
}

View File

@ -28,10 +28,12 @@ public class AppDictDataController {
@Resource
private DictDataService dictDataService;
// TODO @疯狂:暂时不用 path 参数哈;主要考虑一些中间件支持的一般,例如说链路追踪之类的;还是作为一个参数噶;
@GetMapping("/type/{dictType}")
@Operation(summary = "根据字典类型查询字典数据信息")
public CommonResult<List<AppDictDataRespVO>> getDicts(@PathVariable String dictType) {
public CommonResult<List<AppDictDataRespVO>> getDictDataList(@PathVariable String dictType) {
List<DictDataDO> list = dictDataService.getDictDataList(new DictDataExportReqVO().setDictType(dictType));
return success(DictDataConvert.INSTANCE.convertList03(list));
}
}

View File

@ -14,6 +14,8 @@ import lombok.NoArgsConstructor;
@EqualsAndHashCode(callSuper = true)
public class AppDictDataRespVO extends DictDataBaseVO {
// TODO @疯狂app 的接口,不集成 admin 接口的 vo 哈;看看是不是只返回必要的字段,类似 remark、sort 不好返回的哈;
@Schema(description = "字典数据编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Long id;