|
@@ -159,6 +159,7 @@ public class MdModelInfoController extends BaseController {
|
|
|
if (org.apache.commons.lang3.StringUtils.isEmpty(modelInfo.getMdid())) {
|
|
if (org.apache.commons.lang3.StringUtils.isEmpty(modelInfo.getMdid())) {
|
|
|
return error("模型id不可为空");
|
|
return error("模型id不可为空");
|
|
|
}
|
|
}
|
|
|
|
|
+ if (StringUtils.isNull(modelInfo.getAudit())) return error("审核状态不可为空");
|
|
|
MdAudit audit = new MdAudit(null, modelInfo.getMdid(), "AUDIT", modelInfo.getAudit(), getUsername(), nowDate, modelInfo.getAuditRemark());
|
|
MdAudit audit = new MdAudit(null, modelInfo.getMdid(), "AUDIT", modelInfo.getAudit(), getUsername(), nowDate, modelInfo.getAuditRemark());
|
|
|
int i = mdAuditService.insertMdAudit(audit);
|
|
int i = mdAuditService.insertMdAudit(audit);
|
|
|
modelInfo.setAuditBy(getUsername());
|
|
modelInfo.setAuditBy(getUsername());
|
|
@@ -175,6 +176,8 @@ public class MdModelInfoController extends BaseController {
|
|
|
*/
|
|
*/
|
|
|
@GetMapping("/publish")
|
|
@GetMapping("/publish")
|
|
|
public AjaxResult publish(MdModelInfo modelInfo) {
|
|
public AjaxResult publish(MdModelInfo modelInfo) {
|
|
|
|
|
+ if (StringUtils.isNull(modelInfo.getMdid())) return error("模型id不可为空");
|
|
|
|
|
+ if (StringUtils.isNull(modelInfo.getPublish())) return error("发布状态不可为空");
|
|
|
Date nowDate = DateUtils.getNowDate();
|
|
Date nowDate = DateUtils.getNowDate();
|
|
|
MdAudit audit = new MdAudit(null, modelInfo.getMdid(), "PUBLISH", modelInfo.getPublish(), getUsername(), nowDate, modelInfo.getAuditRemark());
|
|
MdAudit audit = new MdAudit(null, modelInfo.getMdid(), "PUBLISH", modelInfo.getPublish(), getUsername(), nowDate, modelInfo.getAuditRemark());
|
|
|
int i = mdAuditService.insertMdAudit(audit);
|
|
int i = mdAuditService.insertMdAudit(audit);
|