<?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.sqx.modules.datacentre.dao.ShopAdminDao">

    <select id="selectShopList" resultType="com.sqx.modules.goods.entity.GoodsShop">
        select gs.shop_name from goods_shop gs left join sys_user_shop sus on sus.shop_id = gs.shop_id where sus.user_id = #{userId}
    </select>

    <select id="selectShopId" resultType="com.sqx.modules.datacentre.entity.SysUserShop">
        select sus.*, gs.shop_name as shopName, gs.shop_cover as shopCover, gs.putaway_flag as putawayFlag, gs.banned_flag as bannedFlag,gs.shop_type_id as shopTypeId
        from sys_user_shop sus
        left join goods_shop gs on sus.shop_id = gs.shop_id where sus.user_id = #{userId}
    </select>

</mapper>