|
@@ -1,5 +1,6 @@
|
|
|
package com.lc.ibps.sysdata.services.impl;
|
|
package com.lc.ibps.sysdata.services.impl;
|
|
|
|
|
|
|
|
|
|
+import cn.hutool.json.JSONUtil;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
@@ -23,6 +24,7 @@ import com.lc.ibps.cloud.redis.utils.RedisUtil;
|
|
|
import com.lc.ibps.cloud.util.AESUtil;
|
|
import com.lc.ibps.cloud.util.AESUtil;
|
|
|
import com.lc.ibps.config.JsonUtilConfig;
|
|
import com.lc.ibps.config.JsonUtilConfig;
|
|
|
import com.lc.ibps.config.SerialConfig;
|
|
import com.lc.ibps.config.SerialConfig;
|
|
|
|
|
+import com.lc.ibps.sysdata.QueryDTO;
|
|
|
import com.lc.ibps.sysdata.dao.UpdateDataTableDao;
|
|
import com.lc.ibps.sysdata.dao.UpdateDataTableDao;
|
|
|
import com.lc.ibps.sysdata.entity.Material;
|
|
import com.lc.ibps.sysdata.entity.Material;
|
|
|
import com.lc.ibps.sysdata.entity.User;
|
|
import com.lc.ibps.sysdata.entity.User;
|
|
@@ -35,9 +37,15 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.util.DigestUtils;
|
|
import org.springframework.util.DigestUtils;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
|
|
|
|
|
|
+import java.security.InvalidAlgorithmParameterException;
|
|
|
|
|
+import java.security.InvalidKeyException;
|
|
|
|
|
+import java.security.NoSuchAlgorithmException;
|
|
|
import java.time.Duration;
|
|
import java.time.Duration;
|
|
|
import java.time.Instant;
|
|
import java.time.Instant;
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
|
|
|
+import javax.crypto.BadPaddingException;
|
|
|
|
|
+import javax.crypto.IllegalBlockSizeException;
|
|
|
|
|
+import javax.crypto.NoSuchPaddingException;
|
|
|
import java.nio.ByteBuffer;
|
|
import java.nio.ByteBuffer;
|
|
|
import java.nio.ByteOrder;
|
|
import java.nio.ByteOrder;
|
|
|
import java.text.SimpleDateFormat;
|
|
import java.text.SimpleDateFormat;
|
|
@@ -66,6 +74,26 @@ public class UpdateDataTableImpl extends GenericProvider implements UpdateDataTa
|
|
|
@Resource
|
|
@Resource
|
|
|
private ICommonDao<?> commonDao;
|
|
private ICommonDao<?> commonDao;
|
|
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public APIResult queryData(QueryDTO queryDTO) throws Exception {
|
|
|
|
|
+ APIResult result = new APIResult();
|
|
|
|
|
+ if (BeanUtils.isEmpty(queryDTO) || BeanUtils.isEmpty(queryDTO.getKey())) {
|
|
|
|
|
+ throw new Exception("参数key不能为空!");
|
|
|
|
|
+ }
|
|
|
|
|
+ String sql = "select sql_ from t_sqlconfig where key_='%s'";
|
|
|
|
|
+ sql = String.format(sql, queryDTO.getKey());
|
|
|
|
|
+ Map<String, Object> map = commonDao.queryOne(sql);
|
|
|
|
|
+ List<Map<String, Object>> list = new ArrayList<>();
|
|
|
|
|
+ if (BeanUtils.isNotEmpty(map) && BeanUtils.isNotEmpty(map.get("sql_"))) {
|
|
|
|
|
+ Object[] params = queryDTO.getParams().toArray();
|
|
|
|
|
+ list = (List<Map<String, Object>>) commonDao.query( map.get("sql_").toString(), params);
|
|
|
|
|
+ }
|
|
|
|
|
+ Map<String, Object> datas = new HashMap<>();
|
|
|
|
|
+ datas.put("list", list);
|
|
|
|
|
+ result.setVariables(datas);
|
|
|
|
|
+ return result;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public APIResult<Void> upEmployee(String str){
|
|
public APIResult<Void> upEmployee(String str){
|