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;
import java.util.Map;
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.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
......@@ -91,7 +92,7 @@ public class OrganizationController extends BaseController{
}
@RequestMapping(value = "/add", method = { RequestMethod.GET, RequestMethod.POST })
public ResultObject add(SysOrganization sysOrganization) {
public ResultObject add( @RequestBody SysOrganization sysOrganization) {
int i = organizationService.insertSelective(sysOrganization);
String msg = i == 0 ? ResultCodeEnum.FAIL.getMsg() : ResultCodeEnum.SUCCESS.getMsg();
int code = i == 0 ? ResultCodeEnum.FAIL.getCode() : ResultCodeEnum.SUCCESS.getCode();
......@@ -110,7 +111,7 @@ public class OrganizationController extends BaseController{
}
@RequestMapping(value = "/update", method = { RequestMethod.GET, RequestMethod.POST })
public ResultObject update( SysOrganization sysOrganization) {
public ResultObject update( @RequestBody SysOrganization sysOrganization) {
organizationService.updateByPrimaryKeySelective(sysOrganization);
return new ResultObject(ResultCodeEnum.SUCCESS.getCode(), ResultCodeEnum.SUCCESS.getMsg());
......
......@@ -82,10 +82,9 @@ public class SysOrganizationServiceImpl implements ISysOrganizationService{
if(Constants.BUTTON==record.getOrgType() ){
label=(byte)0;
}
// record.setLabel(label);
i = orgDao.insertSelective(record);
// record.setLabel(label);
}
i = orgDao.insertSelective(record);
return i;
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!