Commit a59ca8a1 by zhangkb

修改状态

parent a4ea3320
......@@ -2,14 +2,13 @@ package com.keymobile.indicators.api.hytobacco;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
import com.keymobile.indicators.constant.Constants;
......@@ -34,15 +33,18 @@ public class IndCatalogCtrl {
@ApiOperation(value = "新建基础指标目录", notes = "新建基础指标目录")
@PostMapping(value = "/createBaseIndCatalog")
@ResponseBody
public Integer createBaseIndCatalog(@RequestBody IndCatalog indCatalog) throws ApiException{
public Integer createBaseIndCatalog(@RequestBody IndCatalog indCatalog,HttpServletResponse response) throws ApiException{
String message = null;
if(indCatalog.getId()==null) {
message = "新增基础项目录:{}";
}else {
message = "修改基础项目录:{}";
}
try {
indCatalog = indCatalogService.saveOrUpdate(indCatalog);
} catch (Exception e) {
response.setStatus(500);
}
LogManager.logInfo(Constants.LOG_INDICATOR_BASE_INDI_API,message,indCatalog.getCatalogName());
return indCatalog.getId();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment