Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
8
8timerapiv200
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
8timerv2
8timerapiv200
Commits
5ad25bff
Commit
5ad25bff
authored
Mar 30, 2022
by
翁国栋
Committed by
284718418@qq.com
Mar 30, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
运营后台--
可选择产品
parent
106688fe
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
370 additions
and
207 deletions
+370
-207
src/main/java/cn/timer/api/bean/insure/InsurePolicy.java
+1
-207
src/main/java/cn/timer/api/bean/insure/InsureProduct.java
+156
-0
src/main/java/cn/timer/api/controller/insure/InsureProductController.java
+46
-0
src/main/java/cn/timer/api/dao/insure/InsureProductMapper.java
+18
-0
src/main/java/cn/timer/api/dto/insure/InsureDto.java
+1
-0
src/main/resources/mapping/insure/InsureProductMapper.xml
+148
-0
No files found.
src/main/java/cn/timer/api/bean/insure/InsurePolicy.java
View file @
5ad25bff
...
...
@@ -115,212 +115,6 @@ public class InsurePolicy extends Model<InsurePolicy> {
*/
private
Date
updateTime
;
/**
* 设置:
*/
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
/**
* 获取:
*/
public
Integer
getId
()
{
return
id
;
}
/**
* 设置:方案名称(必选)
*/
public
void
setSchemeName
(
String
schemeName
)
{
this
.
schemeName
=
schemeName
;
}
/**
* 获取:方案名称(必选)
*/
public
String
getSchemeName
()
{
return
schemeName
;
}
/**
* 设置:保单生效日
*/
public
void
setPolicyDateStart
(
Date
policyDateStart
)
{
this
.
policyDateStart
=
policyDateStart
;
}
/**
* 获取:保单生效日
*/
public
Date
getPolicyDateStart
()
{
return
policyDateStart
;
}
/**
* 设置:保单终止日
*/
public
void
setPolicyDateEnd
(
Date
policyDateEnd
)
{
this
.
policyDateEnd
=
policyDateEnd
;
}
/**
* 获取:保单终止日
*/
public
Date
getPolicyDateEnd
()
{
return
policyDateEnd
;
}
/**
* 设置:产品代码
*/
public
void
setProductCodeId
(
String
productCodeId
)
{
this
.
productCodeId
=
productCodeId
;
}
/**
* 获取:产品代码
*/
public
String
getProductCodeId
()
{
return
productCodeId
;
}
/**
* 设置:计划代码
*/
public
void
setPlanCodeId
(
String
planCodeId
)
{
this
.
planCodeId
=
planCodeId
;
}
/**
* 获取:计划代码
*/
public
String
getPlanCodeId
()
{
return
planCodeId
;
}
/**
* 设置:分销商pid
*/
public
void
setPartnerPid
(
String
partnerPid
)
{
this
.
partnerPid
=
partnerPid
;
}
/**
* 获取:分销商pid
*/
public
String
getPartnerPid
()
{
return
partnerPid
;
}
/**
* 设置:保单号
*/
public
void
setPolicyNo
(
String
policyNo
)
{
this
.
policyNo
=
policyNo
;
}
/**
* 获取:保单号
*/
public
String
getPolicyNo
()
{
return
policyNo
;
}
/**
* 设置:保单类型:1、年单 2、月单
*/
public
void
setType
(
Integer
type
)
{
this
.
type
=
type
;
}
/**
* 获取:保单类型:1、年单 2、月单
*/
public
Integer
getType
()
{
return
type
;
}
/**
* 设置:5-人民币,其他币种请参见全局数据字典
*/
public
void
setCurrency
(
String
currency
)
{
this
.
currency
=
currency
;
}
/**
* 获取:5-人民币,其他币种请参见全局数据字典
*/
public
String
getCurrency
()
{
return
currency
;
}
/**
* 设置:总保费
*/
public
void
setTotalPremium
(
String
totalPremium
)
{
this
.
totalPremium
=
totalPremium
;
}
/**
* 获取:总保费
private
Integer
productId
;
*/
public
String
getTotalPremium
()
{
return
totalPremium
;
}
/**
* 设置:1-正常
*/
public
void
setStatus
(
String
status
)
{
this
.
status
=
status
;
}
/**
* 获取:1-正常
*/
public
String
getStatus
()
{
return
status
;
}
/**
* 设置:电子保单
*/
public
void
setPolicyFile
(
String
policyFile
)
{
this
.
policyFile
=
policyFile
;
}
/**
* 获取:电子保单
*/
public
String
getPolicyFile
()
{
return
policyFile
;
}
/**
* 设置:保单kit的地址
*/
public
void
setKitUrl
(
String
kitUrl
)
{
this
.
kitUrl
=
kitUrl
;
}
/**
* 获取:保单kit的地址
*/
public
String
getKitUrl
()
{
return
kitUrl
;
}
/**
* 设置:投保人id
*/
public
void
setInsureApplicantId
(
Integer
insureApplicantId
)
{
this
.
insureApplicantId
=
insureApplicantId
;
}
/**
* 获取:投保人id
*/
public
Integer
getInsureApplicantId
()
{
return
insureApplicantId
;
}
/**
* 设置:企业id
*/
public
void
setOrgCode
(
Integer
orgCode
)
{
this
.
orgCode
=
orgCode
;
}
/**
* 获取:企业id
*/
public
Integer
getOrgCode
()
{
return
orgCode
;
}
/**
* 设置:投保时间
*/
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
/**
* 获取:投保时间
*/
public
Date
getCreateTime
()
{
return
createTime
;
}
}
src/main/java/cn/timer/api/bean/insure/InsureProduct.java
0 → 100644
View file @
5ad25bff
package
cn
.
timer
.
api
.
bean
.
insure
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
javax.persistence.Entity
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 保险产品
*
* @author wgd
* @email 862422848@qq.com
* @date 2022-03-30 11:36:30
*/
@Entity
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Table
(
name
=
"insure_product"
)
@ApiModel
(
"保险产品"
)
public
class
InsureProduct
extends
Model
<
InsureProduct
>
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* id
*/
@Id
@GeneratedValue
@TableId
(
type
=
IdType
.
AUTO
)
@ApiModelProperty
(
value
=
"编号"
)
private
Integer
id
;
/**
* 产品名称
*/
private
String
name
;
/**
* 计划代码
*/
private
String
planCodeId
;
/**
* 产品代码
*/
private
String
productCodeId
;
/**
* 类型:1年单 2月单
*/
private
Integer
type
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 是否删除 0否 1是
*/
private
Integer
isDel
;
/**
* 设置:id
*/
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
/**
* 获取:id
*/
public
Integer
getId
()
{
return
id
;
}
/**
* 设置:产品名称
*/
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
/**
* 获取:产品名称
*/
public
String
getName
()
{
return
name
;
}
/**
* 设置:计划代码
*/
public
void
setPlanCodeId
(
String
planCodeId
)
{
this
.
planCodeId
=
planCodeId
;
}
/**
* 获取:计划代码
*/
public
String
getPlanCodeId
()
{
return
planCodeId
;
}
/**
* 设置:产品代码
*/
public
void
setProductCodeId
(
String
productCodeId
)
{
this
.
productCodeId
=
productCodeId
;
}
/**
* 获取:产品代码
*/
public
String
getProductCodeId
()
{
return
productCodeId
;
}
/**
* 设置:类型:1年单 2月单
*/
public
void
setType
(
Integer
type
)
{
this
.
type
=
type
;
}
/**
* 获取:类型:1年单 2月单
*/
public
Integer
getType
()
{
return
type
;
}
/**
* 设置:创建时间
*/
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
/**
* 获取:创建时间
*/
public
Date
getCreateTime
()
{
return
createTime
;
}
/**
* 设置:是否删除 0否 1是
*/
public
void
setIsDel
(
Integer
isDel
)
{
this
.
isDel
=
isDel
;
}
/**
* 获取:是否删除 0否 1是
*/
public
Integer
getIsDel
()
{
return
isDel
;
}
}
src/main/java/cn/timer/api/controller/insure/InsureProductController.java
0 → 100644
View file @
5ad25bff
package
cn
.
timer
.
api
.
controller
.
insure
;
import
java.util.List
;
import
java.util.Map
;
import
cn.timer.api.bean.insure.InsureProduct
;
import
cn.timer.api.dao.insure.InsureProductMapper
;
import
cn.timer.api.dto.insure.PolicyDto
;
import
cn.timer.api.utils.Result
;
import
cn.timer.api.utils.ResultUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.beust.jcommander.internal.Lists
;
import
com.github.xiaoymin.knife4j.annotations.ApiOperationSupport
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.*
;
/**
* 保险产品
*
* @author wgd
* @email 862422848@qq.com
* @date 2022-03-30 11:36:30
*/
@Api
(
tags
=
"8.0保险列表"
)
@RestController
@Transactional
@RequestMapping
(
value
=
"/insureProduct"
,
produces
=
{
"application/json"
})
public
class
InsureProductController
{
@Autowired
private
InsureProductMapper
insureProductMapper
;
@GetMapping
(
value
=
"/productList"
)
@ApiOperation
(
value
=
"12.产品列表"
,
httpMethod
=
"Get"
,
notes
=
"产品列表"
)
@ApiOperationSupport
(
order
=
2
)
public
Result
<
Object
>
productList
()
{
List
<
InsureProduct
>
productList
=
InsureProduct
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
InsureProduct
>().
lambda
().
eq
(
InsureProduct:
:
getIsDel
,
0
));
if
(
productList
.
size
()>
0
)
{
return
ResultUtil
.
data
(
productList
);
}
return
ResultUtil
.
error
(
"暂无产品"
);
}
}
src/main/java/cn/timer/api/dao/insure/InsureProductMapper.java
0 → 100644
View file @
5ad25bff
package
cn
.
timer
.
api
.
dao
.
insure
;
import
cn.timer.api.bean.insure.InsureProduct
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.springframework.stereotype.Repository
;
/**
* 保险产品
*
* @author wgd
* @email 862422848@qq.com
* @date 2022-03-30 11:36:30
*/
@Repository
public
interface
InsureProductMapper
extends
BaseMapper
<
InsureProduct
>
{
}
src/main/java/cn/timer/api/dto/insure/InsureDto.java
View file @
5ad25bff
...
...
@@ -31,5 +31,6 @@ public class InsureDto {
private
String
tricycleFrameNumber
;
private
Integer
type
;
/*类型 1是新增 3是替换*/
private
String
[]
oldIds
;
private
String
productId
;
// private String
}
src/main/resources/mapping/insure/InsureProductMapper.xml
0 → 100644
View file @
5ad25bff
<?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.core.db.dao.InsureProductMapper"
>
<!-- 可根据自己的需求,是否要使用 -->
<resultMap
type=
"cn.timer.api.bean.insure.InsureProduct"
id=
"insureProductMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"name"
column=
"name"
/>
<result
property=
"planCodeId"
column=
"plan_code_id"
/>
<result
property=
"productCodeId"
column=
"product_code_id"
/>
<result
property=
"type"
column=
"type"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"isDel"
column=
"is_del"
/>
</resultMap>
<select
id=
"queryObject"
resultType=
"cn.timer.api.bean.insure.InsureProduct"
>
select *
from insure_product
where id = #{value}
</select>
<select
id=
"queryList"
resultType=
"cn.timer.api.bean.insure.InsureProduct"
>
select * from insure_product
<where>
<if
test=
"name != null and name != ''"
>
AND `name` = #{name}
</if>
<if
test=
"planCodeId != null and planCodeId != ''"
>
AND `plan_code_id` = #{planCodeId}
</if>
<if
test=
"productCodeId != null and productCodeId != ''"
>
AND `product_code_id` = #{productCodeId}
</if>
<if
test=
"type != null and type != ''"
>
AND `type` = #{type}
</if>
<if
test=
"createTime != null and createTime != ''"
>
AND `create_time` = #{createTime}
</if>
<if
test=
"isDel != null and isDel != ''"
>
AND `is_del` = #{isDel}
</if>
</where>
<choose>
<when
test=
"sidx != null and sidx.trim() != ''"
>
order by ${sidx} ${order}
</when>
<otherwise>
order by id desc
</otherwise>
</choose>
<if
test=
"offset != null and limit != null"
>
limit #{offset}, #{limit}
</if>
</select>
<select
id=
"queryTotal"
resultType=
"int"
>
select count(*) from insure_product
<where>
<if
test=
"name != null and name != ''"
>
AND `name` = #{name}
</if>
<if
test=
"planCodeId != null and planCodeId != ''"
>
AND `plan_code_id` = #{planCodeId}
</if>
<if
test=
"productCodeId != null and productCodeId != ''"
>
AND `product_code_id` = #{productCodeId}
</if>
<if
test=
"type != null and type != ''"
>
AND `type` = #{type}
</if>
<if
test=
"createTime != null and createTime != ''"
>
AND `create_time` = #{createTime}
</if>
<if
test=
"isDel != null and isDel != ''"
>
AND `is_del` = #{isDel}
</if>
</where>
</select>
<insert
id=
"save"
parameterType=
"cn.timer.api.bean.insure.InsureProduct"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into insure_product
(`name`,
`plan_code_id`,
`product_code_id`,
`type`,
`create_time`,
`is_del`)
values (#{name},
#{planCodeId},
#{productCodeId},
#{type},
#{createTime},
#{isDel})
</insert>
<insert
id=
"saveSelective"
parameterType=
"cn.timer.api.bean.insure.InsureProduct"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into insure_product
(
<if
test=
"name != null"
>
,`name`
</if>
<if
test=
"planCodeId != null"
>
,`plan_code_id`
</if>
<if
test=
"productCodeId != null"
>
,`product_code_id`
</if>
<if
test=
"type != null"
>
,`type`
</if>
<if
test=
"createTime != null"
>
,`create_time`
</if>
<if
test=
"isDel != null"
>
,`is_del`
</if>
)
values
(
<if
test=
"name != null"
>
,#{name}
</if>
<if
test=
"planCodeId != null"
>
,#{planCodeId}
</if>
<if
test=
"productCodeId != null"
>
,#{productCodeId}
</if>
<if
test=
"type != null"
>
,#{type}
</if>
<if
test=
"createTime != null"
>
,#{createTime}
</if>
<if
test=
"isDel != null"
>
,#{isDel}
</if>
)
</insert>
<insert
id=
"saveList"
parameterType=
"cn.timer.api.bean.insure.InsureProduct"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into insure_product
(
`name`,
`plan_code_id`,
`product_code_id`,
`type`,
`create_time`,
`is_del`
)
values
<foreach
collection=
"list"
item=
"item"
index=
"index"
separator=
","
>
(
#{item.name},
#{item.planCodeId},
#{item.productCodeId},
#{item.type},
#{item.createTime},
#{item.isDel}
)
</foreach>
</insert>
<update
id=
"update"
parameterType=
"cn.timer.api.bean.insure.InsureProduct"
>
update insure_product
<set>
<if
test=
"name != null"
>
`name` = #{name},
</if>
<if
test=
"planCodeId != null"
>
`plan_code_id` = #{planCodeId},
</if>
<if
test=
"productCodeId != null"
>
`product_code_id` = #{productCodeId},
</if>
<if
test=
"type != null"
>
`type` = #{type},
</if>
<if
test=
"createTime != null"
>
`create_time` = #{createTime},
</if>
<if
test=
"isDel != null"
>
`is_del` = #{isDel}
</if>
</set>
where id = #{id}
</update>
<delete
id=
"delete"
>
delete
from insure_product
where id = #{value}
</delete>
<delete
id=
"deleteBatch"
>
delete from insure_product where id in
<foreach
item=
"id"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</delete>
</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