diff --git a/IAdminMapper.java b/IAdminMapper.java new file mode 100644 index 0000000..87fa05a --- /dev/null +++ b/IAdminMapper.java @@ -0,0 +1,135 @@ +package com.cya.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.type.IntegerTypeHandler; + +import com.cya.entity.Admin; +import com.cya.entity.DormBuild; +import com.cya.entity.DormManage; +import com.cya.entity.Notice; +import com.cya.entity.PunchClock; +import com.cya.entity.PunchClockRecord; +import com.cya.entity.Record; +import com.cya.entity.Student; +import com.sun.org.glassfish.gmbal.ParameterNames; + +public interface IAdminMapper { + + /*-------------------------宿管---------------------------*/ + + public ListgetDormManage(@Param("filter")String filter,@Param("key")String key); + + public void addDormManage(DormManage dormManage); + + public DormManage getDormMangerById(@Param("dormManId") int dormManId); + + public void updataDormManageById(DormManage dormManage); + + public void deleteDormManageById(@Param("dormManId") Integer dormManId); + + /*-------------------------宿管---------------------------*/ + + /*-------------------------学生---------------------------*/ + + public ListgetStudentManage(@Param("filter")String filter,@Param("key")String key); + + public void addStudentManage(Student student); + + public Student getStudentMangerById(@Param("studentId") int studentId); + + public void updataStudentManageById(Student student); + + public void studentManagerDeleteById(@Param("studentId") int studentId); + + /*-------------------------学生---------------------------*/ + + + + /*-------------------------宿舍楼---------------------------*/ + + public ListgetBuildManage(@Param("filter")String filter,@Param("key")String key); + + public void addBuildManage(DormBuild dormBuild); + + public DormBuild getBuildMangerById(@Param("dormBuildId") int dormBuildId); + + public void updataBuildManageById(DormBuild dormBuild); + + public void buildManagerDeleteById(@Param("dormBuildId") Integer dormBuildId); + + public List getDormMangerByBuildId(@Param("dormBuildId") Integer dormBuildId); + + public List getDormManage2(); + + public void addDormManageToBuild(@Param("dormBuildId")Integer dormBuildId,@Param("dormManId")Integer dormManId); + + public void removeaDormManageToBuild(@Param("dormManId")Integer dormManId); + + /*-------------------------宿舍楼---------------------------*/ + + + /*-------------------------考勤---------------------------*/ + + public ListgetRecordManage(@Param("filter")String filter,@Param("key")String key); + + + public void recordManagerDeleteById(@Param("recordId")Integer recordId); + /*-------------------------考勤---------------------------*/ + + + /*-------------------------公告---------------------------*/ + + public ListgetNoticeManage(@Param("filter")String filter,@Param("key")String key); + + public void addNoticeManage(Notice notice); + + public Notice getNoticeMangerById(@Param("noticeId") Integer noticeId); + + public void updataNoticeManageById(Notice notice); + + public void noticeManagerDeleteById(@Param("noticeId") Integer noticeId); + + /*-------------------------公告---------------------------*/ + + /*-------------------------我的---------------------------*/ + + public Admin getMyMsgById(@Param("adminId") Integer adminId); + + public void updateMyMsgById(Admin admin); + + public void updatePsd(Admin admin); + + + + /*-------------------------我的---------------------------*/ + + + /*-------------------------打卡---------------------------*/ + + public ListgetPunchClockManage(@Param("filter")String filter,@Param("key")String key); + + public void addPunchClockManageMsg(PunchClock punchClock); + + public PunchClock getPunchClockMangerById(@Param("id") String id); + + public void updataPunchClockManageMsgById(PunchClock punchClock); + + public void punchClockManagerDeleteById(@Param("id") String id); + + public List getStudentMsg(); + + public void insertIntoPunchClockRecord(PunchClockRecord punchClockRecord); + + public void updateIntoPunchClockRecordById(PunchClock punchClock); + + public void deletePunchClockRecordById(String id); + + /*-------------------------打卡---------------------------*/ + + + + + +} diff --git a/IAdminMapper.xml b/IAdminMapper.xml new file mode 100644 index 0000000..9dbfae5 --- /dev/null +++ b/IAdminMapper.xml @@ -0,0 +1,249 @@ + + + + + + + + + + + insert into t_dormmanager(userName,password,name,sex,tel) values(#{userName},#{password},#{name},#{sex},#{tel}) + + + + + + update t_dormmanager set userName=#{userName},password=#{password},name=#{name},sex=#{sex},tel=#{tel} where dormManId=#{dormManId} + + + + + delete from t_dormmanager where dormManId=#{dormManId} + + + + + + + + + + + + insert into t_student(stuNum,password,name,dormBuildId,dormName,sex,tel) values(#{stuNum},#{password},#{name},#{dormBuildId},#{dormName},#{sex},#{tel}) + + + + + + update t_student set stuNum=#{stuNum},password=#{password},name=#{name},sex=#{sex},dormBuildId=#{dormBuildId},dormName=#{dormName},tel=#{tel} where studentId=#{studentId} + + + + + delete from t_student where studentId=#{studentId} + + + + + + + + + + + insert into t_dormbuild(dormBuildName,dormBuildDetail) values(#{dormBuildName},#{dormBuildDetail}) + + + + + + update t_dormbuild set dormBuildName=#{dormBuildName},dormBuildDetail=#{dormBuildDetail} where dormBuildId=#{dormBuildId} + + + + + delete from t_dormbuild where dormBuildId=#{dormBuildId} + + + + + + + + update t_dormmanager set dormBuildId=#{dormBuildId} where dormManId=#{dormManId} + + + + update t_dormmanager set dormBuildId=0 where dormManId=#{dormManId} + + + + + + + + + + + delete from t_record where recordId=#{recordId} + + + + + + + + + + + insert into t_notice(noticePerson,date,content) values(#{noticePerson},current_date,#{content}) + + + + + + update t_notice set noticePerson=#{noticePerson},content=#{content} where noticeId=#{noticeId} + + + + + delete from t_notice where noticeId=#{noticeId} + + + + + + + + + + update t_admin set userName=#{userName},name=#{name},tel=#{tel} where adminId=#{adminId} + + + + update t_admin set password=#{password} where adminId=#{adminId} + + + + + + + + + + + + + insert into t_punchclock(id,theme,detail,date,person) values(#{id},#{theme},#{detail},current_date,#{person}) + + + + + + + update t_punchclock set theme=#{theme},detail=#{detail} where id=#{id} + + + + + delete from t_punchclock where id=#{id} + + + + + + + insert into t_punchclockrecord + (punchClock_id,punchClock_date,punchClock_theme,punchClock_detail,punchClock_person,name,dormName,tel,stuNum,dormBuildId,isRecord,punckClock_content) +values(#{punchClockId},#{punchClockDate},#{punchClockTheme},#{punchClockDetail},#{punchClockPerson},#{name},#{dormName},#{tel},#{stuNum},#{dormBuildId},#{isRecord},#{punckClockContent}) + + + + update t_punchclockrecord set punchClock_theme=#{theme},punchClock_detail=#{detail} where punchClock_id=#{id} + + + + delete from t_punchclockrecord where punchClock_id=#{id} + + + + + diff --git a/IDormManageMapper.java b/IDormManageMapper.java new file mode 100644 index 0000000..332072d --- /dev/null +++ b/IDormManageMapper.java @@ -0,0 +1,45 @@ +package com.cya.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; + +import com.cya.entity.Admin; +import com.cya.entity.DormManage; +import com.cya.entity.Notice; +import com.cya.entity.PunchClockRecord; +import com.cya.entity.Record; +import com.cya.entity.Student; + +public interface IDormManageMapper { + + public ListgetStudentMsgByBuildId(@Param("filter")String filter,@Param("key")String key,@Param("dormBuildId") Integer dormBuildId); + + public void studentMsgDeleteById(@Param("studentId") int studentId); + + public ListgetRecordMsg(@Param("filter")String filter,@Param("key")String key,@Param("dormBuildId") Integer dormBuildId); + + public Record getRecordById(@Param("recordId") int recordId); + + public void updataRecordMsg(Record record); + + public void addRecordMsg(Record record); + + public void recordManagerDeleteById1(@Param("recordId") Integer recordId); + + + public DormManage dorm_getMyMsgById(@Param("dormManId") Integer dormManId); + + public void dorm_updateMyMsgById(DormManage dormManage); + + public void dorm_updatePsd(DormManage dormManage); + + + public List getNoticeAll(); + + + public ListgetPunchClockRecordMsgByDormBuildId(@Param("filter")String filter,@Param("key")String key,@Param("dormBuildId") Integer dormBuildId); + + + +} diff --git a/IDormManageMapper.xml b/IDormManageMapper.xml new file mode 100644 index 0000000..028b4db --- /dev/null +++ b/IDormManageMapper.xml @@ -0,0 +1,103 @@ + + + + + + + + + delete from t_student where studentId=#{studentId} + + + + + + + + + + update t_record set detail=#{detail} where recordId=#{recordId} + + + + insert into t_record(studentNumber,studentName,dormBuildId,dormName,date,detail) values(#{studentNumber},#{studentName},#{dormBuildId},#{dormName},current_date,#{detail}) + + + + delete from t_record where recordId=#{recordId} + + + + + + + + update t_dormmanager set userName=#{userName},name=#{name},tel=#{tel} where dormManId=#{dormManId} + + + + update t_dormmanager set password=#{password} where dormManId=#{dormManId} + + + + + + + + + + + + + \ No newline at end of file diff --git a/ILoginMapper.java b/ILoginMapper.java new file mode 100644 index 0000000..4f461b0 --- /dev/null +++ b/ILoginMapper.java @@ -0,0 +1,17 @@ +package com.cya.mapper; + +import java.util.List; + +import com.cya.entity.Admin; +import com.cya.entity.DormManage; +import com.cya.entity.Login; +import com.cya.entity.Student; + +public interface ILoginMapper { + + public List loginToAdmin(Login login); + + public List loginToDormManage(Login login); + + public List loginToStudent(Login login); +} diff --git a/ILoginMapper.xml b/ILoginMapper.xml new file mode 100644 index 0000000..b039880 --- /dev/null +++ b/ILoginMapper.xml @@ -0,0 +1,16 @@ + + + + + + + + + + \ No newline at end of file diff --git a/IStudentMapper.java b/IStudentMapper.java new file mode 100644 index 0000000..dea77bb --- /dev/null +++ b/IStudentMapper.java @@ -0,0 +1,28 @@ +package com.cya.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; + +import com.cya.entity.PunchClockRecord; +import com.cya.entity.Record; +import com.cya.entity.Student; + + +public interface IStudentMapper { + + public ListgetRecordMsgByStuNum(@Param("filter") String filter,@Param("key")String key,@Param("studentNumber") String studentNumber); + + public Student student_getMyMsgById(@Param("studentId") Integer studentId); + + public void student_updateMyMsgById(Student student); + + public void student_updatePsd(Student student); + + public ListgetPunchClockRecordMsgByStuNum(@Param("filter") String filter,@Param("key")String key,@Param("studentNumber") String studentNumber); + + public PunchClockRecord getPunckColcokRecordById(@Param("id")Integer id); + + public void updataPunchClockRecordMsg(PunchClockRecord punchClockRecord); + +} diff --git a/IStudentMapper.xml b/IStudentMapper.xml new file mode 100644 index 0000000..fb42802 --- /dev/null +++ b/IStudentMapper.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + update t_student set name=#{name},tel=#{tel} where studentId=#{studentId} + + + + update t_student set password=#{password} where studentId=#{studentId} + + + + + + + + + + + + update t_punchclockrecord set isRecord=true,punckClock_content=#{punckClockContent} where id=#{id} + + + + \ No newline at end of file