|数据库名称|SQL语句|总执行次数|总执行时间(秒)|最大执行时长|平均执行时间|锁定总时长|最大锁定时长|解析总行数|解析最大行数|返回总行数|返回最大行数|
| - | - | - | - | - | - | - | - | - | - | - | - |
|statistic|update erp_sales_823688108565368832 set user_id = null , user_name = :1 , mobile_no = :2 where tenant_app_id = :3 and member_erp_id = :4 and user_name is null|1|1|1||0|0|3305|3305|0|0|
|platform|select s.* , ifnull ( pc.certsquantity , 0 ) as certsquantity , ifnull ( va.addvaluequantity , 0 ) as addvaluequantity from ( /*昨天的销售记录*/ select eid , vendorid , sid , count ( 1 ) as salesquantity from saleslog sl where vendorid = :1 and to_days ( :2 ) :3 to_days ( salesdate ) = :4 group by eid , vendorid , sid ) s left join ( /*昨天质保单*/ select eid , count ( 1 ) as certsquantity from productcerts where vendorid = :5 and to_days ( :6 ) :7 to_days ( createtime ) = :8 group by eid ) pc on s.eid = pc.eid left join ( /*昨天的增值计划*/ select empid , count ( 1 ) as addvaluequantity from valueaddedlog where vendorid = :9 and to_days ( :10 ) :11 to_days ( createtime ) = :12 group by empid ) va on va.empid = s.eid|1|2|2||0|0|43481|43481|0|0|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , -20000.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 328.83 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_490810080325931008 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|1|2|2||0|0|149193|149193|1|1|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 302.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|tag_service|select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_476787156229165056 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) limit :9|1|3|3||0|0|44067|44067|10|10|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , -3045.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|user_service|select tenantuser.user_id , user.nick_name , tenantuser.head_img_url , user.sex , user.mobile_no as mobile , user.country , user.province , user.city from tenant_user tenantuser join user user on tenantuser.user_id = user.id where ( tenantuser.tenant_app_id = :1 and tenantuser.user_id not in ( :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , :14 , :15 , :16 , :17 , :18 , :19 , :20 , :21 , :22 , :23 , :24 , :25 , :26 , :27 , :28 , :29 , :30 , :31 , :32 , :33 , :34 , :35 , :36 , :37 , :38 , :39 , :40 , :41 , :42 , :43 , :44 , :45 , :46 , :47 , :48 , :49 , :50 , :51 , :52 , :53 , :54 , :55 , :56 , :57 , :58 , :59 , :60 , :61 , :62 , :63 , :64 , :65 , :66 , :67 , :68 , :69 , :70 , :71 , :72 , :73 , :74 , :75 , :76 , :77 , :78 , :79 , :80 , :81 , :82 , :83 , :84 , :85 , :86 , :87 , :88 , :89 , :90 , :91 , :92 , :93 , :94 , :95 , :96 , :97 , :98 , :99 , :100 , :101 , :102 , :103 , :104 , :105 , :106 , :107 , :108 , :109 , :110 , :111 , :112 , :113 , :114 , :115 , :116 , :117 , :118 , :119 , :120 , :121 , :122 , :123 , :124 , :125 , :126 , :127 , :128 , :129 , :130 , :131 , :132 , :133 , :134 , :135 , :136 , :137 , :138 , :139 , :140 , :141 , :142 , :143 , :144 , :145 , :146 , :147 , :148 , :149 , :150 , :151 , :152 , :153 , :154 , :155 , :156 , :157 , :158 , :159 , :160 , :161 , :162 , :163 , :164 , :165 , :166 , :167 , :168 , :169 , :170 , :171 , :172 , :173 , :174 , :175 , :176 , :177 , :178 , :179 , :180 , :181 , :182 , :183 , :184 , :185 , :186 , :187 , :188 , :189 , :190 , :191 , :192 , :193 , :194 , :195 , :196 , :197 , :198 , :199 , :200 , :201 , :202 , :203 , :204 , :205 , :206 , :207 , :208 , :209 , :210 , :211 , :212 , :213 , :214 , :215 , :216 , :217 , :218 , :219 , :220 , :221 , :222 , :223 , :224 , :225 , :226 , :227 , :228 , :229 , :230 , :231 , :232 , :233 , :234 , :235 , :236 , :237 , :238 , :239 , :240 , :241 , :242 , :243 , :244 , :245 , :246 ) and ( user.nick_name like concat ( :247 , :248 , :249 ) or user.mobile_no = :250 ) ) order by tenantuser.create_time desc limit :251|1|7|7||0|0|2102533|2102533|1|1|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 1576.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|statistic|select es.id , es.tenant_id , es.tenant_wechatapp_id tenant_app_id , es.sales_erp_id , es.sales_no , es.sales_date , es.member_erp_id , es.amount , es.create_time , es.update_time , es.dept_erp_id , es.employee_erp_id , es.employee_name , is_sales has_sale , '2019-06-0223:59:59.0' collect_time , es.sales_status , '_885278795660111872' tableindex from tenant.erp_sales es where es.tenant_wechatapp_id = :1 and es.create_time >= :2 and es.create_time <= :3 limit :4 offset :5|1|3|3||0|0|698458|698458|352|352|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 2839.99 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|statistic|select bu.tenant_app_id , bu.user_id , count ( 1 ) order_amount from statistic.base_order_user bu left join statistic.order_info od on bu.tenant_app_id = od.tenant_app_id and bu.user_id = od.user_id where bu.tenant_app_id = :1 and od.status in ( :2 , :3 , :4 , :5 , :6 , :7 , :8 ) group by bu.tenant_app_id , bu.user_id|1|1|1||0|0|30450|30450|3|3|
|user_service|select tenantuser.user_id , user.nick_name , tenantuser.head_img_url , user.sex , user.mobile_no as mobile , user.country , user.province , user.city from tenant_user tenantuser join user user on tenantuser.user_id = user.id where ( tenantuser.tenant_app_id = :1 and tenantuser.user_id not in ( :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , :14 , :15 , :16 , :17 , :18 , :19 , :20 , :21 , :22 , :23 , :24 , :25 , :26 , :27 , :28 , :29 , :30 , :31 , :32 , :33 , :34 , :35 , :36 , :37 , :38 , :39 , :40 , :41 , :42 , :43 , :44 , :45 , :46 , :47 , :48 , :49 , :50 , :51 , :52 , :53 , :54 , :55 , :56 , :57 , :58 , :59 , :60 , :61 , :62 , :63 , :64 , :65 , :66 , :67 , :68 , :69 , :70 , :71 , :72 , :73 , :74 , :75 , :76 , :77 , :78 , :79 , :80 , :81 , :82 , :83 , :84 , :85 , :86 , :87 , :88 , :89 , :90 , :91 , :92 , :93 , :94 , :95 , :96 , :97 , :98 , :99 , :100 , :101 , :102 , :103 , :104 , :105 , :106 , :107 , :108 , :109 , :110 , :111 , :112 , :113 , :114 , :115 , :116 , :117 , :118 , :119 , :120 , :121 , :122 , :123 , :124 , :125 , :126 , :127 , :128 , :129 , :130 , :131 , :132 , :133 , :134 , :135 , :136 , :137 , :138 , :139 , :140 , :141 , :142 , :143 , :144 , :145 , :146 , :147 , :148 , :149 , :150 , :151 , :152 , :153 , :154 , :155 , :156 , :157 , :158 , :159 , :160 , :161 , :162 , :163 , :164 , :165 , :166 , :167 , :168 , :169 , :170 , :171 , :172 , :173 , :174 , :175 , :176 , :177 , :178 , :179 , :180 , :181 , :182 , :183 , :184 , :185 , :186 , :187 , :188 , :189 , :190 , :191 , :192 , :193 , :194 , :195 , :196 , :197 , :198 , :199 , :200 , :201 , :202 , :203 , :204 , :205 , :206 , :207 , :208 , :209 , :210 , :211 , :212 , :213 , :214 , :215 , :216 , :217 , :218 , :219 , :220 , :221 , :222 , :223 , :224 , :225 , :226 , :227 , :228 , :229 , :230 , :231 , :232 , :233 , :234 , :235 , :236 , :237 , :238 , :239 , :240 , :241 , :242 , :243 , :244 , :245 ) and ( user.nick_name like concat ( :246 , :247 , :248 ) or user.mobile_no = :249 ) ) order by tenantuser.create_time desc limit :250|1|3|3||0|0|2101545|2101545|1|1|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_482207042405273600 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|1|3|3||0|0|386722|386722|100|100|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 3559.66 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|statistic|select es.id , es.tenant_id , es.tenant_wechatapp_id tenant_app_id , es.sales_erp_id , es.sales_no , es.sales_date , es.member_erp_id , es.amount , es.create_time , es.update_time , es.dept_erp_id , es.employee_erp_id , es.employee_name , is_sales has_sale , '2019-06-0223:59:59.0' collect_time , es.sales_status , '_830220893509701632' tableindex from tenant.erp_sales es where es.tenant_wechatapp_id = :1 and es.create_time >= :2 and es.create_time <= :3 limit :4 offset :5|1|2|2||0|0|79950|79950|143|143|
|user_service|select tenantuser.user_id , user.nick_name , tenantuser.head_img_url , user.sex , user.mobile_no as mobile , user.country , user.province , user.city from tenant_user tenantuser join user user on tenantuser.user_id = user.id where ( tenantuser.tenant_app_id = :1 and tenantuser.user_id not in ( :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , :14 , :15 , :16 , :17 , :18 , :19 , :20 , :21 , :22 , :23 , :24 , :25 , :26 , :27 , :28 , :29 , :30 , :31 , :32 , :33 , :34 , :35 , :36 , :37 , :38 , :39 , :40 , :41 , :42 , :43 , :44 , :45 , :46 , :47 , :48 , :49 , :50 , :51 , :52 , :53 , :54 , :55 , :56 , :57 , :58 , :59 , :60 , :61 , :62 , :63 , :64 , :65 , :66 , :67 , :68 , :69 , :70 , :71 , :72 , :73 , :74 , :75 , :76 , :77 , :78 , :79 , :80 , :81 , :82 , :83 , :84 , :85 , :86 , :87 , :88 , :89 , :90 , :91 , :92 , :93 , :94 , :95 , :96 , :97 , :98 , :99 , :100 , :101 , :102 , :103 , :104 , :105 , :106 , :107 , :108 , :109 , :110 , :111 , :112 , :113 , :114 , :115 , :116 , :117 , :118 , :119 , :120 , :121 , :122 , :123 , :124 , :125 , :126 , :127 , :128 , :129 , :130 , :131 , :132 , :133 , :134 , :135 , :136 , :137 , :138 , :139 , :140 , :141 , :142 , :143 , :144 , :145 , :146 , :147 , :148 , :149 , :150 , :151 , :152 , :153 , :154 , :155 , :156 , :157 , :158 , :159 , :160 , :161 , :162 , :163 , :164 , :165 , :166 , :167 , :168 , :169 , :170 , :171 , :172 , :173 , :174 , :175 , :176 , :177 , :178 , :179 , :180 , :181 , :182 , :183 , :184 , :185 , :186 , :187 , :188 , :189 , :190 , :191 , :192 , :193 , :194 , :195 , :196 , :197 , :198 , :199 , :200 , :201 , :202 , :203 , :204 , :205 , :206 , :207 , :208 , :209 , :210 , :211 , :212 , :213 , :214 , :215 , :216 , :217 , :218 , :219 , :220 , :221 , :222 , :223 , :224 , :225 , :226 , :227 , :228 , :229 , :230 , :231 , :232 , :233 , :234 , :235 , :236 , :237 , :238 , :239 , :240 , :241 , :242 , :243 , :244 ) and ( user.nick_name like concat ( :245 , :246 , :247 ) or user.mobile_no = :248 ) ) order by tenantuser.create_time desc limit :249|1|4|4||0|0|2101544|2101544|1|1|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_476787156229165056 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and warranty_date = date_format ( :6 , :7 ) group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|1|1||0|0|520974|520974|77|77|
|activity_service|select ut.id , ut.user_name , ut.mobile_no , ut.data userheadimg , at.activity_name , ut.create_time from activity_service.user_trace ut left join activity_service.activity at on ut.activity_id = at.id where ut.step = :1 and ut.activity_id = :2 order by ut.create_time desc limit :3|1|4|4||0|0|526318|526318|1|1|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_885278795660111872 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|1|29|29||0|0|2665152|2665152|0|0|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_823688108565368832 where tenant_app_id = :3 and has_sale = :4 and sales_status = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|1|1||0|0|477714|477714|0|0|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_828766757295529984 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|1|3|3||0|0|204399|204399|0|0|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 203.33 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|user_service|update tenant_user set user_id = :1 , tenant_id = :2 , tenant_app_id = :3 , tenant_union_id = null , tenant_app_open_id = :4 , is_subscribe = :5 , subscribe_time = :6 , is_update_info = null , shop_id = :7 , erp_member_id = null , mobile_no = :8 , user_name = :9 , head_img_url = null , sex = :10 , birthday = null , birthday_is_lunar = null , address = null , memorial_name = null , memorial_day = null , memorial_day_is_lunar = null , interest = null , wx_card_code = null , wx_card_no = :11 , status = :12 , bind_time = :13 where id = :14|1|15|15||0|0|0|0|0|0|
|statistic|select es.id , es.tenant_id , es.tenant_wechatapp_id tenant_app_id , es.sales_erp_id , es.sales_no , es.sales_date , es.member_erp_id , es.amount , es.create_time , es.update_time , es.dept_erp_id , es.employee_erp_id , es.employee_name , is_sales has_sale , '2019-06-0223:59:59.0' collect_time , es.sales_status , '_822257848045047808' tableindex from tenant.erp_sales es where es.tenant_wechatapp_id = :1 and es.create_time >= :2 and es.create_time <= :3 limit :4 offset :5|1|3|3||0|0|304432|304432|312|312|
|account|select id , tenant_id , tenant_app_id , account_type , owner_type , owner_id , balance , cumulation , status from account where owner_type = :1 and balance < :2 and account_type = :3|1|15|15||0|0|3580402|3580402|38|38|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_480726380749918208 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|1|1||0|0|130991|130991|51|51|
|platform|select * from ( select c.* from coupon c join couponput cp on c.`id` = cp.couponid and cp.appid = :1 join ( select couponid , count ( 1 ) as cangetnum from coupondetail where couponstate = :2 /*已投放*/ group by couponid ) cd on c.id = cd.couponid left join ( select couponid , count ( 1 ) as num from coupondetail where getuid = :3 group by couponid ) cdm on c.id = cdm.couponid where now ( ) < c.expirydate /*礼券档案未过期*/ and cd.cangetnum > :4 /*可领数量大于0*/ and ( c.`perget` = :5 or c.`perget` > ifnull ( cdm.num , :6 ) ) /*未限每人领数量，或者当前用户领的数小于限制数*/ and c.`disabled` = :7 /*未停用*/ and ( c.vendorid = :8 or c.vendorid = :9 ) order by c.`facevalue` desc ) as tv limit :10 , :11|1|1|1||0|0|320159|320159|0|0|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 2218.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|statistic|update erp_sales_476787156229165056 set user_id = :1 , user_name = :2 , mobile_no = :3 where tenant_app_id = :4 and member_erp_id = :5 and user_name is null|1|3|3||0|0|4311|4311|0|0|
|tenant|select *from tenant.erp_sales where tenant_wechatapp_id = :1 and to_days ( sales_date ) -to_days ( now ( ) ) = :2 and is_sales = true|1|4|4||0|0|698459|698459|152|152|
|user_service|update tenant_user set user_id = :1 , tenant_id = :2 , tenant_app_id = :3 , tenant_union_id = null , tenant_app_open_id = :4 , is_subscribe = null , subscribe_time = null , is_update_info = null , shop_id = :5 , erp_member_id = null , mobile_no = :6 , user_name = :7 , head_img_url = null , sex = :8 , birthday = :9 , birthday_is_lunar = :10 , address = null , memorial_name = null , memorial_day = null , memorial_day_is_lunar = null , interest = null , wx_card_code = :11 , wx_card_no = :12 , status = :13 , bind_time = :14 where id = :15|1|15|15||0|0|0|0|0|0|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 134.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|statistic|select es.id , es.tenant_id , es.tenant_wechatapp_id tenant_app_id , es.sales_erp_id , es.sales_no , es.sales_date , es.member_erp_id , es.amount , es.create_time , es.update_time , es.dept_erp_id , es.employee_erp_id , es.employee_name , is_sales has_sale , '2019-06-0223:59:59.0' collect_time , es.sales_status , '_827516559562940416' tableindex from tenant.erp_sales es where es.tenant_wechatapp_id = :1 and es.create_time >= :2 and es.create_time <= :3 limit :4 offset :5|1|3|3||0|0|408146|408146|191|191|
|platform|select * from ( select * from coupondetail where getuid = :1 and ( couponstate = :2 or couponstate = :3 ) and expirytime >= now ( ) ) as tv limit :4 , :5|1|2|2||0|0|318761|318761|0|0|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 8521.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|statistic|select es.id , es.tenant_id , es.tenant_wechatapp_id tenant_app_id , es.sales_erp_id , es.sales_no , es.sales_date , es.member_erp_id , es.amount , es.create_time , es.update_time , es.dept_erp_id , es.employee_erp_id , es.employee_name , is_sales has_sale , '2019-06-0223:59:59.0' collect_time , es.sales_status , '_821229068421742592' tableindex from tenant.erp_sales es where es.tenant_wechatapp_id = :1 and es.create_time >= :2 and es.create_time <= :3 limit :4 offset :5|1|7|7||0|0|166081|166081|438|438|
|tag_service|select count ( 0 ) from ( select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_821174502091165696 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) ) tmp_count|1|2|2||0|0|28976|28976|1|1|
|tenant|update tenant.erp_sales es join tenant.erp_sales_detail esd on es.tenant_id = esd.tenant_id and es.tenant_wechatapp_id = esd.tenant_wechatapp_id and es.sales_erp_id = esd.sales_erp_id set is_sales = true where esd.sales_type = :1 and esd.tenant_id = :2 and es.is_sales = false|1|7|7||0|0|459749|459749|0|0|
|statistic|select tu.id , tu.user_id userid , tu.tenant_id tenantid , tu.tenant_app_id tenantappid , tu.shop_id shopid , tu.erp_member_id memberuserid , tu.user_name username , tu.mobile_no mobileno , ifnull ( tu.sex , 0 ) sex , tu.birthday , tu.birthday_is_lunar birthdayislunar , tu.memorial_name memorialname , tu.memorial_day memorialday , tu.memorial_day_is_lunar memorialdayislunar , 'unknow' sourcetype , tu.create_time createtime , '2019-06-0223:59:59.0' updatetime , if ( tu.bind_time is null , 0 , 1 ) bindflag , if ( tu.mobile_no is null , 0 , 1 ) fullflag , ifnull ( em.consumption_integral , 0 ) consumptionintegral , em.grade_erp_id gradeerpid , tu.bind_time bindtime , if ( ifnull ( tu.is_subscribe , 0 ) = 0 , 1 , 0 ) cancelflag , if ( ifnull ( tu.is_subscribe , 0 ) = 1 , 1 , 0 ) subscribeflag , if ( tu.is_subscribe = 1 , null , tu.subscribe_time ) canceltime , tu.subscribe_time , if ( ifnull ( tu.is_subscribe , 0 ) = 1 , '粉丝' , '游客' ) identity from user_service.tenant_user tu left join user_service.erp_member em on tu.tenant_app_id = em.tenant_wechatapp_id and tu.erp_member_id = em.member_erp_id where tu.tenant_app_id = :1 and tu.create_time >= :2 and tu.create_time <= :3 order by tu.id limit :4 offset :5|1|2|2||0|0|10031|10031|0|0|
|statistic|select tenant_wechatapp_id , erp_sales_id , id , date_format ( create_time , '%y-%m-%d' ) warranty_date , '_816096827580399616' tableindex from warranty_service.warranty where tenant_wechatapp_id = :1 and create_time >= :2 and create_time <= :3 order by id limit :4 offset :5|1|3|3||0|0|1722|1722|0|0|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 10.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|erp_to_platform|delete from erp_to_platform.sync_log where create_time < :1|1|3|3||0|0|35311|35311|0|0|
|payment|select id , tenant_id , tenant_app_id , goods_order_source , goods_order_no , goods_name , goods_amount , fee_type , request_ip , user_id , user_identify , user_sub_identify , pay_way , trade_type , order_start_time , order_expire_time , prepay_id , transaction_id , pay_amount , pay_finish_time , pay_status , pay_status_desc , error_msg , wxappid , sub_wxappid , mch_id , sub_mch_id , callback_tag , callback_result , create_time , update_time from pay_order where callback_result in ( :1 , :2 ) and pay_status in ( :3 , :4 ) order by id asc limit :5|1|2|2||0|0|39064|39064|0|0|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_819000302970638336 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|1|1|1||0|0|176301|176301|137|137|
|statistic|select t.shop_id id , t.shop_name name , t.totalamount , t.finishamount , t.finish_rate finishrate from ( select ec.shop_id , ec.shop_name , ec.totalamount , ec.finishamount , if ( ec.totalamount = 0 , 100 , round ( ec.finishamount*100/ec.totalamount , 2 ) ) finish_rate from ( select shop_id , shop_name , sum ( total_amount ) totalamount , sum ( finish_amount ) finishamount from result_employee_task where tenant_id = :1 and expire_date between :2 and :3 and shop_id != :4 and user_id != :5 group by shop_id , shop_name ) ec ) t order by t.finish_rate desc|1|3|3||0|0|49718|49718|24|24|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 3896.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 3.33 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|user_service|select count ( 0 ) from tenant_user tenantuser join user user on tenantuser.user_id = user.id where ( tenantuser.tenant_app_id = :1 and tenantuser.user_id not in ( :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , :14 , :15 , :16 , :17 , :18 , :19 , :20 , :21 , :22 , :23 , :24 , :25 , :26 , :27 , :28 , :29 , :30 , :31 , :32 , :33 , :34 , :35 ) and ( user.nick_name like concat ( :36 , :37 , :38 ) or user.mobile_no = :39 ) )|1|2|2||0|0|13838|13838|1|1|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 1044.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|wx_gateway|insert into wx_template_msg ( id , tenant_id , tenant_app_id , user_id , tenant_user_open_id , template_id , template_no , url , data , msg_id , status , err_msg , title , content , create_time , update_time , tenant_short_name , tenant_app_name , user_mobile_no , user_name , user_head_img_url ) values ( :1 , :2 , :3 , :4 , :5 , :6 , :7 , :8 , ... 集福 赠送333元礼券 66元可得","color":"#000066"},"keyword2":{"value":"已完成","color":"#000066"},"remark":{"value":"请点击详情完成下单支付，先到先得哦","color":"#ff3399"},"first":{"value":"尊敬的李玉侠贵宾您好，您参与的任务已经完成","color":"#000000"}}' , :9 , null , null , :10 , :11 , :12 , :13 , :14 , :15 , :16 , :17 , :18 )|1|15|15||0|0|0|0|0|0|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_816096827580399616 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|1|2|2||0|0|163623|163623|0|0|
|tag_service|select count ( 0 ) from ( select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_836408967545536512 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) ) tmp_count|1|2|2||0|0|4865|4865|1|1|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_488003299602206720 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|1|1||0|0|127758|127758|37|37|
|user_service|select tenantuser.user_id , user.nick_name , tenantuser.head_img_url , user.sex , user.mobile_no as mobile , user.country , user.province , user.city from tenant_user tenantuser join user user on tenantuser.user_id = user.id where ( tenantuser.tenant_app_id = :1 and tenantuser.user_id not in ( :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , :14 , :15 , :16 , :17 , :18 , :19 , :20 , :21 ) and ( user.nick_name like concat ( :22 , :23 , :24 ) or user.mobile_no = :25 ) ) order by tenantuser.create_time desc limit :26|1|3|3||0|0|1968498|1968498|1|1|
|tag_service|delete from tag_service.label_vip_match_821174502091165696 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_821174502091165696 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|1|1|1||0|0|54445|54445|0|0|
|tenant|select esd.id , esd.sales_erp_id , es.employee_name , esd.product_barcode , es.sales_no , es.member_erp_id , esd.category_name , es.sales_date , esd.category_erp_id , esd.product_name , esd.cert_no , esd.amount_pay , esd.sales_index from erp_sales_detail esd join erp_sales es on es.tenant_wechatapp_id = esd.tenant_wechatapp_id and es.sales_erp_id = esd.sales_erp_id where es.sales_status = :1 and es.tenant_wechatapp_id = :2 and esd.product_barcode = :3 order by es.sales_date desc|1|1|1||0|0|4416|4416|1035|1035|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_830220893509701632 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|5|5||0|0|80268|80268|44|44|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , -25794.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|statistic|select tu.id , tu.tenant_id tenantid , tu.tenant_wechatapp_id tenantappid , tu.member_erp_id memberuserid , tu.user_name username , tu.mobile_no mobileno , tu.create_time tempcreatetime , '2019-06-0223:59:59.0' updatetime , tu.dept_erp_id shopid , ifnull ( tu.consumption_integral , 0 ) consumptionintegral , tu.grade_erp_id gradeerpid , tu.employee_erp_id employeeuserid , 'unknow' sourcetype from user_service.erp_member tu left join user_service.tenant_user us on tu.tenant_wechatapp_id = us.tenant_app_id and tu.member_erp_id = us.erp_member_id where tu.tenant_wechatapp_id = :1 and tu.create_time >= :2 and tu.create_time <= :3 and us.id is null limit :4 offset :5|1|1|1||0|0|2935|2935|0|0|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_828766757295529984 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|3|3||0|0|122009|122009|56|56|
|statistic|select eu.tenant_id , eu.tenant_wechatapp_id , eu.employee_erp_id , eu.user_id , ifnull ( ee.employee_name , tu.user_name ) user_name from tenant.employee_user eu left join tenant.erp_employee ee on eu.tenant_id = ee.tenant_id and eu.employee_erp_id = ee.employee_erp_id left join user_service.tenant_user tu on eu.tenant_wechatapp_id = tu.tenant_app_id and eu.user_id = tu.user_id limit :1 offset :2|1|4|4||0|0|19058|19058|5000|5000|
|platform|select count ( 1 ) from `taskassignment` ta where ta.tasktype = :1 and ( ta.taskstatus = :2 or ta.taskstatus = :3 ) and vendorid = :4 and uid = :5|1|1|1||0|0|620848|620848|1|1|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 900.50 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|user_service|select count ( 0 ) from tenant_user tenantuser join user user on tenantuser.user_id = user.id where ( tenantuser.tenant_app_id = :1 and tenantuser.user_id not in ( :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , :14 , :15 , :16 , :17 , :18 , :19 , :20 , :21 , :22 , :23 , :24 , :25 , :26 , :27 , :28 , :29 , :30 , :31 , :32 , :33 , :34 , :35 , :36 , :37 , :38 , :39 , :40 , :41 , :42 , :43 , :44 , :45 , :46 , :47 , :48 , :49 , :50 , :51 , :52 , :53 , :54 , :55 , :56 , :57 , :58 , :59 , :60 , :61 , :62 , :63 , :64 , :65 , :66 , :67 , :68 , :69 , :70 , :71 , :72 , :73 , :74 , :75 , :76 , :77 , :78 , :79 , :80 , :81 , :82 , :83 , :84 , :85 , :86 , :87 , :88 , :89 , :90 , :91 , :92 , :93 , :94 , :95 , :96 , :97 , :98 , :99 , :100 , :101 , :102 , :103 , :104 , :105 , :106 , :107 , :108 , :109 , :110 , :111 , :112 , :113 , :114 , :115 , :116 , :117 , :118 , :119 , :120 , :121 , :122 , :123 , :124 , :125 , :126 , :127 , :128 , :129 , :130 , :131 , :132 , :133 , :134 , :135 , :136 , :137 , :138 , :139 , :140 , :141 , :142 , :143 , :144 , :145 , :146 , :147 , :148 , :149 , :150 , :151 , :152 , :153 , :154 , :155 , :156 , :157 , :158 , :159 , :160 , :161 , :162 , :163 , :164 , :165 , :166 , :167 , :168 , :169 , :170 , :171 , :172 , :173 , :174 , :175 , :176 , :177 , :178 , :179 , :180 , :181 , :182 , :183 , :184 , :185 , :186 , :187 , :188 , :189 , :190 , :191 , :192 , :193 , :194 , :195 , :196 , :197 , :198 , :199 , :200 , :201 , :202 , :203 , :204 , :205 , :206 , :207 , :208 , :209 , :210 , :211 , :212 , :213 , :214 , :215 , :216 , :217 , :218 , :219 , :220 , :221 , :222 , :223 , :224 , :225 , :226 , :227 , :228 , :229 , :230 , :231 , :232 , :233 , :234 , :235 , :236 , :237 , :238 , :239 , :240 , :241 , :242 , :243 ) and ( user.nick_name like concat ( :244 , :245 , :246 ) or user.mobile_no = :247 ) )|1|13|13||0|0|276356|276356|1|1|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 7728.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 117.33 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|statistic|select count ( 0 ) from backlog where tenant_id = :1 and tenant_app_id = :2 and shop_id = :3 and scene = :4 and user_name > :5 and shop_name > :6|1|10|10||0|0|1099732|1099732|1|1|
|statistic|update erp_sales_469175049962786816 set user_id = :1 , user_name = :2 , mobile_no = :3 where tenant_app_id = :4 and member_erp_id = :5 and user_name is null|1|2|2||0|0|1896|1896|0|0|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 898.67 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 797.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|statistic|select tenant_wechatapp_id , erp_sales_id , id , date_format ( create_time , '%y-%m-%d' ) warranty_date , '_823844580729339904' tableindex from warranty_service.warranty where tenant_wechatapp_id = :1 and create_time >= :2 and create_time <= :3 order by id limit :4 offset :5|1|5|5||0|0|22776|22776|174|174|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 2985.47 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 320.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_826254702915141632 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|1|1|1||0|0|23221|23221|0|0|
|value_added|-- 增值达到最大天数 select 'value_added_subtract_contact' as limitdaytype , tenant_wechatapp_id , user_id , group_concat ( t.product_barcode order by product_barcode asc ) as productcode , group_concat ( t.product_name order by product_barcode asc ) as productname from value_added_user t where tenant_wechatapp_id = :1 and state = :2 and t.create_time >= date_add ( date_format ( :3 , :4 ) , interval :5 * ( add_days+keeping_days-1 ) day ) and t.create_time < date_add ( date_format ( :6 , :7 ) , interval ( :8 * ( add_days+keeping_days-1 ) :9 :10 ) day ) group by tenant_wechatapp_id , user_id|1|2|2||0|0|22113|22113|44|44|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 1452.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 585.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_480726380749918208 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|1|3|3||0|0|281294|281294|0|0|
|value_added|-- 根据添加时间得出当前增值金额 update value_added_user set amount_added = if ( :1 > ( ( ( added_percent_per_day / :2 ) * if ( :3 >= timestampdiff ( day , date_format ( create_time , :4 ) , now ( ) ) :5 :6 :7 add_days , timestampdiff ( day , date_format ( create_time , :8 ) , now ( ) ) :9 :10 , add_days ) ) :11 ( ( devalue_percent_per_day / :12 ) * if ( :13 >= timestampdiff ( day , date_format ( create_time , :14 ) , now ( ) ) :15 :16 :17 add_days :18 keeping_days , :19 , timestampdiff ( day , date_format ( create_time , :20 ) , now ( ) ) :21 :22 :23 add_days :24 keeping_days ) ) ) * amount_pay , :25 , ( ( ( added_percent_per_day / :26 ) * if ( :27 >= timestampdiff ( day , date_format ( create_time , :28 ) , now ( ) ) :29 :30 :31 add_days , timestampdiff ( day , date_format ( create_time , :32 ) , now ( ) ) :33 :34 , add_days ) ) :35 ( ( devalue_percent_per_day / :36 ) * if ( :37 >= timestampdiff ( day , date_format ( create_time , :38 ) , now ( ) ) :39 :40 :41 add_days :42 keeping_days , :43 , timestampdiff ( day , date_format ( create_time , :44 ) , now ( ) ) :45 :46 :47 add_days :48 keeping_days ) ) ) * amount_pay ) , update_time = now ( ) where state = :49 and update_time <= curdate ( ) and ( create_time >= date_add ( curdate ( ) , interval :50 ( add_days :51 keeping_days :52 :53 ) day ) or ( amount_added > :54 and create_time < date_add ( curdate ( ) , interval :55 ( add_days :56 keeping_days :57 :58 ) day ) ) ) -- 判断条件 在增值时间内 增值金大于0 状态正常|1|4|4||0|0|113310|113310|0|0|
|statistic|select tu.tenant_id , tu.tenant_wechatapp_id , tt.activity_name , tu.activity_id , tu.user_id , date_format ( tu.create_time , '%y-%m-%d' ) statistic_date from activity_service.assist_task_user tu inner join activity_service.activity tt on tu.activity_id = tt.id where tu.tenant_wechatapp_id = :1 and tu.create_time >= :2 and tu.create_time <= :3 limit :4 offset :5|1|5|5||0|0|337194|337194|0|0|
|statistic|select tenant_wechatapp_id , erp_sales_id , id , date_format ( create_time , '%y-%m-%d' ) warranty_date , '_827516559562940416' tableindex from warranty_service.warranty where tenant_wechatapp_id = :1 and create_time >= :2 and create_time <= :3 order by id limit :4 offset :5|1|15|15||0|0|440927|440927|48|48|
|statistic|select t.tenant_id , t.tenant_app_id , t.coupon_id , if ( t.coupon_type = 4 , vt.template_name , ct.coupon_name ) coupon_name , t.statistic_date , t.create_channel , count ( 1 ) get_amount from ( select tenant_id , tenant_app_id , coupon_template_id coupon_id , create_channel , date_format ( create_time , '%y-%m-%d' ) statistic_date , coupon_type from statistic.coupon_user where tenant_app_id = :1 and create_time >= :2 and create_time <= :3 ) t left join coupon_service.coupon_template ct on t.coupon_id = ct.id left join value_added.value_added_template vt on t.tenant_app_id = vt.tenant_wechatapp_id and t.coupon_id = vt.id group by t.tenant_id , t.tenant_app_id , t.coupon_id , ct.coupon_name , t.statistic_date , t.create_channel , t.coupon_type|1|4|4||0|0|339343|339343|0|0|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 1251.67 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 8736.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|statistic|select tenant_wechatapp_id , erp_sales_id , id , date_format ( create_time , '%y-%m-%d' ) warranty_date , '_819000302970638336' tableindex from warranty_service.warranty where tenant_wechatapp_id = :1 and create_time >= :2 and create_time <= :3 order by id limit :4 offset :5|1|1|1||0|0|5510|5510|63|63|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 9637.33 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|user_service|select employee_erp_id as employeeerpid , count ( * ) as membernum from erp_member t where t.tenant_id = :1 and t.tenant_wechatapp_id = :2 and t.employee_erp_id in ( :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 ) group by employee_erp_id|1|1|1||0|0|4835|4835|9|9|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 25.33 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_487569764496052224 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|1|1|1||0|0|99771|99771|0|0|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , -2977.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|account|select id , tenant_id , tenant_wechatapp_id , account_type , user_id , mch_billno , send_name , mch_id , sub_mch_id , wxappid , msgappid , re_openid , total_amount , total_num , wishing , client_ip , act_name , remark , scene_id , risk_info , consume_mch_id , send_time , order_status , failure_reason , biz_id , biz_type , biz_tag , send_listid , need_callback , create_time , update_time , user_name , mobile_no , receive_time , refund_amount , refund_time from wx_redpacket_send_order where order_status in ( :1 , :2 ) order by id desc|1|2|2||0|0|15172|15172|6|6|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 2960.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_885278795660111872 where tenant_app_id = :3 and has_sale = :4 and sales_status = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|3|3||0|0|1368823|1368823|118|118|
|tag_service|select count ( 0 ) from ( select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_818632945152598016 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) ) tmp_count|1|2|2||0|0|9330|9330|1|1|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_488003299602206720 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|1|6|6||0|0|575075|575075|0|0|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_885418658174709760 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|1|2|2||0|0|14068|14068|0|0|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_817517269994225664 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|1|1||0|0|36583|36583|29|29|
|statistic|select tenant_wechatapp_id , erp_sales_id , id , date_format ( create_time , '%y-%m-%d' ) warranty_date , '_814640285408600064' tableindex from warranty_service.warranty where tenant_wechatapp_id = :1 and create_time >= :2 and create_time <= :3 order by id limit :4 offset :5|1|3|3||0|0|9572|9572|39|39|
|tag_service|select id , tenant_app_id , shop_id , vip_id , vip_source , vip_label from label_vip_match_821174502091165696 where tenant_app_id = :1 and vip_id = :2|1|1|1||0|0|27277|27277|1|1|
|tag_service|delete from tag_service.batch_step_execution_context where step_execution_id <= :1|1|15|15||0|0|0|0|0|0|
|user_service|select employee_erp_id as employeeerpid , count ( * ) as membernum from erp_member t where t.tenant_id = :1 and t.tenant_wechatapp_id = :2 and t.employee_erp_id in ( :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , :14 , :15 , :16 , :17 , :18 , :19 , :20 , :21 , :22 , :23 , :24 , :25 , :26 , :27 , :28 , :29 , :30 , :31 , :32 , :33 , :34 , :35 , :36 ) group by employee_erp_id|1|2|2||0|0|14127|14127|31|31|
|user_service|select tenantuser.user_id , user.nick_name , tenantuser.head_img_url , user.sex , user.mobile_no as mobile , user.country , user.province , user.city from tenant_user tenantuser join user user on tenantuser.user_id = user.id where ( tenantuser.tenant_app_id = :1 and tenantuser.user_id not in ( :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , :14 , :15 , :16 , :17 , :18 , :19 , :20 , :21 , :22 , :23 , :24 , :25 , :26 , :27 , :28 , :29 , :30 , :31 , :32 , :33 , :34 , :35 , :36 , :37 , :38 , :39 , :40 , :41 , :42 , :43 , :44 , :45 , :46 , :47 , :48 , :49 , :50 , :51 , :52 , :53 , :54 , :55 , :56 , :57 , :58 , :59 , :60 , :61 , :62 , :63 , :64 , :65 , :66 , :67 , :68 , :69 , :70 , :71 , :72 , :73 , :74 , :75 , :76 , :77 , :78 , :79 , :80 , :81 , :82 , :83 , :84 , :85 , :86 , :87 , :88 ) and ( user.nick_name like concat ( :89 , :90 , :91 ) or user.mobile_no = :92 ) ) order by tenantuser.create_time desc limit :93|1|3|3||0|0|1208984|1208984|6|6|
|statistic|select es.id , es.tenant_id , es.tenant_wechatapp_id tenant_app_id , es.sales_erp_id , es.sales_no , es.sales_date , es.member_erp_id , es.amount , es.create_time , es.update_time , es.dept_erp_id , es.employee_erp_id , es.employee_name , is_sales has_sale , '2019-06-0223:59:59.0' collect_time , es.sales_status , '_816450513213112320' tableindex from tenant.erp_sales es where es.tenant_wechatapp_id = :1 and es.update_time >= :2 and es.create_time <= :3 and es.update_time <= :4 limit :5 offset :6|1|1|1||0|0|19155|19155|0|0|
|statistic|select primary_key_id id , score , date_format ( create_time , '%y-%m-%d' ) comment_date , content , '_821229068421742592' tableindex from comment_service.comment where tenant_wechatapp_id = :1 and create_time >= :2 and create_time <= :3 order by primary_key_id limit :4 offset :5|1|2|2||0|0|52039|52039|13|13|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_885278795660111872 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|16|16||0|0|1368823|1368823|118|118|
|statistic|select od.id , od.tenant_id , od.tenant_wechatapp_id tenant_app_id , od.order_no , od.source , od.type , od.activity_id , od.activity_type , od.user_id , od.user_name , od.mobile_no , od.take_type , td.shop_id , td.shop_name , od.coupon_id , dt.product_id goods_id , dt.product_name goods_name , dt.art_no style_no , dt.sku_id , dt.spec , gs.barcode , od.product_fee , od.freight_fee , od.discount_fee , od.total_fee , od.payment_fee , od.status , od.finish_type , od.take_shop_id , od.take_shop_name , od.take_employee_user_id , od.take_employee_user_name , od.manager_shop_id , od.manager_shop_name , od.manager_user_id , od.manager_user_name , od.manager_mobile_no , od.manager_brokerage , od.create_time , od.update_time , '2019-06-0223:59:59.0' collect_time , dt.quantity from `order`.order_info od left join order.order_detail dt on od.id = dt.order_id left join deliver.trade_deliver td on od.id = td.trade_id left join goods.goods_sku gs on dt.sku_id = gs.id where od.tenant_wechatapp_id = :1 and od.create_time >= :2 and od.create_time <= :3 limit :4 offset :5|1|3|3||0|0|32732|32732|268|268|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_816440425157005312 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|1|2|2||0|0|61628|61628|0|0|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.redpack_amount ) redpack_amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.redpack_amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , sum ( ifnull ( redpack_amount , 0 ) ) redpack_amount from statistic.erp_sales_823688108565368832 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and redpack_date = date_format ( :6 , :7 ) group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|1|1||0|0|476675|476675|0|0|
|customize_page|select id , tenant_id , tenant_wechatapp_id , page_id , user_id , tenant_app_open_id , create_time , update_time , business_id , src_type , user_name , mobile_no , head_img from award_qualified where page_id = :1 and ( user_id = :2 or tenant_app_open_id = :3 )|1|2|2||0|0|365892|365892|0|0|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 4798.66 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 6870.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|tag_service|select count ( 0 ) from ( select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_487569764496052224 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) ) tmp_count|1|5|5||0|0|9680|9680|1|1|
|activity_service|/* applicationname = datagrip 2018.2.2 */ select * from statistic.result_employee_task where tenant_app_id = :1|1|1|1||0|0|102285|102285|502|502|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 938.33 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_823688108565368832 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|4|4||0|0|477714|477714|0|0|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) dept_erp_id , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , 0 value_add_amount from value_added.value_added_template vt inner join value_added.value_added_category vc on vt.id = vc.template_id and vt.is_disable = :1 inner join statistic.erp_sales_detail_476787156229165056 sd on vc.tenant_wechatapp_id = sd.tenant_app_id and vc.erp_product_category_id = sd.category_erp_id left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where vt.tenant_wechatapp_id = :2 and sd.sales_status = :3 and sd.sales_type = :4 and sd.create_time >= :5 and sd.create_time <= :6 and sd.value_add_no is null and os.shop_id != :7 and oe.employee_user_id != :8 limit :9 offset :10|1|2|2||0|0|791952|791952|243|243|
|sms|select count ( 0 ) from ( select a.phone_numbers as phoneno , concat ( '【' , a.sign_name , '】' , case when b.content is not null then b.content when stc.content is not null then stc.content else a.template_param end ) as content , a.template_code , a.out_id as outid , a.template_param , a.create_time as sendtime , a.create_time as recevietime , a.code as state , a.send_count , a.message from sms_send a left join sms_template b on a.template_code = b.code left join sms_template_custom stc on a.tenant_app_id = stc.tenant_app_id and a.template_code = stc.code and stc.status = :1 where a.phone_numbers = :2 ) table_count|1|7|7||0|0|820235|820235|1|1|
|statistic|select sd.product_barcode , ifnull ( es.amount , 0 ) amount , sd.tenant_app_id , es.sales_date , es.dept_erp_id , sd.tenant_id , ifnull ( sd.statistic_date , es.sales_date ) statistic_date from ( select tenant_id , tenant_app_id , sales_erp_id , product_barcode , date_format ( create_time , '%y-%m-%d' ) statistic_date from statistic.erp_sales_detail_490810080325931008 where tenant_app_id = :1 and create_time >= :2 and create_time <= :3 and sales_type = :4 and sales_status = :5 ) sd inner join ( select tenant_id , tenant_app_id , sales_erp_id , amount , sales_date , dept_erp_id from statistic.erp_sales_490810080325931008 where tenant_app_id = :6 and create_time >= :7 and create_time <= :8 ) es on sd.tenant_app_id = es.tenant_app_id and sd.sales_erp_id = es.sales_erp_id limit :9 offset :10|1|1|1||0|0|72396|72396|0|0|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 1988.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|statistic|select ec.scene , ec.totalamount , ec.finishamount , if ( ec.totalamount = 0 , 100 , round ( ec.finishamount*100/ec.totalamount , 2 ) ) finishrate from ( select scene , sum ( total_amount ) totalamount , sum ( finish_amount ) finishamount from result_employee_task where tenant_id = :1 and expire_date between :2 and :3 and user_id != :4 and shop_name != :5 group by scene ) ec order by ec.scene|1|3|3||0|0|49646|49646|6|6|
|tag_service|select max ( job_execution_id ) jobid from tag_service.batch_job_execution where create_time < :1|1|1|1||0|0|39171|39171|1|1|
|user_service|select tenantuser.user_id , user.nick_name , tenantuser.head_img_url , user.sex , user.mobile_no as mobile , user.country , user.province , user.city from tenant_user tenantuser join user user on tenantuser.user_id = user.id where ( tenantuser.tenant_app_id = :1 and tenantuser.user_id not in ( :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , :14 , :15 , :16 , :17 , :18 , :19 , :20 , :21 , :22 , :23 , :24 , :25 , :26 , :27 , :28 , :29 , :30 , :31 , :32 , :33 , :34 , :35 , :36 , :37 , :38 , :39 , :40 , :41 , :42 , :43 , :44 , :45 , :46 , :47 , :48 , :49 , :50 , :51 , :52 , :53 , :54 , :55 , :56 , :57 , :58 , :59 , :60 , :61 , :62 , :63 , :64 , :65 , :66 , :67 , :68 , :69 , :70 , :71 , :72 , :73 , :74 , :75 , :76 , :77 , :78 , :79 , :80 , :81 , :82 , :83 , :84 , :85 , :86 , :87 , :88 , :89 , :90 , :91 , :92 , :93 , :94 , :95 , :96 , :97 , :98 , :99 ) and ( user.nick_name like concat ( :100 , :101 , :102 ) or user.mobile_no = :103 ) ) order by tenantuser.create_time desc limit :104|1|7|7||0|0|1977373|1977373|1|1|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 1022.33 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount , sum ( tmp.score ) score from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount , t.score from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount , sum ( ifnull ( score , 0 ) ) score from statistic.erp_sales_885278795660111872 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and comment_date = date_format ( :6 , :7 ) group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|3|3||0|0|1367904|1367904|7|7|
|statistic|select tmp.shopid id , tmp.shopname name , tmp.amount saleamount , tmp.addamount valueamount , tmp.addrate finishrate from ( select t.shop_id shopid , t.shop_name shopname , t.amount , t.addamount , if ( t.amount = 0 , 100 , round ( t.addamount*100/t.amount ) ) addrate , t.valueaddamount from ( select sd.shop_id , os.shop_name , sum ( finish_amount ) addamount , sum ( un_finish_amount ) +sum ( finish_amount ) amount , sum ( ifnull ( sd.value_add_amount , 0 ) ) valueaddamount from statistic.result_employee_value sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.shop_id = os.shop_id left join ( select ep.* from statistic.off_employee ep inner join ( select tenant_app_id , employee_user_id , max ( employee_erp_id ) employee_erp_id from statistic.off_employee group by tenant_app_id , employee_user_id ) dep on ep.tenant_app_id = dep.tenant_app_id and ep.employee_erp_id = dep.employee_erp_id and ep.employee_user_id = dep.employee_user_id ) oe on sd.tenant_app_id = oe.tenant_app_id and sd.user_id = oe.employee_user_id where sd.tenant_id = :1 and sd.shop_id != :2 and sd.user_id != :3 and sd.sales_date between :4 and :5 group by sd.shop_id , os.shop_name ) t ) tmp order by tmp.addrate desc|1|1|1||0|0|42243|42243|12|12|
|tag_service|select * from tag_service.mark_vip_label_task t where exec_status = :1 order by id desc|1|1|1||0|0|8609|8609|7816|7816|
|account|/* applicationname = datagrip 2018.2.2 */ select * from user_service.tenant_user where user_name = :1|1|4|4||0|0|1964088|1964088|329|329|
|platform|select `vendorid` , `memberid` , `salesdate` , `noteid` , `noteno` , `empid` , `empname` , `amounttotal` , `quantitytotal` , `integraltotal` , `salesstoreid` , `staffattitude` , `professionallevel` , `appearance` , `storeimage` , `productdisplay` , `salescomment` , `commenttime` , `replycontent` , `replytime` , `replyuser` , `tipfee` , `tipmorderid` , `tippayno` , `tippaytime` , `status` , `aftersalesremark` , `uid` , `eid` , `sid` , `id` from `saleslog` where vendorid = :1 and tipfee > :2 and tippayno is not null and date_sub ( date ( :3 ) , interval :4 day ) = date_format ( tippaytime , :5 )|1|6|6||0|0|120774|120774|0|0|
|wx_gateway|insert into wx_template_msg ( id , tenant_id , tenant_app_id , user_id , tenant_user_open_id , template_id , template_no , url , data , msg_id , status , err_msg , title , content , create_time , update_time , tenant_short_name , tenant_app_name , user_mobile_no , user_name , user_head_img_url ) values ( :1 , :2 , :3 , :4 , :5 , :6 , :7 , :8 , ... 集福 赠送333元礼券 66元可得","color":"#000066"},"keyword2":{"value":"已完成","color":"#000066"},"remark":{"value":"请点击详情完成下单支付，先到先得哦","color":"#ff3399"},"first":{"value":"尊敬的王伟强贵宾您好，您参与的任务已经完成","color":"#000000"}}' , :9 , null , null , :10 , :11 , :12 , :13 , :14 , :15 , :16 , :17 , :18 )|1|15|15||0|0|0|0|0|0|
|user_service|select count ( 0 ) from tenant_user tenantuser join user user on tenantuser.user_id = user.id where ( tenantuser.tenant_app_id = :1 and tenantuser.user_id not in ( :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , :14 , :15 , :16 , :17 , :18 , :19 , :20 , :21 , :22 , :23 , :24 , :25 , :26 , :27 , :28 , :29 , :30 , :31 , :32 , :33 , :34 , :35 , :36 , :37 , :38 , :39 , :40 , :41 , :42 , :43 , :44 , :45 , :46 , :47 , :48 , :49 , :50 , :51 , :52 , :53 , :54 , :55 , :56 , :57 , :58 , :59 , :60 , :61 , :62 , :63 , :64 , :65 , :66 , :67 , :68 , :69 , :70 , :71 , :72 , :73 , :74 , :75 , :76 , :77 , :78 , :79 , :80 , :81 , :82 , :83 , :84 , :85 , :86 , :87 , :88 , :89 , :90 , :91 , :92 , :93 , :94 , :95 , :96 , :97 , :98 , :99 , :100 , :101 , :102 , :103 , :104 , :105 , :106 , :107 , :108 , :109 , :110 , :111 , :112 , :113 , :114 , :115 , :116 , :117 , :118 , :119 , :120 , :121 , :122 , :123 , :124 , :125 , :126 , :127 , :128 , :129 , :130 , :131 , :132 , :133 , :134 , :135 , :136 , :137 , :138 , :139 , :140 , :141 , :142 , :143 , :144 , :145 , :146 , :147 , :148 , :149 , :150 , :151 , :152 , :153 , :154 , :155 , :156 , :157 , :158 , :159 , :160 , :161 , :162 , :163 , :164 , :165 , :166 , :167 , :168 , :169 , :170 , :171 , :172 , :173 , :174 , :175 , :176 , :177 , :178 , :179 , :180 , :181 , :182 , :183 , :184 , :185 , :186 , :187 , :188 , :189 , :190 , :191 , :192 , :193 , :194 , :195 , :196 , :197 , :198 , :199 , :200 , :201 , :202 , :203 , :204 , :205 , :206 , :207 , :208 , :209 , :210 , :211 , :212 , :213 , :214 , :215 , :216 , :217 , :218 , :219 , :220 , :221 , :222 , :223 , :224 , :225 , :226 , :227 , :228 , :229 , :230 , :231 , :232 , :233 , :234 , :235 , :236 , :237 , :238 , :239 , :240 , :241 , :242 , :243 , :244 , :245 , :246 ) and ( user.nick_name like concat ( :247 , :248 , :249 ) or user.mobile_no = :250 ) )|1|2|2||0|0|276401|276401|1|1|
|user_service|select count ( 0 ) from tenant_user tenantuser join user user on tenantuser.user_id = user.id where ( tenantuser.tenant_app_id = :1 and tenantuser.user_id not in ( :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , :14 , :15 , :16 , :17 , :18 , :19 ) and ( user.nick_name like concat ( :20 , :21 , :22 ) or user.mobile_no = :23 ) )|1|1|1||0|0|19094|19094|1|1|
|user_service|select tenantuser.user_id , user.nick_name , tenantuser.head_img_url , user.sex , user.mobile_no as mobile , user.country , user.province , user.city from tenant_user tenantuser join user user on tenantuser.user_id = user.id where ( tenantuser.tenant_app_id = :1 and tenantuser.user_id not in ( :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , :14 , :15 , :16 , :17 , :18 , :19 ) and ( user.nick_name like concat ( :20 , :21 , :22 ) or user.mobile_no = :23 ) ) order by tenantuser.create_time desc limit :24|1|6|6||0|0|1970031|1970031|1|1|
|platform|select ifnull ( eid , 0 ) as eid , ifnull ( shopid , 0 ) as sid , vendorid , count ( 1 ) as quantity from productcerts where vendorid = :1 and to_days ( :2 ) :3 to_days ( createtime ) = :4 group by eid , shopid , vendorid|1|1|1||0|0|28984|28984|0|0|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_832396582723833856 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|1|1||0|0|7986|7986|5|5|
|tag_service|insert into tag_service.member_statistic_226cb108917b84ae709970b60089d0ed select t1.id , t1.tenant_id , t1.tenant_app_id , t2.shop_id , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employee_user_id , t2.grade_erp_id , t1.user_id as userid , t1.member_user_id as memberuserid , '' as shopname , '' as employeeusername , t1.user_name as username , t1.mobile_no as mobileno , t1.age , t1.sex , date_format ( t1.birthday , '%y-%m-%d' ) as birthday , t1.birthday_is_lunar as birthdayislunar , t1.memorial_name as memorialname , date_format ( t1.memorial_day , '%y-%m-%d' ) as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t1.source_type as sourcetype , t1.identity , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.cancel_flag as cancelflag , '' as gradename , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , t2.last_service_time as lastservicetime , ifnull ( t2.registe_time , if ( t1.user_id is null and t1.member_user_id is not null , t1.create_time , null ) ) as registetime , t2.first_shop_time as firstshoptime , t2.last_shop_time as lastshoptime , t2.first_sales_time as firstsalestime , t2.last_sales_time as lastsalestime , t2.last_login_time as lastlogintime , t2.last_score_time as lastscoretime , t2.follow_time as followtime , t2.cancel_follow_time as cancelfollowtime , t2.bind_time as bindtime , t2.category_name as categoryname from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_821174502091165696 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5|1|1|1||0|0|7128|7128|0|0|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 484.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 7.50 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|statistic|select tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.source_type , sum ( tmp.amount ) amount from ( select t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , t.source_type , t.amount from ( select mb.tenant_id , mb.tenant_app_id , mb.shop_id , mb.source_type , count ( 1 ) amount from statistic.member mb where mb.tenant_app_id = :1 and mb.create_time between :2 and :3 and mb.register_flag = :4 group by mb.tenant_id , mb.tenant_app_id , mb.shop_id , mb.source_type ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and ( t.shop_id = os.dept_erp_id or t.shop_id = os.shop_id ) ) tmp group by tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.source_type|1|1|1||0|0|351125|351125|34|34|
|statistic|select tenant_wechatapp_id , erp_sales_id , id , date_format ( create_time , '%y-%m-%d' ) warranty_date , '_818691468687347712' tableindex from warranty_service.warranty where tenant_wechatapp_id = :1 and create_time >= :2 and create_time <= :3 order by id limit :4 offset :5|1|1|1||0|0|2450|2450|28|28|
|statistic|select sd.product_barcode , ifnull ( es.amount , 0 ) amount , sd.tenant_app_id , es.sales_date , es.dept_erp_id , sd.tenant_id , ifnull ( sd.statistic_date , es.sales_date ) statistic_date from ( select tenant_id , tenant_app_id , sales_erp_id , product_barcode , date_format ( create_time , '%y-%m-%d' ) statistic_date from statistic.erp_sales_detail_476787156229165056 where tenant_app_id = :1 and create_time >= :2 and create_time <= :3 and sales_type = :4 and sales_status = :5 ) sd inner join ( select tenant_id , tenant_app_id , sales_erp_id , amount , sales_date , dept_erp_id from statistic.erp_sales_476787156229165056 where tenant_app_id = :6 and create_time >= :7 and create_time <= :8 ) es on sd.tenant_app_id = es.tenant_app_id and sd.sales_erp_id = es.sales_erp_id limit :9 offset :10|1|2|2||0|0|903949|903949|2|2|
|statistic|select tenant_wechatapp_id , erp_sales_id , id , date_format ( create_time , '%y-%m-%d' ) warranty_date , '_818707624273952768' tableindex from warranty_service.warranty where tenant_wechatapp_id = :1 and create_time >= :2 and create_time <= :3 order by id limit :4 offset :5|1|3|3||0|0|14737|14737|36|36|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_817878088380628992 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|2|2||0|0|21063|21063|15|15|
|user_service|select * from user_service.tenant_user where tenant_app_id = :1 and is_subscribe = :2 and date_format ( birthday , :3 ) = :4 and if ( :5 , birthday_is_lunar = :6 , ( birthday_is_lunar = :7 or birthday_is_lunar is null ) ) and user_id in ( :8 , :9 , :10 , :11 , :12 , :13 , :14 , :15 , :16 , :17 , :18 , :19 , :20 , :21 , :22 , :23 , :24 , :25 , :26 , :27 , :28 , :29 , :30 , :31 , :32 , :33 , :34 , :35 , :36 , :37 , :38 , :39 , :40 , :41 , :42 , :43 , :44 , :45 , :46 , :47 , :48 , :49 , :50 , :51 , :52 , :53 , :54 , :55 , :56 , :57 , :58 , :59 , :60 , :61 , :62 , :63 , :64 , :65 , :66 , :67 , :68 , :69 , :70 , :71 , :72 , :73 , :74 , :75 , :76 , :77 , :78 , :79 , :80 , :81 , :82 , :83 , :84 , :85 , :86 , :87 , :88 , :89 , :90 , :91 , :92 , :93 , :94 , :95 , :96 , :97 , :98 , :99 , :100 , :101 , :102 , :103 , :104 , :105 , :106 , :107 , :108 , :109 , :110 , :111 , :112 , :113 , :114 , :115 , :116 , :117 , :118 , :119 , :120 , :121 , :122 , :123 , :124 , :125 , :126 , :127 , :128 , :129 , :130 , :131 , :132 , :133 , :134 , :135 , :136 , :137 , :138 , :139 , :140 , :141 , :142 , :143 , :144 , :145 , :146 , :147 , :148 , :149 , :150 , :151 , :152 , :153 , :154 , :155 , :156 , :157 , :158 , :159 , :160 , :161 , :162 , :163 , :164 , :165 , :166 , :167 , :168 , :169 , :170 , :171 , :172 , :173 , :174 , :175 , :176 , :177 , :178 , :179 , :180 , :181 , :182 , :183 , :184 , :185 , :186 , :187 , :188 , :189 , :190 , :191 , :192 , :193 , :194 , :195 , :196 , :197 , :198 , :199 , :200 , :201 , :202 , :203 , :204 , :205 , :206 , :207 , :208 , :209 , :210 , :211 , :212 , :213 , :214 , :215 , :216 , :217 , :218 , :219 , :220 , :221 , :222 , :223 , :224 , :225 , :226 , :227 , :228 , :229 , :230 , :231 , :232 , :233 , :234 , :235 , :236 , :237 , :238 , :239 , :240 , :241 , :242 , :243 , :244 , :245 , :246 , :247 , :248 , :249 , :250 , :251 , :252 , :253 , :254 , :255 , :256 , :257 , :258 , :259 , :260 , :261 , :262 , :263 , :264 , :265 , :266 , :267 , :268 , :269 , :270 , :271 , :272 , :273 , :274 , :275 , :276 , :277 , :278 , :279 , :280 , :281 , :282 , :283 , :284 , :285 , :286 , :287 , :288 , :289 , :290 , :291 , :292 , :293 , :294 , :295 , :296 , :297 , :298 , :299 , :300 , :301 , :302 , :303 , :304 , :305 , :306 , :307 , :308 , :309 , :310 , :311 , :312 , :313 , :314 , :315 , :316 , :317 , :318 , :319 , :320 , :321 , :322 , :323 , :324 , :325 , :326 , :327 , :328 , :329 , :330 , :331 , :332 , :333 , :334 , :335 , :336 , :337 , :338 , :339 , :340 , :341 , :342 , :343 , :344 , :345 , :346 , :347 , :348 , :349 , :350 , :351 , :352 , :353 , :354 , :355 , :356 , :357 , :358 , :359 , :360 , :361 , :362 , :363 , :364 , :365 , :366 , :367 , :368 , :369 , :370 , :371 , :372 , :373 , :374 , :375 , :376 , :377 , :378 , :379 , :380 , :381 , :382 , :383 , :384 , :385 , :386 , :387 , :388 , :389 , :390 , :391 , :392 , :393 , :394 , :395 , :396 , :397 , :398 , :399 , :400 , :401 , :402 , :403 , :404 , :405 , :406 , :407 , :408 , :409 , :410 , :411 , :412 , :413 , :414 , :415 , :416 , :417 , :418 , :419 , :420 , :421 , :422 , :423 , :424 , :425 , :426 , :427 , :428 , :429 , :430 , :431 , :432 , :433 , :434 , :435 , :436 , :437 , :438 , :439 , :440 , :441 , :442 , :443 , :444 , :445 , :446 , :447 , :448 , :449 , :450 , :451 , :452 , :453 , :454 , :455 , :456 , :457 , :458 , :459 , :460 , :461 , :462 , :463 , :464 , :465 , :466 , :467 , :468 , :469 , :470 , :471 , :472 , :473 , :474 , :475 , :476 , :477 , :478 , :479 , :480 , :481 , :482 , :483 , :484 , :485 , :486 , :487 , :488 , :489 , :490 , :491 , :492 , :493 , :494 , :495 , :496 , :497 , :498 , :499 , :500 , :501 , :502 , :503 , :504 , :505 , :506 , :507 , :508 , :509 , :510 , :511 , :512 , :513 , :514 , :515 , :516 , :517 , :518 , :519 , :520 , :521 , :522 , :523 , :524 , :525 , :526 , :527 , :528 , :529 , :530 , :531 , :532 , :533 , :534 , :535 , :536 , :537 , :538 , :539 , :540 , :541 , :542 , :543 , :544 , :545 , :546 , :547 , :548 , :549 , :550 , :551 , :552 , :553 , :554 , :555 , :556 , :557 , :558 , :559 , :560 , :561 , :562 , :563 , :564 , :565 , :566 , :567 , :568 , :569 , :570 , :571 , :572 , :573 , :574 , :575 , :576 , :577 , :578 , :579 , :580 , :581 , :582 , :583 , :584 , :585 , :586 , :587 , :588 , :589 , :590 , :591 , :592 , :593 , :594 , :595 , :596 , :597 , :598 , :599 , :600 , :601 , :602 , :603 , :604 , :605 , :606 , :607 , :608 , :609 , :610 , :611 , :612 , :613 , :614 , :615 , :616 , :617 , :618 , :619 , :620 , :621 , :622 , :623 , :624 , :625 , :626 , :627 , :628 , :629 , :630 , :631 , :632 , :633 , :634 , :635 , :636 , :637 , :638 , :639 , :640 , :641 , :642 , :643 , :644 , :645 , :646 , :647 , :648 , :649 , :650 , :651 , :652 , :653 , :654 , :655 , :656 , :657 , :658 , :659 , :660 , :661 , :662 , :663 , :664 , :665 , :666 , :667 , :668 , :669 , :670 , :671 , :672 , :673 , :674 , :675 , :676 , :677 , :678 , :679 , :680 , :681 , :682 , :683 , :684 , :685 , :686 , :687 , :688 , :689 , :690 , :691 , :692 , :693 , :694 , :695 , :696 , :697 , :698 , :699 , :700 , :701 , :702 , :703 , :704 , :705 , :706 , :707 , :708 , :709 , :710 , :711 , :712 , :713 , :714 , :715 , :716 , :717 , :718 , :719 , :720 , :721 , :722 , :723 , :724 , :725 , :726 , :727 , :728 , :729 , :730 , :731 , :732 , :733 , :734 , :735 , :736 , :737 , :738 , :739 , :740 , :741 , :742 , :743 , :744 , :745 , :746 , :747 , :748 , :749 , :750 , :751 , :752 , :753 , :754 , :755 , :756 , :757 , :758 , :759 , :760 , :761 , :762 , :763 , :764 , :765 , :766 , :767 , :768 , :769 , :770 , :771 , :772 , :773 , :774 , :775 , :776 , :777 , :778 , :779 , :780 , :781 , :782 , :783 , :784 , :785 , :786 , :787 , :788 , :789 , :790 , :791 , :792 , :793 , :794 , :795 , :796 , :797 , :798 , :799 , :800 , :801 , :802 , :803 , :804 , :805 , :806 , :807 , :808 , :809 , :810 , :811 , :812 , :813 , :814 , :815 , :816 , :817 , :818 , :819 , :820 , :821 , :822 , :823 , :824 , :825 , :826 , :827 , :828 , :829 , :830 , :831 , :832 , :833 , :834 , :835 , :836 , :837 , :838 , :839 , :840 , :841 , :842 , :843 , :844 , :845 , :846 , :847 , :848 , :849 , :850 , :851 , :852 , :853 , :854 , :855 , :856 , :857 , :858 , :859 , :860 , :861 , :862 , :863 , :864 , :865 , :866 , :867 , :868 , :869 , :870 , :871 , :872 , :873 , :874 , :875 , :876 , :877 , :878 , :879 , :880 , :881 , :882 , :883 , :884 , :885 , :886 , :887 , :888 , :889 , :890 , :891 , :892 , :893 , :894 , :895 , :896 , :897 , :898 , :899 , :900 , :901 , :902 , :903 , :904 , :905 , :906 , :907 , :908 , :909 , :910 , :911 , :912 , :913 , :914 , :915 , :916 , :917 , :918 , :919 , :920 , :921 , :922 , :923 , :924 , :925 , :926 , :927 , :928 , :929 , :930 , :931 , :932 , :933 , :934 , :935 , :936 , :937 , :938 , :939 , :940 , :941 , :942 , :943 , :944 , :945 , :946 , :947 , :948 , :949 , :950 , :951 , :952 , :953 , :954 , :955 , :956 , :957 , :958 , :959 , :960 , :961 , :962 , :963 , :964 , :965 , :966 , :967 , :968 , :969 , :970 , :971 , :972 , :973 , :974 , :975 , :976 , :977 , :978 , :979 , :980 , :981 , :982 , :983 , :984 , :985 , :986 , :987 , :988 , :989 , :990 , :991 , :992 , :993 , :994 , :995 , :996 , :997 , :998 , :999 , :1000 , :1001 , :1002 , :1003 , :1004 , :1005 , :1006 , :1007 , :1008 , :1009 , :1010 , :1011 , :1012 , :1013 , :1014 , :1015 , :1016 , :1017 , :1018 , :1019 , :1020 , :1021 , :1022 , :1023 , :1024 , :1025 , :1026 , :1027 , :1028 , :1029 , :1030 , :1031 , :1032 , :1033 , :1034 , :1035 , :1036 , :1037 , :1038 , :1039 , :1040 , :1041 , :1042 , :1043 , :1044 , :1045 , :1046 , :1047 , :1048 , :1049 , :1050 , :1051 , :1052 , :1053 , :1054 , :1055 , :1056 , :1057 , :1058 , :1059 , :1060 , :1061 , :1062 , :1063 , :1064 , :1065 , :1066 , :1067 , :1068 , :1069 , :1070 , :1071 , :1072 , :1073 , :1074 , :1075 , :1076 , :1077 , :1078 , :1079 , :1080 , :1081 , :1082 , :1083 , :1084 , :1085 , :1086 , :1087 , :1088 , :1089 , :1090 , :1091 , :1092 , :1093 , :1094 , :1095 , :1096 , :1097 , :1098 , :1099 , :1100 , :1101 , :1102 , :1103 , :1104 , :1105 , :1106 , :1107 , :1108 , :1109 , :1110 , :1111 , :1112 , :1113 , :1114 , :1115 , :1116 , :1117 , :1118 , :1119 , :1120 , :1121 , :1122 , :1123 , :1124 , :1125 , :1126 , :1127 , :1128 , :1129 , :1130 , :1131 , :1132 , :1133 , :1134 , :1135 , :1136 , :1137 , :1138 , :1139 , :1140 , :1141 , :1142 , :1143 , :1144 , :1145 , :1146 , :1147 , :1148 , :1149 , :1150 , :1151 , :1152 , :1153 , :1154 , :1155 , :1156 , :1157 , :1158 , :1159 , :1160 , :1161 , :1162 , :1163 , :1164 , :1165 , :1166 , :1167 , :1168 , :1169 , :1170 , :1171 , :1172 , :1173 , :1174 , :1175 , :1176 , :1177 , :1178 , :1179 , :1180 , :1181 , :1182 , :1183 , :1184 , :1185 , :1186 , :1187 , :1188 , :1189 , :1190 , :1191 , :1192 , :1193 , :1194 , :1195 , :1196 , :1197 , :1198 , :1199 , :1200 , :1201 , :1202 , :1203 , :1204 , :1205 , :1206 , :1207 , :1208 , :1209 , :1210 , :1211 , :1212 , :1213 , :1214 , :1215 , :1216 , :1217 , :1218 , :1219 , :1220 , :1221 , :1222 , :1223 , :1224 , :1225 , :1226 , :1227 , :1228 , :1229 , :1230 , :1231 , :1232 , :1233 , :1234 , :1235 , :1236 , :1237 , :1238 , :1239 , :1240 , :1241 , :1242 , :1243 , :1244 , :1245 , :1246 , :1247 , :1248 , :1249 , :1250 , :1251 , :1252 , :1253 , :1254 , :1255 , :1256 , :1257 , :1258 , :1259 , :1260 , :1261 , :1262 , :1263 , :1264 , :1265 , :1266 , :1267 , :1268 , :1269 , :1270 , :1271 , :1272 , :1273 , :1274 , :1275 , :1276 , :1277 , :1278 , :1279 , :1280 , :1281 , :1282 , :1283 , :1284 , :1285 , :1286 , :1287 , :1288 , :1289 , :1290 , :1291 , :1292 , :1293 , :1294 , :1295 , :1296 , :1297 , :1298 , :1299 , :1300 , :1301 , :1302 , :1303 , :1304 , :1305 , :1306 , :1307 , :1308 , :1309 , :1310 , :1311 , :1312 , :1313 , :1314 , :1315 , :1316 , :1317 , :1318 , :1319 , :1320 , :1321 , :1322 , :1323 , :1324 , :1325 , :1326 , :1327 , :1328 , :1329 , :1330 , :1331 , :1332 , :1333 , :1334 , :1335 , :1336 , :1337 , :1338 , :1339 , :1340 , :1341 , :1342 , :1343 , :1344 , :1345 , :1346 , :1347 , :1348 , :1349 , :1350 , :1351 , :1352 , :1353 , :1354 , :1355 , :1356 , :1357 , :1358 , :1359 , :1360 , :1361 , :1362 , :1363 , :1364 , :1365 , :1366 , :1367 , :1368 , :1369 , :1370 , :1371 , :1372 , :1373 , :1374 , :1375 , :1376 , :1377 , :1378 , :1379 , :1380 , :1381 , :1382 , :1383 , :1384 , :1385 , :1386 , :1387 , :1388 , :1389 , :1390 , :1391 , :1392 , :1393 , :1394 , :1395 , :1396 , :1397 , :1398 , :1399 , :1400 , :1401 , :1402 , :1403 , :1404 , :1405 , :1406 , :1407 , :1408 , :1409 , :1410 , :1411 , :1412 , :1413 , :1414 , :1415 , :1416 , :1417 , :1418 , :1419 , :1420 , :1421 , :1422 , :1423 , :1424 , :1425 , :1426 , :1427 , :1428 , :1429 , :1430 , :1431 , :1432 , :1433 , :1434 , :1435 , :1436 , :1437 , :1438 , :1439 , :1440 , :1441 , :1442 , :1443 , :1444 , :1445 , :1446 , :1447 , :1448 , :1449 , :1450 , :1451 , :1452 , :1453 , :1454 , :1455 , :1456 , :1457 , :1458 , :1459 , :1460 , :1461 , :1462 , :1463 , :1464 , :1465 , :1466 , :1467 , :1468 , :1469 , :1470 , :1471 , :1472 , :1473 , :1474 , :1475 , :1476 , :1477 , :1478 , :1479 , :1480 , :1481 , :1482 , :1483 , :1484 , :1485 , :1486 , :1487 , :1488 , :1489 , :1490 , :1491 , :1492 , :1493 , :1494 , :1495 , :1496 , :1497 , :1498 , :1499 , :1500 , :1501 , :1502 , :1503 , :1504 , :1505 , :1506 , :1507 , :1508 , :1509 , :1510 , :1511 , :1512 , :1513 , :1514 , :1515 , :1516 , :1517 , :1518 , :1519 , :1520 , :1521 , :1522 , :1523 , :1524 , :1525 , :1526 , :1527 , :1528 , :1529 , :1530 , :1531 , :1532 , :1533 , :1534 , :1535 , :1536 , :1537 , :1538 , :1539 , :1540 , :1541 , :1542 , :1543 , :1544 , :1545 , :1546 , :1547 , :1548 , :1549 , :1550 , :1551 , :1552 , :1553 , :1554 , :1555 , :1556 , :1557 , :1558 , :1559 , :1560 , :1561 , :1562 , :1563 , :1564 , :1565 , :1566 , :1567 , :1568 , :1569 , :1570 , :1571 , :1572 , :1573 , :1574 , :1575 , :1576 , :1577 , :1578 , :1579 , :1580 , :1581 , :1582 , :1583 , :1584 , :1585 , :1586 , :1587 , :1588 , :1589 , :1590 , :1591 , :1592 , :1593 , :1594 , :1595 , :1596 , :1597 , :1598 , :1599 , :1600 , :1601 , :1602 , :1603 , :1604 , :1605 , :1606 , :1607 , :1608 , :1609 , :1610 , :1611 , :1612 , :1613 , :1614 , :1615 , :1616 , :1617 , :1618 , :1619 , :1620 , :1621 , :1622 , :1623 , :1624 , :1625 , :1626 , :1627 , :1628 , :1629 , :1630 , :1631 , :1632 , :1633 , :1634 , :1635 , :1636 , :1637 , :1638 , :1639 , :1640 , :1641 , :1642 , :1643 , :1644 , :1645 , :1646 , :1647 , :1648 , :1649 , :1650 , :1651 , :1652 , :1653 , :1654 , :1655 , :1656 , :1657 , :1658 , :1659 , :1660 , :1661 , :1662 , :1663 , :1664 , :1665 , :1666 , :1667 , :1668 , :1669 , :1670 , :1671 , :1672 , :1673 , :1674 , :1675 , :1676 , :1677 , :1678 , :1679 , :1680 , :1681 , :1682 , :1683 , :1684 , :1685 , :1686 , :1687 , :1688 , :1689 , :1690 , :1691 , :1692 , :1693 , :1694 , :1695 , :1696 , :1697 , :1698 , :1699 , :1700 , :1701 , :1702 , :1703 , :1704 , :1705 , :1706 , :1707 , :1708 , :1709 , :1710 , :1711 , :1712 , :1713 , :1714 , :1715 , :1716 , :1717 , :1718 , :1719 , :1720 , :1721 , :1722 , :1723 , :1724 , :1725 , :1726 , :1727 , :1728 , :1729 , :1730 , :1731 , :1732 , :1733 , :1734 , :1735 , :1736 , :1737 , :1738 , :1739 , :1740 , :1741 , :1742 , :1743 , :1744 , :1745 , :1746 , :1747 , :1748 , :1749 , :1750 , :1751 , :1752 , :1753 , :1754 , :1755 , :1756 , :1757 , :1758 , :1759 , :1760 , :1761 , :1762 , :1763 , :1764 , :1765 , :1766 , :1767 , :1768 , :1769 , :1770 , :1771 , :1772 , :1773 , :1774 , :1775 , :1776 , :1777 , :1778 , :1779 , :1780 , :1781 , :1782 , :1783 , :1784 , :1785 , :1786 , :1787 , :1788 , :1789 , :1790 , :1791 , :1792 , :1793 , :1794 , :1795 , :1796 , :1797 , :1798 , :1799 , :1800 , :1801 , :1802 , :1803 , :1804 , :1805 , :1806 , :1807 , :1808 , :1809 , :1810 , :1811 , :1812 , :1813 , :1814 , :1815 , :1816 , :1817 , :1818 , :1819 , :1820 , :1821 , :1822 , :1823 , :1824 , :1825 , :1826 , :1827 , :1828 , :1829 , :1830 , :1831 , :1832 , :1833 , :1834 , :1835 , :1836 , :1837 , :1838 , :1839 , :1840 , :1841 , :1842 , :1843 , :1844 , :1845 , :1846 , :1847 , :1848 , :1849 , :1850 , :1851 , :1852 , :1853 , :1854 , :1855 , :1856 , :1857 , :1858 , :1859 , :1860 , :1861 , :1862 , :1863 , :1864 , :1865 , :1866 , :1867 , :1868 , :1869 , :1870 , :1871 , :1872 , :1873 , :1874 , :1875 , :1876 , :1877 , :1878 , :1879 , :1880 , :1881 , :1882 , :1883 , :1884 , :1885 , :1886 , :1887 , :1888 , :1889 , :1890 , :1891 , :1892 , :1893 , :1894 , :1895 , :1896 , :1897 , :1898 , :1899 , :1900 , :1901 , :1902 , :1903 , :1904 , :1905 , :1906 , :1907 , :1908 , :1909 , :1910 , :1911 , :1912 , :1913 , :1914 , :1915 , :1916 , :1917 , :1918 , :1919 , :1920 , :1921 , :1922 , :1923 , :1924 , :1925 , :1926 , :1927 , :1928 , :1929 , :1930 , :1931 , :1932 , :1933 , :1934 , :1935 , :1936 , :1937 , :1938 , :1939 , :1940 , :1941 , :1942 , :1943 , :1944 , :1945 , :1946 , :1947 , :1948 , :1949 , :1950 , :1951 , :1952 , :1953 , :1954 , :1955 , :1956 , :1957 , :1958 , :1959 , :1960 , :1961 , :1962 , :1963 , :1964 , :1965 , :1966 , :1967 , :1968 , :1969 , :1970 , :1971 , :1972 , :1973 , :1974 , :1975 , :1976 , :1977 , :1978 , :1979 , :1980 , :1981 , :1982 , :1983 , :1984 , :1985 , :1986 , :1987 , :1988 , :1989 , :1990 , :1991 , :1992 , :1993 , :1994 , :1995 , :1996 , :1997 , :1998 , :1999 , :2000 , :2001 , :2002 , :2003 , :2004 , :2005 , :2006 , :2007 , :2008 , :2009 , :2010 , :2011 , :2012 , :2013 , :2014 , :2015 , :2016 , :2017 , :2018 , :2019 , :2020 , :2021 , :2022 , :2023 , :2024 , :2025 , :2026 , :2027 , :2028 , :2029 , :2030 , :2031 , :2032 , :2033 , :2034 , :2035 , :2036 , :2037 , :2038 , :2039 , :2040 , :2041 , :2042 , :2043 , :2044 , :2045 , :2046 , :2047 , :2048 , :2049 , :2050 , :2051 , :2052 , :2053 , :2054 , :2055 , :2056 , :2057 , :2058 , :2059 , :2060 , :2061 , :2062 , :2063 , :2064 , :2065 , :2066 , :2067 , :2068 , :2069 , :2070 , :2071 , :2072 , :2073 , :2074 , :2075 , :2076 , :2077 , :2078 , :2079 , :2080 , :2081 , :2082 , :2083 , :2084 , :2085 , :2086 , :2087 , :2088 , :2089 , :2090 , :2091 , :2092 , :2093 , :2094 , :2095 , :2096 , :2097 , :2098 , :2099 , :2100 , :2101 , :2102 , :2103 , :2104 , :2105 , :2106 , :2107 , :2108 , :2109 , :2110 , :2111 , :2112 , :2113 , :2114 , :2115 , :2116 , :2117 , :2118 , :2119 , :2120 , :2121 , :2122 , :2123 , :2124 , :2125 , :2126 , :2127 , :2128 , :2129 , :2130 , :2131 , :2132 , :2133 , :2134 , :2135 , :2136 , :2137 , :2138 , :2139 , :2140 , :2141 , :2142 , :2143 , :2144 , :2145 , :2146 , :2147 , :2148 , :2149 , :2150 , :2151 , :2152 , :2153 , :2154 , :2155 , :2156 , :2157 , :2158 , :2159 , :2160 , :2161 , :2162 , :2163 , :2164 , :2165 , :2166 , :2167 , :2168 , :2169 , :2170 , :2171 , :2172 , :2173 , :2174 , :2175 , :2176 , :2177 , :2178 , :2179 , :2180 , :2181 , :2182 , :2183 , :2184 , :2185 , :2186 , :2187 , :2188 , :2189 , :2190 , :2191 , :2192 , :2193 , :2194 , :2195 , :2196 , :2197 , :2198 , :2199 , :2200 , :2201 , :2202 , :2203 , :2204 , :2205 , :2206 , :2207 , :2208 , :2209 , :2210 , :2211 , :2212 , :2213 , :2214 , :2215 , :2216 , :2217 , :2218 , :2219 , :2220 , :2221 , :2222 , :2223 , :2224 , :2225 , :2226 , :2227 , :2228 , :2229 , :2230 , :2231 , :2232 , :2233 , :2234 , :2235 , :2236 , :2237 , :2238 , :2239 , :2240 , :2241 , :2242 , :2243 , :2244 , :2245 , :2246 , :2247 , :2248 , :2249 , :2250 , :2251 , :2252 , :2253 , :2254 , :2255 , :2256 , :2257 , :2258 , :2259 , :2260 , :2261 , :2262 , :2263 , :2264 , :2265 , :2266 , :2267 , :2268 , :2269 , :2270 , :2271 , :2272 , :2273 , :2274 , :2275 , :2276 , :2277 , :2278 , :2279 , :2280 , :2281 , :2282 , :2283 , :2284 , :2285 , :2286 , :2287 , :2288 , :2289 , :2290 , :2291 , :2292 , :2293 , :2294 , :2295 , :2296 , :2297 , :2298 , :2299 , :2300 , :2301 , :2302 , :2303 , :2304 , :2305 , :2306 , :2307 , :2308 , :2309 , :2310 , :2311 , :2312 , :2313 , :2314 , :2315 , :2316 , :2317 , :2318 , :2319 , :2320 , :2321 , :2322 , :2323 , :2324 , :2325 , :2326 , :2327 , :2328 , :2329 , :2330 , :2331 , :2332 , :2333 , :2334 , :2335 , :2336 , :2337 , :2338 , :2339 , :2340 , :2341 , :2342 , :2343 , :2344 , :2345 , :2346 , :2347 , :2348 , :2349 , :2350 , :2351 , :2352 , :2353 , :2354 , :2355 , :2356 , :2357 , :2358 , :2359 , :2360 , :2361 , :2362 , :2363 , :2364 , :2365 , :2366 , :2367 , :2368 , :2369 , :2370 , :2371 , :2372 , :2373 , :2374 , :2375 , :2376 , :2377 , :2378 , :2379 , :2380 , :2381 , :2382 , :2383 , :2384 , :2385 , :2386 , :2387 , :2388 , :2389 , :2390 , :2391 , :2392 , :2393 , :2394 , :2395 , :2396 , :2397 , :2398 , :2399 , :2400 , :2401 , :2402 , :2403 , :2404 , :2405 , :2406 , :2407 , :2408 , :2409 , :2410 , :2411 , :2412 , :2413 , :2414 , :2415 , :2416 , :2417 , :2418 , :2419 , :2420 , :2421 , :2422 , :2423 , :2424 , :2425 , :2426 , :2427 , :2428 , :2429 , :2430 , :2431 , :2432 , :2433 , :2434 , :2435 , :2436 , :2437 , :2438 , :2439 , :2440 , :2441 , :2442 , :2443 , :2444 , :2445 , :2446 , :2447 , :2448 , :2449 , :2450 , :2451 , :2452 , :2453 , :2454 , :2455 , :2456 , :2457 , :2458 , :2459 , :2460 , :2461 , :2462 , :2463 , :2464 , :2465 , :2466 , :2467 , :2468 , :2469 , :2470 , :2471 , :2472 , :2473 , :2474 , :2475 , :2476 , :2477 , :2478 , :2479 , :2480 , :2481 , :2482 , :2483 , :2484 , :2485 , :2486 , :2487 , :2488 , :2489 , :2490 , :2491 , :2492 , :2493 , :2494 , :2495 , :2496 , :2497 , :2498 , :2499 , :2500 , :2501 , :2502 , :2503 , :2504 , :2505 , :2506 , :2507 , :2508 , :2509 , :2510 , :2511 , :2512 , :2513 , :2514 , :2515 , :2516 , :2517 , :2518 , :2519 , :2520 , :2521 , :2522 , :2523 , :2524 , :2525 , :2526 , :2527 , :2528 , :2529 , :2530 , :2531 , :2532 , :2533 , :2534 , :2535 , :2536 , :2537 , :2538 , :2539 , :2540 , :2541 , :2542 , :2543 , :2544 , :2545 , :2546 , :2547 , :2548 , :2549 , :2550 , :2551 , :2552 , :2553 , :2554 , :2555 , :2556 , :2557 , :2558 , :2559 , :2560 , :2561 , :2562 , :2563 , :2564 , :2565 , :2566 , :2567 , :2568 , :2569 , :2570 , :2571 , :2572 , :2573 , :2574 , :2575 , :2576 , :2577 , :2578 , :2579 , :2580 , :2581 , :2582 , :2583 , :2584 , :2585 , :2586 , :2587 , :2588 , :2589 , :2590 , :2591 , :2592 , :2593 , :2594 , :2595 , :2596 , :2597 , :2598 , :2599 , :2600 , :2601 , :2602 , :2603 , :2604 , :2605 , :2606 , :2607 , :2608 , :2609 , :2610 , :2611 , :2612 , :2613 , :2614 , :2615 , :2616 , :2617 , :2618 , :2619 , :2620 , :2621 , :2622 , :2623 , :2624 , :2625 , :2626 , :2627 , :2628 , :2629 , :2630 , :2631 , :2632 , :2633 , :2634 , :2635 , :2636 , :2637 , :2638 , :2639 , :2640 , :2641 , :2642 , :2643 , :2644 , :2645 , :2646 , :2647 , :2648 , :2649 , :2650 , :2651 , :2652 , :2653 , :2654 , :2655 , :2656 , :2657 , :2658 , :2659 , :2660 , :2661 , :2662 , :2663 , :2664 , :2665 , :2666 , :2667 , :2668 , :2669 , :2670 , :2671 , :2672 , :2673 , :2674 , :2675 , :2676 , :2677 , :2678 , :2679 , :2680 , :2681 , :2682 , :2683 , :2684 , :2685 , :2686 , :2687 , :2688 , :2689 , :2690 , :2691 , :2692 , :2693 , :2694 , :2695 , :2696 , :2697 , :2698 , :2699 , :2700 , :2701 , :2702 , :2703 , :2704 , :2705 , :2706 , :2707 , :2708 , :2709 , :2710 , :2711 , :2712 , :2713 , :2714 , :2715 , :2716 , :2717 , :2718 , :2719 , :2720 , :2721 , :2722 , :2723 , :2724 , :2725 , :2726 , :2727 , :2728 , :2729 , :2730 , :2731 , :2732 , :2733 , :2734 , :2735 , :2736 , :2737 , :2738 , :2739 , :2740 , :2741 , :2742 , :2743 , :2744 , :2745 , :2746 , :2747 , :2748 , :2749 , :2750 , :2751 , :2752 , :2753 , :2754 , :2755 , :2756 , :2757 , :2758 , :2759 , :2760 , :2761 , :2762 , :2763 , :2764 , :2765 , :2766 , :2767 , :2768 , :2769 , :2770 , :2771 , :2772 , :2773 , :2774 , :2775 , :2776 , :2777 , :2778 , :2779 , :2780 , :2781 , :2782 , :2783 , :2784 , :2785 , :2786 , :2787 , :2788 , :2789 , :2790 , :2791 , :2792 , :2793 , :2794 , :2795 , :2796 , :2797 , :2798 , :2799 , :2800 , :2801 , :2802 , :2803 , :2804 , :2805 , :2806 , :2807 , :2808 , :2809 , :2810 , :2811 , :2812 , :2813 , :2814 , :2815 , :2816 , :2817 , :2818 , :2819 , :2820 , :2821 , :2822 , :2823 , :2824 , :2825 , :2826 , :2827 , :2828 , :2829 , :2830 , :2831 , :2832 , :2833 , :2834 , :2835 , :2836 , :2837 , :2838 , :2839 , :2840 , :2841 , :2842 , :2843 , :2844 , :2845 , :2846|1|1|1||0|0|7392|7392|0|0|
|customize_page|select q.page_id as id , page.title , page.valid_days , q.create_time , q.id as qualifiedid from customize_page.award_qualified q inner join customize_page.customize_page page on q.page_id = page.id inner join ( select aq.page_id from customize_page.award_qualified aq inner join customize_page.award_detail ad on aq.page_id = ad.page_id left join customize_page.award_receive_detail ard on aq.id = ard.qualified_id and ad.id = ard.award_id and aq.user_id = ard.user_id where ( aq.user_id = :1 or aq.tenant_app_open_id = :2 ) and ard.id is null and ( ( ad.put_quantity >= ad.get_quantity and ad.type = :3 ) or ad.type not in ( :4 ) ) group by aq.page_id ) as d on d.page_id = q.page_id where q.tenant_wechatapp_id = :5 and ( user_id = :6 or tenant_app_open_id = :7 ) and if ( page.valid_days = :8 , true , to_days ( now ( ) ) < ( to_days ( q.create_time ) :9 page.valid_days ) ) order by q.create_time desc|1|3|3||0|0|365893|365893|0|0|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_469175049962786816 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|1|1||0|0|6928|6928|9|9|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 390.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|statistic|select tenant_wechatapp_id , erp_sales_id , id , date_format ( create_time , '%y-%m-%d' ) warranty_date , '_830220893509701632' tableindex from warranty_service.warranty where tenant_wechatapp_id = :1 and create_time >= :2 and create_time <= :3 order by id limit :4 offset :5|1|7|7||0|0|8732|8732|126|126|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , -110246.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 1317.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 1860.33 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_486900027235635200 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|2|2||0|0|63016|63016|0|0|
|statistic|select tenant_wechatapp_id , erp_sales_id , id , date_format ( create_time , '%y-%m-%d' ) warranty_date , '_480726380749918208' tableindex from warranty_service.warranty where tenant_wechatapp_id = :1 and create_time >= :2 and create_time <= :3 order by id limit :4 offset :5|1|3|3||0|0|14129|14129|46|46|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 3448.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 1014.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|tag_service|select count ( * ) from tag_service.label_vip_match_480726380749918208 t where tenant_app_id = :1 and match ( `vip_label` ) against ( :2 in boolean mode )|1|1|1||0|0|0|0|1|1|
|statistic|select tenant_wechatapp_id , sales_erp_id , product_barcode , id , amount_added , date_format ( create_time , '%y-%m-%d' ) value_add_date , coupon_user_id , state , '_823844580729339904' tableindex from value_added.value_added_user where tenant_wechatapp_id = :1 and update_time >= :2 and update_time <= date_add ( :3 , interval :4 hour ) order by id limit :5 offset :6|1|2|2||0|0|40654|40654|5000|5000|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_490810080325931008 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|1|1||0|0|72391|72391|12|12|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 53.33 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 807.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|tag_service|delete from mark_vip_label_task where create_time <= :1|1|15|15||0|0|0|0|0|0|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 301.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 4205.67 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 366.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_816096827580399616 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|4|4||0|0|89502|89502|13|13|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , -6967.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|payment|select t.id , t.goods_order_source as goodsordersource , t.goods_order_no as goodsorderno , t.order_start_time as orderstarttime from pay_order t where t.pay_status = :1 order by id asc limit :2|1|3|3||0|0|39064|39064|0|0|
|statistic|select id , biz_id , date_format ( ifnull ( receive_time , create_time ) , '%y-%m-%d' ) redpack_date , total_amount , '_821229068421742592' tableindex from account.wx_redpacket_send_order where tenant_wechatapp_id = :1 and biz_type = :2 and order_status = :3 and update_time >= :4 and update_time <= :5 order by id limit :6 offset :7|1|1|1||0|0|15172|15172|0|0|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , -9944.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 53.67 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|tag_service|select count ( 0 ) from ( select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_822257848045047808 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) ) tmp_count|1|7|7||0|0|7335|7335|1|1|
|statistic|select tenant_wechatapp_id , erp_sales_id , id , date_format ( create_time , '%y-%m-%d' ) warranty_date , '_836363095600320512' tableindex from warranty_service.warranty where tenant_wechatapp_id = :1 and create_time >= :2 and create_time <= :3 order by id limit :4 offset :5|1|2|2||0|0|8668|8668|119|119|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.redpack_amount ) redpack_amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.redpack_amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , sum ( ifnull ( redpack_amount , 0 ) ) redpack_amount from statistic.erp_sales_885278795660111872 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and redpack_date = date_format ( :6 , :7 ) group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|3|3||0|0|1367855|1367855|0|0|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount , sum ( tmp.score ) score from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount , t.score from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount , sum ( ifnull ( score , 0 ) ) score from statistic.erp_sales_823688108565368832 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and comment_date = date_format ( :6 , :7 ) group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|1|1||0|0|476695|476695|0|0|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , -218.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|statistic|delete from statistic.batch_step_execution where step_execution_id <= :1|1|2|2||0|0|22441|22441|0|0|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_818707624273952768 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|1|4|4||0|0|61013|61013|0|0|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_823688108565368832 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and warranty_date = date_format ( :6 , :7 ) group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|1|1||0|0|476675|476675|0|0|
|statistic|select es.id , es.tenant_id , es.tenant_wechatapp_id tenant_app_id , es.sales_erp_id , es.sales_no , es.sales_date , es.member_erp_id , es.amount , es.create_time , es.update_time , es.dept_erp_id , es.employee_erp_id , es.employee_name , is_sales has_sale , '2019-06-0223:59:59.0' collect_time , es.sales_status , '_830220893509701632' tableindex from tenant.erp_sales es where es.tenant_wechatapp_id = :1 and es.update_time >= :2 and es.create_time <= :3 and es.update_time <= :4 limit :5 offset :6|1|3|3||0|0|79950|79950|6|6|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 2005.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 1442.66 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|user_service|select * from erp_integral_log where tenant_id = :1 and update_time >= :2 and update_time <= :3 order by tenant_wechatapp_id , member_erp_id|1|3|3||0|0|72984|72984|1502|1502|
|statistic|select count ( 0 ) from ( select mb.member_user_id memberuserid , mb.user_name username , mb.mobile_no mobileno , mb.age , mb.sex sex , mb.status status , mb.birthday birthday , mb.memorial_name memorialname , mb.memorial_day memorialday , mb.source_type sourcetype , mb.identity , if ( mt.grade_erp_id is null , '无' , gd.grade_name ) gradename , mt.sales_balance salesbalance , mt.sales_amount salesamount , mt.consumption_integral consumptionintegral , mt.cumulation cumulation , mt.balance balance , mt.service_amount serviceamount , mt.registe_time registetime , mt.first_shop_time firstshoptime , mt.last_shop_time lastshoptime , mt.first_sales_time firstsalestime , mt.last_sales_time lastsalestime , mt.last_login_time lastlogintime , mt.follow_time followtime , mt.cancel_follow_time cancelfollowtime , mt.bind_time bindtime , mt.last_service_time lastservicetime , mt.category_name categoryname , tw.brand_name tenantappname , mb.cancel_flag cancelflag , mb.subscribe_flag subscribeflag , mb.bind_flag bindflag , mb.full_flag fullflag , ifnull ( os.shop_name , '未知' ) shop_name , if ( oe.employee_user_id = '-1' or oe.employee_user_id is null , :1 , oe.employee_user_name ) employee_user_name from statistic.member mb left join statistic.member_extra mt on mb.id = mt.id left join tenant.tenant_wechatapp tw on mb.tenant_app_id = tw.id left join statistic.grade gd on mt.tenant_id = gd.tenant_id and mt.grade_erp_id = gd.grade_erp_id left join statistic.off_shop os on mt.tenant_app_id = os.tenant_app_id and ( mt.shop_id = os.shop_id or mt.shop_id = os.dept_erp_id ) left join statistic.off_employee oe on mt.tenant_app_id = oe.tenant_app_id and ( mt.employee_user_id = oe.employee_erp_id or mt.employee_user_id = oe.employee_user_id ) where mb.tenant_id = :2 and mb.tenant_app_id = :3 and mt.sales_balance >= :4 and mb.register_flag = :5 ) tmp_count|1|2|2||0|0|138366|138366|1|1|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_830220893509701632 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|1|7|7||0|0|151340|151340|0|0|
|coupon_service|select id as usercouponid , coupon_no as couponno , end_time as endtime , begin_time as begintime , face_value as facevalue , coupon_name as couponname , coupon_type as coupontype , remark , exchange_shop , off_type from coupon_user where owner_id = :1 and coupon_template_id = :2 and coupon_state = :3 and end_time > now ( ) limit :4|1|6|6||0|0|339604|339604|1|1|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 22.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|platform|select `vendorid` , `memberid` , `salesdate` , `noteid` , `noteno` , `empid` , `empname` , `amounttotal` , `quantitytotal` , `integraltotal` , `salesstoreid` , `staffattitude` , `professionallevel` , `appearance` , `storeimage` , `productdisplay` , `salescomment` , `commenttime` , `replycontent` , `replytime` , `replyuser` , `tipfee` , `tipmorderid` , `tippayno` , `tippaytime` , `status` , `aftersalesremark` , `uid` , `eid` , `sid` , `id` from `saleslog` where vendorid = :1 and status = :2 and date_sub ( curdate ( ) , interval :3 day ) = date_format ( salesdate , :4 )|1|4|4||0|0|120774|120774|0|0|
|platform|select `vendorid` , `vendormemberid` , `wechatmemberid` , `openid` , `payopenid` , `unionid` , `nickname` , `headimgurl` , `employeeid` , `luckybean` , `mobileno` , `createtime` , `updatetime` , `qrticket` , `qrurl` , `introducerid` , `id` from `member` where `vendorid` = :1 and `mobileno` = :2|1|5|5||0|0|9787|9787|9787|9787|
|statistic|select tenant_wechatapp_id , erp_sales_id , id , date_format ( create_time , '%y-%m-%d' ) warranty_date , '_476787156229165056' tableindex from warranty_service.warranty where tenant_wechatapp_id = :1 and create_time >= :2 and create_time <= :3 order by id limit :4 offset :5|1|30|30||0|0|440927|440927|127|127|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 68.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|activity_service|select count ( 0 ) from activity_service.user_trace t1 join activity_service.activity t2 on t1.activity_id = t2.id join activity_service.cutdown_price_activity_apply t3 on t1.user_apply_id = t3.id where t1.status = :1 and t2.tenant_wechatapp_id = :2 and t2.activity_type = :3 and t1.step = :4|1|3|3||0|0|576971|576971|1|1|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 60.66 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|user_service|select tenantuser.user_id , user.nick_name , tenantuser.head_img_url , user.sex , user.mobile_no as mobile , user.country , user.province , user.city from tenant_user tenantuser join user user on tenantuser.user_id = user.id where ( tenantuser.tenant_app_id = :1 and tenantuser.user_id not in ( :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , :14 , :15 , :16 , :17 , :18 , :19 , :20 , :21 , :22 , :23 , :24 , :25 , :26 , :27 , :28 , :29 , :30 , :31 , :32 , :33 , :34 , :35 , :36 , :37 , :38 , :39 , :40 , :41 , :42 , :43 , :44 , :45 , :46 , :47 , :48 , :49 , :50 , :51 , :52 , :53 , :54 , :55 , :56 , :57 , :58 , :59 , :60 , :61 , :62 , :63 , :64 , :65 , :66 , :67 , :68 , :69 , :70 , :71 , :72 , :73 , :74 , :75 , :76 , :77 , :78 , :79 , :80 , :81 , :82 , :83 ) and ( user.nick_name like concat ( :84 , :85 , :86 ) or user.mobile_no = :87 ) ) order by tenantuser.create_time desc limit :88|1|13|13||0|0|1969486|1969486|1|1|
|tag_service|select count ( 0 ) from ( select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_828766757295529984 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) ) tmp_count|1|2|2||0|0|22974|22974|1|1|
|statistic|select max ( statistic_date ) enddate from result_shop_source where tenant_id = :1 group by tenant_id|1|4|4||0|0|343337|343337|1|1|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 5500.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , -21000.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|user_service|select tenantuser.user_id , user.nick_name , tenantuser.head_img_url , user.sex , user.mobile_no as mobile , user.country , user.province , user.city from tenant_user tenantuser join user user on tenantuser.user_id = user.id where ( tenantuser.tenant_app_id = :1 and tenantuser.user_id not in ( :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , :14 , :15 , :16 , :17 , :18 , :19 , :20 , :21 , :22 , :23 , :24 , :25 , :26 , :27 , :28 , :29 , :30 , :31 , :32 , :33 , :34 , :35 , :36 , :37 , :38 , :39 , :40 , :41 , :42 , :43 , :44 , :45 , :46 , :47 , :48 , :49 , :50 , :51 , :52 , :53 , :54 , :55 , :56 , :57 , :58 , :59 , :60 , :61 , :62 , :63 , :64 , :65 , :66 , :67 , :68 , :69 , :70 , :71 , :72 , :73 , :74 , :75 , :76 , :77 , :78 , :79 , :80 , :81 , :82 , :83 , :84 , :85 , :86 , :87 , :88 ) and ( user.nick_name like concat ( :89 , :90 , :91 ) or user.mobile_no = :92 ) ) order by tenantuser.create_time desc limit :93 , :94|1|3|3||0|0|1616277|1616277|6|6|
||/* applicationname = intellij idea 2019.1 */ select * from authorization_service.user_login_token where status = :1 and roles = :2 order by id desc|1|6|6||0|0|2040439|2040439|21|21|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 2577.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 1405.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 368.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|activity_service|select count ( 0 ) from activity_service.user_trace ut left join activity_service.activity at on ut.activity_id = at.id where ut.step = :1 and ut.activity_id = :2|1|1|1||0|0|526317|526317|1|1|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 2919.33 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , -4306.66 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 1372.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|user_service|select count ( 0 ) from tenant_user tenantuser join user_service.user user on tenantuser.user_id = user.id where ( tenantuser.tenant_id = :1 and tenantuser.tenant_app_id = :2 and tenantuser.user_id not in ( :3 , :4 ) )|1|9|9||0|0|259434|259434|1|1|
|statistic|delete from statistic.batch_job_execution_params where job_execution_id <= :1|1|2|2||0|0|59828|59828|0|0|
|user_service|select count ( 0 ) from tenant_user tenantuser join user user on tenantuser.user_id = user.id where ( tenantuser.tenant_app_id = :1 and tenantuser.user_id not in ( :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , :14 , :15 , :16 , :17 , :18 , :19 , :20 , :21 , :22 , :23 , :24 , :25 , :26 , :27 , :28 , :29 , :30 , :31 , :32 , :33 , :34 , :35 , :36 , :37 , :38 , :39 , :40 , :41 , :42 , :43 , :44 , :45 , :46 , :47 , :48 , :49 , :50 , :51 , :52 , :53 , :54 , :55 , :56 , :57 , :58 , :59 , :60 , :61 , :62 , :63 , :64 , :65 , :66 , :67 , :68 , :69 , :70 , :71 , :72 , :73 , :74 , :75 , :76 , :77 , :78 , :79 , :80 , :81 , :82 , :83 , :84 , :85 , :86 , :87 , :88 , :89 , :90 , :91 , :92 ) and ( user.nick_name like concat ( :93 , :94 , :95 ) or user.mobile_no = :96 ) )|1|1|1||0|0|8309|8309|1|1|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 126.67 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|statistic|select es.id , es.tenant_id , es.tenant_wechatapp_id tenant_app_id , es.sales_erp_id , es.sales_no , es.sales_date , es.member_erp_id , es.amount , es.create_time , es.update_time , es.dept_erp_id , es.employee_erp_id , es.employee_name , is_sales has_sale , '2019-06-0223:59:59.0' collect_time , es.sales_status , '_476787156229165056' tableindex from tenant.erp_sales es where es.tenant_wechatapp_id = :1 and es.create_time >= :2 and es.create_time <= :3 limit :4 offset :5|1|8|8||0|0|461630|461630|225|225|
|platform|select count ( 1 ) from `smssent` where vendorid = :1 and success = true and date_sub ( date ( :2 ) , interval :3 day ) = date_format ( senttime , :4 )|1|3|3||0|0|66068|66068|1|1|
|statistic|select es.id , es.tenant_id , es.tenant_wechatapp_id tenant_app_id , es.sales_erp_id , es.sales_no , es.sales_date , es.member_erp_id , es.amount , es.create_time , es.update_time , es.dept_erp_id , es.employee_erp_id , es.employee_name , is_sales has_sale , '2019-06-0223:59:59.0' collect_time , es.sales_status , '_476787156229165056' tableindex from tenant.erp_sales es where es.tenant_wechatapp_id = :1 and es.update_time >= :2 and es.create_time <= :3 and es.update_time <= :4 limit :5 offset :6|1|3|3||0|0|461630|461630|2|2|
|statistic|select count ( 0 ) from backlog where tenant_id = :1 and tenant_app_id = :2 and expire_time between :3 and :4 and shop_id = :5 and user_id = :6 and user_name > :7 and shop_name > :8|1|10|10||0|0|1099732|1099732|1|1|
|statistic|select es.id , es.tenant_id , es.tenant_wechatapp_id tenant_app_id , es.sales_erp_id , es.sales_no , es.sales_date , es.member_erp_id , es.amount , es.create_time , es.update_time , es.dept_erp_id , es.employee_erp_id , es.employee_name , is_sales has_sale , '2019-06-0223:59:59.0' collect_time , es.sales_status , '_823844580729339904' tableindex from tenant.erp_sales es where es.tenant_wechatapp_id = :1 and es.create_time >= :2 and es.create_time <= :3 limit :4 offset :5|1|1|1||0|0|82396|82396|232|232|
|tag_service|select id , tenant_app_id , shop_id , vip_id , vip_source , vip_label from label_vip_match_488003299602206720 where tenant_app_id = :1 and vip_id = :2|1|4|4||0|0|127160|127160|1|1|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_835720547919761408 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|2|2||0|0|9503|9503|6|6|
|statistic|select ambassador_put_date statistic_date , tenant_id , tenant_app_id , coupon_template_id coupon_id , coupon_name , ambassador_id , ambassador_user_name , count ( * ) get_amount from statistic.coupon_user where tenant_app_id = :1 and create_channel = :2 and ambassador_put_date = date_format ( :3 , :4 ) group by ambassador_put_date , tenant_id , tenant_app_id , coupon_template_id , coupon_name , ambassador_id , ambassador_user_name|1|4|4||0|0|339656|339656|0|0|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_821229068421742592 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|1|4|4||0|0|343806|343806|0|0|
|tag_service|select count ( 0 ) from ( select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_891434732540272640 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) ) tmp_count|1|3|3||0|0|68039|68039|1|1|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_826254702915141632 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|2|2||0|0|13146|13146|7|7|
|account|/* applicationname = datagrip 2019.1.2 */ select *from authorization_service.user_login_token where account_id = :1|1|2|2||0|0|2045971|2045971|54|54|
|statistic|select ue.tenant_wechatapp_id , ue.user_id , ifnull ( eu.user_id , ue.employee_erp_id ) employee_user_id , '2019-06-0223:59:59.0' update_time from user_service.user_employee ue left join tenant.employee_user eu on ue.tenant_wechatapp_id = eu.tenant_wechatapp_id and ue.employee_user_id = eu.id where ue.tenant_wechatapp_id = :1 and ue.update_time >= :2 and ue.update_time <= :3 limit :4 offset :5|1|2|2||0|0|73356|73356|177|177|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 532.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|tag_service|select count ( 0 ) from ( select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_816869802005020672 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) ) tmp_count|1|2|2||0|0|10889|10889|1|1|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 2149.33 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|statistic|select max ( statistic_date ) enddate from result_shop_status where tenant_id = :1 group by tenant_id|1|2|2||0|0|123572|123572|1|1|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 463.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|statistic|select tenant_wechatapp_id , erp_sales_id , id , date_format ( create_time , '%y-%m-%d' ) warranty_date , '_814020764498956288' tableindex from warranty_service.warranty where tenant_wechatapp_id = :1 and create_time >= :2 and create_time <= :3 order by id limit :4 offset :5|1|1|1||0|0|10437|10437|17|17|
|statistic|select tenant_wechatapp_id , sales_erp_id , product_barcode , id , amount_added , date_format ( create_time , '%y-%m-%d' ) value_add_date , coupon_user_id , state , '_476787156229165056' tableindex from value_added.value_added_user where tenant_wechatapp_id = :1 and update_time >= :2 and update_time <= date_add ( :3 , interval :4 hour ) order by id limit :5 offset :6|1|2|2||0|0|27113|27113|5000|5000|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_816450513213112320 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|2|2||0|0|19203|19203|4|4|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 100.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|tag_service|select count ( 0 ) from ( select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_889699715132813312 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) ) tmp_count|1|2|2||0|0|43462|43462|1|1|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 513.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 151.50 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|account|/* applicationname = datagrip 2018.2.2 */ select * from statistic.backlog where tenant_app_id = :1 and user_id = :2 and scene = :3|1|10|10||0|0|1099732|1099732|79|79|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_816440425157005312 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|1|1||0|0|34735|34735|9|9|
|activity_service|select id , tenant_id , tenant_wechatapp_id , activity_id , acitivity_type , user_id , qualified_id , page_id , scene_type , scene_biz_id , create_time , update_time from activity_gift_grant where activity_id = :1 and acitivity_type = :2 and user_id = :3 and scene_type = :4|1|1|1||0|0|88616|88616|0|0|
|activity_service|/* applicationname = datagrip 2018.2.2 */ select * from statistic.result_employee_task where statistic_date > expire_date and total_amount = :1|1|2|2||0|0|502284|502284|502|502|
|tag_service|select count ( 0 ) from ( select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_819000302970638336 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) ) tmp_count|1|3|3||0|0|14118|14118|1|1|
|tag_service|select id , tenant_app_id , shop_id , vip_id , vip_source , vip_label from label_vip_match_819000302970638336 where tenant_app_id = :1 and vip_id = :2|1|1|1||0|0|35776|35776|1|1|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , -640.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|account|/* applicationname = datagrip 2019.1.2 */ select *from warranty_service.warranty where user_id = :1|1|14|14||0|0|441468|441468|1|1|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_823844580729339904 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|1|1|1||0|0|162112|162112|221|221|
|statistic|select count ( 0 ) from ( select mb.member_user_id memberuserid , mb.user_name username , mb.mobile_no mobileno , mb.age , mb.sex sex , mb.status status , mb.birthday birthday , mb.memorial_name memorialname , mb.memorial_day memorialday , mb.source_type sourcetype , mb.identity , if ( mt.grade_erp_id is null , '无' , gd.grade_name ) gradename , mt.sales_balance salesbalance , mt.sales_amount salesamount , mt.consumption_integral consumptionintegral , mt.cumulation cumulation , mt.balance balance , mt.service_amount serviceamount , mt.registe_time registetime , mt.first_shop_time firstshoptime , mt.last_shop_time lastshoptime , mt.first_sales_time firstsalestime , mt.last_sales_time lastsalestime , mt.last_login_time lastlogintime , mt.follow_time followtime , mt.cancel_follow_time cancelfollowtime , mt.bind_time bindtime , mt.last_service_time lastservicetime , mt.category_name categoryname , tw.brand_name tenantappname , mb.cancel_flag cancelflag , mb.subscribe_flag subscribeflag , mb.bind_flag bindflag , mb.full_flag fullflag , ifnull ( os.shop_name , '未知' ) shop_name , if ( oe.employee_user_id = '-1' or oe.employee_user_id is null , :1 , oe.employee_user_name ) employee_user_name from statistic.member mb left join statistic.member_extra mt on mb.id = mt.id left join tenant.tenant_wechatapp tw on mb.tenant_app_id = tw.id left join statistic.grade gd on mt.tenant_id = gd.tenant_id and mt.grade_erp_id = gd.grade_erp_id left join statistic.off_shop os on mt.tenant_app_id = os.tenant_app_id and ( mt.shop_id = os.shop_id or mt.shop_id = os.dept_erp_id ) left join statistic.off_employee oe on mt.tenant_app_id = oe.tenant_app_id and ( mt.employee_user_id = oe.employee_erp_id or mt.employee_user_id = oe.employee_user_id ) where mb.tenant_id = :2 and mb.tenant_app_id = :3 and mb.source_type = :4 and mb.register_flag = :5 ) tmp_count|1|1|1||0|0|64349|64349|1|1|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 3692.33 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_821229068421742592 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|3|3||0|0|167274|167274|169|169|
|tag_service|select count ( * ) from tag_service.label_vip_match_817878088380628992 t where tenant_app_id = :1 and match ( `vip_label` ) against ( :2 in boolean mode )|1|2|2||0|0|2|2|1|1|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 2388.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_885278795660111872 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and warranty_date = date_format ( :6 , :7 ) group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|3|3||0|0|1368065|1368065|30|30|
|tag_service|delete from tag_service.label_vip_match_817161814168092672 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_817161814168092672 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|1|1|1||0|0|44585|44585|0|0|
|user_service|select tenantuser.user_id , user.nick_name , tenantuser.head_img_url , user.sex , user.mobile_no as mobile , user.country , user.province , user.city from tenant_user tenantuser join user user on tenantuser.user_id = user.id where ( tenantuser.tenant_app_id = :1 and tenantuser.user_id not in ( :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , :14 , :15 , :16 , :17 , :18 , :19 , :20 , :21 , :22 , :23 , :24 , :25 , :26 , :27 , :28 , :29 , :30 , :31 , :32 , :33 , :34 , :35 ) and ( user.nick_name like concat ( :36 , :37 , :38 ) or user.mobile_no = :39 ) ) order by tenantuser.create_time desc limit :40|1|11|11||0|0|1968356|1968356|1|1|
|statistic|select es.id , es.tenant_id , es.tenant_wechatapp_id tenant_app_id , es.sales_erp_id , es.sales_no , es.sales_date , es.member_erp_id , es.amount , es.create_time , es.update_time , es.dept_erp_id , es.employee_erp_id , es.employee_name , is_sales has_sale , '2019-06-0223:59:59.0' collect_time , es.sales_status , '_885278795660111872' tableindex from tenant.erp_sales es where es.tenant_wechatapp_id = :1 and es.update_time >= :2 and es.create_time <= :3 and es.update_time <= :4 limit :5 offset :6|1|1|1||0|0|698458|698458|172|172|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 882.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_827516559562940416 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|1|7|7||0|0|655061|655061|37|37|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_827516559562940416 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|1|7|7||0|0|408662|408662|68|68|
|statistic|select max ( statistic_date ) enddate from result_shop_grade where tenant_id = :1 group by tenant_id|1|6|6||0|0|416718|416718|1|1|
|platform|select count ( 1 ) from coupondetail where vendorid = :1 and coupontype = :2 and couponstate = :3 and to_days ( :4 ) :5 to_days ( createtime ) = :6|1|7|7||0|0|318761|318761|1|1|
|statistic|select tenant_wechatapp_id , erp_sales_id , id , date_format ( create_time , '%y-%m-%d' ) warranty_date , '_821229068421742592' tableindex from warranty_service.warranty where tenant_wechatapp_id = :1 and create_time >= :2 and create_time <= :3 order by id limit :4 offset :5|1|5|5||0|0|3285|3285|28|28|
|tag_service|select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_822257848045047808 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) limit :9|1|2|2||0|0|7335|7335|2|2|
|activity_service|select count ( distinct ( user_id ) ) from user_trace where tenant_app_id = :1 and activity_id = :2 and status != :3|1|1|1||0|0|13406|13406|1|1|
|account|/* applicationname = datagrip 2018.2.2 */ select * from employee.backlog where employee_id is null|1|15|15||0|0|601551|601551|378|378|
|platform|select `tasktype` , `tasktime` , `taskstatus` , `bid` , `vendorid` , `uid` , `completetime` , `remark` , `createtime` , `id` from `taskassignment` where `bid` = :1 and `tasktype` = :2 and `tasktime` = :3 and `vendorid` = :4 and `uid` = :5|1|1|1||0|0|620719|620719|0|0|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_823688108565368832 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|1|17|17||0|0|1036239|1036239|0|0|
|statistic|select es.id , es.tenant_id , es.tenant_wechatapp_id tenant_app_id , es.sales_erp_id , es.sales_no , es.sales_date , es.member_erp_id , es.amount , es.create_time , es.update_time , es.dept_erp_id , es.employee_erp_id , es.employee_name , is_sales has_sale , '2019-06-0223:59:59.0' collect_time , es.sales_status , '_827516559562940416' tableindex from tenant.erp_sales es where es.tenant_wechatapp_id = :1 and es.update_time >= :2 and es.create_time <= :3 and es.update_time <= :4 limit :5 offset :6|1|1|1||0|0|408146|408146|0|0|
|tenant|select id , sales_no , sales_date , member_erp_id , sales_erp_id , is_sales from erp_sales where sales_no like concat ( :1 , :2 , :3 ) and sales_status = :4 and tenant_id = :5 and tenant_wechatapp_id = :6 order by sales_date desc limit :7|1|1|1||0|0|84399|84399|1|1|
|statistic|select primary_key_id id , score , date_format ( create_time , '%y-%m-%d' ) comment_date , content , '_486211571337531392' tableindex from comment_service.comment where tenant_wechatapp_id = :1 and create_time >= :2 and create_time <= :3 order by primary_key_id limit :4 offset :5|1|1|1||0|0|52039|52039|0|0|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 1086.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|statistic|select sd.product_barcode , ifnull ( es.amount , 0 ) amount , sd.tenant_app_id , es.sales_date , es.dept_erp_id , sd.tenant_id , ifnull ( sd.statistic_date , es.sales_date ) statistic_date from ( select tenant_id , tenant_app_id , sales_erp_id , product_barcode , date_format ( create_time , '%y-%m-%d' ) statistic_date from statistic.erp_sales_detail_885278795660111872 where tenant_app_id = :1 and create_time >= :2 and create_time <= :3 and sales_type = :4 and sales_status = :5 ) sd inner join ( select tenant_id , tenant_app_id , sales_erp_id , amount , sales_date , dept_erp_id from statistic.erp_sales_885278795660111872 where tenant_app_id = :6 and create_time >= :7 and create_time <= :8 ) es on sd.tenant_app_id = es.tenant_app_id and sd.sales_erp_id = es.sales_erp_id limit :9 offset :10|1|20|20||0|0|2665152|2665152|0|0|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , -4751.34 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 2600.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_816869802005020672 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|1|2|2||0|0|61461|61461|0|0|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , 3342.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|1|15|15||0|0|0|0|0|0|
|statistic|select count ( 0 ) from order_info where tenant_id = :1 and manager_user_id > :2 and tenant_app_id = :3|1|1|1||0|0|30456|30456|1|1|
|tag_service|delete from tag_service.label_vip_match_876595466006016000 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_876595466006016000 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|4|2||0|0|156048|78028|0|0|
|tag_service|delete from tag_service.label_vip_match_830220893509701632 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_830220893509701632 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|11|6||0|0|565578|282790|0|0|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_816440425157005312 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|2|2|1||0|0|366842|359588|275|238|
|wx_gateway|insert into wx_template_msg ( id , tenant_id , tenant_app_id , user_id , tenant_user_open_id , template_id , template_no , url , data , msg_id , status , err_msg , title , content , create_time , update_time , tenant_short_name , tenant_app_name , user_mobile_no , user_name , user_head_img_url ) values ( :1 , :2 , :3 , :4 , :5 , :6 , :7 , :8 , ... 00:07:50","color":"#000066"},"keyword3":{"value":"萌猪吊坠送吉祥 , xda0003","color":"#000066"},"keyword4":{"value":"1","color":"#000066"},"keyword1":{"value":"899643273050632192","color":"#000066"},"keyword2":{"value":"商城订单","color":"#000066"},"remark":{"value":"请尽快完成备货，顾客谢彩花（18475143780）将于2019年06月07日前来采购，点击查看订单详情","color":"#ff3399"},"first":{"value":"您所在的新华北旗舰店有新的订单需要备货","color":"#000000"}}' , :9 , null , null , :10 , :11 , :12 , :13 , :14 , :15 , :16 , :17 , :18 )|2|30|15||0|0|0|0|0|0|
|user_service|select count ( 0 ) from tenant_user tenantuser join user user on tenantuser.user_id = user.id where ( tenantuser.tenant_app_id = :1 and tenantuser.user_id not in ( :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , :14 , :15 , :16 , :17 , :18 , :19 , :20 , :21 , :22 , :23 , :24 , :25 , :26 , :27 , :28 , :29 , :30 , :31 , :32 , :33 , :34 , :35 , :36 , :37 , :38 , :39 , :40 , :41 , :42 , :43 , :44 , :45 , :46 , :47 , :48 , :49 , :50 , :51 , :52 , :53 , :54 , :55 , :56 , :57 , :58 , :59 , :60 , :61 , :62 , :63 , :64 , :65 , :66 , :67 , :68 , :69 , :70 , :71 , :72 , :73 , :74 , :75 , :76 , :77 , :78 , :79 , :80 , :81 , :82 , :83 , :84 , :85 , :86 , :87 , :88 ) and ( user.nick_name like concat ( :89 , :90 , :91 ) or user.mobile_no = :92 ) )|2|8|5||0|0|518740|259383|2|1|
|tag_service|insert into tag_service.label_vip_match_834615931371048960 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_834615931371048960 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|2|4|2||0|0|6473926|3238068|0|0|
|tag_service|insert into tag_service.label_vip_match_814640285408600064 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_814640285408600064 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|2|4|2||0|0|6593995|3297690|0|0|
|tag_service|insert into tag_service.label_vip_match_480726380749918208 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_480726380749918208 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|2|19|10||0|0|44564423|22284335|0|0|
|tag_service|delete from tag_service.label_vip_match_480726380749918208 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_480726380749918208 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|14|7||0|0|727840|363928|0|0|
|account|/* applicationname = datagrip 2018.2.2 */ select * from employee.backlog where tenant_app_id = :1 and user_id = :2|2|2|1||0|0|56478|39971|486|486|
|tag_service|insert into tag_service.label_vip_match_476787156229165056 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_476787156229165056 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|2|51|26||0|0|131399168|65714067|0|0|
|customer|select t.msg_id as msgid , t.tenant_id as tenantid , t.tenant_wechatapp_id as tenantwechatappid , t.shop_id as shopid , t.enter_shop_time as entershoptime , t.photo_url as photourl , t.user_name as username , t.mobile_no as mobileno , t.sex , t.age from customer_face_pass t where tenant_wechatapp_id = :1 and mobile_no = :2 order by t.enter_shop_time desc limit :3|2|3|2||0|0|595093|344944|2|1|
|tag_service|delete from tag_service.label_vip_match_882402759662481408 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_882402759662481408 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|4|2||0|0|235040|117520|0|0|
|user_service|select count ( 0 ) from tenant_user tenantuser join user user on tenantuser.user_id = user.id where user_id != :1 and tenant_app_id = :2|2|8|6||0|0|66400|33207|2|1|
|tag_service|insert into tag_service.label_vip_match_818623050667823104 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_818623050667823104 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|2|4|2||0|0|3395044|1697691|0|0|
|tag_service|delete from tag_service.label_vip_match_839295151019966464 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_839295151019966464 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|10|5||0|0|435412|217706|0|0|
|tag_service|select count ( 0 ) from ( select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_476787156229165056 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) ) tmp_count|2|26|15||0|0|172396|136874|1|1|
|tag_service|delete from tag_service.label_vip_match_819000302970638336 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_819000302970638336 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|2|1||0|0|139556|69778|0|0|
|account|/* applicationname = datagrip 2018.2.2 */ select * from statistic.backlog where scene in ( :1 , :2 )|2|11|9||0|0|1305037|1099732|1484|982|
|tag_service|delete from tag_service.label_vip_match_828766757295529984 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_828766757295529984 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|4|2||0|0|215079|107547|0|0|
|employee|update backlog set employee_id = :1 , user_id = :2 where ( employee_id = :3 and tenant_app_id = :4 and status in ( :5 , :6 ) )|2|3|1||0|0|76949|39971|0|0|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_814020764498956288 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|2|4|3||0|0|410465|265500|84|45|
|tag_service|delete from tag_service.label_vip_match_823709122435256320 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_823709122435256320 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|4|2||0|0|197638|98820|0|0|
|tag_service|delete from tag_service.label_vip_match_817878088380628992 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_817878088380628992 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|10|5||0|0|545678|272840|0|0|
|tag_service|delete from tag_service.label_vip_match_486900027235635200 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_486900027235635200 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|8|4||0|0|442500|221250|0|0|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_823709122435256320 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|2|2|1||0|0|48554|45522|31|18|
|tag_service|delete from tag_service.label_vip_match_488003299602206720 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_488003299602206720 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|10|5||0|0|507258|253632|0|0|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_476787156229165056 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|2|20|19||0|0|581767|521170|114|105|
|user_service|select count ( 0 ) from tenant_user tenantuser join user user on tenantuser.user_id = user.id where ( tenantuser.tenant_app_id = :1 and tenantuser.user_id not in ( :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , :14 , :15 , :16 , :17 , :18 , :19 , :20 , :21 , :22 , :23 , :24 , :25 , :26 , :27 , :28 , :29 , :30 , :31 , :32 , :33 , :34 , :35 , :36 , :37 , :38 , :39 , :40 , :41 , :42 , :43 , :44 , :45 , :46 , :47 , :48 , :49 , :50 , :51 , :52 , :53 , :54 , :55 , :56 , :57 , :58 , :59 , :60 , :61 , :62 , :63 , :64 , :65 , :66 , :67 , :68 , :69 , :70 , :71 , :72 , :73 , :74 , :75 , :76 , :77 , :78 , :79 , :80 , :81 , :82 , :83 , :84 , :85 , :86 , :87 , :88 , :89 , :90 , :91 , :92 , :93 , :94 , :95 , :96 , :97 , :98 , :99 ) and ( user.nick_name like concat ( :100 , :101 , :102 ) or user.mobile_no = :103 ) )|2|5|3||0|0|64876|32446|2|1|
|tag_service|delete from tag_service.label_vip_match_821229068421742592 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_821229068421742592 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|14|7||0|0|677499|338757|0|0|
|tag_service|delete from tag_service.label_vip_match_823844580729339904 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_823844580729339904 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|22|11||0|0|1101781|550907|0|0|
|tag_service|insert into tag_service.label_vip_match_823844580729339904 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_823844580729339904 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|2|40|20||0|0|106095952|53066217|0|0|
|tag_service|delete from tag_service.label_vip_match_487569764496052224 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_487569764496052224 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|8|4||0|0|447699|223855|0|0|
|tag_service|delete from tag_service.label_vip_match_814019237554196480 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_814019237554196480 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|4|2||0|0|189057|94531|0|0|
|tag_service|insert into tag_service.label_vip_match_827516559562940416 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_827516559562940416 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|2|42|21||0|0|114128532|57405020|0|0|
|tag_service|delete from tag_service.label_vip_match_469175049962786816 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_469175049962786816 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|7|4||0|0|275578|137790|0|0|
|tag_service|delete from tag_service.label_vip_match_471320523331211264 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_471320523331211264 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|3|2||0|0|138199|69101|0|0|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_818707624273952768 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|2|2|1||0|0|2925614|1663587|598|309|
|statistic|select bm.id , ifnull ( sum ( es.amount ) , 0 ) salesbalance , count ( 1 ) salesamount from base_user_member bu inner join member_extra bm on bu.tenant_app_id = bm.tenant_app_id and bu.user_id = bm.user_id inner join tenant.erp_sales es on bm.tenant_app_id = es.tenant_wechatapp_id and bm.member_erp_id = es.member_erp_id where bu.tenant_app_id = :1 and es.sales_status = :2 group by bm.id order by bm.id limit :3 offset :4|2|4|2||0|0|25274|13690|175|95|
|tag_service|insert into tag_service.label_vip_match_490810080325931008 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_490810080325931008 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|2|8|4||0|0|15556030|7778742|0|0|
|account|/* applicationname = datagrip 2019.1.2 */ select *from authorization_service.user_login_token where account_id = :1 and status = :2 and expire_time > now ( )|2|3|1||0|0|4092000|2046026|1|1|
|statistic|select count ( 0 ) from backlog where tenant_id = :1 and tenant_app_id = :2 and shop_id = :3 and user_name > :4 and shop_name > :5|2|20|10||0|0|2199464|1099732|2|1|
||/* applicationname = intellij idea 2019.1 */ select * from user_service.erp_member where mobile_no = :1|2|34|18||0|0|7742111|3871869|2|1|
|tag_service|delete from tag_service.label_vip_match_834615931371048960 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_834615931371048960 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|4|2||0|0|252556|126278|0|0|
|tag_service|delete from tag_service.label_vip_match_885278795660111872 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_885278795660111872 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|25|13||0|0|1178864|589566|0|0|
|statistic|select cu.id , cu.tenant_id , cu.tenant_wechatapp_id , cu.coupon_name , cu.coupon_type , cu.coupon_no , cu.create_channel , cu.coupon_state , cu.user_name , cu.creator_name , cu.face_value , cu.begin_time , cu.end_time , cu.remark , cu.create_time , cu.update_time , cu.mobile_no , cu.creator_mobile_no , if ( cu.coupon_type = 4 , vu.template_id , cu.coupon_template_id ) coupon_template_id from coupon_service.coupon_user cu left join value_added.value_added_user vu on cu.tenant_wechatapp_id = vu.tenant_wechatapp_id and cu.id = vu.coupon_user_id where cu.tenant_wechatapp_id = :1 and cu.update_time >= :2 and cu.update_time <= :3 limit :4 offset :5|2|4|3||0|0|3950|2263|24|14|
|statistic|select t.statistic_date , t.tenant_id , t.tenant_app_id , t.src_type , t.page_id , t.business_name , count ( * ) push_amount from ( select date_format ( push_time , '%y-%m-%d' ) statistic_date , tenant_id , tenant_app_id , src_type , page_id , business_name from statistic.gift_pack where tenant_app_id = :1 and push_time >= :2 and push_time <= :3 ) t group by t.statistic_date , t.tenant_id , t.tenant_app_id , t.src_type , t.page_id , t.business_name limit :4 offset :5|2|9|6||0|0|728802|364401|0|0|
|tag_service|delete from tag_service.label_vip_match_826254702915141632 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_826254702915141632 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|2|1||0|0|117481|58741|0|0|
|activity_service|/* applicationname = datagrip 2018.2.2 */ select * from statistic.result_employee_task where tenant_app_id = :1 and statistic_date > expire_date|2|5|3||0|0|1113850|556925|986|493|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_876595466006016000 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|2|3|2||0|0|160822|149846|25|14|
|tag_service|delete from tag_service.label_vip_match_835720547919761408 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_835720547919761408 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|4|2||0|0|163628|81814|0|0|
|tag_service|delete from tag_service.label_vip_match_891434732540272640 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_891434732540272640 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|6|3||0|0|268918|134466|0|0|
|tag_service|delete from tag_service.label_vip_match_814640285408600064 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_814640285408600064 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|4|2||0|0|225489|112745|0|0|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_834615931371048960 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|2|3|1||0|0|82400|65437|0|0|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_835720547919761408 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|2|2|1||0|0|75999|57907|26|19|
|tag_service|insert into tag_service.label_vip_match_821229068421742592 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_821229068421742592 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|2|32|16||0|0|85771921|42908547|0|0|
|tag_service|insert into tag_service.label_vip_match_486900027235635200 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_486900027235635200 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|2|4|2||0|0|7220682|3611043|0|0|
|tag_service|insert into tag_service.label_vip_match_822257848045047808 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_822257848045047808 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|2|64|32||0|0|179974027|90018848|0|0|
|tag_service|delete from tag_service.label_vip_match_841816981308002304 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_841816981308002304 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|2|1||0|0|132048|66024|0|0|
|tag_service|insert into tag_service.label_vip_match_471320523331211264 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_471320523331211264 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|2|3|2||0|0|850925|425726|0|0|
|tag_service|delete from tag_service.label_vip_match_816440425157005312 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_816440425157005312 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|2|1||0|0|146704|73352|0|0|
|statistic|select count ( 0 ) from ( select sd.id , sd.sales_no salesno , os.shop_id shopid , ifnull ( os.shop_name , '未知' ) shopname , oe.employee_user_id userid , ifnull ( oe.employee_user_name , '未知' ) username , sd.product_name productname , sd.amount_pay amountpay , sd.value_add_no valueaddno , sd.value_add_amount valueaddamount , sd.value_add_state valueaddstate , sd.value_add_date valueadddate , if ( length ( sd.value_add_coupon ) = 18 , sd.value_add_coupon , null ) valueaddcoupon , sd.user_name memberusername , sd.mobile_no from statistic.erp_sales_detail_476787156229165056 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_id = :1 and os.shop_id != :2 and oe.employee_user_id != :3 and sd.value_add_no is not null and sd.tenant_app_id = :4 and os.shop_id = :5 order by sd.sales_date desc , sd.sales_erp_id desc ) tmp_count|2|15|13||0|0|1810390|905195|2|1|
|tag_service|insert into tag_service.label_vip_match_816096827580399616 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_816096827580399616 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|2|4|2||0|0|6383130|3191743|0|0|
|tag_service|delete from tag_service.label_vip_match_889699715132813312 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_889699715132813312 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|4|2||0|0|171765|85887|0|0|
|tag_service|delete from tag_service.label_vip_match_816450513213112320 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_816450513213112320 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|6|3||0|0|262576|131288|0|0|
|tag_service|select count ( 0 ) from ( select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_834615931371048960 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) ) tmp_count|2|3|2||0|0|13481|8326|2|1|
|user_service|select tenantuser.user_id , user.nick_name , tenantuser.head_img_url , user.sex , user.mobile_no as mobile , user.country , user.province , user.city from tenant_user tenantuser join user user on tenantuser.user_id = user.id where ( tenantuser.tenant_app_id = :1 and tenantuser.user_id not in ( :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , :14 , :15 , :16 , :17 , :18 , :19 , :20 , :21 , :22 , :23 , :24 , :25 , :26 , :27 , :28 , :29 , :30 , :31 , :32 , :33 , :34 , :35 , :36 , :37 , :38 , :39 , :40 , :41 , :42 , :43 , :44 , :45 , :46 , :47 , :48 , :49 , :50 , :51 , :52 , :53 , :54 , :55 , :56 , :57 , :58 , :59 , :60 , :61 , :62 , :63 , :64 , :65 , :66 , :67 , :68 , :69 , :70 , :71 , :72 , :73 , :74 , :75 , :76 , :77 , :78 , :79 , :80 , :81 , :82 , :83 , :84 , :85 , :86 , :87 , :88 , :89 , :90 , :91 , :92 , :93 , :94 , :95 , :96 , :97 , :98 , :99 , :100 , :101 , :102 , :103 , :104 , :105 , :106 , :107 , :108 , :109 , :110 , :111 , :112 , :113 , :114 , :115 , :116 , :117 , :118 , :119 , :120 , :121 , :122 , :123 , :124 , :125 , :126 , :127 , :128 , :129 , :130 , :131 , :132 , :133 , :134 , :135 , :136 , :137 , :138 , :139 , :140 , :141 , :142 , :143 , :144 , :145 , :146 , :147 , :148 , :149 , :150 , :151 , :152 , :153 , :154 , :155 , :156 , :157 , :158 , :159 , :160 , :161 , :162 , :163 , :164 , :165 , :166 , :167 , :168 , :169 , :170 , :171 , :172 , :173 , :174 , :175 , :176 , :177 , :178 , :179 , :180 , :181 , :182 , :183 , :184 , :185 , :186 , :187 , :188 , :189 , :190 , :191 , :192 , :193 , :194 , :195 , :196 , :197 , :198 , :199 , :200 , :201 , :202 , :203 , :204 , :205 , :206 , :207 , :208 , :209 , :210 , :211 , :212 , :213 , :214 , :215 , :216 , :217 , :218 , :219 , :220 , :221 , :222 , :223 , :224 , :225 , :226 , :227 , :228 , :229 , :230 , :231 , :232 , :233 , :234 , :235 , :236 , :237 , :238 , :239 , :240 , :241 , :242 , :243 ) and ( user.nick_name like concat ( :244 , :245 , :246 ) or user.mobile_no = :247 ) ) order by tenantuser.create_time desc limit :248|2|14|9||0|0|4203084|2101542|2|1|
|tag_service|insert into tag_service.label_vip_match_826954007829331968 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_826954007829331968 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|2|10|5||0|0|6967723|3483900|0|0|
|tag_service|delete from tag_service.label_vip_match_823688108565368832 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_823688108565368832 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|29|18||0|0|1160696|580354|0|0|
|tag_service|insert into tag_service.label_vip_match_487569764496052224 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_487569764496052224 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|2|10|5||0|0|23637940|11822993|0|0|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_821174502091165696 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|2|2|1||0|0|3094985|1928912|339|185|
|tag_service|delete from tag_service.label_vip_match_816096827580399616 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_816096827580399616 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|4|2||0|0|223909|111955|0|0|
|tag_service|select id , tenant_app_id , shop_id , vip_id , vip_source , vip_label from label_vip_match_830220893509701632 where tenant_app_id = :1 and vip_id = :2|2|8|4||0|0|282832|141416|2|1|
|tag_service|delete from tag_service.label_vip_match_817517269994225664 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_817517269994225664 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|6|3||0|0|313188|156596|0|0|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_471320523331211264 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|2|3|2||0|0|314663|230549|188|152|
|account|/* applicationname = datagrip 2019.1.2 */ select *from user_service.erp_member where mobile_no = :1|2|36|25||0|0|7740489|3870247|2|1|
|tag_service|insert into tag_service.label_vip_match_836363095600320512 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_836363095600320512 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|2|2|1||0|0|5814031|2910764|0|0|
|tag_service|delete from tag_service.label_vip_match_490810080325931008 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_490810080325931008 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|10|5||0|0|561930|280966|0|0|
|tag_service|insert into tag_service.label_vip_match_814019237554196480 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_814019237554196480 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|2|4|2||0|0|7185794|3593526|0|0|
|tag_service|insert into tag_service.label_vip_match_821174502091165696 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_821174502091165696 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|2|2|1||0|0|4362233|2183374|0|0|
|tag_service|insert into tag_service.label_vip_match_488003299602206720 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_488003299602206720 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|2|6|3||0|0|9639300|4820304|0|0|
|tag_service|delete from tag_service.label_vip_match_818623050667823104 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_818623050667823104 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|6|3||0|0|323263|161635|0|0|
|tag_service|insert into tag_service.label_vip_match_823688108565368832 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_823688108565368832 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|2|23|14||0|0|35417401|17713787|0|0|
|tag_service|select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_821229068421742592 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) limit :9 , :10|2|4|2||0|0|87252|43626|6|3|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_486900027235635200 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|2|6|4||0|0|141038|121713|0|0|
|tag_service|insert into tag_service.label_vip_match_885278795660111872 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_885278795660111872 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|2|14|7||0|0|18331024|9189767|0|0|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_476787156229165056 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|2|51|49||0|0|997880|904061|61|57|
|activity_service|select count ( 0 ) from activity_service.user_trace t1 join activity_service.activity t2 on t1.activity_id = t2.id where t1.status = :1 and t2.tenant_wechatapp_id = :2 and t2.activity_type = :3 and t1.step = :4|2|7|4||0|0|1058645|529860|2|1|
|tag_service|insert into tag_service.label_vip_match_830220893509701632 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_830220893509701632 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|2|10|6||0|0|17456997|8729190|0|0|
|tag_service|insert into tag_service.label_vip_match_817517269994225664 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_817517269994225664 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|2|2|1||0|0|5839811|2920980|0|0|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_823709122435256320 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|2|2|1||0|0|34969|33007|0|0|
|user_service|update tenant_user set is_subscribe = :1 , subscribe_time = :2 , create_time = create_time where id = :3|2|30|15||0|0|0|0|0|0|
|statistic|select bl.id , bl.tenant_id , bl.tenant_app_id , bl.data , bl.status , bl.update_time from employee.backlog bl where bl.tenant_app_id = :1 and bl.update_time >= :2 and bl.update_time <= :3 order by bl.id limit :4 offset :5|2|24|23||0|0|607579|601389|551|421|
|tag_service|delete from tag_service.label_vip_match_827516559562940416 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_827516559562940416 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|18|9||0|0|964808|482446|0|0|
|statistic|select max ( statistic_date ) enddate from result_shop_status where tenant_id = :1 and tenant_app_id = :2 group by tenant_id|2|3|2||0|0|247144|123572|2|1|
|tag_service|delete from tag_service.label_vip_match_826954007829331968 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_826954007829331968 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|22|11||0|0|1071921|535961|0|0|
|tag_service|select count ( 0 ) from ( select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_818691468687347712 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) ) tmp_count|2|7|4||0|0|55386|27693|2|1|
|statistic|select sd.id , sd.sales_no salesno , os.shop_id shopid , ifnull ( os.shop_name , '未知' ) shopname , oe.employee_user_id userid , ifnull ( oe.employee_user_name , '未知' ) username , sd.product_name productname , sd.amount_pay amountpay , sd.value_add_no valueaddno , sd.value_add_amount valueaddamount , sd.value_add_state valueaddstate , sd.value_add_date valueadddate , if ( length ( sd.value_add_coupon ) = 18 , sd.value_add_coupon , null ) valueaddcoupon , sd.user_name memberusername , sd.mobile_no from statistic.erp_sales_detail_476787156229165056 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_id = :1 and os.shop_id != :2 and oe.employee_user_id != :3 and sd.value_add_no is not null and sd.tenant_app_id = :4 and os.shop_id = :5 order by sd.sales_date desc , sd.sales_erp_id desc limit :6|2|4|2||0|0|1808564|904282|40|20|
|tag_service|delete from tag_service.label_vip_match_814020764498956288 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_814020764498956288 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|4|2||0|0|207648|103824|0|0|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_814640285408600064 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|2|4|3||0|0|2683804|1651632|587|313|
|tag_service|delete from tag_service.label_vip_match_490540971604447232 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_490540971604447232 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|2|1||0|0|114920|57460|0|0|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_839295151019966464 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|2|3|2||0|0|34619|20051|9|6|
|tag_service|delete from tag_service.label_vip_match_836363095600320512 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_836363095600320512 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|2|4|2||0|0|225442|112724|0|0|
|tag_service|select id , tenant_app_id , shop_id , vip_id , vip_source , vip_label from label_vip_match_476787156229165056 where tenant_app_id = :1 and vip_id = :2|3|29|15||0|0|1102080|367360|3|1|
|statistic|select tu.id , ifnull ( ey.user_id , em.employee_erp_id ) employee_user_id , '2019-06-0223:59:59.0' update_time from user_service.user_employee eu inner join statistic.member tu on eu.tenant_wechatapp_id = tu.tenant_app_id and eu.user_id = tu.user_id left join user_service.erp_member em on tu.tenant_app_id = em.tenant_wechatapp_id and tu.member_user_id = em.member_erp_id left join tenant.employee_user ey on eu.employee_user_id = ey.id where eu.tenant_wechatapp_id = :1 and eu.create_time >= :2 and eu.create_time <= :3 order by tu.id limit :4 offset :5|3|3|1||0|0|98891|50690|809|471|
|tag_service|select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_821229068421742592 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) limit :9|3|5|2||0|0|116475|38825|30|10|
|statistic|select sd.product_barcode , ifnull ( es.amount , 0 ) amount , sd.tenant_app_id , es.sales_date , es.dept_erp_id , sd.tenant_id , ifnull ( sd.statistic_date , es.sales_date ) statistic_date from ( select tenant_id , tenant_app_id , sales_erp_id , product_barcode , date_format ( create_time , '%y-%m-%d' ) statistic_date from statistic.erp_sales_detail_822257848045047808 where tenant_app_id = :1 and create_time >= :2 and create_time <= :3 and sales_type = :4 and sales_status = :5 ) sd inner join ( select tenant_id , tenant_app_id , sales_erp_id , amount , sales_date , dept_erp_id from statistic.erp_sales_822257848045047808 where tenant_app_id = :6 and create_time >= :7 and create_time <= :8 ) es on sd.tenant_app_id = es.tenant_app_id and sd.sales_erp_id = es.sales_erp_id limit :9 offset :10|3|15|11||0|0|364552|305637|4|4|
|statistic|select es.tenant_wechatapp_id tenant_app_id , es.member_erp_id , ifnull ( sum ( es.amount ) , 0 ) salesbalance , count ( 1 ) salesamount from base_erp_member bm inner join tenant.erp_sales es on bm.tenant_app_id = es.tenant_wechatapp_id and bm.member_erp_id = es.member_erp_id where bm.tenant_app_id = :1 and es.sales_status = :2 group by es.tenant_wechatapp_id , es.member_erp_id limit :3 offset :4|3|7|4||0|0|13955|6178|796|346|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_817878088380628992 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|3|12|5||0|0|245348|104336|0|0|
|user_service|select tenantuser.user_id , user.nick_name , tenantuser.head_img_url , user.sex , user.mobile_no as mobile , user.country , user.province , user.city from tenant_user tenantuser join user user on tenantuser.user_id = user.id where ( tenantuser.tenant_app_id = :1 and tenantuser.user_id not in ( :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 , :13 , :14 , :15 , :16 , :17 , :18 , :19 , :20 ) and ( user.nick_name like concat ( :21 , :22 , :23 ) or user.mobile_no = :24 ) ) order by tenantuser.create_time desc limit :25|3|32|15||0|0|5099794|1968455|3|1|
|statistic|select count ( 0 ) from ( select tmp.shop_id shopid , tmp.shop_name shopname , tmp.sale_amount saleamount , tmp.war_amount waramount , tmp.warrate from ( select t.shop_id , t.shop_name , t.sale_amount , t.war_amount , if ( sale_amount = 0 , 0 , round ( t.war_amount*100/t.sale_amount , 2 ) ) warrate from ( select ec.shop_id , ec.shop_name , sum ( ifnull ( ec.sale_amount , 0 ) ) sale_amount , sum ( ifnull ( ec.war_amount , 0 ) ) war_amount from statistic.result_employee_warranty ec where ec.tenant_id = :1 and ec.shop_id != :2 and ec.user_name != :3 and ec.tenant_app_id = :4 group by ec.shop_id , ec.shop_name ) t ) tmp order by tmp.shop_name ) tmp_count|3|9|3||0|0|2553183|851081|3|1|
|platform|select vm.* from vendormember vm join member m on vm.id = m.vendormemberid and vm.vendorid = m.vendorid where m.employeeid = :1 and vm.vendorid = :2 and ( ( birthdaytype = :3 and month ( birthday ) = month ( date_sub ( curdate ( ) , interval :4 day ) ) and day ( birthday ) = day ( date_sub ( curdate ( ) , interval :5 day ) ) ) or ( birthdaytype = :6 and month ( birthday ) = month ( date_sub ( :7 , interval :8 day ) ) and day ( birthday ) = day ( date_sub ( :9 , interval :10 day ) ) ) )|3|6|2||0|0|87827|62542|57|47|
|tag_service|select count ( 0 ) from ( select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_471320523331211264 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) ) tmp_count|3|7|3||0|0|49199|28229|3|1|
|statistic|select tenant_wechatapp_id , erp_sales_id , id , date_format ( create_time , '%y-%m-%d' ) warranty_date , '_822257848045047808' tableindex from warranty_service.warranty where tenant_wechatapp_id = :1 and create_time >= :2 and create_time <= :3 order by id limit :4 offset :5|3|21|18||0|0|453866|440927|226|173|
|account|/* applicationname = datagrip 2018.2.2 */ select * from statistic.backlog where tenant_app_id = :1 and user_id = :2|3|37|16||0|0|3268288|1099732|1060|502|
|user_service|select * from user_employee where employee_erp_id = :1 and tenant_id = :2 and date_format ( update_time , :3 ) = date_format ( now ( ) , :4 )|3|5|3||0|0|1749326|583598|825|625|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_836363095600320512 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|3|6|3||0|0|5278024|2926410|835|341|
|statistic|select id , tenant_id tenantid , tenant_wechatapp_id tenantappid , user_id userid , busi_url busiurl , date_format ( create_time , '%y-%m-%d' ) statisticdate from user_service.user_source where tenant_wechatapp_id = :1 and create_time >= :2 and create_time <= :3 and busi_url like :4 limit :5 offset :6|3|8|5||0|0|130994|88007|294|294|
|wx_gateway|select count ( 0 ) from wx_template_msg where tenant_app_id = :1 and title = :2|3|36|15||0|0|645268|288112|1|1|
|statistic|select tenant_wechatapp_id , erp_sales_id , id , date_format ( create_time , '%y-%m-%d' ) warranty_date , '_469175049962786816' tableindex from warranty_service.warranty where tenant_wechatapp_id = :1 and create_time >= :2 and create_time <= :3 order by id limit :4 offset :5|3|4|2||0|0|10570|4935|16|12|
|statistic|select id , tenant_id , tenant_wechatapp_id tenant_app_id , src_type , page_id , tenant_app_open_id , user_id , user_name , mobile_no , head_img , create_time push_time , 0 pull_status from customize_page.award_qualified where tenant_wechatapp_id = :1 and create_time >= :2 and create_time <= :3 limit :4 offset :5|3|17|7||0|0|1097715|365906|0|0|
|user_service|select id , plat_unionid , plat_openid , user_name , mobile_no , nick_name , sex , head_img_url , country , province , city , status , create_time , update_time , is_subscribe , subscribe_time from `user` where user_name like concat ( :1 , :2 , :3 ) or mobile_no = :4 or nick_name like concat ( :5 , :6 , :7 ) limit :8|4|8|2||0|0|7686081|1924127|8|5|
|activity_service|select count ( 0 ) from ( select t2.user_name as username , t2.data as userheadimg , ifnull ( t1.finished_time , t1.update_time ) as time , t1.cutdown_amount as cutdownamount , t2.partake_data as partakedata from activity_service.cutdown_price_activity_apply t1 join activity_service.user_trace t2 on t1.id = t2.user_apply_id and t2.step = :1 where t1.activity_id = :2 ) table_count|4|4|1||0|0|275964|68991|4|1|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , ifnull ( t2.registe_time , if ( t1.user_id is null and t1.member_user_id is not null , t1.create_time , null ) ) as registetime , t2.first_shop_time as firstshoptime , t2.last_shop_time as lastshoptime , t2.first_sales_time as firstsalestime , t2.last_sales_time as lastsalestime , t2.last_login_time as lastlogintime , t2.last_score_time as lastscoretime , t2.follow_time as followtime , t2.cancel_follow_time as cancelfollowtime , t2.bind_time as bindtime , t2.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_469175049962786816 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|4|8|3||0|0|322282|107611|10422|3000|
|statistic|select t.tenant_id , t.tenant_app_id , ifnull ( t.shop_id , -1 ) shop_id , t.shop_name , ifnull ( t.user_id , -1 ) user_id , t.user_name , t.scene , t.expire_date , t.statistic_date , count ( * ) total_amount from ( select bg.id , bg.tenant_id , bg.tenant_app_id , bg.shop_id , bg.shop_name , bg.user_id , bg.user_name , bg.status , bg.scene , date_format ( bg.expire_time , '%y-%m-%d' ) expire_date , date_format ( bg.create_time , '%y-%m-%d' ) statistic_date from statistic.backlog bg where bg.tenant_app_id = :1 and bg.shop_id != :2 and bg.user_id != :3 and bg.create_time >= :4 and bg.create_time <= :5 ) t group by t.tenant_id , t.tenant_app_id , t.shop_id , t.shop_name , t.user_id , t.user_name , t.scene , t.expire_date , t.statistic_date limit :6 offset :7|4|24|10||0|0|4382142|1097751|40|29|
|tag_service|select count ( 0 ) from ( select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_830220893509701632 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) ) tmp_count|4|7|3||0|0|114321|55198|4|1|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_469175049962786816 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|4|11|6||0|0|920670|504668|314|116|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_814019237554196480 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|4|9|2||0|0|13254443|3588662|1139|422|
|payment|select original_task_id from job_status_trace_log where task_id = :1 and state = :2|4|11|4||0|0|46914|11730|46914|11730|
|wx_gateway|insert into wx_template_msg ( id , tenant_id , tenant_app_id , user_id , tenant_user_open_id , template_id , template_no , url , data , msg_id , status , err_msg , title , content , create_time , update_time , tenant_short_name , tenant_app_name , user_mobile_no , user_name , user_head_img_url ) values ( :1 , :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , null , null , :11 , :12 , :13 , :14 , :15 , :16 , :17 , :18 , :19 )|4|60|15||0|0|0|0|0|0|
|statistic|select bm.id , group_concat ( distinct sd.category_erp_id ) categoryid , group_concat ( distinct sd.category_name ) categoryname , min ( es.sales_date ) firstsalestime , max ( es.sales_date ) lastsalestime from base_user_member bu inner join member_extra bm on bu.tenant_app_id = bm.tenant_app_id and bu.user_id = bm.user_id inner join tenant.erp_sales es on bm.tenant_app_id = es.tenant_wechatapp_id and bm.member_erp_id = es.member_erp_id inner join tenant.erp_sales_detail sd on es.tenant_wechatapp_id = sd.tenant_wechatapp_id and es.sales_erp_id = sd.sales_erp_id where bu.tenant_app_id = :1 and sd.sales_type = :2 and es.sales_status = :3 group by bm.id order by bm.id limit :4 offset :5|4|12|4||0|0|81268|29530|664|449|
|tag_service|insert into tag_service.label_vip_match_469175049962786816 ( id , tenant_app_id , shop_id , vip_id , vip_source ) select t1.id , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) left join tag_service.label_vip_match_469175049962786816 lvm on t1.id = lvm.id where t1.tenant_id = :1 and t1.tenant_app_id = :2 and lvm.id is null|4|7|2||0|0|1853844|552158|0|0|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_816450513213112320 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|4|10|3||0|0|183066|53061|0|0|
|statistic|select t.source_type , t.amount from ( select source_type , sum ( amount ) amount from statistic.result_add_shop_source where tenant_id = :1 and tenant_app_id = :2 and shop_id = :3 and statistic_date between :4 and :5 group by source_type ) t order by t.amount desc|4|4|1||0|0|437064|109476|15|4|
|tag_service|select id , tenant_app_id , shop_id , vip_id , vip_source , vip_label from label_vip_match_823709122435256320 where tenant_app_id = :1 and vip_id = :2|4|8|2||0|0|197872|49468|4|1|
|statistic|select tenant_wechatapp_id , erp_sales_id , id , date_format ( create_time , '%y-%m-%d' ) warranty_date , '_817517269994225664' tableindex from warranty_service.warranty where tenant_wechatapp_id = :1 and create_time >= :2 and create_time <= :3 order by id limit :4 offset :5|4|9|4||0|0|47440|21666|221|105|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_889699715132813312 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|4|5|1||0|0|1415303|463440|104|38|
|user_service|insert into user ( id , plat_unionid , plat_openid , user_name , mobile_no , nick_name , sex , head_img_url , country , province , city , status , is_subscribe , subscribe_time ) values ( :1 , null , :2 , null , null , null , :3 , null , null , null , null , null , null , null ) on duplicate key update sex = :4 , plat_openid = :5|4|60|15||0|0|0|0|0|0|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_817517269994225664 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|4|9|3||0|0|150624|72766|5|3|
|wx_gateway|insert into wx_user ( id , tenant_id , tenant_app_id , union_id , open_id , wx_app_id , cm_union_id , cm_open_id , user_id , status ) values ( :1 , :2 , :3 , null , :4 , :5 , :6 , :7 , :8 , :9 ) on duplicate key update wx_app_id = :10 , open_id = :11 , cm_union_id = :12 , cm_open_id = :13 , status = :14 , create_time = create_time|4|60|15||0|0|0|0|0|0|
|tag_service|delete from tag_service.label_vip_match_476787156229165056 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_476787156229165056 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|4|30|15||0|0|2937666|734440|0|0|
|tag_service|select id , tenant_app_id , shop_id , vip_id , vip_source , vip_label from label_vip_match_487569764496052224 where tenant_app_id = :1 and vip_id = :2|4|15|4||0|0|447988|111997|4|1|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_487569764496052224 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|5|12|3||0|0|16955954|4704959|1472|391|
|bespoke|select count ( * ) from bespoke.bespoke_trade where user_id = :1 and tenant_app_id = :2 and status <> :3|5|8|2||0|0|113635|22727|5|1|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_814020764498956288 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|5|9|2||0|0|122178|45566|0|0|
|tag_service|select count ( 0 ) from ( select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_821229068421742592 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) ) tmp_count|5|16|10||0|0|218130|43626|5|1|
|tag_service|select id , tenant_app_id , shop_id , vip_id , vip_source , vip_label from label_vip_match_822257848045047808 where tenant_app_id = :1 and vip_id = :2|5|62|15||0|0|2037558|457307|1|1|
|tag_service|select id , tenant_app_id , shop_id , vip_id , vip_source , vip_label from label_vip_match_891434732540272640 where tenant_app_id = :1 and vip_id = :2|5|10|2||0|0|336370|67274|4|1|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_822257848045047808 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|5|76|37||0|0|1313523|985232|8|8|
|tag_service|select count ( 0 ) from ( select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_839295151019966464 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) ) tmp_count|5|9|2||0|0|48679|30351|5|1|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_469175049962786816 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|5|10|4||0|0|104334|32088|0|0|
|statistic|select tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name , sum ( tmp.amount ) amount from ( select t.sales_date , t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) user_id , if ( oe.employee_user_id is null or oe.employee_user_id = :1 , :2 , oe.employee_user_name ) user_name , t.amount from ( select sales_date , tenant_id , tenant_app_id , dept_erp_id shop_id , erp_employee_id user_id , count ( * ) amount from statistic.erp_sales_822257848045047808 where tenant_app_id = :3 and sales_status = :4 and has_sale = :5 and create_time >= :6 and create_time <= :7 group by tenant_id , tenant_app_id , sales_date , dept_erp_id , erp_employee_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and t.shop_id = os.dept_erp_id left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and t.user_id = oe.employee_erp_id ) tmp where tmp.shop_id != :8 and tmp.user_id != :9 group by tmp.sales_date , tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.user_id , tmp.user_name|5|24|17||0|0|403583|304987|125|77|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_882402759662481408 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|5|9|3||0|0|2581412|652130|298|85|
|tag_service|select id , tenant_app_id , shop_id , vip_id , vip_source , vip_label from label_vip_match_814020764498956288 where tenant_app_id = :1 and vip_id = :2|5|10|2||0|0|259985|51997|5|1|
|statistic|select tenant_wechatapp_id , user_id , source_type , create_time , '2019-06-0223:59:59.0' update_time from user_service.user_source where tenant_wechatapp_id = :1 and create_time >= :2 and create_time <= :3 limit :4 offset :5|5|6|2||0|0|131987|48206|368|179|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_891434732540272640 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|5|7|2||0|0|2408842|605039|329|151|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_835720547919761408 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|5|8|3||0|0|113450|42950|0|0|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_828766757295529984 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|5|7|2||0|0|2886357|863377|686|186|
|statistic|select t.shop_id id , t.shop_name name , t.saleamount , t.waramount , t.finish_rate finishrate from ( select ec.shop_id , ec.shop_name , ec.saleamount , ec.waramount , if ( ec.saleamount = 0 , 100 , round ( ec.waramount*100/ec.saleamount , 2 ) ) finish_rate from ( select ec.shop_id , ec.shop_name , sum ( ec.sale_amount ) saleamount , sum ( ec.war_amount ) waramount from result_employee_warranty ec where ec.tenant_id = :1 and ec.shop_id != :2 and ec.tenant_app_id = :3 and ec.sales_date between :4 and :5 group by ec.shop_id , ec.shop_name ) ec ) t order by t.finish_rate desc|6|23|10||0|0|5106270|851045|18|3|
|tag_service|select id , tenant_app_id , shop_id , vip_id , vip_source , vip_label from label_vip_match_839295151019966464 where tenant_app_id = :1 and vip_id = :2|6|24|4||0|0|653742|108957|4|1|
|coupon_service|select id , tenant_id , tenant_wechatapp_id , coupon_template_id , coupon_no , coupon_state , owner_id , creator_id , creator_mobile_no , creator_name , user_name , mobile_no , create_channel , coupon_name , face_value , coupon_type , use_threshold , begin_time , end_time , remark , create_time , update_time , product_name , exchange_shop , channel_id , writeoff_user_id , off_type from coupon_user where coupon_template_id = :1 and owner_id = :2|6|32|14||0|0|2050768|342005|0|0|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_816096827580399616 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|6|11|2||0|0|10554328|3187794|440|144|
|platform|update vendormember vm inner join ( select sum ( integral ) as integral , sum ( if ( integral > 0 , integral , 0 ) ) as hisintegral from integrallog where vendorid = :1 and memberid = :2 and isdeleted = :3 ) s on :4 = :5 set vm.integral = ifnull ( s.integral , :6 ) , vm.hisintegral = ifnull ( s.hisintegral , :7 ) , vm.updatetime = now ( ) where vendorid = :8 and memberid = :9|6|8|2||0|0|76|33|0|0|
|tag_service|select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_885278795660111872 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) limit :9 , :10|6|25|5||0|0|438037|132449|47|10|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_830220893509701632 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|6|16|6||0|0|6792015|2309001|3413|985|
|statistic|select t.user_id id , t.user_name name , t.score from ( select ec.user_id , ec.user_name , round ( ec.score/ec.amount ) score from ( select ec.user_id , ec.user_name , sum ( ec.score ) score , sum ( ec.amount ) amount from result_employee_comment ec where ec.tenant_id = :1 and ec.tenant_app_id = :2 and ec.shop_id = :3 and ec.statistic_date between :4 and :5 and ec.score > :6 and ec.user_id != :7 group by ec.user_id , ec.user_name ) ec ) t order by t.score desc|6|11|2||0|0|603348|100588|27|12|
|tag_service|select id , tenant_app_id , shop_id , vip_id , vip_source , vip_label from label_vip_match_823844580729339904 where tenant_app_id = :1 and vip_id = :2|7|66|11||0|0|1929914|275702|7|1|
|user_service|insert into erp_integral_log ( tenant_id , tenant_wechatapp_id , integral_erp_id , member_erp_id , note_erp_id , remark , integral , erp_create_time , create_time , update_time ) values ( :1 , :2 , :3 , :4 , :5 , :6 , -5000.00 , :7 , :8 , :9 ) on duplicate key update update_time = now ( )|7|105|15||0|0|0|0|0|0|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_834615931371048960 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|7|12|2||0|0|12252194|3232311|499|177|
|statistic|select ut.tenant_id , ut.tenant_app_id , tt.activity_name , ut.activity_id , ut.user_id , date_format ( ut.create_time , '%y-%m-%d' ) statistic_date from activity_service.user_trace ut inner join activity_service.activity tt on ut.activity_id = tt.id where ut.tenant_app_id = :1 and ut.activity_type = :2 and ut.step = :3 and ut.create_time >= :4 and ut.create_time <= :5 limit :6 offset :7|7|18|5||0|0|293632|146851|0|0|
|tag_service|select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_823844580729339904 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) limit :9 , :10|7|13|2||0|0|400176|114076|63|10|
|tag_service|select id , tenant_app_id , shop_id , vip_id , vip_source , vip_label from label_vip_match_480726380749918208 where tenant_app_id = :1 and vip_id = :2|7|38|10||0|0|1273930|181990|7|1|
|statistic|select tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , sum ( tmp.cancel_amount ) cancel_amount , sum ( tmp.full_amount ) full_amount , sum ( tmp.bind_amount ) bind_amount , sum ( tmp.subscribe_amount ) subscribe_amount from ( select t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , t.cancel_amount , t.full_amount , t.bind_amount , t.subscribe_amount from ( select mb.tenant_id , mb.tenant_app_id , mt.shop_id , sum ( if ( mb.subscribe_flag = 0 , 1 , 0 ) ) cancel_amount , sum ( if ( mb.subscribe_flag = 1 , 1 , 0 ) ) subscribe_amount , sum ( if ( mb.bind_flag = 1 , 1 , 0 ) ) bind_amount , sum ( if ( mb.full_flag = 1 , 1 , 0 ) ) full_amount from statistic.member mb inner join statistic.member_extra mt on mb.id = mt.id where mb.tenant_app_id = :1 and mb.create_time <= :2 and mb.register_flag = :3 group by mb.tenant_id , mb.tenant_app_id , mt.shop_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and ( t.shop_id = os.dept_erp_id or t.shop_id = os.shop_id ) ) tmp group by tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name|7|11|2||0|0|3900610|657456|157|44|
|statistic|select sd.tenant_id , sd.tenant_app_id , sd.sales_date , ifnull ( os.shop_id , '-1' ) depterpid , ifnull ( oe.employee_user_id , '-1' ) erp_employee_id , ifnull ( sd.value_add_amount , 0 ) value_add_amount from statistic.erp_sales_detail_839295151019966464 sd left join statistic.off_shop os on sd.tenant_app_id = os.tenant_app_id and sd.dept_erp_id = os.dept_erp_id left join statistic.off_employee oe on sd.tenant_app_id = oe.tenant_app_id and sd.erp_employee_id = oe.employee_erp_id where sd.tenant_app_id = :1 and sd.value_add_date = date_format ( :2 , :3 ) and os.shop_id != :4 and oe.employee_user_id != :5 limit :6 offset :7|8|23|8||0|0|421179|110307|0|0|
|platform|select `noteid` , `vendorid` , `detailindex` , `productname` , `productbarcode` , `category` , `salestype` , `quantity` , `amount` , `integral` , `productdesc` , `slid` , `paidamount` , `id` from `salesdetaillog` where `noteid` = :1 and `vendorid` = :2|8|25|10||0|0|452782|98909|24|5|
|user_service|select count ( 0 ) from tenant_user tu join user u on u.id = tu.user_id where tu.tenant_id = :1 and ( tu.user_name like concat ( :2 , :3 , :4 ) or tu.mobile_no = :5 or u.nick_name like concat ( :6 , :7 , :8 ) ) and tenant_app_id = :9|8|42|8||0|0|760438|112648|8|1|
|statistic|select t.user_id id , t.user_name name , t.amount from ( select user_id , user_name , sum ( amount ) amount from statistic.result_add_shop_user where tenant_id = :1 and tenant_app_id = :2 and shop_id = :3 and statistic_date between :4 and :5 and user_name > :6 group by user_id , user_name ) t order by t.amount desc|8|14|2||0|0|1986508|248868|216|107|
|statistic|select tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.source_type , sum ( tmp.amount ) amount from ( select t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , t.source_type , t.amount from ( select mb.tenant_id , mb.tenant_app_id , mt.shop_id , mb.source_type , count ( * ) amount from statistic.member mb inner join statistic.member_extra mt on mb.id = mt.id where mb.tenant_app_id = :1 and mb.create_time <= :2 and mb.register_flag = :3 group by mb.tenant_id , mb.tenant_app_id , mt.shop_id , mb.source_type ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and ( t.shop_id = os.dept_erp_id or t.shop_id = os.shop_id ) ) tmp group by tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.source_type|8|12|2||0|0|4295043|669467|637|108|
|user_service|select count ( 0 ) from `user` where user_name like concat ( :1 , :2 , :3 ) or mobile_no = :4 or nick_name like concat ( :5 , :6 , :7 )|8|69|11||0|0|15372346|1924127|8|1|
|statistic|select max ( statistic_date ) enddate from result_shop_user where tenant_id = :1 group by tenant_id|8|36|14||0|0|15253904|1906738|8|1|
|statistic|select bg.id , bd.content , bd.create_time from employee.backlog bg left join employee.backlog_detail bd on bg.id = bd.backlog_id where bg.tenant_app_id = :1 and bd.create_time >= :2 and bd.create_time <= :3 limit :4 offset :5|9|19|5||0|0|1391864|263781|1877|407|
|user_service|select count ( * ) from tenant_user where tenant_app_id = :1 and shop_id = :2 and mobile_no is not null and mobile_no != :3|9|26|6||0|0|462023|138317|9|1|
|statistic|select tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.employee_user_id , tmp.employee_user_name , sum ( tmp.amount ) amount from ( select t.tenant_id , t.tenant_app_id , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , ifnull ( oe.employee_user_id , '-1' ) employee_user_id , if ( oe.employee_user_id = '-1' or oe.employee_user_id is null , :1 , oe.employee_user_name ) employee_user_name , t.amount from ( select mt.tenant_id , mt.tenant_app_id , mt.shop_id , mt.employee_user_id , count ( * ) amount from statistic.member mb left join statistic.member_extra mt on mb.id = mt.id where mb.tenant_app_id = :2 and mb.create_time <= :3 and mb.register_flag = :4 group by mt.tenant_id , mt.tenant_app_id , mt.shop_id , mt.employee_user_id ) t left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and ( t.shop_id = os.dept_erp_id or t.shop_id = os.shop_id ) left join statistic.off_employee oe on t.tenant_app_id = oe.tenant_app_id and ( t.employee_user_id = oe.employee_erp_id or t.employee_user_id = oe.employee_user_id ) ) tmp group by tmp.tenant_id , tmp.tenant_app_id , tmp.shop_id , tmp.shop_name , tmp.employee_user_id , tmp.employee_user_name|9|25|6||0|0|14661174|3153976|6475|1316|
|user_service|select tu.user_id as userid , tu.mobile_no as mobileno , tu.user_name as username , u.nick_name as nickname , u.head_img_url as headimgurl from tenant_user tu join `user` u on tu.user_id = u.id where tu.tenant_id = :1 and tu.tenant_app_id = :2 and ( u.mobile_no = :3 or u.nick_name like concat ( :4 , :5 , :6 ) or tu.user_name like concat ( :7 , :8 , :9 ) )|9|36|14||0|0|450635|214557|235|146|
|statistic|select cu.id , cu.tenant_id , cu.tenant_wechatapp_id , cu.coupon_name , cu.coupon_type , cu.coupon_no , cu.create_channel , cu.coupon_state , cu.user_name , cu.creator_name , cu.face_value , cu.begin_time , cu.end_time , cu.remark , cu.create_time , cu.update_time , cu.mobile_no , cu.creator_mobile_no , if ( cu.coupon_type = 4 , vu.template_id , cu.coupon_template_id ) coupon_template_id from coupon_service.coupon_user cu left join value_added.value_added_user vu on cu.tenant_wechatapp_id = vu.tenant_wechatapp_id and cu.id = vu.coupon_user_id where cu.tenant_wechatapp_id = :1 and cu.create_time >= :2 and cu.create_time <= :3 limit :4 offset :5|10|30|9||0|0|225486|71699|1047|342|
|user_service|select count ( 0 ) from ( select t1.erp_member_id as membererpid , t2.head_img_url as headimgurl , t2.nick_name as nickname , t1.mobile_no as mobileno , date_format ( t1.bind_time , '%y-%m-%d%h:%i:%s' ) as registertime from tenant_user t1 join `user` t2 on t1.user_id = t2.id left join user_employee t3 on t1.user_id = t3.user_id and t1.tenant_id = t3.tenant_id and t1.tenant_app_id = t3.tenant_wechatapp_id where t3.id is null and t1.mobile_no is not null and t1.mobile_no != :1 and t1.erp_member_id is not null and t1.shop_id = :2 and t1.tenant_id = :3 and t1.tenant_app_id = :4 ) table_count|10|50|8||0|0|513780|89522|10|1|
|tenant|select count ( 0 ) from erp_sales where tenant_id = :1 and tenant_wechatapp_id = :2 and sales_date >= :3 and employee_erp_id = :4 and sales_status = :5|10|13|1||0|0|1662035|166352|10|1|
|user_service|select * from user_employee where employee_erp_id = :1 and tenant_id = :2|10|17|3||0|0|5838900|584367|1070|393|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_480726380749918208 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|10|35|6||0|0|47846045|11761676|2774|492|
|tag_service|delete from tag_service.label_vip_match_822257848045047808 where id in ( select id from ( select lvm.id from tag_service.label_vip_match_822257848045047808 lvm left join statistic.member t1 on t1.id = lvm.id where :1 = :2 and lvm.tenant_app_id = :3 and t1.id is null ) a )|10|48|19||0|0|9137647|913810|0|0|
|tag_service|select distinct date_format ( create_time , '%y' ) from statistic.member where tenant_id = :1 and tenant_app_id = :2|11|33|15||0|0|2334671|341843|19|2|
|tag_service|select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_823844580729339904 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) limit :9|11|21|2||0|0|479922|71492|84|10|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_818623050667823104 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|12|26|4||0|0|15062980|1778807|1442|165|
|wx_gateway|update wx_token set appid = :1 , app_secret = null , refresh_token = :2 , access_token = :3 , access_token_expire = :4 , jsapi_ticket = :5 , jsapi_ticket_expire = :6 , refresh_type = :7 , create_time = :8 , update_time = :9 where id = :10|12|180|15||0|0|0|0|0|0|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_490810080325931008 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|13|26|5||0|0|12768527|3290433|1401|216|
|statistic|select es.tenant_wechatapp_id tenant_app_id , es.member_erp_id , group_concat ( distinct sd.category_erp_id ) categoryid , group_concat ( distinct sd.category_name ) categoryname , min ( es.sales_date ) firstsalestime , max ( es.sales_date ) lastsalestime from base_erp_member bm inner join tenant.erp_sales es on bm.tenant_app_id = es.tenant_wechatapp_id and bm.member_erp_id = es.member_erp_id inner join tenant.erp_sales_detail sd on es.tenant_wechatapp_id = sd.tenant_wechatapp_id and es.sales_erp_id = sd.sales_erp_id where bm.tenant_app_id = :1 and sd.sales_type = :2 and es.sales_status = :3 group by es.tenant_wechatapp_id , es.member_erp_id limit :4 offset :5|13|38|6||0|0|236438|34896|1678|356|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_488003299602206720 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|14|30|5||0|0|18700742|3981209|1886|373|
|tag_service|select t1.id , t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t1.user_id , t1.member_user_id ) as vipid , if ( t1.user_id is null , 'offline' , 'online' ) as vipsource , ifnull ( t2.employee_user_id , ifnull ( t1.employee_user_id , 0 ) ) as employeeuserid , ifnull ( t1.age , 0 ) as age , ifnull ( t1.sex , 0 ) as sex , t1.solar_birthday as solarbirthday , t1.birthday as birthday , ifnull ( t1.birthday_is_lunar , 0 ) as birthdayislunar , t1.birthday_month_day as birthdaymonthday , t1.identity , t1.source_type as sourcetype , t1.status , t1.subscribe_flag as subscribeflag , t1.bind_flag as bindflag , t1.full_flag as fullflag , t1.memorial_day as memorialday , t1.memorial_day_is_lunar as memorialdayislunar , t2.grade_erp_id as gradeerpid , t2.sales_balance as salesbalance , t2.sales_amount as salesamount , t2.consumption_integral as consumptionintegral , t2.cumulation , t2.balance , t2.service_amount as serviceamount , ifnull ( t2.registe_time , if ( t1.user_id is null and t1.member_user_id is not null , t1.create_time , null ) ) as registetime , t2.first_shop_time as firstshoptime , t2.last_shop_time as lastshoptime , t2.first_sales_time as firstsalestime , t2.last_sales_time as lastsalestime , t2.last_login_time as lastlogintime , t2.last_score_time as lastscoretime , t2.follow_time as followtime , t2.cancel_follow_time as cancelfollowtime , t2.bind_time as bindtime , t2.last_service_time as lastservicetime , t2.category_id as categoryid , t2.last_sale_balance as lastsalebalance , t2.last_stone_weight as laststoneweight , t2.last_gold_weight as lastgoldweight , t2.last_category_id as lastcategoryid , lvm.vip_label as viplabels from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_476787156229165056 lvm on t1.id = lvm.id left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :1 and t1.tenant_app_id = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t1.create_time >= date_format ( :5 , :6 ) and t1.create_time <= date_format ( :7 , :8 ) and t1.id >= :9 and t1.id <= :10 limit :11 offset :12|14|21|3||0|0|52617416|5426873|42000|3000|
|statistic|select t.user_id id , t.user_name name , t.saleamount , t.waramount , t.finish_rate finishrate from ( select ec.user_id , ec.user_name , ec.saleamount , ec.waramount , if ( ec.saleamount = 0 , 100 , round ( ec.waramount*100/ec.saleamount , 2 ) ) finish_rate from ( select ec.user_id , ec.user_name , sum ( ec.sale_amount ) saleamount , sum ( ec.war_amount ) waramount from statistic.result_employee_warranty ec where ec.tenant_id = :1 and ec.shop_id = :2 and ec.user_id != :3 and ec.tenant_app_id = :4 and ec.sales_date between :5 and :6 group by ec.user_id , ec.user_name ) ec ) t order by t.finish_rate desc|14|88|9||0|0|11909906|851085|89|14|
|platform|select `typefullname` , `methodname` , `arguments` , `partition` , `offset` , `createtime` , `updatetime` , `retried` , `errormsg` , `id` from `pushlog` where `typefullname` = :1 and `methodname` = :2 and `arguments` = :3|15|21|3||0|0|3397595|236060|0|0|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_817517269994225664 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|15|22|2||0|0|12732528|3029455|2735|372|
|customer|select count ( 0 ) from customer_face_pass t where :1 = :2 and t.is_checkin = :3 and t.shop_id = :4 and t.person_type not in ( :5 )|15|71|9||0|0|1359884|207779|15|1|
|platform|select count ( 1 ) from coupondetail cd where getuid = :1 and ( couponstate = :2 or couponstate = :3 ) and date_format ( expirytime , :4 ) >= curdate ( )|16|58|8||0|0|5100176|318761|16|1|
|statistic|select bl.id , bl.tenant_id , bl.tenant_app_id , bl.user_id , ee.employee_name user_name , ee.mobile_no , bl.status , bl.scene , bl.data , bl.begin_time , bl.expire_time , bl.create_time , bl.update_time , ifnull ( ws.id , -1 ) shop_id , ws.shop_name from employee.backlog bl left join tenant.employee_user eu on bl.tenant_app_id = eu.tenant_wechatapp_id and bl.user_id = eu.user_id left join tenant.erp_employee ee on eu.tenant_id = ee.tenant_id and eu.employee_erp_id = ee.employee_erp_id left join tenant.tenant_wechatapp_shop ws on eu.shop_id = ws.id and ws.status = :1 where bl.tenant_app_id = :2 and bl.create_time >= :3 and bl.create_time <= :4 order by bl.id limit :5 offset :6|16|126|38||0|0|3145855|604119|3827|910|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_486900027235635200 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|16|30|3||0|0|13841660|3142244|217|65|
|tag_service|select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_885278795660111872 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) limit :9|16|46|4||0|0|735118|256259|99|10|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_821229068421742592 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|17|89|16||0|0|158412870|37831306|11237|1660|
|platform|select count ( 1 ) from `integrallog` where `vendorid` = :1 and `changefrom` = :2 and `changeid` = :3|17|30|3||0|0|355357|35397|17|1|
|tag_service|select id , tenant_app_id , shop_id , vip_id , vip_source , vip_label from label_vip_match_885278795660111872 where tenant_app_id = :1 and vip_id = :2|18|169|15||0|0|5312641|296077|8|1|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_816450513213112320 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|18|22|2||0|0|4316911|475417|402|64|
|tag_service|select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_480726380749918208 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) limit :9 , :10|18|23|1||0|0|177730|17780|180|10|
|facepass_sync|select id , tenant_id , tenant_wechatapp_id , shop_id , status , retries , success_time , send_fail_msg , create_time , update_time , send_data from customer_face_register_message where status in ( :1 , :2 ) and retries < :3 limit :4|19|29|2||0|0|178952|9430|0|0|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_826954007829331968 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|19|69|11||0|0|15354902|3747868|215|27|
|tag_service|select count ( 0 ) from ( select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_823844580729339904 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) ) tmp_count|20|94|15||0|0|1304369|114076|18|1|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_827516559562940416 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|20|109|19||0|0|191168119|45369072|9241|1511|
|order|select tenant_wechatapp_id from order_info where status = :1 and child_status is null group by tenant_wechatapp_id|20|46|3||0|0|610272|30517|2|1|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_885278795660111872 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|20|100|18||0|0|41495102|8600520|5791|1090|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_823688108565368832 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|20|90|12||0|0|70366312|17409467|11412|1718|
|statistic|select tu.id , tu.user_id userid , tu.tenant_id tenantid , tu.tenant_app_id tenantappid , tu.shop_id shopid , tu.erp_member_id memberuserid , tu.user_name username , tu.mobile_no mobileno , ifnull ( tu.sex , 0 ) sex , tu.birthday , tu.birthday_is_lunar birthdayislunar , tu.memorial_name memorialname , tu.memorial_day memorialday , tu.memorial_day_is_lunar memorialdayislunar , tu.create_time createtime , '2019-06-0223:59:59.0' updatetime , if ( tu.bind_time is null , 0 , 1 ) bindflag , if ( tu.mobile_no is null , 0 , 1 ) fullflag , ifnull ( em.consumption_integral , 0 ) consumptionintegral , em.grade_erp_id gradeerpid , tu.bind_time bindtime , if ( ifnull ( tu.is_subscribe , 0 ) = 0 , 1 , 0 ) cancelflag , if ( ifnull ( tu.is_subscribe , 0 ) = 1 , 1 , 0 ) subscribeflag , if ( tu.is_subscribe = 1 , null , tu.subscribe_time ) canceltime , tu.subscribe_time from user_service.tenant_user tu left join user_service.erp_member em on tu.tenant_app_id = em.tenant_wechatapp_id and tu.erp_member_id = em.member_erp_id where tu.tenant_app_id = :1 and tu.update_time >= :2 and tu.create_time <= :3 and tu.update_time <= :4 union all select tu.id , tu.user_id userid , tu.tenant_id tenantid , tu.tenant_app_id tenantappid , tu.shop_id shopid , tu.erp_member_id memberuserid , tu.user_name username , tu.mobile_no mobileno , ifnull ( tu.sex , 0 ) sex , tu.birthday , tu.birthday_is_lunar birthdayislunar , tu.memorial_name memorialname , tu.memorial_day memorialday , tu.memorial_day_is_lunar memorialdayislunar , tu.create_time createtime , '2019-06-0223:59:59.0' updatetime , if ( tu.bind_time is null , 0 , 1 ) bindflag , if ( tu.mobile_no is null , 0 , 1 ) fullflag , ifnull ( em.consumption_integral , 0 ) consumptionintegral , em.grade_erp_id gradeerpid , tu.bind_time bindtime , if ( ifnull ( tu.is_subscribe , 0 ) = 0 , 1 , 0 ) cancelflag , if ( ifnull ( tu.is_subscribe , 0 ) = 1 , 1 , 0 ) subscribeflag , if ( tu.is_subscribe = 1 , null , tu.subscribe_time ) canceltime , tu.subscribe_time from user_service.tenant_user tu left join user_service.erp_member em on tu.tenant_app_id = em.tenant_wechatapp_id and tu.erp_member_id = em.member_erp_id where tu.tenant_app_id = :5 and em.update_time >= :6 and tu.create_time <= :7 and em.update_time <= :8 limit :9 offset :10|21|58|10||0|0|2119762|364334|2780|937|
|erp_sync|select * from erp_sync.retry_data where ( need_erp_member_id = :1 or ( need_erp_member_id = :2 and erp_member_id is not null ) ) and retry_times > :3 order by id asc|22|99|6||0|0|878681|40065|0|0|
|statistic|select tmp.tenant_id , tmp.tenant_app_id , tmp.grade_erp_id , tmp.grade_name , tmp.shop_id , tmp.shop_name , sum ( tmp.amount ) amount from ( select t.tenant_id , t.tenant_app_id , ifnull ( t.grade_erp_id , -1 ) grade_erp_id , if ( t.grade_erp_id is null , '无' , gd.grade_name ) grade_name , ifnull ( os.shop_id , '-1' ) shop_id , ifnull ( os.shop_name , '未知' ) shop_name , t.amount from ( select mt.tenant_id , mt.tenant_app_id , mt.shop_id , mt.grade_erp_id , count ( * ) amount from statistic.member mb left join statistic.member_extra mt on mb.id = mt.id where mb.tenant_app_id = :1 and mb.create_time <= :2 and mb.register_flag = :3 group by mt.tenant_id , mt.tenant_app_id , mt.shop_id , mt.grade_erp_id ) t left join statistic.grade gd on t.tenant_id = gd.tenant_id and t.grade_erp_id = gd.grade_erp_id left join statistic.off_shop os on t.tenant_app_id = os.tenant_app_id and ( t.shop_id = os.dept_erp_id or t.shop_id = os.shop_id ) ) tmp group by tmp.tenant_id , tmp.tenant_app_id , tmp.grade_erp_id , tmp.grade_name , tmp.shop_id , tmp.shop_name|23|88|14||0|0|5878060|737015|1075|134|
|statistic|select tu.id , tu.tenant_id tenantid , tu.tenant_wechatapp_id tenantappid , tu.member_erp_id memberuserid , tu.user_name username , tu.mobile_no mobileno , tu.create_time tempcreatetime , '2019-06-0223:59:59.0' updatetime , tu.dept_erp_id shopid , ifnull ( tu.consumption_integral , 0 ) consumptionintegral , tu.grade_erp_id gradeerpid , tu.employee_erp_id employeeuserid from user_service.erp_member tu where tu.tenant_wechatapp_id = :1 and tu.update_time >= :2 and tu.create_time <= :3 and tu.update_time <= :4 limit :5 offset :6|23|57|7||0|0|2390290|291683|2096|483|
|tag_service|select count ( 0 ) from ( select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_885278795660111872 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) ) tmp_count|24|174|15||0|0|2912882|272337|22|1|
|wx_gateway|insert into wx_user ( id , tenant_id , tenant_app_id , union_id , open_id , wx_app_id , cm_union_id , cm_open_id , user_id , status ) values ( :1 , :2 , :3 , null , :4 , :5 , null , :6 , :7 , :8 ) on duplicate key update wx_app_id = :9 , open_id = :10 , cm_open_id = :11 , status = :12 , create_time = create_time|25|375|15||0|0|0|0|0|0|
|statistic|select max ( statistic_date ) enddate from result_shop_user where tenant_id = :1 and tenant_app_id = :2 group by tenant_id|25|81|13||0|0|47668450|1906738|25|1|
|platform|select `tasktype` , `tasktime` , `taskstatus` , `bid` , `vendorid` , `uid` , `completetime` , `remark` , `createtime` , `id` from `taskassignment` where tasktype = :1 and vendorid = :2 and date_format ( tasktime , :3 ) >= curdate ( ) and ( taskstatus = :4 or taskstatus = :5 )|25|35|3||0|0|15521211|620849|72|68|
|tag_service|select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_480726380749918208 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) limit :9|26|31|2||0|0|206166|67953|246|10|
|facepass_sync|select id , tenant_id , tenant_wechatapp_id , shop_id , status , create_time , update_time , receive_data , response_data from customer_face_sync_message where status = :1 and create_time < date_add ( now ( ) , interval :2 minute ) order by id asc limit :3|27|112|7||0|0|1215367|46353|27|1|
|activity_service|select id , tenant_id , tenant_wechatapp_id , activity_id , lottery_activity_id , user_id , head_img_url , user_name , mobile_no , prize_type , prize_name , prize_image_url , status , create_time , update_time , prize_data , winning_prize from lottery_winner where status = :1 and create_time < date_add ( now ( ) , interval :2 minute )|27|206|14||0|0|1583903|58912|0|0|
|statistic|select max ( statistic_date ) enddate from result_shop_source where tenant_id = :1 and tenant_app_id = :2 group by tenant_id|28|64|5||0|0|9613436|343337|28|1|
|statistic|select max ( statistic_date ) enddate from result_shop_grade where tenant_id = :1 and tenant_app_id = :2 group by tenant_id|29|69|5||0|0|12084822|416718|29|1|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_817878088380628992 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|30|51|4||0|0|15522662|1817667|4498|374|
|customer|select count ( * ) as entershopcount , max ( t.enter_shop_time ) as lastentershoptime from customer_face_pass t where t.shop_id = :1 and t.mobile_no = :2 and t.is_checkin = :3|32|181|12||0|0|3181832|207857|32|1|
|statistic|select id , timestampdiff ( year , solar_birthday , '2019-06-0123:59:59.001' ) age from member where tenant_app_id = :1 and birthday_month_day = :2 limit :3 offset :4|32|90|13||0|0|3388640|342081|2708|653|
|platform|select count ( 1 ) from `salesdetaillog` where `vendorid` = :1 and `noteid` = :2|35|80|7||0|0|1614543|98911|35|1|
|statistic|select u.tenant_wechatapp_id tenantappid , u.erp_member_id memberuserid , if ( '男' = u.sex , 1 , if ( '女' = u.sex , 2 , 0 ) ) sex , u.birthday tempbirthday , u.birthday_is_lunar birthdayislunar , u.memorialday_name memorialname , u.memorialday tempmemorialday , u.memorialday_is_lunar memorialdayislunar from user_service.erp_member_info u where u.tenant_wechatapp_id = :1 and u.update_time >= :2 and u.update_time <= :3 limit :4 offset :5|35|78|6||0|0|2656146|291675|4662|968|
|order|select original_task_id from job_status_trace_log where task_id = :1 and state = :2|36|57|2||0|0|77874|2368|77874|2368|
|statistic|select em.id from user_service.tenant_user ut left join user_service.erp_member em on ut.tenant_app_id = em.tenant_wechatapp_id and ut.erp_member_id = em.member_erp_id where ut.tenant_app_id = :1 and ut.bind_time >= :2 and ut.bind_time <= :3 and em.id > :4 limit :5 offset :6|38|107|9||0|0|1420256|138477|3218|824|
|erp_sync|select original_task_id from job_status_trace_log where task_id = :1 and state = :2|38|55|2||0|0|89348|2444|89348|2444|
|statistic|select tenant_wechatapp_id tenant_app_id , member_erp_id from user_service.erp_integral_log where tenant_wechatapp_id = :1 and update_time between :2 and :3 group by tenant_wechatapp_id , member_erp_id limit :4 offset :5|39|121|12||0|0|3062816|709913|2761|357|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_476787156229165056 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|42|211|27||0|0|307481899|66124602|17126|2207|
|statistic|select sum ( amount ) amount from result_shop_user where tenant_id = :1 and tenant_app_id = :2 and shop_id = :3 and statistic_date = ( select max ( statistic_date ) from result_shop_user where tenant_id = :4 and tenant_app_id = :5 and shop_id = :6 and user_name > :7 group by shop_id )|45|195|15||0|0|85792386|1906927|45|1|
|tag_service|select count ( 0 ) from ( select t1.user_id , t1.user_name , t1.mobile_no , t1.sex from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_480726380749918208 t3 on t1.id = t3.id where :1 = :2 and t2.tenant_id = :3 and t2.tenant_app_id = :4 and t2.shop_id = :5 and t2.employee_user_id = :6 and t3.vip_source = :7 and match ( t3.vip_label ) against ( :8 in boolean mode ) ) tmp_count|47|88|15||0|0|3592389|123061|46|1|
|authorization_service|update user_login_token set status = :1 where user_id = :2 and tenant_id = :3 and tenant_wx_app_id = :4 and login_way = :5|47|109|8||0|0|8318|946|0|0|
|statistic|select mt.id , es.sales_erp_id lastsaleerpid , sd.category_erp_id lastcategoryid , sd.category_name lastcategoryname , sd.stone_weight laststoneweight , sd.gold_weight lastgoldweight , round ( sd.amount_pay/if ( sd.quantity = 0 , 1 , sd.quantity ) , 2 ) price , es.amount salesbalance from statistic.member_extra mt inner join tenant.erp_sales es on mt.tenant_app_id = es.tenant_wechatapp_id and mt.member_erp_id = es.member_erp_id and mt.last_sales_time = es.sales_date inner join tenant.erp_sales_detail sd on es.tenant_wechatapp_id = sd.tenant_wechatapp_id and es.sales_erp_id = sd.sales_erp_id where mt.tenant_app_id = :1 and mt.create_time <= :2 and sd.sales_type = :3 and mt.create_time >= :4 order by mt.id , es.sales_erp_id desc , price desc limit :5 offset :6|49|190|22||0|0|6963431|954498|3834|624|
|statistic|select ut.tenant_wx_app_id tenant_app_id , ut.user_id , max ( ut.login_time ) lastlogintime from authorization_service.user_login_token ut where ut.tenant_wx_app_id = :1 and ut.login_time >= :2 and ut.login_time <= :3 group by ut.tenant_wx_app_id , ut.user_id limit :4 offset :5|54|192|19||0|0|1780507|221340|11356|2855|
|statistic|select ac.tenant_app_id , ac.owner_id user_id from account.account ac where ac.tenant_app_id = :1 and ac.owner_type = :2 and ac.account_type = :3 and ac.update_time >= :4 and ac.update_time <= :5 limit :6 offset :7|56|215|23||0|0|1703800|138254|10226|3034|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_823844580729339904 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|60|176|17||0|0|153779399|38245145|5615|1002|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_839295151019966464 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|66|111|3||0|0|14714862|424293|513|22|
|facepass_sync|select original_task_id from job_status_trace_log where task_id = :1 and state = :2|84|165|2||0|0|198403|2459|198403|2459|
|tag_service|select t1.tenant_id as tenantid , t1.tenant_app_id as tenantappid , ifnull ( os.shop_id , 0 ) as shopid , ifnull ( t2.employee_user_id , t1.employee_user_id ) as employeeuserid , count ( * ) as membernum from statistic.member t1 join statistic.member_extra t2 on t1.id = t2.id join tag_service.label_vip_match_822257848045047808 lvm on t1.id = lvm.id and match ( `vip_label` ) against ( :1 in boolean mode ) left join statistic.off_shop os on t2.tenant_app_id = os.tenant_app_id and ( t2.shop_id = os.shop_id or t2.shop_id = os.dept_erp_id ) where t1.tenant_id = :2 and t1.tenant_app_id = :3 and t2.tenant_id = :4 and t2.tenant_app_id = :5 group by t1.tenant_id , t1.tenant_app_id , ifnull ( os.shop_id , 0 ) , ifnull ( t2.employee_user_id , t1.employee_user_id )|119|647|36||0|0|775753118|90512277|27149|2009|
|account|select original_task_id from job_status_trace_log where task_id = :1 and state = :2|120|209|2||0|0|273774|2459|273774|2459|
|wx_gateway|update wx_template_msg set status = :1 , err_msg = :2 where msg_id = :3|251|3770|15||0|0|0|0|0|0|
