src/main/resources/mappers/TradeMapper.xml

(开头部分) 3KB

这里只显示每个文件的开头 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.TradeDao">
	<resultMap type="Trade" id="TradeResult">
		<result property="id" column="id" />
		<result property="userid" column="userid" />
		<result property="sharesid" column="sharesid" />
        <result property="price" column="price"/>
        <result property="number" column="number"/>
		<result property="money" column="money" />
		<result property="dataid" column="dataid" />
		<result property="content" column="content" />
		<result property="time" column="time" />
		<result property="createtime" column="createtime" />
		<result property="updatetime" column="updatetime" />
	</resultMap>
	<select id="findTrade" parameterType="Map" resultMap="TradeResult">
		select * from t_trade a,t_datadic b,t_user c,t_shares d,t_user_role f
		<where>
			a.dataid=b.id and a.userid=c.id and a.sharesid=d.id and a.userid=f.userid
			<if test="sharesname!=null and sharesname!='' ">
				and d.sharesname like #{sharesname}
			</if>
			<if test="dataid!=null and dataid!='' ">
				and a.dataid=#{dataid}
			</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>
			<if test="userid!=null and roleid!=1">
				and a.userid=#{userid}
			</if>
		</where>
		<if test="start!=null and size!=null">
			limit #{start},#{size}
		</if>
	</select>

	<select id="getTotalTrade" parameterType="Map" resultType="Long">
		select count(*) from t_trade a,t_datadic b,t_user c,t_shares d,t_user_role f
		<where>
			a.dataid=b.id and a.userid=c.id and a.sharesid=d.id and a.userid=f.userid
			<if test="dataid!=null and dataid!='' ">
				and a.dataid like #{dataid}
			</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>
			<if test="userid!=null and roleid!=1">
				and a.userid=#{userid}
			</if>
		</where>
后面还有 42 行代码,购买后查看完整代码

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

AI 解读 AI

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

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