检测
This commit is contained in:
parent
3f6026918d
commit
127623bd4c
@ -0,0 +1,78 @@
|
|||||||
|
<?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="cn.iocoder.yudao.module.appBase.mapper.AppSwiperMapper">
|
||||||
|
|
||||||
|
<resultMap type="cn.iocoder.yudao.module.appBase.entity.AppSwiper" id="AppSwiperResult">
|
||||||
|
<result property="swiperId" column="swiper_id" />
|
||||||
|
<result property="moudleName" column="moudle_name" />
|
||||||
|
<result property="swiperName" column="swiper_name" />
|
||||||
|
<result property="swiperPicture" column="swiper_picture" />
|
||||||
|
<result property="jumpUrl" column="jump_url" />
|
||||||
|
<result property="listOrder" column="list_order" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectAppSwiperVo">
|
||||||
|
select swiper_id, moudle_name, swiper_name, swiper_picture, jump_url, list_order from app_swiper
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectAppSwiperList" parameterType="cn.iocoder.yudao.module.appBase.entity.AppSwiper" resultMap="AppSwiperResult">
|
||||||
|
<include refid="selectAppSwiperVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="moudleName != null and moudleName != ''"> and moudle_name like concat('%', #{moudleName}, '%')</if>
|
||||||
|
<if test="swiperName != null and swiperName != ''"> and swiper_name like concat('%', #{swiperName}, '%')</if>
|
||||||
|
<if test="swiperPicture != null and swiperPicture != ''"> and swiper_picture = #{swiperPicture}</if>
|
||||||
|
<if test="jumpUrl != null and jumpUrl != ''"> and jump_url = #{jumpUrl}</if>
|
||||||
|
<if test="listOrder != null "> and list_order = #{listOrder}</if>
|
||||||
|
</where>
|
||||||
|
order by list_order asc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectAppSwiperBySwiperId" parameterType="Long" resultMap="AppSwiperResult">
|
||||||
|
<include refid="selectAppSwiperVo"/>
|
||||||
|
where swiper_id = #{swiperId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertAppSwiper" parameterType="cn.iocoder.yudao.module.appBase.entity.AppSwiper" useGeneratedKeys="true" keyProperty="swiperId">
|
||||||
|
insert into app_swiper
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="moudleName != null">moudle_name,</if>
|
||||||
|
<if test="swiperName != null">swiper_name,</if>
|
||||||
|
<if test="swiperPicture != null">swiper_picture,</if>
|
||||||
|
<if test="jumpUrl != null">jump_url,</if>
|
||||||
|
<if test="listOrder != null">list_order,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="moudleName != null">#{moudleName},</if>
|
||||||
|
<if test="swiperName != null">#{swiperName},</if>
|
||||||
|
<if test="swiperPicture != null">#{swiperPicture},</if>
|
||||||
|
<if test="jumpUrl != null">#{jumpUrl},</if>
|
||||||
|
<if test="listOrder != null">#{listOrder},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateAppSwiper" parameterType="cn.iocoder.yudao.module.appBase.entity.AppSwiper">
|
||||||
|
update app_swiper
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="moudleName != null">moudle_name = #{moudleName},</if>
|
||||||
|
<if test="swiperName != null">swiper_name = #{swiperName},</if>
|
||||||
|
<if test="swiperPicture != null">swiper_picture = #{swiperPicture},</if>
|
||||||
|
<if test="jumpUrl != null">jump_url = #{jumpUrl},</if>
|
||||||
|
<if test="listOrder != null">list_order = #{listOrder},</if>
|
||||||
|
</trim>
|
||||||
|
where swiper_id = #{swiperId}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteAppSwiperBySwiperId" parameterType="Long">
|
||||||
|
delete from app_swiper where swiper_id = #{swiperId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteAppSwiperBySwiperIds" parameterType="String">
|
||||||
|
delete from app_swiper where swiper_id in
|
||||||
|
<foreach item="swiperId" collection="array" open="(" separator="," close=")">
|
||||||
|
#{swiperId}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
</mapper>
|
@ -3,75 +3,27 @@
|
|||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="cn.iocoder.yudao.module.inspection.mapper.AppInspectionGoodsMapper">
|
<mapper namespace="cn.iocoder.yudao.module.inspection.mapper.AppInspectionGoodsMapper">
|
||||||
|
<select id="homePartners" resultType="cn.iocoder.yudao.module.inspection.vo.PartnerListVo">
|
||||||
<resultMap type="cn.iocoder.yudao.module.appBase.entity.AppSwiper" id="AppSwiperResult">
|
SELECT
|
||||||
<result property="swiperId" column="swiper_id" />
|
partner.partner_id,partner.partner_name,partner.partner_logo,partner.sales_num,partner.average_score,partner.address, ROUND(ST_Distance_Sphere (POINT (#{longitude}, #{latitude}),POINT (partner.longitude, partner.latitude ))) AS distance
|
||||||
<result property="moudleName" column="moudle_name" />
|
FROM
|
||||||
<result property="swiperName" column="swiper_name" />
|
shop_mall_partners partner
|
||||||
<result property="swiperPicture" column="swiper_picture" />
|
Inner JOIN shop_inspection_goods sig ON partner.partner_id = sig.partner_id AND sig.is_listing='1'
|
||||||
<result property="jumpUrl" column="jump_url" />
|
where partner.is_banned = '0' and partner.partner_logo is not null
|
||||||
<result property="listOrder" column="list_order" />
|
group by partner.partner_id
|
||||||
</resultMap>
|
order by distance
|
||||||
|
</select>
|
||||||
<sql id="selectAppSwiperVo">
|
<select id="goodsList" resultType="cn.iocoder.yudao.module.inspection.vo.GoodsVo">
|
||||||
select swiper_id, moudle_name, swiper_name, swiper_picture, jump_url, list_order from app_swiper
|
SELECT
|
||||||
</sql>
|
category.category_name,goods.id as goodsId,category.image as goodsImage
|
||||||
|
FROM
|
||||||
<select id="selectAppSwiperList" parameterType="cn.iocoder.yudao.module.appBase.entity.AppSwiper" resultMap="AppSwiperResult">
|
shop_inspection_category category
|
||||||
<include refid="selectAppSwiperVo"/>
|
INNER JOIN shop_inspection_goods goods ON category.id = goods.goods_category_id and goods.is_listing='1'
|
||||||
<where>
|
INNER JOIN inspection_goods_sku sku ON goods.id = sku.goods_id
|
||||||
<if test="moudleName != null and moudleName != ''"> and moudle_name like concat('%', #{moudleName}, '%')</if>
|
where goods.partner_id = #{partnerId}
|
||||||
<if test="swiperName != null and swiperName != ''"> and swiper_name like concat('%', #{swiperName}, '%')</if>
|
group by goods.id
|
||||||
<if test="swiperPicture != null and swiperPicture != ''"> and swiper_picture = #{swiperPicture}</if>
|
ORDER BY category.order_num
|
||||||
<if test="jumpUrl != null and jumpUrl != ''"> and jump_url = #{jumpUrl}</if>
|
|
||||||
<if test="listOrder != null "> and list_order = #{listOrder}</if>
|
|
||||||
</where>
|
|
||||||
order by list_order asc
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectAppSwiperBySwiperId" parameterType="Long" resultMap="AppSwiperResult">
|
|
||||||
<include refid="selectAppSwiperVo"/>
|
|
||||||
where swiper_id = #{swiperId}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<insert id="insertAppSwiper" parameterType="cn.iocoder.yudao.module.appBase.entity.AppSwiper" useGeneratedKeys="true" keyProperty="swiperId">
|
|
||||||
insert into app_swiper
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="moudleName != null">moudle_name,</if>
|
|
||||||
<if test="swiperName != null">swiper_name,</if>
|
|
||||||
<if test="swiperPicture != null">swiper_picture,</if>
|
|
||||||
<if test="jumpUrl != null">jump_url,</if>
|
|
||||||
<if test="listOrder != null">list_order,</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="moudleName != null">#{moudleName},</if>
|
|
||||||
<if test="swiperName != null">#{swiperName},</if>
|
|
||||||
<if test="swiperPicture != null">#{swiperPicture},</if>
|
|
||||||
<if test="jumpUrl != null">#{jumpUrl},</if>
|
|
||||||
<if test="listOrder != null">#{listOrder},</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
|
|
||||||
<update id="updateAppSwiper" parameterType="cn.iocoder.yudao.module.appBase.entity.AppSwiper">
|
|
||||||
update app_swiper
|
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
|
||||||
<if test="moudleName != null">moudle_name = #{moudleName},</if>
|
|
||||||
<if test="swiperName != null">swiper_name = #{swiperName},</if>
|
|
||||||
<if test="swiperPicture != null">swiper_picture = #{swiperPicture},</if>
|
|
||||||
<if test="jumpUrl != null">jump_url = #{jumpUrl},</if>
|
|
||||||
<if test="listOrder != null">list_order = #{listOrder},</if>
|
|
||||||
</trim>
|
|
||||||
where swiper_id = #{swiperId}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<delete id="deleteAppSwiperBySwiperId" parameterType="Long">
|
|
||||||
delete from app_swiper where swiper_id = #{swiperId}
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
<delete id="deleteAppSwiperBySwiperIds" parameterType="String">
|
|
||||||
delete from app_swiper where swiper_id in
|
|
||||||
<foreach item="swiperId" collection="array" open="(" separator="," close=")">
|
|
||||||
#{swiperId}
|
|
||||||
</foreach>
|
|
||||||
</delete>
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
Loading…
Reference in New Issue
Block a user