| | |
| | | </set> |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <delete id="deleteLogicById"> |
| | | update pr_order_item set deleted = 1 where id = #{id} |
| | | </delete> |
| | | <select id="selectSome" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from pr_order_item p |
| | | where p.deleted!=1 |
| | | <trim prefix="and " suffixOverrides="and"> |
| | | <if test="orderId != null and orderId != ''"> |
| | | p.orderId = #{orderId,jdbcType=BIGINT} and |
| | | </if> |
| | | </trim> |
| | | order by id desc |
| | | <trim prefix="limit " > |
| | | <if test="start != null and count != null"> |
| | | #{start}, #{count} |
| | | </if> |
| | | </trim> |
| | | </select> |
| | | |
| | | <select id="selectSomeCount" resultType="java.lang.Long"> |
| | | select count(1) |
| | | from pr_order_item p |
| | | where p.deleted!=1 |
| | | <trim prefix="and " suffixOverrides="and"> |
| | | <if test="orderId != null and orderId != ''"> |
| | | p.orderId = #{orderId,jdbcType=BIGINT} and |
| | | </if> |
| | | </trim> |
| | | </select> |
| | | </mapper> |