Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mes
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
ximai
mes
Commits
dd087403
Commit
dd087403
authored
Nov 07, 2024
by
李驰骋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
app名称字段添加
parent
5f314eaf
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
4 deletions
+17
-4
AppConfigController.java
...ava/com/ximai/mes/pro/controller/AppConfigController.java
+4
-2
AppConfig.java
mes/src/main/java/com/ximai/mes/pro/domain/AppConfig.java
+4
-0
IAppConfigService.java
...ain/java/com/ximai/mes/pro/service/IAppConfigService.java
+1
-1
AppConfigServiceImpl.java
.../com/ximai/mes/pro/service/impl/AppConfigServiceImpl.java
+3
-1
AppConfigMapper.xml
mes/src/main/resources/mapper/md/AppConfigMapper.xml
+5
-0
No files found.
mes/src/main/java/com/ximai/mes/pro/controller/AppConfigController.java
View file @
dd087403
...
@@ -7,6 +7,7 @@ import com.ximai.common.core.page.TableDataInfo;
...
@@ -7,6 +7,7 @@ import com.ximai.common.core.page.TableDataInfo;
import
com.ximai.common.enums.BusinessType
;
import
com.ximai.common.enums.BusinessType
;
import
com.ximai.mes.pro.domain.AppConfig
;
import
com.ximai.mes.pro.domain.AppConfig
;
import
com.ximai.mes.pro.service.IAppConfigService
;
import
com.ximai.mes.pro.service.IAppConfigService
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
...
@@ -50,10 +51,11 @@ public class AppConfigController extends BaseController {
...
@@ -50,10 +51,11 @@ public class AppConfigController extends BaseController {
/**
/**
* 获取作业端配置记录详细信息
* 获取作业端配置记录详细信息
*/
*/
@ApiOperation
(
"获取作业端最新版本"
)
@PreAuthorize
(
"@ss.hasPermi('md:config:query')"
)
@PreAuthorize
(
"@ss.hasPermi('md:config:query')"
)
@GetMapping
(
value
=
"/getVersion"
)
@GetMapping
(
value
=
"/getVersion"
)
public
AjaxResult
getVersion
()
{
public
AjaxResult
getVersion
(
@PathVariable
(
"appName"
)
String
appName
)
{
return
AjaxResult
.
success
(
appConfigService
.
selectLastVersion
());
return
AjaxResult
.
success
(
appConfigService
.
selectLastVersion
(
appName
));
}
}
/**
/**
...
...
mes/src/main/java/com/ximai/mes/pro/domain/AppConfig.java
View file @
dd087403
...
@@ -3,6 +3,7 @@ package com.ximai.mes.pro.domain;
...
@@ -3,6 +3,7 @@ package com.ximai.mes.pro.domain;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.ximai.common.annotation.Excel
;
import
com.ximai.common.annotation.Excel
;
import
com.ximai.common.core.domain.BaseEntity
;
import
com.ximai.common.core.domain.BaseEntity
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
/**
/**
...
@@ -33,6 +34,9 @@ public class AppConfig extends BaseEntity {
...
@@ -33,6 +34,9 @@ public class AppConfig extends BaseEntity {
@Excel
(
name
=
"下载地址"
)
@Excel
(
name
=
"下载地址"
)
private
String
url
;
private
String
url
;
@ApiModelProperty
(
"app名称"
)
private
String
appName
;
/**
/**
* 是否强制更新
* 是否强制更新
*/
*/
...
...
mes/src/main/java/com/ximai/mes/pro/service/IAppConfigService.java
View file @
dd087403
...
@@ -59,6 +59,6 @@ public interface IAppConfigService {
...
@@ -59,6 +59,6 @@ public interface IAppConfigService {
*/
*/
int
deleteAppConfigById
(
Long
id
);
int
deleteAppConfigById
(
Long
id
);
List
<
AppConfig
>
selectLastVersion
();
List
<
AppConfig
>
selectLastVersion
(
String
appName
);
}
}
mes/src/main/java/com/ximai/mes/pro/service/impl/AppConfigServiceImpl.java
View file @
dd087403
package
com
.
ximai
.
mes
.
pro
.
service
.
impl
;
package
com
.
ximai
.
mes
.
pro
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.ximai.common.utils.data.StringUtils
;
import
com.ximai.mes.pro.domain.AppConfig
;
import
com.ximai.mes.pro.domain.AppConfig
;
import
com.ximai.mes.pro.mapper.AppConfigMapper
;
import
com.ximai.mes.pro.mapper.AppConfigMapper
;
import
com.ximai.mes.pro.service.IAppConfigService
;
import
com.ximai.mes.pro.service.IAppConfigService
;
...
@@ -97,9 +98,10 @@ public class AppConfigServiceImpl implements IAppConfigService {
...
@@ -97,9 +98,10 @@ public class AppConfigServiceImpl implements IAppConfigService {
}
}
@Override
@Override
public
List
<
AppConfig
>
selectLastVersion
()
{
public
List
<
AppConfig
>
selectLastVersion
(
String
appName
)
{
QueryWrapper
<
AppConfig
>
appConfigQueryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
AppConfig
>
appConfigQueryWrapper
=
new
QueryWrapper
<>();
appConfigQueryWrapper
.
eq
(
"last_version"
,
0
);
appConfigQueryWrapper
.
eq
(
"last_version"
,
0
);
appConfigQueryWrapper
.
eq
(
StringUtils
.
isNotNull
(
appName
),
"app_name"
,
appName
);
List
<
AppConfig
>
appConfigs
=
appConfigMapper
.
selectListByQw
(
appConfigQueryWrapper
);
List
<
AppConfig
>
appConfigs
=
appConfigMapper
.
selectListByQw
(
appConfigQueryWrapper
);
return
appConfigs
;
return
appConfigs
;
}
}
...
...
mes/src/main/resources/mapper/md/AppConfigMapper.xml
View file @
dd087403
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
<result
property=
"version"
column=
"version"
/>
<result
property=
"version"
column=
"version"
/>
<result
property=
"lastVersion"
column=
"last_version"
/>
<result
property=
"lastVersion"
column=
"last_version"
/>
<result
property=
"url"
column=
"url"
/>
<result
property=
"url"
column=
"url"
/>
<result
property=
"appName"
column=
"app_name"
/>
<result
property=
"updateState"
column=
"update_state"
/>
<result
property=
"updateState"
column=
"update_state"
/>
<result
property=
"updateDesc"
column=
"update_desc"
/>
<result
property=
"updateDesc"
column=
"update_desc"
/>
<result
property=
"createBy"
column=
"create_by"
/>
<result
property=
"createBy"
column=
"create_by"
/>
...
@@ -22,6 +23,7 @@
...
@@ -22,6 +23,7 @@
version,
version,
last_version,
last_version,
url,
url,
app_name,
update_state,
update_state,
update_desc,
update_desc,
create_by,
create_by,
...
@@ -53,6 +55,7 @@
...
@@ -53,6 +55,7 @@
<if
test=
"version != null"
>
version,
</if>
<if
test=
"version != null"
>
version,
</if>
<if
test=
"lastVersion != null"
>
last_version,
</if>
<if
test=
"lastVersion != null"
>
last_version,
</if>
<if
test=
"url != null"
>
url,
</if>
<if
test=
"url != null"
>
url,
</if>
<if
test=
"appName != null"
>
app_name,
</if>
<if
test=
"updateState != null"
>
update_state,
</if>
<if
test=
"updateState != null"
>
update_state,
</if>
<if
test=
"updateDesc != null"
>
update_desc,
</if>
<if
test=
"updateDesc != null"
>
update_desc,
</if>
<if
test=
"createBy != null"
>
create_by,
</if>
<if
test=
"createBy != null"
>
create_by,
</if>
...
@@ -65,6 +68,7 @@
...
@@ -65,6 +68,7 @@
<if
test=
"version != null"
>
#{version},
</if>
<if
test=
"version != null"
>
#{version},
</if>
<if
test=
"lastVersion != null"
>
#{lastVersion},
</if>
<if
test=
"lastVersion != null"
>
#{lastVersion},
</if>
<if
test=
"url != null"
>
#{url},
</if>
<if
test=
"url != null"
>
#{url},
</if>
<if
test=
"appName != null"
>
#{appName},
</if>
<if
test=
"updateState != null"
>
#{updateState},
</if>
<if
test=
"updateState != null"
>
#{updateState},
</if>
<if
test=
"updateDesc != null"
>
#{updateDesc},
</if>
<if
test=
"updateDesc != null"
>
#{updateDesc},
</if>
<if
test=
"createBy != null"
>
#{createBy},
</if>
<if
test=
"createBy != null"
>
#{createBy},
</if>
...
@@ -79,6 +83,7 @@
...
@@ -79,6 +83,7 @@
<trim
prefix=
"SET"
suffixOverrides=
","
>
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"version != null"
>
version = #{version},
</if>
<if
test=
"version != null"
>
version = #{version},
</if>
<if
test=
"url != null"
>
url = #{url},
</if>
<if
test=
"url != null"
>
url = #{url},
</if>
<if
test=
"appName != null"
>
app_name = #{appName},
</if>
<if
test=
"updateState != null"
>
update_state = #{updateState},
</if>
<if
test=
"updateState != null"
>
update_state = #{updateState},
</if>
<if
test=
"lastVersion != null"
>
last_version = #{lastVersion},
</if>
<if
test=
"lastVersion != null"
>
last_version = #{lastVersion},
</if>
<if
test=
"updateDesc != null"
>
update_desc = #{updateDesc},
</if>
<if
test=
"updateDesc != null"
>
update_desc = #{updateDesc},
</if>
...
...
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