12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- <?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.unis.transaction.server.dao.TradeRuleDao">
-
- <sql id="traderuleColumns">
- zb.xzbm as xzbm,
- zb.xzbt as xzbt,
- zb.xzzw as xzzw,
- zb.bzsj as bzsj,
- zb.fjid as fjid,
- zb.bzr as bzr,
- zb.fbzt as fbzt,
- zb.fbztmc as fbztmc,
- zb.remark as remark,
- zb.lsxzbm,
- zb.lsxzmc
- </sql>
-
- <sql id="traderuleJoins">
-
- </sql>
-
- <select id="selectList" resultType="com.unis.transaction.server.entity.tradeplan.TradeRuleDO" parameterType="com.unis.transaction.common.vo.tradeplan.TradeRuleVO">
- SELECT
- <include refid="traderuleColumns" />
- FROM ty_jyxz zb <include refid="traderuleJoins" />
- <where>
- </where>
- </select>
-
- <select id="selectPageList" resultType="com.unis.transaction.common.vo.tradeplan.TradeRuleVO" parameterType="com.unis.transaction.common.vo.tradeplan.TradeRuleVO">
- select
- <include refid="traderuleColumns" />
- from ty_jyxz zb <include refid="traderuleJoins" />
- <where>
- and zb.status = 1
- <if test="xzbt != null and xzbt != ''">
- and zb.xzbt like '%' || #{xzbt} || '%'
- </if>
- <if test="fbzt != null">
- and zb.fbzt = #{fbzt}
- </if>
- <if test="lsxzbm != null and lsxzbm != ''">
- and zb.lsxzbm = #{lsxzbm}
- </if>
- <if test="startDate != null">
- and zb.bzsj >= #{startDate}
- </if>
- <if test="endDate != null">
- and zb.bzsj <= #{endDate}
- </if>
- </where>
- order by zb.xzbm desc
- </select>
-
- <select id="selectDetail" resultType="com.unis.transaction.common.vo.tradeplan.TradeRuleVO" parameterType="com.unis.transaction.common.vo.tradeplan.TradeRuleVO">
- SELECT
- <include refid="traderuleColumns" />
- FROM ty_jyxz zb <include refid="traderuleJoins" />
- <where>
- and zb.xzbm = #{xzbm}
- </where>
- </select>
-
- <insert id="insertTradeRule">
- INSERT INTO ty_jyxz(
- xzbm,xzbt,xzzw,bzsj,fjid,bzr,fbzt,fbztmc,remark,lsxzbm,lsxzmc)
- VALUES (
- #{xzbm},#{xzbt},#{xzzw},#{bzsj},#{fjid},#{bzr},#{fbzt},#{fbztmc},#{remark},#{lsxzbm},#{lsxzmc})
- </insert>
-
- <update id="updateTradeRule">
- UPDATE ty_jyxz SET
- xzbm = #{xzbm},xzbt = #{xzbt},xzzw = #{xzzw},bzsj = #{bzsj},fjid =
- #{fjid},bzr = #{bzr},fbzt = #{fbzt},fbztmc = #{fbztmc},remark =
- #{remark},lsxzbm = #{lsxzbm},lsxzmc = #{lsxzmc}
- WHERE id = #{id}
- </update>
-
- <update id="deleteTradeRule">
- DELETE FROM ty_jyxz
- WHERE id = #{id}
- </update>
-
- </mapper>
|