You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
981 B
23 lines
981 B
<?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="cc.hiver.mall.dao.mapper.MallMapper">
|
|
<select id="findByUserId" resultType="cc.hiver.app.entity.Shop">
|
|
SELECT DISTINCT m.*
|
|
FROM t_shop m
|
|
LEFT JOIN t_shop_user um ON m.id = um.shop_id
|
|
WHERE um.user_id = #{userId} AND m.status = 0
|
|
ORDER BY m.sort_order ASC
|
|
</select>
|
|
|
|
<select id="findByShopId" resultType="cc.hiver.core.vo.UserVo">
|
|
SELECT DISTINCT m.id, m.username, m.nickname
|
|
FROM t_user m
|
|
LEFT JOIN t_shop_user um ON m.id = um.user_id
|
|
WHERE um.shop_id = #{shopId} AND m.status = 0
|
|
ORDER BY m.id ASC
|
|
</select>
|
|
|
|
<delete id="updateOtherShopDefaulted" parameterType="java.lang.String">
|
|
UPDATE t_shop SET defaulted = 0 WHERE user_id = #{userId} and shop_id != #{shopId};
|
|
</delete>
|
|
</mapper>
|