| | |
| | | and stock_spell like CONCAT('%','${stockSpell}','%') |
| | | </if> |
| | | </where> |
| | | ORDER BY id DESC |
| | | <choose> |
| | | <when test="state == 2"> |
| | | ORDER BY sell_order_time DESC, id DESC |
| | | </when> |
| | | <otherwise> |
| | | ORDER BY id DESC |
| | | </otherwise> |
| | | </choose> |
| | | </select> |
| | | |
| | | <select id="findPositionByUserIdAndSellIdIsNull" parameterType="integer" resultMap="BaseResultMap"> |
| | |
| | | and agent_id = #{searchId} |
| | | </if> |
| | | <if test="state != null"> |
| | | and status = #{state, jdbcType=INTEGER} |
| | | <choose> |
| | | <when test="state == 0"> |
| | | and status = 1 |
| | | </when> |
| | | <when test="state == 1"> |
| | | and status = 2 |
| | | </when> |
| | | <otherwise> |
| | | and status = #{state, jdbcType=INTEGER} |
| | | </otherwise> |
| | | </choose> |
| | | </if> |
| | | <if test="userId != null and userId != '' "> |
| | | and user_id = #{userId} |