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
979aa1ae
Commit
979aa1ae
authored
Aug 27, 2021
by
jianghaiming
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'colonel' into develop
parents
c231dc54
356401b9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
21 deletions
+25
-21
ColonelService.php
application/services/marketing/ColonelService.php
+21
-21
UserService.php
application/services/user/UserService.php
+4
-0
No files found.
application/services/marketing/ColonelService.php
View file @
979aa1ae
...
...
@@ -30,19 +30,19 @@ class ColonelService
throw
new
MarketingException
(
MarketingException
::
COLONEL_APPLY_EXIST
);
}
$colonelData
=
[
'user_id'
=>
$params
[
'user_id'
],
'user_id'
=>
$params
[
'user_id'
],
'life_account_id'
=>
MarketingService
::
getPublicLifeAccountId
(),
'phone'
=>
$params
[
'phone'
],
'contact_name'
=>
$params
[
'contact_name'
],
'phone'
=>
$params
[
'phone'
],
'contact_name'
=>
$params
[
'contact_name'
],
'take_place_name'
=>
$params
[
'take_place_name'
],
'take_place_pic'
=>
$params
[
'take_place_pic'
]
??
''
,
'longitude'
=>
$params
[
'longitude'
]
??
0
,
'latitude'
=>
$params
[
'latitude'
]
??
0
,
'location'
=>
$params
[
'location'
]
??
''
,
'address'
=>
$params
[
'address'
]
??
''
,
'province'
=>
$params
[
'province'
]
??
''
,
'city'
=>
$params
[
'city'
]
??
''
,
'area'
=>
$params
[
'area'
]
??
''
,
'take_place_pic'
=>
$params
[
'take_place_pic'
]
??
''
,
'longitude'
=>
$params
[
'longitude'
]
??
0
,
'latitude'
=>
$params
[
'latitude'
]
??
0
,
'location'
=>
$params
[
'location'
]
??
''
,
'address'
=>
$params
[
'address'
]
??
''
,
'province'
=>
$params
[
'province'
]
??
''
,
'city'
=>
$params
[
'city'
]
??
''
,
'area'
=>
$params
[
'area'
]
??
''
,
];
try
{
if
(
!
empty
(
$colonelData
[
'take_place_name'
]))
{
...
...
@@ -88,7 +88,7 @@ class ColonelService
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'
]
:
''
;
...
...
@@ -124,9 +124,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
;
...
...
@@ -245,13 +245,13 @@ class ColonelService
{
// 入库团长表
$colonelData
=
[
'user_id'
=>
$applyInfo
[
'user_id'
],
'user_id'
=>
$applyInfo
[
'user_id'
],
'colonel_apply_id'
=>
$applyInfo
[
'colonel_apply_id'
],
'take_place_id'
=>
0
,
'life_account_id'
=>
$applyInfo
[
'life_account_id'
],
'phone'
=>
$applyInfo
[
'phone'
],
'contact_name'
=>
$applyInfo
[
'contact_name'
],
'colonel_source'
=>
ColonelDistributorColonel
::
COLONEL_SOURCE_APPLY
'take_place_id'
=>
0
,
'life_account_id'
=>
$applyInfo
[
'life_account_id'
],
'phone'
=>
$applyInfo
[
'phone'
],
'contact_name'
=>
$applyInfo
[
'contact_name'
],
'colonel_source'
=>
ColonelDistributorColonel
::
COLONEL_SOURCE_APPLY
];
return
ColonelDistributorColonel
::
insertRecord
(
$colonelData
);
}
...
...
@@ -291,7 +291,7 @@ class ColonelService
*/
private
static
function
getPageParams
(
array
$params
=
[])
:
array
{
$params
[
'page'
]
=
!
empty
(
$params
[
'page'
])
?
$params
[
'page'
]
:
1
;
$params
[
'page'
]
=
!
empty
(
$params
[
'page'
])
?
$params
[
'page'
]
:
1
;
$params
[
'page_size'
]
=
!
empty
(
$params
[
'page_size'
])
?
$params
[
'page_size'
]
:
20
;
return
$params
;
}
...
...
application/services/user/UserService.php
View file @
979aa1ae
...
...
@@ -192,6 +192,10 @@ class UserService
if
(
!
empty
(
$params
[
'user_id'
]))
{
$data
[
'user_id'
]
=
$params
[
'user_id'
];
}
if
(
!
empty
(
$params
[
'phone'
]))
{
$data
[
'phone'
]
=
$params
[
'phone'
];
}
$userList
=
UserWechatBind
::
getRecords
(
$data
);
return
$userList
;
...
...
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