This commit is contained in:
thinkgem
2023-06-12 15:54:28 +08:00
parent 6a0edc92d6
commit f16c3abc2a
9 changed files with 30 additions and 21 deletions

View File

@@ -45,11 +45,6 @@
<artifactId>commons-io</artifactId>
<version>${commons-io.version}</version>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>${commons-beanutils.version}</version>
</dependency>
<!-- Java serialization -->
<dependency>
@@ -89,6 +84,7 @@
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>${snakeyaml.version}</version>
</dependency>
<!-- Apache HTTP -->
@@ -194,11 +190,6 @@
<artifactId>poi-ooxml</artifactId>
<version>${poi.version}</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml-schemas</artifactId>
<version>${poi.version}</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-scratchpad</artifactId>
@@ -262,7 +253,7 @@
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
</dependencies>
<developers>

View File

@@ -138,7 +138,7 @@ public class PropertiesUtils {
}
}
}
properties.put("configFiles", StringUtils.join(configFiles, ","));
properties.put("configFiles", StringUtils.joinComma(configFiles));
}
/**

View File

@@ -28,8 +28,8 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
public static final String UNDERLINE = "_";
/**
* 分隔字符串(默认逗号分隔)
* @param str
* 分隔字符串(逗号分隔)
* @param str 字符串
* @return
*/
public static String[] splitComma(final String str) {
@@ -37,8 +37,17 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
}
/**
* 连接字符串(默认逗号分隔)
* @param iterable
* 连接字符串(逗号分隔)
* @param array 字符串数组
* @return
*/
public static String joinComma(final Object[] array) {
return join(array, COMMA);
}
/**
* 连接字符串(逗号分隔)
* @param iterable 字符串集合
* @return
*/
public static String joinComma(final Iterable<?> iterable) {

View File

@@ -279,7 +279,7 @@ public class VideoUtils {
*/
private boolean process(List<String> command) {
try {
log.debug(StringUtils.join(command, " "));
log.debug(StringUtils.join(command, StringUtils.SPACE));
// Process process = new ProcessBuilder(command).redirectErrorStream(true).start();
Process process = Runtime.getRuntime().exec(command.toArray(new String[command.size()]));
new PrintErrorReader(process.getErrorStream()).start();

View File

@@ -259,7 +259,8 @@ public class Log extends DataEntity<Log> {
if (StringUtils.endsWithIgnoreCase(param.getKey(), "password")){
params.append("*");
}else if (param.getValue() != null) {
params.append(EncodeUtils.xssFilter(StringUtils.abbr(StringUtils.join(param.getValue(), ","), 1000)));
params.append(EncodeUtils.xssFilter(StringUtils.abbr(
StringUtils.joinComma(param.getValue()), 1000)));
}
String[] values = param.getValue();
if (values != null) {

View File

@@ -152,7 +152,7 @@ public class LogUtils {
Method m = hm.getMethod();
// 获取权限字符串
RequiresPermissions rp = m.getAnnotation(RequiresPermissions.class);
permission = (rp != null ? StringUtils.join(rp.value(), ",") : "");
permission = (rp != null ? StringUtils.joinComma(rp.value()) : "");
// 尝试获取BaseEntity的设置的主键值
for (Class<?> type : m.getParameterTypes()){

View File

@@ -119,8 +119,8 @@ public class CompanyController extends BaseController {
officeCodes.add(e.getOfficeCode());
officeNames.add(e.getOfficeCode());
});
model.addAttribute("officeCodes", StringUtils.join(officeCodes, ","));
model.addAttribute("officeNames", StringUtils.join(officeNames, ","));
model.addAttribute("officeCodes", StringUtils.joinComma(officeCodes));
model.addAttribute("officeNames", StringUtils.joinComma(officeNames));
}
model.addAttribute("company", company);
model.addAttribute("ctrlPermi", Global.getConfig("user.adminCtrlPermi", "2"));

View File

@@ -14,6 +14,7 @@ import com.jeesite.common.web.BaseController;
import com.jeesite.common.web.CookieUtils;
import com.jeesite.common.web.http.ServletUtils;
import com.jeesite.modules.sys.entity.Menu;
import com.jeesite.modules.sys.entity.Role;
import com.jeesite.modules.sys.entity.User;
import com.jeesite.modules.sys.utils.CorpUtils;
import com.jeesite.modules.sys.utils.PwdUtils;
@@ -197,6 +198,12 @@ public class LoginController extends BaseController{
model.addAttribute("msgEnabled", Global.getPropertyToBoolean("msg.enabled", "false"));
model.addAttribute("sysCode", session.getAttribute("sysCode"));
model.addAttribute("title", Global.getProperty("productName"));
for (Role role : user.getRoleList()){
if (StringUtils.isNotBlank(role.getDesktopUrl())) {
model.addAttribute("desktopUrl", role.getDesktopUrl()); // 设置当前用户信息
break;
}
}
// 是否是登录操作
boolean isLogin = Global.TRUE.equals(session.getAttribute(BaseAuthorizingRealm.IS_LOGIN_OPER));

View File

@@ -29,6 +29,7 @@
<logger name="org.flowable.identitylink.service.impl.persistence" level="DEBUG" />
<logger name="org.flowable.variable.service.impl.persistence" level="DEBUG" />
<logger name="org.flowable.engine.impl.persistence" level="DEBUG" />
<logger name="com.bstek.ureport" level="DEBUG" />
<logger name="com.jeesite" level="DEBUG" />
<logger name="com.jeesite.common.i18n" level="INFO" />