Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
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
youjj
cloud-platform
Commits
cb39895d
Commit
cb39895d
authored
Jul 21, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'base-modify' of
http://113.105.137.151:22280/youjj/cloud-platform
into base-modify
parents
85580b2f
6173fee0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
12 deletions
+18
-12
AppUserSellingWaterMapper.xml
...n/src/main/resources/mapper/AppUserSellingWaterMapper.xml
+18
-12
No files found.
ace-modules/ace-admin/src/main/resources/mapper/AppUserSellingWaterMapper.xml
View file @
cb39895d
...
@@ -4,13 +4,15 @@
...
@@ -4,13 +4,15 @@
<select
id=
"accquireIncomeByMemberIds"
resultType=
"com.github.wxiaoqi.security.admin.bo.UserIncomeBo"
>
<select
id=
"accquireIncomeByMemberIds"
resultType=
"com.github.wxiaoqi.security.admin.bo.UserIncomeBo"
>
SELECT DISTINCT
SELECT DISTINCT
`source_id`as userId,
`source_id`as userId,
(( SELECT SUM(commission) FROM `app_user_selling_water` WHERE source_id=ausw.source_id AND `status` = 0 AND `waiting` = 1 )
(( SELECT SUM(commission) FROM `app_user_selling_water` WHERE source_id=ausw.source_id AND `status` = 0 AND
- ( SELECT SUM(commission) FROM `app_user_selling_water` WHERE source_id=ausw.source_id AND `status` = 1 AND `waiting` = 1 )) as `income`
`waiting` = 1 )
FROM
- ( SELECT SUM(commission) FROM `app_user_selling_water` WHERE source_id=ausw.source_id AND `status` = 1 AND
`waiting` = 1 )) as `income`
FROM
`app_user_selling_water` as ausw
`app_user_selling_water` as ausw
WHERE
WHERE
source_id in
source_id in
<foreach
collection=
"memberIds"
item=
"memberId"
open=
"("
close=
")"
separator=
","
>
<foreach
collection=
"memberIds"
item=
"memberId"
open=
"("
close=
")"
separator=
","
>
#{memberId}
#{memberId}
...
@@ -18,6 +20,10 @@ WHERE
...
@@ -18,6 +20,10 @@ WHERE
</select>
</select>
<select
id=
"selectTotalIncomeByUserId"
resultType=
"java.math.BigDecimal"
>
<select
id=
"selectTotalIncomeByUserId"
resultType=
"java.math.BigDecimal"
>
SELECT SUM(commission) FROM app_user_selling_water WHERE `user_id`=#{userId}
SELECT
( auswu.upIncome - auswd.dowIncome ) AS `income`
FROM
( SELECT SUM( commission ) AS upIncome FROM `app_user_selling_water` WHERE STATUS = 0 AND `user_id` = #{userId} ) AS `auswu`,
( SELECT SUM( commission ) AS `dowIncome` FROM `app_user_selling_water` WHERE STATUS = 1 AND `user_id` = #{userId} ) AS `auswd`;
</select>
</select>
</mapper>
</mapper>
\ 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