jiapeng 8 years ago
parent
commit
9b35ead238

+ 6 - 0
src/main/java/com/ekexiu/console/system/dao/OrgDao.java

@ -4,6 +4,7 @@ import java.sql.Connection;
4 4
import java.sql.SQLException;
5 5

6 6
import org.jfw.apt.annotation.Nullable;
7
import org.jfw.apt.orm.annotation.dao.Batch;
7 8
import org.jfw.apt.orm.annotation.dao.DAO;
8 9
import org.jfw.apt.orm.annotation.dao.method.From;
9 10
import org.jfw.apt.orm.annotation.dao.method.OrderBy;
@ -31,6 +32,11 @@ public interface OrgDao {
31 32
	@DeleteWith
32 33
	@From(Organization.class)
33 34
	int delete(Connection con, String id) throws SQLException;
35
	
36
	@DeleteWith
37
	@Batch
38
	@From(Organization.class)
39
	int[] delete(Connection con, @Batch String[] id) throws SQLException;
34 40

35 41
	@Nullable
36 42
	@SelectOne

+ 5 - 0
src/main/java/com/ekexiu/console/system/service/OrgService.java

@ -61,6 +61,11 @@ public class OrgService {
61 61
	public Organization query(@JdbcConn Connection con,@PathVar String id)throws SQLException{
62 62
		return this.orgDao.query(con, id);
63 63
	}
64
	@Post
65
	@Path("/del")
66
	public void delete(@JdbcConn(true) Connection con,String[] ids)throws SQLException{
67
		this.orgDao.delete(con, ids);
68
	}
64 69
	
65 70

66 71
}