----------R [channel=null, brand=360, model=1505-A01, IMEI=863170032238450, IMSI=null, OS=null, version=null, number0=null, number1=null, network=null, MAC=null, pluginName=null, pluginVersion=null, pluginKey=null, softwareCount=0, application=0, time=0, apkItems=null, userDate=[ [PackageName=com.UCMobile, Date_Time=Sat Dec 02 11:24:25 CST 2017, CS_INT=16], [PackageName=com.jingdong.app.mall, Date_Time=Sat Dec 02 11:23:06 CST 2017, CS_INT=2]]]
---------[ [PackageName=com.UCMobile, Date_Time=Sat Dec 02 11:24:25 CST 2017, CS_INT=16], [PackageName=com.jingdong.app.mall, Date_Time=Sat Dec 02 11:23:06 CST 2017, CS_INT=2]]
2-----[ [PackageName=com.UCMobile, Date_Time=Sat Dec 02 11:24:25 CST 2017, CS_INT=16]]
2017-12-02 11:53:44,267 org.nutz.dao.impl.sql.run.NutDaoExecutor.printSQL(NutDaoExecutor.java:388) DEBUG - SELECT * FROM t_device WHERE c_imei1=? LIMIT 0, 1
| 1 |
|-----------------|
| 863170032238450 |
For example:> "SELECT * FROM t_device WHERE c_imei1='863170032238450' LIMIT 0, 1 "
------Device [id=167, channelId=1, brand=360, model=1505-A01, IMEI1=863170032238450, IMEI2=null, MEID=null, IMSI=, OS=android, version=6.0, number0=null, number1=null, network=null, MAC=02:00:00:00:00:00, source=null, pluginName=blackcrow, pluginVersion=1.0.0, pluginKey=null, registerDateTime=Sat Dec 02 11:22:58 CST 2017, firstUpdateDateTime=Sat Dec 02 11:18:59 CST 2017, lastUpdateDateTime=Sat Dec 02 11:22:58 CST 2017, firstIP=192.168.1.164, firstArea=null, lastIP=192.168.1.164, lastArea=null, totalPreinstallApk=0, targetPreinstallApk=0, matchCount=0, IMEIS=null, softwareCount=2, channelName=null, pluginChannelName=null]
-------[]
Where----- WHERE packageName='com.UCMobile'
2017-12-02 11:53:44,285 org.nutz.dao.impl.sql.run.NutDaoExecutor.printSQL(NutDaoExecutor.java:388) DEBUG - SELECT * FROM t_device_apk WHERE c_package_name=? LIMIT 0, 1
| 1 |
|--------------|
| com.UCMobile |
For example:> "SELECT * FROM t_device_apk WHERE c_package_name='com.UCMobile' LIMIT 0, 1 "
---appDeviceApk [id=187, deviceId=10, channelId=1, name=UC浏览器, packageName=com.UCMobile, versionCode=700, versionName=11.6.2.948, system=false, match=false, preinstallChecksum=null, firstChecksum=8521443e67234c4af64b70b5c7b0d3c6439701df, lastChecksum=8521443e67234c4af64b70b5c7b0d3c6439701df, registerDateTime=null, firstInstallDateTime=Sat Aug 19 03:28:53 CST 2017, lastUpdateDateTime=Wed Aug 23 07:25:43 CST 2017, lastMatchDateTime=null, validate=false]
2-----[ [PackageName=com.jingdong.app.mall, Date_Time=Sat Dec 02 11:23:06 CST 2017, CS_INT=2]]
2017-12-02 11:53:44,306 org.nutz.dao.impl.sql.run.NutDaoExecutor.printSQL(NutDaoExecutor.java:388) DEBUG - SELECT * FROM t_device WHERE c_imei1=? AND c_imei1=? LIMIT 0, 1
| 1 | 2 |
|-----------------|-----------------|
| 863170032238450 | 863170032238450 |
For example:> "SELECT * FROM t_device WHERE c_imei1='863170032238450' AND c_imei1='863170032238450' LIMIT 0, 1 "
------Device [id=167, channelId=1, brand=360, model=1505-A01, IMEI1=863170032238450, IMEI2=null, MEID=null, IMSI=, OS=android, version=6.0, number0=null, number1=null, network=null, MAC=02:00:00:00:00:00, source=null, pluginName=blackcrow, pluginVersion=1.0.0, pluginKey=null, registerDateTime=Sat Dec 02 11:22:58 CST 2017, firstUpdateDateTime=Sat Dec 02 11:18:59 CST 2017, lastUpdateDateTime=Sat Dec 02 11:22:58 CST 2017, firstIP=192.168.1.164, firstArea=null, lastIP=192.168.1.164, lastArea=null, totalPreinstallApk=0, targetPreinstallApk=0, matchCount=0, IMEIS=null, softwareCount=2, channelName=null, pluginChannelName=null]
-------[]
Where----- WHERE c_package_name='com.UCMobile' AND c_package_name='com.jingdong.app.mall'
你是不是要这种效果?
List<User> users = new ArrayList();
for (Apk apk : apks) {
User user = dao.fetch(User.class, Cnd.where("apkId", "=", apk.getId());
users.add(user);
}
Cnd cn2 = Cnd.NEW();
Cnd cn1 = Cnd.NEW();
Sql sql = null;
List list1=new ArrayList();
// ActivatingQuantity Quantity = new ActivatingQuantity();
for (int i = 0; i < temp; i++) {
if (i == temp - 1) {
if (special) {
break;
}
} else {
cutList = statistics.subList(flag * i, flag * (i + 1));
System.err.println("2-----" + cutList);
for (int j = 0; j < cutList.size(); j++) {
cn1 = Where.where(cn1, "IMEI1", "=", updateClientInfo.getIMEI()); // 查询手机唯一
Device device = dao.fetch(Device.class, cn1);
System.err.println("------"+device.toString());
cn2 = Where.where(cn2, "deviceId", "=",device.getId()); //查询包名
System.err.println("Where-----"+cn2);
// cn2 = Where.where(cn2, "", "in",list1 );
//cn2.or("packageName", "=", cutList.get(j).getPackageName());
DeviceApk deviceApk = dao.fetch(DeviceApk.class, cn2);
System.err.println("---app" + deviceApk.toString());
}
}
}
日志·:
第一次的数据是正确的
------Device [id=167, channelId=1, brand=360, model=1505-A01, IMEI1=863170032238450, IMEI2=null, MEID=null, IMSI=, OS=android, version=6.0, number0=null, number1=null, network=null, MAC=02:00:00:00:00:00, source=null, pluginName=blackcrow, pluginVersion=1.0.0, pluginKey=null, registerDateTime=Sat Dec 02 12:01:14 CST 2017, firstUpdateDateTime=Sat Dec 02 11:18:59 CST 2017, lastUpdateDateTime=Sat Dec 02 12:01:14 CST 2017, firstIP=192.168.1.164, firstArea=null, lastIP=192.168.1.164, lastArea=null, totalPreinstallApk=0, targetPreinstallApk=0, matchCount=0, IMEIS=null, softwareCount=2, channelName=null, pluginChannelName=null]
Where----- WHERE deviceId=167
---appDeviceApk [id=16228, deviceId=167, channelId=1, name=火山小视频, packageName=com.ss.android.ugc.live, versionCode=272, versionName=2.7.2, system=false, match=false, preinstallChecksum=null, firstChecksum=aef8d0dbcedf79b6d722a9dcd9b48db171081485, lastChecksum=aef8d0dbcedf79b6d722a9dcd9b48db171081485, registerDateTime=Sat Dec 02 11:18:59 CST 2017, firstInstallDateTime=Sat Dec 02 11:18:59 CST 2017, lastUpdateDateTime=Sat Dec 02 11:18:59 CST 2017, lastMatchDateTime=null, validate=false]
第二次的数据
-----[ [PackageName=com.jingdong.app.mall, Date_Time=Sat Dec 02 11:23:06 CST 2017, CS_INT=2]]
------Device [id=167, channelId=1, brand=360, model=1505-A01, IMEI1=863170032238450, IMEI2=null, MEID=null, IMSI=, OS=android, version=6.0, number0=null, number1=null, network=null, MAC=02:00:00:00:00:00, source=null, pluginName=blackcrow, pluginVersion=1.0.0, pluginKey=null, registerDateTime=Sat Dec 02 12:01:14 CST 2017, firstUpdateDateTime=Sat Dec 02 11:18:59 CST 2017, lastUpdateDateTime=Sat Dec 02 12:01:14 CST 2017, firstIP=192.168.1.164, firstArea=null, lastIP=192.168.1.164, lastArea=null, totalPreinstallApk=0, targetPreinstallApk=0, matchCount=0, IMEIS=null, softwareCount=2, channelName=null, pluginChannelName=null]
Where----- WHERE c_device_id=167 AND c_device_id=167 这个有问题
查询的也是第一次数据的记录
---appDeviceApk [id=16228, deviceId=167, channelId=1, name=火山小视频, packageName=com.ss.android.ugc.live, versionCode=272, versionName=2.7.2, system=false, match=false, preinstallChecksum=null, firstChecksum=aef8d0dbcedf79b6d722a9dcd9b48db171081485, lastChecksum=aef8d0dbcedf79b6d722a9dcd9b48db171081485, registerDateTime=Sat Dec 02 11:18:59 CST 2017, firstInstallDateTime=Sat Dec 02 11:18:59 CST 2017, lastUpdateDateTime=Sat Dec 02 11:18:59 CST 2017, lastMatchDateTime=null, validate=false]