コード例 #1
0
 @RequestMapping(value = "/{cid}", consumes = "application/json", method = RequestMethod.DELETE)
 @Override
 public HttpEntity<ResponseBean> delete(@PathVariable("cid") String entity) throws Exception {
   testBrepo.delete(entity);
   AppAlarm appAlarm = Log.getAlarm("AISHI128100200");
   ResponseBean responseBean = new ResponseBean(appAlarm);
   responseBean.add("message", String.format(appAlarm.getMessage(), "TestB"));
   Log.out.println(
       appAlarm.getAlarmID(),
       runtimeLogInfoHelper.getRequestHeaderBean(),
       "TestBServiceImpl",
       "delete",
       "TestB");
   return new org.springframework.http.ResponseEntity<ResponseBean>(
       responseBean, HttpStatus.valueOf(appAlarm.getAlarmStatus()));
 }
コード例 #2
0
 @RequestMapping(consumes = "application/json", method = RequestMethod.POST)
 @Override
 public HttpEntity<ResponseBean> save(@RequestBody TestB entity) throws Exception {
   testBrepo.save(entity);
   AppAlarm appAlarm = Log.getAlarm("AISHI122100201");
   ResponseBean responseBean = new ResponseBean(appAlarm);
   responseBean.add("message", String.format(appAlarm.getMessage(), "TestB"));
   responseBean.add("data", entity);
   Log.out.println(
       appAlarm.getAlarmID(),
       runtimeLogInfoHelper.getRequestHeaderBean(),
       "TestBServiceImpl",
       "save",
       "TestB");
   return new org.springframework.http.ResponseEntity<ResponseBean>(
       responseBean, HttpStatus.valueOf(appAlarm.getAlarmStatus()));
 }
コード例 #3
0
 @RequestMapping(value = "/findAll", consumes = "application/json", method = RequestMethod.GET)
 @Override
 public HttpEntity<ResponseBean> findAll() throws Exception {
   java.util.List<com.app.shared.appinsight.health.TestB> lsttestb = testBrepo.findAll();
   AppAlarm appAlarm = Log.getAlarm("AISHI124100200");
   ResponseBean responseBean = new ResponseBean(appAlarm);
   responseBean.add("message", String.format(appAlarm.getMessage(), "TestB"));
   responseBean.add("data", lsttestb);
   Log.out.println(
       appAlarm.getAlarmID(),
       runtimeLogInfoHelper.getRequestHeaderBean(),
       "TestBServiceImpl",
       "findAll",
       "TestB");
   return new org.springframework.http.ResponseEntity<ResponseBean>(
       responseBean, HttpStatus.valueOf(appAlarm.getAlarmStatus()));
 }
コード例 #4
0
 @RequestMapping(value = "/findById", method = RequestMethod.POST)
 @Override
 public HttpEntity<ResponseBean> findById(@RequestBody FindByBean findByBean) throws Exception {
   org.springframework.http.HttpStatus httpStatus = org.springframework.http.HttpStatus.OK;
   com.app.shared.appinsight.health.TestB lsttestb =
       testBrepo.findById((java.lang.String) findByBean.getFindKey());
   AppAlarm appAlarm = Log.getAlarm("AISHI124100200");
   com.athena.server.pluggable.utils.bean.ResponseBean responseBean = new ResponseBean(appAlarm);
   responseBean.add("message", String.format(appAlarm.getMessage(), "TestB"));
   responseBean.add("data", lsttestb);
   Log.out.println(
       "AISHI124100200",
       runtimeLogInfoHelper.getRequestHeaderBean(),
       "TestBServiceImpl",
       "save",
       "TestB");
   return new org.springframework.http.ResponseEntity<ResponseBean>(
       responseBean, HttpStatus.valueOf(appAlarm.getAlarmStatus()));
 }
コード例 #5
0
 @RequestMapping(
     consumes = "application/json",
     headers = {"isArray"},
     method = RequestMethod.PUT)
 @Override
 public HttpEntity<ResponseBean> update(
     @RequestBody List<TestB> entity, @RequestHeader("isArray") boolean request) throws Exception {
   testBrepo.update(entity);
   AppAlarm appAlarm = Log.getAlarm("AISHI123100200");
   ResponseBean responseBean = new ResponseBean(appAlarm);
   responseBean.add("message", String.format(appAlarm.getMessage(), "TestB"));
   Log.out.println(
       appAlarm.getAlarmID(),
       runtimeLogInfoHelper.getRequestHeaderBean(),
       "TestBServiceImpl",
       "update",
       "TestB");
   return new org.springframework.http.ResponseEntity<ResponseBean>(
       responseBean, HttpStatus.valueOf(appAlarm.getAlarmStatus()));
 }