Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-backend
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
AutogeneralShanghai
yd-backend
Commits
b6d35e88
Commit
b6d35e88
authored
Jun 01, 2020
by
Water Wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
optimize
parent
67186862
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
64 additions
and
14 deletions
+64
-14
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerServiceImpl.java
+0
-0
yd-api/src/main/java/com/yd/dal/mapper/customer/AclCustomerMapper.java
+7
-1
yd-api/src/main/java/com/yd/dal/mapper/customer/AclPractitionerMapper.java
+3
-0
yd-api/src/main/java/com/yd/dal/service/customer/AclCustomerDALService.java
+2
-0
yd-api/src/main/java/com/yd/dal/service/customer/AclPractitionerDALService.java
+7
-0
yd-api/src/main/java/com/yd/dal/service/customer/impl/AclCustomerDALServiceImpl.java
+5
-0
yd-api/src/main/java/com/yd/dal/service/customer/impl/AclPractitionerDALServiceImpl.java
+11
-0
yd-api/src/main/resources/mapper/customer/AclCustomerFortuneMapper.xml
+3
-3
yd-api/src/main/resources/mapper/customer/AclCustomerMapper.xml
+10
-0
yd-api/src/main/resources/mapper/customer/AclPractitionerMapper.xml
+16
-10
No files found.
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerServiceImpl.java
View file @
b6d35e88
This diff is collapsed.
Click to expand it.
yd-api/src/main/java/com/yd/dal/mapper/customer/AclCustomerMapper.java
View file @
b6d35e88
package
com
.
yd
.
dal
.
mapper
.
customer
;
import
com.yd.dal.entity.customer.AclCustomer
;
import
java.util.List
;
import
com.yd.dal.entity.customer.AclCustomer
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
public
interface
AclCustomerMapper
{
int
deleteByPrimaryKey
(
Long
id
);
...
...
@@ -18,4 +21,6 @@ public interface AclCustomerMapper {
List
<
AclCustomer
>
findByLogin
(
String
mobileNo
);
AclCustomer
findByMobileNo
(
String
mobileNo
);
List
<
AclCustomer
>
findByIds
(
@Param
(
"customerIds"
)
List
<
Long
>
customerIds
);
}
\ No newline at end of file
yd-api/src/main/java/com/yd/dal/mapper/customer/AclPractitionerMapper.java
View file @
b6d35e88
...
...
@@ -46,4 +46,6 @@ public interface AclPractitionerMapper {
List
<
PlayerSalesActivityInfo
>
playerSalesActivityQuery
(
@Param
(
"practitionerId"
)
Long
practitionerId
,
@Param
(
"optionsId"
)
Long
optionsId
);
List
<
AclPractitioner
>
findBySubordinateSystemId
(
@Param
(
"subordinateSystemId"
)
Long
subordinateSystemId
);
String
findMobileNoByPractitionerId
(
@Param
(
"practitionerId"
)
Long
practitionerId
);
}
\ No newline at end of file
yd-api/src/main/java/com/yd/dal/service/customer/AclCustomerDALService.java
View file @
b6d35e88
...
...
@@ -32,5 +32,7 @@ public interface AclCustomerDALService {
AclCustomer
findByCustomerId
(
Long
customerId
);
AclCustomer
findByMobileNo
(
String
mobileNo
);
List
<
AclCustomer
>
findByIds
(
List
<
Long
>
customerIds
);
}
yd-api/src/main/java/com/yd/dal/service/customer/AclPractitionerDALService.java
View file @
b6d35e88
...
...
@@ -102,4 +102,11 @@ public interface AclPractitionerDALService {
* @return
*/
List
<
AclPractitioner
>
findBySubordinateSystemId
(
Long
subordinateSystemId
);
/**
* 更具经纪人id查询该经纪人手机号码
* @param practitionerId 经纪人id
* @return 查询结果
*/
String
findMobileNoByPractitionerId
(
Long
practitionerId
);
}
yd-api/src/main/java/com/yd/dal/service/customer/impl/AclCustomerDALServiceImpl.java
View file @
b6d35e88
...
...
@@ -47,4 +47,9 @@ public class AclCustomerDALServiceImpl implements AclCustomerDALService {
return
aclCustomerMapper
.
findByMobileNo
(
mobileNo
);
}
@Override
public
List
<
AclCustomer
>
findByIds
(
List
<
Long
>
customerIds
)
{
return
aclCustomerMapper
.
findByIds
(
customerIds
);
}
}
yd-api/src/main/java/com/yd/dal/service/customer/impl/AclPractitionerDALServiceImpl.java
View file @
b6d35e88
...
...
@@ -9,6 +9,7 @@ import com.yd.dal.entity.customer.practitioner.PractitionerInfo;
import
com.yd.dal.entity.customer.practitioner.PractitionerRankInfo
;
import
com.yd.dal.mapper.customer.AclPractitionerMapper
;
import
com.yd.dal.service.customer.AclPractitionerDALService
;
import
com.yd.util.deshandler.DESTypeHandler
;
import
com.yd.util.intercept.annotation.TargetDataSource
;
import
com.yd.util.intercept.commons.DataSourceKey
;
import
org.apache.log4j.Logger
;
...
...
@@ -102,4 +103,14 @@ public class AclPractitionerDALServiceImpl implements AclPractitionerDALService
public
List
<
AclPractitioner
>
findBySubordinateSystemId
(
Long
subordinateSystemId
)
{
return
aclPractitionerMapper
.
findBySubordinateSystemId
(
subordinateSystemId
);
}
@Override
public
String
findMobileNoByPractitionerId
(
Long
practitionerId
)
{
String
mobileNo
=
aclPractitionerMapper
.
findMobileNoByPractitionerId
(
practitionerId
);
if
(!
Strings
.
isNullOrEmpty
(
mobileNo
)){
DESTypeHandler
jpaCryptoConverter
=
new
DESTypeHandler
();
mobileNo
=
jpaCryptoConverter
.
decode
(
mobileNo
);
}
return
mobileNo
;
}
}
yd-api/src/main/resources/mapper/customer/AclCustomerFortuneMapper.xml
View file @
b6d35e88
...
...
@@ -307,9 +307,9 @@
p.id practitionerId ,
p.`name` name ,
p.subordinate_system_id subordinateSystemId ,
COUNT(f.id
) count ,
SUM(f.order_price
) FYP ,
SUM(f.referral_amount
) FYC ,
ifnull(COUNT(f.id),0
) count ,
ifnull(SUM(f.order_price),0
) FYP ,
ifnull(SUM(f.fyc_amount),0
) FYC ,
s.practitioner_level practitionerLevelId
FROM
((ag_acl_practitioner_setting s LEFT JOIN ag_acl_practitioner p ON s.practitioner_id = p.id)
...
...
yd-api/src/main/resources/mapper/customer/AclCustomerMapper.xml
View file @
b6d35e88
...
...
@@ -771,4 +771,13 @@
from ag_acl_customer
where mobile_no = #{mobileNo,jdbcType=VARCHAR,typeHandler=com.yd.util.deshandler.DESTypeHandler}
</select>
<select
id=
"findByIds"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from ag_acl_customer
where id in
<foreach
collection=
"customerIds"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</select>
</mapper>
\ No newline at end of file
yd-api/src/main/resources/mapper/customer/AclPractitionerMapper.xml
View file @
b6d35e88
...
...
@@ -547,14 +547,14 @@
md.DRP_TITLE_LEVEL as titleCode,-- 职称code
md.DRP_TITLE_NAME as titleName,-- 职称名称
spc.SPC_DIV_NAME as spcDivName,-- 体系id
count(m.MON025_002
) as count,-- 保单id
sum(m.MON025_401
) as fyp,-- 保费
sum(m.MON025_405
) as fyc -- 应发佣金
ifnull(count(m.MON025_002),0
) as count,-- 保单id
ifnull(sum(m.MON025_401),0
) as fyp,-- 保费
ifnull(sum(policy.INS001_FYCTOTAL),0
) as fyc -- 应发佣金
FROM MON025 m INNER JOIN sal001 p on m.MON025_007 = p.SAL_MST_ID -- 业务员id
left join DRP003 md on p.FK_DRP_TITLE_CODE = md.DRP_TITLE_CODE
inner JOIN ins001 policy on m.MON025_002 = policy.INS_MST_ID -- 保单id
inner join spc004 spc on m.MON025_006 = spc.SPC_DIV_ID -- 体系
WHERE m.MON025_109 IN (1,2,3) AND m.MON025_303 = 1
WHERE m.MON025_109 IN (1,2,3) AND m.MON025_303 = 1
AND m.mon025_108 = 'S01'
<choose>
<when
test=
"time == 1"
>
and DATE_FORMAT(policy.INS_MST_ACCEPT_DATE, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )
...
...
@@ -575,9 +575,9 @@
p.id as practitionerIdForOnLine ,
p.name as name ,-- 姓名
ss.name as spcDivName,-- 体系id
count(f.id
) as count,-- 保单id
sum(f.order_price
) as fyp,-- 保费
sum(f.referral_amount
) as fyc -- 应发佣金
ifnull(count(f.id),0
) as count,-- 保单id
ifnull(sum(f.order_price),0
) as fyp,-- 保费
ifnull(sum(f.fyc_amount),0
) as fyc -- 应发佣金
FROM ag_acl_customer_fortune f INNER JOIN ag_po_order o ON f.order_id = o.id
inner JOIN ag_acl_practitioner p ON f.customer_id = p.customer_id
left join ag_acl_practitioner_setting s on p.id = s.practitioner_id
...
...
@@ -607,9 +607,9 @@
p.id as practitionerIdForOnLine ,
p.name as name ,-- 姓名
ss.name as spcDivName,-- 体系id
count(f.id
) as count,-- 保单id
sum(f.order_price
) as fyp,-- 保费
sum(f.referral_amount
) as fyc -- 应发佣金
ifnull(count(f.id),0
) as count,-- 保单id
ifnull(sum(f.order_price),0
) as fyp,-- 保费
ifnull(sum(f.fyc_amount),0
) as fyc -- 应发佣金
FROM ag_acl_customer_fortune f INNER JOIN ag_po_order o ON f.order_id = o.id
inner JOIN ag_acl_practitioner p ON f.customer_id = p.customer_id
left join ag_acl_customer c on p.customer_id = c.id
...
...
@@ -765,4 +765,9 @@
from ag_acl_practitioner
where subordinate_system_id = #{subordinateSystemId,jdbcType=BIGINT} and is_active = 1
</select>
<select
id=
"findMobileNoByPractitionerId"
resultType=
"java.lang.String"
>
select c.mobile_no
from ag_acl_practitioner p left join ag_acl_customer c on p.customer_id = c.id and c.is_active = 1
where p.id = #{practitionerId,jdbcType=BIGINT} limit 1;
</select>
</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