|  |  |  | 
|---|
|  |  |  | <resultMap type="com.matrix.system.hive.bean.MoneyCardUseFlow" id="MoneyCardUseFlowMap"> | 
|---|
|  |  |  | <id property="id" column="id" /> | 
|---|
|  |  |  | <result property="orderNo" column="order_no" /> | 
|---|
|  |  |  | <result property="payNo" column="pay_no" /> | 
|---|
|  |  |  | <result property="operationId" column="operation_id" /> | 
|---|
|  |  |  | <result property="content" column="content" /> | 
|---|
|  |  |  | <result property="createTime" column="create_time" /> | 
|---|
|  |  |  | 
|---|
|  |  |  | <resultMap type="com.matrix.system.hive.bean.MoneyCardUseFlow" id="MoneyCardUseFlowSimpleMap"> | 
|---|
|  |  |  | <id property="id" column="id" /> | 
|---|
|  |  |  | <result property="orderNo" column="order_no" /> | 
|---|
|  |  |  | <result property="payNo" column="pay_no" /> | 
|---|
|  |  |  | <result property="operationId" column="operation_id" /> | 
|---|
|  |  |  | <result property="content" column="content" /> | 
|---|
|  |  |  | <result property="createTime" column="create_time" /> | 
|---|
|  |  |  | 
|---|
|  |  |  | INSERT INTO money_card_use_flow ( | 
|---|
|  |  |  | id, | 
|---|
|  |  |  | order_no, | 
|---|
|  |  |  | pay_no, | 
|---|
|  |  |  | operation_id, | 
|---|
|  |  |  | content, | 
|---|
|  |  |  | create_time, | 
|---|
|  |  |  | 
|---|
|  |  |  | VALUES ( | 
|---|
|  |  |  | #{id}, | 
|---|
|  |  |  | #{orderNo}, | 
|---|
|  |  |  | #{payNo}, | 
|---|
|  |  |  | #{operationId}, | 
|---|
|  |  |  | #{content}, | 
|---|
|  |  |  | #{createTime}, | 
|---|
|  |  |  | 
|---|
|  |  |  | <if test="content != null and content !='' "> | 
|---|
|  |  |  | content = #{content}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="createTime != null and createTime !='' "> | 
|---|
|  |  |  | <if test="createTime != null  "> | 
|---|
|  |  |  | create_time = #{createTime}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="vipId != null and vipId !='' "> | 
|---|
|  |  |  | 
|---|
|  |  |  | <if test="type != null and type !='' "> | 
|---|
|  |  |  | type = #{type}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="taotal != null and taotal !='' "> | 
|---|
|  |  |  | taotal = #{taotal}, | 
|---|
|  |  |  | <if test="total != null and total !='' "> | 
|---|
|  |  |  | total = #{total}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="times != null and times !='' "> | 
|---|
|  |  |  | times = #{times}, | 
|---|
|  |  |  | 
|---|
|  |  |  | select | 
|---|
|  |  |  | id, | 
|---|
|  |  |  | order_no, | 
|---|
|  |  |  | pay_no, | 
|---|
|  |  |  | operation_id, | 
|---|
|  |  |  | content, | 
|---|
|  |  |  | create_time, | 
|---|
|  |  |  | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="record.orderNo != null and record.orderNo !='' "> | 
|---|
|  |  |  | and order_no = #{record.orderNo} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="record.payNo != null and record.payNo !='' "> | 
|---|
|  |  |  | and pay_no = #{record.payNo} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="record.operationId != null and record.operationId !='' "> | 
|---|
|  |  |  | and operation_id = #{record.operationId} | 
|---|
|  |  |  | 
|---|
|  |  |  | <if test="record.orderNo != null and record.orderNo !='' "> | 
|---|
|  |  |  | and order_no = #{record.orderNo} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="record.payNo != null and record.payNo !='' "> | 
|---|
|  |  |  | and pay_no = #{record.payNo} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="record.operationId != null and record.operationId !='' "> | 
|---|
|  |  |  | and operation_id = #{record.operationId} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | 
|---|
|  |  |  | select | 
|---|
|  |  |  | id, | 
|---|
|  |  |  | order_no, | 
|---|
|  |  |  | pay_no, | 
|---|
|  |  |  | operation_id, | 
|---|
|  |  |  | content, | 
|---|
|  |  |  | create_time, | 
|---|
|  |  |  | 
|---|
|  |  |  | select | 
|---|
|  |  |  | id, | 
|---|
|  |  |  | order_no, | 
|---|
|  |  |  | pay_no, | 
|---|
|  |  |  | operation_id, | 
|---|
|  |  |  | content, | 
|---|
|  |  |  | create_time, | 
|---|
|  |  |  | 
|---|
|  |  |  | <if test="record.orderNo != null and record.orderNo !='' "> | 
|---|
|  |  |  | and order_no = #{record.orderNo} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="record.payNo != null and record.payNo !='' "> | 
|---|
|  |  |  | and pay_no = #{record.payNo} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="record.operationId != null and record.operationId !='' "> | 
|---|
|  |  |  | and operation_id = #{record.operationId} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <select id="selectForWxInPage" resultMap="MoneyCardUseFlowMap"> | 
|---|
|  |  |  | select | 
|---|
|  |  |  | id, | 
|---|
|  |  |  | order_no, | 
|---|
|  |  |  | pay_no, | 
|---|
|  |  |  | content, | 
|---|
|  |  |  | create_time, | 
|---|
|  |  |  | type, | 
|---|
|  |  |  | total, | 
|---|
|  |  |  | times, | 
|---|
|  |  |  | gift_money, | 
|---|
|  |  |  | balance, | 
|---|
|  |  |  | (SELECT su_name from sys_users a WHERE operation_id=a.su_id) staffName | 
|---|
|  |  |  | from money_card_use_flow | 
|---|
|  |  |  | <where> | 
|---|
|  |  |  | and car_use_id=#{record.carUseId} | 
|---|
|  |  |  | <if test="record.queryTime!=null and record.queryTime!=''"> | 
|---|
|  |  |  | and DATE_FORMAT(create_time,'%Y-%m')=#{record.queryTime} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="record.revenueType==1"> | 
|---|
|  |  |  | and  total>0 | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="record.revenueType==2"> | 
|---|
|  |  |  | <![CDATA[ and total<0 ]]> | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </where> | 
|---|
|  |  |  | order by  create_time desc | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  | </mapper> | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|