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
f7d27af3
Commit
f7d27af3
authored
Nov 19, 2025
by
zhangxingmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查询保单是否生成过预计发佣
parent
711ee010
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
60 additions
and
0 deletions
+60
-0
yd-csf-api/src/main/java/com/yd/csf/api/controller/ApiExpectedFortuneController.java
+12
-0
yd-csf-api/src/main/java/com/yd/csf/api/service/ApiExpectedFortuneService.java
+2
-0
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiExpectedFortuneServiceImpl.java
+14
-0
yd-csf-feign/src/main/java/com/yd/csf/feign/client/expectedfortune/ApiExpectedFortuneFeignClient.java
+12
-0
yd-csf-feign/src/main/java/com/yd/csf/feign/fallback/expectedfortune/ApiExpectedFortuneFeignFallbackFactory.java
+7
-0
yd-csf-service/src/main/java/com/yd/csf/service/service/IExpectedFortuneService.java
+2
-0
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/ExpectedFortuneServiceImpl.java
+11
-0
No files found.
yd-csf-api/src/main/java/com/yd/csf/api/controller/ApiExpectedFortuneController.java
View file @
f7d27af3
...
@@ -13,6 +13,8 @@ import org.springframework.validation.annotation.Validated;
...
@@ -13,6 +13,8 @@ import org.springframework.validation.annotation.Validated;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.validation.constraints.NotBlank
;
/**
/**
* 预计发佣信息
* 预计发佣信息
*
*
...
@@ -46,4 +48,14 @@ public class ApiExpectedFortuneController implements ApiExpectedFortuneFeignClie
...
@@ -46,4 +48,14 @@ public class ApiExpectedFortuneController implements ApiExpectedFortuneFeignClie
public
Result
<
IPage
<
ApiExpectedFortunePageResponse
>>
page
(
ApiExpectedFortunePageRequest
request
)
{
public
Result
<
IPage
<
ApiExpectedFortunePageResponse
>>
page
(
ApiExpectedFortunePageRequest
request
)
{
return
apiExpectedFortuneService
.
page
(
request
);
return
apiExpectedFortuneService
.
page
(
request
);
}
}
/**
* 查询保单是否生成过预计发佣
* @param policyNo
* @return
*/
@Override
public
Result
<
Boolean
>
isGenerate
(
String
policyNo
)
{
return
apiExpectedFortuneService
.
isGenerate
(
policyNo
);
}
}
}
yd-csf-api/src/main/java/com/yd/csf/api/service/ApiExpectedFortuneService.java
View file @
f7d27af3
...
@@ -11,4 +11,6 @@ public interface ApiExpectedFortuneService {
...
@@ -11,4 +11,6 @@ public interface ApiExpectedFortuneService {
Result
<
ApiGenerateExpectedFortuneResponse
>
generate
(
ApiGenerateExpectedFortuneRequest
request
);
Result
<
ApiGenerateExpectedFortuneResponse
>
generate
(
ApiGenerateExpectedFortuneRequest
request
);
Result
<
IPage
<
ApiExpectedFortunePageResponse
>>
page
(
ApiExpectedFortunePageRequest
request
);
Result
<
IPage
<
ApiExpectedFortunePageResponse
>>
page
(
ApiExpectedFortunePageRequest
request
);
Result
<
Boolean
>
isGenerate
(
String
policyNo
);
}
}
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiExpectedFortuneServiceImpl.java
View file @
f7d27af3
...
@@ -293,4 +293,18 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
...
@@ -293,4 +293,18 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
IPage
<
ApiExpectedFortunePageResponse
>
iPage
=
iExpectedFortuneService
.
page
(
page
,
request
);
IPage
<
ApiExpectedFortunePageResponse
>
iPage
=
iExpectedFortuneService
.
page
(
page
,
request
);
return
Result
.
success
(
iPage
);
return
Result
.
success
(
iPage
);
}
}
/**
* 查询保单是否生成过预计发佣
* @param policyNo
* @return
*/
@Override
public
Result
<
Boolean
>
isGenerate
(
String
policyNo
)
{
List
<
ExpectedFortune
>
list
=
iExpectedFortuneService
.
queryList
(
policyNo
);
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
throw
new
BusinessException
(
"当前保单已经生成过预计发佣数据,无需再次生成"
);
}
return
Result
.
success
();
}
}
}
yd-csf-feign/src/main/java/com/yd/csf/feign/client/expectedfortune/ApiExpectedFortuneFeignClient.java
View file @
f7d27af3
...
@@ -7,8 +7,12 @@ import com.yd.csf.feign.request.expectedfortune.ApiExpectedFortunePageRequest;
...
@@ -7,8 +7,12 @@ import com.yd.csf.feign.request.expectedfortune.ApiExpectedFortunePageRequest;
import
com.yd.csf.feign.response.expectedfortune.ApiGenerateExpectedFortuneResponse
;
import
com.yd.csf.feign.response.expectedfortune.ApiGenerateExpectedFortuneResponse
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
javax.validation.constraints.NotBlank
;
/**
/**
* 香港保险服务-预计发佣信息Feign客户端
* 香港保险服务-预计发佣信息Feign客户端
...
@@ -31,4 +35,12 @@ public interface ApiExpectedFortuneFeignClient {
...
@@ -31,4 +35,12 @@ public interface ApiExpectedFortuneFeignClient {
*/
*/
@PostMapping
(
"/page"
)
@PostMapping
(
"/page"
)
Result
page
(
@RequestBody
ApiExpectedFortunePageRequest
request
);
Result
page
(
@RequestBody
ApiExpectedFortunePageRequest
request
);
/**
* 查询保单是否生成过预计发佣
* @param policyNo
* @return
*/
@GetMapping
(
"/isGenerate"
)
Result
<
Boolean
>
isGenerate
(
@NotBlank
(
message
=
"保单号不能为空"
)
@RequestParam
(
value
=
"policyNo"
)
String
policyNo
);
}
}
yd-csf-feign/src/main/java/com/yd/csf/feign/fallback/expectedfortune/ApiExpectedFortuneFeignFallbackFactory.java
View file @
f7d27af3
...
@@ -9,6 +9,8 @@ import lombok.extern.slf4j.Slf4j;
...
@@ -9,6 +9,8 @@ import lombok.extern.slf4j.Slf4j;
import
org.springframework.cloud.openfeign.FallbackFactory
;
import
org.springframework.cloud.openfeign.FallbackFactory
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
javax.validation.constraints.NotBlank
;
/**
/**
* 香港保险服务-预计发佣信息Feign降级处理
* 香港保险服务-预计发佣信息Feign降级处理
*/
*/
...
@@ -27,6 +29,11 @@ public class ApiExpectedFortuneFeignFallbackFactory implements FallbackFactory<A
...
@@ -27,6 +29,11 @@ public class ApiExpectedFortuneFeignFallbackFactory implements FallbackFactory<A
public
Result
page
(
ApiExpectedFortunePageRequest
request
)
{
public
Result
page
(
ApiExpectedFortunePageRequest
request
)
{
return
null
;
return
null
;
}
}
@Override
public
Result
<
Boolean
>
isGenerate
(
String
policyNo
)
{
return
null
;
}
};
};
}
}
}
}
yd-csf-service/src/main/java/com/yd/csf/service/service/IExpectedFortuneService.java
View file @
f7d27af3
...
@@ -23,4 +23,6 @@ public interface IExpectedFortuneService extends IService<ExpectedFortune> {
...
@@ -23,4 +23,6 @@ public interface IExpectedFortuneService extends IService<ExpectedFortune> {
ApiExpectedFortunePageRequest
request
);
ApiExpectedFortunePageRequest
request
);
List
<
ExpectedFortune
>
listByPolicyBizId
(
String
policyBizId
);
List
<
ExpectedFortune
>
listByPolicyBizId
(
String
policyBizId
);
List
<
ExpectedFortune
>
queryList
(
String
policyNo
);
}
}
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/ExpectedFortuneServiceImpl.java
View file @
f7d27af3
package
com
.
yd
.
csf
.
service
.
service
.
impl
;
package
com
.
yd
.
csf
.
service
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yd.csf.feign.request.expectedfortune.ApiExpectedFortunePageRequest
;
import
com.yd.csf.feign.request.expectedfortune.ApiExpectedFortunePageRequest
;
...
@@ -35,4 +36,14 @@ public class ExpectedFortuneServiceImpl extends ServiceImpl<ExpectedFortuneMappe
...
@@ -35,4 +36,14 @@ public class ExpectedFortuneServiceImpl extends ServiceImpl<ExpectedFortuneMappe
public
List
<
ExpectedFortune
>
listByPolicyBizId
(
String
policyBizId
)
{
public
List
<
ExpectedFortune
>
listByPolicyBizId
(
String
policyBizId
)
{
return
baseMapper
.
listByPolicyBizId
(
policyBizId
);
return
baseMapper
.
listByPolicyBizId
(
policyBizId
);
}
}
/**
* 查询列表
* @param policyNo
* @return
*/
@Override
public
List
<
ExpectedFortune
>
queryList
(
String
policyNo
)
{
return
baseMapper
.
selectList
(
new
LambdaQueryWrapper
<
ExpectedFortune
>().
eq
(
ExpectedFortune:
:
getPolicyNo
,
policyNo
));
}
}
}
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