mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-15 03:25:06 +08:00
code review:分销逻辑
This commit is contained in:
@ -31,7 +31,7 @@ public class AppDictDataController {
|
||||
@GetMapping("/type")
|
||||
@Operation(summary = "根据字典类型查询字典数据信息")
|
||||
@Parameter(name = "type", description = "字典类型", required = true, example = "common_status")
|
||||
public CommonResult<List<AppDictDataRespVO>> getDictDataListByType(@RequestParam String type) {
|
||||
public CommonResult<List<AppDictDataRespVO>> getDictDataListByType(@RequestParam("type") String type) {
|
||||
List<DictDataDO> list = dictDataService.getEnabledDictDataListByType(type);
|
||||
return success(DictDataConvert.INSTANCE.convertList03(list));
|
||||
}
|
||||
|
@ -6,7 +6,6 @@ import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
|
||||
@Schema(description = "用户 App - 字典数据信息 Response VO")
|
||||
@ -19,23 +18,12 @@ public class AppDictDataRespVO {
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "字典标签", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
||||
@NotBlank(message = "字典标签不能为空")
|
||||
@Size(max = 100, message = "字典标签长度不能超过100个字符")
|
||||
private String label;
|
||||
|
||||
@Schema(description = "字典值", requiredMode = Schema.RequiredMode.REQUIRED, example = "iocoder")
|
||||
@NotBlank(message = "字典键值不能为空")
|
||||
@Size(max = 100, message = "字典键值长度不能超过100个字符")
|
||||
private String value;
|
||||
|
||||
@Schema(description = "字典类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "sys_common_sex")
|
||||
@NotBlank(message = "字典类型不能为空")
|
||||
@Size(max = 100, message = "字典类型长度不能超过100个字符")
|
||||
private String dictType;
|
||||
|
||||
@Schema(description = "颜色类型,default、primary、success、info、warning、danger", example = "default")
|
||||
private String colorType;
|
||||
@Schema(description = "css 样式", example = "btn-visible")
|
||||
private String cssClass;
|
||||
|
||||
}
|
||||
|
@ -50,6 +50,8 @@ public interface DictDataMapper extends BaseMapperX<DictDataDO> {
|
||||
|
||||
default List<DictDataDO> selectListByTypeAndStatus(String dictType, Integer status) {
|
||||
return selectList(new LambdaQueryWrapper<DictDataDO>()
|
||||
.eq(DictDataDO::getDictType, dictType).eq(DictDataDO::getStatus, status));
|
||||
.eq(DictDataDO::getDictType, dictType)
|
||||
.eq(DictDataDO::getStatus, status));
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user