Commit 3b609a77 authored by hezhen's avatar hezhen

Merge branch 'master-tiande' into dev-tiande

parents f6cc88bb 811ce254
...@@ -485,4 +485,22 @@ public class BranchCompanyBiz extends BaseBiz<BranchCompanyMapper, BranchCompany ...@@ -485,4 +485,22 @@ public class BranchCompanyBiz extends BaseBiz<BranchCompanyMapper, BranchCompany
log.error(e.getMessage(), e); log.error(e.getMessage(), e);
} }
} }
public ObjectRestResponse saveOrUpd(BranchCompany branchCompany){
Integer id= branchCompany.getId() == null ? 0 : branchCompany.getId();
if (id > 0){
updateSelectiveById(branchCompany);
}else {
insertSelective(branchCompany);
}
sendQueue(branchCompany);
return ObjectRestResponse.succ();
}
public ObjectRestResponse del(BranchCompany branchCompany){
branchCompany.setIsDel(1);
updateSelectiveById(branchCompany);
sendQueue(branchCompany);
return ObjectRestResponse.succ();
}
} }
...@@ -4,6 +4,7 @@ import com.github.wxiaoqi.security.admin.feign.UserFeign; ...@@ -4,6 +4,7 @@ import com.github.wxiaoqi.security.admin.feign.UserFeign;
import com.github.wxiaoqi.security.admin.feign.rest.UserRestInterface; import com.github.wxiaoqi.security.admin.feign.rest.UserRestInterface;
import com.github.wxiaoqi.security.auth.client.annotation.IgnoreClientToken; import com.github.wxiaoqi.security.auth.client.annotation.IgnoreClientToken;
import com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken; import com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.rest.BaseController; import com.github.wxiaoqi.security.common.rest.BaseController;
import com.github.wxiaoqi.security.common.vo.PageDataVO; import com.github.wxiaoqi.security.common.vo.PageDataVO;
import com.xxfc.platform.vehicle.biz.BranchCompanyBiz; import com.xxfc.platform.vehicle.biz.BranchCompanyBiz;
...@@ -53,6 +54,17 @@ public class AdminBranchCompanyController extends BaseController<BranchCompanyBi ...@@ -53,6 +54,17 @@ public class AdminBranchCompanyController extends BaseController<BranchCompanyBi
return RestResponse.data(companySearchVO); return RestResponse.data(companySearchVO);
} }
@RequestMapping(value ="/saveOrUpd",method = RequestMethod.POST)
public ObjectRestResponse search(@RequestBody BranchCompany branchCompany) {
return baseBiz.saveOrUpd(branchCompany);
}
@RequestMapping(value ="/detele",method = RequestMethod.DELETE)
public ObjectRestResponse detele(BranchCompany branchCompany) {
return baseBiz.del(branchCompany);
}
} }
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