From 0075b650ec6d39d6130d562194dfa18f98e29c1b Mon Sep 17 00:00:00 2001 From: cuibaocheng Date: Thu, 29 Jul 2021 12:11:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8A=A8=E6=80=81=E8=A1=A8?= =?UTF-8?q?=E5=8D=95=E8=87=AA=E5=8A=A8=E6=8E=92=E7=89=88=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E7=9A=84=E4=BF=9D=E5=AD=98=E5=9B=9E=E6=98=BE?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tenlion/bigdata/util/EncryptUtils.java | 1 - .../util/WeiXinBarCodeUtils.java | 3 - .../ConfigColumnAppController.java | 5 +- .../configcolumn/IConfigColumnService.java | 2 +- .../impl/ConfigColumnServiceImpl.java | 12 +- .../IConfigColumnSetService.java | 14 +++ .../impl/ConfigColumnSetServiceImpl.java | 18 +++ .../impl/ConfigTableFieldServiceImpl.java | 1 + .../config-table-field-mapper.xml | 4 +- .../templates/configtable/list-field.html | 108 ++++++++++-------- 10 files changed, 107 insertions(+), 61 deletions(-) diff --git a/module-bigdata/src/main/java/cn/com/tenlion/bigdata/util/EncryptUtils.java b/module-bigdata/src/main/java/cn/com/tenlion/bigdata/util/EncryptUtils.java index 8af53ea..22f8742 100644 --- a/module-bigdata/src/main/java/cn/com/tenlion/bigdata/util/EncryptUtils.java +++ b/module-bigdata/src/main/java/cn/com/tenlion/bigdata/util/EncryptUtils.java @@ -3,7 +3,6 @@ package cn.com.tenlion.bigdata.util; import org.apache.commons.codec.binary.Base64; import org.apache.commons.lang3.StringUtils; import sun.misc.BASE64Decoder; - import javax.crypto.Cipher; import javax.crypto.KeyGenerator; import javax.crypto.spec.SecretKeySpec; diff --git a/module-building-pictures/src/main/java/cn/com/tenlion/buildingpictures/util/WeiXinBarCodeUtils.java b/module-building-pictures/src/main/java/cn/com/tenlion/buildingpictures/util/WeiXinBarCodeUtils.java index 67fa67d..5b39268 100644 --- a/module-building-pictures/src/main/java/cn/com/tenlion/buildingpictures/util/WeiXinBarCodeUtils.java +++ b/module-building-pictures/src/main/java/cn/com/tenlion/buildingpictures/util/WeiXinBarCodeUtils.java @@ -1,10 +1,7 @@ package cn.com.tenlion.buildingpictures.util; import com.alibaba.fastjson.JSONObject; -import com.sun.org.apache.bcel.internal.generic.NEW; -import com.sun.org.apache.xml.internal.utils.StringToStringTable; import org.apache.commons.lang3.StringUtils; - import java.awt.*; import java.io.*; import java.net.HttpURLConnection; diff --git a/module-config-column/src/main/java/cn/com/tenlion/configcolumn/controller/app/api/configcolumn/ConfigColumnAppController.java b/module-config-column/src/main/java/cn/com/tenlion/configcolumn/controller/app/api/configcolumn/ConfigColumnAppController.java index 715dd20..4c1bd9b 100644 --- a/module-config-column/src/main/java/cn/com/tenlion/configcolumn/controller/app/api/configcolumn/ConfigColumnAppController.java +++ b/module-config-column/src/main/java/cn/com/tenlion/configcolumn/controller/app/api/configcolumn/ConfigColumnAppController.java @@ -42,7 +42,8 @@ public class ConfigColumnAppController extends DefaultBaseController { @GetMapping("listhome") public List listHome(@RequestHeader("token") String token) { Map params = requestParams(); - return configColumnService.listDefault(token, params); + params.put("configColumnDefault", "1"); + return configColumnService.listApp(token, params); } @ApiOperation(value = "新增", notes = "新增接口") @@ -101,7 +102,7 @@ public class ConfigColumnAppController extends DefaultBaseController { @GetMapping("list") public List list(@RequestHeader("token") String token) { Map params = requestParams(); - return configColumnService.list(params); + return configColumnService.listApp(token, params); } @ApiOperation(value = "分页列表", notes = "分页列表接口") diff --git a/module-config-column/src/main/java/cn/com/tenlion/configcolumn/service/configcolumn/IConfigColumnService.java b/module-config-column/src/main/java/cn/com/tenlion/configcolumn/service/configcolumn/IConfigColumnService.java index 1026eab..c4a6b9d 100644 --- a/module-config-column/src/main/java/cn/com/tenlion/configcolumn/service/configcolumn/IConfigColumnService.java +++ b/module-config-column/src/main/java/cn/com/tenlion/configcolumn/service/configcolumn/IConfigColumnService.java @@ -257,6 +257,6 @@ public interface IConfigColumnService { * @param params * @return */ - List listDefault(String token, Map params); + List listApp(String token, Map params); } \ No newline at end of file diff --git a/module-config-column/src/main/java/cn/com/tenlion/configcolumn/service/configcolumn/impl/ConfigColumnServiceImpl.java b/module-config-column/src/main/java/cn/com/tenlion/configcolumn/service/configcolumn/impl/ConfigColumnServiceImpl.java index 6c2e237..7353275 100644 --- a/module-config-column/src/main/java/cn/com/tenlion/configcolumn/service/configcolumn/impl/ConfigColumnServiceImpl.java +++ b/module-config-column/src/main/java/cn/com/tenlion/configcolumn/service/configcolumn/impl/ConfigColumnServiceImpl.java @@ -288,17 +288,21 @@ public class ConfigColumnServiceImpl extends DefaultBaseService implements IConf } @Override - public List listDefault(String token, Map params) { - params.put("configColumnDefault", "1"); + public List listApp(String token, Map params) { params.put("configColumnStatus", "1"); List list = configColumnDao.list(params); /** * 封装自定义的显示隐藏 . 自定义的栏目名称 */ List resultList = new ArrayList(); + // 首页是加载名片创建者userId下配置的所有栏目, 个人中心加载的是token下配置的所有栏目 + String userIdOrToken = token; + if(params.get("creator") != null) { + userIdOrToken = params.get("creator").toString(); + } for(ConfigColumnDTO dto : list) { - ConfigColumnSetDTO setDisplayDTO = iConfigColumnSetService.getSetDisplay(token, dto.getConfigColumnId()); - ConfigColumnSetDTO setNameDTO = iConfigColumnSetService.getSetName(token, dto.getConfigColumnId()); + ConfigColumnSetDTO setDisplayDTO = iConfigColumnSetService.getSetDisplayByUserId(userIdOrToken, dto.getConfigColumnId()); + ConfigColumnSetDTO setNameDTO = iConfigColumnSetService.getSetDisplayByUserId(userIdOrToken, dto.getConfigColumnId()); ConfigTableDTO tableDTO = iConfigTableOperationService.getTable(dto.getConfigTableId()); if (tableDTO != null) { dto.setConfigTableMode(tableDTO.getConfigTableMode()); diff --git a/module-config-column/src/main/java/cn/com/tenlion/configcolumn/service/configcolumnset/IConfigColumnSetService.java b/module-config-column/src/main/java/cn/com/tenlion/configcolumn/service/configcolumnset/IConfigColumnSetService.java index 29153fa..f3d4576 100644 --- a/module-config-column/src/main/java/cn/com/tenlion/configcolumn/service/configcolumnset/IConfigColumnSetService.java +++ b/module-config-column/src/main/java/cn/com/tenlion/configcolumn/service/configcolumnset/IConfigColumnSetService.java @@ -190,4 +190,18 @@ public interface IConfigColumnSetService { */ ConfigColumnSetDTO getSetDisplay(String token, String configColumnId); + /** + * 查询栏目的自定义名称 + * @param userId + * @param configColumnId + */ + ConfigColumnSetDTO getSetNameByUserId(String userId, String configColumnId); + + /** + * 查询栏目的自定义隐藏 + * @param userId + * @param configColumnId + */ + ConfigColumnSetDTO getSetDisplayByUserId(String userId, String configColumnId); + } \ No newline at end of file diff --git a/module-config-column/src/main/java/cn/com/tenlion/configcolumn/service/configcolumnset/impl/ConfigColumnSetServiceImpl.java b/module-config-column/src/main/java/cn/com/tenlion/configcolumn/service/configcolumnset/impl/ConfigColumnSetServiceImpl.java index 988f5cc..4dad926 100644 --- a/module-config-column/src/main/java/cn/com/tenlion/configcolumn/service/configcolumnset/impl/ConfigColumnSetServiceImpl.java +++ b/module-config-column/src/main/java/cn/com/tenlion/configcolumn/service/configcolumnset/impl/ConfigColumnSetServiceImpl.java @@ -271,4 +271,22 @@ public class ConfigColumnSetServiceImpl extends DefaultBaseService implements IC return count == null ? 0 : count; } + @Override + public ConfigColumnSetDTO getSetNameByUserId(String userId, String configColumnId) { + Map params = getHashMap(3); + params.put("userId", userId); + params.put("configColumnId", configColumnId); + params.put("configColumnSetMode", "2"); + return get(params); + } + + @Override + public ConfigColumnSetDTO getSetDisplayByUserId(String userId, String configColumnId) { + Map params = getHashMap(3); + params.put("userId", userId); + params.put("configColumnId", configColumnId); + params.put("configColumnSetMode", "1"); + return get(params); + } + } \ No newline at end of file diff --git a/module-config-table/src/main/java/cn/com/tenlion/configtable/service/configtablefield/impl/ConfigTableFieldServiceImpl.java b/module-config-table/src/main/java/cn/com/tenlion/configtable/service/configtablefield/impl/ConfigTableFieldServiceImpl.java index 9ef42b4..703d4cd 100644 --- a/module-config-table/src/main/java/cn/com/tenlion/configtable/service/configtablefield/impl/ConfigTableFieldServiceImpl.java +++ b/module-config-table/src/main/java/cn/com/tenlion/configtable/service/configtablefield/impl/ConfigTableFieldServiceImpl.java @@ -313,6 +313,7 @@ public class ConfigTableFieldServiceImpl extends DefaultBaseService implements I params.put("configTableId", configTableId); params.put("configTableFieldId", jsonArray.getJSONObject(i).getString("configTableFieldId")); params.put("configTableFieldRowCol", jsonArray.getJSONObject(i).getIntValue("configTableFieldRowCol")); + params.put("configTableFieldRow", jsonArray.getJSONObject(i).getIntValue("configTableFieldRow")); params.put("configTableFieldOrder", jsonArray.getJSONObject(i).getIntValue("configTableFieldOrder")); configTableFieldDao.updateOrder(params); } diff --git a/module-config-table/src/main/resources/mybatis/mapper/configtablefield/config-table-field-mapper.xml b/module-config-table/src/main/resources/mybatis/mapper/configtablefield/config-table-field-mapper.xml index b871b8d..9397439 100644 --- a/module-config-table/src/main/resources/mybatis/mapper/configtablefield/config-table-field-mapper.xml +++ b/module-config-table/src/main/resources/mybatis/mapper/configtablefield/config-table-field-mapper.xml @@ -69,9 +69,7 @@ UPDATE m_config_table_field SET - - config_table_field_row = #{configTableFieldRow}, - + config_table_field_row = #{configTableFieldRow}, config_table_field_row_col = #{configTableFieldRowCol}, config_table_field_order = #{configTableFieldOrder} WHERE diff --git a/module-config-table/src/main/resources/templates/configtable/list-field.html b/module-config-table/src/main/resources/templates/configtable/list-field.html index 5ea7677..b61fcd5 100644 --- a/module-config-table/src/main/resources/templates/configtable/list-field.html +++ b/module-config-table/src/main/resources/templates/configtable/list-field.html @@ -58,7 +58,7 @@
-
+
-
@@ -136,20 +130,6 @@
-
+ +