Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
黄成意
/
go_sku_server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
2e4c79f2
authored
Sep 08, 2022
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'ysx-魔方活动判断优化-20220808' into dev
parents
b95c98e1
b6fc36a2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
service/service_activity.go
service/service_zy_common.go
service/service_activity.go
View file @
2e4c79f2
...
...
@@ -155,8 +155,12 @@ func (as *ActivityService) GetPriceActivity(checkData model.ActivityCheckData, a
}
}
}
else
if
checkData
.
SupplierId
==
10000
{
//自营活动特殊判断
//判断活动指定的渠道编码,品牌,分类id,如果都为空,那么这个活动可以理解为整个供应商了,上面的排除已经会提前去判断了
if
len
(
activity
.
BrandIdList
)
==
0
&&
len
(
activity
.
ClassIdList
)
==
0
{
fmt
.
Println
(
activity
.
BrandIds
)
fmt
.
Println
(
activity
.
ClassIds
)
if
activity
.
BrandIds
==
""
&&
activity
.
ClassIds
==
""
{
hasActivity
=
true
goto
INFO
}
if
as
.
CheckClass
(
checkData
.
ClassId
,
activity
)
{
...
...
service/service_zy_common.go
View file @
2e4c79f2
package
service
import
(
"go_sku_server/model"
"go_sku_server/pkg/common"
"github.com/gin-gonic/gin"
"github.com/gomodule/redigo/redis"
"github.com/iancoleman/orderedmap"
"github.com/syyongx/php2go"
"github.com/tidwall/gjson"
"go_sku_server/model"
"go_sku_server/pkg/common"
)
//自营公共函数类
...
...
@@ -52,6 +53,7 @@ func (qs *ZiyingService) GetActivity(skuInfo string) (priceActivity model.PriceA
checkData
:=
model
.
ActivityCheckData
{
SupplierId
:
10000
,
BrandId
:
int
(
gjson
.
Get
(
skuInfo
,
"brand_id"
)
.
Int
()),
GoodsId
:
gjson
.
Get
(
skuInfo
,
"goods_id"
)
.
String
(),
ClassId
:
int
(
gjson
.
Get
(
skuInfo
,
"class_id2"
)
.
Int
()),
}
var
activityService
ActivityService
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment