文件上传的XML文件

<?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.bootdo.nsmp.dao.MaterialDao">

	<select id="list" resultType="com.bootdo.nsmp.domain.Material">
		select * from material
		<if test="offset != null and limit != null">
			limit ${offset}, ${limit}
		</if>
	</select>

	<select id="count" resultType="int">
		select count(*) from material
	</select>

	<insert id="save" parameterType="com.bootdo.nsmp.domain.Material"
			useGeneratedKeys="true" keyProperty="id">
		insert into material
		(
		`structure`,
		`stru_file`,
		`stru_file_url`,
		`safe`,
		`safe_file`,
		`safe_file_url`,
		`protect`,
		`pro_file`,
		`pro_file_url`,
		`list`,
		`list_file`,
		`list_file_url`,
		`clazz`,
		`clazz_file`,
		`clazz_file_url`,
		`judge`,
		`judge_file`,
		`judge_file_url`,
		`gover`,
		`gover_file`,
		`gover_file_url`
		)
		values
		(
		#{structure},
		#{struFile},
		#{struFileUrl},
		#{safe},
		#{safeFile},
		#{safeFileUrl},
		#{protect},
		#{proFile},
		#{proFileUrl},
		#{list},
		#{listFile},
		#{listFileUrl},
		#{clazz},
		#{clazzFile},
		#{clazzFileUrl},
		#{judge},
		#{judgeFile},
		#{judgeFileUrl},
		#{gover},
		#{goverFile},
		#{goverFileUrl}

		)
	</insert>

	<!--get-->
	<select id="get" resultType="com.bootdo.nsmp.domain.Material">
		select
		`id`,
		`structure`,
		`stru_file`,
		`stru_file_url`,
		`safe`,
		`safe_file`,
		`safe_file_url`,
		`protect`,
		`pro_file`,
		`pro_file_url`,
		`list`,
		`list_file`,
		`list_file_url`,
		`clazz`,
		`clazz_file`,
		`clazz_file_url`,
		`judge`,
		`judge_file`,
		`judge_file_url`,
		`gover`,
		`gover_file`,
		`gover_file_url`
		from material where id = #{value}
	</select>

	<!--update-->
	<update id="update" parameterType="com.bootdo.nsmp.domain.Material">
		update material
		<set>
			`structure` = #{structure},
			`stru_file` = #{struFile},
			`stru_file_url` = #{struFileUrl},
			`safe` = #{safe},
			`safe_file` = #{safeFile},
			`safe_file_url` = #{safeFileUrl},
			`protect` = #{protect},
			`pro_file` = #{proFile},
			`pro_file_url` = #{proFileUrl},
			`list` = #{list},
			`list_file` = #{listFile},
			`list_file_url` = #{listFileUrl},
			`clazz` = #{clazz},
			`clazz_file` = #{clazzFile},
			`clazz_file_url` = #{clazzFileUrl},
			`judge` = #{judge},
			`judge_file` = #{judgeFile},
			`judge_file_url` = #{judgeFileUrl},
			`gover` = #{gover},
			`gover_file` = #{goverFile},
			`gover_file_url` = #{goverFileUrl}
		</set>
		where id = #{id}
	</update>

	<!--remove-->
	<delete id="remove">
		delete from material where id = #{value}
	</delete>

	<!--batchRemove-->
	<delete id="batchRemove">
		delete from material where id in
		<foreach item="id" collection="array" open="(" separator=","
				 close=")">
			#{id}
		</foreach>
	</delete>

</mapper>

 

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值