src/main/resources/mappers/DatabaseMapper.xml

(开头部分) 1KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<?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.finance.dao.DatabaseDao">
	<resultMap type="Database" id="DatabaseResult">
		<result property="id" column="id"/>
		<result property="userid" column="userid"/>
		<result property="time" column="time"/>
		<result property="location" column="location"/>
		<result property="dataid" column="dataid"/>
	</resultMap>
	
	<select id="findDataBack" parameterType="Map" resultMap="DatabaseResult">
		select * from t_database a,t_user b,t_datadic c
		<where>
		    c.id=#{dataid} and a.dataid=c.id and a.userid=b.id
		    <if test="username!=null and username!='' ">
				and b.username like #{username}
			</if>
			<if test="starttime!=null and starttime!='' ">
				and a.time&gt;=#{starttime}
			</if>
			<if test="endtime!=null and endtime!='' ">
				and a.time&lt;=#{endtime}
			</if>
		</where>
		<if test="start!=null and size!=null">
			limit #{start},#{size}
		</if>
	</select>
	
	<select id="getDataBackTotal" parameterType="Map" resultType="Long">
		select count(*) from t_database a,t_user b,t_datadic c
		<where>
		    c.id=#{dataid} and a.dataid=c.id and a.userid=b.id
		    <if test="username!=null and username!='' ">
				and b.username like #{username}
			</if>
			<if test="starttime!=null and starttime!='' ">
				and a.time&gt;=#{starttime}
			</if>
			<if test="endtime!=null and endtime!='' ">
				and a.time&lt;=#{endtime}
			</if>
		</where>
	</select>
	
	<insert id="addDatabase" parameterType="Database">
		insert into t_database values(null,#{userid},#{filename},#{time},#{location},#{dataid});
	</insert>
	
	<delete id="deleteDatabase" parameterType="Integer">
	    delete from t_database where id=#{id};
	</delete>
	
	<update id="truncateTable">
	    truncate table ${tablename}
	</update>
	
后面还有 5 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。