<?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.zfire.mall.manager.commonmapper.CommonMapper">

    <select id="merchantLoginQuotaLimitList" resultType="com.zfire.mall.manager.plus.entity.CustomerBillLimitConfig">
        SELECT a.*, b.name AS customer_name
        FROM customer_bill_limit_config a LEFT JOIN king_dee_customer b ON a.customer_id = b.id
        ${ex.query}
        AND del = 0
        <if test="ex.orderBy == null or ex.orderBy ==''">
            order by a.create_time desc
        </if>
        ${ex.orderBy}
    </select>

    <select id="firstPartyCustomerManagementList" resultType="com.zfire.mall.manager.plus.entity.PartyAInfo">
        SELECT a.*
        FROM party_a_info a
        ${ex.query}
        AND del = 0
        <if test="ex.orderBy == null or ex.orderBy ==''">
            order by a.create_time desc
        </if>
        ${ex.orderBy}
    </select>
    <select id="listExcel" resultType="com.zfire.mall.manager.bean.stock.AdminUserForceStockExcel">
        SELECT
	    auf.category_id,
	    au.user_name,
	    au.nick_name,
	    auf.correspond_name as stockName,
	    auf.admin_user_id
        FROM
	    admin_user_force_stock auf
	    join admin_user au on auf.admin_user_id = au.admin_user_id
	    group by auf.admin_user_id,auf.correspond_id

    </select>

</mapper>