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
454a5abc
authored
Dec 01, 2020
by
huangchengyi
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
1.0
parent
24775923
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
doc/test/sort.go
service/service_zy_cron.go
doc/test/sort.go
View file @
454a5abc
...
@@ -2,6 +2,7 @@ package main
...
@@ -2,6 +2,7 @@ package main
import
(
import
(
"fmt"
"fmt"
"github.com/syyongx/php2go"
"sort"
"sort"
)
)
...
@@ -31,4 +32,11 @@ func main() {
...
@@ -31,4 +32,11 @@ func main() {
sort
.
Sort
(
SorterRatio
(
slic
))
sort
.
Sort
(
SorterRatio
(
slic
))
fmt
.
Printf
(
"%+v"
,
slic
)
fmt
.
Printf
(
"%+v"
,
slic
)
fmt
.
Println
(
php2go
.
Stripos
(
",10005,10006,"
,
"100205"
,
0
))
return
if
php2go
.
Stripos
(
"10005"
,
",10005,10006,"
,
0
)
>
-
1
{
fmt
.
Println
(
"1002 不参与分类的商品"
)
return
}
}
}
service/service_zy_cron.go
View file @
454a5abc
...
@@ -22,6 +22,7 @@ type ZyCronService struct {
...
@@ -22,6 +22,7 @@ type ZyCronService struct {
/*
/*
计算自营折扣信息
计算自营折扣信息
@param checkGoodsId 单独一个sku运行
@param checkGoodsId 单独一个sku运行
fmt.Println(php2go.Stripos("10005,10006","10006",0))
*/
*/
func
(
a
*
ZyCronService
)
ZyDiscount
(
checkGoodsId
string
)
{
func
(
a
*
ZyCronService
)
ZyDiscount
(
checkGoodsId
string
)
{
...
@@ -120,21 +121,21 @@ func (a *ZyCronService) ZyDiscount(checkGoodsId string) {
...
@@ -120,21 +121,21 @@ func (a *ZyCronService) ZyDiscount(checkGoodsId string) {
fmt
.
Println
(
info
)
fmt
.
Println
(
info
)
//不参与系数的商品
//不参与系数的商品
if
info
[
"goods_id"
]
!=
""
{
if
info
[
"goods_id"
]
!=
""
{
if
php2go
.
Stripos
(
info
[
"goods_id"
],
","
+
now_goods_id
+
","
,
0
)
>
-
1
{
if
php2go
.
Stripos
(
info
[
"goods_id"
],
","
+
now_goods_id
+
","
,
0
)
==
-
1
{
fmt
.
Println
(
"1001 本商品不参与系数"
+
now_goods_id
)
fmt
.
Println
(
"1001 本商品不参与系数"
+
now_goods_id
)
continue
;
continue
;
}
}
}
}
//不参与分类的商品
//不参与分类的商品
if
info
[
"class_id"
]
!=
""
{
if
info
[
"class_id"
]
!=
""
{
if
php2go
.
Stripos
(
info
[
"class_id
2"
],
","
+
now_class_id
+
","
,
0
)
>
-
1
{
if
php2go
.
Stripos
(
info
[
"class_id
"
],
","
+
now_class_id
+
","
,
0
)
==
-
1
{
fmt
.
Println
(
"1002 不参与分类的商品"
+
now_goods_id
)
fmt
.
Println
(
"1002 不参与分类的商品"
+
now_goods_id
)
continue
;
continue
;
}
}
}
}
//不参与分类的商品
//不参与分类的商品
if
info
[
"brand_id"
]
!=
""
{
if
info
[
"brand_id"
]
!=
""
{
if
php2go
.
Stripos
(
info
[
"brand_id"
],
","
+
now_brand_id
+
","
,
0
)
>
-
1
{
if
php2go
.
Stripos
(
info
[
"brand_id"
],
","
+
now_brand_id
+
","
,
0
)
==
-
1
{
fmt
.
Println
(
"1003 不参与分类的商品"
+
now_goods_id
)
fmt
.
Println
(
"1003 不参与分类的商品"
+
now_goods_id
)
continue
;
continue
;
}
}
...
...
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