java nutzboot框架 更新数据库数据 int update = szDeviceServiceupdateChainmakestatus 1 == w1getIntValueedstatus 0 1 CndwheredeviceCode = w1getStringdevicecodeandcollectType = 用水量; 再加一个name字段的值
要在更新数据库数据的同时加入name字段的值,可以使用Chain.make方法来添加name字段的值。示例代码如下:
int update = szDeviceService.update(Chain.make("status", 1 == w1.getIntValue("edstatus") ? "0" : "1").add("name", "your_value"), Cnd.where("deviceCode", "=", w1.getString("devicecode")).and("collectType", "=", "用水量"));
其中,"your_value"是你要添加的name字段的值。
原文地址: http://www.cveoy.top/t/topic/i0R7 著作权归作者所有。请勿转载和采集!