From 3e40752b131d2df9ceeb2324576f97dcd93a25bc Mon Sep 17 00:00:00 2001 From: Wklizx Date: Thu, 25 Aug 2022 09:11:14 +0800 Subject: [PATCH] 8.25 --- .../irs/controller/ResumeController.java | 9 +++++++++ .../sixteam/irs/controller/RoleController.java | 2 -- .../com/sixteam/irs/mapper/ResumeMapper.java | 7 +++++++ .../irs/service/Impl/ResumeServiceImpl.java | 17 +++++++++++++++++ .../com/sixteam/irs/service/ResumeService.java | 4 ++++ .../com/sixteam/irs/mapper/ResumeMapper.xml | 11 +++++++++++ 6 files changed, 48 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/sixteam/irs/controller/ResumeController.java b/src/main/java/com/sixteam/irs/controller/ResumeController.java index fc04cb5..4dae326 100644 --- a/src/main/java/com/sixteam/irs/controller/ResumeController.java +++ b/src/main/java/com/sixteam/irs/controller/ResumeController.java @@ -21,6 +21,15 @@ public class ResumeController { @Autowired private ResumeServiceImpl resumeService; + @RequestMapping("/findPostByUidAndSid") + public int findPostByUidAndSid(String uId,String sId){ + return resumeService.findPostByUidAndSid(uId,sId); + } + + @RequestMapping("/PostResumeToStation") + public int PostResumeToStation(String uId,String reId,String sId){ + return resumeService.PostResumeToStation(uId,reId,sId); + } @RequestMapping("/findAllResume") public List findAllResume(){ diff --git a/src/main/java/com/sixteam/irs/controller/RoleController.java b/src/main/java/com/sixteam/irs/controller/RoleController.java index acb47cc..6bff817 100644 --- a/src/main/java/com/sixteam/irs/controller/RoleController.java +++ b/src/main/java/com/sixteam/irs/controller/RoleController.java @@ -18,8 +18,6 @@ import java.util.List; @RequestMapping("/role") @RestController @CrossOrigin -@RequestMapping("/") -@RestController public class RoleController { @Autowired private RoleService roleService; diff --git a/src/main/java/com/sixteam/irs/mapper/ResumeMapper.java b/src/main/java/com/sixteam/irs/mapper/ResumeMapper.java index 686d419..b744b04 100644 --- a/src/main/java/com/sixteam/irs/mapper/ResumeMapper.java +++ b/src/main/java/com/sixteam/irs/mapper/ResumeMapper.java @@ -2,6 +2,7 @@ package com.sixteam.irs.mapper; import com.sixteam.irs.entity.Resume; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Repository; import java.util.List; @@ -18,4 +19,10 @@ public interface ResumeMapper { int delResume(String reId); int updateResume(Resume resume); + + int findPostByUidAndSid(@Param("uId")String uId, @Param("sId")String sId); + + int addSR(@Param("srId")String srId, @Param("sId")String sId, @Param("reId")String reId, @Param("time")String time); + + int addUS(@Param("usId")String usId, @Param("time")String time, @Param("sId")String sId, @Param("uId")String uId); } diff --git a/src/main/java/com/sixteam/irs/service/Impl/ResumeServiceImpl.java b/src/main/java/com/sixteam/irs/service/Impl/ResumeServiceImpl.java index d097781..97c361d 100644 --- a/src/main/java/com/sixteam/irs/service/Impl/ResumeServiceImpl.java +++ b/src/main/java/com/sixteam/irs/service/Impl/ResumeServiceImpl.java @@ -7,6 +7,7 @@ import com.sixteam.irs.utils.UuidUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.Date; import java.util.List; @Service @@ -60,4 +61,20 @@ public class ResumeServiceImpl implements ResumeService { return "fail"; } } + + @Override + public int findPostByUidAndSid(String uId, String sId) { + int i=mapper.findPostByUidAndSid(uId,sId); + return i; + } + + @Override + public int PostResumeToStation(String uId, String reId, String sId) { + int i=0; + Date date=new Date(); + String s=date.toString(); + i+=mapper.addSR(UuidUtils.uuid(),sId,reId,s); + i+=mapper.addUS(UuidUtils.uuid(),s,sId,uId); + return i; + } } diff --git a/src/main/java/com/sixteam/irs/service/ResumeService.java b/src/main/java/com/sixteam/irs/service/ResumeService.java index db24926..bc783dc 100644 --- a/src/main/java/com/sixteam/irs/service/ResumeService.java +++ b/src/main/java/com/sixteam/irs/service/ResumeService.java @@ -15,4 +15,8 @@ public interface ResumeService { String delResume(String reId); String updateResume(Resume resume); + + int findPostByUidAndSid(String uId, String sId); + + int PostResumeToStation(String uId, String reId, String sId); } diff --git a/src/main/resources/com/sixteam/irs/mapper/ResumeMapper.xml b/src/main/resources/com/sixteam/irs/mapper/ResumeMapper.xml index 56b90a2..02aba25 100644 --- a/src/main/resources/com/sixteam/irs/mapper/ResumeMapper.xml +++ b/src/main/resources/com/sixteam/irs/mapper/ResumeMapper.xml @@ -19,6 +19,12 @@ insert into irs_resume values (#{reId},#{uId},#{reSkill},#{reHonor},#{reCampusPractice},#{reSelfEvaluation},#{reJobIntention},#{reSchool},#{reClass},#{reGraduationYear}) + + insert into irs_station_resume values (#{srId},#{sId},#{reId},'未读',#{time}) + + + insert into irs_user_station values (#{usId},#{time},#{sId},#{uId}) + delete from irs_resume where re_id=#{reId} @@ -45,4 +51,9 @@ select re.* from irs_resume as re where re.u_id = #{uid} + -- Gitee