feat(resource): 增加模型类型字段
parent
bb64605dc4
commit
0d9a485c19
|
@ -47,10 +47,10 @@ public class ModelProduct extends BaseEntity {
|
|||
@ApiModelProperty(value = "用户id")
|
||||
private Long userId;
|
||||
/**
|
||||
* 模型类型ID
|
||||
* 模型类型
|
||||
*/
|
||||
@ApiModelProperty(value = "模型类型ID")
|
||||
private Long modelTypeId;
|
||||
@ApiModelProperty(value = "模型类型")
|
||||
private Long modelType;
|
||||
/**
|
||||
* 垂类
|
||||
*/
|
||||
|
|
|
@ -10,13 +10,18 @@ public class ModelVo {
|
|||
/**
|
||||
* 模型id
|
||||
*/
|
||||
@ApiModelProperty(value = "模型id", required = true)
|
||||
@ApiModelProperty(value = "模型id")
|
||||
private Long id;
|
||||
/**
|
||||
* 模型名称
|
||||
*/
|
||||
@ApiModelProperty(value = "模型名称", required = true)
|
||||
@ApiModelProperty(value = "模型名称")
|
||||
private String modelName;
|
||||
/**
|
||||
* 模型类型
|
||||
*/
|
||||
@ApiModelProperty(value = "模型类型")
|
||||
private String modelType;
|
||||
/**
|
||||
* 封面图
|
||||
*/
|
||||
|
|
|
@ -155,6 +155,13 @@ public class ModelServiceImpl extends ServiceImpl<ModelMapper,ModelProduct> impl
|
|||
for (ModelProduct modelImage : modelImageList) {
|
||||
ModelVo modelVo = new ModelVo();
|
||||
BeanUtil.copyProperties(modelImage, modelVo);
|
||||
|
||||
// 设置模型类型
|
||||
if (Objects.nonNull(modelImage.getModelType())) {
|
||||
String modelTypeName = DictInit.getDictValue(DictConstants.MODEL_CATEGORY, modelImage.getModelType().toString());
|
||||
modelVo.setModelType(modelTypeName);
|
||||
}
|
||||
|
||||
// 获取用户信息
|
||||
SysUser sysUser = sysUserService.selectUserById(modelImage.getUserId());
|
||||
if (Objects.isNull(sysUser)) {
|
||||
|
|
Loading…
Reference in New Issue