|
@@ -12,6 +12,7 @@ import (
|
|
"github.com/gogf/gf/v2/frame/g"
|
|
"github.com/gogf/gf/v2/frame/g"
|
|
"github.com/gogf/gf/v2/util/gconv"
|
|
"github.com/gogf/gf/v2/util/gconv"
|
|
"net/rpc"
|
|
"net/rpc"
|
|
|
|
+ "strings"
|
|
"time"
|
|
"time"
|
|
)
|
|
)
|
|
|
|
|
|
@@ -81,7 +82,7 @@ func EntLicense(ctx context.Context, entId, empowerCount, provinceCount, orderId
|
|
user, _ := g.DB().Ctx(ctx).GetOne(ctx, fmt.Sprintf(`SELECT * FROM entniche_order WHERE phone = '%s' and ent_id = '%d'`, phone, entId))
|
|
user, _ := g.DB().Ctx(ctx).GetOne(ctx, fmt.Sprintf(`SELECT * FROM entniche_order WHERE phone = '%s' and ent_id = '%d'`, phone, entId))
|
|
data, _ := g.DB().Ctx(ctx).GetOne(ctx, fmt.Sprintf(`SELECT id,empower_count FROM entniche_wait_empower WHERE product_type = '%s' and ent_id = '%d' and province_count =%d`, productType, entId, provinceCount))
|
|
data, _ := g.DB().Ctx(ctx).GetOne(ctx, fmt.Sprintf(`SELECT id,empower_count FROM entniche_wait_empower WHERE product_type = '%s' and ent_id = '%d' and province_count =%d`, productType, entId, provinceCount))
|
|
t := date.NowFormat(date.Date_Full_Layout)
|
|
t := date.NowFormat(date.Date_Full_Layout)
|
|
- if !data.IsEmpty() {
|
|
|
|
|
|
+ if !data.IsEmpty() && !strings.Contains(productType, "自定义") {
|
|
empower_count := gconv.Int(data.Map()["empower_count"])
|
|
empower_count := gconv.Int(data.Map()["empower_count"])
|
|
count := empower_count + empowerCount
|
|
count := empower_count + empowerCount
|
|
id := common.IntAll(data.Map()["id"])
|
|
id := common.IntAll(data.Map()["id"])
|