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
aea431c7
Commit
aea431c7
authored
Jul 19, 2021
by
luhongguang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
https://git.yidian-inc.com:8021/bp/goods
into develop
parents
d1d78896
a069cbae
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
53 additions
and
47 deletions
+53
-47
GoodsService.php
application/services/goods/GoodsService.php
+2
-2
DistributorService.php
application/services/marketing/DistributorService.php
+1
-1
MarketingGoodsService.php
application/services/marketing/MarketingGoodsService.php
+11
-5
MarketingService.php
application/services/marketing/MarketingService.php
+6
-6
GetImage.php
vendor/api/php_services/src/ShopImage/GetImage.php
+1
-1
FrequencyLockUtil.php
vendor/api/php_utils/src/Lock/FrequencyLockUtil.php
+1
-1
InstalledVersions.php
vendor/composer/InstalledVersions.php
+6
-6
installed.json
vendor/composer/installed.json
+12
-12
installed.php
vendor/composer/installed.php
+6
-6
PropertyAccessor.php
vendor/symfony/property-access/PropertyAccessor.php
+1
-1
PhpDocExtractor.php
vendor/symfony/property-info/Extractor/PhpDocExtractor.php
+3
-3
ReflectionExtractor.php
...r/symfony/property-info/Extractor/ReflectionExtractor.php
+3
-3
No files found.
application/services/goods/GoodsService.php
View file @
aea431c7
...
...
@@ -774,7 +774,7 @@ class GoodsService
$data
[
"goods_info"
][
"is_tuanzhang"
]
=
true
;
if
(
!
empty
(
$runningMarketing
))
{
//分销返现多少钱
$data
[
"goods_info"
][
"cash_back"
]
=
$runningMarketing
[
$sku
[
"goods_sku_id"
]]
*
$data
[
"goods_info"
][
"price"
]
;
$data
[
"goods_info"
][
"cash_back"
]
=
sprintf
(
"%.4f"
,
$runningMarketing
[
$sku
[
"goods_sku_id"
]]
*
$data
[
"goods_info"
][
"price"
])
;
}
}
}
...
...
@@ -878,7 +878,7 @@ class GoodsService
$data
[
"goods_info"
][
"is_tuanzhang"
]
=
true
;
if
(
!
empty
(
$runningMarketing
))
{
//分销返现多少钱
$data
[
"goods_info"
][
"cash_back"
]
=
$runningMarketing
[
$params
[
"goods_sku_id"
]]
*
$data
[
"goods_info"
][
"price"
]
;
$data
[
"goods_info"
][
"cash_back"
]
=
sprintf
(
"%.4f"
,
$runningMarketing
[
$params
[
"goods_sku_id"
]]
*
$data
[
"goods_info"
][
"price"
])
;
}
}
}
...
...
application/services/marketing/DistributorService.php
View file @
aea431c7
...
...
@@ -73,7 +73,7 @@ class DistributorService
$countWhere
=
[
'parent_user_id'
=>
!
empty
(
$params
[
'user_id'
])
?
$params
[
'user_id'
]
:
''
,
"create_time[
><
]"
=>
[
date
(
"Y-m-d 00:00:00"
),
date
(
"Y-m-d 23:59:59"
)]
"create_time[
<>
]"
=>
[
date
(
"Y-m-d 00:00:00"
),
date
(
"Y-m-d 23:59:59"
)]
];
$todayNum
=
Distributor
::
getCount
(
$countWhere
,
"*"
);
...
...
application/services/marketing/MarketingGoodsService.php
View file @
aea431c7
...
...
@@ -14,6 +14,7 @@ use App\Exception\custom\MarketingException;
use
App\Services\common\CommonService
;
use
Api\PhpServices\Sensitive\Sensitive
;
use
App\Services\goods\GoodsService
;
use
Helpers\Aes
;
class
MarketingGoodsService
{
public
static
function
getMarketingGoodsList
(
$params
)
...
...
@@ -126,21 +127,26 @@ class MarketingGoodsService
$shopId
=
!
empty
(
$list
[
$i
][
'shop_id'
])
?
$list
[
$i
][
'shop_id'
]
:
''
;
$list
[
$i
][
'shop_name'
]
=
!
empty
(
$subShopList
[
$shopId
][
'shop_name'
])
?
$subShopList
[
$shopId
][
'shop_name'
]
:
''
;
$commissionMode
=
!
empty
(
$marketingList
[
$value
[
'marketing_id'
]][
'commission_mode'
])
?
$marketingList
[
$value
[
'marketing_id'
]][
'commission_mode'
]
/
100
:
''
;
$firstCommission
=
!
empty
(
$marketingList
[
$value
[
'marketing_id'
]][
'first_commission_value'
])
?
$marketingList
[
$value
[
'marketing_id'
]][
'first_commission_value'
]
/
100
:
0
;
//second_commission_value
$list
[
$i
][
'share_price'
]
=
0
;
//比例
if
(
!
empty
(
$commissionMode
)
&&
$commissionMode
==
1
)
{
$price
=
!
empty
(
$list
[
$i
][
'price'
])
?
$list
[
$i
][
'price'
]
:
0
;
$list
[
$i
][
'share_price'
]
=
$firstCommission
*
$price
;
$list
[
$i
][
'share_price'
]
=
$firstCommission
*
$price
/
100
;
}
//固定
if
(
!
empty
(
$commissionMode
)
&&
$commissionMode
==
2
)
{
$list
[
$i
][
'share_price'
]
=
$firstCommission
;
$list
[
$i
][
'share_price'
]
=
$firstCommission
/
100
;
}
$content
=
$userId
.
'_'
.
$value
[
'marketing_id'
];
$goodsShareId
=
Aes
::
encrypt
(
$content
);
$list
[
$i
][
'distributor_code'
]
=
$goodsShareId
;
$i
++
;
}
...
...
@@ -173,7 +179,7 @@ class MarketingGoodsService
$data
=
[];
foreach
(
$marketingInfoIds
as
$goodsSkuId
=>
$marketingId
)
{
if
(
!
empty
(
$marketingList
[
$marketingId
][
"second_commission_value"
]))
{
$data
[
$goodsSkuId
]
=
$marketingList
[
$marketingId
][
"second_commission_value"
]
/
100
;
$data
[
$goodsSkuId
]
=
$marketingList
[
$marketingId
][
"second_commission_value"
]
/
100
00
;
}
}
return
$data
;
...
...
application/services/marketing/MarketingService.php
View file @
aea431c7
...
...
@@ -202,13 +202,13 @@ class MarketingService
throw
new
MarketingException
([
'cus'
=>
0
]);
}
if
(
empty
(
$firstCommissionRate
))
{
throw
new
MarketingException
([
'cus'
=>
3
]);
}
// if (empty($secondCommissionRate)) {
// throw new MarketingException(['cus'=>4]);
// if (empty($firstCommissionRate)) {
// throw new MarketingException(['cus'=>3]);
// }
if
(
empty
(
$secondCommissionRate
))
{
throw
new
MarketingException
([
'cus'
=>
4
]);
}
if
(
self
::
utf8Strlen
(
$marketingName
)
>
50
)
{
throw
new
MarketingException
([
'cus'
=>
1
]);
...
...
vendor/api/php_services/src/ShopImage/GetImage.php
View file @
aea431c7
...
...
@@ -173,7 +173,7 @@ class GetImage
// 底部二维码
$qr
=
new
QR
(
$qr_string
);
$qr_size
=
1
21
;
$qr_size
=
1
00
;
$qr
->
setSize
(
$qr_size
);
$qr
->
setRoundBlockSize
(
QrCode
::
ROUND_BLOCK_SIZE_MODE_MARGIN
);
$qr_string
=
$qr
->
get
();
...
...
vendor/api/php_utils/src/Lock/FrequencyLockUtil.php
View file @
aea431c7
...
...
@@ -41,7 +41,7 @@ class FrequencyLockUtil
if
(
$current_times
==
1
)
{
self
::
$handler
->
expire
(
$key
,
$expire
);
}
return
(
$current_times
>
$times
)
?
false
:
tru
e
;
return
(
$current_times
>
$times
)
?
true
:
fals
e
;
}
/**
...
...
vendor/composer/InstalledVersions.php
View file @
aea431c7
...
...
@@ -32,7 +32,7 @@ private static $installed = array (
'aliases'
=>
array
(
),
'reference'
=>
'
e7fa0b7dd9584f3f9c8b489b4351a6b4858f62ea
'
,
'reference'
=>
'
600462a968b1b24b7361ad9d08540324e4e92c2b
'
,
'name'
=>
'yidian/yaf_demo'
,
),
'versions'
=>
...
...
@@ -45,7 +45,7 @@ private static $installed = array (
array
(
0
=>
'9999999-dev'
,
),
'reference'
=>
'
03c3e30e32f69eb439eb9e116adc0da98538c11b
'
,
'reference'
=>
'
8e0eab96df9b2fea5fbba77fda27a0f60d2d0858
'
,
),
'api/php_utils'
=>
array
(
...
...
@@ -55,7 +55,7 @@ private static $installed = array (
array
(
0
=>
'9999999-dev'
,
),
'reference'
=>
'
3651661da73b73fd8c5a02db0667f3937f4875f8
'
,
'reference'
=>
'
b9d4473aeda808fa9ef25368bb7118b057741b62
'
,
),
'bacon/bacon-qr-code'
=>
array
(
...
...
@@ -307,7 +307,7 @@ private static $installed = array (
'aliases'
=>
array
(
),
'reference'
=>
'
13c33f29a76bd99976ba7ee20297fa16d5a53a59
'
,
'reference'
=>
'
cb1aad06e7733a116f49033b1b3048a08e59ddd2
'
,
),
'symfony/property-info'
=>
array
(
...
...
@@ -316,7 +316,7 @@ private static $installed = array (
'aliases'
=>
array
(
),
'reference'
=>
'
718f093ae4cac054db2bbb39ebf86fd898583ac8
'
,
'reference'
=>
'
36f5c26e3dbf6873b61b593cd86fe4616153d239
'
,
),
'symfony/string'
=>
array
(
...
...
@@ -334,7 +334,7 @@ private static $installed = array (
'aliases'
=>
array
(
),
'reference'
=>
'
e7fa0b7dd9584f3f9c8b489b4351a6b4858f62ea
'
,
'reference'
=>
'
600462a968b1b24b7361ad9d08540324e4e92c2b
'
,
),
),
);
...
...
vendor/composer/installed.json
View file @
aea431c7
...
...
@@ -7,7 +7,7 @@
"source"
:
{
"type"
:
"git"
,
"url"
:
"https://git.yidian-inc.com:8021/bp/php_services.git"
,
"reference"
:
"
03c3e30e32f69eb439eb9e116adc0da98538c11b
"
"reference"
:
"
8e0eab96df9b2fea5fbba77fda27a0f60d2d0858
"
},
"require"
:
{
"api/php_utils"
:
"dev-master"
,
...
...
@@ -15,7 +15,7 @@
"perftools/php-profiler"
:
"^0.18.0"
,
"php"
:
"7.2.*"
},
"time"
:
"2021-07-1
7T15:33:26
+00:00"
,
"time"
:
"2021-07-1
9T11:36:47
+00:00"
,
"default-branch"
:
true
,
"type"
:
"library"
,
"installation-source"
:
"source"
,
...
...
@@ -34,7 +34,7 @@
"source"
:
{
"type"
:
"git"
,
"url"
:
"https://git.yidian-inc.com:8021/bp/php_utils.git"
,
"reference"
:
"
3651661da73b73fd8c5a02db0667f3937f4875f8
"
"reference"
:
"
b9d4473aeda808fa9ef25368bb7118b057741b62
"
},
"require"
:
{
"elasticsearch/elasticsearch"
:
"~7.0"
,
...
...
@@ -46,7 +46,7 @@
"mongodb/mongodb"
:
"1.4.3"
,
"php"
:
"7.2.*"
},
"time"
:
"2021-07-1
4T14:21:31
+00:00"
,
"time"
:
"2021-07-1
5T13:56:09
+00:00"
,
"default-branch"
:
true
,
"type"
:
"library"
,
"installation-source"
:
"source"
,
...
...
@@ -1771,12 +1771,12 @@
"source"
:
{
"type"
:
"git"
,
"url"
:
"https://github.com/symfony/property-access.git"
,
"reference"
:
"
13c33f29a76bd99976ba7ee20297fa16d5a53a59
"
"reference"
:
"
cb1aad06e7733a116f49033b1b3048a08e59ddd2
"
},
"dist"
:
{
"type"
:
"zip"
,
"url"
:
"https://api.github.com/repos/symfony/property-access/zipball/
13c33f29a76bd99976ba7ee20297fa16d5a53a59
"
,
"reference"
:
"
13c33f29a76bd99976ba7ee20297fa16d5a53a59
"
,
"url"
:
"https://api.github.com/repos/symfony/property-access/zipball/
cb1aad06e7733a116f49033b1b3048a08e59ddd2
"
,
"reference"
:
"
cb1aad06e7733a116f49033b1b3048a08e59ddd2
"
,
"shasum"
:
""
},
"require"
:
{
...
...
@@ -1791,7 +1791,7 @@
"suggest"
:
{
"psr/cache-implementation"
:
"To cache access methods."
},
"time"
:
"2021-07-
03T09:16:21
+00:00"
,
"time"
:
"2021-07-
17T18:34:10
+00:00"
,
"type"
:
"library"
,
"installation-source"
:
"dist"
,
"autoload"
:
{
...
...
@@ -1855,12 +1855,12 @@
"source"
:
{
"type"
:
"git"
,
"url"
:
"https://github.com/symfony/property-info.git"
,
"reference"
:
"
718f093ae4cac054db2bbb39ebf86fd898583ac8
"
"reference"
:
"
36f5c26e3dbf6873b61b593cd86fe4616153d239
"
},
"dist"
:
{
"type"
:
"zip"
,
"url"
:
"https://api.github.com/repos/symfony/property-info/zipball/
718f093ae4cac054db2bbb39ebf86fd898583ac8
"
,
"reference"
:
"
718f093ae4cac054db2bbb39ebf86fd898583ac8
"
,
"url"
:
"https://api.github.com/repos/symfony/property-info/zipball/
36f5c26e3dbf6873b61b593cd86fe4616153d239
"
,
"reference"
:
"
36f5c26e3dbf6873b61b593cd86fe4616153d239
"
,
"shasum"
:
""
},
"require"
:
{
...
...
@@ -1887,7 +1887,7 @@
"symfony/doctrine-bridge"
:
"To use Doctrine metadata"
,
"symfony/serializer"
:
"To use Serializer metadata"
},
"time"
:
"2021-07-
03T09:16
:21+00:00"
,
"time"
:
"2021-07-
18T16:31
:21+00:00"
,
"type"
:
"library"
,
"installation-source"
:
"dist"
,
"autoload"
:
{
...
...
vendor/composer/installed.php
View file @
aea431c7
...
...
@@ -6,7 +6,7 @@
'aliases'
=>
array
(
),
'reference'
=>
'
e7fa0b7dd9584f3f9c8b489b4351a6b4858f62ea
'
,
'reference'
=>
'
600462a968b1b24b7361ad9d08540324e4e92c2b
'
,
'name'
=>
'yidian/yaf_demo'
,
),
'versions'
=>
...
...
@@ -19,7 +19,7 @@
array
(
0
=>
'9999999-dev'
,
),
'reference'
=>
'
03c3e30e32f69eb439eb9e116adc0da98538c11b
'
,
'reference'
=>
'
8e0eab96df9b2fea5fbba77fda27a0f60d2d0858
'
,
),
'api/php_utils'
=>
array
(
...
...
@@ -29,7 +29,7 @@
array
(
0
=>
'9999999-dev'
,
),
'reference'
=>
'
3651661da73b73fd8c5a02db0667f3937f4875f8
'
,
'reference'
=>
'
b9d4473aeda808fa9ef25368bb7118b057741b62
'
,
),
'bacon/bacon-qr-code'
=>
array
(
...
...
@@ -281,7 +281,7 @@
'aliases'
=>
array
(
),
'reference'
=>
'
13c33f29a76bd99976ba7ee20297fa16d5a53a59
'
,
'reference'
=>
'
cb1aad06e7733a116f49033b1b3048a08e59ddd2
'
,
),
'symfony/property-info'
=>
array
(
...
...
@@ -290,7 +290,7 @@
'aliases'
=>
array
(
),
'reference'
=>
'
718f093ae4cac054db2bbb39ebf86fd898583ac8
'
,
'reference'
=>
'
36f5c26e3dbf6873b61b593cd86fe4616153d239
'
,
),
'symfony/string'
=>
array
(
...
...
@@ -308,7 +308,7 @@
'aliases'
=>
array
(
),
'reference'
=>
'
e7fa0b7dd9584f3f9c8b489b4351a6b4858f62ea
'
,
'reference'
=>
'
600462a968b1b24b7361ad9d08540324e4e92c2b
'
,
),
),
);
vendor/symfony/property-access/PropertyAccessor.php
View file @
aea431c7
...
...
@@ -630,7 +630,7 @@ class PropertyAccessor implements PropertyAccessorInterface
private
function
getWriteInfo
(
string
$class
,
string
$property
,
$value
)
:
PropertyWriteInfo
{
$useAdderAndRemover
=
\is_array
(
$value
)
||
$value
instanceof
\Traversable
;
$useAdderAndRemover
=
is_iterable
(
$value
)
;
$key
=
str_replace
(
'\\'
,
'.'
,
$class
)
.
'..'
.
$property
.
'..'
.
(
int
)
$useAdderAndRemover
;
if
(
isset
(
$this
->
writePropertyCache
[
$key
]))
{
...
...
vendor/symfony/property-info/Extractor/PhpDocExtractor.php
View file @
aea431c7
...
...
@@ -66,9 +66,9 @@ class PhpDocExtractor implements PropertyDescriptionExtractorInterface, Property
$this
->
docBlockFactory
=
$docBlockFactory
?:
DocBlockFactory
::
createInstance
();
$this
->
contextFactory
=
new
ContextFactory
();
$this
->
phpDocTypeHelper
=
new
PhpDocTypeHelper
();
$this
->
mutatorPrefixes
=
null
!==
$mutatorPrefixes
?
$mutatorPrefixes
:
ReflectionExtractor
::
$defaultMutatorPrefixes
;
$this
->
accessorPrefixes
=
null
!==
$accessorPrefixes
?
$accessorPrefixes
:
ReflectionExtractor
::
$defaultAccessorPrefixes
;
$this
->
arrayMutatorPrefixes
=
null
!==
$arrayMutatorPrefixes
?
$arrayMutatorPrefixes
:
ReflectionExtractor
::
$defaultArrayMutatorPrefixes
;
$this
->
mutatorPrefixes
=
$mutatorPrefixes
??
ReflectionExtractor
::
$defaultMutatorPrefixes
;
$this
->
accessorPrefixes
=
$accessorPrefixes
??
ReflectionExtractor
::
$defaultAccessorPrefixes
;
$this
->
arrayMutatorPrefixes
=
$arrayMutatorPrefixes
??
ReflectionExtractor
::
$defaultArrayMutatorPrefixes
;
}
/**
...
...
vendor/symfony/property-info/Extractor/ReflectionExtractor.php
View file @
aea431c7
...
...
@@ -85,9 +85,9 @@ class ReflectionExtractor implements PropertyListExtractorInterface, PropertyTyp
*/
public
function
__construct
(
array
$mutatorPrefixes
=
null
,
array
$accessorPrefixes
=
null
,
array
$arrayMutatorPrefixes
=
null
,
bool
$enableConstructorExtraction
=
true
,
int
$accessFlags
=
self
::
ALLOW_PUBLIC
,
InflectorInterface
$inflector
=
null
,
int
$magicMethodsFlags
=
self
::
ALLOW_MAGIC_GET
|
self
::
ALLOW_MAGIC_SET
)
{
$this
->
mutatorPrefixes
=
null
!==
$mutatorPrefixes
?
$mutatorPrefixes
:
self
::
$defaultMutatorPrefixes
;
$this
->
accessorPrefixes
=
null
!==
$accessorPrefixes
?
$accessorPrefixes
:
self
::
$defaultAccessorPrefixes
;
$this
->
arrayMutatorPrefixes
=
null
!==
$arrayMutatorPrefixes
?
$arrayMutatorPrefixes
:
self
::
$defaultArrayMutatorPrefixes
;
$this
->
mutatorPrefixes
=
$mutatorPrefixes
??
self
::
$defaultMutatorPrefixes
;
$this
->
accessorPrefixes
=
$accessorPrefixes
??
self
::
$defaultAccessorPrefixes
;
$this
->
arrayMutatorPrefixes
=
$arrayMutatorPrefixes
??
self
::
$defaultArrayMutatorPrefixes
;
$this
->
enableConstructorExtraction
=
$enableConstructorExtraction
;
$this
->
methodReflectionFlags
=
$this
->
getMethodsFlags
(
$accessFlags
);
$this
->
propertyReflectionFlags
=
$this
->
getPropertyFlags
(
$accessFlags
);
...
...
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