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
fe47b33c
Commit
fe47b33c
authored
Sep 08, 2021
by
pengfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update 团长分销-团长列表
parent
28f63cc5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
1 deletion
+24
-1
ColonelDistributorColonelApply.php
...models/marketing/mysql/ColonelDistributorColonelApply.php
+1
-1
TakePlace.php
application/models/marketing/mysql/TakePlace.php
+5
-0
ColonelService.php
application/services/marketing/ColonelService.php
+18
-0
No files found.
application/models/marketing/mysql/ColonelDistributorColonelApply.php
View file @
fe47b33c
...
@@ -19,7 +19,7 @@ class ColonelDistributorColonelApply extends MysqlBase
...
@@ -19,7 +19,7 @@ class ColonelDistributorColonelApply extends MysqlBase
const
STATUS_PASS
=
1
;
//审核通过
const
STATUS_PASS
=
1
;
//审核通过
const
STATUS_REJECT
=
2
;
//审核驳回
const
STATUS_REJECT
=
2
;
//审核驳回
const
DEFAULT_COLUMN
=
[
'colonel_apply_id'
,
'audit_status'
,
'user_id'
,
'phone'
,
'contact_name'
,
'take_place_name'
,
'province'
,
'city'
,
'area'
,
'location'
];
const
DEFAULT_COLUMN
=
[
'colonel_apply_id'
,
'audit_status'
,
'user_id'
,
'phone'
,
'contact_name'
,
'take_place_name'
,
'province'
,
'city'
,
'area'
,
'location'
,
'address'
];
public
static
function
insertRecord
(
array
$column
)
:
int
public
static
function
insertRecord
(
array
$column
)
:
int
{
{
...
...
application/models/marketing/mysql/TakePlace.php
View file @
fe47b33c
...
@@ -60,6 +60,11 @@ class TakePlace extends MysqlBase
...
@@ -60,6 +60,11 @@ class TakePlace extends MysqlBase
return
self
::
get
(
$column
,
$where
);
return
self
::
get
(
$column
,
$where
);
}
}
public
static
function
getRecords
(
array
$where
,
$column
=
'*'
)
{
return
self
::
select
(
$column
,
$where
);
}
public
static
function
existTakePlaceName
(
string
$takePlaceName
)
:
bool
public
static
function
existTakePlaceName
(
string
$takePlaceName
)
:
bool
{
{
$exist
=
self
::
getRecord
([
'take_place_name'
=>
$takePlaceName
],
[
'take_place_id'
]);
$exist
=
self
::
getRecord
([
'take_place_name'
=>
$takePlaceName
],
[
'take_place_id'
]);
...
...
application/services/marketing/ColonelService.php
View file @
fe47b33c
...
@@ -124,9 +124,14 @@ class ColonelService
...
@@ -124,9 +124,14 @@ class ColonelService
}
}
$userIds
=
array_column
(
$result
[
'result'
],
'user_id'
);
$userIds
=
array_column
(
$result
[
'result'
],
'user_id'
);
$userMap
=
self
::
getUserMap
(
$userIds
);
$userMap
=
self
::
getUserMap
(
$userIds
);
$takePlaceMap
=
self
::
getTakePlaceMap
(
array_column
(
$result
[
'result'
],
'take_place_id'
));
$incomeMap
=
PindanActivityInviteOrderService
::
incomeStatistics
([
"user_ids"
=>
$userIds
]);
$incomeMap
=
PindanActivityInviteOrderService
::
incomeStatistics
([
"user_ids"
=>
$userIds
]);
foreach
(
$result
[
'result'
]
as
&
$colonelVal
)
{
foreach
(
$result
[
'result'
]
as
&
$colonelVal
)
{
$userId
=
$colonelVal
[
'user_id'
];
$userId
=
$colonelVal
[
'user_id'
];
$takePlaceInfo
=
!
empty
(
$takePlaceMap
[
$colonelVal
[
'take_place_id'
]])
?
$takePlaceMap
[
$colonelVal
[
'take_place_id'
]]
:
[];
$colonelVal
[
'take_place_name'
]
=
$takePlaceInfo
[
'take_place_name'
]
??
''
;
$colonelVal
[
'location'
]
=
$takePlaceInfo
[
'location'
]
??
''
;
$colonelVal
[
'address'
]
=
$takePlaceInfo
[
'address'
]
??
''
;
$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
[
'no_settlement_income'
]
=
!
empty
(
$incomeMap
[
$userId
][
'no_settlement'
])
?
$incomeMap
[
$userId
][
'no_settlement'
]
:
0
;
$colonelVal
[
'no_settlement_income'
]
=
!
empty
(
$incomeMap
[
$userId
][
'no_settlement'
])
?
$incomeMap
[
$userId
][
'no_settlement'
]
:
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
;
...
@@ -305,4 +310,17 @@ class ColonelService
...
@@ -305,4 +310,17 @@ class ColonelService
$params
[
'page_size'
]
=
!
empty
(
$params
[
'page_size'
])
?
$params
[
'page_size'
]
:
20
;
$params
[
'page_size'
]
=
!
empty
(
$params
[
'page_size'
])
?
$params
[
'page_size'
]
:
20
;
return
$params
;
return
$params
;
}
}
/**
* Notes: 获取自提点信息
* User: pengfei@yidian-inc.com
* Date: 2021/9/8 6:16 下午
* @param array $takePlaceId
* @return array
*/
private
static
function
getTakePlaceMap
(
array
$takePlaceId
)
:
array
{
$takePlaces
=
TakePlace
::
getRecords
([
'take_place_id'
=>
$takePlaceId
]);
return
array_column
((
array
)
$takePlaces
,
null
,
'take_place_id'
);
}
}
}
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