|
@@ -3,7 +3,7 @@
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.fs.his.mapper.FsMaterialMapper">
|
|
<mapper namespace="com.fs.his.mapper.FsMaterialMapper">
|
|
-
|
|
|
|
|
|
+
|
|
<resultMap type="FsMaterial" id="FsMaterialResult">
|
|
<resultMap type="FsMaterial" id="FsMaterialResult">
|
|
<result property="materialId" column="material_id" />
|
|
<result property="materialId" column="material_id" />
|
|
<result property="type" column="type" />
|
|
<result property="type" column="type" />
|
|
@@ -23,7 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
<select id="selectFsMaterialList" parameterType="FsMaterial" resultMap="FsMaterialResult">
|
|
<select id="selectFsMaterialList" parameterType="FsMaterial" resultMap="FsMaterialResult">
|
|
<include refid="selectFsMaterialVo"/>
|
|
<include refid="selectFsMaterialVo"/>
|
|
- <where>
|
|
|
|
|
|
+ <where>
|
|
<if test="type != null and type != ''"> and type = #{type}</if>
|
|
<if test="type != null and type != ''"> and type = #{type}</if>
|
|
<if test="groupId != null "> and group_id = #{groupId}</if>
|
|
<if test="groupId != null "> and group_id = #{groupId}</if>
|
|
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
|
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
|
@@ -32,13 +32,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="createUserId != null "> and create_user_id = #{createUserId}</if>
|
|
<if test="createUserId != null "> and create_user_id = #{createUserId}</if>
|
|
<if test="storeId != null "> and store_id = #{storeId}</if>
|
|
<if test="storeId != null "> and store_id = #{storeId}</if>
|
|
</where>
|
|
</where>
|
|
|
|
+ order by create_time desc
|
|
</select>
|
|
</select>
|
|
-
|
|
|
|
|
|
+
|
|
<select id="selectFsMaterialByMaterialId" parameterType="Long" resultMap="FsMaterialResult">
|
|
<select id="selectFsMaterialByMaterialId" parameterType="Long" resultMap="FsMaterialResult">
|
|
<include refid="selectFsMaterialVo"/>
|
|
<include refid="selectFsMaterialVo"/>
|
|
where material_id = #{materialId}
|
|
where material_id = #{materialId}
|
|
</select>
|
|
</select>
|
|
-
|
|
|
|
|
|
+
|
|
<insert id="insertFsMaterial" parameterType="FsMaterial" useGeneratedKeys="true" keyProperty="materialId">
|
|
<insert id="insertFsMaterial" parameterType="FsMaterial" useGeneratedKeys="true" keyProperty="materialId">
|
|
insert into fs_material
|
|
insert into fs_material
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
@@ -86,9 +87,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
</delete>
|
|
</delete>
|
|
|
|
|
|
<delete id="deleteFsMaterialByMaterialIds" parameterType="String">
|
|
<delete id="deleteFsMaterialByMaterialIds" parameterType="String">
|
|
- delete from fs_material where material_id in
|
|
|
|
|
|
+ delete from fs_material where material_id in
|
|
<foreach item="materialId" collection="array" open="(" separator="," close=")">
|
|
<foreach item="materialId" collection="array" open="(" separator="," close=")">
|
|
#{materialId}
|
|
#{materialId}
|
|
</foreach>
|
|
</foreach>
|
|
</delete>
|
|
</delete>
|
|
-</mapper>
|
|
|
|
|
|
+</mapper>
|