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
c3d9f31c
Commit
c3d9f31c
authored
Jul 19, 2019
by
hanfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
app上传
parent
05b38cac
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
79 additions
and
9 deletions
+79
-9
appVersionQuery.java
...c/main/java/com/xxfc/platform/app/vo/appVersionQuery.java
+24
-0
AppVersionBiz.java
...rc/main/java/com/xxfc/platform/app/biz/AppVersionBiz.java
+12
-4
AppVersionMapper.java
...n/java/com/xxfc/platform/app/mapper/AppVersionMapper.java
+6
-1
AppVersionController.java
...java/com/xxfc/platform/app/rest/AppVersionController.java
+13
-4
AppVersionController.xml
...server/src/main/resources/mapper/AppVersionController.xml
+24
-0
No files found.
xx-app/xx-app-api/src/main/java/com/xxfc/platform/app/vo/appVersionQuery.java
0 → 100644
View file @
c3d9f31c
package
com
.
xxfc
.
platform
.
app
.
vo
;
import
lombok.Data
;
@Data
public
class
appVersionQuery
{
private
Integer
page
;
private
Integer
limit
;
/**
* 版本名称
*/
private
String
versionName
;
/**
* 版本号
*/
private
String
version
;
/**
* 更新内容
*/
private
String
content
;
}
xx-app/xx-app-server/src/main/java/com/xxfc/platform/app/biz/AppVersionBiz.java
View file @
c3d9f31c
package
com
.
xxfc
.
platform
.
app
.
biz
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken
;
import
com.github.wxiaoqi.security.common.constant.RestCode
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.xxfc.platform.app.vo.appVersionQuery
;
import
com.xxfc.platform.vehicle.common.RestResponse
;
import
com.xxfc.platform.vehicle.constant.RedisKey
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.io.FileUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.ibatis.session.RowBounds
;
import
org.joda.time.DateTime
;
import
org.joda.time.format.DateTimeFormat
;
import
org.joda.time.format.DateTimeFormatter
;
...
...
@@ -124,13 +128,10 @@ public class AppVersionBiz extends BaseBiz<AppVersionMapper,AppVersion> {
appVersion
.
setDownloadSwitch
(
0
);
insertSelective
(
appVersion
);
}
public
AppVersion
get
(
Integer
id
)
{
if
(
id
==
null
)
{
throw
new
IllegalArgumentException
(
"Parameter is null"
);
}
return
selectById
(
id
);
}
...
...
@@ -138,7 +139,7 @@ public class AppVersionBiz extends BaseBiz<AppVersionMapper,AppVersion> {
* 修改一条信息
* @param appVersion
*/
@Transactional
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
updateAppVersionById
(
AppVersion
appVersion
)
{
updateSelectiveById
(
appVersion
);
}
...
...
@@ -155,4 +156,11 @@ public class AppVersionBiz extends BaseBiz<AppVersionMapper,AppVersion> {
.
build
();
mapper
.
updateByExampleSelective
(
appVersion
,
example
);
}
public
PageInfo
<
AppVersion
>
getAll
(
appVersionQuery
query
)
{
PageHelper
.
startPage
(
query
.
getPage
(),
query
.
getLimit
());
List
<
AppVersion
>
appVersionList
=
mapper
.
getAllByquery
(
query
);
return
PageInfo
.
of
(
appVersionList
);
}
}
\ No newline at end of file
xx-app/xx-app-server/src/main/java/com/xxfc/platform/app/mapper/AppVersionMapper.java
View file @
c3d9f31c
package
com
.
xxfc
.
platform
.
app
.
mapper
;
import
com.xxfc.platform.app.entity.AppVersion
;
import
com.xxfc.platform.app.vo.appVersionQuery
;
import
org.apache.ibatis.annotations.Param
;
import
tk.mybatis.mapper.common.Mapper
;
import
java.util.List
;
/**
*
*
...
...
@@ -12,4 +16,5 @@ import tk.mybatis.mapper.common.Mapper;
*/
public
interface
AppVersionMapper
extends
Mapper
<
AppVersion
>
{
List
<
AppVersion
>
getAllByquery
(
appVersionQuery
query
);
}
xx-app/xx-app-server/src/main/java/com/xxfc/platform/app/rest/AppVersionController.java
View file @
c3d9f31c
package
com
.
xxfc
.
platform
.
app
.
rest
;
import
com.github.pagehelper.PageInfo
;
import
com.github.wxiaoqi.security.auth.client.annotation.IgnoreClientToken
;
import
com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken
;
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.Query
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.xxfc.platform.app.biz.AppVersionBiz
;
import
com.xxfc.platform.app.entity.AppVersion
;
import
com.xxfc.platform.app.entity.Cofig
;
import
com.xxfc.platform.app.vo.appVersionQuery
;
import
com.xxfc.platform.vehicle.common.RestResponse
;
import
com.xxfc.platform.vehicle.constant.ResCode.ResCode
;
import
io.swagger.annotations.ApiModelProperty
;
...
...
@@ -51,7 +54,7 @@ public class AppVersionController extends BaseController<AppVersionBiz,AppVersio
@Override
@ApiOperation
(
"添加"
)
@RequestMapping
(
value
=
"/add"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/
background/
add"
,
method
=
RequestMethod
.
POST
)
public
ObjectRestResponse
<
AppVersion
>
add
(
@RequestBody
AppVersion
appVersion
){
baseBiz
.
insertAppVersion
(
appVersion
);
return
new
ObjectRestResponse
<
AppVersion
>();
...
...
@@ -59,21 +62,27 @@ public class AppVersionController extends BaseController<AppVersionBiz,AppVersio
@ApiOperation
(
"查询"
)
@RequestMapping
(
value
=
"/getAppVersion/{id}"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/
background/
getAppVersion/{id}"
,
method
=
RequestMethod
.
GET
)
public
ObjectRestResponse
<
AppVersion
>
getAppVersion
(
@PathVariable
Integer
id
){
return
ObjectRestResponse
.
succ
(
baseBiz
.
get
(
id
));
}
@ApiOperation
(
"查询所有"
)
@RequestMapping
(
value
=
"/background/getAppVersions"
,
method
=
RequestMethod
.
POST
)
public
ObjectRestResponse
<
PageInfo
<
AppVersion
>>
getAppVersions
(
@RequestBody
appVersionQuery
query
){
return
ObjectRestResponse
.
succ
(
baseBiz
.
getAll
(
query
));
}
@Override
@ApiOperation
(
"修改"
)
@RequestMapping
(
value
=
"/update/{id}"
,
method
=
RequestMethod
.
PUT
)
@RequestMapping
(
value
=
"/
background/
update/{id}"
,
method
=
RequestMethod
.
PUT
)
public
ObjectRestResponse
<
AppVersion
>
update
(
@RequestBody
AppVersion
appVersion
){
baseBiz
.
updateAppVersionById
(
appVersion
);
return
new
ObjectRestResponse
<
AppVersion
>();
}
@ApiOperation
(
"删除"
)
@DeleteMapping
(
value
=
"/remove/{id}"
)
@DeleteMapping
(
value
=
"/
background/
remove/{id}"
)
public
ObjectRestResponse
<
AppVersion
>
remove
(
@PathVariable
Integer
id
){
baseBiz
.
remove
(
id
);
return
new
ObjectRestResponse
<
AppVersion
>();
...
...
xx-app/xx-app-server/src/main/resources/mapper/AppVersionController.xml
0 → 100644
View file @
c3d9f31c
<?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.app.mapper.AppVersionMapper"
>
<select
id=
"getAllByquery"
parameterType=
"com.xxfc.platform.app.vo.appVersionQuery"
resultType=
"com.xxfc.platform.app.entity.AppVersion"
>
select * from app_version
where 1=1
<if
test=
"versionName !=null and versionName != ''"
>
and version_name like concat('%',#{versionName},'%')
</if>
<if
test=
"version !=null and version != ''"
>
and version like concat('%',#{version},'%')
</if>
<if
test=
"content != null and content != ''"
>
and content like concat('%',#{content},'%')
</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