|
|
@@ -157,12 +157,16 @@ public class UserJtBusinessController extends CertifyApiController{
|
|
|
@RequestMapping(value = "/project/publish",method=RequestMethod.GET)
|
|
|
public Result publishProject(String id,Integer auditStatus){
|
|
|
Result res = new Result();
|
|
|
- if(auditStatus != ProjectAuditStatus.CREATE.getCode()){
|
|
|
+
|
|
|
+ JtBusinessProject currentP=jtBusinessService.getBusinessProjectDetail(id);
|
|
|
+ Integer audit=currentP.getAuditStatus();
|
|
|
+ if(audit != ProjectAuditStatus.CREATE.getCode() && audit !=ProjectAuditStatus.REVOKE.getCode()&& audit!=ProjectAuditStatus.UNAUDITED.getCode()){
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "当前状态无法发布"));
|
|
|
+ return res;
|
|
|
}
|
|
|
JtBusinessProject jtBusinessProject = new JtBusinessProject();
|
|
|
jtBusinessProject.setId(id);
|
|
|
- jtBusinessProject.setAuditStatus(ProjectAuditStatus.AUDITED.getCode());
|
|
|
+ jtBusinessProject.setAuditStatus(ProjectAuditStatus.SUBMIT.getCode());
|
|
|
jtBusinessProject.setReleaseDate(new Date());
|
|
|
jtBusinessService.updateProject(jtBusinessProject);
|
|
|
return res;
|
|
|
@@ -179,6 +183,7 @@ public class UserJtBusinessController extends CertifyApiController{
|
|
|
Result res = new Result();
|
|
|
if(auditStatus != ProjectAuditStatus.AUDITED.getCode()){
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "当前状态无法撤销发布"));
|
|
|
+ return res;
|
|
|
}
|
|
|
JtBusinessProject jtBusinessProject = new JtBusinessProject();
|
|
|
jtBusinessProject.setId(id);
|