From 3c453517fecdc1d6164fc1008248746db3069ece Mon Sep 17 00:00:00 2001 From: xhxu Date: Wed, 1 Dec 2021 14:33:18 +0800 Subject: [PATCH 1/2] customize --- .../src/main/java/com/iformall/tenant/TenantInfoImpl.java | 6 ++++-- .../resources/db/migration/V2021112900002__addcaidan.sql | 8 +++++++- .../src/main/java/com/iformall/tenant/TenantInfoImpl.java | 6 ++++-- .../src/main/java/com/iformall/tenant/TenantInfoImpl.java | 6 ++++-- .../src/main/java/com/iformall/tenant/TenantInfoImpl.java | 6 ++++-- 5 files changed, 23 insertions(+), 9 deletions(-) diff --git a/mallinkAdmin/src/main/java/com/iformall/tenant/TenantInfoImpl.java b/mallinkAdmin/src/main/java/com/iformall/tenant/TenantInfoImpl.java index fbfab326b..314386d15 100644 --- a/mallinkAdmin/src/main/java/com/iformall/tenant/TenantInfoImpl.java +++ b/mallinkAdmin/src/main/java/com/iformall/tenant/TenantInfoImpl.java @@ -55,7 +55,8 @@ public class TenantInfoImpl implements TenantInfo { "wx_question_oneself_log", "wx_question_oneself_topic", "wx_question_oneself_user", - "sys_config" + "sys_config", + "wx_customize_module" }; private static String[] filterSubTables = new String[] { @@ -94,7 +95,8 @@ public class TenantInfoImpl implements TenantInfo { "wx_question_oneself_log", "wx_question_oneself_topic", "wx_question_oneself_user", - "sys_config" + "sys_config", + "wx_customize_module" }; @Override diff --git a/mallinkAdmin/src/main/resources/db/migration/V2021112900002__addcaidan.sql b/mallinkAdmin/src/main/resources/db/migration/V2021112900002__addcaidan.sql index 24bf79818..bea99c47e 100644 --- a/mallinkAdmin/src/main/resources/db/migration/V2021112900002__addcaidan.sql +++ b/mallinkAdmin/src/main/resources/db/migration/V2021112900002__addcaidan.sql @@ -1,5 +1,11 @@ INSERT INTO `mallink`.`mall_permission`(`id`, `name`, `parent_id`, `available`, `permission`, `resource_type`, `module_color`, `module_color_num`, `url`, `icon`, `version_type`, `sort`) VALUES (906, '菜单管理', 904, 'Y', NULL, 1, NULL, NULL, 'menuManage', NULL, 0, 906); +INSERT INTO `mallink`.`mall_permission`(`id`, `name`, `parent_id`, `available`, `permission`, `resource_type`, `module_color`, `module_color_num`, `url`, `icon`, `version_type`, `sort`) VALUES (907, '系统参数', 904, 'Y', NULL, 1, NULL, NULL, 'systemParameter', NULL, 0, 907); -UPDATE `mallink`.`mall_sale_type` SET `menus` = '[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 50, 101, 102, 103, 104, 105, 106, 107, 108, 109, 201, 202, 203, 204, 205, 206, 209, 211, 212, 221, 222, 251, 299, 300, 301, 302, 303, 304, 305, 306, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 420, 421, 422, 501, 502, 503, 504, 505, 506, 507, 508, 509, 511, 512, 513, 514, 521, 522, 523, 531, 532, 533, 591, 592, 595, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 621, 622, 623, 624, 625, 626, 627, 641, 642, 643, 644, 645, 646, 651, 661, 662, 663, 664, 665, 666, 671, 672, 673, 674, 675, 681, 682, 683, 684, 685, 686, 691, 692, 693, 694, 695, 701, 702, 703, 704, 711, 712, 713, 714, 901, 902, 903, 904, 905, 906, 931, 932, 951, 952, 961, 962, 963, 965, 966, 967, 968, 1001, 1002, 1003, 1004, 60701, 60702]' WHERE `id` = 1; +UPDATE `mallink`.`mall_sale_type` SET `menus` = '[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 50, 101, 102, 103, 104, 105, 106, 107, 108, 109, 201, 202, 203, 204, 205, 206, 209, 211, 212, 221, 222, 251, 299, 300, 301, 302, 303, 304, 305, 306, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 420, 421, 422, 501, 502, 503, 504, 505, 506, 507, 508, 509, 511, 512, 513, 514, 521, 522, 523, 531, 532, 533, 591, 592, 595, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 621, 622, 623, 624, 625, 626, 627, 641, 642, 643, 644, 645, 646, 651, 661, 662, 663, 664, 665, 666, 671, 672, 673, 674, 675, 681, 682, 683, 684, 685, 686, 691, 692, 693, 694, 695, 701, 702, 703, 704, 711, 712, 713, 714, 901, 902, 903, 904, 905, 906, 907, 931, 932, 951, 952, 961, 962, 963, 965, 966, 967, 968, 1001, 1002, 1003, 1004, 60701, 60702]' WHERE `id` = 1; +UPDATE `mallink`.`mall_sale_type` SET `menus` = '[1, 2, 4, 5, 6, 7, 8, 9, 10, 50, 101, 102, 103, 104, 105, 106, 107, 201, 202, 203, 204, 205, 209, 211, 212, 221, 222, 251, 409, 410, 411, 416, 418, 420, 421, 501, 502, 503, 504, 505, 506, 507, 508, 509, 511, 512, 513, 514, 521, 522, 523, 531, 532, 533, 591, 592, 595, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 621, 622, 623, 624, 625, 626, 627, 641, 642, 643, 644, 645, 646, 651, 661, 662, 663, 664, 671, 672, 673, 674, 675, 681, 682, 683, 684, 685, 686, 691, 692, 693, 694, 695, 701, 702, 703, 704, 711, 712, 713, 901, 902, 903, 904, 905, 906, 907, 931, 932, 951, 961, 60701, 60702]' WHERE `id` = 2; +UPDATE `mallink`.`mall_sale_type` SET `menus` = '[2, 4, 5, 6, 7, 10, 50, 201, 202, 205, 211, 212, 221, 222, 251, 409, 410, 411, 416, 418, 501, 502, 503, 504, 505, 506, 507, 508, 511, 512, 513, 514, 521, 522, 523, 531, 532, 533, 591, 592, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 621, 622, 623, 624, 625, 626, 641, 642, 643, 644, 645, 646, 651, 661, 662, 663, 664, 671, 672, 673, 674, 675, 681, 682, 683, 684, 685, 686, 691, 692, 693, 694, 695, 701, 702, 703, 704, 711, 712, 713, 901, 902, 903, 904, 905, 906, 907, 931, 932, 60701, 60702]' WHERE `id` = 3; +UPDATE `mallink`.`mall_sale_type` SET `menus` = '[2, 4, 5, 6, 7, 10, 50, 201, 202, 205, 211, 212, 221, 222, 251, 409, 410, 411, 416, 418, 501, 502, 503, 504, 505, 506, 507, 508, 511, 512, 513, 514, 521, 522, 523, 531, 532, 591, 601, 602, 604, 605, 606, 607, 608, 610, 611, 612, 613, 614, 622, 623, 624, 625, 626, 641, 642, 643, 644, 661, 662, 663, 664, 671, 672, 674, 675, 681, 682, 684, 685, 686, 691, 692, 693, 694, 695, 711, 901, 902, 904, 905, 906, 907, 931, 932, 60701, 60702]' WHERE `id` = 4; +UPDATE `mallink`.`mall_sale_type` SET `menus` = '[1, 2, 4, 5, 6, 50, 105, 110, 201, 202, 211, 212, 221, 222, 409, 411, 416, 500, 502, 504, 505, 506, 511, 512, 591, 595, 602, 606, 610, 641, 680, 711, 901, 902, 904, 907]' WHERE `id` = 11; +UPDATE `mallink`.`mall_sale_type` SET `menus` = '[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 50, 101, 102, 103, 104, 105, 106, 107, 108, 109, 201, 202, 203, 204, 205, 206, 209, 211, 212, 221, 222, 251, 299, 300, 307, 308, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 420, 421, 422, 501, 502, 503, 504, 505, 506, 507, 508, 509, 511, 512, 513, 514, 521, 522, 523, 531, 532, 533, 591, 592, 595, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 621, 622, 623, 624, 625, 626, 627, 641, 642, 643, 644, 645, 646, 651, 661, 662, 663, 664, 665, 666, 671, 672, 673, 674, 675, 681, 682, 683, 684, 685, 686, 691, 692, 693, 694, 695, 701, 702, 703, 704, 711, 712, 713, 714, 901, 902, 903, 904, 905, 906, 907, 931, 932, 951, 952, 961, 962, 963, 965, 966, 967, 968, 1001, 1002, 1003, 1004, 60701, 60702]' WHERE `id` = 1035001036; diff --git a/mallinkBApi/src/main/java/com/iformall/tenant/TenantInfoImpl.java b/mallinkBApi/src/main/java/com/iformall/tenant/TenantInfoImpl.java index b6db7ab07..a73fd0f0b 100644 --- a/mallinkBApi/src/main/java/com/iformall/tenant/TenantInfoImpl.java +++ b/mallinkBApi/src/main/java/com/iformall/tenant/TenantInfoImpl.java @@ -44,7 +44,8 @@ public class TenantInfoImpl implements TenantInfo { "wx_weapp_ext_set", "wx_msg_validationcode_model", "wx_component_verify_ticket", - "sys_config" + "sys_config", + "wx_customize_module" }; private static String[] filterSubTables = new String[] { @@ -74,7 +75,8 @@ public class TenantInfoImpl implements TenantInfo { "wx_weapp_release_status", "mem_coupon_from_dsp", "wx_component_verify_ticket", - "sys_config" + "sys_config", + "wx_customize_module" }; @Override diff --git a/mallinkCApi/src/main/java/com/iformall/tenant/TenantInfoImpl.java b/mallinkCApi/src/main/java/com/iformall/tenant/TenantInfoImpl.java index 2019873be..43218edde 100644 --- a/mallinkCApi/src/main/java/com/iformall/tenant/TenantInfoImpl.java +++ b/mallinkCApi/src/main/java/com/iformall/tenant/TenantInfoImpl.java @@ -49,7 +49,8 @@ public class TenantInfoImpl implements TenantInfo { "wx_question_oneself_log", "wx_question_oneself_topic", "wx_question_oneself_user", - "sys_config" + "sys_config", + "wx_customize_module" }; private static String[] filterSubTables = new String[] { @@ -85,7 +86,8 @@ public class TenantInfoImpl implements TenantInfo { "wx_question_oneself_log", "wx_question_oneself_topic", "wx_question_oneself_user", - "sys_config" + "sys_config", + "wx_customize_module" }; diff --git a/mallinkNeuPosAdmin/src/main/java/com/iformall/tenant/TenantInfoImpl.java b/mallinkNeuPosAdmin/src/main/java/com/iformall/tenant/TenantInfoImpl.java index 2019873be..43218edde 100644 --- a/mallinkNeuPosAdmin/src/main/java/com/iformall/tenant/TenantInfoImpl.java +++ b/mallinkNeuPosAdmin/src/main/java/com/iformall/tenant/TenantInfoImpl.java @@ -49,7 +49,8 @@ public class TenantInfoImpl implements TenantInfo { "wx_question_oneself_log", "wx_question_oneself_topic", "wx_question_oneself_user", - "sys_config" + "sys_config", + "wx_customize_module" }; private static String[] filterSubTables = new String[] { @@ -85,7 +86,8 @@ public class TenantInfoImpl implements TenantInfo { "wx_question_oneself_log", "wx_question_oneself_topic", "wx_question_oneself_user", - "sys_config" + "sys_config", + "wx_customize_module" }; From 3c16b7ce56bfb8ea2fdd66589604404eaff4c153 Mon Sep 17 00:00:00 2001 From: xhxu Date: Wed, 1 Dec 2021 16:13:12 +0800 Subject: [PATCH 2/2] customize --- .../basic/WxCustomizeModuleController.java | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/basic/WxCustomizeModuleController.java b/mallinkAdmin/src/main/java/com/iformall/controller/basic/WxCustomizeModuleController.java index 28822f93a..6d8107a6a 100644 --- a/mallinkAdmin/src/main/java/com/iformall/controller/basic/WxCustomizeModuleController.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/basic/WxCustomizeModuleController.java @@ -50,6 +50,28 @@ public class WxCustomizeModuleController extends BaseController { } } + @ApiOperation("查询CustomizeModule列表") + @GetMapping(value = "/findDefault") + @SystemControllerLog(description = "查询CustomizeModule列表") + public ResultData findDefault(@ModelAttribute WxCustomizeModule wxCustomizeModule) { + logger.debug("[" + getIpAddr() + "] WxCustomizeModuleController::getList"); + try { + if(wxCustomizeModule == null){ + wxCustomizeModule = new WxCustomizeModule(); + } + wxCustomizeModule.updateTenantInfo(ifParentUpdateAloneTenantInfo()); + if(wxCustomizeModule.getThemeType() == null){ + wxCustomizeModule.setThemeType(EnumThemeType.C.getCode()); + } + List aDefault = wxCustomizeModuleService.findDefault(wxCustomizeModule); + PageInfo page = new PageInfo(aDefault); + return new ResultData(page); + }catch (Exception e){ + logger.error(e.getMessage(),e); + return new ResultData(ErrorCode.SYS_SERVER_ERROR); + } + } + @ApiOperation("恢复主题默认") @PostMapping("/updateDefault") @ApiImplicitParam(name = "themeId", value = "themeId", dataType = "Long", paramType = "query", required = true)