HTTP Header(必须包括):
{
"Content-Type":"application/json",
"X-App-Token":"应用密钥"
}
# -*- encoding: utf-8 -*- | |
require 'wiringpi' | |
class Pi | |
def initialize(pins) | |
@pins = pins | |
@io = WiringPi::GPIO.new | |
@io.wiringPiMode(WPI_MODE_GPIO) |
user = User.all[11] | |
def get_value(cid, properties) | |
prop_ids = properties.split(':') | |
prop = ItemProp.where(_id: "#{cid}-#{prop_ids[0]}").first | |
return nil if prop.nil? | |
prop_value = prop.prop_values.where(vid: prop_ids[1]).first | |
return nil if prop_value.nil? | |
prop_value.name |
String today = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); | |
String seller = "onitsukatiger官方旗舰店"; | |
// 同步队列 | |
SyncQueue ot = OT.orderQueue(seller, today); | |
Query sql = dbconn.createQuery("from Trade where seller_nick = ? and status = ? and (end_time between ? and ?)"); | |
sql.setString(0, seller); | |
sql.setString(1, "TRADE_FINISHED"); | |
sql.setString(2, today + " 00:00:00"); | |
sql.setString(3, today + " 23:59:59"); |