Expand publishing and virtual product workflows
This commit is contained in:
@@ -16,6 +16,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="TtCopyTemplateGroupStat" id="TtCopyTemplateGroupStatResult">
|
||||
<result property="templateGroup" column="template_group" />
|
||||
<result property="templateCount" column="template_count" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectTtCopyTemplateVo">
|
||||
select template_id, template_name, template_group, template_scene, template_body, sort_num, status, create_time, update_time
|
||||
from tt_copy_template
|
||||
@@ -25,13 +30,38 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<include refid="selectTtCopyTemplateVo"/>
|
||||
<where>
|
||||
<if test="templateName != null and templateName != ''"> and template_name like concat('%', #{templateName}, '%')</if>
|
||||
<if test="templateGroup != null and templateGroup != ''"> and template_group like concat('%', #{templateGroup}, '%')</if>
|
||||
<if test="templateGroup != null and templateGroup != ''">
|
||||
<choose>
|
||||
<when test="templateGroup == '__UNGROUPED__'">
|
||||
and (template_group is null or trim(template_group) = '')
|
||||
</when>
|
||||
<otherwise>
|
||||
and template_group = #{templateGroup}
|
||||
</otherwise>
|
||||
</choose>
|
||||
</if>
|
||||
<if test="templateScene != null and templateScene != ''"> and template_scene = #{templateScene}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
</where>
|
||||
order by sort_num asc, create_time asc
|
||||
</select>
|
||||
|
||||
<select id="selectCopyTemplateGroupStats" resultMap="TtCopyTemplateGroupStatResult">
|
||||
select
|
||||
case
|
||||
when template_group is null or trim(template_group) = '' then '__UNGROUPED__'
|
||||
else template_group
|
||||
end as template_group,
|
||||
count(1) as template_count
|
||||
from tt_copy_template
|
||||
group by
|
||||
case
|
||||
when template_group is null or trim(template_group) = '' then '__UNGROUPED__'
|
||||
else template_group
|
||||
end
|
||||
order by min(sort_num) asc, template_group asc
|
||||
</select>
|
||||
|
||||
<select id="selectEnabledTemplates" resultMap="TtCopyTemplateResult">
|
||||
<include refid="selectTtCopyTemplateVo"/>
|
||||
where status = '0'
|
||||
|
||||
Reference in New Issue
Block a user