添加项目前缀,报404接口补全
This commit is contained in:
70
fp-system/src/main/resources/mapper/CarouselMapper.xml
Normal file
70
fp-system/src/main/resources/mapper/CarouselMapper.xml
Normal file
@@ -0,0 +1,70 @@
|
||||
<?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.zf.foodpurchase.fdsafe.mapper.CarouselMapper">
|
||||
|
||||
<resultMap type="Carousel" id="CarouselResult">
|
||||
<result property="carouselId" column="carousel_id" />
|
||||
<result property="merchantId" column="merchant_id" />
|
||||
<result property="merchantName" column="dept_name" />
|
||||
<result property="carouselIamges" column="carousel_iamges" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCarouselVo">
|
||||
select carousel_id, c.merchant_id, carousel_iamges, c.create_time,c.update_time,dept_name from carousel c inner join sys_dept d on
|
||||
c.merchant_id = d.dept_id
|
||||
</sql>
|
||||
|
||||
<select id="selectCarouselList" parameterType="Carousel" resultMap="CarouselResult">
|
||||
<include refid="selectCarouselVo"/>
|
||||
<where>
|
||||
<if test="merchantId != null "> and merchant_id = #{merchantId}</if>
|
||||
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and c.create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCarouselByCarouselId" parameterType="Long" resultMap="CarouselResult">
|
||||
<include refid="selectCarouselVo"/>
|
||||
where carousel_id = #{carouselId}
|
||||
</select>
|
||||
|
||||
<insert id="insertCarousel" parameterType="Carousel" useGeneratedKeys="true" keyProperty="carouselId">
|
||||
insert into carousel
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="merchantId != null">merchant_id,</if>
|
||||
<if test="carouselIamges != null and carouselIamges != ''">carousel_iamges,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="merchantId != null">#{merchantId},</if>
|
||||
<if test="carouselIamges != null and carouselIamges != ''">#{carouselIamges},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateCarousel" parameterType="Carousel">
|
||||
update carousel
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="merchantId != null">merchant_id = #{merchantId},</if>
|
||||
<if test="carouselIamges != null and carouselIamges != ''">carousel_iamges = #{carouselIamges},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where carousel_id = #{carouselId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteCarouselByCarouselId" parameterType="Long">
|
||||
delete from carousel where carousel_id = #{carouselId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteCarouselByCarouselIds" parameterType="String">
|
||||
delete from carousel where carousel_id in
|
||||
<foreach item="carouselId" collection="array" open="(" separator="," close=")">
|
||||
#{carouselId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user