Browse Source

排序处理

WH01243 1 năm trước cách đây
mục cha
commit
26a00a2aa1
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      api/internal/service/employService.go

+ 2 - 2
api/internal/service/employService.go

@@ -807,10 +807,10 @@ func employInfoEnt(table, employKey, findKey, depIDArr string, in *types.InfoEmp
 		niJianData = MC.CrmMysql.SelectBySql(fmt.Sprintf("select %s, GROUP_CONCAT(id) as  employIdArr,MAX(is_ignore) as is_ignore,MAX(status) as status from  %s   where %s  in ('%s') and  source=? and    ent_dept_id in  (%s) GROUP BY %s ,%s order  by %s", employKey, table, employKey, strings.Join(niJianIdArr, "','"), depIDArr, employKey, orderKey, orderKey), 2)
 	}
 	if len(wuye1Arr) > 0 {
-		wuyeData1 = MC.CrmMysql.SelectBySql(fmt.Sprintf("select %s,  id,is_ignore,status   from  %s   where %s in ('%s')  and status =1 and  source=? and    ent_dept_id in  (%s)  GROUP BY %s  ,%s order  by %s", employKey, table, employKey, strings.Join(wuye1Arr, "','"), depIDArr, employKey, orderKey, orderKey), 1)
+		wuyeData1 = MC.CrmMysql.SelectBySql(fmt.Sprintf("select %s,  id,is_ignore,status,%s   from  %s   where %s in ('%s')  and status =1 and  source=? and    ent_dept_id in  (%s)  GROUP BY %s  ,%s order  by %s", employKey, orderKey, table, employKey, strings.Join(wuye1Arr, "','"), depIDArr, employKey, orderKey, orderKey), 1)
 	}
 	if len(wuye2Arr) > 0 {
-		wuyeData2 = MC.CrmMysql.SelectBySql(fmt.Sprintf("select %s, id,is_ignore,status   from  %s   where %s  in ('%s')  and status =1 and  source=? and    ent_dept_id in  (%s) GROUP BY %s ,%s order  by %s", employKey, table, employKey, strings.Join(wuye2Arr, "','"), depIDArr, employKey, orderKey, orderKey), 2)
+		wuyeData2 = MC.CrmMysql.SelectBySql(fmt.Sprintf("select %s, id,is_ignore,status,%s   from  %s   where %s  in ('%s')  and status =1 and  source=? and    ent_dept_id in  (%s) GROUP BY %s ,%s order  by %s", employKey, orderKey, table, employKey, strings.Join(wuye2Arr, "','"), depIDArr, employKey, orderKey, orderKey), 2)
 	}
 	for _, v := range *infoData1 {
 		valueMap := map[string]interface{}{