Commit 0c8951f1 by wnb0128

车家智能数据服务 执行内容指令上下架功能实现--think.wang

1 parent 69219925
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;
}
......@@ -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>
......@@ -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">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!