Ver Fonte

wip:pdf下载包刷库

wangkaiyue há 1 ano atrás
pai
commit
afc948a2b7
1 ficheiros alterados com 6 adições e 1 exclusões
  1. 6 1
      run/flushDb/pdfFlushPower/flushPersonal.go

+ 6 - 1
run/flushDb/pdfFlushPower/flushPersonal.go

@@ -23,6 +23,7 @@ func flushPersonal(ctx context.Context) error {
 			filterMap   = gconv.Map(m["filter"])
 			vip_endtime = gconv.String(m["vip_endtime"])
 			order_code  = gconv.String(m["order_code"])
+			companyId   string
 		)
 		pack, err := getPersonalPackNum(filterMap, vip_endtime)
 		if err != nil {
@@ -36,7 +37,11 @@ func flushPersonal(ctx context.Context) error {
 		if arr := strings.Split(vip_endtime, " "); len(arr) == 2 {
 			eTime = arr[0]
 		}
-		if err := pack.InsertDb("", eTime, userId); err != nil {
+
+		if gconv.Int(m["pay_sub_num"]) > 0 { //个人版主张号共享额度
+			companyId = fmt.Sprintf("p_share_%s", userId)
+		}
+		if err := pack.InsertDb(companyId, eTime, userId); err != nil {
 			g.Log().Errorf(ctx, "flushPersonal插入权益包异常%s %s %v", userId, order_code, err)
 		}
 	}