|
|
@@ -426,24 +426,34 @@ public class FunctionUtils { |
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
public static Map<String, Object> dealArea(Map<String, Object> map) {
|
|
|
|
Integer adminId = ShiroUtils.getAdminId();
|
|
|
|
SysAdmin admin = adminMapper.selectById(adminId);
|
|
|
|
String[] areaIds;
|
|
|
|
if (!StringUtils.isEmpty(map.get("driverArea"))) {
|
|
|
|
areaIds = map.get("driverArea").toString().split(",");
|
|
|
|
if (null != areaIds && areaIds.length > 0) {
|
|
|
|
map.put("driverArea", areaIds);
|
|
|
|
} else {
|
|
|
|
map.remove("driverArea");
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
areaIds = com.taauav.common.util.StringUtils.isEmpty(admin.getCityIds()) ? null : admin.getCityIds().split(",");
|
|
|
|
}
|
|
|
|
if (null != areaIds && areaIds.length > 0) {
|
|
|
|
map.put("driverArea", areaIds);
|
|
|
|
} else {
|
|
|
|
map.remove("driverArea");
|
|
|
|
Integer adminId = ShiroUtils.getAdminId();
|
|
|
|
if (!adminId.equals(1)) {
|
|
|
|
SysAdmin admin = adminMapper.selectById(adminId);
|
|
|
|
areaIds = com.taauav.common.util.StringUtils.isEmpty(admin.getCityIds()) ? null : admin.getCityIds().split(",");
|
|
|
|
if (null != areaIds && areaIds.length > 0) {
|
|
|
|
map.put("driverArea", areaIds);
|
|
|
|
} else {
|
|
|
|
map.remove("driverArea");
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
map.remove("driverArea");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return map;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* object 转 List
|
|
|
|
*
|
|
|
|
* @param object
|
|
|
|
* @param clazz
|
|
|
|
* @param <T>
|
|
|
@@ -462,6 +472,7 @@ public class FunctionUtils { |
|
|
|
|
|
|
|
/**
|
|
|
|
* Map排序
|
|
|
|
*
|
|
|
|
* @param map
|
|
|
|
* @param flag true:正序(从小到大) false:反序(从大到小)
|
|
|
|
* @return
|
|
|
@@ -482,6 +493,7 @@ public class FunctionUtils { |
|
|
|
|
|
|
|
/**
|
|
|
|
* 字符串转日期
|
|
|
|
*
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
public static Date strToDate(String str, String formatStr) {
|
|
|
@@ -500,6 +512,7 @@ public class FunctionUtils { |
|
|
|
|
|
|
|
/**
|
|
|
|
* 日期转指定格式字符串
|
|
|
|
*
|
|
|
|
* @param date
|
|
|
|
* @param formatStr
|
|
|
|
* @return
|