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
f9ee0fb4
Commit
f9ee0fb4
authored
Mar 18, 2026
by
zhangxingmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push
parent
a9b0d89c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
2 deletions
+7
-2
yd-csf-api/src/main/java/com/yd/csf/api/controller/ApiCustomerController.java
+3
-2
yd-csf-service/src/main/java/com/yd/csf/service/dto/CustomerAddRequest.java
+2
-0
yd-csf-service/src/main/java/com/yd/csf/service/dto/CustomerUpdateRequest.java
+2
-0
No files found.
yd-csf-api/src/main/java/com/yd/csf/api/controller/ApiCustomerController.java
View file @
f9ee0fb4
...
@@ -23,6 +23,7 @@ import io.swagger.v3.oas.annotations.Operation;
...
@@ -23,6 +23,7 @@ import io.swagger.v3.oas.annotations.Operation;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
...
@@ -58,7 +59,7 @@ public class ApiCustomerController {
...
@@ -58,7 +59,7 @@ public class ApiCustomerController {
*/
*/
@Operation
(
summary
=
"创建客户"
)
@Operation
(
summary
=
"创建客户"
)
@PostMapping
(
"/add"
)
@PostMapping
(
"/add"
)
public
Result
<
Map
<
String
,
Object
>>
addCustomer
(
@RequestBody
CustomerAddRequest
customerAddRequest
,
HttpServletRequest
request
)
{
public
Result
<
Map
<
String
,
Object
>>
addCustomer
(
@
Validated
@
RequestBody
CustomerAddRequest
customerAddRequest
,
HttpServletRequest
request
)
{
if
(
customerAddRequest
==
null
)
{
if
(
customerAddRequest
==
null
)
{
return
Result
.
fail
(
ResultCode
.
PARAMS_ERROR
.
getCode
(),
ResultCode
.
PARAMS_ERROR
.
getMessage
());
return
Result
.
fail
(
ResultCode
.
PARAMS_ERROR
.
getCode
(),
ResultCode
.
PARAMS_ERROR
.
getMessage
());
}
}
...
@@ -134,7 +135,7 @@ public class ApiCustomerController {
...
@@ -134,7 +135,7 @@ public class ApiCustomerController {
*/
*/
@PostMapping
(
"/update"
)
@PostMapping
(
"/update"
)
@Operation
(
summary
=
"更新客户信息"
)
@Operation
(
summary
=
"更新客户信息"
)
public
Result
<
Boolean
>
updateCustomer
(
@RequestBody
CustomerUpdateRequest
customerUpdateRequest
)
{
public
Result
<
Boolean
>
updateCustomer
(
@
Validated
@
RequestBody
CustomerUpdateRequest
customerUpdateRequest
)
{
String
customerBizId
=
customerUpdateRequest
.
getCustomerBizId
();
String
customerBizId
=
customerUpdateRequest
.
getCustomerBizId
();
if
(
ObjectUtils
.
isEmpty
(
customerBizId
))
{
if
(
ObjectUtils
.
isEmpty
(
customerBizId
))
{
throw
new
BusinessException
(
ResultCode
.
PARAMS_ERROR
.
getCode
(),
"customerBizId不能为空"
);
throw
new
BusinessException
(
ResultCode
.
PARAMS_ERROR
.
getCode
(),
"customerBizId不能为空"
);
...
...
yd-csf-service/src/main/java/com/yd/csf/service/dto/CustomerAddRequest.java
View file @
f9ee0fb4
...
@@ -5,6 +5,7 @@ import com.yd.csf.service.vo.AddressVO;
...
@@ -5,6 +5,7 @@ import com.yd.csf.service.vo.AddressVO;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.Data
;
import
javax.validation.constraints.Pattern
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -25,6 +26,7 @@ public class CustomerAddRequest implements Serializable {
...
@@ -25,6 +26,7 @@ public class CustomerAddRequest implements Serializable {
* 姓名-中文
* 姓名-中文
*/
*/
@Schema
(
description
=
"姓名-中文"
)
@Schema
(
description
=
"姓名-中文"
)
@Pattern
(
regexp
=
"^(|[\u4e00-\u9fa5]{2,6})$"
,
message
=
"投保人-姓名(中文)必须为2-6位汉字"
)
private
String
nameCn
;
private
String
nameCn
;
/**
/**
...
...
yd-csf-service/src/main/java/com/yd/csf/service/dto/CustomerUpdateRequest.java
View file @
f9ee0fb4
...
@@ -5,6 +5,7 @@ import com.yd.csf.service.vo.AddressVO;
...
@@ -5,6 +5,7 @@ import com.yd.csf.service.vo.AddressVO;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.Data
;
import
javax.validation.constraints.Pattern
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -32,6 +33,7 @@ public class CustomerUpdateRequest implements Serializable {
...
@@ -32,6 +33,7 @@ public class CustomerUpdateRequest implements Serializable {
* 姓名-中文
* 姓名-中文
*/
*/
@Schema
(
description
=
"姓名-中文"
)
@Schema
(
description
=
"姓名-中文"
)
@Pattern
(
regexp
=
"^(|[\u4e00-\u9fa5]{2,6})$"
,
message
=
"投保人-姓名(中文)必须为2-6位汉字"
)
private
String
nameCn
;
private
String
nameCn
;
/**
/**
...
...
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