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
75fd0975
Commit
75fd0975
authored
Aug 15, 2019
by
周健威
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
7b31b136
e041efcc
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
114 additions
and
17 deletions
+114
-17
StringToolsUtil.java
.../github/wxiaoqi/security/common/util/StringToolsUtil.java
+43
-0
CofigBiz.java
...ver/src/main/java/com/xxfc/platform/app/biz/CofigBiz.java
+1
-1
BackStageOrderController.java
...om/xxfc/platform/order/rest/BackStageOrderController.java
+1
-0
CustomerBehaviorNotesBiz.java
.../platform/user/behavior/biz/CustomerBehaviorNotesBiz.java
+1
-1
CustomerBehaviorNotesMapper.java
...orm/user/behavior/mapper/CustomerBehaviorNotesMapper.java
+1
-1
CustomerBehaviorNotesMapper.xml
...src/main/resources/mapper/CustomerBehaviorNotesMapper.xml
+10
-1
ResCode.java
...a/com/xxfc/platform/vehicle/constant/ResCode/ResCode.java
+2
-0
QueryVehicleWarningMsgVo.java
.../xxfc/platform/vehicle/pojo/QueryVehicleWarningMsgVo.java
+4
-0
VehicleActiveService.java
...a/com/xxfc/platform/vehicle/biz/VehicleActiveService.java
+13
-0
VehicleWarningMsgBiz.java
...a/com/xxfc/platform/vehicle/biz/VehicleWarningMsgBiz.java
+25
-2
VehicleMapper.xml
...ehicle-server/src/main/resources/mapper/VehicleMapper.xml
+3
-3
VehicleWarningMsgMapper.xml
...ver/src/main/resources/mapper/VehicleWarningMsgMapper.xml
+10
-8
No files found.
ace-common/src/main/java/com/github/wxiaoqi/security/common/util/StringToolsUtil.java
0 → 100644
View file @
75fd0975
package
com
.
github
.
wxiaoqi
.
security
.
common
.
util
;
import
org.apache.commons.lang3.StringUtils
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
public
class
StringToolsUtil
{
/**
* 验证手机号码
* @param mobiles
* @return
*/
public
static
boolean
isMobileNO
(
String
mobiles
){
boolean
flag
=
false
;
try
{
if
(
StringUtils
.
isBlank
(
mobiles
))
{
flag
=
false
;
}
Pattern
regex
=
Pattern
.
compile
(
"^((16[0-9])|(13[0-9])|(15[^4,\\D])|(17[0-9])|(18[0-9])|(19[0-9]))\\d{8}$"
);
Matcher
m
=
regex
.
matcher
(
mobiles
);
flag
=
m
.
matches
();
}
catch
(
Exception
e
){
flag
=
false
;
}
return
flag
;
}
/**
* 校验身份证
*
* @param idCard
* @return 校验通过返回true,否则返回false
*/
public
static
boolean
isIDCard
(
String
idCard
)
{
if
(
StringUtils
.
isBlank
(
idCard
))
{
return
false
;
}
String
REGEX_ID_CARD
=
"(^\\d{18}$)|(^\\d{15}$)"
;
return
Pattern
.
matches
(
REGEX_ID_CARD
,
idCard
);
}
}
xx-app/xx-app-server/src/main/java/com/xxfc/platform/app/biz/CofigBiz.java
View file @
75fd0975
...
...
@@ -77,7 +77,7 @@ public class CofigBiz extends BaseBiz<CofigMapper, Cofig> {
Example
example
=
new
Example
(
Cofig
.
class
);
Example
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andEqualTo
(
"isDel"
,
0
);
example
.
setOrderByClause
(
"type"
);
PageDataVO
<
Cofig
>
cofigPage
=
PageDataVO
.
pageInfo
(
query
.
getPage
(),
query
.
getLimit
(),
()
->
mapper
.
selectByExample
(
example
));
return
new
TableResultResponse
<>(
cofigPage
.
getTotalCount
(),
cofigPage
.
getData
());
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/rest/BackStageOrderController.java
View file @
75fd0975
...
...
@@ -199,6 +199,7 @@ public class BackStageOrderController extends CommonBaseController implements Us
companyIds
.
add
(
dto
.
getStartCompanyId
());
}
}
dto
.
setCompanyIds
(
companyIds
);
Query
query
=
new
Query
(
dto
);
PageDataVO
<
OrderPageVO
>
pageDataVO
=
PageDataVO
.
pageInfo
(
query
,
()
->
baseOrderBiz
.
getRentVehicle
(
query
.
getSuper
()));
for
(
OrderPageVO
orderPageVO
:
pageDataVO
.
getData
())
{
...
...
xx-user-behavior-collect/xx-user-behavior-server/src/main/java/com/xxfc/platform/user/behavior/biz/CustomerBehaviorNotesBiz.java
View file @
75fd0975
...
...
@@ -125,7 +125,7 @@ public class CustomerBehaviorNotesBiz extends BaseBiz<CustomerBehaviorNotesMappe
//App访问量统计
case
APP_VISIT_COUNT:
actionAcount
=
new
ActionAcount
();
default_p_total
=
mapper
.
selectAppVvisitsByType
(
BehaviorEnum
.
APP_VISIT_COUNT
.
getCode
());
default_p_total
=
mapper
.
selectAppVvisitsByType
AndTime
(
BehaviorEnum
.
APP_VISIT_COUNT
.
getCode
(),
startAtomic
.
get
(),
endAtomic
.
get
());
default_p_avg
=
default_p_total
/
between_day
;
actionAcount
.
setDefault_p_total
(
default_p_total
);
actionAcount
.
setDefault_p_avg
(
default_p_avg
);
...
...
xx-user-behavior-collect/xx-user-behavior-server/src/main/java/com/xxfc/platform/user/behavior/mapper/CustomerBehaviorNotesMapper.java
View file @
75fd0975
...
...
@@ -17,7 +17,7 @@ public interface CustomerBehaviorNotesMapper extends Mapper<CustomerBehaviorNote
List
<
CustomerBehaviorNotes
>
selectByActivityIdAndTime
(
@Param
(
"activityId"
)
Integer
activityId
,
@Param
(
"startTime"
)
Long
startTime
,
@Param
(
"endTime"
)
Long
endTime
);
long
selectAppVvisitsByType
(
@Param
(
"code"
)
int
cod
e
);
long
selectAppVvisitsByType
AndTime
(
@Param
(
"code"
)
int
code
,
@Param
(
"startTime"
)
Long
startTime
,
@Param
(
"endTime"
)
Long
endTim
e
);
List
<
CustomerBehaviorNotes
>
selectAllByTypeIdsAndTime
(
@Param
(
"bizIds"
)
List
<
Integer
>
bizIds
,
@Param
(
"startTime"
)
Long
startTime
,
@Param
(
"endTime"
)
Long
endTime
);
}
xx-user-behavior-collect/xx-user-behavior-server/src/main/resources/mapper/CustomerBehaviorNotesMapper.xml
View file @
75fd0975
...
...
@@ -27,8 +27,17 @@
</if>
</select>
<select
id=
"selectAppVvisitsByType"
resultType=
"long"
>
<select
id=
"selectAppVvisitsByType
AndTime
"
resultType=
"long"
>
select count(id) from `customer_behavior_notes` where `type`=#{code}
<if
test=
"startTime != null != null and endTime !=null"
>
and `crt_time` between #{startTime} and #{endTime}
</if>
<if
test=
"startTime != null and endTime == null"
>
and
<![CDATA[`crt_time` >= #{startTime}]]>
</if>
<if
test=
"endTime != null and startTime == null"
>
and
<![CDATA[ `crt_time` <= #{endTime}]]>
</if>
</select>
<select
id=
"selectAllByTypeIdsAndTime"
resultMap=
"customerBehaviorNotesMap"
>
...
...
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/constant/ResCode/ResCode.java
View file @
75fd0975
...
...
@@ -24,6 +24,8 @@ public enum ResCode {
VEHICLE_BOOKED_RECORD_STATUS_CHANGED
(
103002
,
"车辆预定申请状态已变更"
),
VEHICLE_BOOKED_RECORD_MILEAGE_CHANGED
(
103003
,
"请输入仪表盘内当前显示的公里数"
),
CHECKUSER_AND_PHONE_NOT_NULL
(
103999
,
"收车或交车人姓名和电话不能为空"
),
USERNAME_AND_TELE_NOT_NULL
(
104000
,
"使用人和电话不能为空"
),
VEHICLE_DEPARTURE_VEHICLE_UNEXIST
(
104001
,
"车辆不存在"
),
VEHICLE_DEPARTURE_VEHICLE_DISABLE
(
104002
,
"车辆不可用"
),
VEHICLE_DEPARTURE_VEHICLE_UNDEPARTURE
(
104003
,
"车辆未出车"
),
...
...
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/pojo/QueryVehicleWarningMsgVo.java
View file @
75fd0975
...
...
@@ -2,6 +2,8 @@ package com.xxfc.platform.vehicle.pojo;
import
lombok.Data
;
import
java.util.List
;
/**
*车辆相关预警消息
*
...
...
@@ -31,4 +33,6 @@ public class QueryVehicleWarningMsgVo {
private
Integer
limit
;
private
Integer
colorType
;
private
List
<
Integer
>
companyIds
;
}
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleActiveService.java
View file @
75fd0975
...
...
@@ -10,6 +10,7 @@ import com.xxfc.platform.vehicle.constant.VehicleStatus;
import
com.xxfc.platform.vehicle.entity.*
;
import
com.xxfc.platform.vehicle.mapper.*
;
import
com.xxfc.platform.vehicle.pojo.*
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
...
...
@@ -55,6 +56,14 @@ public class VehicleActiveService {
throw
new
BaseException
(
ResCode
.
VEHICLE_DEPARTURE_VEHICLE_UNEXIST
.
getDesc
(),
ResCode
.
VEHICLE_DEPARTURE_VEHICLE_UNEXIST
.
getCode
());
}
if
(
StringUtils
.
isBlank
(
departureVo
.
getUser
())
||
StringUtils
.
isBlank
(
departureVo
.
getUserTel
()))
{
throw
new
BaseException
(
ResCode
.
USERNAME_AND_TELE_NOT_NULL
.
getDesc
(),
ResCode
.
USERNAME_AND_TELE_NOT_NULL
.
getCode
());
}
if
(
StringUtils
.
isBlank
(
departureVo
.
getCheckMan
())
||
StringUtils
.
isBlank
(
departureVo
.
getCheckManTel
()))
{
throw
new
BaseException
(
ResCode
.
CHECKUSER_AND_PHONE_NOT_NULL
.
getDesc
(),
ResCode
.
CHECKUSER_AND_PHONE_NOT_NULL
.
getCode
());
}
if
(!
vehicle
.
getStatus
().
equals
(
VehicleStatus
.
NORMAL
.
getCode
()))
{
throw
new
BaseException
(
ResCode
.
VEHICLE_DEPARTURE_VEHICLE_DISABLE
.
getDesc
()
+
", 车辆状态是:"
+
getVehicleStatus
(
vehicle
.
getStatus
(),
vehicle
.
getId
()),
ResCode
.
VEHICLE_DEPARTURE_VEHICLE_DISABLE
.
getCode
());
...
...
@@ -155,6 +164,10 @@ public class VehicleActiveService {
throw
new
BaseException
(
ResCode
.
VEHICLE_DEPARTURE_VEHICLE_UNEXIST
.
getDesc
(),
ResCode
.
VEHICLE_DEPARTURE_VEHICLE_UNEXIST
.
getCode
());
}
if
(
StringUtils
.
isBlank
(
arrivalVo
.
getRecycleMan
())
||
StringUtils
.
isBlank
(
arrivalVo
.
getRecycleManTel
()))
{
throw
new
BaseException
(
ResCode
.
CHECKUSER_AND_PHONE_NOT_NULL
.
getDesc
(),
ResCode
.
CHECKUSER_AND_PHONE_NOT_NULL
.
getCode
());
}
if
(!
vehicle
.
getStatus
().
equals
(
VehicleStatus
.
DEPARTURE
.
getCode
()))
{
throw
new
BaseException
(
ResCode
.
VEHICLE_DEPARTURE_VEHICLE_UNDEPARTURE
.
getDesc
()
+
", 车辆状态是:"
+
getVehicleStatus
(
vehicle
.
getStatus
(),
vehicle
.
getId
()),
ResCode
.
VEHICLE_DEPARTURE_VEHICLE_UNDEPARTURE
.
getCode
());
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleWarningMsgBiz.java
View file @
75fd0975
...
...
@@ -4,6 +4,9 @@ import com.alibaba.fastjson.JSON;
import
com.alibaba.fastjson.JSONException
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.github.wxiaoqi.security.admin.feign.UserFeign
;
import
com.github.wxiaoqi.security.admin.feign.dto.UserDTO
;
import
com.github.wxiaoqi.security.admin.feign.rest.UserRestInterface
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.google.common.collect.Maps
;
...
...
@@ -44,7 +47,7 @@ import java.util.concurrent.TimeUnit;
@Slf4j
@Service
public
class
VehicleWarningMsgBiz
extends
BaseBiz
<
VehicleWarningMsgMapper
,
VehicleWarningMsg
>
{
public
class
VehicleWarningMsgBiz
extends
BaseBiz
<
VehicleWarningMsgMapper
,
VehicleWarningMsg
>
implements
UserRestInterface
{
private
static
final
Integer
CHECK_BATCH_SIZE_VEHICLE
=
100
;
//每批次检查多少辆车
...
...
@@ -67,7 +70,15 @@ public class VehicleWarningMsgBiz extends BaseBiz<VehicleWarningMsgMapper, Vehic
@Autowired
private
RedisTemplate
customRedisTemplate
;
@Autowired
UserFeign
userFeign
;
@Autowired
VehicleBiz
vehicleBiz
;
@Override
public
UserFeign
getUserFeign
()
{
return
userFeign
;
}
/**
* 增加自定义预警消息
* @param addVehicleWarningMsgVo
...
...
@@ -94,7 +105,18 @@ public class VehicleWarningMsgBiz extends BaseBiz<VehicleWarningMsgMapper, Vehic
try
{
QueryVehicleWarningMsgVo
queryVehicleWarningMsgVo
=
JSON
.
parseObject
(
queryVehicleWarningMsgVoJson
,
QueryVehicleWarningMsgVo
.
class
);
PageHelper
.
startPage
(
queryVehicleWarningMsgVo
.
getPage
(),
queryVehicleWarningMsgVo
.
getLimit
());
List
<
VehicleWarningMsg
>
vehicleWarningMsgs
=
mapper
.
getByPages
(
queryVehicleWarningMsgVo
);
UserDTO
userDTO
=
getAdminUserInfo
();
if
(
userDTO
!=
null
)
{
if
(
userDTO
.
getDataAll
()
==
2
)
{
List
<
Integer
>
companyList
=
vehicleBiz
.
dataCompany
(
userDTO
.
getDataZone
(),
userDTO
.
getDataCompany
());
if
(
companyList
!=
null
&&
companyList
.
size
()
>
0
)
{
queryVehicleWarningMsgVo
.
setCompanyIds
(
companyList
);
}
}
}
else
{
return
RestResponse
.
codeAndMessage
(
1032
,
"token失效"
);
}
List
<
VehicleWarningMsg
>
vehicleWarningMsgs
=
mapper
.
getByPage
(
queryVehicleWarningMsgVo
);
PageInfo
<
VehicleWarningMsg
>
vehicleWarningMsgPageInfo
=
new
PageInfo
<>(
vehicleWarningMsgs
);
return
RestResponse
.
data
(
PageDataVO
.
pageInfo
(
vehicleWarningMsgPageInfo
));
}
catch
(
JSONException
ex
)
{
...
...
@@ -230,4 +252,5 @@ public class VehicleWarningMsgBiz extends BaseBiz<VehicleWarningMsgMapper, Vehic
return
list
;
}
}
xx-vehicle/xx-vehicle-server/src/main/resources/mapper/VehicleMapper.xml
View file @
75fd0975
...
...
@@ -389,7 +389,7 @@
<if
test=
"zoneId !=null"
>
and bc2.zone_id = #{zoneId}
</if>
and
is_del != 1
and v1.
is_del != 1
</where>
</select>
...
...
@@ -412,7 +412,7 @@
#{id}
</foreach>
</if>
and is_del != 1
and
v1.
is_del != 1
</where>
ORDER BY parkCompanyName
</select>
...
...
@@ -490,7 +490,7 @@
#{id}
</foreach>
</if>
and v
1
.is_del != 1
and v
2
.is_del != 1
</where>
</select>
...
...
xx-vehicle/xx-vehicle-server/src/main/resources/mapper/VehicleWarningMsgMapper.xml
View file @
75fd0975
...
...
@@ -22,9 +22,17 @@
and v.number_plate = #{numberPlate}
</if>
<if
test=
"type != null"
>
and type = #{type}
and vwn.type = #{type}
</if>
<if
test=
"colorType != null"
>
and vwn.color_type = #{colorType}
</if>
<if
test=
"companyIds != null and companyIds.size > 0"
>
and v.park_branch_company_id in
<foreach
collection=
"companyIds"
item=
"id"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</if>
</select>
<select
id=
"getMsgByVehicle"
parameterType=
"java.util.Map"
resultType=
"com.xxfc.platform.vehicle.entity.VehicleWarningMsg"
>
...
...
@@ -73,12 +81,6 @@
<if
test=
"numberPlate != null and numberPlate != '' "
>
and number_plate = #{numberPlate}
</if>
<if
test=
"type != null"
>
and type = #{type}
</if>
<if
test=
"colorType != null"
>
and color_type = #{colorType}
</if>
</select>
</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