客户档案的合同添加、复制健康调查链接
This commit is contained in:
		| @@ -508,5 +508,9 @@ | ||||
|         where sch.del_flag = 0 and sc.del_flag = 0 and sc.phone = #{phone} limit 1 | ||||
|     </select> | ||||
|  | ||||
|     <!-- 根据客户ID删除健康评估信息 --> | ||||
|     <update id="deleteCustomerHealthyByCustomerId" parameterType="Long"> | ||||
|         update sys_customer_healthy set del_flag = 1 where customer_id = #{customerId} | ||||
|     </update> | ||||
|  | ||||
| </mapper> | ||||
| @@ -207,4 +207,9 @@ | ||||
|         <include refid="selectSysCustomerPhysicalSigns"/> where scps.del_flag = 0 and sc.del_flag = 0 and sc.phone = #{phone} limit 1 | ||||
|     </select> | ||||
|  | ||||
|     <!-- 根据客户ID删除对应体征信息 --> | ||||
|     <update id="delCustomerSignByCustomerId" parameterType="Long"> | ||||
|         update sys_customer_physical_signs set del_flag = 1 where customer_id = #{customerId} | ||||
|     </update> | ||||
|  | ||||
| </mapper> | ||||
| @@ -318,7 +318,7 @@ | ||||
|     </select> | ||||
|  | ||||
|     <!-- 查询2021年开始的已审核的订单信息(用于计算提成) --> | ||||
|     <select id="selectSimpleOrderMessage" resultMap="SysOrderResultExtended"> | ||||
|     <select id="selectSimpleOrderMessage" resultMap="SysOrderResultExtended" parameterType="SysCommision"> | ||||
|       select o.order_id,o.order_time,o.start_time,o.customer,o.review_status,o.amount,o.serve_time_id,o.give_serve_day,o.after_sale_id,su_sale.nick_name as afterSale_name,o.nutritionist_id,su_nutritionist.nick_name as nutritionist_name | ||||
|       from sys_order o | ||||
|       left join sys_user su_sale on su_sale.user_id = o.after_sale_id and su_sale.del_flag = 0 | ||||
| @@ -327,6 +327,12 @@ | ||||
|       <if test="userId != null"> | ||||
|           and (su_sale.user_id = #{userId} or su_nutritionist.user_id = #{userId}) | ||||
|       </if> | ||||
|       <if test="beginTime != null and beginTime != ''"> | ||||
|           AND o.order_time >= #{beginTime} | ||||
|       </if> | ||||
|       <if test="endTime != null and endTime != ''"> | ||||
|           AND DATE_FORMAT(o.order_time,'%Y-%m-%d') <= #{endTime} | ||||
|       </if> | ||||
|       order by o.order_time desc | ||||
|     </select> | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user