wangchuanjin 5 ماه پیش
والد
کامیت
ab27330b61
1فایلهای تغییر یافته به همراه3 افزوده شده و 2 حذف شده
  1. 3 2
      src/jfw/modules/subscribepay/src/entity/dataExportPackStruct.go

+ 3 - 2
src/jfw/modules/subscribepay/src/entity/dataExportPackStruct.go

@@ -185,8 +185,9 @@ func (this *dataExportPackStruct) GetAccountMsg(sess *httpsession.Session, userI
 	//企业数据导出
 	if entId := qutil.Int64All(sessVal["entId"]); entId != 0 {
 		var entPack []map[string]interface{}
-		limit := util.Mysql.SelectBySql(`select data_limit,export_nums,max_nums,all_export_nums from jianyu.entniche_export_limit a
-			where user_id=? and (exists (select 1 from jianyu.entniche_info b where a.ent_id=b.id and b.status>0) or exists (select 1 from jianyu.entniche_wait_empower c where a.ent_id=c.ent_id and c.product_key='qysjllb' and c.end_time>?))`, qutil.IntAll(sessVal["entUserId"]), NowFormat(Date_Full_Layout))
+		limit := util.Mysql.SelectBySql(`select a.data_limit,a.export_nums,a.max_nums,a.all_export_nums from jianyu.entniche_export_limit a
+			inner join jianyu.entniche_user aa on (a.user_id=? and a.user_id=aa.id and aa.export_power=1)
+			where exists (select 1 from jianyu.entniche_info b where a.ent_id=b.id and b.status>0) or exists (select 1 from jianyu.entniche_wait_empower c where a.ent_id=c.ent_id and c.product_key='qysjllb' and c.end_time>?)`, qutil.IntAll(sessVal["entUserId"]), NowFormat(Date_Full_Layout))
 		if limit != nil && len(*limit) > 0 {
 			mp := map[string]interface{}{
 				"entId":       entId,                                 //企业id