Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
open-source
/
chejia-smart-service
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 9dec43ce
authored
Apr 21, 2021
by
王欣伟
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修正设备产品列表信息获取
1 parent
d9209512
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
1 deletions
src/main/java/com/glsx/smart/constant/Constants.java
src/main/java/com/glsx/smart/service/impl/SmartProductServiceImpl.java
src/main/java/com/glsx/smart/constant/Constants.java
View file @
9dec43c
...
...
@@ -19,4 +19,26 @@ public class Constants {
public
final
static
int
REDIS_CACHE_TIME
=
3
;
//redis缓存时间
/**
* 平台key定义
*/
public
static
class
PlatformKey
{
/**
* 涂鸦的平台key
*/
public
final
static
String
tuya
=
"access_platform_didihu"
;
/**
* 嘀嘀虎的平台key
*/
public
final
static
String
didihu
=
"access_platform_didihu"
;
/**
* 绿米的平台key
*/
public
final
static
String
lvmi
=
"access_platform_lvmi"
;
}
}
src/main/java/com/glsx/smart/service/impl/SmartProductServiceImpl.java
View file @
9dec43c
...
...
@@ -3,6 +3,7 @@ package com.glsx.smart.service.impl;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.github.pagehelper.PageInfo
;
import
com.glsx.smart.constant.Constants
;
import
com.glsx.smart.dao.entity.SmartDeviceOrder
;
import
com.glsx.smart.dao.entity.SmartProduct
;
import
com.glsx.smart.dao.entity.SmartSysCode
;
...
...
@@ -257,7 +258,7 @@ public class SmartProductServiceImpl extends BaseService implements SmartProduct
//productInfo.put("id", product.getId());
productInfo
.
put
(
"name"
,
product
.
getProductName
());
productInfo
.
put
(
"icon"
,
product
.
getIconUrl
());
productInfo
.
put
(
"typeId"
,
product
.
getNetworkKey
());
productInfo
.
put
(
"typeId"
,
(
product
.
getPlatformKey
().
equals
(
Constants
.
PlatformKey
.
didihu
))?
product
.
getPlatformProductId
():
product
.
getNetworkKey
());
productInfo
.
put
(
"shopProductId"
,
product
.
getShopProductId
());
productInfoArray
.
add
(
productInfo
);
}
...
...
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