记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
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
董敬伟
liquidnet-bus-v1
Commits
4f463adc
Commit
4f463adc
authored
Jul 15, 2021
by
jiangxiulong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
版本控制增加验票
parent
4d8e9cb6
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
118 additions
and
5 deletions
+118
-5
KylinRedisConst.java
...com/liquidnet/service/kylin/constant/KylinRedisConst.java
+2
-0
ZhengzaiAppVersionsParam.java
...net/service/kylin/dto/param/ZhengzaiAppVersionsParam.java
+1
-0
ZhengzaiAppVersionsSearchParam.java
...kylin/dto/param/admin/ZhengzaiAppVersionsSearchParam.java
+1
-0
ZhengzaiAppVersionsVo.java
...net/service/kylin/dto/vo/admin/ZhengzaiAppVersionsVo.java
+2
-0
create.html
...s/templates/zhengzai/kylin/zhengzaiAppVersion/create.html
+15
-0
update.html
...s/templates/zhengzai/kylin/zhengzaiAppVersion/update.html
+15
-0
zhengzaiAppVersion.html
...zhengzai/kylin/zhengzaiAppVersion/zhengzaiAppVersion.html
+19
-0
KylinZhengzaiAppVersionsServiceImpl.java
...lin/service/impl/KylinZhengzaiAppVersionsServiceImpl.java
+24
-0
ZhengzaiAppVersionsListDao.java
...quidnet/service/kylin/dao/ZhengzaiAppVersionsListDao.java
+2
-0
KylinZhengzaiAppVersions.java
...uidnet/service/kylin/entity/KylinZhengzaiAppVersions.java
+2
-0
KylinZhengzaiAppVersionsMapper.java
.../service/kylin/mapper/KylinZhengzaiAppVersionsMapper.java
+2
-0
KylinZhengzaiAppVersionsMapper.xml
...t.service.kylin.mapper/KylinZhengzaiAppVersionsMapper.xml
+17
-0
db_kylin_structure.sql
.../liquidnet-service-kylin-impl/docu/db_kylin_structure.sql
+1
-0
ZhengzaiAppVersionsController.java
...ntroller/basicServices/ZhengzaiAppVersionsController.java
+15
-5
No files found.
liquidnet-bus-api/liquidnet-service-kylin-api/src/main/java/com/liquidnet/service/kylin/constant/KylinRedisConst.java
View file @
4f463adc
...
...
@@ -42,5 +42,7 @@ public class KylinRedisConst {
public
static
final
String
ZHENGZAI_APP_VERSIONS_ANDROID
=
"basicServices:zhengzaiAppVersionsAndroid"
;
public
static
final
String
ZHENGZAI_APP_VERSIONS_IOS
=
"basicServices:zhengzaiAppVersionsIos"
;
public
static
final
String
ZHENGZAI_APP_VERSIONS_CHECK_ANDROID
=
"basicServices:zhengzaiCheckAppVersionsAndroid"
;
public
static
final
String
ZHENGZAI_APP_VERSIONS_CHECK_IOS
=
"basicServices:zhengzaiCheckAppVersionsIos"
;
}
liquidnet-bus-api/liquidnet-service-kylin-api/src/main/java/com/liquidnet/service/kylin/dto/param/ZhengzaiAppVersionsParam.java
View file @
4f463adc
...
...
@@ -28,6 +28,7 @@ public class ZhengzaiAppVersionsParam implements Serializable {
private
Integer
type
;
private
Integer
isProduction
;
private
Integer
isForce
;
private
Integer
appType
;
private
String
content
;
...
...
liquidnet-bus-api/liquidnet-service-kylin-api/src/main/java/com/liquidnet/service/kylin/dto/param/admin/ZhengzaiAppVersionsSearchParam.java
View file @
4f463adc
...
...
@@ -19,6 +19,7 @@ public class ZhengzaiAppVersionsSearchParam implements Serializable {
// @ApiModelProperty(value = "Banner主键ID", example = "9822346783245")
private
Integer
type
;
private
Integer
appType
;
@ApiModelProperty
(
value
=
"页数"
,
example
=
"0"
)
@NotNull
(
message
=
"页数不能为空"
)
...
...
liquidnet-bus-api/liquidnet-service-kylin-api/src/main/java/com/liquidnet/service/kylin/dto/vo/admin/ZhengzaiAppVersionsVo.java
View file @
4f463adc
...
...
@@ -33,6 +33,8 @@ public class ZhengzaiAppVersionsVo implements Serializable {
private
String
content
;
private
Integer
appType
;
/**
* 创建时间
*/
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/kylin/zhengzaiAppVersion/create.html
View file @
4f463adc
...
...
@@ -9,6 +9,21 @@
<body
class=
"white-bg"
>
<div
class=
"wrapper wrapper-content animated fadeInRight ibox-content"
>
<form
class=
"form-horizontal m"
id=
"form-post-add"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label"
>
App类型
</label>
<div
class=
"col-sm-10"
>
<div
class=
"radio check-box"
>
<label>
<input
type=
"radio"
value=
"1"
name=
"appType"
checked=
""
>
正在现场
</label>
</div>
<div
class=
"radio check-box"
>
<label>
<input
type=
"radio"
value=
"2"
name=
"appType"
>
验票
</label>
</div>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label is-required"
>
名称:
</label>
<div
class=
"col-sm-10"
>
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/kylin/zhengzaiAppVersion/update.html
View file @
4f463adc
...
...
@@ -9,6 +9,21 @@
<body
class=
"white-bg"
>
<div
class=
"wrapper wrapper-content animated fadeInRight ibox-content"
>
<form
class=
"form-horizontal m"
id=
"form-post-add"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label"
>
App类型
</label>
<div
class=
"col-sm-10"
>
<div
class=
"radio check-box"
>
<label>
<input
th:checked=
"${ZhengzaiAppVersionsVo.appType==1 ? true : false}"
type=
"radio"
value=
"1"
name=
"appType"
>
正在现场
</label>
</div>
<div
class=
"radio check-box"
>
<label>
<input
th:checked=
"${ZhengzaiAppVersionsVo.appType==2 ? true : false}"
type=
"radio"
value=
"2"
name=
"appType"
>
验票
</label>
</div>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label is-required"
>
名称:
</label>
<div
class=
"col-sm-10"
>
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/resources/templates/zhengzai/kylin/zhengzaiAppVersion/zhengzaiAppVersion.html
View file @
4f463adc
...
...
@@ -10,6 +10,14 @@
<form
id=
"formId"
>
<div
class=
"select-list"
>
<ul>
<li>
<label>
App类型:
</label>
<select
name=
"appType"
>
<option
value=
""
>
全部
</option>
<option
value=
"1"
>
正在现场
</option>
<option
value=
"2"
>
验票
</option>
</select>
</li>
<li>
<label>
类型:
</label>
<select
name=
"type"
>
...
...
@@ -62,6 +70,17 @@
field
:
'zhengzaiAppVersionsId'
,
title
:
'ID'
},
{
field
:
'appType'
,
title
:
'App类型'
,
formatter
:
function
(
value
,
row
,
index
)
{
if
(
row
.
appType
==
1
)
{
return
"正在现场"
;
}
else
{
return
"验票"
;
}
}
},
{
field
:
'name'
,
title
:
'名称'
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/kylin/service/impl/KylinZhengzaiAppVersionsServiceImpl.java
View file @
4f463adc
...
...
@@ -56,6 +56,7 @@ public class KylinZhengzaiAppVersionsServiceImpl extends ServiceImpl<KylinBanner
BeanUtils
.
copyProperties
(
zhengzaiAppVersionsParam
,
kylinZhengzaiAppVersions
);
kylinZhengzaiAppVersionsMapper
.
insert
(
kylinZhengzaiAppVersions
);
getLastInfo
();
getLastInfoCheck
();
return
true
;
}
catch
(
Exception
e
)
{
return
false
;
...
...
@@ -71,6 +72,7 @@ public class KylinZhengzaiAppVersionsServiceImpl extends ServiceImpl<KylinBanner
BeanUtils
.
copyProperties
(
zhengzaiAppVersionsParam
,
kylinZhengzaiAppVersions
);
kylinZhengzaiAppVersionsMapper
.
update
(
kylinZhengzaiAppVersions
,
new
UpdateWrapper
<
KylinZhengzaiAppVersions
>().
eq
(
"zhengzai_app_versions_id"
,
zhengzaiAppVersionsId
));
getLastInfo
();
getLastInfoCheck
();
return
true
;
}
catch
(
Exception
e
)
{
return
false
;
...
...
@@ -114,6 +116,7 @@ public class KylinZhengzaiAppVersionsServiceImpl extends ServiceImpl<KylinBanner
,
new
UpdateWrapper
<
KylinZhengzaiAppVersions
>().
in
(
"zhengzai_app_versions_id"
,
zhengzaiAppVersionsIds
)
);
getLastInfo
();
getLastInfoCheck
();
return
true
;
}
catch
(
Exception
e
)
{
return
false
;
...
...
@@ -140,4 +143,25 @@ public class KylinZhengzaiAppVersionsServiceImpl extends ServiceImpl<KylinBanner
return
true
;
}
public
boolean
getLastInfoCheck
()
{
// 因为有可能之前是ios 改成 android 如果单独处理一个会有问题 所以每次处理
ZhengzaiAppVersionsListDao
infoIos
=
kylinZhengzaiAppVersionsMapper
.
getLastInfoCheck
(
1
);
ZhengzaiAppVersionsListDao
infoAndroid
=
kylinZhengzaiAppVersionsMapper
.
getLastInfoCheck
(
2
);
ZhengzaiAppVersionsVo
zhengzaiAppVersionsVo
=
new
ZhengzaiAppVersionsVo
();
redisUtil
.
del
(
KylinRedisConst
.
ZHENGZAI_APP_VERSIONS_CHECK_IOS
);
if
(
null
!=
infoIos
)
{
BeanUtils
.
copyProperties
(
infoIos
,
zhengzaiAppVersionsVo
);
redisUtil
.
set
(
KylinRedisConst
.
ZHENGZAI_APP_VERSIONS_CHECK_IOS
,
zhengzaiAppVersionsVo
);
}
redisUtil
.
del
(
KylinRedisConst
.
ZHENGZAI_APP_VERSIONS_CHECK_ANDROID
);
if
(
null
!=
infoAndroid
)
{
String
newPath
=
appUrl
+
infoAndroid
.
getFilePath
();
infoAndroid
.
setFilePath
(
newPath
);
BeanUtils
.
copyProperties
(
infoAndroid
,
zhengzaiAppVersionsVo
);
redisUtil
.
set
(
KylinRedisConst
.
ZHENGZAI_APP_VERSIONS_CHECK_ANDROID
,
zhengzaiAppVersionsVo
);
}
return
true
;
}
}
liquidnet-bus-do/liquidnet-service-kylin-do/src/main/java/com/liquidnet/service/kylin/dao/ZhengzaiAppVersionsListDao.java
View file @
4f463adc
...
...
@@ -24,6 +24,8 @@ public class ZhengzaiAppVersionsListDao implements Serializable {
private
String
content
;
private
Integer
appType
;
/**
* 创建时间
*/
...
...
liquidnet-bus-do/liquidnet-service-kylin-do/src/main/java/com/liquidnet/service/kylin/entity/KylinZhengzaiAppVersions.java
View file @
4f463adc
...
...
@@ -40,6 +40,8 @@ public class KylinZhengzaiAppVersions implements Serializable {
private
String
content
;
private
Integer
appType
;
/**
* 创建时间
*/
...
...
liquidnet-bus-do/liquidnet-service-kylin-do/src/main/java/com/liquidnet/service/kylin/mapper/KylinZhengzaiAppVersionsMapper.java
View file @
4f463adc
...
...
@@ -20,4 +20,6 @@ public interface KylinZhengzaiAppVersionsMapper extends BaseMapper<KylinZhengzai
List
<
ZhengzaiAppVersionsListDao
>
searchList
(
Map
<
String
,
Object
>
convertBeanToMap
);
ZhengzaiAppVersionsListDao
getLastInfo
(
Integer
type
);
ZhengzaiAppVersionsListDao
getLastInfoCheck
(
Integer
type
);
}
liquidnet-bus-do/liquidnet-service-kylin-do/src/main/resources/com.liquidnet.service.kylin.mapper/KylinZhengzaiAppVersionsMapper.xml
View file @
4f463adc
...
...
@@ -9,6 +9,9 @@
<if
test=
"type != ''"
>
AND type = ${type}
</if>
<if
test=
"appType != ''"
>
AND app_type = ${appType}
</if>
</where>
ORDER BY mid DESC
</select>
...
...
@@ -20,6 +23,20 @@
<if
test=
"type != ''"
>
AND type = ${type}
</if>
AND app_type = 1
</where>
ORDER BY mid DESC
LIMIT 1
</select>
<select
id=
"getLastInfoCheck"
resultType=
"com.liquidnet.service.kylin.dao.ZhengzaiAppVersionsListDao"
>
SELECT *
FROM kylin_zhengzai_app_versions
<where>
is_deleted = 1
<if
test=
"type != ''"
>
AND type = ${type}
</if>
AND app_type = 2
</where>
ORDER BY mid DESC
LIMIT 1
...
...
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/docu/db_kylin_structure.sql
View file @
4f463adc
...
...
@@ -954,6 +954,7 @@ CREATE TABLE `kylin_zhengzai_app_versions`
`is_force`
tinyint
NOT
NULL
DEFAULT
'0'
COMMENT
'强制更新 2否 1是'
,
`content`
varchar
(
255
)
NOT
NULL
DEFAULT
''
COMMENT
'升级描述'
,
`is_deleted`
tinyint
NOT
NULL
DEFAULT
'1'
COMMENT
'1正常 2已删除'
,
`app_type`
tinyint
NOT
NULL
DEFAULT
'0'
COMMENT
'1正在现场app 2验票app'
,
`created_at`
timestamp
NULL
DEFAULT
NULL
,
`updated_at`
timestamp
NULL
DEFAULT
NULL
,
KEY
`kylin_zhengzai_app_versions_id_index`
(
`zhengzai_app_versions_id`
),
...
...
liquidnet-bus-service/liquidnet-service-platform/liquidnet-service-platform-impl/src/main/java/com/liquidnet/service/platform/controller/basicServices/ZhengzaiAppVersionsController.java
View file @
4f463adc
...
...
@@ -33,16 +33,26 @@ public class ZhengzaiAppVersionsController {
@ApiOperation
(
"获取最新版本信息"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"Integer"
,
name
=
"type"
,
value
=
"上传类型 1-IOS 2-Android"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"Integer"
,
name
=
"appType"
,
value
=
"App类型 1-正在 2-验票"
,
required
=
true
),
// @ApiImplicitParam(type = "query", dataType = "Integer", name = "isProduction", value = "是否是生产环境,1是 2否", required = true),
})
// public ZhengzaiAppVersionsVo lastInfo(@RequestParam Integer type, @RequestParam Integer isProduction) {
public
ZhengzaiAppVersionsVo
lastInfo
(
@RequestParam
Integer
type
)
{
public
ZhengzaiAppVersionsVo
lastInfo
(
@RequestParam
Integer
type
,
@RequestParam
Integer
appType
)
{
ZhengzaiAppVersionsVo
info
=
null
;
if
(
1
==
type
)
{
info
=
(
ZhengzaiAppVersionsVo
)
redisUtil
.
get
(
KylinRedisConst
.
ZHENGZAI_APP_VERSIONS_IOS
);
}
else
if
(
2
==
type
)
{
info
=
(
ZhengzaiAppVersionsVo
)
redisUtil
.
get
(
KylinRedisConst
.
ZHENGZAI_APP_VERSIONS_ANDROID
);
if
(
1
==
appType
)
{
if
(
1
==
type
)
{
info
=
(
ZhengzaiAppVersionsVo
)
redisUtil
.
get
(
KylinRedisConst
.
ZHENGZAI_APP_VERSIONS_IOS
);
}
else
if
(
2
==
type
)
{
info
=
(
ZhengzaiAppVersionsVo
)
redisUtil
.
get
(
KylinRedisConst
.
ZHENGZAI_APP_VERSIONS_ANDROID
);
}
}
else
if
(
2
==
appType
)
{
if
(
1
==
type
)
{
info
=
(
ZhengzaiAppVersionsVo
)
redisUtil
.
get
(
KylinRedisConst
.
ZHENGZAI_APP_VERSIONS_CHECK_IOS
);
}
else
if
(
2
==
type
)
{
info
=
(
ZhengzaiAppVersionsVo
)
redisUtil
.
get
(
KylinRedisConst
.
ZHENGZAI_APP_VERSIONS_CHECK_ANDROID
);
}
}
return
info
;
}
...
...
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