异常封装之仓库信息后台修改

This commit is contained in:
qiankunpingtai
2019-04-17 10:47:36 +08:00
parent ae416e8fec
commit 8bfe0ba916
3 changed files with 183 additions and 44 deletions

View File

@@ -20,16 +20,16 @@ public class DepotComponent implements ICommonQuery {
private DepotService depotService;
@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 getDepotList(map);
}
private List<?> getDepotList(Map<String, String> map) {
private List<?> getDepotList(Map<String, String> map)throws Exception {
String search = map.get(Constants.SEARCH);
String name = StringUtil.getInfo(search, "name");
Integer type = StringUtil.parseInteger(StringUtil.getInfo(search, "type"));
@@ -39,7 +39,7 @@ public class DepotComponent 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");
Integer type = StringUtil.parseInteger(StringUtil.getInfo(search, "type"));
@@ -48,27 +48,27 @@ public class DepotComponent implements ICommonQuery {
}
@Override
public int insert(String beanJson, HttpServletRequest request) {
public int insert(String beanJson, HttpServletRequest request) throws Exception{
return depotService.insertDepot(beanJson, request);
}
@Override
public int update(String beanJson, Long id) {
public int update(String beanJson, Long id)throws Exception {
return depotService.updateDepot(beanJson, id);
}
@Override
public int delete(Long id) {
public int delete(Long id)throws Exception {
return depotService.deleteDepot(id);
}
@Override
public int batchDelete(String ids) {
public int batchDelete(String ids)throws Exception {
return depotService.batchDeleteDepot(ids);
}
@Override
public int checkIsNameExist(Long id, String name) {
public int checkIsNameExist(Long id, String name)throws Exception {
return depotService.checkIsNameExist(id, name);
}