T_test.go 1.1 KB

1234567891011121314
  1. package logic
  2. import (
  3. "fmt"
  4. "testing"
  5. )
  6. func TokenTest(t *testing.T) {
  7. content := "你好老师,这是导出的数据"
  8. mail := "516807046@qq.com"
  9. query := "select t1.全称 as FULL_NAME,t0.CREATE_TIME as CREATE_TIME,coalesce(t0.pv_resp_person,t0.ofv_resp_person,t0.onv_resp_person) as SFZ,coalesce(t0.pv_visitor,t0.ofv_visitor,t0.onv_visitor) as BFZ,coalesce(t0.pv_visit_time,t0.ofv_visit_time,t0.onv_visit_time) as BFSJ,t0.FOLLOW_STATUS as FOLLOW_STATUS,coalesce(t0.pv_next_follow_time,t0.ofv_next_follow_time,t0.onv_next_follow_time) as XCGJSJ,coalesce(t0.pv_content,t0.ofv_content,t0.onv_content) as NR from crm.follow_record t0 left join (select t0.id as ID,t1.full_name as 全称 from crm.task t0 left join crm.custom t1 on (t0.source_id=t1.id) where (t0.source=3)) t1 on (t0.task_id=t1.ID) where (t0.CREATE_TIME>=str_to_date('2024-02-01','%Y-%m-%d') and t0.CREATE_TIME<str_to_date('2024-02-02','%Y-%m-%d') AND t0.CREATE_PERSON IN ('孙振杰','陈瑞文','朱凤超')) order by coalesce(t0.pv_visit_time,t0.ofv_visit_time,t0.onv_visit_time) desc limit 6"
  10. title := "数据导出"
  11. RsaEncrypt([]byte(fmt.Sprintf("%s&%s&%s&%s", content, mail, query, title)))
  12. }