|
|
@@ -19,6 +19,7 @@
|
|
|
<result column="module" jdbcType="INTEGER" property="module" />
|
|
|
<result column="pc_index" jdbcType="INTEGER" property="pcIndex" />
|
|
|
<result column="app_index" jdbcType="INTEGER" property="appIndex" />
|
|
|
+ <result column="home_index" jdbcType="INTEGER" property="homeIndex" />
|
|
|
</resultMap>
|
|
|
<sql id="Example_Where_Clause">
|
|
|
<!--
|
|
|
@@ -94,7 +95,7 @@
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
This element was generated on Tue Jul 17 09:14:43 CST 2018.
|
|
|
-->
|
|
|
- id, name, summary, number, create_time, super_id, img_url, layer, sort, module, pc_index, app_index
|
|
|
+ id, name, summary, number, create_time, super_id, img_url, layer, sort, module, pc_index, app_index,home_index
|
|
|
</sql>
|
|
|
<select id="selectByExample" parameterType="com.goafanti.common.model.JtBusinessCategoryExample" resultMap="BaseResultMap">
|
|
|
<!--
|
|
|
@@ -205,6 +206,9 @@
|
|
|
<if test="appIndex != null">
|
|
|
app_index,
|
|
|
</if>
|
|
|
+ <if test="homeIndex != null">
|
|
|
+ home_index,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="id != null">
|
|
|
@@ -243,6 +247,9 @@
|
|
|
<if test="appIndex != null">
|
|
|
#{appIndex,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
+ <if test="homeIndex != null">
|
|
|
+ #{homeIndex,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<select id="countByExample" parameterType="com.goafanti.common.model.JtBusinessCategoryExample" resultType="java.lang.Long">
|
|
|
@@ -369,6 +376,9 @@
|
|
|
<if test="appIndex != null">
|
|
|
app_index = #{appIndex,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
+ <if test="homeIndex != null">
|
|
|
+ home_index = #{homeIndex,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
@@ -607,4 +617,17 @@ and layer=#{0}
|
|
|
limit #{sort,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
</select>
|
|
|
+ <select id="getHomeIndex" resultType="com.goafanti.business.bo.JtBusinessCategoryBo">
|
|
|
+ select
|
|
|
+ name as topLevel,
|
|
|
+ id as topLevelId,
|
|
|
+ img_url as topImg,
|
|
|
+ summary
|
|
|
+ from jt_business_category
|
|
|
+ where layer=2
|
|
|
+ and module=#{0}
|
|
|
+ and home_index=#{1}
|
|
|
+ </select>
|
|
|
+
|
|
|
+
|
|
|
</mapper>
|