parent
9433686d00
commit
5b5ced17b5
@ -0,0 +1,33 @@
|
|||||||
|
package com.rain.dao;
|
||||||
|
|
||||||
|
import static com.rain.util.common.Constants.DEPTTABLE;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Delete;
|
||||||
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
import org.apache.ibatis.annotations.SelectProvider;
|
||||||
|
import com.rain.dao.provider.DeptDynaSqlProvider;
|
||||||
|
import com.rain.domain.Dept;
|
||||||
|
public interface DeptDao {
|
||||||
|
//查询
|
||||||
|
@Select("select * from "+DEPTTABLE+" ")
|
||||||
|
List<Dept> selectAllDept();
|
||||||
|
@Select("select * from "+DEPTTABLE+" where name like CONCAT('%',#{content},'%')")
|
||||||
|
List<Dept> selectLikeAllDept(String content);
|
||||||
|
|
||||||
|
|
||||||
|
@SelectProvider(type=DeptDynaSqlProvider.class,method="insertDept")
|
||||||
|
void save(Dept dept);
|
||||||
|
|
||||||
|
@Select("select * from "+DEPTTABLE+" where id = #{id}")
|
||||||
|
Dept get_Info(Integer id);
|
||||||
|
|
||||||
|
@SelectProvider(type=DeptDynaSqlProvider.class,method="updateDept")
|
||||||
|
void update_Info(Dept dept);
|
||||||
|
// 根据id删除部门
|
||||||
|
@Delete(" delete from "+DEPTTABLE+" where id = #{id} ")
|
||||||
|
void delete_Info(Integer id);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,33 @@
|
|||||||
|
package com.rain.dao;
|
||||||
|
|
||||||
|
import static com.rain.util.common.Constants.DOCUMENTTABLE;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Delete;
|
||||||
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
import org.apache.ibatis.annotations.SelectProvider;
|
||||||
|
import com.rain.dao.provider.DocumentDynaSqlProvider;
|
||||||
|
import com.rain.domain.Document;
|
||||||
|
public interface DocumentDao {
|
||||||
|
//查询
|
||||||
|
@Select("select * from "+DOCUMENTTABLE+" ")
|
||||||
|
List<Document> get_List();
|
||||||
|
@Select("select * from "+DOCUMENTTABLE+" where title like CONCAT('%',#{content},'%')")
|
||||||
|
List<Document> get_LikeList(String content);
|
||||||
|
|
||||||
|
|
||||||
|
@SelectProvider(type=DocumentDynaSqlProvider.class,method="insert")
|
||||||
|
void insert_Info(Document dept);
|
||||||
|
|
||||||
|
@Select("select * from "+DOCUMENTTABLE+" where id = #{id}")
|
||||||
|
Document get_Info(Integer id);
|
||||||
|
|
||||||
|
@SelectProvider(type=DocumentDynaSqlProvider.class,method="update")
|
||||||
|
void update_Info(Document dept);
|
||||||
|
// 根据id删除部门
|
||||||
|
@Delete(" delete from "+DOCUMENTTABLE+" where id = #{id} ")
|
||||||
|
void delete_Info(Integer id);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,41 @@
|
|||||||
|
package com.rain.dao;
|
||||||
|
|
||||||
|
import static com.rain.util.common.Constants.EMPLOYEETABLE;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Delete;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
import org.apache.ibatis.annotations.SelectProvider;
|
||||||
|
|
||||||
|
import com.rain.dao.provider.EmployeeDynaSqlProvider;
|
||||||
|
import com.rain.domain.Employee;
|
||||||
|
|
||||||
|
public interface EmployeeDao {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//查询
|
||||||
|
@Select("select * from "+EMPLOYEETABLE+" ")
|
||||||
|
List<Employee> get_List();
|
||||||
|
@Select("select * from "+EMPLOYEETABLE+" where name like CONCAT('%',#{content},'%')")
|
||||||
|
List<Employee> get_LikeList(String content);
|
||||||
|
|
||||||
|
|
||||||
|
@SelectProvider(type=EmployeeDynaSqlProvider.class,method="insert_Employee")
|
||||||
|
void insert_Info(Employee employee);
|
||||||
|
|
||||||
|
@Select("select * from "+EMPLOYEETABLE+" where id = #{id}")
|
||||||
|
Employee get_Info(Integer id);
|
||||||
|
|
||||||
|
@SelectProvider(type=EmployeeDynaSqlProvider.class,method="update_Employee")
|
||||||
|
void update_Info(Employee employee);
|
||||||
|
// 根据id删除部门
|
||||||
|
@Delete(" delete from "+EMPLOYEETABLE+" where id = #{id} ")
|
||||||
|
void delete_Info(Integer id);
|
||||||
|
|
||||||
|
@Select("select * from "+EMPLOYEETABLE+" where name=#{name} and password=#{password}")
|
||||||
|
Employee get_ByInfo(@Param("name") String name, @Param("password") String password);
|
||||||
|
}
|
@ -0,0 +1,34 @@
|
|||||||
|
package com.rain.dao;
|
||||||
|
|
||||||
|
import static com.rain.util.common.Constants.JOBTABLE;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Delete;
|
||||||
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
import org.apache.ibatis.annotations.SelectProvider;
|
||||||
|
|
||||||
|
import com.rain.dao.provider.JobDynaSqlProvider;
|
||||||
|
import com.rain.domain.Dept;
|
||||||
|
import com.rain.domain.Job;
|
||||||
|
|
||||||
|
public interface JobDao {
|
||||||
|
//查询
|
||||||
|
@Select("select * from "+JOBTABLE+" ")
|
||||||
|
List<Job> get_List();
|
||||||
|
@Select("select * from "+JOBTABLE+" where name like CONCAT('%',#{content},'%')")
|
||||||
|
List<Job> get_LikeList(String content);
|
||||||
|
|
||||||
|
|
||||||
|
@SelectProvider(type=JobDynaSqlProvider.class,method="insertDept")
|
||||||
|
void insert_Info(Job job);
|
||||||
|
|
||||||
|
@Select("select * from "+JOBTABLE+" where id = #{id}")
|
||||||
|
Job get_Info(Integer id);
|
||||||
|
|
||||||
|
@SelectProvider(type=JobDynaSqlProvider.class,method="updateDept")
|
||||||
|
void update_Info(Job job);
|
||||||
|
// 根据id删除部门
|
||||||
|
@Delete(" delete from "+JOBTABLE+" where id = #{id} ")
|
||||||
|
void delete_Info(Integer id);
|
||||||
|
}
|
@ -0,0 +1,33 @@
|
|||||||
|
package com.rain.dao;
|
||||||
|
|
||||||
|
import static com.rain.util.common.Constants.NOTICETABLE;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Delete;
|
||||||
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
import org.apache.ibatis.annotations.SelectProvider;
|
||||||
|
|
||||||
|
import com.rain.dao.provider.NoticeDynaSqlProvider;
|
||||||
|
import com.rain.domain.Notice;
|
||||||
|
|
||||||
|
public interface NoticeDao {
|
||||||
|
|
||||||
|
@Select("select * from "+NOTICETABLE+" ")
|
||||||
|
List<Notice> get_List();
|
||||||
|
@Select("select * from "+NOTICETABLE+" where title like CONCAT('%',#{content},'%')")
|
||||||
|
List<Notice> get_LikeList(String content);
|
||||||
|
|
||||||
|
@SelectProvider(type=NoticeDynaSqlProvider.class,method="insert_Notice")
|
||||||
|
void insert_Info(Notice employee);
|
||||||
|
|
||||||
|
@Select("select * from "+NOTICETABLE+" where id = #{id}")
|
||||||
|
Notice get_Info(Integer id);
|
||||||
|
|
||||||
|
@SelectProvider(type=NoticeDynaSqlProvider.class,method="update_Notice")
|
||||||
|
void update_Info(Notice employee);
|
||||||
|
// 根据id删除部门
|
||||||
|
@Delete(" delete from "+NOTICETABLE+" where id = #{id} ")
|
||||||
|
void delete_Info(Integer id);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,38 @@
|
|||||||
|
package com.rain.dao;
|
||||||
|
|
||||||
|
import static com.rain.util.common.Constants.USERTABLE;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Delete;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
import org.apache.ibatis.annotations.SelectProvider;
|
||||||
|
|
||||||
|
import com.rain.dao.provider.UserDynaSqlProvider;
|
||||||
|
import com.rain.domain.User;
|
||||||
|
|
||||||
|
public interface UserDao {
|
||||||
|
|
||||||
|
@Select("select * from "+USERTABLE+" ")
|
||||||
|
List<User> get_List();
|
||||||
|
@Select("select * from "+USERTABLE+" where loginname like CONCAT('%',#{content},'%')")
|
||||||
|
List<User> get_LikeList(String content);
|
||||||
|
|
||||||
|
@Select("select * from "+USERTABLE+" where loginname = #{loginname} AND password = #{password}")
|
||||||
|
User get_login(@Param("loginname") String loginname,
|
||||||
|
@Param("password") String password);
|
||||||
|
|
||||||
|
@SelectProvider(type=UserDynaSqlProvider.class,method="insert_Notice")
|
||||||
|
void insert_Info(User employee);
|
||||||
|
|
||||||
|
@Select("select * from "+USERTABLE+" where id = #{id}")
|
||||||
|
User get_Info(Integer id);
|
||||||
|
|
||||||
|
@SelectProvider(type=UserDynaSqlProvider.class,method="update_Notice")
|
||||||
|
void update_Info(User employee);
|
||||||
|
// 根据id删除部门
|
||||||
|
@Delete(" delete from "+USERTABLE+" where id = #{id} ")
|
||||||
|
void delete_Info(Integer id);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,8 @@
|
|||||||
|
dataSource.driverClass=com.mysql.cj.jdbc.Driver
|
||||||
|
dataSource.jdbcUrl=jdbc:mysql://localhost:3306/personnel?useSSL=false&serverTimezone=UTC
|
||||||
|
dataSource.user=root
|
||||||
|
dataSource.password=12345.com
|
||||||
|
dataSource.maxPoolSize=20
|
||||||
|
dataSource.maxIdleTime = 1000
|
||||||
|
dataSource.minPoolSize=6
|
||||||
|
dataSource.initialPoolSize=5
|
Loading…
Reference in new issue