|
|
@@ -222,6 +222,7 @@ public class AdminDemandApiController extends CertifyApiController {
|
|
|
}
|
|
|
|
|
|
if (!DemandAuditStatus.CREATE.getCode().equals(demand.getAuditStatus())
|
|
|
+ && !DemandAuditStatus.SUBMIT.getCode().equals(demand.getAuditStatus())
|
|
|
&& !DemandAuditStatus.UNAUDITED.getCode().equals(demand.getAuditStatus())) {
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "当前状态无法提交审核!"));
|
|
|
return res;
|
|
|
@@ -237,25 +238,25 @@ public class AdminDemandApiController extends CertifyApiController {
|
|
|
res.setData(demandService.updateUserDemand(d, validityPeriodFormattedDate));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 需求撤消发布(下架)
|
|
|
*/
|
|
|
@RequestMapping(value = "/offShelf", method = RequestMethod.POST)
|
|
|
- public Result offShelf(String id){
|
|
|
+ public Result offShelf(String id) {
|
|
|
Result res = new Result();
|
|
|
- if (StringUtils.isBlank(id)){
|
|
|
+ if (StringUtils.isBlank(id)) {
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到需求ID", "需求ID"));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
Demand d = demandService.selectByPrimaryKey(id);
|
|
|
-
|
|
|
- if (null == d){
|
|
|
+
|
|
|
+ if (null == d) {
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "需求ID"));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
res.setData(demandService.updateReleaseStatus(d));
|
|
|
return res;
|
|
|
}
|