<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cool.store.mapper.InvoicingMapper">
  <resultMap id="BaseResultMap" type="com.cool.store.entity.InvoicingDO">
    <!--
      WARNING - @mbg.generated
    -->
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="shop_id" jdbcType="BIGINT" property="shopId" />
    <result column="invoice_url" jdbcType="VARCHAR" property="invoiceUrl" />
    <result column="invoice_date" jdbcType="VARCHAR" property="invoiceDate" />
    <result column="invoice_number" jdbcType="VARCHAR" property="invoiceNumber" />
    <result column="franchise_fee" jdbcType="DECIMAL" property="franchiseFee" />
    <result column="franchise_fee_tax" jdbcType="DECIMAL" property="franchiseFeeTax" />
    <result column="management_fee" jdbcType="DECIMAL" property="managementFee" />
    <result column="management_fee_tax" jdbcType="DECIMAL" property="managementFeeTax" />
    <result column="brand_usage_fee" jdbcType="DECIMAL" property="brandUsageFee" />
    <result column="brand_usage_fee_tax" jdbcType="DECIMAL" property="brandUsageFeeTax" />
    <result column="design_service_fee" jdbcType="DECIMAL" property="designServiceFee" />
    <result column="design_service_fee_tax" jdbcType="DECIMAL" property="designServiceFeeTax" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
    <result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
    <result column="update_user_id" jdbcType="VARCHAR" property="updateUserId" />
    <result column="annex" jdbcType="VARCHAR" property="annex"/>
  </resultMap>


  <select id="selectByShopId" resultMap="BaseResultMap">
    select * from xfsg_invoicing
    <where>
      <if test="shopId!=null">
        and shop_id=#{shopId}
      </if>
    </where>
  </select>

</mapper>