Merge branch 'feature/admin' into preview

feature/community-center
Diyu0904 2025-05-21 13:42:25 +08:00
commit 7b7154f532
7 changed files with 59 additions and 15 deletions

View File

@ -147,6 +147,12 @@ public class ModelProduct extends BaseEntity {
@ApiModelProperty(value = "商品价格")
private Double productPrice;
/**
*
*/
@ApiModelProperty(value = "是否魔创未来官方发布(0否 1是)")
private Integer isOfficial;
//
// /**

View File

@ -184,10 +184,14 @@ public class WorkFlow {
@TableField(exist = false)
private Integer isLike;
/**
*
*/
@ApiModelProperty(value = "商品价格")
private Double productPrice;
/**
* (0 1)
*/
@ApiModelProperty(value = "是否魔创未来官方发布(0否 1是)")
private Integer isOfficial;
}

View File

@ -176,4 +176,10 @@ public class AddWorkFlow {
@TableField(exist = false)
private List<String> typeList;
/**
*
*/
@ApiModelProperty(value = "是否魔创未来官方发布(0否 1是)")
private Integer isOfficial;
}

View File

@ -29,6 +29,12 @@ public class ModelImagePageRes extends PageDomain {
@ApiModelProperty(value = "状态")
private Integer status;
/**
*
*/
@ApiModelProperty(value = "是否官方发布")
private Integer official;
/**
*
*/

View File

@ -35,4 +35,7 @@ public class PageVo {
@ApiModelProperty("0查询 1不查询 是否收藏/下载")
private Integer isCollect;
@ApiModelProperty(value = "是否官方发布")
private Integer official;
}

View File

@ -234,6 +234,7 @@ public class ModelServiceImpl extends ServiceImpl<ModelMapper,ModelProduct> impl
LambdaQueryWrapper<ModelProduct> lqw = new LambdaQueryWrapper<>();
lqw.eq(imagePageRes.getStatus() != null && imagePageRes.getStatus() != 0, ModelProduct::getAuditStatus, imagePageRes.getStatus())
.eq( ModelProduct::getUserId, imagePageRes.getUserId())
.eq(imagePageRes.getOfficial() != null, ModelProduct::getIsOfficial, imagePageRes.getOfficial())
.ge(imagePageRes.getStartTime() != null, ModelProduct::getCreateTime, imagePageRes.getStartTime())
.le(imagePageRes.getEndTime() != null, ModelProduct::getCreateTime, imagePageRes.getEndTime());
postMapper.selectPage(page, lqw);
@ -277,12 +278,16 @@ public class ModelServiceImpl extends ServiceImpl<ModelMapper,ModelProduct> impl
@Override
public R<String> addModel(RequestModel requestModel) {
//校验是否实名
SysUser sysUser = sysUserService.selectUserInfoById(SecurityUtils.getUserId());
log.info("查询到的个人数据:{}",sysUser);
if (StringUtils.isEmpty(sysUser.getName())){
//官方发布则不校验实名以及审核
if (requestModel.getModelProduct().getIsOfficial() == 0){
//校验是否实名
SysUser sysUser = sysUserService.selectUserInfoById(SecurityUtils.getUserId());
log.info("查询到的个人数据:{}",sysUser);
if (StringUtils.isEmpty(sysUser.getName())){
return R.fail(HttpStatus.SHOW_ERROR_MSG,"实名制后才可以发布");
}
return R.fail(HttpStatus.SHOW_ERROR_MSG,"实名制后才可以发布");
}
@ -324,8 +329,13 @@ public class ModelServiceImpl extends ServiceImpl<ModelMapper,ModelProduct> impl
modelVersionMapper.addModelVersion(modelVersion);
}
//执行审核方法
audit(requestModel);
if (requestModel.getModelProduct().getIsOfficial() == 0){
//执行审核方法
audit(requestModel);
}
return R.ok("添加成功,等待审核");
}

View File

@ -83,14 +83,18 @@ public class WorkFlowServiceImpl extends ServiceImpl<WorkFlowMapper, WorkFlow> i
@Override
public R<Object> addWorkFlow(AddRequestWorkFlow addRequestWorkFlo) {
//校验是否实名
SysUser sysUser = sysUserService.selectUserInfoById(SecurityUtils.getUserId());
if (sysUser.getName() == null){
//校验是否魔创未来官方发布
if (addRequestWorkFlo.getWorkFlow().getIsOfficial() == 0){
//校验是否实名
SysUser sysUser = sysUserService.selectUserInfoById(SecurityUtils.getUserId());
if (sysUser.getName() == null){
return R.fail(HttpStatus.SHOW_ERROR_MSG,"实名制后才可以发布");
return R.fail(HttpStatus.SHOW_ERROR_MSG,"实名制后才可以发布");
}
}
for (AddWorkFlowVersion addWorkFlowVersion : addRequestWorkFlo.getWorkFlowVersionList()) {
//校验名字
@ -128,7 +132,11 @@ public class WorkFlowServiceImpl extends ServiceImpl<WorkFlowMapper, WorkFlow> i
//批量添加版本
workFlowVersionMapper.addWorkFlowVersion(requestWorkFlow.getWorkFlow(), addRequestWorkFlo.getWorkFlowVersionList());
audit(requestWorkFlow);
//校验是否魔创未来官方发布
if (addRequestWorkFlo.getWorkFlow().getIsOfficial() == 0){
audit(requestWorkFlow);
}
return R.ok();
@ -363,6 +371,7 @@ public class WorkFlowServiceImpl extends ServiceImpl<WorkFlowMapper, WorkFlow> i
LambdaQueryWrapper<WorkFlow> lambdaQueryWrapper = Wrappers.<WorkFlow>lambdaQuery()
.like(StringUtils.isNotBlank(pageVo.getName()), WorkFlow::getWorkflowName, pageVo.getName())
.eq(StringUtils.isNotNull(pageVo.getOfficial()),WorkFlow::getIsOfficial,pageVo.getOfficial())
.eq(WorkFlow::getAuditStatus,1)
.eq(WorkFlow::getDelFlag, 0);