Commit 4bf3fe30 by wangming

Merge branch 'wangming' into '105'

分类管理

See merge request !3
2 parents c6a68a2e 23a19dcf
......@@ -61,4 +61,67 @@
ORDER BY t.create_dt DESC
</select>
<select id="secondClassList" resultType="java.util.HashMap" parameterType="java.util.HashMap">
SELECT
t.id,
t.class_name as className,
t.type,
t.`status`,
t1.class_name as firstName,
t.pic_url as picUrl,
t.weight,
date_format(t.create_dt,'%Y-%m-%d %H:%i:%S') createDt
FROM
t_base_second_class t
LEFT JOIN t_base_first_class t1 ON t.first_id=t1.id
WHERE t.first_id = #{firstClassId,jdbcType=BIGINT}
ORDER BY t.weight DESC
</select>
<select id="getSecondClassById" resultType="java.util.HashMap" parameterType="java.util.HashMap">
SELECT
t.id,
t.class_name as className,
t.type,
t.`status`,
t1.class_name as firstName,
t.pic_url as picUrl,
t.weight
FROM
t_base_second_class t
LEFT JOIN t_base_first_class t1 ON t.first_id=t1.id
WHERE t.id= #{id,jdbcType=BIGINT}
</select>
<select id="selectFirstClassList" resultType="java.util.HashMap" parameterType="java.util.HashMap">
SELECT
t.id,
t.class_name as className
FROM
t_base_first_class t
WHERE t.`status` = 1
<if test="name != null">
AND t.class_name LIKE #{name}
</if>
ORDER BY t.id DESC
</select>
<select id="selectSecondClassList" resultType="java.util.HashMap" parameterType="java.util.HashMap">
SELECT
t.id,
t.class_name AS className
FROM
t_base_second_class t
WHERE
t.`status` = 1
<if test="type != null">
AND t.type = #{type,jdbcType=INTEGER}
</if>
<if test="name != null">
AND t.class_name LIKE #{name}
</if>
ORDER BY t.id DESC
</select>
</mapper>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!