|
@@ -23,6 +23,7 @@ func flushPersonal(ctx context.Context) error {
|
|
filterMap = gconv.Map(m["filter"])
|
|
filterMap = gconv.Map(m["filter"])
|
|
vip_endtime = gconv.String(m["vip_endtime"])
|
|
vip_endtime = gconv.String(m["vip_endtime"])
|
|
order_code = gconv.String(m["order_code"])
|
|
order_code = gconv.String(m["order_code"])
|
|
|
|
+ companyId string
|
|
)
|
|
)
|
|
pack, err := getPersonalPackNum(filterMap, vip_endtime)
|
|
pack, err := getPersonalPackNum(filterMap, vip_endtime)
|
|
if err != nil {
|
|
if err != nil {
|
|
@@ -36,7 +37,11 @@ func flushPersonal(ctx context.Context) error {
|
|
if arr := strings.Split(vip_endtime, " "); len(arr) == 2 {
|
|
if arr := strings.Split(vip_endtime, " "); len(arr) == 2 {
|
|
eTime = arr[0]
|
|
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)
|
|
g.Log().Errorf(ctx, "flushPersonal插入权益包异常%s %s %v", userId, order_code, err)
|
|
}
|
|
}
|
|
}
|
|
}
|