liliang4869 лет назад: 7
Родитель
Сommit
095eb75add

+ 13 - 0
src/main/java/com/goafanti/business/controller/AdminJtBusinessController.java

@@ -187,5 +187,18 @@ public class AdminJtBusinessController extends CertifyApiController{
 		return result;
 	}
 	
+	/*
+	 * 删除项目
+	 * */
+	@RequestMapping(value="/project/delete",method=RequestMethod.GET)
+	private Result deleteProjecById(String id) {
+		Result result=new Result();
+		if(id == null) {
+			result.getError().add(buildError(ErrorConstants.PARAM_ERROR,"","id不能为空,"));
+			return result;
+		}
+		result.setData(jtBusinessService.deleteProjectById(id));
+		return result;
+	}
 	
 }

+ 1 - 0
src/main/java/com/goafanti/business/service/JtBusinessService.java

@@ -21,4 +21,5 @@ int deleteCategoryById(String id);
 JtBusinessCategory getCategoryById(String id);
 int updateCategory(JtBusinessCategory jtBusinessCategory);
 int insertProject(JtBusinessProject jtBusinessProject);
+int deleteProjectById(String id);
 }

+ 6 - 0
src/main/java/com/goafanti/business/service/impl/JtBusinessServiceImpl.java

@@ -222,5 +222,11 @@ public class JtBusinessServiceImpl  extends BaseMybatisDao<JtBusinessProjectMapp
 		return 1;
 	}
 
+	@Override
+	public int deleteProjectById(String id) {
+		// TODO Auto-generated method stub
+		return jtBusinessProjectMapper.deleteByPrimaryKey(id);
+	}
+
 	
 }