异常封装之商品信息后台修改

This commit is contained in:
qiankunpingtai
2019-04-18 21:48:22 +08:00
parent fd7df68740
commit ff9a0de5ac
3 changed files with 227 additions and 58 deletions

View File

@@ -21,16 +21,16 @@ public class MaterialComponent implements ICommonQuery {
private MaterialService materialService;
@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 getMaterialList(map);
}
private List<?> getMaterialList(Map<String, String> map) {
private List<?> getMaterialList(Map<String, String> map) throws Exception{
String search = map.get(Constants.SEARCH);
String name = StringUtil.getInfo(search, "name");
String model = StringUtil.getInfo(search, "model");
@@ -42,7 +42,7 @@ public class MaterialComponent 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 model = StringUtil.getInfo(search, "model");
@@ -53,27 +53,27 @@ public class MaterialComponent implements ICommonQuery {
}
@Override
public int insert(String beanJson, HttpServletRequest request) {
public int insert(String beanJson, HttpServletRequest request) throws Exception{
return materialService.insertMaterial(beanJson, request);
}
@Override
public int update(String beanJson, Long id) {
public int update(String beanJson, Long id)throws Exception {
return materialService.updateMaterial(beanJson, id);
}
@Override
public int delete(Long id) {
public int delete(Long id)throws Exception {
return materialService.deleteMaterial(id);
}
@Override
public int batchDelete(String ids) {
public int batchDelete(String ids)throws Exception {
return materialService.batchDeleteMaterial(ids);
}
@Override
public int checkIsNameExist(Long id, String name) {
public int checkIsNameExist(Long id, String name)throws Exception {
return materialService.checkIsNameExist(id, name);
}