Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangxinjiang
yifu-mvp
Commits
f4dd9c3f
Commit
f4dd9c3f
authored
Jul 18, 2022
by
zhaji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
"feature-zhaJi:保险公司,险种查询,新增,分页查询代码提交"
parent
ef3f2dd4
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
143 additions
and
4 deletions
+143
-4
TInsuranceCompanyController.java
...fu/insurances/controller/TInsuranceCompanyController.java
+54
-2
TInsuranceTypeController.java
.../yifu/insurances/controller/TInsuranceTypeController.java
+52
-2
TInsuranceTypeRateController.java
...u/insurances/controller/TInsuranceTypeRateController.java
+6
-0
TInsuranceTypeStandardController.java
...surances/controller/TInsuranceTypeStandardController.java
+6
-0
TInsuranceCompanyService.java
.../v1/yifu/insurances/service/TInsuranceCompanyService.java
+3
-0
TInsuranceTypeService.java
...lus/v1/yifu/insurances/service/TInsuranceTypeService.java
+4
-0
TInsuranceCompanyServiceImpl.java
...insurances/service/impl/TInsuranceCompanyServiceImpl.java
+9
-0
TInsuranceTypeServiceImpl.java
...fu/insurances/service/impl/TInsuranceTypeServiceImpl.java
+9
-0
No files found.
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceCompanyController.java
View file @
f4dd9c3f
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
controller
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceCompany
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceCompanyService
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.security.SecurityRequirement
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
/**
* @author zhaji
...
...
@@ -18,4 +27,47 @@ import org.springframework.web.bind.annotation.RestController;
@Tag
(
name
=
"保险公司相关"
)
@SecurityRequirement
(
name
=
HttpHeaders
.
AUTHORIZATION
)
public
class
TInsuranceCompanyController
{
@Resource
private
TInsuranceCompanyService
insuranceCompanyService
;
/**
* 分页查询
* @param page 分页对象
* @param insuranceCompany 保险公司
* @return
*/
@Operation
(
summary
=
"分页查询"
,
description
=
"分页查询"
)
@GetMapping
(
"/page"
)
public
R
<
IPage
<
TInsuranceCompany
>>
getTCertRecordPage
(
Page
page
,
TInsuranceCompany
insuranceCompany
)
{
return
R
.
ok
(
insuranceCompanyService
.
pageDiy
(
page
,
insuranceCompany
));
}
/**
* 通过id查询保险公司详情
* @param id id
* @return R
*/
@Operation
(
summary
=
"通过id查询保险公司详情"
,
description
=
"通过id查询:hasPermission('demo_insuranceCompany_get')"
)
@GetMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('demo_insuranceCompany_get')"
)
public
R
<
TInsuranceCompany
>
getById
(
@PathVariable
(
"id"
)
String
id
)
{
return
R
.
ok
(
insuranceCompanyService
.
getById
(
id
));
}
/**
* 新增保险公司
* @param insuranceCompany 保险公司明细
* @return R
*/
@Operation
(
summary
=
"新增保险公司"
,
description
=
"新增证明开具记录表:hasPermission('demo_insuranceCompany_add')"
)
@SysLog
(
"新增保险公司"
)
@PostMapping
@PreAuthorize
(
"@pms.hasPermission('demo_insuranceCompany_add')"
)
public
R
<
Boolean
>
save
(
@RequestBody
TInsuranceCompany
insuranceCompany
)
{
return
R
.
ok
(
insuranceCompanyService
.
save
(
insuranceCompany
));
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceTypeController.java
View file @
f4dd9c3f
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
controller
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceCompany
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceType
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceTypeService
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.security.SecurityRequirement
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
/**
* @author zhaji
...
...
@@ -18,4 +28,44 @@ import org.springframework.web.bind.annotation.RestController;
@Tag
(
name
=
"险种相关"
)
@SecurityRequirement
(
name
=
HttpHeaders
.
AUTHORIZATION
)
public
class
TInsuranceTypeController
{
@Resource
private
TInsuranceTypeService
insuranceTypeService
;
/**
* 分页查询
* @param page 分页对象
* @param insuranceType 险种
* @return
*/
@Operation
(
summary
=
"分页查询"
,
description
=
"分页查询"
)
@GetMapping
(
"/page"
)
public
R
<
IPage
<
TInsuranceType
>>
getTCertRecordPage
(
Page
page
,
TInsuranceType
insuranceType
)
{
return
R
.
ok
(
insuranceTypeService
.
pageDiy
(
page
,
insuranceType
));
}
/**
* 通过id查询险种详情
* @param id id
* @return R
*/
@Operation
(
summary
=
"通过id查询险种详情"
,
description
=
"通过id查询:hasPermission('demo_insuranceType_get')"
)
@GetMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('demo_insuranceType_get')"
)
public
R
<
TInsuranceType
>
getById
(
@PathVariable
(
"id"
)
String
id
)
{
return
R
.
ok
(
insuranceTypeService
.
getById
(
id
));
}
/**
* 新增险种
* @param insuranceType 险种明细
* @return R
*/
@Operation
(
summary
=
"新增保险公司"
,
description
=
"新增险种:hasPermission('demo_insuranceType_add')"
)
@SysLog
(
"新增险种"
)
@PostMapping
@PreAuthorize
(
"@pms.hasPermission('demo_insuranceType_add')"
)
public
R
<
Boolean
>
save
(
@RequestBody
TInsuranceType
insuranceType
)
{
return
R
.
ok
(
insuranceTypeService
.
save
(
insuranceType
));
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceTypeRateController.java
View file @
f4dd9c3f
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
controller
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceTypeRateService
;
import
io.swagger.v3.oas.annotations.security.SecurityRequirement
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
...
...
@@ -7,6 +8,8 @@ import org.springframework.http.HttpHeaders;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
/**
* @author zhaji
* @description 费率相关
...
...
@@ -18,4 +21,7 @@ import org.springframework.web.bind.annotation.RestController;
@Tag
(
name
=
"费率相关"
)
@SecurityRequirement
(
name
=
HttpHeaders
.
AUTHORIZATION
)
public
class
TInsuranceTypeRateController
{
@Resource
private
TInsuranceTypeRateService
insuranceTypeRateService
;
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceTypeStandardController.java
View file @
f4dd9c3f
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
controller
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceTypeStandardService
;
import
io.swagger.v3.oas.annotations.security.SecurityRequirement
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
...
...
@@ -7,6 +8,8 @@ import org.springframework.http.HttpHeaders;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
/**
* @author zhaji
* @description 购买标准相关
...
...
@@ -18,4 +21,7 @@ import org.springframework.web.bind.annotation.RestController;
@Tag
(
name
=
"购买标准相关"
)
@SecurityRequirement
(
name
=
HttpHeaders
.
AUTHORIZATION
)
public
class
TInsuranceTypeStandardController
{
@Resource
private
TInsuranceTypeStandardService
insuranceTypeStandardService
;
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/TInsuranceCompanyService.java
View file @
f4dd9c3f
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
service
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceCompany
;
...
...
@@ -10,4 +12,5 @@ import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceCompany;
*/
public
interface
TInsuranceCompanyService
extends
IService
<
TInsuranceCompany
>
{
IPage
<
TInsuranceCompany
>
pageDiy
(
Page
page
,
TInsuranceCompany
insuranceCompany
);
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/TInsuranceTypeService.java
View file @
f4dd9c3f
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
service
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceCompany
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceType
;
/**
...
...
@@ -11,4 +14,5 @@ import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceType;
*/
public
interface
TInsuranceTypeService
extends
IService
<
TInsuranceType
>
{
IPage
<
TInsuranceType
>
pageDiy
(
Page
page
,
TInsuranceType
insuranceType
);
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceCompanyServiceImpl.java
View file @
f4dd9c3f
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceCompany
;
import
com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceCompanyMapper
;
...
...
@@ -14,4 +17,10 @@ import org.springframework.stereotype.Service;
@Service
public
class
TInsuranceCompanyServiceImpl
extends
ServiceImpl
<
TInsuranceCompanyMapper
,
TInsuranceCompany
>
implements
TInsuranceCompanyService
{
@Override
public
IPage
<
TInsuranceCompany
>
pageDiy
(
Page
page
,
TInsuranceCompany
insuranceCompany
)
{
LambdaQueryWrapper
<
TInsuranceCompany
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
orderByDesc
(
TInsuranceCompany:
:
getCreateTime
);
return
this
.
baseMapper
.
selectPage
(
page
,
wrapper
);
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceTypeServiceImpl.java
View file @
f4dd9c3f
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceType
;
import
com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceTypeMapper
;
...
...
@@ -15,4 +18,10 @@ import org.springframework.stereotype.Service;
@Service
public
class
TInsuranceTypeServiceImpl
extends
ServiceImpl
<
TInsuranceTypeMapper
,
TInsuranceType
>
implements
TInsuranceTypeService
{
@Override
public
IPage
<
TInsuranceType
>
pageDiy
(
Page
page
,
TInsuranceType
insuranceType
)
{
LambdaQueryWrapper
<
TInsuranceType
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
orderByDesc
(
TInsuranceType:
:
getCreateTime
);
return
this
.
baseMapper
.
selectPage
(
page
,
wrapper
);
}
}
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