Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
E
energyai_java
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
葛齐林
energyai_java
Commits
8c721552
Commit
8c721552
authored
May 07, 2021
by
co_dengxiongwen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
接口调整
parent
0770843d
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
45 additions
and
5 deletions
+45
-5
LiResource.java
...devplatform/admin/modules/liresource/bean/LiResource.java
+4
-0
LiResourceModel.java
...tform/admin/modules/liresource/model/LiResourceModel.java
+3
-0
SysCommandLog.java
...com/devplatform/admin/modules/sys/bean/SysCommandLog.java
+5
-0
SysCommandLogController.java
...admin/modules/sys/controller/SysCommandLogController.java
+1
-1
SysCommandLogDao.java
...m/devplatform/admin/modules/sys/dao/SysCommandLogDao.java
+3
-0
SysCommandLogService.java
...tform/admin/modules/sys/service/SysCommandLogService.java
+3
-0
SysCommandLogServiceImpl.java
...in/modules/sys/service/impl/SysCommandLogServiceImpl.java
+6
-0
LiResourceMapper.xml
...src/main/resources/mapper/liResource/LiResourceMapper.xml
+8
-3
SysCommandLogMapper.xml
...min/src/main/resources/mapper/sys/SysCommandLogMapper.xml
+12
-1
No files found.
microservice-admin/src/main/java/com/devplatform/admin/modules/liresource/bean/LiResource.java
View file @
8c721552
...
...
@@ -181,6 +181,10 @@ public class LiResource implements Serializable {
/** 图标路径*/
private
java
.
lang
.
String
imageSrc
;
@ApiModelProperty
(
value
=
"人工模式"
,
name
=
"mode_types"
)
/** 人工模式*/
private
java
.
lang
.
String
modeTypes
;
@TableField
(
exist
=
false
)
/** 地图层级*/
private
String
tierName
;
...
...
microservice-admin/src/main/java/com/devplatform/admin/modules/liresource/model/LiResourceModel.java
View file @
8c721552
...
...
@@ -147,6 +147,9 @@ public class LiResourceModel extends BaseModel {
*/
private
java
.
lang
.
String
byx3
;
/** 人工模式*/
private
java
.
lang
.
String
modeTypes
;
/**
* 多种资源点类型
*/
...
...
microservice-admin/src/main/java/com/devplatform/admin/modules/sys/bean/SysCommandLog.java
View file @
8c721552
package
com
.
devplatform
.
admin
.
modules
.
sys
.
bean
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
...
...
@@ -70,4 +71,8 @@ public class SysCommandLog implements Serializable {
/** 备用项3 */
@ApiModelProperty
(
value
=
"备用项3"
,
name
=
"byx3"
)
private
java
.
lang
.
String
byx3
;
@TableField
(
exist
=
false
)
/** 资源点类型名称*/
private
String
resourceName
;
}
microservice-admin/src/main/java/com/devplatform/admin/modules/sys/controller/SysCommandLogController.java
View file @
8c721552
...
...
@@ -109,7 +109,7 @@ public class SysCommandLogController extends AbstractController{
@ApiImplicitParam
(
name
=
"id"
,
value
=
"主键"
,
required
=
true
,
dataType
=
"String"
)
@GetMapping
(
"/getId/{id}"
)
public
R
getId
(
@PathVariable
String
id
)
{
SysCommandLog
bean
=
sysCommandLogService
.
get
ById
(
id
);
Map
<
String
,
Object
>
bean
=
sysCommandLogService
.
getBean
ById
(
id
);
return
R
.
ok
().
put
(
"bean"
,
bean
);
}
...
...
microservice-admin/src/main/java/com/devplatform/admin/modules/sys/dao/SysCommandLogDao.java
View file @
8c721552
...
...
@@ -6,6 +6,7 @@ import com.devplatform.admin.modules.sys.bean.SysCommandLog;
import
com.devplatform.common.dao.MyBaseMapper
;
import
java.util.List
;
import
java.util.Map
;
/**
* SysCommandLog Mapper
...
...
@@ -29,4 +30,6 @@ public interface SysCommandLogDao extends MyBaseMapper<SysCommandLog> {
* @return
*/
List
<
SysCommandLog
>
queryPageList
(
SysCommandLogModel
model
);
Map
<
String
,
Object
>
getBeanById
(
String
id
);
}
microservice-admin/src/main/java/com/devplatform/admin/modules/sys/service/SysCommandLogService.java
View file @
8c721552
...
...
@@ -6,6 +6,7 @@ import com.devplatform.admin.modules.sys.bean.SysCommandLog;
import
com.devplatform.admin.modules.sys.model.SysCommandLogModel
;
import
java.util.List
;
import
java.util.Map
;
/**
* 指令日志表的service接口
...
...
@@ -21,4 +22,6 @@ public interface SysCommandLogService extends MyBaseService<SysCommandLog> {
* @return
*/
List
<
SysCommandLog
>
queryPageList
(
SysCommandLogModel
model
);
Map
<
String
,
Object
>
getBeanById
(
String
id
);
}
microservice-admin/src/main/java/com/devplatform/admin/modules/sys/service/impl/SysCommandLogServiceImpl.java
View file @
8c721552
...
...
@@ -8,6 +8,7 @@ import com.devplatform.common.service.impl.MyBaseServiceImpl;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.Map
;
/**
* 指令日志表的service接口实现类
...
...
@@ -24,4 +25,9 @@ public class SysCommandLogServiceImpl extends MyBaseServiceImpl<SysCommandLogDao
model
.
getPager
().
setRowCount
(
rowCount
);
return
baseMapper
.
queryPageList
(
model
);
}
@Override
public
Map
<
String
,
Object
>
getBeanById
(
String
id
)
{
return
baseMapper
.
getBeanById
(
id
);
}
}
microservice-admin/src/main/resources/mapper/liResource/LiResourceMapper.xml
View file @
8c721552
...
...
@@ -42,6 +42,7 @@
<result
column=
"xlongit"
property=
"xlongit"
/>
<result
column=
"ylat"
property=
"ylat"
/>
<result
column=
"image_src"
property=
"imageSrc"
/>
<result
column=
"mode_types"
property=
"modeTypes"
/>
</resultMap>
<!-- li_resource table all fields -->
...
...
@@ -49,7 +50,7 @@
id,name,code,type,station_id,station_name,tier_id,address_code,port,
username,password,xpoint,ypoint,width,rotate,deploy_location,operator_id,operator_name,
attached_info,remark,icon,status,deleted,create_user_id,create_time,update_user_id,update_time,
byx1,byx2,byx3,brand,xlongit,ylat,image_src,equipment_model,max_power,install_date,maintenance_date,region
byx1,byx2,byx3,brand,xlongit,ylat,image_src,equipment_model,max_power,install_date,maintenance_date,region
,mode_types
</sql>
<!-- 公共查询条件 -->
...
...
@@ -89,6 +90,7 @@
<if
test=
"byx2!=null and byx2!=''"
>
and byx2 = #{byx2}
</if>
<if
test=
"byx3!=null and byx3!=''"
>
and byx3 = #{byx3}
</if>
<if
test=
"brand!=null and brand!=''"
>
and brand = #{brand}
</if>
<if
test=
"modeTypes!=null and modeTypes!=''"
>
and mode_types = #{modeTypes}
</if>
</sql>
<!--查询总数-->
...
...
@@ -99,8 +101,9 @@
<select
id=
"queryPageByList"
parameterType=
"Object"
resultMap=
"BaseResultMap"
>
select li.*,sdb.name as brandName,
(CASE WHEN li.status = 1 THEN '在线'
WHEN li.status = 2 THEN '离线'
(CASE WHEN li.status = 1 THEN '运行'
WHEN li.status = 2 THEN '停止'
WHEN li.status = 3 THEN '离线'
ELSE '故障' END) as statusName
from li_resource li
left join sys_dictionary sdb on sdb.id = li.brand
...
...
@@ -149,6 +152,7 @@
<if
test=
"byx2!=null and byx2!=''"
>
and byx2 = #{byx2}
</if>
<if
test=
"byx3!=null and byx3!=''"
>
and byx3 = #{byx3}
</if>
<if
test=
"brand!=null and brand!=''"
>
and brand = #{brand}
</if>
<if
test=
"modeTypes!=null and modeTypes!=''"
>
and mode_types = #{modeTypes}
</if>
<if
test=
"list!=null and list.size()>0"
>
and type in
<foreach
close=
")"
collection=
"list"
index=
"index"
item=
"item"
open=
"("
separator=
","
>
...
...
@@ -193,6 +197,7 @@
<if
test=
"byx2!=null and byx2!=''"
>
and li.byx2 = #{byx2}
</if>
<if
test=
"byx3!=null and byx3!=''"
>
and li.byx3 = #{byx3}
</if>
<if
test=
"brand!=null and brand!=''"
>
and li.brand = #{brand}
</if>
<if
test=
"modeTypes!=null and modeTypes!=''"
>
and li.mode_types = #{modeTypes}
</if>
<if
test=
"list!=null and list.size()>0"
>
and li.type in
<foreach
close=
")"
collection=
"list"
index=
"index"
item=
"item"
open=
"("
separator=
","
>
...
...
microservice-admin/src/main/resources/mapper/sys/SysCommandLogMapper.xml
View file @
8c721552
...
...
@@ -55,7 +55,8 @@
</select>
<select
id=
"queryPageList"
parameterType=
"Object"
resultMap=
"BaseResultMap"
>
select t.* from sys_command_log t
select t.*,lr.name as resourceName from sys_command_log t
left join li_resource lr on lr.id = t.resource_id
<include
refid=
"Example_Where_Clause"
/>
<if
test=
"pager.orderCondition != null and pager.orderCondition != ''"
>
${pager.orderCondition}
...
...
@@ -64,6 +65,16 @@
${pager.mysqlQueryCondition}
</if>
</select>
<select
id=
"getBeanById"
resultType=
"java.util.Map"
>
select t.id,su.username as createUserName, t.create_time as createTime,t.result,t.com_type as comType,
t.com_mark as comMark,t.com_source as comSource,
lr.status,lr.code,lr.name as resourceName,sd.name as type from
sys_command_log t
left join li_resource lr on lr.id = t.resource_id
left join sys_dictionary sd on sd.id = t.resource_type
left join sys_user su on su.user_id = t.create_user_id
where t.id = #{id}
</select>
</mapper>
...
...
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