feat: 迁移国内标准法规部分2 创建国内标准法规

This commit is contained in:
super_liu
2021-06-03 13:39:40 +08:00
parent 4cc558befc
commit 4caa481d31
36 changed files with 2181 additions and 31 deletions
@@ -0,0 +1,71 @@
<?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.adc.da.slrs.sarStandMenu.dao.SarStandMenuDao">
<!-- Result Map-->
<resultMap id="BaseResultMap" type="com.adc.da.slrs.sarStandMenu.entity.SarStandMenu" >
<id column="id" property="id" />
<result column="valid_flag" property="validFlag" />
<result column="menu_id" property="menuId" />
<result column="stand_id" property="standId" />
</resultMap>
<!-- SAR_STAND_MENU table all fields -->
<sql id="Base_Column_List" >
valid_flag, menu_id, stand_id, id
</sql>
<!-- 查询条件 -->
<sql id="Base_Where_Clause">
where 1=1
<trim suffixOverrides="," >
<if test="validFlag != null" >
and valid_flag = #{validFlag}
</if>
<if test="menuId != null" >
and menu_id = #{menuId}
</if>
<if test="standId != null" >
and stand_id = #{standId}
</if>
<if test="id != null" >
and id = #{id}
</if>
</trim>
</sql>
<delete id="deleteByStandId" parameterType="java.lang.String">
delete from SAR_STAND_MENU
where stand_id = #{value}
</delete>
<select id="selectMenuByMenuParentId" resultMap="BaseResultMap" parameterType="com.adc.da.slrs.sarStandMenu.entity.SarStandMenu">
select <include refid="Base_Column_List"/> from SAR_STAND_MENU
where stand_id = #{standId} and valid_flag=0
and MENU_ID in
<foreach collection="menuIds" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</select>
<update id="updateByStandIdAndMenuId" parameterType="com.adc.da.slrs.sarStandMenu.entity.SarStandMenu" >
update SAR_STAND_MENU
<set >
<if test="menuId != null" >
menu_id = #{menuId},
</if>
</set>
where stand_id = #{standId}
and MENU_ID in
<foreach collection="menuIds" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</update>
<delete id="deleteByStandIdAndMenuId" parameterType="com.adc.da.slrs.sarStandMenu.entity.SarStandMenu">
delete from SAR_STAND_MENU
where stand_id = #{standId, jdbcType=VARCHAR} and MENU_ID = #{menuId, jdbcType=VARCHAR}
</delete>
</mapper>