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
1789292b
Commit
1789292b
authored
Sep 03, 2021
by
pengfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update 团长分销-奖励结算脚本
parent
c9c5d4b5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
91 additions
and
77 deletions
+91
-77
Colonelorder.php
application/modules/Job/controllers/Colonelorder.php
+34
-29
Colonelwallet.php
application/modules/Job/controllers/Colonelwallet.php
+36
-33
ColonelService.php
application/services/marketing/ColonelService.php
+20
-14
PindanActivityColonelConfigService.php
...services/marketing/PindanActivityColonelConfigService.php
+1
-1
No files found.
application/modules/Job/controllers/Colonelorder.php
View file @
1789292b
...
...
@@ -72,7 +72,7 @@ class ColonelorderController extends Job
*/
private
function
handleSavePayInfo
(
$colonelPayInfoData
)
{
$this
->
loggerInfo
(
'colonelPayInfoCount='
.
count
(
$colonelPayInfoData
));
$this
->
loggerInfo
(
'colonelPayInfoCount='
.
count
(
$colonelPayInfoData
));
if
(
!
empty
(
$colonelPayInfoData
))
{
$data
=
$this
->
getFormatPayInfoData
(
$colonelPayInfoData
);
try
{
...
...
@@ -86,7 +86,7 @@ class ColonelorderController extends Job
$this
->
loggerError
(
'success'
);
}
catch
(
Exception
$e
)
{
ColonelDistributorPayInfo
::
rollback
();
$this
->
loggerError
(
'error='
.
$e
->
getMessage
());
$this
->
loggerError
(
'error='
.
$e
->
getMessage
());
}
}
}
...
...
@@ -104,16 +104,15 @@ class ColonelorderController extends Job
if
(
$inviteNewUserList
=
$this
->
getInviteNewUserList
(
$userIds
))
{
$userNickList
=
$this
->
getUserList
(
array_column
(
$inviteNewUserList
,
'user_id'
));
foreach
(
$inviteNewUserList
as
$newUser
)
{
$payInfo
=
[
'colonel_user_id'
=>
$newUser
[
'inviter_user_id'
],
'date'
=>
$this
->
settlementDate
,
'type'
=>
ColonelDistributorPayInfo
::
TYPE_NEW_USER
,
'reward'
=>
self
::
INVITE_NEW_USER_REWARD
,
'finish_num'
=>
1
,
'invite_user_id'
=>
$newUser
[
'user_id'
],
$colonelPayInfoData
[]
=
[
'date'
=>
$this
->
settlementDate
,
'type'
=>
ColonelDistributorPayInfo
::
TYPE_NEW_USER
,
'reward'
=>
self
::
INVITE_NEW_USER_REWARD
,
'finish_num'
=>
1
,
'invite_user_id'
=>
$newUser
[
'user_id'
],
'invite_user_nick'
=>
empty
(
$userNickList
[
$newUser
[
'user_id'
]][
'user_nick'
])
?
''
:
$userNickList
[
$newUser
[
'user_id'
]][
'user_nick'
],
'colonel_user_id'
=>
$newUser
[
'inviter_user_id'
],
];
$colonelPayInfoData
[]
=
$payInfo
;
}
}
}
...
...
@@ -132,16 +131,15 @@ class ColonelorderController extends Job
foreach
(
$inviteOrderNumList
as
$orderNum
)
{
foreach
(
$this
->
colonelConfigList
as
$config
)
{
if
(
$orderNum
[
'num'
]
>=
$config
[
'assess_order_num'
])
{
$payInfo
=
[
'colonel_user_id'
=>
$orderNum
[
'colonel_user_id'
],
'date'
=>
$this
->
settlementDate
,
'type'
=>
ColonelDistributorPayInfo
::
TYPE_FINISH_TARGET
,
'reward'
=>
$config
[
'reward_amount'
]
*
self
::
REWARD_UNIT
,
'finish_num'
=>
$config
[
'assess_order_num'
],
'invite_user_id'
=>
0
,
$colonelPayInfoData
[]
=
[
'date'
=>
$this
->
settlementDate
,
'type'
=>
ColonelDistributorPayInfo
::
TYPE_FINISH_TARGET
,
'reward'
=>
$config
[
'reward_amount'
]
*
self
::
REWARD_UNIT
,
'finish_num'
=>
$config
[
'assess_order_num'
],
'invite_user_id'
=>
0
,
'invite_user_nick'
=>
''
,
'colonel_user_id'
=>
$orderNum
[
'colonel_user_id'
],
];
$colonelPayInfoData
[]
=
$payInfo
;
}
}
}
...
...
@@ -155,17 +153,20 @@ class ColonelorderController extends Job
*/
private
function
getColonelConfig
(
$yesterday
)
:
array
{
$config
=
ColonelDistributorConfig
::
getRecord
([
'date'
=>
$yesterday
,
'type'
=>
ColonelDistributorConfig
::
TYPE_COLONEL
]);
$config
=
ColonelDistributorConfig
::
getRecord
([
'date'
=>
$yesterday
,
'type'
=>
ColonelDistributorConfig
::
TYPE_COLONEL
]);
if
(
empty
(
$config
))
{
$config
=
ColonelDistributorConfig
::
getRecord
([
'date[<=]'
=>
$yesterday
,
'ORDER'
=>
[
'date'
=>
'DESC'
],
'LIMIT'
=>
1
'ORDER'
=>
[
'date'
=>
'DESC'
],
'LIMIT'
=>
1
]);
}
$configData
=
[];
if
(
empty
(
$config
[
'data'
]))
{
$configData
=
json_decode
(
$config
[
'data'
],
true
);
$configData
=
json_decode
(
$config
[
'data'
],
true
);
}
return
$configData
;
}
...
...
@@ -181,7 +182,7 @@ class ColonelorderController extends Job
return
ColonelDistributorInviteOrderNum
::
getRecords
(
[
'colonel_user_id'
=>
$colonelUserIds
,
'date'
=>
$date
,
'date'
=>
$date
,
],
[
'colonel_user_id'
,
'num'
]
);
...
...
@@ -202,7 +203,8 @@ class ColonelorderController extends Job
throw
new
InterfaceException
([
'cus'
=>
0
]);
}
$res
=
HttpUtil
::
get
(
$url
,
[
'user_ids'
=>
$userIds
,
'start_time'
=>
$this
->
startTime
,
'end_time'
=>
$this
->
endTime
]);
$res
=
HttpUtil
::
get
(
$url
,
[
'user_ids'
=>
$userIds
,
'start_time'
=>
$this
->
startTime
,
'end_time'
=>
$this
->
endTime
]);
if
(
!
empty
(
$res
[
'response'
][
'result'
]))
{
return
array_values
(
array_column
(
$res
[
'response'
][
'result'
],
null
,
'user_id'
));
}
...
...
@@ -219,10 +221,13 @@ class ColonelorderController extends Job
private
function
getFormatPayInfoData
(
$data
)
:
array
{
$count
=
count
(
$data
);
$res
=
Idgen
::
get
(
appConfig
(
'idgen.partner'
),
appConfig
(
'idgen.key'
),
[],
[[
'type'
=>
'goods'
,
'number'
=>
00
,
'count'
=>
$count
]]);
$res
=
Idgen
::
get
(
appConfig
(
'idgen.partner'
),
appConfig
(
'idgen.key'
),
[],
[
[
'type'
=>
'goods'
,
'number'
=>
00
,
'count'
=>
$count
]
]);
$ids
=
$res
[
'id_datetime'
][
'goods'
]
??
[];
foreach
(
$data
as
$key
=>
$item
)
{
$data
[
$key
][
'colonel_distributor_pay_info_id'
]
=
$ids
[
$key
];
...
...
@@ -263,7 +268,7 @@ class ColonelorderController extends Job
*/
private
function
loggerInfo
(
$log
)
{
FileLog
::
info
(
'colonel_distributor_order'
,
'colonel_distributor_order:'
.
$log
,
false
,
true
);
FileLog
::
info
(
'colonel_distributor_order'
,
'colonel_distributor_order:'
.
$log
,
false
,
true
);
}
/**
...
...
application/modules/Job/controllers/Colonelwallet.php
View file @
1789292b
...
...
@@ -28,7 +28,7 @@ class ColonelwalletController extends Job
{
$this
->
loggerInfo
(
'start'
);
$payInfoList
=
$this
->
getPayInfoList
();
$this
->
loggerInfo
(
'payInfoCount='
.
count
(
$payInfoList
));
$this
->
loggerInfo
(
'payInfoCount='
.
count
(
$payInfoList
));
if
(
!
empty
(
$payInfoList
))
{
if
(
$this
->
deductingInventory
(
$payInfoList
))
{
if
(
$this
->
toWallet
(
$payInfoList
))
{
...
...
@@ -54,25 +54,25 @@ class ColonelwalletController extends Job
if
(
!
$url
=
config
(
'interface'
,
'wallet.account.transfer'
))
{
throw
new
InterfaceException
([
'cus'
=>
0
]);
}
$httpParams
=
self
::
getWalletHttpParams
();
$list
=
[];
foreach
(
$payInfoList
as
$payInfo
)
{
$
tmp
=
[];
$tmp
[
'user_id'
]
=
$payInfo
[
'colonel_user_id'
];
$tmp
[
'service_name'
]
=
self
::
WALLET_SERVICE_NAME
;
$tmp
[
'source_name'
]
=
self
::
WALLET_SOURCE_NAME
;
$tmp
[
'third_order_id'
]
=
$payInfo
[
'colonel_distributor_pay_info_id'
];
$tmp
[
'third_order_id_type'
]
=
$payInfo
[
'type'
];
$tmp
[
'third_order_desc'
]
=
self
::
getThirdOrderDesc
(
$payInfo
);
$tmp
[
'amount'
]
=
$payInfo
[
'reward'
];
$tmp
[
'extra'
]
=
$payInfo
;
$list
[]
=
$tmp
;
$
list
[]
=
[
'user_id'
=>
$payInfo
[
'colonel_user_id'
],
'service_name'
=>
self
::
WALLET_SERVICE_NAME
,
'source_name'
=>
self
::
WALLET_SOURCE_NAME
,
'third_order_id'
=>
$payInfo
[
'colonel_distributor_pay_info_id'
],
'third_order_id_type'
=>
$payInfo
[
'type'
],
'third_order_desc'
=>
self
::
getThirdOrderDesc
(
$payInfo
),
'amount'
=>
$payInfo
[
'reward'
],
'extra'
=>
$payInfo
]
;
}
$httpParams
=
self
::
getWalletHttpParams
();
$httpParams
[
'list'
]
=
$list
;
$response
=
HttpUtil
::
post
(
$url
,
$httpParams
,
100000
,
3
);
$this
->
loggerInfo
(
"url=
$url
,response:"
.
json_encode
(
$response
));
$response
=
HttpUtil
::
post
(
$url
,
$httpParams
,
100000
,
3
);
$this
->
loggerInfo
(
"url=
$url
,response:"
.
json_encode
(
$response
));
if
(
!
empty
(
$response
[
'response'
][
'result'
])
&&
$response
[
'code'
]
==
0
)
{
$this
->
loggerInfo
(
'调用钱包服务成功,count='
.
count
(
$payInfoList
));
$this
->
loggerInfo
(
'调用钱包服务成功,count='
.
count
(
$payInfoList
));
return
true
;
}
else
{
$this
->
loggerError
(
'调用钱包服务失败,httpParams='
.
json_encode
(
$httpParams
));
...
...
@@ -97,20 +97,22 @@ class ColonelwalletController extends Job
$httpParams
=
[
'capital_pool_id'
=>
self
::
CAPITAL_POOL_ID
];
$body
=
[];
foreach
(
$payInfoList
as
$payInfo
)
{
$
tmp
=
[];
$tmp
[
'op'
]
=
self
::
CAPITAL_POOL_OP
;
$tmp
[
'user_id'
]
=
$payInfo
[
'colonel_user_id'
];
$tmp
[
'amount'
]
=
$payInfo
[
'reward'
];
$tmp
[
'third_order_id'
]
=
$payInfo
[
'colonel_distributor_pay_info_id'
];
$tmp
[
'third_order_id_type'
]
=
$payInfo
[
'type'
];
$tmp
[
'third_order_desc'
]
=
self
::
getThirdOrderDesc
(
$payInfo
);
$httpParams
[
'body'
][]
=
$tmp
;
$
body
[]
=
[
'op'
=>
self
::
CAPITAL_POOL_OP
,
'user_id'
=>
$payInfo
[
'colonel_user_id'
],
'amount'
=>
$payInfo
[
'reward'
],
'third_order_id'
=>
$payInfo
[
'colonel_distributor_pay_info_id'
],
'third_order_id_type'
=>
$payInfo
[
'type'
],
'third_order_desc'
=>
self
::
getThirdOrderDesc
(
$payInfo
),
]
;
}
$httpParams
[
'body'
]
=
$body
;
$res
=
HttpUtil
::
post
(
$url
,
$httpParams
,
100000
,
3
);
$this
->
loggerInfo
(
"url=
$url
,response:"
.
json_encode
(
$res
));
$this
->
loggerInfo
(
"url=
$url
,response:"
.
json_encode
(
$res
));
if
(
$res
[
'code'
]
==
0
&&
isset
(
$res
[
'response'
][
'result'
]))
{
$this
->
loggerInfo
(
'调用资金池服务成功,count='
.
count
(
$payInfoList
));
$this
->
loggerInfo
(
'调用资金池服务成功,count='
.
count
(
$payInfoList
));
return
true
;
}
else
{
$this
->
loggerError
(
'调用资金池服务失败,httpParams='
.
json_encode
(
$httpParams
));
...
...
@@ -124,14 +126,14 @@ class ColonelwalletController extends Job
* Date: 2021/9/3 7:34 下午
* @return array
*/
private
function
getWalletHttpParams
()
private
function
getWalletHttpParams
()
:
array
{
// TODO 此处看后期业务发展 看是否需要封装WalletSdk
$date
=
date
(
'Y-m-d H:i:s'
);
return
[
'transfer_service_id'
=>
''
,
//TODO
'sign'
=>
self
::
getWalletHttpSign
(
$date
),
'time'
=>
$date
'sign'
=>
self
::
getWalletHttpSign
(
$date
),
'time'
=>
$date
];
}
...
...
@@ -142,7 +144,7 @@ class ColonelwalletController extends Job
* @param $date
* @return string
*/
private
function
getWalletHttpSign
(
$date
)
private
function
getWalletHttpSign
(
$date
)
:
string
{
$transfer_service_secret
=
''
;
//TODO
return
md5
(
$date
.
$transfer_service_secret
);
...
...
@@ -170,9 +172,9 @@ class ColonelwalletController extends Job
{
$desc
=
''
;
if
(
$payInfo
[
'type'
]
==
ColonelDistributorPayInfo
::
TYPE_NEW_USER
)
{
$desc
=
"邀请新用户("
.
$payInfo
[
"invite_user_nick"
]
.
")完成下单奖励"
;
$desc
=
"邀请新用户("
.
$payInfo
[
"invite_user_nick"
]
.
")完成下单奖励"
;
}
elseif
(
$payInfo
[
'type'
]
==
ColonelDistributorPayInfo
::
TYPE_FINISH_TARGET
)
{
$desc
=
"完成"
.
$payInfo
[
"finish_num"
]
.
"单用户下单奖励"
;
$desc
=
"完成"
.
$payInfo
[
"finish_num"
]
.
"单用户下单奖励"
;
}
return
$desc
;
}
...
...
@@ -186,7 +188,8 @@ class ColonelwalletController extends Job
*/
private
function
handlePayInfoStatus
(
array
$payInfoIds
)
:
bool
{
return
ColonelDistributorPayInfo
::
updateRecord
([
'status'
=>
ColonelDistributorPayInfo
::
STATUS_USE
],
[
'pay_info_id'
=>
$payInfoIds
]);
return
ColonelDistributorPayInfo
::
updateRecord
([
'status'
=>
ColonelDistributorPayInfo
::
STATUS_USE
],
[
'pay_info_id'
=>
$payInfoIds
]);
}
/**
...
...
@@ -197,7 +200,7 @@ class ColonelwalletController extends Job
*/
private
function
loggerInfo
(
$log
)
{
FileLog
::
info
(
'colonel_distributor_wallet'
,
'colonel_distributor_wallet:'
.
$log
,
false
,
true
);
FileLog
::
info
(
'colonel_distributor_wallet'
,
'colonel_distributor_wallet:'
.
$log
,
false
,
true
);
}
/**
...
...
application/services/marketing/ColonelService.php
View file @
1789292b
...
...
@@ -66,7 +66,8 @@ class ColonelService
*/
public
static
function
isApply
(
$userId
)
:
array
{
$applyInfo
=
ColonelDistributorColonelApply
::
getRecord
([
'user_id'
=>
$userId
],
[
'colonel_apply_id'
,
'audit_status'
]);
$applyInfo
=
ColonelDistributorColonelApply
::
getRecord
([
'user_id'
=>
$userId
],
[
'colonel_apply_id'
,
'audit_status'
]);
return
[
// -1.未申请 0.未审核 1.审核通过 2.审核未通过
'apply_status'
=>
isset
(
$applyInfo
[
'audit_status'
])
?
intval
(
$applyInfo
[
'audit_status'
])
:
-
1
...
...
@@ -83,12 +84,13 @@ class ColonelService
*/
public
static
function
getManageApplyList
(
array
$params
)
:
array
{
$params
=
self
::
getPageParams
(
$params
);
$result
=
ColonelDistributorColonelApply
::
getPages
([],
ColonelDistributorColonelApply
::
DEFAULT_COLUMN
,
$params
[
'page'
],
$params
[
'page_size'
]);
$params
=
self
::
getPageParams
(
$params
);
$result
=
ColonelDistributorColonelApply
::
getPages
([],
ColonelDistributorColonelApply
::
DEFAULT_COLUMN
,
$params
[
'page'
],
$params
[
'page_size'
]);
if
(
empty
(
$result
[
'count'
]))
{
return
$result
;
}
$userMap
=
self
::
getUserMap
(
array_column
(
$result
[
'result'
],
'user_id'
));
$userMap
=
self
::
getUserMap
(
array_column
(
$result
[
'result'
],
'user_id'
));
$takePlaceMap
=
self
::
getColonelTakePlaceMap
(
array_column
(
$result
[
'result'
],
'colonel_apply_id'
));
foreach
(
$result
[
'result'
]
as
&
$applyVal
)
{
$applyVal
[
'user_avatar'
]
=
!
empty
(
$userMap
[
$applyVal
[
'user_id'
]][
'user_avatar'
])
?
$userMap
[
$applyVal
[
'user_id'
]][
'user_avatar'
]
:
''
;
...
...
@@ -114,8 +116,9 @@ class ColonelService
*/
public
static
function
getManageList
(
array
$params
)
:
array
{
$params
=
self
::
getPageParams
(
$params
);
$result
=
ColonelDistributorColonel
::
getPages
([],
ColonelDistributorColonel
::
DEFAULT_COLUMN
,
$params
[
'page'
],
$params
[
'page_size'
]);
$params
=
self
::
getPageParams
(
$params
);
$result
=
ColonelDistributorColonel
::
getPages
([],
ColonelDistributorColonel
::
DEFAULT_COLUMN
,
$params
[
'page'
],
$params
[
'page_size'
]);
if
(
empty
(
$result
[
'count'
]))
{
return
$result
;
}
...
...
@@ -124,9 +127,9 @@ class ColonelService
$incomeMap
=
PindanActivityInviteOrderService
::
incomeStatistics
([
"user_ids"
=>
$userIds
]);
foreach
(
$result
[
'result'
]
as
&
$colonelVal
)
{
$userId
=
$colonelVal
[
'user_id'
];
$colonelVal
[
'user_avatar'
]
=
!
empty
(
$userMap
[
$userId
][
'user_avatar'
])
?
$userMap
[
$userId
][
'user_avatar'
]
:
''
;
$colonelVal
[
'user_avatar'
]
=
!
empty
(
$userMap
[
$userId
][
'user_avatar'
])
?
$userMap
[
$userId
][
'user_avatar'
]
:
''
;
$colonelVal
[
'yesterday_income'
]
=
!
empty
(
$incomeMap
[
$userId
][
'yesterday_reward'
])
?
$incomeMap
[
$userId
][
'yesterday_reward'
]
:
0
;
$colonelVal
[
'total_income'
]
=
!
empty
(
$incomeMap
[
$userId
][
'all_reward'
])
?
$incomeMap
[
$userId
][
'all_reward'
]
:
0
;
$colonelVal
[
'total_income'
]
=
!
empty
(
$incomeMap
[
$userId
][
'all_reward'
])
?
$incomeMap
[
$userId
][
'all_reward'
]
:
0
;
}
unset
(
$colonelVal
);
return
$result
;
...
...
@@ -144,7 +147,8 @@ class ColonelService
public
static
function
handleManageAudit
(
$applyId
,
$auditStatus
)
:
bool
{
// 审核状态参数检测
if
(
!
in_array
(
$auditStatus
,
[
ColonelDistributorColonelApply
::
STATUS_PASS
,
ColonelDistributorColonelApply
::
STATUS_REJECT
]))
{
if
(
!
in_array
(
$auditStatus
,
[
ColonelDistributorColonelApply
::
STATUS_PASS
,
ColonelDistributorColonelApply
::
STATUS_REJECT
]))
{
throw
new
MarketingException
(
MarketingException
::
COLONEL_AUDIT_STATUS
);
}
// 审核状态数据检测
...
...
@@ -155,7 +159,8 @@ class ColonelService
try
{
ColonelDistributorColonelApply
::
beginTransaction
();
// 修改申请状态
$updateStatus
=
ColonelDistributorColonelApply
::
updateRecord
([
'audit_status'
=>
$auditStatus
],
[
'colonel_apply_id'
=>
$applyId
,
'audit_status'
=>
ColonelDistributorColonelApply
::
STATUS_AUDIT
]);
$updateStatus
=
ColonelDistributorColonelApply
::
updateRecord
([
'audit_status'
=>
$auditStatus
],
[
'colonel_apply_id'
=>
$applyId
,
'audit_status'
=>
ColonelDistributorColonelApply
::
STATUS_AUDIT
]);
if
(
empty
(
$updateStatus
))
{
throw
new
MarketingException
(
MarketingException
::
COLONEL_AUDIT_STATUS_FAILED
);
}
...
...
@@ -265,7 +270,7 @@ class ColonelService
*/
private
static
function
getUserMap
(
array
$userIds
)
:
array
{
$userWechatList
=
UserWechatBind
::
getRecords
([
'user_id'
=>
$userIds
],
[
'user_id'
,
'user_nick'
,
'user_avatar'
]);
$userWechatList
=
UserWechatBind
::
getRecords
([
'user_id'
=>
$userIds
],
[
'user_id'
,
'user_nick'
,
'user_avatar'
]);
return
array_column
((
array
)
$userWechatList
,
null
,
'user_id'
);
}
...
...
@@ -278,7 +283,8 @@ class ColonelService
*/
private
static
function
getColonelTakePlaceMap
(
array
$colonelApplyIds
)
:
array
{
$colonels
=
ColonelDistributorColonel
::
getRecords
([
'colonel_apply_id'
=>
$colonelApplyIds
],
[
'colonel_apply_id'
,
'take_place_id'
]);
$colonels
=
ColonelDistributorColonel
::
getRecords
([
'colonel_apply_id'
=>
$colonelApplyIds
],
[
'colonel_apply_id'
,
'take_place_id'
]);
return
array_column
((
array
)
$colonels
,
'take_place_id'
,
'colonel_apply_id'
);
}
...
...
@@ -291,8 +297,8 @@ class ColonelService
*/
private
static
function
getPageParams
(
array
$params
=
[])
:
array
{
$params
[
'page'
]
=
!
empty
(
$params
[
'page'
])
?
$params
[
'page'
]
:
1
;
$params
[
'page_size'
]
=
!
empty
(
$params
[
'page_size'
])
?
$params
[
'page_size'
]
:
20
;
$params
[
'page'
]
=
!
empty
(
$params
[
'page'
])
?
$params
[
'page'
]
:
1
;
$params
[
'page_size'
]
=
!
empty
(
$params
[
'page_size'
])
?
$params
[
'page_size'
]
:
20
;
return
$params
;
}
}
application/services/marketing/PindanActivityColonelConfigService.php
View file @
1789292b
...
...
@@ -145,7 +145,7 @@ class PindanActivityColonelConfigService
{
// 获取活动时间范围 例如活动时间(2021-09-03) --- 2021-09-03:12:00:00 - 2021-09-04:12:00:00
$hour
=
' '
.
self
::
ACTIVITY_DEFAULT_HOUR
.
':00:00'
;
if
(
date
(
'H'
)
>=
12
)
{
if
(
date
(
'H'
)
>=
self
::
ACTIVITY_DEFAULT_HOUR
)
{
$startTime
=
date
(
'Y-m-d'
)
.
$hour
;
$endTime
=
date
(
'Y-m-d'
,
strtotime
(
'+1 day'
))
.
$hour
;
}
else
{
...
...
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