From 5701eb6693c654d53f1bba460eb3a417d495b344 Mon Sep 17 00:00:00 2001
From: zhang <zc857179121@qq.com>
Date: 星期三, 11 六月 2025 17:31:53 +0800
Subject: [PATCH] bug修复;下发任务给rcs携带货架码
---
src/main/java/com/zy/system/controller/RoleController.java | 31 ++++++++++++++++---------------
1 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/src/main/java/com/zy/system/controller/RoleController.java b/src/main/java/com/zy/system/controller/RoleController.java
index f29fa65..3a32c47 100644
--- a/src/main/java/com/zy/system/controller/RoleController.java
+++ b/src/main/java/com/zy/system/controller/RoleController.java
@@ -61,23 +61,24 @@
return R.ok(roleService.selectPage(new Page<>(curr, limit), wrapper));
}
- private void convert(Map<String, Object> map, EntityWrapper wrapper){
+ private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){
for (Map.Entry<String, Object> entry : map.entrySet()){
- if (entry.getKey().endsWith(">")) {
- wrapper.ge(Cools.deleteChar(entry.getKey()), DateUtils.convert(String.valueOf(entry.getValue())));
- } else if (entry.getKey().endsWith("<")) {
- wrapper.le(Cools.deleteChar(entry.getKey()), DateUtils.convert(String.valueOf(entry.getValue())));
+ String val = String.valueOf(entry.getValue());
+ if (val.contains(RANGE_TIME_LINK)){
+ String[] dates = val.split(RANGE_TIME_LINK);
+ wrapper.ge(entry.getKey(), DateUtils.convert(dates[0]));
+ wrapper.le(entry.getKey(), DateUtils.convert(dates[1]));
} else {
- wrapper.like(entry.getKey(), String.valueOf(entry.getValue()));
+ wrapper.like(entry.getKey(), val);
}
}
}
@RequestMapping(value = "/role/edit/auth")
- @ManagerAuth
+ @ManagerAuth(memo = "瑙掕壊缂栬緫")
public R edit(Role role) {
if (Cools.isEmpty(role)){
- return R.error();
+ return R.error("鍙傛暟缂哄け");
}
if (null == role.getId()){
roleService.insert(role);
@@ -88,34 +89,34 @@
}
@RequestMapping(value = "/role/add/auth")
- @ManagerAuth
+ @ManagerAuth(memo = "瑙掕壊娣诲姞")
public R add(Role role) {
roleService.insert(role);
return R.ok();
}
@RequestMapping(value = "/role/update/auth")
- @ManagerAuth
+ @ManagerAuth(memo = "瑙掕壊淇敼")
public R update(Role role){
if (Cools.isEmpty(role) || null==role.getId()){
- return R.error();
+ return R.error("鍙傛暟缂哄け");
}
roleService.updateById(role);
return R.ok();
}
@RequestMapping(value = "/role/delete/auth")
- @ManagerAuth
+ @ManagerAuth(memo = "瑙掕壊鍒犻櫎")
public R delete(Integer[] ids){
if (Cools.isEmpty(ids)){
- return R.error();
+ return R.error("鍙傛暟缂哄け");
}
roleService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
@RequestMapping(value = "/role/export/auth")
- @ManagerAuth
+ @ManagerAuth(memo = "瑙掕壊瀵煎嚭")
public R export(@RequestBody JSONObject param){
List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class);
EntityWrapper<Role> wrapper = new EntityWrapper<>();
@@ -149,7 +150,7 @@
// }
}
- Page<Role> page = roleService.selectPage(new Page<>(0, 10), wrapper);
+ Page<Role> page = roleService.selectPage(new Page<>(0, 1000), wrapper);
List<Map<String, Object>> result = new ArrayList<>();
for (Role role : page.getRecords()){
Map<String, Object> map = new HashMap<>();
--
Gitblit v1.9.1