yujian
2019-11-11 fdb089cb8bee6099efcbd7b0ca2672c63cbb6784
fanli/src/main/java/com/yeshi/fanli/mapping/shop/BanLiShopOrderMapper.xml
@@ -61,10 +61,15 @@
      <include refid="Base_Column_List" />
      from yeshi_ec_shop_order where so_id = #{0} for update
   </select>
   <select id="listByUid" resultMap="BaseResultMap">
   <select id="listByUidAndState" resultMap="BaseResultMap">
      select
      <include refid="Base_Column_List" />
      from yeshi_ec_shop_order where so_uid = #{uid}
      from yeshi_ec_shop_order where 1=1
      <if test="uid!=null">
         and so_uid = #{uid}
      </if>
      <if test="stateList!=null">
         <foreach collection="stateList" item="state" open=" and ("
            close=")" separator=" or ">so_state=#{state}</foreach>
@@ -80,15 +85,20 @@
   </select>
   <select id="countByUid" resultType="java.lang.Long">
      select count(*) from yeshi_ec_shop_order where so_uid = #{uid}
   <select id="countByUidAndState" resultType="java.lang.Long">
      select count(*) from yeshi_ec_shop_order where 1=1
      <if test="uid!=null">
         and so_uid = #{uid}
      </if>
      <if test="stateList!=null">
         <foreach collection="stateList" item="state" open=" and ("
            close=")" separator=" or ">so_state=#{state}</foreach>
      </if>
   </select>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
      yeshi_ec_shop_order where so_id = #{id,jdbcType=BIGINT}</delete>
      yeshi_ec_shop_order where so_id = #{id,jdbcType=BIGINT}
   </delete>
   <insert id="insert" parameterType="com.yeshi.fanli.entity.shop.BanLiShopOrder"
      useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_shop_order
      (so_id,so_uid,so_order_no,so_goods_id,so_goods_set_id,so_payment_hongbao,so_payment_hongbao_state,so_payment_money,so_payment_money_state,so_payment_balance,so_payment_balance_state,so_pay_time,so_reject_time,so_success_time,so_state,so_state_desc,so_charge_account,so_charge_account2,so_beizhu,so_create_time,so_update_time,so_order_goods_id,so_charge_account_type)
@@ -173,7 +183,8 @@
      #{updateTime,jdbcType=TIMESTAMP} ,so_order_goods_id
      =#{orderGoods.id,jdbcType=BIGINT} ,so_charge_account_type
      =#{chargeAccountType,jdbcType=VARCHAR} where so_id =
      #{id,jdbcType=BIGINT}</update>
      #{id,jdbcType=BIGINT}
   </update>
   <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.shop.BanLiShopOrder">
      update yeshi_ec_shop_order
      <set>
@@ -185,7 +196,8 @@
         </if>
         <if test="hongBaoPaymentState != null">so_payment_hongbao_state=#{hongBaoPaymentState,jdbcType=INTEGER},
         </if>
         <if test="balancePayment != null">so_payment_balance=#{balancePayment,jdbcType=DECIMAL},</if>
         <if test="balancePayment != null">so_payment_balance=#{balancePayment,jdbcType=DECIMAL},
         </if>
         <if test="balancePaymentState != null">so_payment_balance_state=#{balancePaymentState,jdbcType=INTEGER},
         </if>
         <if test="moneyPayment != null">so_payment_money=#{moneyPayment,jdbcType=DECIMAL},</if>
@@ -204,7 +216,8 @@
         <if test="updateTime != null">so_update_time=#{updateTime,jdbcType=TIMESTAMP},</if>
         <if test="orderGoods !=null">so_order_goods_id =#{orderGoods.id,jdbcType=BIGINT},</if>
         <if test="chargeAccountType !=null">so_charge_account_type
            =#{chargeAccountType,jdbcType=VARCHAR},</if>
            =#{chargeAccountType,jdbcType=VARCHAR},
         </if>
      </set>
      where so_id = #{id,jdbcType=BIGINT}
   </update>