diff --git a/hchyun-ui/README.md b/hchyun-ui/README.md
index 48c1203..e512a0e 100644
--- a/hchyun-ui/README.md
+++ b/hchyun-ui/README.md
@@ -8,7 +8,7 @@ npm install --registry=https://registry.npm.taobao.org
npm run dev
```
-浏览器访问 http://localhost:80
+浏览器访问 http://localhost:8080
## 发布
diff --git a/hchyun-ui/src/api/test/stu.js b/hchyun-ui/src/api/test/stu.js
index 5f528f7..904e893 100644
--- a/hchyun-ui/src/api/test/stu.js
+++ b/hchyun-ui/src/api/test/stu.js
@@ -8,7 +8,12 @@ export function listStu(query) {
params: query
})
}
-
+export function mapTest(){
+ return request({
+ url: '/test/map',
+ method: 'get',
+ })
+}
// 查询学生详细
export function getStu(id) {
return request({
@@ -50,4 +55,4 @@ export function exportStu(query) {
method: 'get',
params: query
})
-}
\ No newline at end of file
+}
diff --git a/hchyun-ui/src/api/tool/query.js b/hchyun-ui/src/api/tool/query.js
new file mode 100644
index 0000000..fa0ce2c
--- /dev/null
+++ b/hchyun-ui/src/api/tool/query.js
@@ -0,0 +1,78 @@
+import request from '@/utils/request'
+
+// 查询万能查询列表
+export function listQuery(query) {
+ return request({
+ url: '/tool/query/list',
+ method: 'get',
+ params: query
+ })
+}
+
+// 查询万能查询详细
+export function getQuery(id) {
+ return request({
+ url: '/tool/query/' + id,
+ method: 'get'
+ })
+}
+
+// 新增万能查询
+export function addQuery(data) {
+ return request({
+ url: '/tool/query',
+ method: 'post',
+ data: data
+ })
+}
+
+// 修改万能查询
+export function updateQuery(data) {
+ return request({
+ url: '/tool/query',
+ method: 'put',
+ data: data
+ })
+}
+
+// 删除万能查询
+export function delQuery(id) {
+ return request({
+ url: '/tool/query/' + id,
+ method: 'delete'
+ })
+}
+
+// 导出万能查询
+export function exportQuery(query) {
+ return request({
+ url: '/tool/query/export',
+ method: 'get',
+ params: query
+ })
+}
+
+// 获取条件
+export function getQueryInfo(id) {
+ return request({
+ url: '/query/'+id,
+ method: 'get',
+ })
+}
+// 修改条件
+export function editQueryInfo(data) {
+ return request({
+ url: '/query',
+ method: 'put',
+ data: data
+ })
+}
+
+// 预览
+export function previewQueryData(data) {
+ return request({
+ url: '/query/preview',
+ method: 'put',
+ data: data
+ })
+}
diff --git a/hchyun-ui/src/router/index.js b/hchyun-ui/src/router/index.js
index 1791440..f7729ae 100644
--- a/hchyun-ui/src/router/index.js
+++ b/hchyun-ui/src/router/index.js
@@ -118,6 +118,19 @@ export const constantRoutes = [
}
]
},
+ {
+ path: '/query',
+ component: Layout,
+ hidden: true,
+ children: [
+ {
+ path: 'edit/:queryId(\\d+)',
+ component: (resolve) => require(['@/views/tool/query/uniQuery'], resolve),
+ name: 'UniQuery',
+ meta: { title: '万能查询配置' }
+ }
+ ]
+ },
{
path: '/job',
component: Layout,
diff --git a/hchyun-ui/src/views/test/stu/index.vue b/hchyun-ui/src/views/test/stu/index.vue
index 75f8408..f8439ab 100644
--- a/hchyun-ui/src/views/test/stu/index.vue
+++ b/hchyun-ui/src/views/test/stu/index.vue
@@ -55,7 +55,8 @@
size="mini"
@click="handleAdd"
v-hasPermi="['test:stu:add']"
- >新增
+ >新增
+
修改
+ >修改
+
删除
+ >删除
+
导出
+ >导出
+
-
-
-
-
-
+
+
+
+
+
{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}
@@ -111,18 +115,20 @@
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['test:stu:edit']"
- >修改
+ >修改
+
删除
+ >删除
+
-
+
-
+
-
+
-
+
成绩信息
@@ -152,22 +158,23 @@
删除
-
-
+
+
-
+
-
+
-
+
@@ -177,16 +184,25 @@
取 消
+
+
+
+
+
+
diff --git a/hchyun-ui/src/views/tool/query/uniQuery.vue b/hchyun-ui/src/views/tool/query/uniQuery.vue
new file mode 100644
index 0000000..852a51e
--- /dev/null
+++ b/hchyun-ui/src/views/tool/query/uniQuery.vue
@@ -0,0 +1,267 @@
+
+
+
+
+
diff --git a/hchyun/hchyun-common/src/main/java/com/hchyun/common/core/redis/RedisCache.java b/hchyun/hchyun-common/src/main/java/com/hchyun/common/core/redis/RedisCache.java
index c84a75e..2ed786b 100644
--- a/hchyun/hchyun-common/src/main/java/com/hchyun/common/core/redis/RedisCache.java
+++ b/hchyun/hchyun-common/src/main/java/com/hchyun/common/core/redis/RedisCache.java
@@ -5,6 +5,7 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.TimeUnit;
+
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.HashOperations;
import org.springframework.data.redis.core.RedisTemplate;
@@ -16,59 +17,54 @@ import org.springframework.stereotype.Component;
*
* @author hchyun
**/
-@SuppressWarnings(value = { "unchecked", "rawtypes" })
+@SuppressWarnings(value = {"unchecked", "rawtypes"})
@Component
-public class RedisCache
-{
+public class RedisCache {
@Autowired
public RedisTemplate redisTemplate;
/**
* 缓存基本的对象,Integer、String、实体类等
*
- * @param key 缓存的键值
+ * @param key 缓存的键值
* @param value 缓存的值
*/
- public void setCacheObject(final String key, final T value)
- {
+ public void setCacheObject(final String key, final T value) {
redisTemplate.opsForValue().set(key, value);
}
/**
* 缓存基本的对象,Integer、String、实体类等
*
- * @param key 缓存的键值
- * @param value 缓存的值
- * @param timeout 时间
+ * @param key 缓存的键值
+ * @param value 缓存的值
+ * @param timeout 时间
* @param timeUnit 时间颗粒度
*/
- public void setCacheObject(final String key, final T value, final Integer timeout, final TimeUnit timeUnit)
- {
+ public void setCacheObject(final String key, final T value, final Integer timeout, final TimeUnit timeUnit) {
redisTemplate.opsForValue().set(key, value, timeout, timeUnit);
}
/**
* 设置有效时间
*
- * @param key Redis键
+ * @param key Redis键
* @param timeout 超时时间
* @return true=设置成功;false=设置失败
*/
- public boolean expire(final String key, final long timeout)
- {
+ public boolean expire(final String key, final long timeout) {
return expire(key, timeout, TimeUnit.SECONDS);
}
/**
* 设置有效时间
*
- * @param key Redis键
+ * @param key Redis键
* @param timeout 超时时间
- * @param unit 时间单位
+ * @param unit 时间单位
* @return true=设置成功;false=设置失败
*/
- public boolean expire(final String key, final long timeout, final TimeUnit unit)
- {
+ public boolean expire(final String key, final long timeout, final TimeUnit unit) {
return redisTemplate.expire(key, timeout, unit);
}
@@ -78,8 +74,7 @@ public class RedisCache
* @param key 缓存键值
* @return 缓存键值对应的数据
*/
- public T getCacheObject(final String key)
- {
+ public T getCacheObject(final String key) {
ValueOperations operation = redisTemplate.opsForValue();
return operation.get(key);
}
@@ -89,8 +84,7 @@ public class RedisCache
*
* @param key
*/
- public boolean deleteObject(final String key)
- {
+ public boolean deleteObject(final String key) {
return redisTemplate.delete(key);
}
@@ -100,20 +94,18 @@ public class RedisCache
* @param collection 多个对象
* @return
*/
- public long deleteObject(final Collection collection)
- {
+ public long deleteObject(final Collection collection) {
return redisTemplate.delete(collection);
}
/**
* 缓存List数据
*
- * @param key 缓存的键值
+ * @param key 缓存的键值
* @param dataList 待缓存的List数据
* @return 缓存的对象
*/
- public long setCacheList(final String key, final List dataList)
- {
+ public long setCacheList(final String key, final List dataList) {
Long count = redisTemplate.opsForList().rightPushAll(key, dataList);
return count == null ? 0 : count;
}
@@ -124,20 +116,18 @@ public class RedisCache
* @param key 缓存的键值
* @return 缓存键值对应的数据
*/
- public List getCacheList(final String key)
- {
+ public List getCacheList(final String key) {
return redisTemplate.opsForList().range(key, 0, -1);
}
/**
* 缓存Set
*
- * @param key 缓存键值
+ * @param key 缓存键值
* @param dataSet 缓存的数据
* @return 缓存数据的对象
*/
- public long setCacheSet(final String key, final Set dataSet)
- {
+ public long setCacheSet(final String key, final Set dataSet) {
Long count = redisTemplate.opsForSet().add(key, dataSet);
return count == null ? 0 : count;
}
@@ -148,8 +138,7 @@ public class RedisCache
* @param key
* @return
*/
- public Set getCacheSet(final String key)
- {
+ public Set getCacheSet(final String key) {
return redisTemplate.opsForSet().members(key);
}
@@ -159,8 +148,7 @@ public class RedisCache
* @param key
* @param dataMap
*/
- public void setCacheMap(final String key, final Map dataMap)
- {
+ public void setCacheMap(final String key, final Map dataMap) {
if (dataMap != null) {
redisTemplate.opsForHash().putAll(key, dataMap);
}
@@ -172,32 +160,29 @@ public class RedisCache
* @param key
* @return
*/
- public Map getCacheMap(final String key)
- {
+ public Map getCacheMap(final String key) {
return redisTemplate.opsForHash().entries(key);
}
/**
* 往Hash中存入数据
*
- * @param key Redis键
- * @param hKey Hash键
+ * @param key Redis键
+ * @param hKey Hash键
* @param value 值
*/
- public void setCacheMapValue(final String key, final String hKey, final T value)
- {
+ public void setCacheMapValue(final String key, final String hKey, final T value) {
redisTemplate.opsForHash().put(key, hKey, value);
}
/**
* 获取Hash中的数据
*
- * @param key Redis键
+ * @param key Redis键
* @param hKey Hash键
* @return Hash中的对象
*/
- public T getCacheMapValue(final String key, final String hKey)
- {
+ public T getCacheMapValue(final String key, final String hKey) {
HashOperations opsForHash = redisTemplate.opsForHash();
return opsForHash.get(key, hKey);
}
@@ -205,12 +190,11 @@ public class RedisCache
/**
* 获取多个Hash中的数据
*
- * @param key Redis键
+ * @param key Redis键
* @param hKeys Hash键集合
* @return Hash对象集合
*/
- public List getMultiCacheMapValue(final String key, final Collection