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
e23ab490
Commit
e23ab490
authored
Nov 02, 2020
by
周健威
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev-chw' into dev-chw
parents
0b0882ef
ed08c194
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
189 additions
and
109 deletions
+189
-109
systemconfig.properties
...mon/src/main/resources/properties/systemconfig.properties
+5
-5
UserCommentVo.java
...a/com/github/wxiaoqi/security/admin/vo/UserCommentVo.java
+3
-0
BaseOrderAcceptDetailedBiz.java
...xiaoqi/security/admin/biz/BaseOrderAcceptDetailedBiz.java
+31
-14
AppBranchCompanyController.java
...iaoqi/security/admin/rest/AppBranchCompanyController.java
+7
-0
UserCommentMapper.xml
...ace-admin/src/main/resources/mapper/UserCommentMapper.xml
+2
-0
ActivityDTO.java
...main/java/com/xxfc/platform/activity/dto/ActivityDTO.java
+2
-0
Activity.java
...main/java/com/xxfc/platform/activity/entity/Activity.java
+2
-2
ActivityBiz.java
...main/java/com/xxfc/platform/activity/biz/ActivityBiz.java
+28
-10
WebConfiguration.java
...a/com/xxfc/platform/activity/config/WebConfiguration.java
+3
-1
ActivityMapper.java
...ava/com/xxfc/platform/activity/mapper/ActivityMapper.java
+2
-1
ActivityController.java
...a/com/xxfc/platform/activity/rest/ActivityController.java
+22
-0
ActivityMapper.xml
...ivity-server/src/main/resources/mapper/ActivityMapper.xml
+7
-1
OrderViolationController.java
...om/xxfc/platform/order/rest/OrderViolationController.java
+75
-75
No files found.
ace-common/src/main/resources/properties/systemconfig.properties
View file @
e23ab490
...
...
@@ -50,12 +50,12 @@ weixinHost=xxtest.upyuns.com
APICLIENT_CERT
=
D:
\\
cert
\\
1514583081_20181017_cert.p12
#\u652F\u4ED8\u5B9D\u914D\u7F6E
ALIPAY_APPID
=
20
21002105612008
ALIPAY_PID
=
2088
231782582000
ALIPAY_APPID
=
20
19070965781964
ALIPAY_PID
=
2088
531634846583
#\u652F\u4ED8\u5B9D\u516C\u94A5
ALIPAY_PUBLIC_KEY
=
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
sNKvomBS4ZfJXY/cO03z7ocy86/L3dR7YMftKOiVlQXZQc3gBLVCYtcI6T3+haom+xx1UMEz1p3FtFZiZuq+wxbok9XsYPpjoMH+R4QHe8wjyIbR5m73veJWtSe+WGTWrIkOnbuOc+n+ZD8Fv4A5XDRvnTLV1dm+Ax2d7pkAUyNc3lvAs8pkYMszQ3pqxacL66x1EjG7AM0lNW2QuRPPoJKUwrCCgdBQA3Gpyp1led4WYpy4RGnJAtSyzKU1elPXeGqGtwAfS+DnetOKOMVndWfSqZuEwzEP0ZdT8FgEcLqn+1xgMVIPMJ2GuLEekOuPQeq2wAsuYC5DpQ8CJqRXK
QIDAQAB
ALIPAY_ACOUNT
=
hjingyou@upyuns
.com
ALIPAY_PRIVATE_KEY
=
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC
MAEco0Ev98cCPxPtsSIEVrPa9828K112l4hG2Nk+G2CnFgku9EuIQUTP2wf6YJKAR1F5mfXnEcX2LURjhuvaudhIq8Eh4veiaKvGhVOdOc2w5GIhYptaV4VKopJNgOVmn7EMl0TGIkAP31sBJpXph7maS/lk+q86uE+tW5CfnQG3s2Znt8sNA/3vaArSbndENgDsWxNAwDERBxxaQ0A4MLTF4dNJ5ignfJ+dPCf9hl/d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AoGARD8/IeEzMCPfYr9zBkE5rBtiT7t6nZXmMc6GH2Vao9meDofN8vj/XEfTGovusUYTWyA2Enac0YKdK6f6f+NYBqGYqn5Ludgxeotzo9UoXd3Hnv1gMCRs4ehloVODkHj2qhkvqL2iuZLsNp/wMq/ZHpRUzT4bO5H2FQhH4SUElKI
=
#
#ALIPAY_APPID=2016100100641990
#ALIPAY_PID=2088102178153042
...
...
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/vo/UserCommentVo.java
View file @
e23ab490
...
...
@@ -32,6 +32,9 @@ public class UserCommentVo extends UserComment {
@ApiModelProperty
(
"用户名称"
)
private
String
toUserName
;
@ApiModelProperty
(
"to用户头像"
)
private
String
toHeadimgurl
;
private
PageDataVO
<
UserCommentVo
>
childer
;
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/BaseOrderAcceptDetailedBiz.java
View file @
e23ab490
...
...
@@ -10,6 +10,7 @@ import com.github.wxiaoqi.security.common.biz.BaseBiz;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.xxfc.platform.vehicle.pojo.dto.order.VMCalendarPriceCostDTO
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.BeanUtils
;
...
...
@@ -84,7 +85,7 @@ public class BaseOrderAcceptDetailedBiz extends BaseBiz<BaseOrderAcceptDetailedM
}
}
//
购买计算用户拥金
//
下单分账
public
void
payOrderAccept
(
OrderWaterDTO
orderWaterDTO
)
{
//订单id
Integer
orderId
=
orderWaterDTO
.
getOrderId
()
==
null
?
0
:
orderWaterDTO
.
getOrderId
();
...
...
@@ -104,8 +105,19 @@ public class BaseOrderAcceptDetailedBiz extends BaseBiz<BaseOrderAcceptDetailedM
List
<
BaseCommissionRatio
>
baseCommissionRatios
=
commissionRatioBiz
.
getList
();
BigDecimal
amount
=
BigDecimal
.
ZERO
;
BigDecimal
companyDivisionAmount
=
orderAmount
;
if
(
baseCommissionRatios
.
size
()
>
0
){
//先计算分给店铺
BigDecimal
companyExtrac
=
baseCommissionRatios
.
stream
().
map
(
BaseCommissionRatio:
:
getExtract
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
);
companyExtrac
=
new
BigDecimal
(
100
).
subtract
(
companyExtrac
);
//店铺金额
companyDivisionAmount
=
orderAmount
.
multiply
(
companyExtrac
).
divide
(
new
BigDecimal
(
100
)).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
//其他金额
BigDecimal
otherDivisionAmount
=
orderAmount
.
subtract
(
companyDivisionAmount
);
Integer
num
=
0
;
for
(
BaseCommissionRatio
commissionRatio:
baseCommissionRatios
){
num
++;
Integer
type
=
commissionRatio
.
getType
()
==
null
?
0
:
commissionRatio
.
getType
();
Integer
mchId
=
0
;
Integer
divisionType
=
0
;
...
...
@@ -131,7 +143,12 @@ public class BaseOrderAcceptDetailedBiz extends BaseBiz<BaseOrderAcceptDetailedM
if
(
type
!=
3
&&
mchId
==
0
){
continue
;
}
BigDecimal
divisionAmount
=
orderAmount
.
multiply
(
commissionRatio
.
getExtract
()).
divide
(
new
BigDecimal
(
100
)).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
BigDecimal
divisionAmount
;
if
(
num
.
equals
(
baseCommissionRatios
.
size
())){
divisionAmount
=
otherDivisionAmount
.
subtract
(
amount
);
}
else
{
divisionAmount
=
otherDivisionAmount
.
multiply
(
commissionRatio
.
getExtract
()).
divide
(
new
BigDecimal
(
100
)).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
}
BaseOrderAcceptDetailed
acceptDetailed
=
new
BaseOrderAcceptDetailed
();
BeanUtils
.
copyProperties
(
orderWaterDTO
,
acceptDetailed
);
acceptDetailed
.
setMchId
(
mchId
);
...
...
@@ -147,18 +164,18 @@ public class BaseOrderAcceptDetailedBiz extends BaseBiz<BaseOrderAcceptDetailedM
sellingWaterBiz
.
payOrderWater
(
orderWaterDTO
);
}
}
if
(
orderAmount
.
compareTo
(
amount
)
>
0
){
BigDecimal
divisionAmount
=
orderAmount
.
subtract
(
amount
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
BaseOrderAcceptDetailed
acceptDetailed
=
new
BaseOrderAcceptDetailed
();
BeanUtils
.
copyProperties
(
orderWaterDTO
,
acceptDetailed
);
acceptDetailed
.
setMchId
(
companyId
);
acceptDetailed
.
setOrderAmount
(
orderAmount
);
acceptDetailed
.
setDivisionAmount
(
d
ivisionAmount
);
acceptDetailed
.
setDivisionType
(
5
);
acceptDetailed
.
setAddTime
(
System
.
currentTimeMillis
());
acceptDetailed
.
setStatus
(
0
);
insertSelective
(
acceptDetailed
);
}
//店铺分账
BaseOrderAcceptDetailed
acceptDetailed
=
new
BaseOrderAcceptDetailed
();
BeanUtils
.
copyProperties
(
orderWaterDTO
,
acceptDetailed
);
acceptDetailed
.
setMchId
(
companyId
);
acceptDetailed
.
setOrderAmount
(
orderAmount
);
acceptDetailed
.
setDivisionAmount
(
companyD
ivisionAmount
);
acceptDetailed
.
setDivisionType
(
5
);
acceptDetailed
.
setAddTime
(
System
.
currentTimeMillis
());
acceptDetailed
.
setStatus
(
0
);
insertSelective
(
acceptDetailed
);
}
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/AppBranchCompanyController.java
View file @
e23ab490
...
...
@@ -3,6 +3,7 @@ package com.github.wxiaoqi.security.admin.rest;
import
com.github.wxiaoqi.security.admin.biz.BranchCompanyBiz
;
import
com.github.wxiaoqi.security.admin.biz.BranchCompanyGiveBiz
;
import
com.github.wxiaoqi.security.admin.dto.CompanySearchDTO
;
import
com.github.wxiaoqi.security.admin.entity.BranchCompany
;
import
com.github.wxiaoqi.security.admin.entity.BranchCompanyGive
;
import
com.github.wxiaoqi.security.admin.entity.CompanyInfo
;
import
com.github.wxiaoqi.security.admin.vo.CompanySearchVO
;
...
...
@@ -71,6 +72,12 @@ public class AppBranchCompanyController extends BaseController<BranchCompanyBiz>
return
ObjectRestResponse
.
succ
(
list
.
get
(
0
));
}
@PostMapping
(
"addOrUpd"
)
@ApiModelProperty
(
"店铺更新"
)
public
ObjectRestResponse
addOrUpd
(
@RequestBody
BranchCompany
branchCompany
)
{
return
baseBiz
.
addOrUpd
(
branchCompany
);
}
@GetMapping
(
"checkGive"
)
@ApiModelProperty
(
"检查点赞"
)
...
...
ace-modules/ace-admin/src/main/resources/mapper/UserCommentMapper.xml
View file @
e23ab490
...
...
@@ -7,7 +7,9 @@
SELECT
c.*,
IFNULL(d1.realname,d1.nickname) as userName,
d1.headimgurl as headimgurl,
IFNULL(d2.realname,d2.nickname) as toUserName,
d2.headimgurl as toHeadimgurl,
b.`name`as companyName
FROM user_comment c
LEFT JOIN app_user_detail d1 ON c.user_id=d1.userid
...
...
xx-activity/xx-activity-api/src/main/java/com/xxfc/platform/activity/dto/ActivityDTO.java
View file @
e23ab490
...
...
@@ -24,5 +24,7 @@ public class ActivityDTO extends PageParam {
private
Long
endTime
;
private
Integer
goodsType
;
private
Integer
type
;
private
Integer
userId
;
private
Integer
activityId
;
}
xx-activity/xx-activity-api/src/main/java/com/xxfc/platform/activity/entity/Activity.java
View file @
e23ab490
...
...
@@ -177,9 +177,9 @@ public class Activity implements Serializable {
/**
* 创建人id
*/
@Column
(
name
=
"
ctr_user
"
)
@Column
(
name
=
"
user_id
"
)
@ApiModelProperty
(
value
=
"创建人id"
)
private
Integer
ctrUser
;
private
Integer
userId
;
/**
* 修改时间
...
...
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/biz/ActivityBiz.java
View file @
e23ab490
...
...
@@ -3,7 +3,6 @@ package com.xxfc.platform.activity.biz;
import
com.github.wxiaoqi.security.admin.feign.UserFeign
;
import
com.github.wxiaoqi.security.admin.vo.AppUserVo
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.util.Query
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.xxfc.platform.activity.dto.ActivityDTO
;
import
com.xxfc.platform.activity.vo.ActivityVo
;
...
...
@@ -40,20 +39,29 @@ public class ActivityBiz extends BaseBiz<ActivityMapper, Activity> {
public
ObjectRestResponse
<
PageDataVO
<
ActivityVo
>>
getAllByPage
(
ActivityDTO
activityDTO
)
{
Integer
page
=
activityDTO
.
getPage
()
==
null
?
1
:
activityDTO
.
getPage
();
Integer
limit
=
activityDTO
.
getLimit
()
==
null
?
10
:
activityDTO
.
getLimit
();
activityDTO
.
setPage
(
page
);
activityDTO
.
setLimit
(
limit
);
Query
query
=
new
Query
(
activityDTO
);
PageDataVO
<
ActivityVo
>
pageDataVO
=
PageDataVO
.
pageInfo
(
query
,
()
->
mapper
.
getAllByPage
(
query
.
getSuper
()));
PageDataVO
<
ActivityVo
>
pageDataVO
=
PageDataVO
.
pageInfo
(
page
,
limit
,()->
getList
(
activityDTO
)
);
List
<
ActivityVo
>
list
=
pageDataVO
.
getData
();
setUserInfo
(
list
);
return
ObjectRestResponse
.
succ
(
pageDataVO
);
}
public
List
<
ActivityVo
>
getList
(
ActivityDTO
activityDTO
){
return
mapper
.
getAllByPage
(
activityDTO
);
}
public
void
setUserInfo
(
List
<
ActivityVo
>
list
){
if
(
CollectionUtils
.
isNotEmpty
(
list
)){
List
<
Integer
>
userIds
=
list
.
stream
().
map
(
ActivityVo:
:
get
CtrUser
).
distinct
().
collect
(
Collectors
.
toList
());
List
<
Integer
>
userIds
=
list
.
stream
().
map
(
ActivityVo:
:
get
UserId
).
distinct
().
collect
(
Collectors
.
toList
());
List
<
AppUserVo
>
appUserVos
=
userFeign
.
getByUserIds
(
userIds
).
getData
();
Map
<
Integer
,
AppUserVo
>
userMap
=
new
HashMap
<>();
if
(
CollectionUtils
.
isNotEmpty
(
appUserVos
)){
userMap
=
appUserVos
.
stream
().
collect
(
Collectors
.
toMap
(
AppUserVo:
:
getUserid
,
Function
.
identity
()));
userMap
=
appUserVos
.
stream
().
collect
(
Collectors
.
toMap
(
AppUserVo:
:
getUserid
,
Function
.
identity
()));
}
for
(
ActivityVo
activityVo
:
list
){
AppUserVo
appUserVo
=
userMap
.
get
(
activityVo
.
get
CtrUser
());
AppUserVo
appUserVo
=
userMap
.
get
(
activityVo
.
get
UserId
());
if
(
appUserVo
!=
null
){
activityVo
.
setHeadimgurl
(
appUserVo
.
getHeadimgurl
());
activityVo
.
setNickname
(
appUserVo
.
getNickname
());
...
...
@@ -62,6 +70,16 @@ public class ActivityBiz extends BaseBiz<ActivityMapper, Activity> {
}
}
}
return
ObjectRestResponse
.
succ
(
pageDataVO
);
}
}
\ No newline at end of file
public
ActivityVo
getActivityInfo
(
ActivityDTO
activityDTO
){
List
<
ActivityVo
>
list
=
getList
(
activityDTO
);
if
(
list
.
size
()
>
0
){
setUserInfo
(
list
);
return
list
.
get
(
0
);
}
return
null
;
}
}
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/config/WebConfiguration.java
View file @
e23ab490
...
...
@@ -53,7 +53,9 @@ public class WebConfiguration implements WebMvcConfigurer {
private
ArrayList
<
String
>
getIncludePathPatterns
()
{
ArrayList
<
String
>
list
=
new
ArrayList
<>();
String
[]
urls
=
{
"/activityPopularize/**"
"/activityPopularize/**"
,
"/app/**"
,
"/admin/**"
,
};
Collections
.
addAll
(
list
,
urls
);
return
list
;
...
...
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/mapper/ActivityMapper.java
View file @
e23ab490
package
com
.
xxfc
.
platform
.
activity
.
mapper
;
import
com.xxfc.platform.activity.dto.ActivityDTO
;
import
com.xxfc.platform.activity.entity.Activity
;
import
com.xxfc.platform.activity.vo.ActivityLuckyDrawListVo
;
import
com.xxfc.platform.activity.vo.ActivityVo
;
...
...
@@ -16,5 +17,5 @@ import java.util.Map;
* @date 2020-10-08 09:48:35
*/
public
interface
ActivityMapper
extends
Mapper
<
Activity
>
{
List
<
ActivityVo
>
getAllByPage
(
Map
<
String
,
Object
>
param
);
List
<
ActivityVo
>
getAllByPage
(
ActivityDTO
activityDTO
);
}
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/rest/ActivityController.java
View file @
e23ab490
...
...
@@ -37,4 +37,26 @@ public class ActivityController extends BaseController<ActivityBiz, Activity> {
return
ObjectRestResponse
.
succ
(
activityTypeBiz
.
getList
());
}
@GetMapping
(
"selectListByUserId"
)
public
ObjectRestResponse
<
PageDataVO
<
ActivityVo
>>
selectListByUserId
(
ActivityDTO
activityDTO
)
{
activityDTO
.
setUserId
(
getCurrentUserIdInt
());
return
baseBiz
.
getAllByPage
(
activityDTO
);
}
@GetMapping
(
"app/unauth/info"
)
@IgnoreUserToken
public
ObjectRestResponse
<
ActivityVo
>
info
(
ActivityDTO
activityDTO
)
{
return
ObjectRestResponse
.
succ
(
baseBiz
.
getActivityInfo
(
activityDTO
));
}
@PostMapping
(
"add"
)
public
ObjectRestResponse
<
PageDataVO
<
ActivityVo
>>
selectList
(
@RequestBody
Activity
activity
)
{
activity
.
setUserId
(
getCurrentUserIdInt
());
baseBiz
.
insertSelective
(
activity
);
return
ObjectRestResponse
.
succ
();
}
}
\ No newline at end of file
xx-activity/xx-activity-server/src/main/resources/mapper/ActivityMapper.xml
View file @
e23ab490
...
...
@@ -31,7 +31,7 @@
<result
property=
"isSee"
column=
"is_see"
/>
</resultMap>
<select
id=
"getAllByPage"
resultType=
"com.xxfc.platform.activity.vo.ActivityVo"
parameterType=
"
Map
"
>
<select
id=
"getAllByPage"
resultType=
"com.xxfc.platform.activity.vo.ActivityVo"
parameterType=
"
com.xxfc.platform.activity.dto.ActivityDTO
"
>
select a.*,t.name as typeName from `activity` a
LEFT JOIN activity_type t on a.type=t.type
<where>
...
...
@@ -41,6 +41,12 @@
<if
test=
"type != null"
>
and a.`type`=#{type}
</if>
<if
test=
"userId != null and userId > 0"
>
and a.`user_id`=#{userId}
</if>
<if
test=
"activityId != null and activityId > 0"
>
and a.`id`=#{activityId}
</if>
<if
test=
"startTime != null and startTime > 0"
>
and
<![CDATA[
a.`crt_time` >
= #{startTime}
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/rest/OrderViolationController.java
View file @
e23ab490
...
...
@@ -34,88 +34,88 @@ import java.util.List;
@Slf4j
public
class
OrderViolationController
extends
BaseController
<
OrderViolationBiz
,
OrderViolation
>
implements
UserRestInterface
{
@Autowired
private
UserFeign
userFeign
;
@Autowired
OrderDepositRefundRecordBiz
orderDepositRefundRecordBiz
;
@Override
public
UserFeign
getUserFeign
()
{
return
userFeign
;
}
@Autowired
private
UserFeign
userFeign
;
@Autowired
OrderDepositRefundRecordBiz
orderDepositRefundRecordBiz
;
private
Long
MAX_DRIVING_LICENSE_SIZE
=
1024
*
1024
*
50L
;
@Override
public
UserFeign
getUserFeign
()
{
return
userFeign
;
}
private
final
String
FILE_TYPE
=
"JPG"
;
private
Long
MAX_DRIVING_LICENSE_SIZE
=
1024
*
1024
*
50L
;
/**
* 保存违章记录
*
* @param orderViolation
* @param request
* @return
*/
@PostMapping
(
"/saveOrderViolation"
)
public
ObjectRestResponse
saveOrderViolation
(
@RequestBody
OrderViolation
orderViolation
,
HttpServletRequest
request
)
{
log
.
info
(
"保存违章记录:orderViolation = {}"
,
orderViolation
.
toString
());
UserDTO
userDTOD
=
getAdminUserInfo
();
if
(
orderViolation
.
getId
()==
null
)
{
orderViolation
.
setIsDel
(
0
);
orderViolation
.
setCrtHost
(
request
.
getRemoteHost
());
orderViolation
.
setCrtName
(
userDTOD
.
getName
());
orderViolation
.
setCrtUserId
(
userDTOD
.
getId
());
orderViolation
.
setCrtTime
(
new
BigInteger
(
String
.
valueOf
(
System
.
currentTimeMillis
())));
getBaseBiz
().
insertOrderViolation
(
orderViolation
);
}
else
{
orderViolation
.
setUpdHost
(
request
.
getRemoteHost
());
orderViolation
.
setUpdName
(
userDTOD
.
getName
());
orderViolation
.
setUpdUserId
(
userDTOD
.
getId
());
orderViolation
.
setUpdTime
(
new
BigInteger
(
String
.
valueOf
(
System
.
currentTimeMillis
())));
getBaseBiz
().
updateOrderViolation
(
orderViolation
);
}
orderDepositRefundRecordBiz
.
saveViolationDeposit
(
orderViolation
);
return
ObjectRestResponse
.
succ
();
}
private
final
String
FILE_TYPE
=
"JPG"
;
/**
* 通过订单id查询违章记录
*
* @param detailId
* @return
*/
@GetMapping
(
"/getOne/{detailId}"
)
public
ObjectRestResponse
<
OrderViolation
>
getOne
(
@PathVariable
Integer
detailId
)
{
Example
exa
=
Example
.
builder
(
OrderViolation
.
class
)
.
where
(
WeekendSqls
.<
OrderViolation
>
custom
().
andEqualTo
(
OrderViolation:
:
getDetailId
,
detailId
)
.
andEqualTo
(
OrderViolation:
:
getIsDel
,
0
)).
build
();
List
<
OrderViolation
>
orderViolations
=
getBaseBiz
().
selectByExample
(
exa
);
if
(
orderViolations
.
size
()
>
1
)
{
throw
new
BaseException
(
"The database has multiple records"
);
}
OrderViolation
orderViolation
=
new
OrderViolation
();
orderViolation
=(
orderViolations
.
size
()==
0
)?
null
:
orderViolations
.
get
(
0
);
return
ObjectRestResponse
.
succ
(
orderViolation
);
}
/**
* 保存违章记录
*
* @param orderViolation
* @param request
* @return
*/
@PostMapping
(
"/saveOrderViolation"
)
public
ObjectRestResponse
saveOrderViolation
(
@RequestBody
OrderViolation
orderViolation
,
HttpServletRequest
request
)
{
log
.
info
(
"保存违章记录:orderViolation = {}"
,
orderViolation
.
toString
());
UserDTO
userDTOD
=
getBusinessUserByAppUser
();
if
(
orderViolation
.
getId
()
==
null
)
{
orderViolation
.
setIsDel
(
0
);
orderViolation
.
setCrtHost
(
request
.
getRemoteHost
());
orderViolation
.
setCrtName
(
userDTOD
.
getName
());
orderViolation
.
setCrtUserId
(
userDTOD
.
getId
());
orderViolation
.
setCrtTime
(
new
BigInteger
(
String
.
valueOf
(
System
.
currentTimeMillis
())));
getBaseBiz
().
insertOrderViolation
(
orderViolation
);
}
else
{
orderViolation
.
setUpdHost
(
request
.
getRemoteHost
());
orderViolation
.
setUpdName
(
userDTOD
.
getName
());
orderViolation
.
setUpdUserId
(
userDTOD
.
getId
());
orderViolation
.
setUpdTime
(
new
BigInteger
(
String
.
valueOf
(
System
.
currentTimeMillis
())));
getBaseBiz
().
updateOrderViolation
(
orderViolation
);
}
orderDepositRefundRecordBiz
.
saveViolationDeposit
(
orderViolation
);
return
ObjectRestResponse
.
succ
();
}
/**
* 通过订单id查询违章记录
*
* @param detailId
* @return
*/
@GetMapping
(
"/getOne/{detailId}"
)
public
ObjectRestResponse
<
OrderViolation
>
getOne
(
@PathVariable
Integer
detailId
)
{
Example
exa
=
Example
.
builder
(
OrderViolation
.
class
)
.
where
(
WeekendSqls
.<
OrderViolation
>
custom
().
andEqualTo
(
OrderViolation:
:
getDetailId
,
detailId
)
.
andEqualTo
(
OrderViolation:
:
getIsDel
,
0
)).
build
();
List
<
OrderViolation
>
orderViolations
=
getBaseBiz
().
selectByExample
(
exa
);
if
(
orderViolations
.
size
()
>
1
)
{
throw
new
BaseException
(
"The database has multiple records"
);
}
OrderViolation
orderViolation
=
new
OrderViolation
();
orderViolation
=
(
orderViolations
.
size
()
==
0
)
?
null
:
orderViolations
.
get
(
0
);
return
ObjectRestResponse
.
succ
(
orderViolation
);
}
@PostMapping
(
value
=
"/upload/violation"
)
public
ObjectRestResponse
uploadViolation
(
@RequestParam
(
"file"
)
MultipartFile
file
)
throws
Exception
{
Assert
.
notNull
(
file
);
//文件类型
String
contentType
=
file
.
getContentType
();
if
(!
FILE_TYPE
.
equalsIgnoreCase
(
contentType
)||
"png"
.
equalsIgnoreCase
(
contentType
))
{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
FAILED_CODE
,
"Picture format error"
);
}
if
(
file
.
getSize
()
>
MAX_DRIVING_LICENSE_SIZE
)
{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
FAILED_CODE
,
"Picture is too large"
);
}
return
baseBiz
.
uploadViolation
(
file
);
}
@PostMapping
(
value
=
"/upload/violation"
)
public
ObjectRestResponse
uploadViolation
(
@RequestParam
(
"file"
)
MultipartFile
file
)
throws
Exception
{
Assert
.
notNull
(
file
);
//文件类型
String
contentType
=
file
.
getContentType
();
if
(!
FILE_TYPE
.
equalsIgnoreCase
(
contentType
)
||
"png"
.
equalsIgnoreCase
(
contentType
))
{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
FAILED_CODE
,
"Picture format error"
);
}
if
(
file
.
getSize
()
>
MAX_DRIVING_LICENSE_SIZE
)
{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
FAILED_CODE
,
"Picture is too large"
);
}
return
baseBiz
.
uploadViolation
(
file
);
}
@GetMapping
(
value
=
"/download/Violation/{realFileRelPath}"
)
//匹配的是href中的download请求
public
ResponseEntity
<
byte
[]>
downloadViolation
(
@RequestParam
(
"realFileRelPath"
)
String
realFileRelPath
)
throws
Exception
{
return
baseBiz
.
downloadViolation
(
realFileRelPath
);
}
@GetMapping
(
value
=
"/download/Violation/{realFileRelPath}"
)
//匹配的是href中的download请求
public
ResponseEntity
<
byte
[]>
downloadViolation
(
@RequestParam
(
"realFileRelPath"
)
String
realFileRelPath
)
throws
Exception
{
return
baseBiz
.
downloadViolation
(
realFileRelPath
);
}
}
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