Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
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
youjj
cloud-platform
Commits
7b263c4f
Commit
7b263c4f
authored
Dec 01, 2020
by
周健威
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature_chw_zjw' into dev-chw
parents
0fea0e9b
53515f38
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
302 additions
and
0 deletions
+302
-0
InsureUser.java
.../main/java/com/xxfc/platform/order/entity/InsureUser.java
+73
-0
OrderPersonInsurance.java
.../com/xxfc/platform/order/entity/OrderPersonInsurance.java
+35
-0
AddRentVehicleDTO.java
...xxfc/platform/order/pojo/order/add/AddRentVehicleDTO.java
+1
-0
InsureUserBiz.java
.../main/java/com/xxfc/platform/order/biz/InsureUserBiz.java
+18
-0
OrderAccountBiz.java
...ain/java/com/xxfc/platform/order/biz/OrderAccountBiz.java
+6
-0
InsureUserMapper.java
...java/com/xxfc/platform/order/mapper/InsureUserMapper.java
+15
-0
InsureUserController.java
...va/com/xxfc/platform/order/rest/InsureUserController.java
+137
-0
InsureUserMapper.xml
...der-server/src/main/resources/mapper/InsureUserMapper.xml
+17
-0
No files found.
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/entity/InsureUser.java
0 → 100755
View file @
7b263c4f
package
com
.
xxfc
.
platform
.
order
.
entity
;
import
java.io.Serializable
;
import
java.util.Date
;
import
javax.persistence.*
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* 保险人信息表
*
* @author libin
* @email 18178966185@163.com
* @date 2020-11-30 17:44:50
*/
@Data
@Table
(
name
=
"insure_user"
)
public
class
InsureUser
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键id
*/
@Id
@GeneratedValue
(
generator
=
"JDBC"
)
@ApiModelProperty
(
"主键id"
)
private
Integer
id
;
/**
* 用户id
*/
@Column
(
name
=
"userid"
)
@ApiModelProperty
(
value
=
"用户id"
)
private
Integer
userid
;
/**
* 姓名
*/
@Column
(
name
=
"name"
)
@ApiModelProperty
(
value
=
"姓名"
)
private
String
name
;
/**
* 身份证
*/
@Column
(
name
=
"id_card"
)
@ApiModelProperty
(
value
=
"身份证"
)
private
String
idCard
;
/**
* 创建时间
*/
@Column
(
name
=
"crt_time"
)
@ApiModelProperty
(
value
=
"创建时间"
,
hidden
=
true
)
private
Long
crtTime
;
/**
* 更新时间
*/
@Column
(
name
=
"upd_time"
)
@ApiModelProperty
(
value
=
"更新时间"
,
hidden
=
true
)
private
Long
updTime
;
/**
* 是否删除:0-正常;1-删除
*/
@Column
(
name
=
"isdel"
)
@ApiModelProperty
(
value
=
"是否删除:0-正常;1-删除"
)
private
Integer
isdel
;
}
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/entity/OrderPersonInsurance.java
View file @
7b263c4f
...
...
@@ -52,6 +52,41 @@ public class OrderPersonInsurance implements Serializable {
@Column
(
name
=
"id_card"
)
@ApiModelProperty
(
value
=
"身份证号码"
)
private
String
idCard
;
/**
* 投保人姓名
*/
@Column
(
name
=
"buy_insure_name"
)
@ApiModelProperty
(
value
=
"投保人姓名"
)
private
String
buyInsureName
;
/**
* 投保人身份证号码
*/
@Column
(
name
=
"buy_insure_id_card"
)
@ApiModelProperty
(
value
=
"投保人身份证号码"
)
private
String
buyInsureIdCard
;
/**
* 投保人手机号码
*/
@Column
(
name
=
"buy_insure_phone"
)
@ApiModelProperty
(
value
=
"投保人手机号码"
)
private
String
buyInsurePhone
;
/**
* 开始时间
*/
@Column
(
name
=
"start_time"
)
@ApiModelProperty
(
value
=
"开始时间"
)
private
Long
startTime
;
/**
* 结束时间
*/
@Column
(
name
=
"end_time"
)
@ApiModelProperty
(
value
=
"结束时间"
)
private
Long
endTime
;
/**
* 订单的天数
...
...
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/pojo/order/add/AddRentVehicleDTO.java
View file @
7b263c4f
...
...
@@ -138,6 +138,7 @@ public class AddRentVehicleDTO extends AddOrderCommonDTO{
public
static
final
int
GOODS_DEPOSIT_TYPE_DOWN
=
2
;
private
Integer
needPersonInsurance
=
SYS_FALSE
;
private
String
insureusersStr
;
private
List
<
OrderPersonInsurance
>
insurances
;
public
void
setStartTime
(
Long
startTime
)
{
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/InsureUserBiz.java
0 → 100755
View file @
7b263c4f
package
com
.
xxfc
.
platform
.
order
.
biz
;
import
org.springframework.stereotype.Service
;
import
com.xxfc.platform.order.entity.InsureUser
;
import
com.xxfc.platform.order.mapper.InsureUserMapper
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
/**
* 保险人信息表
*
* @author libin
* @email 18178966185@163.com
* @date 2020-11-30 17:44:50
*/
@Service
public
class
InsureUserBiz
extends
BaseBiz
<
InsureUserMapper
,
InsureUser
>
{
}
\ No newline at end of file
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/OrderAccountBiz.java
View file @
7b263c4f
...
...
@@ -891,4 +891,10 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
}
return
amount
;
}
public
static
void
main
(
String
[]
args
)
{
IntervalUtil
.
staticIsInTheInterval
(
"1"
,
"[1,2]"
);
System
.
out
.
println
(
"123"
);
}
}
\ No newline at end of file
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/mapper/InsureUserMapper.java
0 → 100755
View file @
7b263c4f
package
com
.
xxfc
.
platform
.
order
.
mapper
;
import
com.xxfc.platform.order.entity.InsureUser
;
import
tk.mybatis.mapper.common.Mapper
;
/**
* 保险人信息表
*
* @author libin
* @email 18178966185@163.com
* @date 2020-11-30 17:44:50
*/
public
interface
InsureUserMapper
extends
Mapper
<
InsureUser
>
{
}
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/rest/InsureUserController.java
0 → 100755
View file @
7b263c4f
package
com
.
xxfc
.
platform
.
order
.
rest
;
import
com.github.wxiaoqi.security.admin.feign.UserFeign
;
import
com.github.wxiaoqi.security.admin.feign.dto.AppUserDTO
;
import
com.github.wxiaoqi.security.admin.feign.rest.UserRestInterface
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.xxfc.platform.order.biz.InsureUserBiz
;
import
com.xxfc.platform.order.entity.InsureUser
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
import
static
com
.
github
.
wxiaoqi
.
security
.
common
.
constant
.
CommonConstants
.
SYS_FALSE
;
import
static
com
.
github
.
wxiaoqi
.
security
.
common
.
constant
.
CommonConstants
.
SYS_TRUE
;
@RestController
@RequestMapping
(
"/chw/insureUser"
)
@Slf4j
public
class
InsureUserController
extends
BaseController
<
InsureUserBiz
,
InsureUser
>
implements
UserRestInterface
{
@Autowired
UserFeign
userFeign
;
@Override
public
UserFeign
getUserFeign
()
{
return
userFeign
;
}
/**
* 添加和更新
* @param insureUser
* @return
*/
@ApiOperation
(
"插入和更新"
)
@PostMapping
(
value
=
"/app/addAndUpdate"
)
@Transactional
public
ObjectRestResponse
<
InsureUser
>
addAndUpdate
(
@RequestBody
InsureUser
insureUser
){
try
{
if
(
insureUser
.
getId
()==
null
||
insureUser
.
getId
()==
0
)
{
AppUserDTO
userInfo
=
getAppUser
();
if
(
userInfo
==
null
||
userInfo
.
getUserid
()==
null
||
userInfo
.
getUserid
()==
0
)
{
return
ObjectRestResponse
.
createDefaultFail
();
}
Integer
userid
=
userInfo
.
getUserid
();
InsureUser
insureUser1
=
new
InsureUser
();
insureUser1
.
setUserid
(
userid
);
insureUser1
.
setIdCard
(
insureUser
.
getIdCard
());
insureUser1
.
setIsdel
(
0
);
insureUser1
=
baseBiz
.
selectOne
(
insureUser1
);
if
(
insureUser1
!=
null
){
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
FAILED_CODE
,
"保险人证件号一样"
);
}
insureUser
.
setUserid
(
userid
);
insureUser
.
setCrtTime
(
System
.
currentTimeMillis
());
insureUser
.
setIsdel
(
0
);
baseBiz
.
insertSelective
(
insureUser
);
}
else
{
insureUser
.
setUpdTime
(
System
.
currentTimeMillis
());
baseBiz
.
updateSelectiveById
(
insureUser
);
}
return
new
ObjectRestResponse
<
InsureUser
>();
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);;
throw
new
BaseException
(
ResultCode
.
FAILED_CODE
);
}
}
/**
* 删除
* @param
* @return
*/
@ApiOperation
(
"删除"
)
@PostMapping
(
value
=
"/app/del"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
ObjectRestResponse
<
InsureUser
>
del
(
@RequestBody
InsureUser
insureUser
){
try
{
baseBiz
.
updateSelectiveById
(
new
InsureUser
()
{{
setId
(
insureUser
.
getId
());
setIsdel
(
SYS_TRUE
);
}});
return
ObjectRestResponse
.
succ
();
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);;
throw
new
BaseException
(
ResultCode
.
FAILED_CODE
);
}
}
@ApiOperation
(
"通过id查询"
)
@GetMapping
(
value
=
"/app/findById/{id}"
)
public
ObjectRestResponse
<
InsureUser
>
findById
(
@PathVariable
Integer
id
){
AppUserDTO
userInfo
=
getAppUser
();
if
(
userInfo
==
null
||
userInfo
.
getUserid
()==
null
||
userInfo
.
getUserid
()==
0
)
{
ObjectRestResponse
.
createDefaultFail
();
}
Integer
userid
=
userInfo
.
getUserid
();
InsureUser
user
=
new
InsureUser
();
user
.
setUserid
(
userid
);
user
.
setId
(
id
);
if
(
id
==
null
||
id
==
0
)
{
ObjectRestResponse
.
createDefaultFail
();
}
return
ObjectRestResponse
.
succ
(
baseBiz
.
selectList
(
user
));
}
/**
* 获取全部出游人信息
* @return
*/
@GetMapping
(
"/app/getInsureUserAll"
)
public
ObjectRestResponse
getInsureUser
(){
AppUserDTO
userInfo
=
getAppUser
();
if
(
userInfo
==
null
||
userInfo
.
getUserid
()==
null
||
userInfo
.
getUserid
()==
0
)
{
ObjectRestResponse
.
createDefaultFail
();
}
Integer
id
=
userInfo
.
getUserid
();
List
<
InsureUser
>
insureUsers
=
baseBiz
.
selectByWeekend
(
w
->
{
w
.
andEqualTo
(
InsureUser:
:
getIsdel
,
SYS_FALSE
);
w
.
andEqualTo
(
InsureUser:
:
getUserid
,
id
);
return
w
;
},
" crt_time desc "
);
return
ObjectRestResponse
.
succ
(
insureUsers
);
}
}
\ No newline at end of file
xx-order/xx-order-server/src/main/resources/mapper/InsureUserMapper.xml
0 → 100755
View file @
7b263c4f
<?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.xxfc.platform.order.mapper.InsureUserMapper"
>
<!-- 可根据自己的需求,是否要使用 -->
<resultMap
type=
"com.xxfc.platform.order.entity.InsureUser"
id=
"insureUserMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"userid"
column=
"userid"
/>
<result
property=
"name"
column=
"name"
/>
<result
property=
"idCard"
column=
"id_card"
/>
<result
property=
"crtTime"
column=
"crt_time"
/>
<result
property=
"updTime"
column=
"upd_time"
/>
<result
property=
"isdel"
column=
"isdel"
/>
</resultMap>
</mapper>
\ No newline at end of file
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