小程序接口修改、加上随机获取小知识、案例
This commit is contained in:
@ -154,4 +154,10 @@
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<!-- 随机获取指定数量可展示的客户案例 -->
|
||||
<select id="getWxCustomerCaseByRandom" parameterType="int" resultMap="SysCustomerCaseResponseResult">
|
||||
SELECT id, name, keyword, remark, wx_show from sys_customer_case WHERE del_flag = 0 and wx_show = 1
|
||||
and id >= ((SELECT MAX(id) FROM sys_customer_case )-(SELECT MIN(id) FROM sys_customer_case )) * RAND() + (SELECT MIN(id) FROM sys_customer_case) LIMIT #{pageSize}
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -24,7 +24,6 @@
|
||||
<result property="title" column="title" />
|
||||
<result property="content" column="content" />
|
||||
<result property="key" column="key" />
|
||||
<result property="key" column="key" />
|
||||
<result property="showFlag" column="show_flag" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
@ -127,6 +126,12 @@
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<!-- 随机获取指定数量的营养小知识 -->
|
||||
<select id="getNutritionQuestionByRandom" resultMap="SysNutritionQuestionResultExtended">
|
||||
SELECT * FROM sys_nutrition_question WHERE del_flag = 0 and show_flag = 1
|
||||
and id >= ((SELECT MAX(id) FROM sys_nutrition_question )-(SELECT MIN(id) FROM sys_nutrition_question )) * RAND() + (SELECT MIN(id) FROM sys_nutrition_question ) LIMIT #{pageSize}
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
</mapper>
|
Reference in New Issue
Block a user