Commit 1cee0414 by zhengxj

finish 组织编辑 by zhengxj

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@17798 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent 718b3002
...@@ -28,6 +28,7 @@ import java.util.HashMap; ...@@ -28,6 +28,7 @@ import java.util.HashMap;
import java.util.Map; import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
...@@ -91,7 +92,7 @@ public class OrganizationController extends BaseController{ ...@@ -91,7 +92,7 @@ public class OrganizationController extends BaseController{
} }
@RequestMapping(value = "/add", method = { RequestMethod.GET, RequestMethod.POST }) @RequestMapping(value = "/add", method = { RequestMethod.GET, RequestMethod.POST })
public ResultObject add(SysOrganization sysOrganization) { public ResultObject add( @RequestBody SysOrganization sysOrganization) {
int i = organizationService.insertSelective(sysOrganization); int i = organizationService.insertSelective(sysOrganization);
String msg = i == 0 ? ResultCodeEnum.FAIL.getMsg() : ResultCodeEnum.SUCCESS.getMsg(); String msg = i == 0 ? ResultCodeEnum.FAIL.getMsg() : ResultCodeEnum.SUCCESS.getMsg();
int code = i == 0 ? ResultCodeEnum.FAIL.getCode() : ResultCodeEnum.SUCCESS.getCode(); int code = i == 0 ? ResultCodeEnum.FAIL.getCode() : ResultCodeEnum.SUCCESS.getCode();
...@@ -110,7 +111,7 @@ public class OrganizationController extends BaseController{ ...@@ -110,7 +111,7 @@ public class OrganizationController extends BaseController{
} }
@RequestMapping(value = "/update", method = { RequestMethod.GET, RequestMethod.POST }) @RequestMapping(value = "/update", method = { RequestMethod.GET, RequestMethod.POST })
public ResultObject update( SysOrganization sysOrganization) { public ResultObject update( @RequestBody SysOrganization sysOrganization) {
organizationService.updateByPrimaryKeySelective(sysOrganization); organizationService.updateByPrimaryKeySelective(sysOrganization);
return new ResultObject(ResultCodeEnum.SUCCESS.getCode(), ResultCodeEnum.SUCCESS.getMsg()); return new ResultObject(ResultCodeEnum.SUCCESS.getCode(), ResultCodeEnum.SUCCESS.getMsg());
......
...@@ -83,9 +83,8 @@ public class SysOrganizationServiceImpl implements ISysOrganizationService{ ...@@ -83,9 +83,8 @@ public class SysOrganizationServiceImpl implements ISysOrganizationService{
label=(byte)0; label=(byte)0;
} }
// record.setLabel(label); // record.setLabel(label);
i = orgDao.insertSelective(record);
} }
i = orgDao.insertSelective(record);
return i; return i;
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!