Cnd cn1 = Cnd.NEW();
Cnd cn2 = Cnd.NEW();
if (i == temp - 1) {
if (special) {
break;
}
} else {
cutList = statistics.subList(flag * i, flag * (i + 1));
for (int j = 0; j < cutList.size(); j++) {
cn1 = Where.where(cn1, "IMEI1", "=", updateClientInfo.getIMEI()); // 查询手机唯一
Device device = dao.fetch(Device.class, cn1);
cn2 = Where.where(cn2, "deviceId", "=",device.getId()); //查询手机id
cn2 = Where.where(cn2, "packageName", "=",cutList.get(j).getPackageName()); //查询包名
DeviceApk deviceApk = dao.fetch(DeviceApk.class, cn2);
sql = Sqls.create(
"select * from t_activating_quantity where q_createtime in (select max(q_createtime) from t_activating_quantity $cnd )");
sql.setVar("cnd", Cnd.NEW().andEX("t_activating_quantity.q_apkId", "=", deviceApk.getId())
.andEX("t_activating_quantity.q_deviceId", "=", device.getId()));
sql.setCallback(Sqls.callback.entities());
sql.setEntity(dao.getEntity(ActivatingQuantity.class));
dao.execute(sql);
List<ActivatingQuantity> fetch = sql.getList(ActivatingQuantity.class);
nutz自定义sql查询
最新推荐文章于 2023-05-03 11:01:32 发布