Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-csf
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
xingmin
yd-csf
Commits
ded1c937
Commit
ded1c937
authored
Oct 24, 2025
by
zhangxingmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push
parent
028ddd2a
Hide whitespace changes
Inline
Side-by-side
Showing
42 changed files
with
788 additions
and
28 deletions
+788
-28
.idea/compiler.xml
+6
-1
.idea/misc.xml
+5
-0
pom.xml
+1
-1
yd-csf-api/pom.xml
+1
-0
yd-csf-api/src/main/java/com/yd/csf/api/controller/AgentManageRelationController.java
+4
-4
yd-csf-api/src/main/java/com/yd/csf/api/controller/ApiAgentReferralRelationController.java
+36
-0
yd-csf-api/src/main/java/com/yd/csf/api/controller/ApiApprovalController.java
+37
-0
yd-csf-api/src/main/java/com/yd/csf/api/service/ApiAgentReferralRelationService.java
+8
-0
yd-csf-api/src/main/java/com/yd/csf/api/service/ApiApprovalService.java
+10
-0
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiAgentReferralRelationServiceImpl.java
+54
-0
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiApprovalServiceImpl.java
+92
-0
yd-csf-api/src/main/resources/bootstrap.yml
+1
-1
yd-csf-feign/src/main/java/com/yd/csf/feign/client/agentreferralrelation/ApiAgentReferralRelationFeignClient.java
+24
-0
yd-csf-feign/src/main/java/com/yd/csf/feign/client/approval/ApiApprovalFeignClient.java
+23
-0
yd-csf-feign/src/main/java/com/yd/csf/feign/fallback/agentreferralrelation/ApiAgentReferralRelationFeignFallbackFactory.java
+25
-0
yd-csf-feign/src/main/java/com/yd/csf/feign/fallback/approval/ApiApprovalFeignFallbackFactory.java
+25
-0
yd-csf-feign/src/main/java/com/yd/csf/feign/request/agentreferralrelation/ApiAgentReferralRelationSaveRequest.java
+44
-0
yd-csf-feign/src/main/java/com/yd/csf/feign/request/approval/ApiApprovalClientUserPageRequest.java
+28
-0
yd-csf-feign/src/main/java/com/yd/csf/feign/response/approval/ApiApprovalClientUserPageResponse.java
+77
-0
yd-csf-service/src/main/java/com/yd/csf/service/dao/AgentManageRelationMapper.java
+16
-0
yd-csf-service/src/main/java/com/yd/csf/service/dto/AgentReferralRelationDto.java
+29
-0
yd-csf-service/src/main/java/com/yd/csf/service/model/AgentAccumulatedFyc.java
+1
-1
yd-csf-service/src/main/java/com/yd/csf/service/model/AgentDetailFyc.java
+2
-2
yd-csf-service/src/main/java/com/yd/csf/service/model/AgentManageRelation.java
+110
-0
yd-csf-service/src/main/java/com/yd/csf/service/model/AgentReferralRelation.java
+14
-2
yd-csf-service/src/main/java/com/yd/csf/service/model/AgentTutoringRelation.java
+2
-2
yd-csf-service/src/main/java/com/yd/csf/service/model/CarApply.java
+1
-1
yd-csf-service/src/main/java/com/yd/csf/service/model/CommissionResult.java
+1
-1
yd-csf-service/src/main/java/com/yd/csf/service/model/FycTask.java
+1
-1
yd-csf-service/src/main/java/com/yd/csf/service/model/Invitation.java
+2
-2
yd-csf-service/src/main/java/com/yd/csf/service/model/Member.java
+1
-1
yd-csf-service/src/main/java/com/yd/csf/service/model/PolicyAgentRelation.java
+1
-1
yd-csf-service/src/main/java/com/yd/csf/service/model/RelAgentCustomer.java
+1
-1
yd-csf-service/src/main/java/com/yd/csf/service/model/RelMemberRole.java
+1
-1
yd-csf-service/src/main/java/com/yd/csf/service/model/RelTeamMember.java
+1
-1
yd-csf-service/src/main/java/com/yd/csf/service/model/Team.java
+1
-1
yd-csf-service/src/main/java/com/yd/csf/service/service/IAgentManageRelationService.java
+16
-0
yd-csf-service/src/main/java/com/yd/csf/service/service/IAgentReferralRelationService.java
+8
-0
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/AgentManageRelationServiceImpl.java
+20
-0
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/AgentReferralRelationServiceImpl.java
+50
-0
yd-csf-service/src/main/java/com/yd/csf/service/utils/MyBatisPlusCodeGenerator.java
+3
-3
yd-csf-service/src/main/resources/mappers/AgentManageRelationMapper.xml
+5
-0
No files found.
.idea/compiler.xml
View file @
ded1c937
...
@@ -7,10 +7,14 @@
...
@@ -7,10 +7,14 @@
<sourceOutputDir
name=
"target/generated-sources/annotations"
/>
<sourceOutputDir
name=
"target/generated-sources/annotations"
/>
<sourceTestOutputDir
name=
"target/generated-test-sources/test-annotations"
/>
<sourceTestOutputDir
name=
"target/generated-test-sources/test-annotations"
/>
<outputRelativeToContentRoot
value=
"true"
/>
<outputRelativeToContentRoot
value=
"true"
/>
<module
name=
"yd-csf-service"
/>
<module
name=
"yd-csf-api"
/>
<module
name=
"yd-csf-api"
/>
<module
name=
"yd-csf-wx-api"
/>
<module
name=
"yd-csf-service"
/>
<module
name=
"yd-csf-feign"
/>
<module
name=
"yd-csf-feign"
/>
</profile>
</profile>
</annotationProcessing>
</annotationProcessing>
<bytecodeTargetLevel>
<module
name=
"yd-csf-wx-api"
target=
"1.8"
/>
</bytecodeTargetLevel>
</component>
</component>
</project>
</project>
\ No newline at end of file
.idea/misc.xml
View file @
ded1c937
...
@@ -7,6 +7,11 @@
...
@@ -7,6 +7,11 @@
<option
value=
"$PROJECT_DIR$/pom.xml"
/>
<option
value=
"$PROJECT_DIR$/pom.xml"
/>
</list>
</list>
</option>
</option>
<option
name=
"ignoredFiles"
>
<set>
<option
value=
"$PROJECT_DIR$/yd-csf-wx-api/pom.xml"
/>
</set>
</option>
</component>
</component>
<component
name=
"ProjectRootManager"
version=
"2"
languageLevel=
"JDK_1_8"
project-jdk-name=
"1.8"
project-jdk-type=
"JavaSDK"
>
<component
name=
"ProjectRootManager"
version=
"2"
languageLevel=
"JDK_1_8"
project-jdk-name=
"1.8"
project-jdk-type=
"JavaSDK"
>
<output
url=
"file://$PROJECT_DIR$/out"
/>
<output
url=
"file://$PROJECT_DIR$/out"
/>
...
...
pom.xml
View file @
ded1c937
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
<artifactId>
yd-csf
</artifactId>
<artifactId>
yd-csf
</artifactId>
<packaging>
pom
</packaging>
<packaging>
pom
</packaging>
<version>
1.0-SNAPSHOT
</version>
<version>
1.0-SNAPSHOT
</version>
<description>
香港保险服务
</description>
<description>
香港保险服务
-管理端
</description>
<modules>
<modules>
<module>
yd-csf-api
</module>
<module>
yd-csf-api
</module>
...
...
yd-csf-api/pom.xml
View file @
ded1c937
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
yd-csf-api
</artifactId>
<artifactId>
yd-csf-api
</artifactId>
<description>
香港保险服务-管理端
</description>
<dependencies>
<dependencies>
<dependency>
<dependency>
...
...
yd-csf-api/src/main/java/com/yd/csf/api/controller/Agent
Referral
RelationController.java
→
yd-csf-api/src/main/java/com/yd/csf/api/controller/Agent
Manage
RelationController.java
View file @
ded1c937
...
@@ -5,14 +5,14 @@ import org.springframework.web.bind.annotation.RestController;
...
@@ -5,14 +5,14 @@ import org.springframework.web.bind.annotation.RestController;
/**
/**
* <p>
* <p>
*
推荐关系表
前端控制器
*
管理关系表((团队的形成来自这张表,谁在最高级就是团长))
前端控制器
* </p>
* </p>
*
*
* @author zxm
* @author zxm
* @since 2025-10-
15
* @since 2025-10-
21
*/
*/
@RestController
@RestController
@RequestMapping
(
"/agent
Referral
Relation"
)
@RequestMapping
(
"/agent
Manage
Relation"
)
public
class
Agent
Referral
RelationController
{
public
class
Agent
Manage
RelationController
{
}
}
yd-csf-api/src/main/java/com/yd/csf/api/controller/ApiAgentReferralRelationController.java
0 → 100644
View file @
ded1c937
package
com
.
yd
.
csf
.
api
.
controller
;
import
com.yd.common.result.Result
;
import
com.yd.csf.api.service.ApiAgentReferralRelationService
;
import
com.yd.csf.feign.client.agentreferralrelation.ApiAgentReferralRelationFeignClient
;
import
com.yd.csf.feign.request.agentreferralrelation.ApiAgentReferralRelationSaveRequest
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* 推荐关系信息
*
* @author zxm
* @since 2025-10-15
*/
@RestController
@RequestMapping
(
"/agentReferralRelation"
)
@Validated
public
class
ApiAgentReferralRelationController
implements
ApiAgentReferralRelationFeignClient
{
@Autowired
private
ApiAgentReferralRelationService
apiAgentReferralRelationService
;
/**
* 保存-推荐关系信息
* @param request
* @return
*/
@Override
public
Result
save
(
ApiAgentReferralRelationSaveRequest
request
)
{
return
apiAgentReferralRelationService
.
save
(
request
);
}
}
yd-csf-api/src/main/java/com/yd/csf/api/controller/ApiApprovalController.java
0 → 100644
View file @
ded1c937
package
com
.
yd
.
csf
.
api
.
controller
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.yd.common.result.Result
;
import
com.yd.csf.api.service.ApiApprovalService
;
import
com.yd.csf.feign.client.approval.ApiApprovalFeignClient
;
import
com.yd.csf.feign.request.approval.ApiApprovalClientUserPageRequest
;
import
com.yd.csf.feign.response.approval.ApiApprovalClientUserPageResponse
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* 审批信息
*
* @author zxm
* @since 2025-10-21
*/
@RestController
@RequestMapping
(
"/approval"
)
@Validated
public
class
ApiApprovalController
implements
ApiApprovalFeignClient
{
@Autowired
private
ApiApprovalService
apiApprovalService
;
/**
* 审批列表-客户端用户信息
* @param request
* @return
*/
@Override
public
Result
<
IPage
<
ApiApprovalClientUserPageResponse
>>
approvalClientUserPage
(
ApiApprovalClientUserPageRequest
request
)
{
return
apiApprovalService
.
approvalClientUserPage
(
request
);
}
}
yd-csf-api/src/main/java/com/yd/csf/api/service/ApiAgentReferralRelationService.java
0 → 100644
View file @
ded1c937
package
com
.
yd
.
csf
.
api
.
service
;
import
com.yd.common.result.Result
;
import
com.yd.csf.feign.request.agentreferralrelation.ApiAgentReferralRelationSaveRequest
;
public
interface
ApiAgentReferralRelationService
{
Result
save
(
ApiAgentReferralRelationSaveRequest
request
);
}
yd-csf-api/src/main/java/com/yd/csf/api/service/ApiApprovalService.java
0 → 100644
View file @
ded1c937
package
com
.
yd
.
csf
.
api
.
service
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.yd.common.result.Result
;
import
com.yd.csf.feign.request.approval.ApiApprovalClientUserPageRequest
;
import
com.yd.csf.feign.response.approval.ApiApprovalClientUserPageResponse
;
public
interface
ApiApprovalService
{
Result
<
IPage
<
ApiApprovalClientUserPageResponse
>>
approvalClientUserPage
(
ApiApprovalClientUserPageRequest
request
);
}
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiAgentReferralRelationServiceImpl.java
0 → 100644
View file @
ded1c937
package
com
.
yd
.
csf
.
api
.
service
.
impl
;
import
com.yd.common.enums.CommonEnum
;
import
com.yd.common.result.Result
;
import
com.yd.common.utils.RandomStringGenerator
;
import
com.yd.csf.api.service.ApiAgentReferralRelationService
;
import
com.yd.csf.feign.request.agentreferralrelation.ApiAgentReferralRelationSaveRequest
;
import
com.yd.csf.service.model.AgentReferralRelation
;
import
com.yd.csf.service.service.IAgentReferralRelationService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.stream.Collectors
;
@Service
public
class
ApiAgentReferralRelationServiceImpl
implements
ApiAgentReferralRelationService
{
@Autowired
private
IAgentReferralRelationService
iAgentReferralRelationService
;
/**
* 保存-推荐关系信息
* @param request
* @return
*/
@Override
public
Result
save
(
ApiAgentReferralRelationSaveRequest
request
)
{
//先删后新增
iAgentReferralRelationService
.
del
(
request
.
getAgentIdList
(),
request
.
getReferrerId
());
List
<
AgentReferralRelation
>
saveList
=
request
.
getAgentIdList
().
stream
().
map
(
agentId
->
{
//新增
AgentReferralRelation
relation
=
new
AgentReferralRelation
();
//被推荐人ID
relation
.
setAgentId
(
agentId
);
//推荐人ID(客户端用户表唯一业务ID,如果是PC,这里就是sys_user的用户ID)
relation
.
setReferrerId
(
request
.
getReferrerId
());
//推荐来源(PC、小程序等,字典,PC就是中台加入申请的)
relation
.
setSource
(
request
.
getSource
());
//推荐路径(用于快速查询关系链) TODO
// relation.setReferralPath();
//推荐关系表唯一业务ID
relation
.
setReferralBizId
(
RandomStringGenerator
.
generateBizId16
(
CommonEnum
.
UID_TYPE_AGENT_REFERRAL_RELATION
.
getCode
()));
relation
.
setReferrerAccount
(
request
.
getReferrerAccount
());
return
relation
;
}).
collect
(
Collectors
.
toList
());
iAgentReferralRelationService
.
saveOrUpdateBatch
(
saveList
);
return
Result
.
success
();
}
}
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiApprovalServiceImpl.java
0 → 100644
View file @
ded1c937
package
com
.
yd
.
csf
.
api
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yd.common.result.Result
;
import
com.yd.csf.api.service.ApiApprovalService
;
import
com.yd.csf.feign.request.approval.ApiApprovalClientUserPageRequest
;
import
com.yd.csf.feign.response.approval.ApiApprovalClientUserPageResponse
;
import
com.yd.csf.service.dto.AgentReferralRelationDto
;
import
com.yd.csf.service.model.AgentReferralRelation
;
import
com.yd.csf.service.service.IAgentReferralRelationService
;
import
com.yd.user.feign.client.clientuser.ApiClientUserFeignClient
;
import
com.yd.user.feign.request.clientuser.ApiClientUserPageRequest
;
import
com.yd.user.feign.response.clientuser.ApiClientUserPageResponse
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.stream.Collectors
;
@Service
public
class
ApiApprovalServiceImpl
implements
ApiApprovalService
{
@Autowired
private
ApiClientUserFeignClient
apiClientUserFeignClient
;
@Autowired
private
IAgentReferralRelationService
iAgentReferralRelationService
;
/**
* 审批列表-客户端用户信息
* @param request
* @return
*/
@Override
public
Result
<
IPage
<
ApiApprovalClientUserPageResponse
>>
approvalClientUserPage
(
ApiApprovalClientUserPageRequest
request
)
{
IPage
<
ApiApprovalClientUserPageResponse
>
iPage
=
new
Page
<
ApiApprovalClientUserPageResponse
>();
ApiClientUserPageRequest
pageRequest
=
new
ApiClientUserPageRequest
();
BeanUtils
.
copyProperties
(
request
,
pageRequest
);
//远程调用user服务查询客户端分页列表信息
Result
<
IPage
<
ApiClientUserPageResponse
>>
iPageResult
=
apiClientUserFeignClient
.
page
(
pageRequest
);
if
(!
Objects
.
isNull
(
iPageResult
.
getData
())
&&
!
CollectionUtils
.
isEmpty
(
iPageResult
.
getData
().
getRecords
()))
{
IPage
<
ApiClientUserPageResponse
>
clientUserPageResponseIPage
=
iPageResult
.
getData
();
List
<
ApiClientUserPageResponse
>
responses
=
clientUserPageResponseIPage
.
getRecords
();
List
<
ApiApprovalClientUserPageResponse
>
pageResponses
=
responses
.
stream
()
.
map
(
dto
->
{
ApiApprovalClientUserPageResponse
response
=
new
ApiApprovalClientUserPageResponse
();
BeanUtils
.
copyProperties
(
dto
,
response
);
return
response
;
}).
collect
(
Collectors
.
toList
());
//clientUserBizIdList -> 被推荐的客户端用户ID列表
List
<
String
>
clientUserBizIdList
=
responses
.
stream
()
.
map
(
ApiClientUserPageResponse:
:
getClientUserBizId
)
.
collect
(
Collectors
.
toList
());
//查询推荐关系列表数据
List
<
AgentReferralRelation
>
relations
=
iAgentReferralRelationService
.
queryList
(
AgentReferralRelationDto
.
builder
()
.
agentIdList
(
clientUserBizIdList
)
.
tenantBizId
(
request
.
getTenantBizId
())
.
projectBizId
(
request
.
getProjectBizId
())
.
build
());
if
(!
CollectionUtils
.
isEmpty
(
relations
))
{
pageResponses
.
stream
().
map
(
dto
->
{
AgentReferralRelation
relation
=
relations
.
stream
()
.
filter
(
rel
->
rel
.
getAgentId
().
equals
(
dto
.
getClientUserBizId
()))
.
findFirst
().
get
();
if
(!
Objects
.
isNull
(
relation
))
{
//推荐人账号(客户端用户表手机号,如果是PC,这里就是sys_user的用户名)
dto
.
setReferrerAccount
(
relation
.
getReferrerAccount
());
//推荐人ID(客户端用户表唯一业务ID,如果是PC,这里就是sys_user的用户ID)
dto
.
setReferrerId
(
relation
.
getReferrerId
());
//注册来源(PC、小程序等)默认小程序 - MINI_PROGRAM
dto
.
setRegisterSource
(
relation
.
getSource
());
}
return
dto
;
}).
collect
(
Collectors
.
toList
());
}
iPage
.
setRecords
(
pageResponses
);
iPage
.
setCurrent
(
clientUserPageResponseIPage
.
getCurrent
());
iPage
.
setPages
(
clientUserPageResponseIPage
.
getPages
());
iPage
.
setSize
(
clientUserPageResponseIPage
.
getSize
());
iPage
.
setTotal
(
clientUserPageResponseIPage
.
getTotal
());
}
return
Result
.
success
(
iPage
);
}
}
yd-csf-api/src/main/resources/bootstrap.yml
View file @
ded1c937
...
@@ -44,7 +44,7 @@ spring:
...
@@ -44,7 +44,7 @@ spring:
# 配置中心
# 配置中心
config
:
config
:
# 命名空间id(此处不用public,因public初始化的空间, id为空)
# 命名空间id(此处不用public,因public初始化的空间, id为空)
namespace
:
b3b01715-eb85-4242-992a-5aff03d864d4
namespace
:
8fbea9a4-b626-46de-a4e6-9d23f6609318
# nacos的ip地址和端口
# nacos的ip地址和端口
server-addr
:
139.224.145.34:8848
server-addr
:
139.224.145.34:8848
# 这个就表示 在我们nacos命名空间id为 dev中 有一个data-id 为 demo-service.yml 的配置文件 读取这个里面的配置
# 这个就表示 在我们nacos命名空间id为 dev中 有一个data-id 为 demo-service.yml 的配置文件 读取这个里面的配置
...
...
yd-csf-feign/src/main/java/com/yd/csf/feign/client/agentreferralrelation/ApiAgentReferralRelationFeignClient.java
0 → 100644
View file @
ded1c937
package
com
.
yd
.
csf
.
feign
.
client
.
agentreferralrelation
;
import
com.yd.common.result.Result
;
import
com.yd.csf.feign.fallback.agentreferralrelation.ApiAgentReferralRelationFeignFallbackFactory
;
import
com.yd.csf.feign.request.agentreferralrelation.ApiAgentReferralRelationSaveRequest
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
/**
* 香港保险服务-推荐关系信息Feign客户端
*/
@FeignClient
(
name
=
"yd-csf-api"
,
path
=
"/csf/api/agentReferralRelation"
,
fallbackFactory
=
ApiAgentReferralRelationFeignFallbackFactory
.
class
)
public
interface
ApiAgentReferralRelationFeignClient
{
/**
* 保存-推荐关系信息
* @param request
* @return
*/
@PostMapping
(
"/save"
)
Result
save
(
@Validated
@RequestBody
ApiAgentReferralRelationSaveRequest
request
);
}
yd-csf-feign/src/main/java/com/yd/csf/feign/client/approval/ApiApprovalFeignClient.java
0 → 100644
View file @
ded1c937
package
com
.
yd
.
csf
.
feign
.
client
.
approval
;
import
com.yd.common.result.Result
;
import
com.yd.csf.feign.fallback.approval.ApiApprovalFeignFallbackFactory
;
import
com.yd.csf.feign.request.approval.ApiApprovalClientUserPageRequest
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
/**
* 香港保险服务-审批信息Feign客户端
*/
@FeignClient
(
name
=
"yd-csf-api"
,
fallbackFactory
=
ApiApprovalFeignFallbackFactory
.
class
)
public
interface
ApiApprovalFeignClient
{
/**
* 审批列表-客户端用户信息
* @param request
* @return
*/
@PostMapping
(
"/client/user/page"
)
Result
approvalClientUserPage
(
@RequestBody
ApiApprovalClientUserPageRequest
request
);
}
yd-csf-feign/src/main/java/com/yd/csf/feign/fallback/agentreferralrelation/ApiAgentReferralRelationFeignFallbackFactory.java
0 → 100644
View file @
ded1c937
package
com
.
yd
.
csf
.
feign
.
fallback
.
agentreferralrelation
;
import
com.yd.common.result.Result
;
import
com.yd.csf.feign.client.agentreferralrelation.ApiAgentReferralRelationFeignClient
;
import
com.yd.csf.feign.request.agentreferralrelation.ApiAgentReferralRelationSaveRequest
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.cloud.openfeign.FallbackFactory
;
import
org.springframework.stereotype.Component
;
/**
* 香港保险服务-推荐关系信息Feign降级处理
*/
@Slf4j
@Component
public
class
ApiAgentReferralRelationFeignFallbackFactory
implements
FallbackFactory
<
ApiAgentReferralRelationFeignClient
>
{
@Override
public
ApiAgentReferralRelationFeignClient
create
(
Throwable
cause
)
{
return
new
ApiAgentReferralRelationFeignClient
()
{
@Override
public
Result
save
(
ApiAgentReferralRelationSaveRequest
request
)
{
return
null
;
}
};
}
}
yd-csf-feign/src/main/java/com/yd/csf/feign/fallback/approval/ApiApprovalFeignFallbackFactory.java
0 → 100644
View file @
ded1c937
package
com
.
yd
.
csf
.
feign
.
fallback
.
approval
;
import
com.yd.common.result.Result
;
import
com.yd.csf.feign.client.approval.ApiApprovalFeignClient
;
import
com.yd.csf.feign.request.approval.ApiApprovalClientUserPageRequest
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.cloud.openfeign.FallbackFactory
;
import
org.springframework.stereotype.Component
;
/**
* 香港保险服务-审批信息Feign降级处理
*/
@Slf4j
@Component
public
class
ApiApprovalFeignFallbackFactory
implements
FallbackFactory
<
ApiApprovalFeignClient
>
{
@Override
public
ApiApprovalFeignClient
create
(
Throwable
cause
)
{
return
new
ApiApprovalFeignClient
()
{
@Override
public
Result
approvalClientUserPage
(
ApiApprovalClientUserPageRequest
request
)
{
return
null
;
}
};
}
}
yd-csf-feign/src/main/java/com/yd/csf/feign/request/agentreferralrelation/ApiAgentReferralRelationSaveRequest.java
0 → 100644
View file @
ded1c937
package
com
.
yd
.
csf
.
feign
.
request
.
agentreferralrelation
;
import
lombok.Data
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotEmpty
;
import
java.util.List
;
@Data
public
class
ApiAgentReferralRelationSaveRequest
{
/**
* 所属租户唯一业务ID(冗余)
*/
private
String
tenantBizId
;
/**
* 所属项目唯一业务ID(冗余)
*/
private
String
projectBizId
;
/**
* 被推荐人ID(客户端用户表唯一业务ID)列表
*/
@NotEmpty
(
message
=
"被推荐人ID列表不能为空"
)
private
List
<
String
>
agentIdList
;
/**
* 推荐人ID(客户端用户表唯一业务ID,如果是PC,这里就是sys_user的用户ID)
*/
@NotBlank
(
message
=
"推荐人ID不能为空"
)
private
String
referrerId
;
/**
* 推荐人账号(客户端用户表手机号,如果是PC,这里就是sys_user的用户名)
*/
private
String
referrerAccount
;
/**
* 推荐来源(PC、小程序等,字典,PC就是中台加入申请的)
*/
@NotBlank
(
message
=
"推荐来源不能为空"
)
private
String
source
;
}
yd-csf-feign/src/main/java/com/yd/csf/feign/request/approval/ApiApprovalClientUserPageRequest.java
0 → 100644
View file @
ded1c937
package
com
.
yd
.
csf
.
feign
.
request
.
approval
;
import
com.yd.common.dto.PageDto
;
import
lombok.Data
;
@Data
public
class
ApiApprovalClientUserPageRequest
extends
PageDto
{
/**
* 所属租户唯一业务ID
*/
private
String
tenantBizId
;
/**
* 所属项目唯一业务ID
*/
private
String
projectBizId
;
/**
* 查询的内容(姓名/手机号/邮箱,支持模糊查询)
*/
private
String
queryContent
;
/**
* 审批状态
*/
private
String
approvalStatus
;
}
yd-csf-feign/src/main/java/com/yd/csf/feign/response/approval/ApiApprovalClientUserPageResponse.java
0 → 100644
View file @
ded1c937
package
com
.
yd
.
csf
.
feign
.
response
.
approval
;
import
lombok.Data
;
@Data
public
class
ApiApprovalClientUserPageResponse
{
/**
* 主键ID
*/
private
Long
id
;
/**
* 客户端用户表唯一业务ID
*/
private
String
clientUserBizId
;
/**
* 姓名
*/
private
String
name
;
/**
* 手机号
*/
private
String
phone
;
/**
* 邮箱
*/
private
String
email
;
/**
* 证件类型
*/
private
String
idCardType
;
/**
* 证件号码
*/
private
String
idCardNumber
;
/**
* 状态(0:停用 1:启用)
*/
private
Integer
status
;
/**
* 审批状态
*/
private
String
approvalStatus
;
/**
* 注册来源(PC、小程序等)默认小程序 - MINI_PROGRAM
*/
private
String
registerSource
;
/**
* 邀请码
*/
private
String
invitationCode
;
/**
* 推荐来源(PC、小程序等,字典,PC就是中台加入申请的)
*/
private
String
source
;
/**
* 推荐人ID(客户端用户表唯一业务ID,如果是PC,这里就是sys_user的用户ID)
*/
private
String
referrerId
;
/**
* 推荐人账号(客户端用户表手机号,如果是PC,这里就是sys_user的用户名)
*/
private
String
referrerAccount
;
}
yd-csf-service/src/main/java/com/yd/csf/service/dao/AgentManageRelationMapper.java
0 → 100644
View file @
ded1c937
package
com
.
yd
.
csf
.
service
.
dao
;
import
com.yd.csf.service.model.AgentManageRelation
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* <p>
* 管理关系表((团队的形成来自这张表,谁在最高级就是团长)) Mapper 接口
* </p>
*
* @author zxm
* @since 2025-10-21
*/
public
interface
AgentManageRelationMapper
extends
BaseMapper
<
AgentManageRelation
>
{
}
yd-csf-service/src/main/java/com/yd/csf/service/dto/AgentReferralRelationDto.java
0 → 100644
View file @
ded1c937
package
com
.
yd
.
csf
.
service
.
dto
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.util.List
;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
AgentReferralRelationDto
{
/**
* 被推荐人ID(客户端用户表唯一业务ID)列表
*/
private
List
<
String
>
agentIdList
;
/**
* 所属租户唯一业务ID(冗余)
*/
private
String
tenantBizId
;
/**
* 所属项目唯一业务ID(冗余)
*/
private
String
projectBizId
;
}
yd-csf-service/src/main/java/com/yd/csf/service/model/AgentAccumulatedFyc.java
View file @
ded1c937
...
@@ -32,7 +32,7 @@ public class AgentAccumulatedFyc implements Serializable {
...
@@ -32,7 +32,7 @@ public class AgentAccumulatedFyc implements Serializable {
private
Long
id
;
private
Long
id
;
/**
/**
* 业务员ID(
会员
唯一业务ID)
* 业务员ID(
客户端用户表
唯一业务ID)
*/
*/
@TableField
(
"agent_id"
)
@TableField
(
"agent_id"
)
private
String
agentId
;
private
String
agentId
;
...
...
yd-csf-service/src/main/java/com/yd/csf/service/model/AgentDetailFyc.java
View file @
ded1c937
...
@@ -32,7 +32,7 @@ public class AgentDetailFyc implements Serializable {
...
@@ -32,7 +32,7 @@ public class AgentDetailFyc implements Serializable {
private
Long
id
;
private
Long
id
;
/**
/**
* 业务员ID(
会员
唯一业务ID)
* 业务员ID(
客户端用户表
唯一业务ID)
*/
*/
@TableField
(
"agent_id"
)
@TableField
(
"agent_id"
)
private
String
agentId
;
private
String
agentId
;
...
@@ -50,7 +50,7 @@ public class AgentDetailFyc implements Serializable {
...
@@ -50,7 +50,7 @@ public class AgentDetailFyc implements Serializable {
private
String
policyBizId
;
private
String
policyBizId
;
/**
/**
* 积分提供者(
会员
唯一业务ID)
* 积分提供者(
客户端用户表
唯一业务ID)
*/
*/
@TableField
(
"provide_id"
)
@TableField
(
"provide_id"
)
private
String
provideId
;
private
String
provideId
;
...
...
yd-csf-service/src/main/java/com/yd/csf/service/model/AgentManageRelation.java
0 → 100644
View file @
ded1c937
package
com
.
yd
.
csf
.
service
.
model
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
import
lombok.Getter
;
import
lombok.Setter
;
/**
* <p>
* 管理关系表((团队的形成来自这张表,谁在最高级就是团长))
* </p>
*
* @author zxm
* @since 2025-10-21
*/
@Getter
@Setter
@TableName
(
"agent_manage_relation"
)
public
class
AgentManageRelation
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键ID
*/
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Long
id
;
/**
* 管理关系表唯一业务ID
*/
@TableField
(
"manage_biz_id"
)
private
String
manageBizId
;
/**
* 被管理人ID(客户端用户表唯一业务ID)
*/
@TableField
(
"agent_id"
)
private
String
agentId
;
/**
* 管理人ID(客户端用户表唯一业务ID,是被管理人的一级管理人)
*/
@TableField
(
"manage_id"
)
private
String
manageId
;
/**
* 管理路径(用于快速查询关系链)
*/
@TableField
(
"manage_path"
)
private
String
managePath
;
/**
* 是否有效(0:否 1:是)
*/
@TableField
(
"is_active"
)
private
Integer
isActive
;
/**
* 所属租户唯一业务ID(冗余)
*/
@TableField
(
"tenant_biz_id"
)
private
String
tenantBizId
;
/**
* 所属项目唯一业务ID(冗余)
*/
@TableField
(
"project_biz_id"
)
private
String
projectBizId
;
/**
* 通用备注
*/
@TableField
(
"remark"
)
private
String
remark
;
/**
* 删除标识: 0-正常, 1-删除
*/
@TableField
(
"is_deleted"
)
private
Integer
isDeleted
;
/**
* 创建人ID
*/
@TableField
(
"creator_id"
)
private
String
creatorId
;
/**
* 更新人ID
*/
@TableField
(
"updater_id"
)
private
String
updaterId
;
/**
* 创建时间
*/
@TableField
(
"create_time"
)
private
LocalDateTime
createTime
;
/**
* 更新时间
*/
@TableField
(
"update_time"
)
private
LocalDateTime
updateTime
;
}
yd-csf-service/src/main/java/com/yd/csf/service/model/AgentReferralRelation.java
View file @
ded1c937
...
@@ -37,18 +37,24 @@ public class AgentReferralRelation implements Serializable {
...
@@ -37,18 +37,24 @@ public class AgentReferralRelation implements Serializable {
private
String
referralBizId
;
private
String
referralBizId
;
/**
/**
* 被推荐人ID(
会员
唯一业务ID)
* 被推荐人ID(
客户端用户表
唯一业务ID)
*/
*/
@TableField
(
"agent_id"
)
@TableField
(
"agent_id"
)
private
String
agentId
;
private
String
agentId
;
/**
/**
* 推荐人ID(
会员唯一业务
ID)
* 推荐人ID(
客户端用户表唯一业务ID,如果是PC,这里就是sys_user的用户
ID)
*/
*/
@TableField
(
"referrer_id"
)
@TableField
(
"referrer_id"
)
private
String
referrerId
;
private
String
referrerId
;
/**
/**
* 推荐人账号(客户端用户表手机号,如果是PC,这里就是sys_user的用户名)
*/
@TableField
(
"referrer_account"
)
private
String
referrerAccount
;
/**
* 推荐路径(用于快速查询关系链)
* 推荐路径(用于快速查询关系链)
*/
*/
@TableField
(
"referral_path"
)
@TableField
(
"referral_path"
)
...
@@ -61,6 +67,12 @@ public class AgentReferralRelation implements Serializable {
...
@@ -61,6 +67,12 @@ public class AgentReferralRelation implements Serializable {
private
Integer
isActive
;
private
Integer
isActive
;
/**
/**
* 推荐来源(PC、小程序等,字典,PC就是中台加入申请的)
*/
@TableField
(
"source"
)
private
String
source
;
/**
* 所属租户唯一业务ID(冗余)
* 所属租户唯一业务ID(冗余)
*/
*/
@TableField
(
"tenant_biz_id"
)
@TableField
(
"tenant_biz_id"
)
...
...
yd-csf-service/src/main/java/com/yd/csf/service/model/AgentTutoringRelation.java
View file @
ded1c937
...
@@ -37,13 +37,13 @@ public class AgentTutoringRelation implements Serializable {
...
@@ -37,13 +37,13 @@ public class AgentTutoringRelation implements Serializable {
private
String
tutoringBizId
;
private
String
tutoringBizId
;
/**
/**
* 被辅导人ID(
会员
唯一业务ID)
* 被辅导人ID(
客户端用户表
唯一业务ID)
*/
*/
@TableField
(
"agent_id"
)
@TableField
(
"agent_id"
)
private
String
agentId
;
private
String
agentId
;
/**
/**
* 辅导员ID(
会员
唯一业务ID)
* 辅导员ID(
客户端用户表
唯一业务ID)
*/
*/
@TableField
(
"tutor_id"
)
@TableField
(
"tutor_id"
)
private
String
tutorId
;
private
String
tutorId
;
...
...
yd-csf-service/src/main/java/com/yd/csf/service/model/CarApply.java
View file @
ded1c937
...
@@ -43,7 +43,7 @@ public class CarApply implements Serializable {
...
@@ -43,7 +43,7 @@ public class CarApply implements Serializable {
private
String
appointmentBizId
;
private
String
appointmentBizId
;
/**
/**
*
会员
唯一业务ID(业务员)
*
客户端用户表
唯一业务ID(业务员)
*/
*/
@TableField
(
"member_biz_id"
)
@TableField
(
"member_biz_id"
)
private
String
memberBizId
;
private
String
memberBizId
;
...
...
yd-csf-service/src/main/java/com/yd/csf/service/model/CommissionResult.java
View file @
ded1c937
...
@@ -44,7 +44,7 @@ public class CommissionResult implements Serializable {
...
@@ -44,7 +44,7 @@ public class CommissionResult implements Serializable {
private
String
policyBizId
;
private
String
policyBizId
;
/**
/**
* 业务员ID(
会员
唯一业务ID)
* 业务员ID(
客户端用户表
唯一业务ID)
*/
*/
@TableField
(
"agent_id"
)
@TableField
(
"agent_id"
)
private
String
agentId
;
private
String
agentId
;
...
...
yd-csf-service/src/main/java/com/yd/csf/service/model/FycTask.java
View file @
ded1c937
...
@@ -37,7 +37,7 @@ public class FycTask implements Serializable {
...
@@ -37,7 +37,7 @@ public class FycTask implements Serializable {
private
String
fycTaskBizId
;
private
String
fycTaskBizId
;
/**
/**
* 业务员ID(
会员
唯一业务ID)
* 业务员ID(
客户端用户表
唯一业务ID)
*/
*/
@TableField
(
"agent_id"
)
@TableField
(
"agent_id"
)
private
String
agentId
;
private
String
agentId
;
...
...
yd-csf-service/src/main/java/com/yd/csf/service/model/Invitation.java
View file @
ded1c937
...
@@ -43,13 +43,13 @@ public class Invitation implements Serializable {
...
@@ -43,13 +43,13 @@ public class Invitation implements Serializable {
private
String
invitationType
;
private
String
invitationType
;
/**
/**
* 邀请人(
会员
唯一业务ID)
* 邀请人(
客户端用户表
唯一业务ID)
*/
*/
@TableField
(
"inviter"
)
@TableField
(
"inviter"
)
private
String
inviter
;
private
String
inviter
;
/**
/**
* 被邀请人(
会员
唯一业务ID)
* 被邀请人(
客户端用户表
唯一业务ID)
*/
*/
@TableField
(
"invitee"
)
@TableField
(
"invitee"
)
private
String
invitee
;
private
String
invitee
;
...
...
yd-csf-service/src/main/java/com/yd/csf/service/model/Member.java
View file @
ded1c937
...
@@ -31,7 +31,7 @@ public class Member implements Serializable {
...
@@ -31,7 +31,7 @@ public class Member implements Serializable {
private
Long
id
;
private
Long
id
;
/**
/**
*
会员
唯一业务ID
*
客户端用户表
唯一业务ID
*/
*/
@TableField
(
"member_biz_id"
)
@TableField
(
"member_biz_id"
)
private
String
memberBizId
;
private
String
memberBizId
;
...
...
yd-csf-service/src/main/java/com/yd/csf/service/model/PolicyAgentRelation.java
View file @
ded1c937
...
@@ -37,7 +37,7 @@ public class PolicyAgentRelation implements Serializable {
...
@@ -37,7 +37,7 @@ public class PolicyAgentRelation implements Serializable {
private
String
policyBizId
;
private
String
policyBizId
;
/**
/**
* 业务员ID(
会员
唯一业务ID)
* 业务员ID(
客户端用户表
唯一业务ID)
*/
*/
@TableField
(
"agent_id"
)
@TableField
(
"agent_id"
)
private
String
agentId
;
private
String
agentId
;
...
...
yd-csf-service/src/main/java/com/yd/csf/service/model/RelAgentCustomer.java
View file @
ded1c937
...
@@ -37,7 +37,7 @@ public class RelAgentCustomer implements Serializable {
...
@@ -37,7 +37,7 @@ public class RelAgentCustomer implements Serializable {
private
String
customerBizId
;
private
String
customerBizId
;
/**
/**
* 业务员ID(
会员
唯一业务ID)
* 业务员ID(
客户端用户表
唯一业务ID)
*/
*/
@TableField
(
"agent_id"
)
@TableField
(
"agent_id"
)
private
String
agentId
;
private
String
agentId
;
...
...
yd-csf-service/src/main/java/com/yd/csf/service/model/RelMemberRole.java
View file @
ded1c937
...
@@ -31,7 +31,7 @@ public class RelMemberRole implements Serializable {
...
@@ -31,7 +31,7 @@ public class RelMemberRole implements Serializable {
private
Long
id
;
private
Long
id
;
/**
/**
*
会员
唯一业务ID
*
客户端用户表
唯一业务ID
*/
*/
@TableField
(
"member_biz_id"
)
@TableField
(
"member_biz_id"
)
private
String
memberBizId
;
private
String
memberBizId
;
...
...
yd-csf-service/src/main/java/com/yd/csf/service/model/RelTeamMember.java
View file @
ded1c937
...
@@ -37,7 +37,7 @@ public class RelTeamMember implements Serializable {
...
@@ -37,7 +37,7 @@ public class RelTeamMember implements Serializable {
private
String
teamBizId
;
private
String
teamBizId
;
/**
/**
*
会员
唯一业务ID
*
客户端用户表
唯一业务ID
*/
*/
@TableField
(
"member_biz_id"
)
@TableField
(
"member_biz_id"
)
private
String
memberBizId
;
private
String
memberBizId
;
...
...
yd-csf-service/src/main/java/com/yd/csf/service/model/Team.java
View file @
ded1c937
...
@@ -49,7 +49,7 @@ public class Team implements Serializable {
...
@@ -49,7 +49,7 @@ public class Team implements Serializable {
private
String
teamName
;
private
String
teamName
;
/**
/**
* 团队长ID(
会员
唯一业务ID)
* 团队长ID(
客户端用户表
唯一业务ID)
*/
*/
@TableField
(
"team_leader_id"
)
@TableField
(
"team_leader_id"
)
private
Long
teamLeaderId
;
private
Long
teamLeaderId
;
...
...
yd-csf-service/src/main/java/com/yd/csf/service/service/IAgentManageRelationService.java
0 → 100644
View file @
ded1c937
package
com
.
yd
.
csf
.
service
.
service
;
import
com.yd.csf.service.model.AgentManageRelation
;
import
com.baomidou.mybatisplus.extension.service.IService
;
/**
* <p>
* 管理关系表((团队的形成来自这张表,谁在最高级就是团长)) 服务类
* </p>
*
* @author zxm
* @since 2025-10-21
*/
public
interface
IAgentManageRelationService
extends
IService
<
AgentManageRelation
>
{
}
yd-csf-service/src/main/java/com/yd/csf/service/service/IAgentReferralRelationService.java
View file @
ded1c937
package
com
.
yd
.
csf
.
service
.
service
;
package
com
.
yd
.
csf
.
service
.
service
;
import
com.yd.csf.service.dto.AgentReferralRelationDto
;
import
com.yd.csf.service.model.AgentReferralRelation
;
import
com.yd.csf.service.model.AgentReferralRelation
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
java.util.List
;
/**
/**
* <p>
* <p>
* 推荐关系表 服务类
* 推荐关系表 服务类
...
@@ -13,4 +16,9 @@ import com.baomidou.mybatisplus.extension.service.IService;
...
@@ -13,4 +16,9 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
*/
public
interface
IAgentReferralRelationService
extends
IService
<
AgentReferralRelation
>
{
public
interface
IAgentReferralRelationService
extends
IService
<
AgentReferralRelation
>
{
List
<
AgentReferralRelation
>
queryList
(
AgentReferralRelationDto
dto
);
Boolean
del
(
String
agentId
,
String
referrerId
);
Boolean
del
(
List
<
String
>
agentIdList
,
String
referrerId
);
}
}
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/AgentManageRelationServiceImpl.java
0 → 100644
View file @
ded1c937
package
com
.
yd
.
csf
.
service
.
service
.
impl
;
import
com.yd.csf.service.model.AgentManageRelation
;
import
com.yd.csf.service.dao.AgentManageRelationMapper
;
import
com.yd.csf.service.service.IAgentManageRelationService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.springframework.stereotype.Service
;
/**
* <p>
* 管理关系表((团队的形成来自这张表,谁在最高级就是团长)) 服务实现类
* </p>
*
* @author zxm
* @since 2025-10-21
*/
@Service
public
class
AgentManageRelationServiceImpl
extends
ServiceImpl
<
AgentManageRelationMapper
,
AgentManageRelation
>
implements
IAgentManageRelationService
{
}
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/AgentReferralRelationServiceImpl.java
View file @
ded1c937
package
com
.
yd
.
csf
.
service
.
service
.
impl
;
package
com
.
yd
.
csf
.
service
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yd.csf.service.dto.AgentReferralRelationDto
;
import
com.yd.csf.service.model.AgentReferralRelation
;
import
com.yd.csf.service.model.AgentReferralRelation
;
import
com.yd.csf.service.dao.AgentReferralRelationMapper
;
import
com.yd.csf.service.dao.AgentReferralRelationMapper
;
import
com.yd.csf.service.model.AppointmentFile
;
import
com.yd.csf.service.service.IAgentReferralRelationService
;
import
com.yd.csf.service.service.IAgentReferralRelationService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
java.util.List
;
/**
/**
* <p>
* <p>
...
@@ -17,4 +24,47 @@ import org.springframework.stereotype.Service;
...
@@ -17,4 +24,47 @@ import org.springframework.stereotype.Service;
@Service
@Service
public
class
AgentReferralRelationServiceImpl
extends
ServiceImpl
<
AgentReferralRelationMapper
,
AgentReferralRelation
>
implements
IAgentReferralRelationService
{
public
class
AgentReferralRelationServiceImpl
extends
ServiceImpl
<
AgentReferralRelationMapper
,
AgentReferralRelation
>
implements
IAgentReferralRelationService
{
/**
* 查询列表
* @param dto
* @return
*/
@Override
public
List
<
AgentReferralRelation
>
queryList
(
AgentReferralRelationDto
dto
)
{
List
<
AgentReferralRelation
>
list
=
baseMapper
.
selectList
(
new
LambdaQueryWrapper
<
AgentReferralRelation
>()
.
eq
(
StringUtils
.
isNotBlank
(
dto
.
getTenantBizId
()),
AgentReferralRelation:
:
getTenantBizId
,
dto
.
getTenantBizId
())
.
eq
(
StringUtils
.
isNotBlank
(
dto
.
getProjectBizId
()),
AgentReferralRelation:
:
getProjectBizId
,
dto
.
getProjectBizId
())
.
in
(!
CollectionUtils
.
isEmpty
(
dto
.
getAgentIdList
()),
AgentReferralRelation:
:
getAgentId
,
dto
.
getAgentIdList
())
);
return
list
;
}
/**
* 删除关系
* @param agentId
* @param referrerId
* @return
*/
@Override
public
Boolean
del
(
String
agentId
,
String
referrerId
)
{
return
this
.
remove
(
new
LambdaQueryWrapper
<
AgentReferralRelation
>()
.
eq
(
AgentReferralRelation:
:
getAgentId
,
agentId
)
.
eq
(
AgentReferralRelation:
:
getReferrerId
,
referrerId
)
);
}
/**
* 删除关系
* @param agentIdList
* @param referrerId
* @return
*/
@Override
public
Boolean
del
(
List
<
String
>
agentIdList
,
String
referrerId
)
{
return
this
.
remove
(
new
LambdaQueryWrapper
<
AgentReferralRelation
>()
.
eq
(
AgentReferralRelation:
:
getReferrerId
,
referrerId
)
.
in
(
AgentReferralRelation:
:
getAgentId
,
agentIdList
)
);
}
}
}
yd-csf-service/src/main/java/com/yd/csf/service/utils/MyBatisPlusCodeGenerator.java
View file @
ded1c937
...
@@ -8,8 +8,8 @@ public class MyBatisPlusCodeGenerator {
...
@@ -8,8 +8,8 @@ public class MyBatisPlusCodeGenerator {
FastAutoGenerator
.
create
(
"jdbc:mysql://localhost:3306/yd_csf?serverTimezone=GMT%2B8"
,
"root"
,
"123456"
)
FastAutoGenerator
.
create
(
"jdbc:mysql://localhost:3306/yd_csf?serverTimezone=GMT%2B8"
,
"root"
,
"123456"
)
.
globalConfig
(
builder
->
{
.
globalConfig
(
builder
->
{
builder
.
author
(
"zxm"
)
builder
.
author
(
"zxm"
)
.
outputDir
(
"src/main/java/com/yd/csf/service"
);
//
.outputDir("src/main/java/com/yd/csf/service");
//
.outputDir("D:/soft/ideaproject/v2/yd-csf/yd-csf-service/src/main/java");
.
outputDir
(
"D:/soft/ideaproject/v2/yd-csf/yd-csf-service/src/main/java"
);
})
})
.
packageConfig
(
builder
->
{
.
packageConfig
(
builder
->
{
builder
.
parent
(
"com.yd.csf.service"
)
builder
.
parent
(
"com.yd.csf.service"
)
...
@@ -21,7 +21,7 @@ public class MyBatisPlusCodeGenerator {
...
@@ -21,7 +21,7 @@ public class MyBatisPlusCodeGenerator {
})
})
.
strategyConfig
(
builder
->
{
.
strategyConfig
(
builder
->
{
builder
.
addInclude
(
builder
.
addInclude
(
"
condition_type
"
"
agent_manage_relation
"
)
)
.
entityBuilder
()
.
entityBuilder
()
...
...
yd-csf-service/src/main/resources/mappers/AgentManageRelationMapper.xml
0 → 100644
View file @
ded1c937
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yd.csf.service.dao.AgentManageRelationMapper"
>
</mapper>
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