lip 2 anni fa
parent
commit
2863ca08e9
2 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. +1
    -1
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/user/UserHandler.java
  2. +2
    -2
      smtweb-framework/core/src/main/java/cc/smtweb/framework/core/util/StringUtil.java

+ 1
- 1
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/user/UserHandler.java Vedi File

@@ -156,7 +156,7 @@ public class UserHandler {
protected void afterQuery(List<SwMap> listData) {
if (pageDataSet._isCurDataSet(DS_UserParty)) {
listData.forEach(sw -> {
sw.put("sup_roles", UserRoleCache.getInstance().getRoleByParty(sw.readLong("sup_id")));
sw.put("sup_roles", StringUtil.join(UserRoleCache.getInstance().getRoleByParty(sw.readLong("sup_id")),","));
sw.put("sup_roles_text", RoleCache.getInstance().getNamesByIds(UserRoleCache.getInstance().getRoleByParty(sw.readLong("sup_id"))));
});
return;


+ 2
- 2
smtweb-framework/core/src/main/java/cc/smtweb/framework/core/util/StringUtil.java Vedi File

@@ -240,14 +240,14 @@ public class StringUtil {
* @param delim the delimiter character(s) to use. (null value will join with no delimiter)
* @return a String of all values in the list seperated by the delimiter
*/
public static String join(Collection<String> list, String delim) {
public static String join(Collection<? extends Object> list, String delim) {
if (list == null || list.size() < 1)
return null;
StringBuffer buf = new StringBuffer();
Iterator i = list.iterator();

while (i.hasNext()) {
buf.append((String) i.next());
buf.append(i.next().toString());
if (i.hasNext())
buf.append(delim);
}


Caricamento…
Annulla
Salva