视频接口优化,案例检索
This commit is contained in:
		| @@ -45,6 +45,7 @@ | ||||
|     <select id="selectSysCustomerCaseList" parameterType="SysCustomerCase" resultMap="SysCustomerCaseResult"> | ||||
|         select scc.id, scc.name, scc.keyword, scc.remark, scc.customer_id, scc.wx_show, scc.create_time,sc.name as customer_name from sys_customer_case scc | ||||
|         left join sys_customer sc on sc.id = scc.customer_id and sc.del_flag = 0 | ||||
|         left join sys_customer_healthy as sch on sch.customer_id = sc.id and sch.del_flag = 0 | ||||
|         where scc.del_flag = 0 | ||||
|         <include refid="searchKey"> | ||||
|             <property name="keywordArray" value="#{keywordArray}"/> | ||||
| @@ -52,6 +53,21 @@ | ||||
|         <if test="customerName != null and customerName != ''"> | ||||
|             and sc.name like concat('%', #{customerName}, '%') | ||||
|         </if> | ||||
|         <if test="keyword != null"> | ||||
|             and | ||||
|             ( | ||||
|               sc.name like concat('%', #{keyword}, '%') or | ||||
|               scc.keyword like concat('%', #{keyword}, '%') or scc.name like concat('%', #{keyword}, '%') | ||||
|               or scc.remark like concat('%', #{keyword}, '%') or sch.other_physical_signs like concat('%', #{keyword}, '%') | ||||
|               or sch.remark like concat('%', #{keyword}, '%') | ||||
|             <if test="signIdList != null"> | ||||
|                   <foreach collection="signIdList " item="signId" index="index" open=" OR (" close=")" separator=" OR "> | ||||
|                       FIND_IN_SET(#{signId}, sch.physical_signs_id) | ||||
|                   </foreach> | ||||
|               </if> | ||||
|             ) | ||||
|         </if> | ||||
|  | ||||
|         <if test="wxShow != null"> | ||||
|             and scc.wx_show = #{wxShow} | ||||
|         </if> | ||||
|   | ||||
| @@ -62,7 +62,7 @@ | ||||
|         </if> | ||||
|         <if test="signIdList != null"> | ||||
|             and ( | ||||
|             sch.other_physical_signs like concat('%', #{name}, '%') | ||||
|             sch.other_physical_signs like concat('%', #{physicalSignsId}, '%') | ||||
|             <foreach collection="signIdList " item="signId" index="index" open=" OR (" close=")" separator=" OR "> | ||||
|                 FIND_IN_SET(#{signId}, sch.physical_signs_id) | ||||
|             </foreach> | ||||
|   | ||||
| @@ -47,6 +47,14 @@ | ||||
|         <if test="payLevel != null"> | ||||
|             and snv.pay_level = #{payLevel} | ||||
|         </if> | ||||
|         <if test="userType != null"> | ||||
|             <if test="userType == 0"> | ||||
|                 and pay_level = 0 | ||||
|             </if> | ||||
|             <if test="userType == 1"> | ||||
|                 and (pay_level = 0 or pay_level = 1) | ||||
|             </if> | ||||
|         </if> | ||||
|         <if test="key != null and key != ''"> | ||||
|             and (snv.title like concat('%',#{key},'%') or snv.description like concat('%',#{key},'%')) | ||||
|         </if> | ||||
|   | ||||
| @@ -512,4 +512,15 @@ | ||||
|         select * from sys_order where del_flag = 0 and cus_id = #{cusId} order by order_time asc | ||||
|     </select> | ||||
|  | ||||
|     <!-- 根据微信openId查询客户订单数量 --> | ||||
|     <select id="getOrderCountByOpenId" parameterType="String" resultType="int"> | ||||
|       select count(so.order_id) from sys_order so | ||||
|       where so.del_flag = 0 and so.cus_id is not null and so.cus_id = (select su.cus_id from sys_wx_user_info su where su.openid = #{openid} limit 1) | ||||
|     </select> | ||||
|  | ||||
|     <!-- 根据营养师ID查询最后一单的情况 --> | ||||
|     <select id="getLastOrderByNutritionistId" parameterType="Long" resultMap="SysOrderResult"> | ||||
|         select * from sys_order so | ||||
|         where del_flag = 0 and nutritionist_id = #{nutritionistId} order by order_id desc limit 1 | ||||
|     </select> | ||||
| </mapper> | ||||
		Reference in New Issue
	
	Block a user