| | |
| | | <mapper namespace="com.yami.trading.dao.dz.StockDzMapper"> |
| | | |
| | | |
| | | <select id="findStockTypeDz" resultType="com.yami.trading.bean.dz.StockDz" parameterType="map"> |
| | | <select id="findStockTypeDz" resultType="com.yami.trading.bean.dz.dto.StockDzDto" parameterType="map"> |
| | | SELECT |
| | | * |
| | | FROM t_stock_dz |
| | |
| | | |
| | | <select id="getDzOrderList" resultType="com.yami.trading.bean.dz.dto.ExchangeApplyOrderDzDto" parameterType="map"> |
| | | SELECT |
| | | t.*,s.stock_name |
| | | t.*,s.stock_name,s.day_rate,s.period |
| | | FROM t_exchange_apply_order_dz t |
| | | LEFT JOIN t_stock_dz s ON t.dz_id=s.uuid |
| | | WHERE 1=1 |
| | |
| | | <if test="userId != null and userId != '' "> |
| | | AND t.party_id = #{userId} |
| | | </if> |
| | | ORDER BY t.create_time DESC |
| | | ORDER BY t.close_time DESC,t.create_time DESC |
| | | </select> |
| | | |
| | | <select id="getDzCheckList" resultType="com.yami.trading.bean.dz.dto.ExchangeApplyOrderDzDto" parameterType="map"> |
| | | SELECT |
| | | t.*,u.user_name,u.user_code,s.stock_name |
| | | t.*,u.user_name,u.user_code,s.stock_name,r.user_name AS 'recomUserName' |
| | | FROM t_exchange_apply_order_dz t |
| | | LEFT JOIN tz_user u ON t.party_id = u.user_id |
| | | LEFT JOIN t_stock_dz s ON s.uuid = t.dz_id |
| | | LEFT JOIN tz_user r ON u.user_recom = r.user_id |
| | | WHERE 1=1 |
| | | <if test="state != null and state != ''"> |
| | | AND t.state = #{state} |
| | |
| | | <if test="stockType != null and stockType != '' "> |
| | | AND s.stock_type = #{stockType} |
| | | </if> |
| | | <if test="userName != null and userName != '' "> |
| | | AND ( |
| | | u.user_name LIKE CONCAT('%', #{userName}, '%') |
| | | OR u.user_code LIKE CONCAT('%', #{userName}, '%') |
| | | ) |
| | | </if> |
| | | <if test="checkedList!=null"> |
| | | and u.user_id in |
| | | <foreach collection="checkedList" separator="," index="index" open="(" close=")" item="r"> |
| | | #{r} |
| | | </foreach> |
| | | |
| | | </if> |
| | | |
| | | ORDER BY t.create_time DESC |
| | | </select> |
| | | |