diff --git a/src/main/java/com/sixteam/irs/controller/EnterpriseController.java b/src/main/java/com/sixteam/irs/controller/EnterpriseController.java index 8f6cb733ef99be099a1f0004bd7b901d3df0be61..4f1674dc54e9e019350ce54328d6fe82ba6a97b2 100644 --- a/src/main/java/com/sixteam/irs/controller/EnterpriseController.java +++ b/src/main/java/com/sixteam/irs/controller/EnterpriseController.java @@ -1,8 +1,10 @@ package com.sixteam.irs.controller; import com.sixteam.irs.entity.Enterprise; +import com.sixteam.irs.entity.User; import com.sixteam.irs.service.EnterpriseService; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.*; @@ -30,6 +32,15 @@ public class EnterpriseController { return enterprise; } + + @ResponseBody + @RequestMapping("/findEnterpriseByName") + public List findEnterpriseByName(Enterprise enterprise) { + List findEnterpriseByName = enterpriseService.findEnterpriseByName(enterprise); + + return findEnterpriseByName; + } + @RequestMapping("/toAddEnterprise") public String toAddEnterprise(){ diff --git a/src/main/java/com/sixteam/irs/controller/UserEnterpriseController.java b/src/main/java/com/sixteam/irs/controller/UserEnterpriseController.java new file mode 100644 index 0000000000000000000000000000000000000000..39e93b504e096358ac10ffa12dcf8cfead55e80f --- /dev/null +++ b/src/main/java/com/sixteam/irs/controller/UserEnterpriseController.java @@ -0,0 +1,53 @@ +package com.sixteam.irs.controller; + +import com.sixteam.irs.entity.UserEnterprise; +import com.sixteam.irs.entity.UserStation; +import com.sixteam.irs.service.UserEnterpriseService; +import com.sixteam.irs.service.UserStationService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.CrossOrigin; +import org.springframework.web.bind.annotation.RequestMapping; + +import javax.servlet.http.HttpServletRequest; +import java.util.List; + +@Controller +@CrossOrigin +@RequestMapping("/userEnterprise") +public class UserEnterpriseController { + @Autowired + private UserEnterpriseService userEnterpriseService; + + @RequestMapping("/findAllUserEnterprise") + public List findAllUserEnterprise(){ + + List userEnterpriseList = userEnterpriseService.findAllUserEnterprise(); + + return userEnterpriseList; + } + + + @RequestMapping("/addUserEnterprise") + public String addUserEnterprise(HttpServletRequest request, UserEnterprise userEnterprise){ + int res=userEnterpriseService.addUserEnterprise(userEnterprise); + if (res>0) { + System.out.println("添加成功"); + return "redirect:/userEnterprise/findAllUserEnterprise"; + }else { + System.out.println("添加失败"); + request.setAttribute("errorMessage", "添加错误"); + return "/test/错误页面"; + } + } + + @RequestMapping("/delUserStation") + public void delUserEnterprise(UserEnterprise userEnterprise) { + if (userEnterpriseService.delUserEnterprise(userEnterprise)>0) { + System.out.println("删除成功"); + + } else { + System.out.println("删除失败"); + } + } +} diff --git a/src/main/java/com/sixteam/irs/controller/UserRoleController.java b/src/main/java/com/sixteam/irs/controller/UserRoleController.java new file mode 100644 index 0000000000000000000000000000000000000000..b4345f18bda1ffcadd03c76a3c1538de9fde9c0d --- /dev/null +++ b/src/main/java/com/sixteam/irs/controller/UserRoleController.java @@ -0,0 +1,84 @@ +package com.sixteam.irs.controller; + + +import com.sixteam.irs.entity.Role; +import com.sixteam.irs.entity.Station; +import com.sixteam.irs.entity.UserRole; +import com.sixteam.irs.service.UserRoleService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.CrossOrigin; +import org.springframework.web.bind.annotation.RequestMapping; + +import javax.servlet.http.HttpServletRequest; +import java.util.List; + +@Controller +@CrossOrigin +@RequestMapping("/userRole") +public class UserRoleController { + + @Autowired + private UserRoleService userRoleService; + + @RequestMapping("/findAllUserRole") + public List findAllUserRole(){ + + List userRoleList = userRoleService.findAllUserRole(); + + return userRoleList; + } + + @RequestMapping("/findAllUserByRole") + public List findAllUserByRole(Role role){ + + List userRoleList = userRoleService.findAllUserByRole(role); + + return userRoleList; + } + + @RequestMapping("/addUserRole") + public String addUserRole( HttpServletRequest request, UserRole userRole){ + int res=userRoleService.addUserRole(userRole); + if (res>0) { + System.out.println("添加成功"); + return "redirect:/userRole/findAllUserRole"; + }else { + System.out.println("添加失败"); + request.setAttribute("errorMessage", "添加错误"); + return "/test/错误页面"; + } + } + + @RequestMapping("/delUserRole") + public void delUserRole(UserRole userRole) { + if (userRoleService.delUserRole(userRole)>0) { + System.out.println("删除成功"); + + } else { + System.out.println("删除失败"); + } + } + + + @RequestMapping("/toUpdateUserRole") + public String toUpdateUserRole(Model model, UserRole userRole) { + UserRole userRole1 = userRoleService.findById(userRole); + model.addAttribute("userRole1", userRole1); + + return "/test/userRole/修改"; + } + //修改岗位 + @RequestMapping(value = "/updateUserRole") + public String updateUserRole(UserRole userRole, Model model) { + if (userRoleService.updateUserRole(userRole)>0) { + + return "redirect:/userRole/findAllUserRole"; + } else { + + model.addAttribute("errorMessage", "修改错误"); + return "/test/错误页面"; + } + } +} diff --git a/src/main/java/com/sixteam/irs/controller/UserStationController.java b/src/main/java/com/sixteam/irs/controller/UserStationController.java new file mode 100644 index 0000000000000000000000000000000000000000..3abd8c99bf21c95391aa54899e9ab97ee5b72655 --- /dev/null +++ b/src/main/java/com/sixteam/irs/controller/UserStationController.java @@ -0,0 +1,56 @@ +package com.sixteam.irs.controller; + +import com.sixteam.irs.entity.Role; +import com.sixteam.irs.entity.UserRole; +import com.sixteam.irs.entity.UserStation; +import com.sixteam.irs.service.UserStationService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.CrossOrigin; +import org.springframework.web.bind.annotation.RequestMapping; + +import javax.servlet.http.HttpServletRequest; +import java.util.List; + +@Controller +@CrossOrigin +@RequestMapping("/userStation") +public class UserStationController { + + @Autowired + private UserStationService userStationService; + + @RequestMapping("/findAllUserStation") + public List findAllUserStation(){ + + List userStationList = userStationService.findAllUserStation(); + + return userStationList; + } + + + @RequestMapping("/addUserStation") + public String addUserStation(HttpServletRequest request, UserStation userStation){ + int res=userStationService.addUserStation(userStation); + if (res>0) { + System.out.println("添加成功"); + return "redirect:/userStation/findAllUserStation"; + }else { + System.out.println("添加失败"); + request.setAttribute("errorMessage", "添加错误"); + return "/test/错误页面"; + } + } + + @RequestMapping("/delUserStation") + public void delUserStation(UserStation userStation) { + if (userStationService.delUserStation(userStation)>0) { + System.out.println("删除成功"); + + } else { + System.out.println("删除失败"); + } + } + +} diff --git a/src/main/java/com/sixteam/irs/entity/UserEnterprise.java b/src/main/java/com/sixteam/irs/entity/UserEnterprise.java new file mode 100644 index 0000000000000000000000000000000000000000..322f9a60aed8db9ac82abe937f138840635ab11c --- /dev/null +++ b/src/main/java/com/sixteam/irs/entity/UserEnterprise.java @@ -0,0 +1,74 @@ +package com.sixteam.irs.entity; + + +//评价 +public class UserEnterprise { + private String ueId; + private String ueContent; + private String ueTime; + private User user; + private Enterprise enterprise; + + public UserEnterprise() { + super(); + } + + public UserEnterprise(String ueId, String ueContent, String ueTime, User user, Enterprise enterprise) { + this.ueId = ueId; + this.ueContent = ueContent; + this.ueTime = ueTime; + this.user = user; + this.enterprise = enterprise; + } + + @Override + public String toString() { + return "UserEnterprise{" + + "ueId='" + ueId + '\'' + + ", ueContent='" + ueContent + '\'' + + ", ueTime='" + ueTime + '\'' + + ", user=" + user + + ", enterprise=" + enterprise + + '}'; + } + + public String getUeId() { + return ueId; + } + + public void setUeId(String ueId) { + this.ueId = ueId; + } + + public String getUeContent() { + return ueContent; + } + + public void setUeContent(String ueContent) { + this.ueContent = ueContent; + } + + public String getUeTime() { + return ueTime; + } + + public void setUeTime(String ueTime) { + this.ueTime = ueTime; + } + + public User getUser() { + return user; + } + + public void setUser(User user) { + this.user = user; + } + + public Enterprise getEnterprise() { + return enterprise; + } + + public void setEnterprise(Enterprise enterprise) { + this.enterprise = enterprise; + } +} diff --git a/src/main/java/com/sixteam/irs/entity/UserRole.java b/src/main/java/com/sixteam/irs/entity/UserRole.java index 2dbbbdd68fca967e0692a8013c131f8039b2b915..0978906796020ee1ea97fcd33af8cf8ee035c812 100644 --- a/src/main/java/com/sixteam/irs/entity/UserRole.java +++ b/src/main/java/com/sixteam/irs/entity/UserRole.java @@ -2,50 +2,49 @@ package com.sixteam.irs.entity; public class UserRole { private String urId;//主键 - private String uId;//用户外键 - private String rId;//角色外键 + private User user;//用户外键 + private Role role;//角色外键 - public String getUrId() { - return urId; + public UserRole() { + super(); } - public void setUrId(String urId) { + public UserRole(String urId, User user, Role role) { this.urId = urId; + this.user = user; + this.role = role; } - public String getuId() { - return uId; + @Override + public String toString() { + return "UserRole{" + + "urId='" + urId + '\'' + + ", user=" + user + + ", role=" + role + + '}'; } - - public void setuId(String uId) { - this.uId = uId; + public String getUrId() { + return urId; } - public String getrId() { - return rId; + public void setUrId(String urId) { + this.urId = urId; } - public void setrId(String rId) { - this.rId = rId; + public User getUser() { + return user; } - public UserRole(String urId, String uId, String rId) { - this.urId = urId; - this.uId = uId; - this.rId = rId; + public void setUser(User user) { + this.user = user; } - public UserRole() { - super(); + public Role getRole() { + return role; } - @Override - public String toString() { - return "UserRole{" + - "urId='" + urId + '\'' + - ", uId='" + uId + '\'' + - ", rId='" + rId + '\'' + - '}'; + public void setRole(Role role) { + this.role = role; } } diff --git a/src/main/java/com/sixteam/irs/entity/UserStation.java b/src/main/java/com/sixteam/irs/entity/UserStation.java new file mode 100644 index 0000000000000000000000000000000000000000..4bb4d9e489984abf10e121ae5fed2cbd3aa545b5 --- /dev/null +++ b/src/main/java/com/sixteam/irs/entity/UserStation.java @@ -0,0 +1,63 @@ +package com.sixteam.irs.entity; + + +//用户收藏岗位 +public class UserStation { + private String usId; + private String usTime; + private User user; + private Station station; + + public UserStation() { + super(); + } + + public UserStation(String usId, String usTime, User user, Station station) { + this.usId = usId; + this.usTime = usTime; + this.user = user; + this.station = station; + } + + @Override + public String toString() { + return "UserStation{" + + "usId='" + usId + '\'' + + ", usTime='" + usTime + '\'' + + ", user=" + user + + ", station=" + station + + '}'; + } + + public String getUsId() { + return usId; + } + + public void setUsId(String usId) { + this.usId = usId; + } + + public String getUsTime() { + return usTime; + } + + public void setUsTime(String usTime) { + this.usTime = usTime; + } + + public User getUser() { + return user; + } + + public void setUser(User user) { + this.user = user; + } + + public Station getStation() { + return station; + } + + public void setStation(Station station) { + this.station = station; + } +} diff --git a/src/main/java/com/sixteam/irs/mapper/UserEnterpriseMapper.java b/src/main/java/com/sixteam/irs/mapper/UserEnterpriseMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..6cee6b61ded44c99f95f4873d9691415d5300ed4 --- /dev/null +++ b/src/main/java/com/sixteam/irs/mapper/UserEnterpriseMapper.java @@ -0,0 +1,17 @@ +package com.sixteam.irs.mapper; + +import com.sixteam.irs.entity.User; +import com.sixteam.irs.entity.UserEnterprise; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +@Mapper +public interface UserEnterpriseMapper { + + List findAllUserEnterprise(); + + int addUserEnterprise(UserEnterprise userEnterprise); + + int delUserEnterprise(UserEnterprise userEnterprise); +} diff --git a/src/main/java/com/sixteam/irs/mapper/UserRoleMapper.java b/src/main/java/com/sixteam/irs/mapper/UserRoleMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..9a19bf7ee02ef4b22a223c910b3b951f86bb7492 --- /dev/null +++ b/src/main/java/com/sixteam/irs/mapper/UserRoleMapper.java @@ -0,0 +1,24 @@ +package com.sixteam.irs.mapper; + +import com.sixteam.irs.entity.Role; +import com.sixteam.irs.entity.User; +import com.sixteam.irs.entity.UserRole; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +@Mapper +public interface UserRoleMapper { + + List findAllUserRole(); + + List findAllUserByRole(Role role); + + int addUserRole(UserRole userRole); + + int delUserRole(UserRole userRole); + + int updateUserRole(UserRole userRole); + + UserRole findById(UserRole userRole); +} diff --git a/src/main/java/com/sixteam/irs/mapper/UserStationMapper.java b/src/main/java/com/sixteam/irs/mapper/UserStationMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..60236618f5a109f57551ccb3615970ceb45c865a --- /dev/null +++ b/src/main/java/com/sixteam/irs/mapper/UserStationMapper.java @@ -0,0 +1,18 @@ +package com.sixteam.irs.mapper; + +import com.sixteam.irs.entity.User; +import com.sixteam.irs.entity.UserStation; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +@Mapper +public interface UserStationMapper { + List findAllUserStation(); + + UserStation findById(UserStation userStation); + + int addUserStation(UserStation userStation); + + int delUserStation(UserStation userStation); +} diff --git a/src/main/java/com/sixteam/irs/service/Impl/UserEnterpriseServiceImpl.java b/src/main/java/com/sixteam/irs/service/Impl/UserEnterpriseServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..00ab14be35f69e34c2fc2ae6555821b7a1a80813 --- /dev/null +++ b/src/main/java/com/sixteam/irs/service/Impl/UserEnterpriseServiceImpl.java @@ -0,0 +1,35 @@ +package com.sixteam.irs.service.Impl; + +import com.sixteam.irs.entity.UserEnterprise; +import com.sixteam.irs.mapper.UserEnterpriseMapper; +import com.sixteam.irs.service.UserEnterpriseService; +import com.sixteam.irs.utils.Converter; +import com.sixteam.irs.utils.UuidUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class UserEnterpriseServiceImpl implements UserEnterpriseService { + + @Autowired + private UserEnterpriseMapper userEnterpriseMapper; + + @Override + public List findAllUserEnterprise() { + return userEnterpriseMapper.findAllUserEnterprise(); + } + + @Override + public int addUserEnterprise(UserEnterprise userEnterprise) { + userEnterprise.setUeId(UuidUtils.uuid()); + userEnterprise.setUeTime(String.valueOf(new Converter())); + return userEnterpriseMapper.addUserEnterprise(userEnterprise); + } + + @Override + public int delUserEnterprise(UserEnterprise userEnterprise) { + return userEnterpriseMapper.delUserEnterprise(userEnterprise); + } +} diff --git a/src/main/java/com/sixteam/irs/service/Impl/UserRoleServiceImpl.java b/src/main/java/com/sixteam/irs/service/Impl/UserRoleServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..45dd6bea0c77ed5a616b3c72bbc26724374274ea --- /dev/null +++ b/src/main/java/com/sixteam/irs/service/Impl/UserRoleServiceImpl.java @@ -0,0 +1,50 @@ +package com.sixteam.irs.service.Impl; + +import com.sixteam.irs.entity.Role; +import com.sixteam.irs.entity.UserRole; +import com.sixteam.irs.mapper.UserRoleMapper; +import com.sixteam.irs.service.UserRoleService; +import com.sixteam.irs.utils.UuidUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.UUID; + +@Service +public class UserRoleServiceImpl implements UserRoleService { + + @Autowired + private UserRoleMapper userRoleMapper; + + @Override + public List findAllUserRole() { + return userRoleMapper.findAllUserRole(); + } + + @Override + public List findAllUserByRole(Role role) { + return userRoleMapper.findAllUserByRole(role); + } + + @Override + public UserRole findById(UserRole userRole) { + return userRoleMapper.findById(userRole); + } + + @Override + public int addUserRole(UserRole userRole) { + userRole.setUrId(UuidUtils.uuid()); + return userRoleMapper.addUserRole(userRole); + } + + @Override + public int delUserRole(UserRole userRole) { + return userRoleMapper.delUserRole(userRole); + } + + @Override + public int updateUserRole(UserRole userRole) { + return userRoleMapper.updateUserRole(userRole); + } +} diff --git a/src/main/java/com/sixteam/irs/service/Impl/UserStationServiceImpl.java b/src/main/java/com/sixteam/irs/service/Impl/UserStationServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..e61172704835f339465c33fdebc41394711f8f7f --- /dev/null +++ b/src/main/java/com/sixteam/irs/service/Impl/UserStationServiceImpl.java @@ -0,0 +1,38 @@ +package com.sixteam.irs.service.Impl; + +import com.sixteam.irs.entity.UserStation; +import com.sixteam.irs.mapper.UserStationMapper; +import com.sixteam.irs.service.UserStationService; +import com.sixteam.irs.utils.UuidUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class UserStationServiceImpl implements UserStationService { + + @Autowired + private UserStationMapper userStationMapper; + + @Override + public List findAllUserStation() { + return userStationMapper.findAllUserStation(); + } + + @Override + public UserStation findById(UserStation userStation) { + return userStationMapper.findById(userStation); + } + + @Override + public int addUserStation(UserStation userStation) { + userStation.setUsId(UuidUtils.uuid()); + return userStationMapper.addUserStation(userStation); + } + + @Override + public int delUserStation(UserStation userStation) { + return userStationMapper.delUserStation(userStation); + } +} diff --git a/src/main/java/com/sixteam/irs/service/UserEnterpriseService.java b/src/main/java/com/sixteam/irs/service/UserEnterpriseService.java new file mode 100644 index 0000000000000000000000000000000000000000..15dcf60ce738bf4654d382bcd98db572982fee81 --- /dev/null +++ b/src/main/java/com/sixteam/irs/service/UserEnterpriseService.java @@ -0,0 +1,14 @@ +package com.sixteam.irs.service; + +import com.sixteam.irs.entity.UserEnterprise; + +import java.util.List; + +public interface UserEnterpriseService { + + List findAllUserEnterprise(); + + int addUserEnterprise(UserEnterprise userEnterprise); + + int delUserEnterprise(UserEnterprise userEnterprise); +} diff --git a/src/main/java/com/sixteam/irs/service/UserRoleService.java b/src/main/java/com/sixteam/irs/service/UserRoleService.java new file mode 100644 index 0000000000000000000000000000000000000000..eb60b4f1bca4ca2b6ecda29b88388893f545ec21 --- /dev/null +++ b/src/main/java/com/sixteam/irs/service/UserRoleService.java @@ -0,0 +1,21 @@ +package com.sixteam.irs.service; + +import com.sixteam.irs.entity.Role; +import com.sixteam.irs.entity.UserRole; + +import java.util.List; + +public interface UserRoleService { + + List findAllUserRole(); + + List findAllUserByRole(Role role); + + UserRole findById(UserRole userRole); + + int addUserRole(UserRole userRole); + + int delUserRole(UserRole userRole); + + int updateUserRole(UserRole userRole); +} diff --git a/src/main/java/com/sixteam/irs/service/UserStationService.java b/src/main/java/com/sixteam/irs/service/UserStationService.java new file mode 100644 index 0000000000000000000000000000000000000000..be4801df957ff21b5d970eb9dfad505638a3ac3a --- /dev/null +++ b/src/main/java/com/sixteam/irs/service/UserStationService.java @@ -0,0 +1,16 @@ +package com.sixteam.irs.service; + +import com.sixteam.irs.entity.UserStation; + +import java.util.List; + +public interface UserStationService { + + List findAllUserStation(); + + UserStation findById(UserStation userStation); + + int addUserStation(UserStation userStation); + + int delUserStation(UserStation userStation); +} diff --git a/src/main/java/com/sixteam/irs/utils/Converter.java b/src/main/java/com/sixteam/irs/utils/Converter.java new file mode 100644 index 0000000000000000000000000000000000000000..cf849f74ec26b821da5d57ff0f1d150637ebd2f8 --- /dev/null +++ b/src/main/java/com/sixteam/irs/utils/Converter.java @@ -0,0 +1,21 @@ +package com.sixteam.irs.utils; + +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; + +public class Converter implements org.springframework.core.convert.converter.Converter { + @Override + public Date convert(String s) { + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + try { + //返回上述格式的Date类型对象 + return simpleDateFormat.parse(s); + } catch (ParseException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + return null; + } +} + diff --git a/src/main/resources/com/sixteam/irs/mapper/EnterpriseMapper.xml b/src/main/resources/com/sixteam/irs/mapper/EnterpriseMapper.xml index 2407f94f3f7fa8c27862e3fa3a953688bf5ec832..61e04779ee5fbd103b215983f4576c6f9edb26c5 100644 --- a/src/main/resources/com/sixteam/irs/mapper/EnterpriseMapper.xml +++ b/src/main/resources/com/sixteam/irs/mapper/EnterpriseMapper.xml @@ -18,7 +18,7 @@ diff --git a/src/main/resources/com/sixteam/irs/mapper/UserEnterpriseMapper.xml b/src/main/resources/com/sixteam/irs/mapper/UserEnterpriseMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..e086f56ed0201daf2836e9b63884abde8193055a --- /dev/null +++ b/src/main/resources/com/sixteam/irs/mapper/UserEnterpriseMapper.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + insert into irs_user_enterprise values (#{ueId},#{ueContent},now(),#{user.uId},#{enterprise.eId}) + + + + delete from irs_user_enterprise where ue_id = #{ueId} + + \ No newline at end of file diff --git a/src/main/resources/com/sixteam/irs/mapper/UserRoleMapper.xml b/src/main/resources/com/sixteam/irs/mapper/UserRoleMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..a44ff216abc6c3ec2e961248025eb8813c09a5cd --- /dev/null +++ b/src/main/resources/com/sixteam/irs/mapper/UserRoleMapper.xml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + insert into irs_user_role values (#{urId},#{user.uId},#{role.rId}) + + + + delete form irs_user_role where ur_id = #{urId} + + + + update irs_user_role + + u_id = #{user.uId}, + r_id = #{role.r_id}, + + where ur_id = #{urId} + + + + \ No newline at end of file diff --git a/src/main/resources/com/sixteam/irs/mapper/UserStationMapper.xml b/src/main/resources/com/sixteam/irs/mapper/UserStationMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..89216c6db099e73e63531607fe3abbd815dbdbc0 --- /dev/null +++ b/src/main/resources/com/sixteam/irs/mapper/UserStationMapper.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + insert into irs_user_station values (#{usId},now(),#{user.uId},#{station.sId}); + + + + + delete from irs_user_station where us_id = #{usId} + + \ No newline at end of file