Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
goods
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bp
goods
Commits
df46b0bf
Commit
df46b0bf
authored
Jul 16, 2021
by
luhongguang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'test'
parents
468221ff
5f74e6f5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
11 deletions
+15
-11
GoodsService.php
application/services/goods/GoodsService.php
+2
-0
MarketingService.php
application/services/marketing/MarketingService.php
+12
-10
cli.ini
conf/cli.ini
+1
-1
No files found.
application/services/goods/GoodsService.php
View file @
df46b0bf
...
@@ -327,6 +327,8 @@ class GoodsService
...
@@ -327,6 +327,8 @@ class GoodsService
$status
=
$params
[
"audit_status"
];
$status
=
$params
[
"audit_status"
];
$operatorId
=
empty
(
$params
[
"user_id"
])
?
0
:
$params
[
"user_id"
];
$operatorId
=
empty
(
$params
[
"user_id"
])
?
0
:
$params
[
"user_id"
];
$operatorName
=
$params
[
"user_name"
];
$operatorName
=
$params
[
"user_name"
];
//为避免下边逻辑判断复杂
$params
[
"rejected_reason"
]
=
isset
(
$params
[
"rejected_reason"
])
?
$params
[
"rejected_reason"
]
:
''
;
$goodsSpu
=
GoodsSpu
::
get
(
"*"
,
[
"goods_spu_id"
=>
$goodsSpuId
]);
$goodsSpu
=
GoodsSpu
::
get
(
"*"
,
[
"goods_spu_id"
=>
$goodsSpuId
]);
if
(
empty
(
$goodsSpu
))
{
if
(
empty
(
$goodsSpu
))
{
...
...
application/services/marketing/MarketingService.php
View file @
df46b0bf
...
@@ -25,7 +25,7 @@ class MarketingService
...
@@ -25,7 +25,7 @@ class MarketingService
{
{
$startTime
=
!
empty
(
$params
[
'start_time'
])
?
$params
[
'start_time'
]
:
''
;
$startTime
=
!
empty
(
$params
[
'start_time'
])
?
$params
[
'start_time'
]
:
''
;
$endTime
=
!
empty
(
$params
[
'end_time'
])
?
$params
[
'end_time'
]
:
''
;
$endTime
=
!
empty
(
$params
[
'end_time'
])
?
$params
[
'end_time'
]
:
''
;
$goodsS
kuId
=
!
empty
(
$params
[
'goods_sku_id'
])
?
$params
[
'goods_sk
u_id'
]
:
''
;
$goodsS
puId
=
!
empty
(
$params
[
'goods_spu_id'
])
?
$params
[
'goods_sp
u_id'
]
:
''
;
$lifeAccountId
=
!
empty
(
$params
[
'life_account_id'
])
?
$params
[
'life_account_id'
]
:
''
;
$lifeAccountId
=
!
empty
(
$params
[
'life_account_id'
])
?
$params
[
'life_account_id'
]
:
''
;
if
(
empty
(
$startTime
))
{
if
(
empty
(
$startTime
))
{
...
@@ -79,8 +79,8 @@ class MarketingService
...
@@ -79,8 +79,8 @@ class MarketingService
$where
[
'goods_sku_id[!]'
]
=
$tmpGoodsSkuId
;
$where
[
'goods_sku_id[!]'
]
=
$tmpGoodsSkuId
;
}
}
if
(
!
empty
(
$goodsS
k
uId
))
{
if
(
!
empty
(
$goodsS
p
uId
))
{
$where
[
'goods_s
ku_id'
]
=
$goodsSk
uId
;
$where
[
'goods_s
pu_id'
]
=
$goodsSp
uId
;
}
}
if
(
!
empty
(
$lifeAccountId
))
{
if
(
!
empty
(
$lifeAccountId
))
{
...
@@ -97,6 +97,7 @@ class MarketingService
...
@@ -97,6 +97,7 @@ class MarketingService
$list
=
[];
$list
=
[];
foreach
(
$goodsSkuList
as
$key
=>
$value
)
{
foreach
(
$goodsSkuList
as
$key
=>
$value
)
{
$list
[
$key
][
'goods_sku_id'
]
=
$value
[
'goods_sku_id'
];
$list
[
$key
][
'goods_sku_id'
]
=
$value
[
'goods_sku_id'
];
$list
[
$key
][
'goods_spu_id'
]
=
$value
[
'goods_spu_id'
];
$list
[
$key
][
'life_account_id'
]
=
$value
[
'life_account_id'
];
$list
[
$key
][
'life_account_id'
]
=
$value
[
'life_account_id'
];
$list
[
$key
][
'goods_name'
]
=
$value
[
'goods_name'
];
$list
[
$key
][
'goods_name'
]
=
$value
[
'goods_name'
];
$list
[
$key
][
'life_account_name'
]
=
!
empty
(
$lifeAccountList
[
$value
[
'life_account_id'
]][
'life_account_name'
])
?
$lifeAccountList
[
$value
[
'life_account_id'
]][
'life_account_name'
]
:
''
;
$list
[
$key
][
'life_account_name'
]
=
!
empty
(
$lifeAccountList
[
$value
[
'life_account_id'
]][
'life_account_name'
])
?
$lifeAccountList
[
$value
[
'life_account_id'
]][
'life_account_name'
]
:
''
;
...
@@ -139,9 +140,9 @@ class MarketingService
...
@@ -139,9 +140,9 @@ class MarketingService
}
}
}
}
if
(
!
empty
(
$params
[
'goods_s
k
u_id'
]))
{
if
(
!
empty
(
$params
[
'goods_s
p
u_id'
]))
{
$goodsS
kuId
=
$params
[
'goods_sk
u_id'
];
$goodsS
puId
=
$params
[
'goods_sp
u_id'
];
$marketingGoodsList
=
MarketingGoods
::
marketingGoodsList
([
'goods_s
ku_id'
=>
$goodsSk
uId
]);
$marketingGoodsList
=
MarketingGoods
::
marketingGoodsList
([
'goods_s
pu_id'
=>
$goodsSp
uId
]);
if
(
empty
(
$marketingGoodsList
))
{
if
(
empty
(
$marketingGoodsList
))
{
$where
[
'marketing_id'
]
=
"-1"
;
$where
[
'marketing_id'
]
=
"-1"
;
...
@@ -303,11 +304,11 @@ class MarketingService
...
@@ -303,11 +304,11 @@ class MarketingService
}
}
$colums
=
[];
$colums
=
[];
$goodCount
=
!
empty
(
$goodsSkuId
)
?
count
(
$goodsSkuId
)
:
0
;
$goodCount
=
!
empty
(
$goodsSkuId
)
?
count
(
$goodsSkuId
)
:
0
;
$goodsSkuList
=
GoodsSku
::
select
(
'*'
,
[
'goods_sku_id'
=>
$goodsSkuId
]);
foreach
(
$goodsSku
Id
as
$key
=>
$value
)
{
foreach
(
$goodsSku
List
as
$key
=>
$value
)
{
$colums
[
$key
][
'marketing_id'
]
=
$marketingId
;
$colums
[
$key
][
'marketing_id'
]
=
$marketingId
;
$colums
[
$key
][
'goods_spu_id'
]
=
''
;
$colums
[
$key
][
'goods_spu_id'
]
=
$value
[
'goods_spu_id'
]
;
$colums
[
$key
][
'goods_sku_id'
]
=
$value
;
$colums
[
$key
][
'goods_sku_id'
]
=
$value
[
'goods_sku_id'
]
;
$colums
[
$key
][
'update_time'
]
=
date
(
"Y-m-d H:i:s"
);
$colums
[
$key
][
'update_time'
]
=
date
(
"Y-m-d H:i:s"
);
$colums
[
$key
][
'create_time'
]
=
date
(
"Y-m-d H:i:s"
);
$colums
[
$key
][
'create_time'
]
=
date
(
"Y-m-d H:i:s"
);
}
}
...
@@ -362,6 +363,7 @@ class MarketingService
...
@@ -362,6 +363,7 @@ class MarketingService
if
(
!
empty
(
$goodsSkuList
))
{
if
(
!
empty
(
$goodsSkuList
))
{
foreach
(
$goodsSkuList
as
$key
=>
$value
)
{
foreach
(
$goodsSkuList
as
$key
=>
$value
)
{
$list
[
$key
][
'goods_sku_id'
]
=
$value
[
'goods_sku_id'
];
$list
[
$key
][
'goods_sku_id'
]
=
$value
[
'goods_sku_id'
];
$list
[
$key
][
'goods_spu_id'
]
=
$value
[
'goods_spu_id'
];
$list
[
$key
][
'life_account_id'
]
=
$value
[
'life_account_id'
];
$list
[
$key
][
'life_account_id'
]
=
$value
[
'life_account_id'
];
$list
[
$key
][
'goods_name'
]
=
$value
[
'goods_name'
];
$list
[
$key
][
'goods_name'
]
=
$value
[
'goods_name'
];
$list
[
$key
][
'life_account_name'
]
=
!
empty
(
$lifeAccountList
[
$value
[
'life_account_id'
]][
'life_account_name'
])
?
$lifeAccountList
[
$value
[
'life_account_id'
]][
'life_account_name'
]
:
''
;
$list
[
$key
][
'life_account_name'
]
=
!
empty
(
$lifeAccountList
[
$value
[
'life_account_id'
]][
'life_account_name'
])
?
$lifeAccountList
[
$value
[
'life_account_id'
]][
'life_account_name'
]
:
''
;
...
...
conf/cli.ini
View file @
df46b0bf
...
@@ -10,7 +10,7 @@ appid = "goods"
...
@@ -10,7 +10,7 @@ appid = "goods"
idgen.partner
=
"bp"
idgen.partner
=
"bp"
idgen.key
=
"5cfdb867e96374c7883b31d6928cc4cb"
idgen.key
=
"5cfdb867e96374c7883b31d6928cc4cb"
[prod
uct
: common]
[prod : common]
[pre : common ]
[pre : common ]
[test: common ]
[test: common ]
[dev : common ]
[dev : common ]
\ No newline at end of file
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