Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
chnmuseum-party
Project
Project
Details
Activity
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
liqin
chnmuseum-party
Commits
58e57f5e
Commit
58e57f5e
authored
Mar 30, 2021
by
yangtianyou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
app版本查询添加时间查询条件
parent
90d170b0
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
53 deletions
+17
-53
TAppVersion.java
.../java/cn/wisenergy/chnmuseum/party/model/TAppVersion.java
+0
-3
ChinaMobileRestApiController.java
...um/party/web/controller/ChinaMobileRestApiController.java
+7
-7
TAppVersionController.java
...chnmuseum/party/web/controller/TAppVersionController.java
+10
-43
No files found.
src/main/java/cn/wisenergy/chnmuseum/party/model/TAppVersion.java
View file @
58e57f5e
...
@@ -2,16 +2,13 @@ package cn.wisenergy.chnmuseum.party.model;
...
@@ -2,16 +2,13 @@ package cn.wisenergy.chnmuseum.party.model;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.Version
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
com.baomidou.mybatisplus.annotation.FieldFill
;
import
com.baomidou.mybatisplus.annotation.FieldFill
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Builder
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.NoArgsConstructor
;
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/ChinaMobileRestApiController.java
View file @
58e57f5e
...
@@ -649,11 +649,11 @@ public class ChinaMobileRestApiController extends BaseController {
...
@@ -649,11 +649,11 @@ public class ChinaMobileRestApiController extends BaseController {
current
=
currentList
.
get
(
0
);
current
=
currentList
.
get
(
0
);
}
}
Map
map
=
new
HashMap
();
Map
map
=
new
HashMap
();
map
.
put
(
"isLatest"
,
versionNo
.
equals
(
current
.
getAppVersion
()));
map
.
put
(
"isLatest"
,
versionNo
.
equals
(
current
.
getAppVersion
()));
map
.
put
(
"versionNo"
,
current
.
getAppVersion
());
map
.
put
(
"versionNo"
,
current
.
getAppVersion
());
map
.
put
(
"versionUrl"
,
current
.
getApkUrl
());
map
.
put
(
"versionUrl"
,
current
.
getApkUrl
());
map
.
put
(
"updateLog"
,
current
.
getUpdateLog
());
map
.
put
(
"updateLog"
,
current
.
getUpdateLog
());
map
.
put
(
"updateTime"
,
DateUtil
.
format
(
current
.
getUpdateTime
(),
DateUtil
.
FORMAT_ONE
));
map
.
put
(
"updateTime"
,
current
.
getUpdateTime
(
));
return
getResult
(
map
);
return
getResult
(
map
);
}
}
...
@@ -681,8 +681,8 @@ public class ChinaMobileRestApiController extends BaseController {
...
@@ -681,8 +681,8 @@ public class ChinaMobileRestApiController extends BaseController {
}
}
Map
map
=
new
HashMap
();
Map
map
=
new
HashMap
();
map
.
put
(
"dirImgUrl"
,
currentDir
!=
null
?
currentDir
.
getAppDirPic
()
:
"未设置目录图片"
);
map
.
put
(
"dirImgUrl"
,
currentDir
!=
null
?
currentDir
.
getAppDirPic
()
:
"未设置目录图片"
);
map
.
put
(
"runImgUrl"
,
currentRun
!=
null
?
currentRun
.
getAppRunPic
()
:
"未设置运行图片"
);
map
.
put
(
"runImgUrl"
,
currentRun
!=
null
?
currentRun
.
getAppRunPic
()
:
"未设置运行图片"
);
return
getResult
(
map
);
return
getResult
(
map
);
}
}
}
}
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/TAppVersionController.java
View file @
58e57f5e
...
@@ -2,17 +2,12 @@ package cn.wisenergy.chnmuseum.party.web.controller;
...
@@ -2,17 +2,12 @@ package cn.wisenergy.chnmuseum.party.web.controller;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
cn.wisenergy.chnmuseum.party.web.controller.base.BaseController
;
import
cn.wisenergy.chnmuseum.party.web.controller.base.BaseController
;
import
cn.wisenergy.chnmuseum.party.model.TAppVersion
;
import
cn.wisenergy.chnmuseum.party.model.TAppVersion
;
import
cn.wisenergy.chnmuseum.party.service.TAppVersionService
;
import
cn.wisenergy.chnmuseum.party.service.TAppVersionService
;
import
cn.wisenergy.chnmuseum.party.common.enums.AuditStatusEnum
;
import
cn.wisenergy.chnmuseum.party.common.validator.groups.Add
;
import
cn.wisenergy.chnmuseum.party.common.validator.groups.Add
;
import
cn.wisenergy.chnmuseum.party.common.validator.groups.Update
;
import
cn.wisenergy.chnmuseum.party.common.validator.groups.Update
;
import
cn.wisenergy.chnmuseum.party.common.vo.GenericPageParam
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiImplicitParams
;
...
@@ -23,10 +18,8 @@ import org.apache.commons.lang3.StringUtils;
...
@@ -23,10 +18,8 @@ import org.apache.commons.lang3.StringUtils;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.stereotype.Controller
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java
x.validation.constraints.NotNull
;
import
java
.time.LocalDate
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -108,37 +101,6 @@ public class TAppVersionController extends BaseController {
...
@@ -108,37 +101,6 @@ public class TAppVersionController extends BaseController {
return
getFailResult
();
return
getFailResult
();
}
}
// @PutMapping("/updateStatus/{id}")
// @RequiresPermissions("t:app:version:update:status")
// @ApiOperation(value = "更新版本状态", notes = "更新版本状态")
// @ApiImplicitParams(value = {
// @ApiImplicitParam(name = "id", value = "标识ID", dataType = "String", paramType = "path"),
// @ApiImplicitParam(name = "isCurrent", value = "是否为当前版本 0:否 1:是", paramType = "query", dataType = "Integer")
// })
// public Map<String, Object> updateStatus(@NotNull(message = "ID不能为空") @PathVariable("id") String id, @RequestParam("isCurrent") Integer isCurrent) {
// TAppVersion appVersion = new TAppVersion();
// appVersion.setId(id);
// appVersion.setIsCurrent(isCurrent);
//
// // 如果有其他版本是当前版本状态,将其当前版本状态取消
// QueryWrapper<TAppVersion> qw = new QueryWrapper<>();
// qw.eq("is_current",1);
// List<TAppVersion> currentList = tAppVersionService.list(qw);
// if (currentList != null && currentList.size() > 0 && isCurrent == 1){
// currentList.stream().forEach(c->{
// c.setIsCurrent(0);
// });
// tAppVersionService.updateBatchById(currentList);
// }
// // 将指定办版本设置为当前版本
// boolean flag = tAppVersionService.updateById(appVersion);
// if (flag) {
// return getSuccessResult();
// }
//
// return getFailResult();
// }
@DeleteMapping
(
"/delete/{id}"
)
@DeleteMapping
(
"/delete/{id}"
)
@RequiresPermissions
(
"t:app:version:delete"
)
@RequiresPermissions
(
"t:app:version:delete"
)
@ApiOperation
(
value
=
"根据ID删除"
,
notes
=
"根据ID删除"
)
@ApiOperation
(
value
=
"根据ID删除"
,
notes
=
"根据ID删除"
)
...
@@ -169,22 +131,27 @@ public class TAppVersionController extends BaseController {
...
@@ -169,22 +131,27 @@ public class TAppVersionController extends BaseController {
@ApiImplicitParams
(
value
=
{
@ApiImplicitParams
(
value
=
{
@ApiImplicitParam
(
name
=
"_index"
,
value
=
"分页起始偏移量"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"_index"
,
value
=
"分页起始偏移量"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"_size"
,
value
=
"返回条数"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"_size"
,
value
=
"返回条数"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"startDate"
,
value
=
"开始时间"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"endDate"
,
value
=
"结束时间"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"isCurrent"
,
value
=
"是否为当前版本 0:否 1:是"
,
paramType
=
"query"
,
dataType
=
"String"
)
@ApiImplicitParam
(
name
=
"isCurrent"
,
value
=
"是否为当前版本 0:否 1:是"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
})
@PostMapping
(
"/getPageList"
)
@PostMapping
(
"/getPageList"
)
@RequiresPermissions
(
"t:app:version:page"
)
@RequiresPermissions
(
"t:app:version:page"
)
@ApiOperation
(
value
=
"获取分页列表"
,
notes
=
"获取分页列表"
)
@ApiOperation
(
value
=
"获取分页列表"
,
notes
=
"获取分页列表"
)
public
Map
<
String
,
Object
>
getTAppVersionPageList
(
String
isCurrent
)
{
public
Map
<
String
,
Object
>
getTAppVersionPageList
(
LocalDate
startDate
,
LocalDate
endDate
,
String
isCurrent
)
{
LambdaQueryWrapper
<
TAppVersion
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
TAppVersion
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
// 查询是否为当前版本
// 查询是否为当前版本
if
(
StringUtils
.
isNotBlank
(
isCurrent
))
{
if
(
StringUtils
.
isNotBlank
(
isCurrent
))
{
queryWrapper
.
like
(
TAppVersion:
:
getIsCurrent
,
isCurrent
);
queryWrapper
.
like
(
TAppVersion:
:
getIsCurrent
,
isCurrent
);
}
}
// 查询时间范围
if
(
startDate
!=
null
&&
endDate
!=
null
){
queryWrapper
.
ge
(
TAppVersion:
:
getUpdateTime
,
startDate
.
atTime
(
0
,
0
,
0
))
.
le
(
TAppVersion:
:
getUpdateTime
,
endDate
.
atTime
(
23
,
59
,
59
));
}
queryWrapper
.
select
().
orderByDesc
(
TAppVersion:
:
getUpdateTime
);
Page
<
TAppVersion
>
page
=
this
.
tAppVersionService
.
page
(
getPage
(),
queryWrapper
);
Page
<
TAppVersion
>
page
=
this
.
tAppVersionService
.
page
(
getPage
(),
queryWrapper
);
for
(
TAppVersion
tAppVersion
:
page
.
getRecords
())
{
}
return
getResult
(
page
);
return
getResult
(
page
);
}
}
...
...
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