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 0c8951f1
authored
Apr 14, 2021
by
wnb0128
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
车家智能数据服务 执行内容指令上下架功能实现--think.wang
1 parent
69219925
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
4 deletions
src/main/java/com/glsx/smart/dao/entity/SmartDeviceOrder.java
src/main/resources/mapper/SmartDeviceOrderMapper.xml
src/main/resources/mapper/SmartProductTypeMapper.xml
src/main/java/com/glsx/smart/dao/entity/SmartDeviceOrder.java
View file @
0c8951f
package
com
.
glsx
.
smart
.
dao
.
entity
;
import
lombok.Data
;
import
javax.persistence.Column
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
lombok.Data
;
/**
* <p>Description:
...
...
@@ -43,4 +44,10 @@ public class SmartDeviceOrder {
*/
@Column
(
name
=
"order_value_type"
)
private
String
orderValueType
;
/**
* 状态 1上线 0下线
*/
@Column
(
name
=
"status"
)
private
Byte
status
;
}
src/main/resources/mapper/SmartDeviceOrderMapper.xml
View file @
0c8951f
...
...
@@ -10,13 +10,14 @@
<result
column=
"order_value"
jdbcType=
"VARCHAR"
property=
"orderValue"
/>
<result
column=
"order_type"
jdbcType=
"VARCHAR"
property=
"orderType"
/>
<result
column=
"order_value_type"
jdbcType=
"VARCHAR"
property=
"orderValueType"
/>
<result
column=
"status"
jdbcType=
"TINYINT"
property=
"status"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, product_id, order_code, order_value, order_type, order_value_type
id, product_id, order_code, order_value, order_type, order_value_type
, `status`
</sql>
<select
id=
"getListByProductId"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from smart_device_order t where t.product_id = #{productId,jdbcType=VARCHAR}
from smart_device_order t where t.
`status` = 1 and t.
product_id = #{productId,jdbcType=VARCHAR}
</select>
</mapper>
src/main/resources/mapper/SmartProductTypeMapper.xml
View file @
0c8951f
...
...
@@ -70,7 +70,7 @@
<select
id=
"getAllContentList"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from smart_product_type where id in (select distinct product_id from smart_device_order)
from smart_product_type where id in (select distinct product_id from smart_device_order
where `status` = 1
)
</select>
<select
id=
"getListAndCondition"
parameterType=
"java.util.List"
resultMap=
"BaseConditionMap"
>
...
...
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