Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
open-source
/
rpc-openplatform
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 33cc0fd5
authored
Dec 30, 2020
by
tyfanchz
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
实体类修改、设备查询条件修改
1 parent
2a5f4037
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
23 deletions
rpc-openplatform-api/src/main/java/cn/com/glsx/openplatform/model/PlatformDevice.java
rpc-openplatform-api/src/main/java/cn/com/glsx/openplatform/vo/R.java
rpc-openplatform-container/src/main/resources/META-INF/orm/PlatformDeviceMapper.xml
rpc-openplatform-api/src/main/java/cn/com/glsx/openplatform/model/PlatformDevice.java
View file @
33cc0fd
package
cn
.
com
.
glsx
.
openplatform
.
model
;
package
cn
.
com
.
glsx
.
openplatform
.
model
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
javax.persistence.Column
;
import
javax.persistence.Column
;
import
javax.persistence.Table
;
import
javax.persistence.Table
;
import
javax.persistence.Transient
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.Date
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
org.springframework.format.annotation.DateTimeFormat
;
/**
/**
* <p>Description:
* <p>Description:
...
@@ -41,11 +41,13 @@ public class PlatformDevice implements Serializable {
...
@@ -41,11 +41,13 @@ public class PlatformDevice implements Serializable {
/**
/**
* 客户id t_platform_customer表的id
* 客户id t_platform_customer表的id
*/
*/
@Column
(
name
=
"customer_id"
)
private
Integer
customerId
;
private
Integer
customerId
;
/**
/**
* 客户名称
* 客户名称
*/
*/
@Transient
private
String
customerName
;
private
String
customerName
;
/**
/**
...
...
rpc-openplatform-api/src/main/java/cn/com/glsx/openplatform/vo/R.java
View file @
33cc0fd
...
@@ -79,23 +79,6 @@ public class R extends HashMap<String, Object> {
...
@@ -79,23 +79,6 @@ public class R extends HashMap<String, Object> {
return
this
;
return
this
;
}
}
///**
// * mybatis PageHelper分页数据
// *
// * @param page PageHelper分页数据
// * @return 结果
// */
//public R putPageData(com.github.pagehelper.Page<?> page) {
// Map<Object, Object> data = new HashMap<>(2);
// Map<Object, Object> pageMap = new HashMap<>();
// pageMap.put("pages", page.getPages());
// pageMap.put("total", page.getTotal());
// data.put(PAGE_KEY, pageMap);//分页信息
// data.put(LIST_KEY, page.getResult());//分页数据
// super.put(DATA_KEY, data);
// return this;
//}
/**
/**
* 分页数据
* 分页数据
*
*
...
@@ -104,8 +87,8 @@ public class R extends HashMap<String, Object> {
...
@@ -104,8 +87,8 @@ public class R extends HashMap<String, Object> {
*/
*/
public
R
putPageData
(
Object
obj
)
{
public
R
putPageData
(
Object
obj
)
{
Map
<
Object
,
Object
>
data
=
new
HashMap
<>(
2
);
Map
<
Object
,
Object
>
data
=
new
HashMap
<>(
2
);
if
(
obj
instanceof
com
.
github
.
pagehelper
.
Page
)
{
if
(
obj
instanceof
Page
)
{
com
.
github
.
pagehelper
.
Page
<?>
page
=
(
Page
<?>)
obj
;
Page
<?>
page
=
(
Page
<?>)
obj
;
Map
<
Object
,
Object
>
pageMap
=
new
HashMap
<>();
Map
<
Object
,
Object
>
pageMap
=
new
HashMap
<>();
pageMap
.
put
(
"pages"
,
page
.
getPages
());
pageMap
.
put
(
"pages"
,
page
.
getPages
());
pageMap
.
put
(
"total"
,
page
.
getTotal
());
pageMap
.
put
(
"total"
,
page
.
getTotal
());
...
...
rpc-openplatform-container/src/main/resources/META-INF/orm/PlatformDeviceMapper.xml
View file @
33cc0fd
...
@@ -40,7 +40,8 @@
...
@@ -40,7 +40,8 @@
a.remark
a.remark
from t_platform_device a
from t_platform_device a
left join t_platform_customer b on a.customer_id = b.id
left join t_platform_customer b on a.customer_id = b.id
where 1 = 1
<where>
and a.status != 9
<if
test=
"customerName != null and customerName != ''"
>
<if
test=
"customerName != null and customerName != ''"
>
and b.customer_name = #{customerName,jdbcType=VARCHAR}
and b.customer_name = #{customerName,jdbcType=VARCHAR}
</if>
</if>
...
@@ -56,6 +57,7 @@
...
@@ -56,6 +57,7 @@
<if
test=
"activatEndTime != null"
>
<if
test=
"activatEndTime != null"
>
and a.activat_time
<
= #{activatEndTime,jdbcType=TIMESTAMP}
and a.activat_time
<
= #{activatEndTime,jdbcType=TIMESTAMP}
</if>
</if>
</where>
</select>
</select>
<select
id=
"getDeviceTypeList"
resultType=
"java.lang.String"
>
<select
id=
"getDeviceTypeList"
resultType=
"java.lang.String"
>
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment