Merge branch 'master' of gitee.com:darlk/ShengTangManage into develop
This commit is contained in:
@ -12,6 +12,7 @@
|
||||
<result property="postName" column="post_name"/>
|
||||
<result property="amount" column="amount"/>
|
||||
<result property="rate" column="rate"/>
|
||||
<result property="startTime" column="start_time" />
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
@ -114,6 +115,12 @@
|
||||
<where>
|
||||
<if test="postId != null and postId != ''">and post_id = #{postId}</if>
|
||||
<if test="userId != null and userId != ''">and user_id = #{userId}</if>
|
||||
<if test="userIds != null">
|
||||
and user_id in
|
||||
<foreach item="id" collection="userIds" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@ -136,6 +143,8 @@
|
||||
<if test="userId != null ">and user_id = #{userId}</if>
|
||||
<if test="postId != null ">and post_id = #{postId}</if>
|
||||
</where>
|
||||
<!-- 请勿随意修改排序方式,会影响提成计算 -->
|
||||
order by user_id asc,amount asc,start_time asc
|
||||
</select>
|
||||
|
||||
<select id="selectSysCommisionById" parameterType="SysCommision" resultMap="SysCommisionResult">
|
||||
@ -152,6 +161,7 @@
|
||||
<if test="postId != null">post_id,</if>
|
||||
<if test="amount != null">amount,</if>
|
||||
<if test="rate != null">rate,</if>
|
||||
<if test="startTime != null">start_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
@ -163,6 +173,7 @@
|
||||
<if test="postId != null">#{postId},</if>
|
||||
<if test="amount != null">#{amount},</if>
|
||||
<if test="rate != null">#{rate},</if>
|
||||
<if test="startTime != null">#{startTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
@ -178,6 +189,7 @@
|
||||
<if test="postId != null">post_id = #{postId},</if>
|
||||
<if test="amount != null">amount = #{amount},</if>
|
||||
<if test="rate != null">rate = #{rate},</if>
|
||||
<if test="startTime != null">start_time = #{startTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
@ -207,4 +219,11 @@
|
||||
<if test="postId != null and postId != ''">and sp.post_id = #{postId}</if>
|
||||
<if test="userId != null and userId != ''">and su.user_id = #{userId}</if>
|
||||
</select>
|
||||
|
||||
<select id="getAfterSaleId" parameterType="SysCommision" resultType="Long">
|
||||
SELECT su.user_id FROM sys_user su
|
||||
LEFT JOIN sys_user_post sup ON sup.user_id = su.user_id
|
||||
LEFT JOIN sys_post sp ON sp.post_id = sup.post_id
|
||||
WHERE su.del_flag = 0 and sp.post_id = #{postId}
|
||||
</select>
|
||||
</mapper>
|
@ -14,22 +14,42 @@
|
||||
<result property="videoSize" column="video_size" />
|
||||
<result property="tags" column="tags" />
|
||||
<result property="showFlag" column="show_flag" />
|
||||
<result property="priorityLevel" column="priority_level" />
|
||||
<result property="payLevel" column="pay_level" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
|
||||
<result property="payLevelName" column="pay_level_name"></result>
|
||||
<result property="cateName" column="cate_name"></result>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSysNutritionalVideoVo">
|
||||
select id, cate_id, video_id, cover_url, title, description, video_size, tags, show_flag, create_time, create_by, update_time, update_by, del_flag from sys_nutritional_video
|
||||
select id, cate_id, video_id, cover_url, title, description, priority_level,pay_level,video_size, tags, show_flag, create_time, create_by, update_time, update_by, del_flag from sys_nutritional_video
|
||||
</sql>
|
||||
|
||||
<select id="selectSysNutritionalVideoList" parameterType="SysNutritionalVideo" resultMap="SysNutritionalVideoResult">
|
||||
<include refid="selectSysNutritionalVideoVo"/> where del_flag = 0
|
||||
select snv.id, snv.cate_id, snv.video_id, snv.cover_url, snv.title, snv.description, snv.priority_level,snv.pay_level,snv.video_size, snv.tags, snv.show_flag, snv.create_time,
|
||||
pay.dict_label as pay_level_name, svc.cate_name
|
||||
from sys_nutritional_video snv
|
||||
left join (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'video_pay_level') AS pay ON pay.dict_value = snv.pay_level
|
||||
left join sys_video_classify svc on svc.id = snv.cate_id and svc.del_flag = 0
|
||||
where snv.del_flag = 0
|
||||
<if test="showFlag != null">
|
||||
and show_flag = #{showFlag}
|
||||
and snv.show_flag = #{showFlag}
|
||||
</if>
|
||||
<if test="cateId != null">
|
||||
and snv.cate_id = #{cateId}
|
||||
</if>
|
||||
<if test="payLevel != null">
|
||||
and snv.pay_level = #{payLevel}
|
||||
</if>
|
||||
<if test="key != null and key != ''">
|
||||
and (snv.title like concat('%',#{key},'%') or snv.description like concat('%',#{key},'%'))
|
||||
</if>
|
||||
order by snv.priority_level DESC,snv.create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="selectSysNutritionalVideoById" parameterType="Long" resultMap="SysNutritionalVideoResult">
|
||||
@ -48,8 +68,10 @@
|
||||
<if test="videoSize != null">video_size,</if>
|
||||
<if test="tags != null">tags,</if>
|
||||
<if test="showFlag != null">show_flag,</if>
|
||||
<if test="priorityLevel != null">priority_level,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="payLevel != null">pay_level,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
@ -63,8 +85,10 @@
|
||||
<if test="videoSize != null">#{videoSize},</if>
|
||||
<if test="tags != null">#{tags},</if>
|
||||
<if test="showFlag != null">#{showFlag},</if>
|
||||
<if test="priorityLevel != null">#{priorityLevel},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="payLevel != null">#{payLevel},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
@ -82,8 +106,10 @@
|
||||
<if test="videoSize != null">video_size = #{videoSize},</if>
|
||||
<if test="tags != null">tags = #{tags},</if>
|
||||
<if test="showFlag != null">show_flag = #{showFlag},</if>
|
||||
<if test="priorityLevel != null">priority_level = #{priorityLevel},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="payLevel != null">pay_level = #{payLevel},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
@ -106,4 +132,11 @@
|
||||
<include refid="selectSysNutritionalVideoVo"/> where video_id = #{videoId} and del_flag = 0 limit 1
|
||||
</select>
|
||||
|
||||
<update id="updateWxshowByIds" parameterType="String">
|
||||
update sys_nutritional_video set show_flag = #{wxShow} where del_flag = 0 and id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,85 @@
|
||||
<?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.stdiet.custom.mapper.SysVideoClassifyMapper">
|
||||
|
||||
<resultMap type="SysVideoClassify" id="SysVideoClassifyResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="cateName" column="cate_name" />
|
||||
<result property="payFlag" column="pay_flag" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSysVideoClassifyVo">
|
||||
select id, cate_name, pay_flag, create_time, create_by, update_time, update_by, del_flag from sys_video_classify
|
||||
</sql>
|
||||
|
||||
<select id="selectSysVideoClassifyList" parameterType="SysVideoClassify" resultMap="SysVideoClassifyResult">
|
||||
<include refid="selectSysVideoClassifyVo"/>
|
||||
where del_flag = 0
|
||||
</select>
|
||||
|
||||
<select id="selectSysVideoClassifyById" parameterType="Long" resultMap="SysVideoClassifyResult">
|
||||
<include refid="selectSysVideoClassifyVo"/>
|
||||
where id = #{id} and del_flag = 0
|
||||
</select>
|
||||
|
||||
<insert id="insertSysVideoClassify" parameterType="SysVideoClassify">
|
||||
insert into sys_video_classify
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="cateName != null">cate_name,</if>
|
||||
<if test="payFlag != null">pay_flag,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="cateName != null">#{cateName},</if>
|
||||
<if test="payFlag != null">#{payFlag},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSysVideoClassify" parameterType="SysVideoClassify">
|
||||
update sys_video_classify
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="cateName != null">cate_name = #{cateName},</if>
|
||||
<if test="payFlag != null">pay_flag = #{payFlag},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteSysVideoClassifyById" parameterType="Long">
|
||||
update sys_video_classify set del_flag = 1 where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteSysVideoClassifyByIds" parameterType="String">
|
||||
update sys_video_classify set del_flag = 1 where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<select id="getAllClassify" resultMap="SysVideoClassifyResult">
|
||||
select id,cate_name from sys_video_classify where del_flag = 0
|
||||
</select>
|
||||
|
||||
</mapper>
|
Reference in New Issue
Block a user