|
|
@@ -29,15 +29,17 @@ public class ScanCodeLoginServiceImpl implements ScanCodeLoginService {
|
|
|
for (String string : split) {
|
|
|
//Object EM_QRCODE = baseDao.getFieldDataByCondition("employee", "EM_QRCODE", "em_id="+string);
|
|
|
Object[] datas = baseDao.getFieldsDataByCondition("employee", "em_code,em_password,em_qrcode", "em_id="+string);
|
|
|
- if (datas[2]!=null) {
|
|
|
- String[] split2 = datas[2].toString().split(",");
|
|
|
- if (!MD5Util.MD5(datas[1].toString()).equals(split2[1])) {
|
|
|
+ if (datas[1]!= null && datas[0]!= null) {
|
|
|
+ if (datas[2]!=null) {
|
|
|
+ String[] split2 = datas[2].toString().split(",");
|
|
|
+ if (!MD5Util.MD5(datas[1].toString()).equals(split2[1])) {
|
|
|
+ String sql="update employee set EM_QRCODE='("+datas[0]+","+MD5Util.MD5(datas[1].toString())+")' where em_id="+string;
|
|
|
+ baseDao.execute(sql);
|
|
|
+ }
|
|
|
+ }else {
|
|
|
String sql="update employee set EM_QRCODE='("+datas[0]+","+MD5Util.MD5(datas[1].toString())+")' where em_id="+string;
|
|
|
baseDao.execute(sql);
|
|
|
}
|
|
|
- }else {
|
|
|
- String sql="update employee set EM_QRCODE='("+datas[0]+","+MD5Util.MD5(datas[1].toString())+")' where em_id="+string;
|
|
|
- baseDao.execute(sql);
|
|
|
}
|
|
|
}
|
|
|
String rs = "("+substring+")";
|