You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
925 B
24 lines
925 B
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
<mapper namespace="com.gaotao.modules.factory.dao.SpecialSecurityMapper">
|
|
<insert id="saveUserSpecialSecurity">
|
|
|
|
INSERT INTO SpecialSecurity(UserID, ItemNo, ItemValue)
|
|
select #{userid}, sl.ItemNo, sl.ItemValue
|
|
from SpecialSecurityList sl
|
|
left join SpecialSecurity s ON s.ItemNo = sl.ItemNo and s.UserID = #{userid}
|
|
WHERE s.ItemNo is null
|
|
</insert>
|
|
|
|
|
|
<select id="getUserSpecialSecurity"
|
|
resultType="com.gaotao.modules.factory.entity.vo.UserSpecialSecurityVo">
|
|
select s.UserID, s.ItemValue, sl.ItemNo, sl.SecurityDesc, sl.[Module]
|
|
from SpecialSecurity s
|
|
left join SpecialSecurityList sl
|
|
ON s.ItemNo = sl.ItemNo
|
|
WHERE s.UserID = #{userid}
|
|
|
|
</select>
|
|
</mapper>
|