Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
聂康
local-rnr-fp
Commits
015d4257
Commit
015d4257
authored
Jun 17, 2025
by
kang.nie@inzymeits.com
Browse files
初始化代码
parent
bd38ff8b
Pipeline
#3108
failed with stages
in 0 seconds
Changes
404
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
local-rnr-fp-server/src/main/java/com/cusc/nirvana/user/rnr/fp/config/ThreadPoolExecutorConfig.java
0 → 100644
View file @
015d4257
package
com.cusc.nirvana.user.rnr.fp.config
;
import
com.google.common.util.concurrent.ThreadFactoryBuilder
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
java.util.concurrent.*
;
/**
* @program: workspace-rnr-new
* @description:
* @author: lig131
* @create: 2022-05-20 18:06
**/
@Configuration
@Slf4j
public
class
ThreadPoolExecutorConfig
{
@Value
(
"${rnr.image.watermark.threadpool.createWaterMark.size:5}"
)
private
int
textWaterMarkThreadPoolSize4createWaterMark
;
@Value
(
"${rnr.image.watermark.threadpool.createWaterMark.queueSize:1000}"
)
private
int
textWaterMarkThreadPoolQueueSize4createWaterMark
;
@Value
(
"${rnr.image.watermark.threadpool.removeTemp.size:5}"
)
private
int
textWaterMarkThreadPoolSize4RemoveTemp
;
@Value
(
"${rnr.image.watermark.threadpool.removeTemp.queue.size:1000}"
)
private
int
textWaterMarkThreadPoolQueueSize4RemoveTemp
;
/**
* 文字水印线程池
*/
@Bean
(
name
=
"textWaterMarkThreadPool4createWaterMark"
)
public
ExecutorService
getTextWaterMarkThreadPoolTaskServiceExecutor
()
{
log
.
info
(
"textWaterMarkThreadPool4createWaterMark线程池开始初始化,线程池中线程数:{}"
,
textWaterMarkThreadPoolSize4createWaterMark
);
ThreadFactory
threadFactory
=
new
ThreadFactoryBuilder
().
setNameFormat
(
"textWaterMarkThreadPool4createWaterMark-%d"
).
build
();
return
new
ThreadPoolExecutor
(
textWaterMarkThreadPoolSize4createWaterMark
,
textWaterMarkThreadPoolSize4createWaterMark
,
0L
,
TimeUnit
.
SECONDS
,
new
LinkedBlockingDeque
<>(
textWaterMarkThreadPoolQueueSize4createWaterMark
),
threadFactory
,
new
ThreadPoolExecutor
.
AbortPolicy
());
}
/**
* 文字水印线程池-删除临时文件
*/
@Bean
(
name
=
"textWaterMarkThreadPool4RemoveTemp"
)
public
ExecutorService
getTextWaterMarkRemoveTempThreadPoolTaskServiceExecutor
()
{
log
.
info
(
"textWaterMarkThreadPool4RemoveTemp线程池开始初始化,线程池中线程数:{}"
,
textWaterMarkThreadPoolSize4RemoveTemp
);
ThreadFactory
threadFactory
=
new
ThreadFactoryBuilder
().
setNameFormat
(
"textWaterMarkThreadPool4RemoveTemp-%d"
).
build
();
return
new
ThreadPoolExecutor
(
textWaterMarkThreadPoolSize4RemoveTemp
,
textWaterMarkThreadPoolSize4RemoveTemp
,
0L
,
TimeUnit
.
SECONDS
,
new
LinkedBlockingDeque
<>(
textWaterMarkThreadPoolQueueSize4RemoveTemp
),
threadFactory
,
new
ThreadPoolExecutor
.
AbortPolicy
());
}
}
local-rnr-fp-server/src/main/java/com/cusc/nirvana/user/rnr/fp/controller/ChangeTboxController.java
0 → 100644
View file @
015d4257
package
com.cusc.nirvana.user.rnr.fp.controller
;
import
com.cusc.nirvana.common.result.Response
;
import
com.cusc.nirvana.user.rnr.fp.dto.FpDirectTboxChangeDTO
;
import
com.cusc.nirvana.user.rnr.fp.service.IFpChangeTboxService
;
import
com.cusc.nirvana.user.rnr.mg.dto.MgRnrCardInfoDTO
;
import
com.cusc.nirvana.user.rnr.mg.dto.RnrRelationDTO
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
@RestController
@RequestMapping
(
"/change/tbox"
)
public
class
ChangeTboxController
{
@Autowired
private
IFpChangeTboxService
changeTboxService
;
@PostMapping
(
"/unbindCards"
)
public
Response
unbindCards
(
@RequestBody
List
<
MgRnrCardInfoDTO
>
cardInfoDTOS
)
{
return
changeTboxService
.
unbindCardList
(
cardInfoDTOS
);
}
@PostMapping
(
"/bindCards"
)
public
Response
bindCards
(
@RequestBody
List
<
MgRnrCardInfoDTO
>
cardInfoDTOS
)
{
return
changeTboxService
.
bindCardList
(
cardInfoDTOS
);
}
@PostMapping
(
"/directChangeBox"
)
public
Response
directChangeBox
(
@RequestBody
FpDirectTboxChangeDTO
tboxChangeDTO
)
{
return
changeTboxService
.
directChangeBox
(
tboxChangeDTO
);
}
@PostMapping
(
"/submit"
)
public
Response
<
Boolean
>
submit
(
@RequestBody
RnrRelationDTO
dto
)
{
return
changeTboxService
.
submit
(
dto
);
}
@PostMapping
(
"/checkStatus"
)
public
Response
<
Boolean
>
checkStatus
(
@RequestBody
List
<
String
>
iccids
)
{
return
changeTboxService
.
checkNewIccid
(
iccids
);
}
}
local-rnr-fp-server/src/main/java/com/cusc/nirvana/user/rnr/fp/controller/CuFlowController.java
0 → 100644
View file @
015d4257
package
com.cusc.nirvana.user.rnr.fp.controller
;
import
com.cusc.nirvana.common.result.Response
;
import
com.cusc.nirvana.user.rnr.fp.service.ICuFlowService
;
import
com.cusc.nirvana.user.rnr.mg.dto.MgCardNoticeDTO
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* Description: 联通切流控制层
* <br />
* CreateDate 2022-07-27 20:34:21
*
* @author yuyi
**/
@RestController
@RequestMapping
(
"/cu/flow"
)
@Slf4j
public
class
CuFlowController
{
@Autowired
private
ICuFlowService
cuFlowService
;
/**
* Description: 实名事件
* <br />
* CreateDate 2022-07-27 20:35:00
*
* @author yuyi
**/
@PostMapping
(
"/switchNetwork"
)
public
Response
switchNetwork
(
@RequestBody
MgCardNoticeDTO
bean
)
{
return
cuFlowService
.
switchNetwork
(
bean
);
}
}
local-rnr-fp-server/src/main/java/com/cusc/nirvana/user/rnr/fp/controller/EnterpriseRnrController.java
0 → 100644
View file @
015d4257
package
com.cusc.nirvana.user.rnr.fp.controller
;
import
com.cusc.nirvana.common.result.Response
;
import
com.cusc.nirvana.user.rnr.fp.dto.EnterpriseChangeRnrPersonDTO
;
import
com.cusc.nirvana.user.rnr.fp.dto.EnterpriseH5CallBackRequestDTO
;
import
com.cusc.nirvana.user.rnr.fp.dto.EnterpriseRnrPersonNameReqDTO
;
import
com.cusc.nirvana.user.rnr.fp.dto.EnterpriseRnrPersonNameResponseDTO
;
import
com.cusc.nirvana.user.rnr.fp.service.IEnterpriseRnrService
;
import
com.cusc.nirvana.user.rnr.mg.dto.RnrRelationDTO
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
import
java.util.List
;
@RestController
@RequestMapping
(
"/enterpris"
)
public
class
EnterpriseRnrController
{
@Resource
private
IEnterpriseRnrService
enterpriseRnrService
;
//企业实名
@PostMapping
(
"/enterpriseRnr/{requestId}"
)
public
Response
enterpriseRnr
(
@RequestBody
RnrRelationDTO
dto
,
@PathVariable
(
"requestId"
)
String
requestId
)
{
return
enterpriseRnrService
.
enterpriseRnr
(
dto
,
requestId
);
}
@PostMapping
(
"/enterpriseRnrFollowUp"
)
@ApiOperation
(
value
=
"企业实名认证-后续,直接通过"
,
notes
=
"企业实名认证-后续,直接通过"
)
public
Response
enterpriseRnrFollowUp
(
@RequestBody
RnrRelationDTO
dto
)
{
return
enterpriseRnrService
.
enterpriseRnrFollowUp
(
dto
);
}
@PostMapping
(
"/uploadSecondary"
)
public
Response
uploadSecondaryEnterprise
(
RnrRelationDTO
dto
)
{
//return enterpriseRnrService.uploadEnterpriseInfo(dto);
return
null
;
}
/**
* 查询企业的实名责任人姓名
*
* @param dto
* @return
*/
@PostMapping
(
"/queryEnterpriseRnrPersonName"
)
public
Response
<
List
<
EnterpriseRnrPersonNameResponseDTO
>>
queryEnterpriseRnrPersonName
(
@Validated
@RequestBody
EnterpriseRnrPersonNameReqDTO
dto
)
{
return
Response
.
createSuccess
(
enterpriseRnrService
.
queryEnterpriseRnrPersonName
(
dto
));
}
/**
* 提交企业责任人变更
* @param serialNumber
* @param requestId
* @param dto
* @return
*/
@PostMapping
(
"/changeEnterpriseRnrPerson/{serialNumber}/{requestId}"
)
public
Response
changeEnterpriseRnrPerson
(
@PathVariable
(
"serialNumber"
)
String
serialNumber
,
@PathVariable
(
"requestId"
)
String
requestId
,
@RequestBody
EnterpriseChangeRnrPersonDTO
dto
)
{
enterpriseRnrService
.
changeEnterpriseRnrPerson
(
serialNumber
,
requestId
,
dto
);
return
Response
.
createSuccess
();
}
@PostMapping
(
"/changeEnterpriseRnrPersonNoSms/{serialNumber}/{requestId}"
)
public
Response
changeEnterpriseRnrPersonNoSms
(
@PathVariable
(
"serialNumber"
)
String
serialNumber
,
@PathVariable
(
"requestId"
)
String
requestId
,
@RequestBody
EnterpriseChangeRnrPersonDTO
dto
)
{
enterpriseRnrService
.
changeEnterpriseRnrPersonNoSms
(
serialNumber
,
requestId
,
dto
);
return
Response
.
createSuccess
(
"企业责任人变更成功"
);
}
@PostMapping
(
"/submitH5"
)
public
Response
submitH5
(
@RequestBody
RnrRelationDTO
rnrRelationDTO
){
enterpriseRnrService
.
submitH5
(
rnrRelationDTO
);
return
Response
.
createSuccess
();
}
@PostMapping
(
"/enterpriseRnrH5CallBack"
)
public
Response
<
Integer
>
enterpriseRnrH5CallBack
(
@RequestBody
EnterpriseH5CallBackRequestDTO
dto
)
{
return
Response
.
createSuccess
(
enterpriseRnrService
.
personH5CallBack
(
dto
));
}
}
local-rnr-fp-server/src/main/java/com/cusc/nirvana/user/rnr/fp/controller/EnterpriseUnBindController.java
0 → 100644
View file @
015d4257
package
com.cusc.nirvana.user.rnr.fp.controller
;
import
com.cusc.nirvana.common.result.Response
;
import
com.cusc.nirvana.user.rnr.fp.service.EnterpriseUnBindService
;
import
com.cusc.nirvana.user.rnr.mg.dto.RnrRelationDTO
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
/**
* @className: EnterpriseUnBindController
* @description: 企业解绑
* @author: jk
* @date: 2022/6/17 14:42
* @version: 1.0
**/
@RestController
@RequestMapping
(
"/enterpris"
)
public
class
EnterpriseUnBindController
{
@Resource
private
EnterpriseUnBindService
enterpriseUnBindService
;
@PostMapping
(
"/unBind"
)
public
Response
enterpriseUnBind
(
@RequestBody
RnrRelationDTO
dto
){
return
enterpriseUnBindService
.
enterpriseUnBind
(
dto
);
}
}
local-rnr-fp-server/src/main/java/com/cusc/nirvana/user/rnr/fp/controller/FileSystemController.java
0 → 100644
View file @
015d4257
package
com.cusc.nirvana.user.rnr.fp.controller
;
import
com.alibaba.excel.util.FileUtils
;
import
com.cusc.nirvana.common.result.Response
;
import
com.cusc.nirvana.user.exception.CuscUserException
;
import
com.cusc.nirvana.user.rnr.fp.dto.FileDownloadDTO
;
import
com.cusc.nirvana.user.rnr.fp.dto.FileRecordDTO
;
import
com.cusc.nirvana.user.rnr.fp.dto.FileUploadDTO
;
import
com.cusc.nirvana.user.rnr.fp.dto.ImageBase64DTO
;
import
com.cusc.nirvana.user.rnr.fp.service.IFileService
;
import
com.cusc.nirvana.user.util.CuscStringUtils
;
import
com.cusc.nirvana.user.util.crypt.DataCryptService
;
import
com.cusc.nirvana.user.util.crypt.Sm4Util
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
import
javax.crypto.BadPaddingException
;
import
javax.crypto.IllegalBlockSizeException
;
import
javax.crypto.NoSuchPaddingException
;
import
java.io.*
;
import
java.security.InvalidKeyException
;
import
java.security.NoSuchAlgorithmException
;
import
java.security.NoSuchProviderException
;
import
java.util.concurrent.ExecutionException
;
import
java.util.concurrent.ExecutorService
;
/**
* @author stayand
*/
@RestController
@RequestMapping
(
"/file"
)
@Slf4j
public
class
FileSystemController
{
@Resource
private
IFileService
fileService
;
@Value
(
"${rnr.image.watermark.source:/data/imageTemp/source/}"
)
private
String
sourceBasePath
;
@Value
(
"${rnr.image.watermark.water:/data/imageTemp/water/}"
)
private
String
waterBasePath
;
@Value
(
"${rnr.image.watermark.target:/data/imageTemp/target/}"
)
private
String
targetBasePath
;
@Autowired
private
DataCryptService
dataCryptService
;
@Resource
private
ExecutorService
textWaterMarkThreadPool4RemoveTemp
;
@Value
(
"${T1.picturePower}"
)
private
boolean
picturePower
;
/**
* 获取文件大小
* @param
*/
@PostMapping
(
"/getFileSize"
)
public
Response
<
FileRecordDTO
>
getFileSize
(
@RequestBody
FileRecordDTO
bean
)
{
if
(
bean
==
null
||
StringUtils
.
isBlank
(
bean
.
getUuid
()))
{
return
Response
.
createError
(
"参数uuid为空"
);
}
Double
fileSize
=
fileService
.
getFileSize
(
bean
.
getUuid
());
FileRecordDTO
fileRecordDTO
=
new
FileRecordDTO
();
fileRecordDTO
.
setFileSize
(
fileSize
);
return
Response
.
createSuccess
(
fileRecordDTO
);
}
@PostMapping
(
"/getBase64"
)
public
Response
<
ImageBase64DTO
>
getBase64
(
@RequestBody
FileDownloadDTO
fileDownloadDTO
)
{
if
(
fileDownloadDTO
==
null
||
StringUtils
.
isBlank
(
fileDownloadDTO
.
getUuid
()))
{
return
Response
.
createError
(
"参数uuid为空"
);
}
String
base64
=
fileService
.
downLoadBase64
(
fileDownloadDTO
.
getUuid
());
ImageBase64DTO
base64DTO
=
new
ImageBase64DTO
();
base64DTO
.
setBase64
(
base64
);
return
Response
.
createSuccess
(
base64DTO
);
}
@PostMapping
(
"/uploadImage"
)
public
Response
<
FileRecordDTO
>
uploadImage
(
FileUploadDTO
fileUploadDTO
)
{
try
{
//文件大小必须大于0
if
(
fileUploadDTO
.
getFile
().
getSize
()
<
1
)
{
return
Response
.
createError
(
"文件内容不能为空"
);
}
String
originalFilename
=
fileUploadDTO
.
getFile
().
getOriginalFilename
();
if
(
CuscStringUtils
.
isEmpty
(
originalFilename
)){
return
Response
.
createError
(
"文件名不能为空"
);
}
// InputStream inputStream = fileUploadDTO.getFile().getInputStream();
String
suffix
=
"png"
;
if
(
StringUtils
.
isNotBlank
(
originalFilename
))
{
suffix
=
originalFilename
.
substring
(
originalFilename
.
lastIndexOf
(
"."
)+
1
);
}
//加水印
String
fileName
=
fileService
.
doMarkText
(
fileUploadDTO
.
getFile
(),
fileUploadDTO
.
getUserId
());
byte
[]
image4Encrypt
=
doEncryptImage
(
fileName
);
//加密
ByteArrayInputStream
resource
=
null
;
File
file
=
new
File
(
targetBasePath
+
fileName
);
resource
=
new
ByteArrayInputStream
(
image4Encrypt
);
String
fileKey
=
fileService
.
upLoadImage
(
picturePower
?
resource:
new
FileInputStream
(
file
),
suffix
);
FileRecordDTO
fileRecordDTO
=
new
FileRecordDTO
();
fileRecordDTO
.
setUuid
(
fileKey
);
fileRecordDTO
.
setAccessUrl
(
fileService
.
getFileUrl
(
fileKey
));
fileRecordDTO
.
setFileName
(
originalFilename
);
// 删除临时文件
String
finalWaterMarkFileName
=
fileName
;
boolean
res4RemoveTemp
=
false
;
try
{
res4RemoveTemp
=
textWaterMarkThreadPool4RemoveTemp
.
submit
(()
->
this
.
removeTemp
(
finalWaterMarkFileName
)).
get
();
}
catch
(
InterruptedException
e
)
{
log
.
error
(
"removeTemp error:"
,
e
.
getMessage
(),
e
);
return
Response
.
createError
(
e
.
getMessage
());
}
catch
(
ExecutionException
e
)
{
log
.
error
(
"removeTemp error:"
,
e
.
getMessage
(),
e
);
return
Response
.
createError
(
e
.
getMessage
());
}
if
(!
res4RemoveTemp
)
{
throw
new
CuscUserException
(
"500"
,
"删除临时文件异常"
);
}
return
Response
.
createSuccess
(
fileRecordDTO
);
}
catch
(
Exception
e
){
log
.
error
(
"uploadImage error, e : {}"
,
e
);
return
Response
.
createError
(
"上传失败"
);
}
}
private
boolean
removeTemp
(
String
fileName
)
{
String
sourceFilePath
=
sourceBasePath
+
fileName
;
String
waterFilePath
=
waterBasePath
+
fileName
;
String
targetFilePath
=
targetBasePath
+
fileName
;
FileUtils
.
delete
(
new
File
(
sourceFilePath
));
log
.
info
(
"removeTemp filepath = {}"
,
sourceFilePath
);
FileUtils
.
delete
(
new
File
(
waterFilePath
));
log
.
info
(
"removeTemp filepath = {}"
,
waterFilePath
);
FileUtils
.
delete
(
new
File
(
targetFilePath
));
log
.
info
(
"removeTemp filepath = {}"
,
targetFilePath
);
return
true
;
}
@PostMapping
(
"/uploadFile"
)
public
Response
<
FileRecordDTO
>
uploadFile
(
FileUploadDTO
fileUploadDTO
)
{
try
{
//文件大小必须大于0
if
(
fileUploadDTO
.
getFile
().
getSize
()
<
1
)
{
return
Response
.
createError
(
"文件内容不能为空"
);
}
String
originalFilename
=
fileUploadDTO
.
getFile
().
getOriginalFilename
();
if
(
CuscStringUtils
.
isEmpty
(
originalFilename
)){
return
Response
.
createError
(
"文件名不能为空"
);
}
InputStream
inputStream
=
fileUploadDTO
.
getFile
().
getInputStream
();
String
suffix
=
""
;
if
(
StringUtils
.
isNotBlank
(
originalFilename
))
{
suffix
=
originalFilename
.
substring
(
originalFilename
.
lastIndexOf
(
"."
)+
1
);
}
String
fileKey
=
fileService
.
upLoadFile
(
inputStream
,
suffix
);
FileRecordDTO
fileRecordDTO
=
new
FileRecordDTO
();
fileRecordDTO
.
setUuid
(
fileKey
);
fileRecordDTO
.
setAccessUrl
(
fileService
.
getFileUrl
(
fileKey
));
fileRecordDTO
.
setFileName
(
originalFilename
);
return
Response
.
createSuccess
(
fileRecordDTO
);
}
catch
(
Exception
e
){
log
.
error
(
"uploadImage error, e : {}"
,
e
);
return
Response
.
createError
(
"上传失败"
);
}
}
@PostMapping
(
"/getUrl"
)
public
Response
<
FileRecordDTO
>
getUrl
(
@RequestBody
FileDownloadDTO
fileDownloadDTO
){
String
fileUrl
=
fileService
.
getFileUrl
(
fileDownloadDTO
.
getUuid
());
FileRecordDTO
fileRecordDTO
=
new
FileRecordDTO
();
fileRecordDTO
.
setAccessUrl
(
fileUrl
);
fileRecordDTO
.
setUuid
(
fileDownloadDTO
.
getUuid
());
return
Response
.
createSuccess
(
fileRecordDTO
);
}
//加密
private
byte
[]
doEncryptImage
(
String
image4Watermark
)
throws
NoSuchPaddingException
,
NoSuchAlgorithmException
,
IllegalBlockSizeException
,
BadPaddingException
,
NoSuchProviderException
,
InvalidKeyException
{
File
f
=
new
File
(
targetBasePath
+
image4Watermark
);
byte
[]
data
=
file2byte
(
f
);
byte
[]
encryptFileBytes
=
Sm4Util
.
encryptEcbPaddingByte
(
dataCryptService
.
getSm4Key
().
getBytes
(),
data
);
return
encryptFileBytes
;
}
private
byte
[]
file2byte
(
File
filePath
)
{
byte
[]
buffer
=
null
;
try
{
FileInputStream
fis
=
new
FileInputStream
(
filePath
);
ByteArrayOutputStream
bos
=
new
ByteArrayOutputStream
();
byte
[]
b
=
new
byte
[
1024
];
int
n
;
while
((
n
=
fis
.
read
(
b
))
!=
-
1
)
{
bos
.
write
(
b
,
0
,
n
);
}
fis
.
close
();
bos
.
close
();
buffer
=
bos
.
toByteArray
();
}
catch
(
FileNotFoundException
e
)
{
log
.
error
(
"file2byte error"
,
e
.
getMessage
());
}
catch
(
IOException
e
)
{
log
.
error
(
"file2byte error"
,
e
.
getMessage
());
}
return
buffer
;
}
}
local-rnr-fp-server/src/main/java/com/cusc/nirvana/user/rnr/fp/controller/FpCarInfoController.java
0 → 100644
View file @
015d4257
package
com.cusc.nirvana.user.rnr.fp.controller
;
import
com.cusc.nirvana.common.result.PageResult
;
import
com.cusc.nirvana.common.result.Response
;
import
com.cusc.nirvana.user.rnr.fp.dto.CarInfoBindingDTO
;
import
com.cusc.nirvana.user.rnr.fp.dto.FpCarInfoDTO
;
import
com.cusc.nirvana.user.rnr.fp.service.IFpCarInfoService
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
/**
* 车辆信息表(FpCarInfo)表控制层
*
* @author yuy336
* @since 2022-06-28 19:58:53
*/
@RestController
@RequestMapping
(
"/fpCarInfo"
)
public
class
FpCarInfoController
{
/**
* 服务对象
*/
@Autowired
private
IFpCarInfoService
fpCarInfoService
;
/**
* 分页查询
*
* @param bean 筛选条件
* @return 查询结果
*/
@PostMapping
(
"/queryByPage"
)
@ApiOperation
(
value
=
"分页查询"
,
notes
=
"分页查询"
)
public
Response
<
PageResult
<
FpCarInfoDTO
>>
queryByPage
(
@RequestBody
FpCarInfoDTO
bean
)
{
return
Response
.
createSuccess
(
fpCarInfoService
.
queryByPage
(
bean
));
}
/**
* 通过主键查询单条数据
*
* @param bean 实体
* @return 单条数据
*/
@PostMapping
(
"/getByUuid"
)
public
Response
<
FpCarInfoDTO
>
getByUuid
(
@RequestBody
FpCarInfoDTO
bean
)
{
return
Response
.
createSuccess
(
fpCarInfoService
.
getByUuid
(
bean
));
}
/**
* 通过主键查询单条数据
*
* @param bean 实体
* @return 单条数据
*/
@PostMapping
(
"/queryByList"
)
public
Response
<
List
<
FpCarInfoDTO
>>
queryByList
(
@RequestBody
FpCarInfoDTO
bean
)
{
return
Response
.
createSuccess
(
fpCarInfoService
.
queryByList
(
bean
));
}
/**
* 新增数据
*
* @param bean 实体
* @return 新增结果
*/
@PostMapping
(
"/add"
)
public
Response
add
(
@RequestBody
FpCarInfoDTO
bean
)
{
return
Response
.
createSuccess
(
fpCarInfoService
.
insert
(
bean
));
}
@PostMapping
(
"/addBatch"
)
public
Response
addBatch
(
@RequestBody
CarInfoBindingDTO
bean
)
{
return
fpCarInfoService
.
addBatch
(
bean
);
}
/**
* 编辑数据
*
* @param bean 实体
* @return 编辑结果
*/
@PostMapping
(
"/update"
)
public
Response
update
(
@RequestBody
FpCarInfoDTO
bean
)
{
return
Response
.
createSuccess
(
fpCarInfoService
.
update
(
bean
));
}
/**
* 删除数据
*
* @param bean 实体
* @return 删除是否成功
*/
@PostMapping
(
"/deleteById"
)
public
Response
<
Boolean
>
deleteById
(
@RequestBody
FpCarInfoDTO
bean
)
{
return
Response
.
createSuccess
(
fpCarInfoService
.
deleteById
(
bean
));
}
}
local-rnr-fp-server/src/main/java/com/cusc/nirvana/user/rnr/fp/controller/FpCardUnBindController.java
0 → 100644
View file @
015d4257
package
com.cusc.nirvana.user.rnr.fp.controller
;
import
com.cusc.nirvana.common.result.Response
;
import
com.cusc.nirvana.user.rnr.fp.dto.FpRnrSmsInfoDTO
;
import
com.cusc.nirvana.user.rnr.fp.dto.FpSendMessageDTO
;
import
com.cusc.nirvana.user.rnr.fp.dto.FpVehicleCardRnrDTO
;
import
com.cusc.nirvana.user.rnr.fp.dto.UnbindReceiceSMSDTO
;
import
com.cusc.nirvana.user.rnr.fp.service.IFpCardUnBindService
;
import
com.cusc.nirvana.user.rnr.mg.dto.MgRnrCardInfoDTO
;
import
com.cusc.nirvana.user.rnr.mg.dto.MgRnrInfoDTO
;
import
com.cusc.nirvana.user.rnr.mg.dto.RnrOrderDTO
;
import
com.cusc.nirvana.user.rnr.mg.dto.RnrRelationDTO
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
import
java.util.List
;
@RestController
@RequestMapping
(
"/card/Unbind"
)
public
class
FpCardUnBindController
{
@Resource
private
IFpCardUnBindService
cardUnBindService
;
//解绑
@PostMapping
(
"/ownerUnbind"
)
public
Response
<
Boolean
>
ownerUnbind
(
@RequestBody
RnrRelationDTO
relationDTO
)
{
return
cardUnBindService
.
ownerUnbind
(
relationDTO
);
}
//获取人的信息
@PostMapping
(
"/getUserInfo"
)
public
Response
<
MgRnrInfoDTO
>
getUserInfo
(
@RequestBody
FpVehicleCardRnrDTO
cardRnrDTO
)
{
return
cardUnBindService
.
getUserInfo
(
cardRnrDTO
);
}
//发送短信
@PostMapping
(
"/sendMessage"
)
public
Response
<
FpRnrSmsInfoDTO
>
sendUnbindSMS
(
@RequestBody
FpSendMessageDTO
sendMessageDTO
)
{
return
cardUnBindService
.
sendUnbindSMS
(
sendMessageDTO
);
}
//根据vin获取cardlist
@PostMapping
(
"/getCardList"
)
public
Response
<
List
<
MgRnrCardInfoDTO
>>
getCardList
(
@RequestBody
FpVehicleCardRnrDTO
rnrDTO
)
{
return
cardUnBindService
.
getCardList
(
rnrDTO
);
}
//短信回调
@PostMapping
(
"/receiverMessage"
)
public
Response
<
FpRnrSmsInfoDTO
>
receiverMessage
(
@RequestBody
UnbindReceiceSMSDTO
receiceSMSDTO
)
{
return
cardUnBindService
.
receiveMessage
(
receiceSMSDTO
);
}
//查询状态
@PostMapping
(
"/getMessageStatus"
)
public
Response
<
RnrOrderDTO
>
getMessageStatus
(
@RequestBody
FpRnrSmsInfoDTO
bean
)
{
return
cardUnBindService
.
getMessageStatus
(
bean
);
}
//查询状态
@PostMapping
(
"/getOrderStatus"
)
public
Response
<
RnrOrderDTO
>
getOrderStatus
(
@RequestBody
RnrOrderDTO
bean
)
{
return
cardUnBindService
.
getOrderStatus
(
bean
);
}
//插入工单信息
@PostMapping
(
"/insertOrder"
)
public
Response
<
RnrOrderDTO
>
insertOrder
(
@RequestBody
RnrOrderDTO
bean
)
{
return
cardUnBindService
.
insertOrder
(
bean
);
}
//插入工单信息
@PostMapping
(
"/updateOrder"
)
public
Response
<
RnrOrderDTO
>
updateOrder
(
@RequestBody
RnrOrderDTO
bean
)
{
return
cardUnBindService
.
updateOrder
(
bean
);
}
//校验短信超时
@PostMapping
(
"/checkMSMtime"
)
public
Response
checkReceiveMessageTime
(
@RequestBody
RnrOrderDTO
dto
){
return
cardUnBindService
.
checkReceiveMessageTime
(
dto
);
}
}
local-rnr-fp-server/src/main/java/com/cusc/nirvana/user/rnr/fp/controller/FpRnrOrderController.java
0 → 100644
View file @
015d4257
package
com.cusc.nirvana.user.rnr.fp.controller
;
import
com.cusc.nirvana.common.result.PageResult
;
import
com.cusc.nirvana.common.result.Response
;
import
com.cusc.nirvana.user.rnr.fp.dto.RnrOrderDetailDTO
;
import
com.cusc.nirvana.user.rnr.fp.dto.RnrOrderListQueryDTO
;
import
com.cusc.nirvana.user.rnr.fp.dto.RnrOrderListResponseDTO
;
import
com.cusc.nirvana.user.rnr.fp.dto.VinCardDTO
;
import
com.cusc.nirvana.user.rnr.fp.service.IRnrOrderService
;
import
com.cusc.nirvana.user.rnr.mg.dto.LocalVerifyListDTO
;
import
com.cusc.nirvana.user.rnr.mg.dto.LocalVerifyListRqDTO
;
import
com.cusc.nirvana.user.rnr.mg.dto.MgRnrCardInfoDTO
;
import
com.cusc.nirvana.user.rnr.mg.dto.RnrRelationDTO
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
javax.validation.Valid
;
/**
* @author stayAnd
* @date 2022/7/28
*/
@RestController
@RequestMapping
(
"/rnr/order"
)
public
class
FpRnrOrderController
{
@Resource
private
IRnrOrderService
rnrOrderService
;
@PostMapping
(
"/pageListQuery"
)
public
Response
<
PageResult
<
RnrOrderListResponseDTO
>>
pageListQuery
(
@Valid
@RequestBody
RnrOrderListQueryDTO
dto
){
return
Response
.
createSuccess
(
rnrOrderService
.
pageListQuery
(
dto
));
}
@PostMapping
(
"/queryCardPageByOrderId"
)
public
Response
<
PageResult
<
VinCardDTO
>>
queryCardPageByOrderId
(
@RequestBody
MgRnrCardInfoDTO
dto
){
return
Response
.
createSuccess
(
rnrOrderService
.
queryCardPageByOrderId
(
dto
));
}
@GetMapping
(
"/queryOrderDetail"
)
public
Response
<
RnrOrderDetailDTO
>
queryOrderDetail
(
@RequestParam
(
"orderId"
)
String
orderId
){
return
Response
.
createSuccess
(
rnrOrderService
.
queryOrderDetail
(
orderId
));
}
@PostMapping
(
"/localverifyList"
)
public
Response
<
PageResult
<
LocalVerifyListDTO
>>
localverifyList
(
@RequestBody
RnrOrderListQueryDTO
dto
){
return
Response
.
createSuccess
(
rnrOrderService
.
localverifyList
(
dto
));
}
}
local-rnr-fp-server/src/main/java/com/cusc/nirvana/user/rnr/fp/controller/FpRnrProtocolManageController.java
0 → 100644
View file @
015d4257
package
com.cusc.nirvana.user.rnr.fp.controller
;
import
com.cusc.nirvana.common.result.PageResult
;
import
com.cusc.nirvana.common.result.Response
;
import
com.cusc.nirvana.user.rnr.fp.dto.FpRnrProtocolManageDTO
;
import
com.cusc.nirvana.user.rnr.fp.service.IFpRnrProtocolManageService
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
/**
* (FpRnrProtocolManage)表控制层
*
* @author yuy336
* @since 2022-06-01 10:52:44
*/
@RestController
@RequestMapping
(
"/fpRnrProtocolManage"
)
public
class
FpRnrProtocolManageController
{
/**
* 服务对象
*/
@Autowired
private
IFpRnrProtocolManageService
fpRnrProtocolManageService
;
/**
* 分页查询
*
* @param bean 筛选条件
* @return 查询结果
*/
@PostMapping
(
"/queryByPage"
)
@ApiOperation
(
value
=
"分页查询"
,
notes
=
"分页查询"
)
public
Response
<
PageResult
<
FpRnrProtocolManageDTO
>>
queryByPage
(
@RequestBody
FpRnrProtocolManageDTO
bean
)
{
return
Response
.
createSuccess
(
fpRnrProtocolManageService
.
queryByPage
(
bean
));
}
/**
* 通过主键查询单条数据
*
* @param bean 实体
* @return 单条数据
*/
@PostMapping
(
"/getByUuid"
)
public
Response
<
FpRnrProtocolManageDTO
>
getByUuid
(
@RequestBody
FpRnrProtocolManageDTO
bean
)
{
return
Response
.
createSuccess
(
fpRnrProtocolManageService
.
getByUuid
(
bean
));
}
/**
* 通过主键查询单条数据
*
* @param bean 实体
* @return 单条数据
*/
@PostMapping
(
"/queryByList"
)
public
Response
<
List
<
FpRnrProtocolManageDTO
>>
queryByList
(
@RequestBody
FpRnrProtocolManageDTO
bean
)
{
return
fpRnrProtocolManageService
.
queryByList
(
bean
);
}
/**
* 新增数据
*
* @param bean 实体
* @return 新增结果
*/
@PostMapping
(
"/add"
)
public
Response
add
(
@RequestBody
FpRnrProtocolManageDTO
bean
)
{
return
Response
.
createSuccess
(
fpRnrProtocolManageService
.
insert
(
bean
));
}
/**
* 编辑数据
*
* @param bean 实体
* @return 编辑结果
*/
@PostMapping
(
"/update"
)
public
Response
update
(
@RequestBody
FpRnrProtocolManageDTO
bean
)
{
return
Response
.
createSuccess
(
fpRnrProtocolManageService
.
update
(
bean
));
}
/**
* 删除数据
*
* @param bean 实体
* @return 删除是否成功
*/
@PostMapping
(
"/deleteById"
)
public
Response
<
Boolean
>
deleteById
(
@RequestBody
FpRnrProtocolManageDTO
bean
)
{
return
Response
.
createSuccess
(
fpRnrProtocolManageService
.
deleteById
(
bean
));
}
}
local-rnr-fp-server/src/main/java/com/cusc/nirvana/user/rnr/fp/controller/FpRnrRelationInfoController.java
0 → 100644
View file @
015d4257
package
com.cusc.nirvana.user.rnr.fp.controller
;
import
com.cusc.nirvana.common.result.Response
;
import
com.cusc.nirvana.user.rnr.fp.dto.FpRnrRelationInfoDTO
;
import
com.cusc.nirvana.user.rnr.fp.service.IFpRnrRelationInfoService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
/**
* 实名关联信息(FpRnrRelationInfo)表控制层
*
* @author yuy336
* @since 2022-04-14 20:43:07
*/
@RestController
@RequestMapping
(
"/fpRnrRelationInfo"
)
public
class
FpRnrRelationInfoController
{
/**
* 服务对象
*/
@Autowired
private
IFpRnrRelationInfoService
fpRnrRelationInfoService
;
/**
* 通过主键查询单条数据
*
* @param bean 实体
* @return 单条数据
*/
@PostMapping
(
"/getByUuid"
)
public
Response
<
FpRnrRelationInfoDTO
>
getByUuid
(
@RequestBody
FpRnrRelationInfoDTO
bean
)
{
return
Response
.
createSuccess
(
fpRnrRelationInfoService
.
getByUuid
(
bean
));
}
/**
* 通过主键查询单条数据
*
* @param bean 实体
* @return 单条数据
*/
@PostMapping
(
"/queryByList"
)
public
Response
<
List
<
FpRnrRelationInfoDTO
>>
queryByList
(
@RequestBody
FpRnrRelationInfoDTO
bean
)
{
return
Response
.
createSuccess
(
fpRnrRelationInfoService
.
queryByList
(
bean
));
}
/**
* 新增数据
*
* @param bean 实体
* @return 新增结果
*/
@PostMapping
(
"/add"
)
public
Response
add
(
@RequestBody
FpRnrRelationInfoDTO
bean
)
{
return
Response
.
createSuccess
(
fpRnrRelationInfoService
.
insert
(
bean
));
}
/**
* 编辑数据
*
* @param bean 实体
* @return 编辑结果
*/
@PostMapping
(
"/update"
)
public
Response
update
(
@RequestBody
FpRnrRelationInfoDTO
bean
)
{
return
Response
.
createSuccess
(
fpRnrRelationInfoService
.
update
(
bean
));
}
/**
* 删除数据
*
* @param bean 实体
* @return 删除是否成功
*/
@PostMapping
(
"/deleteById"
)
public
Response
<
Boolean
>
deleteById
(
@RequestBody
FpRnrRelationInfoDTO
bean
)
{
return
Response
.
createSuccess
(
fpRnrRelationInfoService
.
deleteById
(
bean
));
}
/**
* 通过用户id查询数据
*
* @param bean 实体
* @return 数据
*/
@PostMapping
(
"/getByUserId"
)
public
Response
getByIdUserId
(
@RequestBody
FpRnrRelationInfoDTO
bean
)
{
return
Response
.
createSuccess
(
fpRnrRelationInfoService
.
queryByUserId
(
bean
));
}
/*@PostMapping("/bindByUserId")
public Response bindByUserId(@RequestBody BindUserInfoDTO bean){
//return Response.createSuccess(fpRnrRelationInfoService.bindByUserId(bean));
return Response.createSuccess(true);
}*/
@PostMapping
(
"/bindByUserId"
)
public
Response
disableBindByUserId
(
@RequestBody
FpRnrRelationInfoDTO
bean
){
return
Response
.
createSuccess
(
fpRnrRelationInfoService
.
disableBindByUserId
(
bean
));
}
}
local-rnr-fp-server/src/main/java/com/cusc/nirvana/user/rnr/fp/controller/FpRnrSmsInfoController.java
0 → 100644
View file @
015d4257
package
com.cusc.nirvana.user.rnr.fp.controller
;
import
com.cusc.nirvana.user.rnr.fp.dto.FpRnrSmsInfoDTO
;
import
com.cusc.nirvana.common.result.PageResult
;
import
com.cusc.nirvana.common.result.Response
;
import
com.cusc.nirvana.user.rnr.fp.service.IFpRnrSmsInfoService
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
/**
* 实名业务短信信息(FpRnrSmsInfo)表控制层
*
* @author yuy336
* @since 2022-04-19 20:39:07
*/
@RestController
@RequestMapping
(
"/fpRnrSmsInfo"
)
public
class
FpRnrSmsInfoController
{
/**
* 服务对象
*/
@Autowired
private
IFpRnrSmsInfoService
fpRnrSmsInfoService
;
/**
* 分页查询
*
* @param bean 筛选条件
* @return 查询结果
*/
@PostMapping
(
"/queryByPage"
)
@ApiOperation
(
value
=
"分页查询"
,
notes
=
"分页查询"
)
public
Response
<
PageResult
<
FpRnrSmsInfoDTO
>>
queryByPage
(
@RequestBody
FpRnrSmsInfoDTO
bean
)
{
return
Response
.
createSuccess
(
fpRnrSmsInfoService
.
queryByPage
(
bean
));
}
/**
* 通过主键查询单条数据
*
* @param bean 实体
* @return 单条数据
*/
@PostMapping
(
"/getByUuid"
)
public
Response
<
FpRnrSmsInfoDTO
>
getByUuid
(
@RequestBody
FpRnrSmsInfoDTO
bean
)
{
return
Response
.
createSuccess
(
fpRnrSmsInfoService
.
getByUuid
(
bean
));
}
/**
* 通过主键查询单条数据
*
* @param bean 实体
* @return 单条数据
*/
@PostMapping
(
"/queryByList"
)
public
Response
<
List
<
FpRnrSmsInfoDTO
>>
queryByList
(
@RequestBody
FpRnrSmsInfoDTO
bean
)
{
return
Response
.
createSuccess
(
fpRnrSmsInfoService
.
queryByList
(
bean
));
}
/**
* 新增数据
*
* @param bean 实体
* @return 新增结果
*/
@PostMapping
(
"/add"
)
public
Response
add
(
@RequestBody
FpRnrSmsInfoDTO
bean
)
{
return
Response
.
createSuccess
(
fpRnrSmsInfoService
.
insert
(
bean
));
}
/**
* 编辑数据
*
* @param bean 实体
* @return 编辑结果
*/
@PostMapping
(
"/update"
)
public
Response
update
(
@RequestBody
FpRnrSmsInfoDTO
bean
)
{
return
Response
.
createSuccess
(
fpRnrSmsInfoService
.
update
(
bean
));
}
/**
* 删除数据
*
* @param bean 实体
* @return 删除是否成功
*/
@PostMapping
(
"/deleteById"
)
public
Response
<
Boolean
>
deleteById
(
@RequestBody
FpRnrSmsInfoDTO
bean
)
{
return
Response
.
createSuccess
(
fpRnrSmsInfoService
.
deleteById
(
bean
));
}
}
local-rnr-fp-server/src/main/java/com/cusc/nirvana/user/rnr/fp/controller/FpSearchCardAuthController.java
0 → 100644
View file @
015d4257
package
com.cusc.nirvana.user.rnr.fp.controller
;
import
com.cusc.nirvana.common.result.Response
;
import
com.cusc.nirvana.user.rnr.fp.service.IFpSearchCardAuthService
;
import
com.cusc.nirvana.user.rnr.mg.dto.MgCheckProgressDTO
;
import
com.cusc.nirvana.user.rnr.mg.dto.MgRnrCardInfoDTO
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
/**
*
* 审核进度查询
*
* @modify hxin
*/
@RestController
@RequestMapping
(
"/fpSearchCardAuth"
)
public
class
FpSearchCardAuthController
{
@Autowired
private
IFpSearchCardAuthService
fpSearchCardAuthService
;
@PostMapping
(
"/car-auth1"
)
public
Response
searchAuth1
(
@RequestBody
MgRnrCardInfoDTO
dto
){
return
fpSearchCardAuthService
.
getMgSearchCardAuthDTO
(
dto
);
}
@PostMapping
(
"/getCheckProgress"
)
public
Response
getCheckProgress
(
@RequestBody
MgCheckProgressDTO
dto
){
return
fpSearchCardAuthService
.
getMgCheckProgress
(
dto
);
}
}
local-rnr-fp-server/src/main/java/com/cusc/nirvana/user/rnr/fp/controller/FpSurplusCardBindController.java
0 → 100644
View file @
015d4257
package
com.cusc.nirvana.user.rnr.fp.controller
;
import
com.cusc.nirvana.common.result.Response
;
import
com.cusc.nirvana.user.rnr.fp.dto.SurplusQueryRequestDTO
;
import
com.cusc.nirvana.user.rnr.fp.service.IFpSurplusCardBindService
;
import
com.cusc.nirvana.user.rnr.mg.dto.RnrRelationDTO
;
import
com.cusc.nirvana.user.rnr.mg.dto.SurplusConfirmDto
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* @author yubo
* @since 2022-05-03 16:58
*/
@RestController
@RequestMapping
(
"/fp/surplusCard"
)
public
class
FpSurplusCardBindController
{
@Autowired
IFpSurplusCardBindService
bindService
;
@PostMapping
(
"/bind"
)
public
Response
surplusCardBind
(
@RequestBody
RnrRelationDTO
dto
)
{
return
Response
.
createSuccess
(
bindService
.
surplusCardBind
(
dto
));
}
@PostMapping
(
"/bindDirect"
)
public
Response
surplusCardBindDirect
(
@RequestBody
RnrRelationDTO
dto
)
{
return
Response
.
createSuccess
(
bindService
.
surplusCardBindDirect
(
dto
));
}
@PostMapping
(
"/confirm"
)
public
Response
confirm
(
@RequestBody
SurplusConfirmDto
dto
)
{
return
Response
.
createSuccess
(
bindService
.
confirm
(
dto
));
}
/**
* 查询结果
*
* @param bean
* @return
*/
@PostMapping
(
"/queryResult"
)
public
Response
queryResult
(
@RequestBody
SurplusQueryRequestDTO
bean
)
{
return
Response
.
createSuccess
(
bindService
.
queryResult
(
bean
));
}
}
local-rnr-fp-server/src/main/java/com/cusc/nirvana/user/rnr/fp/controller/FpUserOperationLogController.java
0 → 100644
View file @
015d4257
package
com.cusc.nirvana.user.rnr.fp.controller
;
import
com.cusc.nirvana.common.result.PageResult
;
import
com.cusc.nirvana.common.result.Response
;
import
com.cusc.nirvana.user.rnr.fp.dto.FpUserOperationLogDTO
;
import
com.cusc.nirvana.user.rnr.fp.service.IFpUserOperationLogService
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
/**
* 用户操作日志(FpUserOperationLog)表控制层
*
* @author yuy336
* @since 2022-06-20 09:38:35
*/
@RestController
@RequestMapping
(
"/fpUserOperationLog"
)
public
class
FpUserOperationLogController
{
/**
* 服务对象
*/
@Autowired
private
IFpUserOperationLogService
fpUserOperationLogService
;
/**
* 分页查询
*
* @param bean 筛选条件
* @return 查询结果
*/
@PostMapping
(
"/queryByPage"
)
@ApiOperation
(
value
=
"分页查询"
,
notes
=
"分页查询"
)
public
Response
<
PageResult
<
FpUserOperationLogDTO
>>
queryByPage
(
@RequestBody
FpUserOperationLogDTO
bean
)
{
return
Response
.
createSuccess
(
fpUserOperationLogService
.
queryByPage
(
bean
));
}
/**
* 通过主键查询单条数据
*
* @param bean 实体
* @return 单条数据
*/
@PostMapping
(
"/getByUuid"
)
public
Response
<
FpUserOperationLogDTO
>
getByUuid
(
@RequestBody
FpUserOperationLogDTO
bean
)
{
return
Response
.
createSuccess
(
fpUserOperationLogService
.
getByUuid
(
bean
));
}
/**
* 通过主键查询单条数据
*
* @param bean 实体
* @return 单条数据
*/
@PostMapping
(
"/queryByList"
)
public
Response
<
List
<
FpUserOperationLogDTO
>>
queryByList
(
@RequestBody
FpUserOperationLogDTO
bean
)
{
return
Response
.
createSuccess
(
fpUserOperationLogService
.
queryByList
(
bean
));
}
/**
* 新增数据
*
* @param bean 实体
* @return 新增结果
*/
@PostMapping
(
"/add"
)
public
Response
add
(
@RequestBody
FpUserOperationLogDTO
bean
)
{
return
Response
.
createSuccess
(
fpUserOperationLogService
.
insert
(
bean
));
}
/**
* 编辑数据
*
* @param bean 实体
* @return 编辑结果
*/
@PostMapping
(
"/update"
)
public
Response
update
(
@RequestBody
FpUserOperationLogDTO
bean
)
{
return
Response
.
createSuccess
(
fpUserOperationLogService
.
update
(
bean
));
}
/**
* 删除数据
*
* @param bean 实体
* @return 删除是否成功
*/
@PostMapping
(
"/deleteById"
)
public
Response
<
Boolean
>
deleteById
(
@RequestBody
FpUserOperationLogDTO
bean
)
{
return
Response
.
createSuccess
(
fpUserOperationLogService
.
deleteById
(
bean
));
}
}
local-rnr-fp-server/src/main/java/com/cusc/nirvana/user/rnr/fp/controller/FpVehicleRnrUnboundController.java
0 → 100644
View file @
015d4257
package
com.cusc.nirvana.user.rnr.fp.controller
;
import
com.cusc.nirvana.common.result.Response
;
import
com.cusc.nirvana.user.rnr.fp.dto.VehicleUnboundVerifyRequestDTO
;
import
com.cusc.nirvana.user.rnr.fp.dto.VerifyVinCardResponseDTO
;
import
com.cusc.nirvana.user.rnr.fp.service.IVehicleRnrUnBoundService
;
import
com.cusc.nirvana.user.rnr.mg.dto.VehicleUnbindDTO
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.validation.Valid
;
/**
* @author yubo
* @since 2022-04-24 17:07
*/
@RestController
@RequestMapping
(
"/vehicle"
)
public
class
FpVehicleRnrUnboundController
{
@Autowired
private
IVehicleRnrUnBoundService
unBoundService
;
/**
* 车企实名解绑-校验数据接口
* @param responseDTO
* @return
*/
@PostMapping
(
"/verifyUnboundVinCardBatch"
)
public
Response
<
VerifyVinCardResponseDTO
>
verifyUnboundVinCardBatch
(
@Valid
@RequestBody
VehicleUnboundVerifyRequestDTO
responseDTO
)
{
return
unBoundService
.
verifyUnboundVinCardBatch
(
responseDTO
);
}
@PostMapping
(
"/batchUnbound"
)
public
Response
<
VerifyVinCardResponseDTO
>
batchUnbound
(
@Valid
@RequestBody
VehicleUnbindDTO
responseDTO
)
{
return
unBoundService
.
batchUnbound
(
responseDTO
);
}
}
local-rnr-fp-server/src/main/java/com/cusc/nirvana/user/rnr/fp/controller/IFpT1UploadStatusController.java
0 → 100644
View file @
015d4257
package
com.cusc.nirvana.user.rnr.fp.controller
;
import
com.alibaba.fastjson.JSONObject
;
import
com.cusc.nirvana.common.result.Response
;
import
com.cusc.nirvana.user.rnr.fp.dto.FpT1UploadStatusDTO
;
import
com.cusc.nirvana.user.rnr.fp.service.IFpT1UploadStatusService
;
import
com.cusc.nirvana.user.rnr.mg.dto.MgCardNoticeDTO
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
/**
* @className: IFpT1UploadStatusController
* @description: T1上报状态
* @author: jk
* @date: 2022/7/27 9:30
* @version: 1.0
**/
@Slf4j
@RequestMapping
(
"/fpT1UploadStatus"
)
public
class
IFpT1UploadStatusController
{
@Autowired
private
IFpT1UploadStatusService
iFpT1UploadStatusService
;
@PostMapping
(
"/queryByList"
)
public
Response
queryByList
(
@RequestBody
FpT1UploadStatusDTO
bean
)
{
return
Response
.
createSuccess
(
iFpT1UploadStatusService
.
queryByList
(
bean
));
}
@PostMapping
(
"/update"
)
public
Response
update
(
@RequestBody
FpT1UploadStatusDTO
bean
){
return
Response
.
createSuccess
(
iFpT1UploadStatusService
.
update
(
bean
));
}
}
local-rnr-fp-server/src/main/java/com/cusc/nirvana/user/rnr/fp/controller/MessageCallBackController.java
0 → 100644
View file @
015d4257
package
com.cusc.nirvana.user.rnr.fp.controller
;
import
com.cusc.nirvana.common.result.Response
;
import
com.cusc.nirvana.user.rnr.fp.dto.UnbindReceiceSMSDTO
;
import
com.cusc.nirvana.user.rnr.fp.service.IMessageCallBackService
;
import
org.aspectj.bridge.IMessage
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* @author yubo
* @since 2022-05-06 16:34
*/
@RestController
@RequestMapping
(
"/message"
)
public
class
MessageCallBackController
{
@Autowired
IMessageCallBackService
callBackService
;
@PostMapping
(
"/callBack"
)
public
Response
callBack
(
@RequestBody
UnbindReceiceSMSDTO
bean
)
{
return
callBackService
.
callBack
(
bean
);
}
}
local-rnr-fp-server/src/main/java/com/cusc/nirvana/user/rnr/fp/controller/NewVinCardController.java
0 → 100644
View file @
015d4257
package
com.cusc.nirvana.user.rnr.fp.controller
;
import
com.cusc.nirvana.common.result.Response
;
import
com.cusc.nirvana.user.rnr.fp.dto.*
;
import
com.cusc.nirvana.user.rnr.fp.service.INewVinCardService
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
/**
* @author stayAnd
* @date 2022/5/16
*/
@RestController
@RequestMapping
(
"/newVinCard"
)
public
class
NewVinCardController
{
@Resource
private
INewVinCardService
vinCardService
;
@RequestMapping
(
"/queryUnBindCardByVin"
)
public
Response
<
VinCardResultDTO
>
queryUnBindCardByVin
(
@RequestBody
VinCardQueryDTO
queryDTO
){
return
vinCardService
.
queryUnBindCardByVin
(
queryDTO
);
}
@RequestMapping
(
"/queryBindCardByVin"
)
public
Response
<
VinCardResultDTO
>
queryBindCardByVin
(
@RequestBody
VinCardQueryDTO
queryDTO
){
return
Response
.
createSuccess
(
vinCardService
.
queryBindCardByVin
(
queryDTO
));
}
@RequestMapping
(
"/checkVinCard"
)
public
Response
<
VinCardCheckResultDTO
>
checkVinCard
(
@RequestBody
VinCardCheckDTO
vinCardCheckDTO
){
return
Response
.
createSuccess
(
vinCardService
.
checkVinCard
(
vinCardCheckDTO
));
}
@RequestMapping
(
"/checkVinCardMessage"
)
public
Response
<
VinCardCheckMessageResultDTO
>
checkVinCardMessage
(
@RequestBody
VinCardCheckMessageRequestDTO
requestDTO
){
return
Response
.
createSuccess
(
vinCardService
.
checkVinCardMessage
(
requestDTO
));
}
@PostMapping
(
"/checkVin"
)
public
Response
<
VinCheckResultDTO
>
checkVin
(
@RequestBody
VinCheckRequestDTO
requestDTO
){
return
Response
.
createSuccess
(
vinCardService
.
checkVin
(
requestDTO
));
}
}
local-rnr-fp-server/src/main/java/com/cusc/nirvana/user/rnr/fp/controller/OcrController.java
0 → 100644
View file @
015d4257
package
com.cusc.nirvana.user.rnr.fp.controller
;
import
com.cusc.nirvana.common.result.Response
;
import
com.cusc.nirvana.user.rnr.fp.common.cloud.CloudMethod
;
import
com.cusc.nirvana.user.rnr.fp.common.cloud.CloudService
;
import
com.cusc.nirvana.user.rnr.fp.dto.OcrNpReqDTO
;
import
com.cusc.nirvana.user.rnr.fp.dto.OcrNpRespDTO
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
/**
* @author yubo
* @since 2022-06-15 18:32
*/
@RestController
@RequestMapping
(
"/ocr"
)
public
class
OcrController
{
@Resource
private
CloudService
cloudService
;
@RequestMapping
(
"/doOcr"
)
public
Response
<
OcrNpRespDTO
>
getOrganIdByUserId
(
@Validated
@RequestBody
OcrNpReqDTO
bean
)
{
return
cloudService
.
postForResponse
(
CloudMethod
.
OCR_NP
,
bean
,
OcrNpRespDTO
.
class
);
}
}
Prev
1
…
7
8
9
10
11
12
13
14
15
…
21
Next
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