异常封装之经手人信息后台修改

This commit is contained in:
qiankunpingtai
2019-04-19 10:31:34 +08:00
parent 1686ebb56f
commit f1ced5a839
3 changed files with 164 additions and 39 deletions

View File

@@ -21,16 +21,16 @@ public class PersonComponent implements ICommonQuery {
private PersonService personService;
@Override
public Object selectOne(String condition) {
public Object selectOne(String condition)throws Exception {
return null;
}
@Override
public List<?> select(Map<String, String> map) {
public List<?> select(Map<String, String> map)throws Exception {
return getPersonList(map);
}
private List<?> getPersonList(Map<String, String> map) {
private List<?> getPersonList(Map<String, String> map) throws Exception{
String search = map.get(Constants.SEARCH);
String name = StringUtil.getInfo(search, "name");
String type = StringUtil.getInfo(search, "type");
@@ -39,7 +39,7 @@ public class PersonComponent implements ICommonQuery {
}
@Override
public Long counts(Map<String, String> map) {
public Long counts(Map<String, String> map) throws Exception{
String search = map.get(Constants.SEARCH);
String name = StringUtil.getInfo(search, "name");
String type = StringUtil.getInfo(search, "type");
@@ -47,27 +47,27 @@ public class PersonComponent implements ICommonQuery {
}
@Override
public int insert(String beanJson, HttpServletRequest request) {
public int insert(String beanJson, HttpServletRequest request)throws Exception {
return personService.insertPerson(beanJson, request);
}
@Override
public int update(String beanJson, Long id) {
public int update(String beanJson, Long id)throws Exception {
return personService.updatePerson(beanJson, id);
}
@Override
public int delete(Long id) {
public int delete(Long id)throws Exception {
return personService.deletePerson(id);
}
@Override
public int batchDelete(String ids) {
public int batchDelete(String ids)throws Exception {
return personService.batchDeletePerson(ids);
}
@Override
public int checkIsNameExist(Long id, String name) {
public int checkIsNameExist(Long id, String name)throws Exception {
return personService.checkIsNameExist(id, name);
}