diff --git a/mallinkAdmin/src/main/resources/db/migration/V2023031600001_cardspend.sql b/mallinkAdmin/src/main/resources/db/migration/V2023031600001_cardspend.sql index da23a77cf..69bd89402 100644 --- a/mallinkAdmin/src/main/resources/db/migration/V2023031600001_cardspend.sql +++ b/mallinkAdmin/src/main/resources/db/migration/V2023031600001_cardspend.sql @@ -334,5 +334,9 @@ ADD COLUMN `used_password` varchar(50) COMMENT '使用密码' AFTER `is_recharge +ALTER TABLE `mallink`.`wx_card_spend` +ADD COLUMN `card_type` smallint(2) DEFAULT 0 AFTER `card_id`; +update wx_card_spend set card_type=1 where owner_id = 111111111111111111; + diff --git a/mallinkAdmin/src/main/resources/db/migration/V2023032200001_coupon_press.sql b/mallinkAdmin/src/main/resources/db/migration/V2023032200001_coupon_press.sql new file mode 100644 index 000000000..fe9a1eb7f --- /dev/null +++ b/mallinkAdmin/src/main/resources/db/migration/V2023032200001_coupon_press.sql @@ -0,0 +1,102 @@ + +update wx_coupon_0 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_1 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_2 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_3 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_4 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_5 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_6 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_7 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_8 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_9 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_10 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_11 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_12 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_13 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_14 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_15 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_16 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_17 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_18 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_19 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_20 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_21 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_22 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_23 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_24 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_25 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_26 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_27 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_28 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_29 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_30 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_31 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_32 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_33 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_34 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_35 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_36 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_37 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_38 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_39 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_40 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_41 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_42 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_43 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_44 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_45 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_46 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_47 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_48 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_49 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_50 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_51 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_52 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_53 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_54 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_55 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_56 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_57 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_58 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_59 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_60 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_61 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_62 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_63 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_64 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_65 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_66 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_67 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_68 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_69 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_70 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_71 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_72 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_73 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_74 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_75 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_76 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_77 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_78 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_79 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_80 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_81 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_82 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_83 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_84 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_85 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_86 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_87 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_88 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_89 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_90 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_91 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_92 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_93 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_94 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_95 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_96 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_97 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_98 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; +update wx_coupon_99 set press_limit_hours = press_limit_hours * 60 where press_limit_hours is not null; + diff --git a/mallinkAdmin/src/main/resources/db/migration/V2023032300001_add_permission.sql b/mallinkAdmin/src/main/resources/db/migration/V2023032300001_add_permission.sql new file mode 100644 index 000000000..ac18c73a6 --- /dev/null +++ b/mallinkAdmin/src/main/resources/db/migration/V2023032300001_add_permission.sql @@ -0,0 +1,18 @@ +INSERT INTO `mallink`.`mall_permission`(`id`, `name`, `parent_id`, `available`, `permission`, `resource_type`, `module_color`, `module_color_num`, `url`, `icon`, `version_type`, `sort`) VALUES (210, '业态管理', 2, 'Y', NULL, 0, NULL, NULL, NULL, 'icon-tuoke', 0, 210); +INSERT INTO `mallink`.`mall_permission`(`id`, `name`, `parent_id`, `available`, `permission`, `resource_type`, `module_color`, `module_color_num`, `url`, `icon`, `version_type`, `sort`) VALUES (261, '业态列表', 210, 'Y', NULL, 1, NULL, NULL, 'businessTreeList', NULL, 0, 261); + + + +--205,251 + + +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, 210, 211, 212, 221, 222, 224, 225, 251, 261, 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, 431, 432, 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, 616, 621, 622, 623, 624, 625, 626, 627, 641, 642, 643, 644, 645, 646, 651, 652, 661, 662, 663, 664, 665, 666, 671, 672, 673, 674, 675, 681, 682, 683, 684, 685, 687, 691, 692, 693, 694, 695, 701, 702, 703, 704, 711, 713, 714, 715, 901, 902, 903, 904, 905, 906, 907, 908, 910, 931, 932, 951, 952, 961, 962, 963, 965, 966, 967, 968, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 6610, 6611, 41701, 41702, 60701, 60702, 61201]' 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, 210, 211, 212, 221, 222, 224, 225, 251, 261, 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, 616, 621, 622, 623, 624, 625, 626, 627, 641, 642, 643, 644, 645, 646, 651, 652, 661, 662, 663, 664, 665, 666, 671, 672, 673, 674, 675, 681, 682, 683, 684, 685, 691, 692, 693, 694, 695, 701, 702, 703, 704, 711, 713, 714, 715, 901, 902, 903, 904, 905, 906, 907, 908, 910, 931, 932, 951, 961, 6610, 6611, 60701, 60702, 61201]' WHERE `id` = 2; +UPDATE `mallink`.`mall_sale_type` SET `menus` = '[2, 4, 5, 6, 7, 10, 50, 201, 202, 205, 210, 211, 212, 221, 222, 224, 225, 251, 261, 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, 621, 622, 623, 624, 625, 626, 641, 642, 643, 644, 645, 646, 651, 652, 661, 662, 663, 664, 671, 672, 673, 674, 675, 681, 682, 683, 684, 685, 691, 692, 693, 694, 695, 701, 702, 703, 704, 711, 713, 715, 901, 902, 903, 904, 905, 906, 907, 908, 910, 931, 932, 60701, 60702, 61201]' WHERE `id` = 3; +UPDATE `mallink`.`mall_sale_type` SET `menus` = '[2, 4, 5, 6, 7, 10, 50, 201, 202, 205, 210, 211, 212, 221, 222, 224, 251, 261, 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, 622, 623, 624, 625, 626, 641, 642, 643, 644, 661, 662, 663, 664, 671, 672, 674, 675, 681, 682, 684, 685, 691, 692, 693, 694, 695, 711, 901, 902, 904, 905, 906, 907, 908, 910, 931, 932, 60701, 60702, 61201]' WHERE `id` = 4; +UPDATE `mallink`.`mall_sale_type` SET `menus` = '[1, 2, 4, 5, 6, 50, 105, 110, 201, 205, 202, 210, 211, 212, 221, 222, 223, 224, 251, 261, 409, 410, 411, 416, 500, 502, 504, 505, 506, 507, 511, 512, 521, 522, 523, 591, 592, 595, 601, 602, 605, 606, 610, 612, 615, 622, 647, 676, 680, 711, 901, 902, 904, 907, 61202, 61501, 61502]' 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, 110, 201, 202, 203, 204, 205, 206, 209, 210, 211, 212, 221, 222, 223, 224, 225, 251, 261, 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, 431, 432, 500, 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, 615, 616, 621, 622, 623, 624, 625, 626, 627, 641, 642, 643, 644, 645, 646, 647, 651, 652, 661, 662, 663, 664, 665, 666, 671, 672, 673, 674, 675, 676, 680, 681, 682, 683, 684, 685, 687, 691, 692, 693, 694, 695, 701, 702, 703, 704, 711, 713, 714, 715, 901, 902, 903, 904, 905, 906, 907, 908, 910, 931, 932, 951, 952, 961, 962, 963, 965, 966, 967, 968, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 6610, 6611, 41701, 41702, 60701, 60702, 61201, 61202, 61501, 61502]' WHERE `id` = 12; +UPDATE `mallink`.`mall_sale_type` SET `menus` = '[1, 2, 4, 5, 6, 50, 105, 110, 201, 205, 202, 210, 211, 212, 221, 222, 223, 224, 251, 261, 409, 410, 411, 416, 500, 502, 504, 505, 506, 507, 511, 512, 521, 522, 523, 591, 592, 595, 601, 602, 605, 606, 610, 612, 615, 622, 647, 650, 676, 680, 711, 901, 902, 904, 907, 41001, 61202, 61501, 61502, 71101]' WHERE `id` = 102; +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, 210, 211, 212, 221, 222, 224, 225, 251, 261, 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, 431, 432, 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, 616, 621, 622, 623, 624, 625, 626, 627, 641, 642, 643, 644, 645, 646, 651, 652, 661, 662, 663, 664, 665, 666, 671, 672, 673, 674, 675, 681, 682, 683, 684, 685, 687, 691, 692, 693, 694, 695, 701, 702, 703, 704, 711, 713, 714, 715, 901, 902, 903, 904, 905, 906, 907, 910, 931, 932, 951, 952, 961, 962, 963, 965, 966, 967, 968, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 6610, 6611, 41701, 41702, 60701, 60702, 61201]' WHERE `id` = 1028; +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, 210, 211, 212, 221, 222, 224, 225, 251, 261, 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, 431, 432, 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, 616, 621, 622, 623, 624, 625, 626, 627, 641, 642, 643, 644, 645, 646, 651, 652, 661, 662, 663, 664, 665, 666, 671, 672, 673, 674, 675, 681, 682, 683, 684, 685, 687, 691, 692, 693, 694, 695, 701, 702, 703, 704, 711, 713, 714, 715, 901, 902, 903, 904, 905, 906, 907, 908, 910, 931, 932, 951, 952, 961, 962, 963, 965, 966, 967, 968, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 6610, 6611, 41701, 41702, 60701, 60702, 61201]' WHERE `id` = 1035001036; +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, 110, 201, 202, 203, 204, 205, 206, 209, 210, 211, 212, 221, 222, 225, 223, 224, 251, 261, 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, 431, 432, 500, 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, 615, 616, 621, 622, 623, 624, 625, 626, 627, 641, 642, 643, 644, 645, 646, 647, 651, 652, 661, 662, 663, 664, 665, 666, 671, 672, 673, 674, 675, 676, 680, 681, 682, 683, 684, 685, 687, 691, 692, 693, 694, 695, 701, 702, 703, 704, 711, 713, 714, 715, 901, 902, 903, 904, 905, 906, 907, 908, 910, 931, 932, 951, 952, 961, 962, 963, 965, 966, 967, 968, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 6610, 6611, 41701, 41702, 60701, 60702, 61201, 61202, 61501, 61502]' WHERE `id` = 103500103610; diff --git a/mallinkCApi/src/main/java/com/iformall/controller/WxCouponController.java b/mallinkCApi/src/main/java/com/iformall/controller/WxCouponController.java index 8263955c7..4ca2133a4 100644 --- a/mallinkCApi/src/main/java/com/iformall/controller/WxCouponController.java +++ b/mallinkCApi/src/main/java/com/iformall/controller/WxCouponController.java @@ -120,6 +120,8 @@ public class WxCouponController extends BaseController { @ApiImplicitParam(name = "couponChannelId", value = "couponChannelId", dataType = "String", paramType = "query", required = true), @ApiImplicitParam(name = "mallTenantId", value = "mallTenantId", dataType = "String", paramType = "query", required = false)}) public ResultData couponDetail(String couponChannelId) { + logger.info("couponDetail----tenant"+JSON.toJSONString(getTenantInfo())); + if ((StringUtils.isBlank(couponChannelId) || couponChannelId.equalsIgnoreCase(Constant.UNDEFINED)) ) { return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "couponChannelId为空"); @@ -182,6 +184,7 @@ public class WxCouponController extends BaseController { @ApiImplicitParams({ @ApiImplicitParam(name = "couponChannelId", value = "couponChannelId", dataType = "String", paramType = "query", required = true)}) public ResultData couponPriceAndStock(String couponChannelId) { + logger.info("couponPriceAndStock----tenant"+JSON.toJSONString(getTenantInfo())); if ((StringUtils.isBlank(couponChannelId) || couponChannelId.equalsIgnoreCase(Constant.UNDEFINED))) { return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "couponChannelId为空"); } diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxCardSpend.java b/mallinkService/src/main/java/com/iformall/domain/po/WxCardSpend.java index 0a7970120..1b242c60a 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxCardSpend.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxCardSpend.java @@ -19,7 +19,7 @@ public class WxCardSpend extends TenantEntity { protected Long id; - @Excel(name = "订单类型", width = 20, orderNum = "8", replace = {"付款_0", "退款_1"}) + @Excel(name = "订单类型", width = 20, orderNum = "8", replace = {"付款_0", "退款_1", "充值_1"}) @io.swagger.annotations.ApiModelProperty(value="EnumPayType",name="payType") private Integer payType; @@ -27,6 +27,8 @@ public class WxCardSpend extends TenantEntity { private Long cardId; @TableField(exist = false) private List cardIdList; + @io.swagger.annotations.ApiModelProperty(value="EnumCardInfoType",name="cardType") + private Integer cardType; @io.swagger.annotations.ApiModelProperty(value="持有人ID",name="ownerId") private Long ownerId; @TableField(exist = false) diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxCoupon.java b/mallinkService/src/main/java/com/iformall/domain/po/WxCoupon.java index 4c649fa91..e75cb230f 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxCoupon.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxCoupon.java @@ -120,9 +120,9 @@ public class WxCoupon extends TenantEntity { private Integer sendType; @io.swagger.annotations.ApiModelProperty(value="EnumCouponValidType 有效时间类型1.时间范围(valid_start_date,valid_end_date). 2领取后几日有效(valid_days)",name="validType") private Integer validType; - @io.swagger.annotations.ApiModelProperty(value="卷有效日期-开始",name="validStartDate") + @io.swagger.annotations.ApiModelProperty(value="券有效日期-开始",name="validStartDate") private Date validStartDate; - @io.swagger.annotations.ApiModelProperty(value="卷有效日期-结束",name="validEndDate") + @io.swagger.annotations.ApiModelProperty(value="券有效日期-结束",name="validEndDate") private Date validEndDate; @io.swagger.annotations.ApiModelProperty(value="自领取之日几日有效,(停车券当天有效)",name="validDays") private Integer validDays; @@ -176,7 +176,7 @@ public class WxCoupon extends TenantEntity { @io.swagger.annotations.ApiModelProperty(value="砍价/团购限制人数",name="pressLimitNum") private Integer pressLimitNum; - @io.swagger.annotations.ApiModelProperty(value="砍价限制时间",name="pressLimitHours") + @io.swagger.annotations.ApiModelProperty(value="砍价限制时间(单位分钟)",name="pressLimitHours") private Integer pressLimitHours; @io.swagger.annotations.ApiModelProperty(value="砍价支付扣库存EnumYesOrNo",name="pressPayReduceStock") diff --git a/mallinkService/src/main/java/com/iformall/enums/EnumCardInfoType.java b/mallinkService/src/main/java/com/iformall/enums/EnumCardInfoType.java index 6777b3e28..1e41790a7 100644 --- a/mallinkService/src/main/java/com/iformall/enums/EnumCardInfoType.java +++ b/mallinkService/src/main/java/com/iformall/enums/EnumCardInfoType.java @@ -33,4 +33,5 @@ public enum EnumCardInfoType { public String getMessage() { return message; } + } diff --git a/mallinkService/src/main/java/com/iformall/service/WxBusinessService.java b/mallinkService/src/main/java/com/iformall/service/WxBusinessService.java index 0fd23cff2..ac7672a94 100644 --- a/mallinkService/src/main/java/com/iformall/service/WxBusinessService.java +++ b/mallinkService/src/main/java/com/iformall/service/WxBusinessService.java @@ -12,6 +12,12 @@ import java.util.Map; public interface WxBusinessService { + /** + * + * @param tenantInfo + */ + void businessInit(TenantEntity tenantInfo); + /** * 根据实体查询分页列表 * diff --git a/mallinkService/src/main/java/com/iformall/service/WxMsgValidationcodeModelService.java b/mallinkService/src/main/java/com/iformall/service/WxMsgValidationcodeModelService.java index 80b6c6c5c..6a9a1122d 100644 --- a/mallinkService/src/main/java/com/iformall/service/WxMsgValidationcodeModelService.java +++ b/mallinkService/src/main/java/com/iformall/service/WxMsgValidationcodeModelService.java @@ -9,13 +9,6 @@ import java.util.List; public interface WxMsgValidationcodeModelService { - /** - * wx_msg_validationcode_model 初始化 - * - * @param tenantId - * @return - */ - void wxMsgValidationcodeModelInit(String tenantId, String signature,String emailBgImg); /** * 根据实体查询分页列表 diff --git a/mallinkService/src/main/java/com/iformall/service/WxPayAccountBillService.java b/mallinkService/src/main/java/com/iformall/service/WxPayAccountBillService.java index 8e0616ec6..76a237c92 100644 --- a/mallinkService/src/main/java/com/iformall/service/WxPayAccountBillService.java +++ b/mallinkService/src/main/java/com/iformall/service/WxPayAccountBillService.java @@ -7,6 +7,12 @@ import com.iformall.domain.po.WxPayAccountBill; public interface WxPayAccountBillService { + /** + * + * @param tenantInfo + */ + void payAccountBillInit(TenantEntity tenantInfo); + /** * 根据实体查询分页列表 * diff --git a/mallinkService/src/main/java/com/iformall/service/impl/TtMerchantPoiServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/TtMerchantPoiServiceImpl.java index 1ab0ffb67..df98a99a5 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/TtMerchantPoiServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/TtMerchantPoiServiceImpl.java @@ -322,9 +322,9 @@ public class TtMerchantPoiServiceImpl implements TtMerchantPoiService { supplierSync.setPoiId(merchantPoi.getPoiId()); - //todo 如果抖音没有这个类型怎么办 + //todo 必填 如果抖音没有这个类型怎么办 默认餐饮??? //Integer ttType = EnumBusiness.getEnum(businessId).getTtType(); - Integer ttType = Constant.default_business; + Integer ttType = Constant.dy_business; if(ttType == null){ logger.error("未找到对应的店铺类型"); throw new MallinkException(ErrorCode.MSG_METHOD_REQUEST_ERROR.getCode(),"未找到对应的店铺类型"); diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxBusinessServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxBusinessServiceImpl.java index 0ab31e19f..ede08a837 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxBusinessServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxBusinessServiceImpl.java @@ -14,6 +14,7 @@ import com.iformall.mapper.WxBusinessMapper; import com.iformall.mapper.WxPropertyContractMapper; import com.iformall.mapper.WxRentContractMapper; import com.iformall.service.WxBusinessService; +import com.iformall.utils.Constant; import com.iformall.utils.DateUtils; import org.apache.commons.collections.CollectionUtils; import org.slf4j.Logger; @@ -42,6 +43,20 @@ public class WxBusinessServiceImpl implements WxBusinessService { @Autowired private WxPropertyContractMapper wxPropertyContractMapper; + @Override + public void businessInit(TenantEntity tenantInfo) { + Date now = new Date(); + WxBusiness record = new WxBusiness(); + record.setId(Constant.default_business); + record.setFinalTenantId(tenantInfo.getFinalTenantId()); + record.setTitle("其他"); + record.setType(1); + record.setCreateDate(now); + record.setUpdateDate(now); + record.setIsSystem(EnumYesOrNo.YES.getCode()); + wxBusinessMapper.insert(record); + } + @Override public PageInfo listAsPage(WxBusiness record, Integer pageIndex, Integer pageSize) { return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxBusinessMapper.findList(record)); diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxCardInfoServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxCardInfoServiceImpl.java index c37fac2e4..3461c21cf 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCardInfoServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCardInfoServiceImpl.java @@ -16,10 +16,7 @@ import com.iformall.domain.vo.WxCouponPasswordVo; import com.iformall.enums.*; import com.iformall.exception.MallinkException; import com.iformall.mapper.*; -import com.iformall.service.ExcelService; -import com.iformall.service.WxCUserBasicInfoService; -import com.iformall.service.WxCardInfoService; -import com.iformall.service.WxCouponService; +import com.iformall.service.*; import com.iformall.utils.Constant; import com.iformall.utils.DateUtils; import com.iformall.utils.RedisLock; @@ -83,8 +80,10 @@ public class WxCardInfoServiceImpl implements WxCardInfoService { @Autowired WxCardSpendMapper wxCardSpendMapper; - - + + @Autowired + WxCardSpendService wxCardSpendService; + @Override public PageInfo listAsPage(WxCardVo record, Integer pageIndex, Integer pageSize) { @@ -464,8 +463,10 @@ public class WxCardInfoServiceImpl implements WxCardInfoService { if(wxCoupon.getSubsidyNum() != null && wxCoupon.getSubsidyNum() > 0){ return new ResultData(ErrorCode.CARD_IS_NOT_RECHARGE.getCode(),"有补贴不支持充值"); } - Date currentDate = new Date(); + if(currentDate.after(wxCoupon.getValidEndDate())){ + return new ResultData(ErrorCode.CARD_IS_NOT_RECHARGE.getCode(),"卡已过期,不支持充值"); + } WxCardSpend record = new WxCardSpend(); record.updateTenantInfo(cardInfo); @@ -507,6 +508,14 @@ public class WxCardInfoServiceImpl implements WxCardInfoService { logger.error("card spend insert error"); throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "card spend 插入出错!"); } + + if(record.getCardBeforeAmount().equals(0)){ + if (wxCardSpendService.cardFinishedUsing(currentDate, cardInfo)) { + throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "couponOrder status 更新出错!"); + } + } + wxCardSpendService.sendCardBalanceChange(wxCoupon,record); + return new ResultData(); } diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxCardSpendServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxCardSpendServiceImpl.java index 4f27ca4a4..0cf91a240 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCardSpendServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCardSpendServiceImpl.java @@ -185,6 +185,7 @@ public class WxCardSpendServiceImpl implements WxCardSpendService { // 5 insert card_spend record.setId(idWorker.nextId()); record.updateTenantInfo(cardInfo); + record.setCardType(cardInfo.getType()); record.setPayType(EnumPayType.PAY_PAYMENT.getCode()); if(record.getPayFrom() == null){ record.setPayFrom(EnumCardSpendFrom.C.getCode()); @@ -1083,6 +1084,8 @@ public class WxCardSpendServiceImpl implements WxCardSpendService { // 5 insert card_spend record.setId(idWorker.nextId()); record.updateTenantInfo(cardInfo); + record.setCardType(cardInfo.getType()); + record.setPayType(EnumPayType.PAY_PAYMENT.getCode()); record.setPayment(payment); record.setRealPayment(real_payment); record.setCardBeforeAmount(cardInfo.getRemainingAmount()); diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxCashOutServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxCashOutServiceImpl.java index e9f895841..86c7926b0 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCashOutServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCashOutServiceImpl.java @@ -323,7 +323,7 @@ public class WxCashOutServiceImpl implements WxCashOutService { @Override public void addCashOut(WxMerchant merchant, Integer amount) throws MallinkException{ WxMall mall = wxMallMapper.getByTenantId(merchant.getTenantId()); - if (null != mall && mall.getCashOutSupport().intValue() == EnumCashOut.YES.getCode().intValue()) { + if (null != mall && EnumCashOut.YES.getCode().equals(mall.getCashOutSupport())) { if (null != merchant) { //此处需要加锁,防止并发设置 long time = System.currentTimeMillis() + RedisLock.TIMEOUT; diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxMsgValidationcodeModelServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxMsgValidationcodeModelServiceImpl.java index fa2f7ceeb..aeb377148 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxMsgValidationcodeModelServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxMsgValidationcodeModelServiceImpl.java @@ -38,64 +38,6 @@ public class WxMsgValidationcodeModelServiceImpl implements WxMsgValidationcodeM @Autowired WxMsgConfigMapper wxMsgConfigMapper; - @Override - @Transactional(rollbackFor = {Exception.class}) - public void wxMsgValidationcodeModelInit(String tenantId, String signature, String emailBgImg) { -// DateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); -// String nowTimestr = format.format(new Date()); -// final IdWorker idWorker = IdWorker.get(); -// String initSql = "insert into `mallink`.`wx_msg_validationcode_model` ( `id`, `tenant_id`, `type`, `name`, `signature`, `content`, `createtime`, `status`, `minutes`, `model_id`, `msg_type`, `model_code`) values " + -// " ( '" + idWorker.nextId() + "', '" + tenantId + "', '2', '代办通知', '富茂', '{userName}提交了一个{bustype}待您审批,电脑登陆管理后台查看您的待办。', '" + nowTimestr + "', '1', '0', null, '1', 'SMS_194900032')," + -// " ( '" + idWorker.nextId() + "', '" + tenantId + "', '3', '审批通知', '富茂', '{userName}同意编号{contract}的{bustype}审批,已呈送至{toUserName},登录{page}查看审批进度。', '" + nowTimestr + "', '1', '0', null, '1', null)," + -// " ( '" + idWorker.nextId() + "', '" + tenantId + "', '4', '通过审批通知', '富茂', '编号{contract}的合同已通过审批,请登录{page} 跟进后续工作。', '" + nowTimestr + "', '1', '0', null, '1', null)," + -// " ( '" + idWorker.nextId() + "', '" + tenantId + "', '5', '驳回通知', '富茂', '编号{contract}的合同审批被驳回,请登录{page} 查看审批明细。', '" + nowTimestr + "', '1', '0', null, '1', null)," + -// " ( '" + idWorker.nextId() + "', '" + tenantId + "', '6', '验证码', '富茂', '{s6}(动态验证码),请在5分钟内填写', '" + nowTimestr + "', '1', '5', null, '1', 'SMS_194910023')," + -// " ( '" + idWorker.nextId() + "', '" + tenantId + "', '7', '账单待缴模板', '富茂', '您当期的待缴账单为{price}元,截止日期为{date} ,请登录{app}小程序查看账单并交费。', '" + nowTimestr + "', '1', '0', null, '1', 'SMS_194900024')," + -// " ( '" + idWorker.nextId() + "', '" + tenantId + "', '8', '账单欠缴模板', '富茂', '截止今日您的账单共计欠缴{price}元,请登录{app}小程序查看账单并交费。', '" + nowTimestr + "', '1', '0', null, '1', 'SMS_194910026')," + -// " ( '" + idWorker.nextId() + "', '" + tenantId + "', '9', '场景投放', '富茂', '亲爱的vip,悄悄地送您一张{title},请到{app}微信小程序中使用吧!', '" + nowTimestr + "', '1', '0', null, '1', 'SMS_194920015')," + -// " ( '" + idWorker.nextId() + "', '" + tenantId + "', '11', '商户分账账户新增通知商户', '富茂', '您于{time}提交了{merchant}商户的收款账户[{account}]绑定,后续销售分成及营销补贴将存入该账户', '" + nowTimestr + "', '1', '0', null, '1', null)," + -// " ( '" + idWorker.nextId() + "', '" + tenantId + "', '13', '商户分账账户变更通知商户', '富茂', '您于{time}将{merchant}商户的收款账户变更为[{account}],后续销售分成及营销补贴将存入该账户', '" + nowTimestr + "', '1', '0', null, '1', null)," + -// " ( '" + idWorker.nextId() + "', '" + tenantId + "', '14', '商户分账账户不使用回执', '富茂', '商管已同意[{account}]作为{merchant}商户的收款账户。后续的销售分成及营销补贴将存入此账户', '" + nowTimestr + "', '1', '0', null, '1', null)," + -// " ( '" + idWorker.nextId() + "', '" + tenantId + "', '15', '商户分账账户使用回执', '富茂', '商管拒绝将[{account}]作为{merchant}商户的收款账户。如有疑问请联系商管', '" + nowTimestr + "', '1', '0', null, '1', null)," + -// " ( '" + idWorker.nextId() + "', '" + tenantId + "', '16', '商户分账账户删除提醒', '富茂', '{merchant}商户的收款账户[{account}]于{time}取消绑定,营销活动与销售分成将无法正常进行,请尽快绑定新收款账户', '" + nowTimestr + "', '1', '0', null, '1', null)," + -// " ( '" + idWorker.nextId() + "', '" + tenantId + "', '17', '限时活动报名成功', '富茂', '亲爱的{person},您已成功报名{party},盼望您于{time}到场参加活动,谢谢。', '" + nowTimestr + "', '1', '0', null, '1', 'SMS_194900027')," + -// " ( '" + idWorker.nextId() + "', '" + tenantId + "', '18', '限时活动参加提醒', '富茂', '亲爱的{person},{party}活动将在{time}准时开始,感谢您能够抽出宝贵时间准时到活动现场参与,谢谢。', '" + nowTimestr + "', '1', '0', null, '1', 'SMS_194920016')," + -// " ( '" + idWorker.nextId() + "', '" + tenantId + "', '28', '会员生日券开启', '富茂', '亲爱的{userName},在您的生日到来之际,我们精心的为您准备了一份生日礼物,并在生日当天消费领取{creditScale}倍积分,赶快打开{mallName}微信小程序领取您的专属生日礼物吧!', '" + nowTimestr + "', '1', '0', null, '1', 'SMS_194915025')," + -// " ( '" + idWorker.nextId() + "', '" + tenantId + "', '29', '会员生日券未开启', '富茂', '亲爱的{userName},在您的生日到来之际,我们精心的为您准备了一份生日礼物,赶快打开{mallName}微信小程序领取您的专属生日礼物吧!', '" + nowTimestr + "', '1', '0', null, '1', 'SMS_194900031')," + -// " ( '" + idWorker.nextId() + "', '" + tenantId + "', '30', '系统发卡', '富茂', '亲爱的,您收到一张【{title}】,兑换码:{pw}。请于30天内打开微信小程序:{app}兑换!进店详询。', '" + nowTimestr + "', '1', '0', null, '1', 'SMS_194920021');"; -// wxMsgValidationcodeModelMapper.wxMsgValidationcodeModelInit(initSql); -// String initSql1 = "insert into `mallink`.`wx_msg_validationcode_model` ( `id`, `tenant_id`, `type`, `name`, `signature`, `content`, `createtime`, `status`, `minutes`, `model_id`, `email_bg_img`, `msg_type`)" + -// "values ( '" + idWorker.nextId() + "', '" + tenantId + "', '10', '审批通过通知', '富茂', " + -// " '\\n\\n\\n\\n \\n \\n \\n \\n \\n \\n 富茂审批邮件\\n \\n \\n\\n\\n\\n
\\n
\\n \\n
\\n
\\n
审批通过通知
\\n
编号{contract}的{bustype}已经审批通过,请登录{page}跟进后续工作
\\n
\\n
\\n\\n\\n', " + -// " '" + nowTimestr + "', '1', null, '500', '" + emailBgImg + "', '2');"; -// wxMsgValidationcodeModelMapper.wxMsgValidationcodeModelInit(initSql1); -// String initSql2 = "insert into `mallink`.`wx_msg_validationcode_model` ( `id`, `tenant_id`, `type`, `name`, `signature`, `content`, `createtime`, `status`, `minutes`, `model_id`, `email_bg_img`, `msg_type`)" + -// "values ( '" + idWorker.nextId() + "', '" + tenantId + "', '11', '待缴账单通知', '富茂', " + -// " '\\n\\n\\n\\n \\n \\n \\n \\n \\n \\n 富茂审批邮件\\n \\n \\n\\n\\n\\n
\\n
\\n \\n
\\n \\n
\\n
待缴账单通知
\\n
您当前的待缴账单为{price}元,截止日期为{date}请登录您的商户端小程序查看账单并缴费
\\n
\\n
\\n
\\n 租金账单\\n
\\n
账单类型
\\n
账单金额(元)
\\n
缴费时间
\\n
\\n {billList}\\n
\\n
\\n
\\n
遇到问题?
\\n
\\n 请联系商管负责人:\\n {linkName}{linkPhone}\\n
\\n
\\n
\\n
\\n\\n\\n'," + -// " '" + nowTimestr + "', '1', null, '500', '" + emailBgImg + "', '2');"; -// wxMsgValidationcodeModelMapper.wxMsgValidationcodeModelInit(initSql2); -// String initSql3 = "insert into `mallink`.`wx_msg_validationcode_model` ( `id`, `tenant_id`, `type`, `name`, `signature`, `content`, `createtime`, `status`, `minutes`, `model_id`, `email_bg_img`, `msg_type`)" + -// "values ( '" + idWorker.nextId() + "', '" + tenantId + "', '12', '审批通知', '富茂', " + -// "'\\n\\n\\n\\n \\n \\n \\n \\n \\n \\n 富茂审批邮件\\n \\n \\n\\n\\n\\n
\\n
\\n \\n
\\n
\\n
审批通知
\\n
{userName}同意编号{contract}的{bustype}审批,已呈送{toUserName},请登录{page}查看审批进度
\\n
\\n
\\n\\n\\n', " + -// "'" + nowTimestr + "', '1', null, '500', '" + emailBgImg + "', '2');"; -// wxMsgValidationcodeModelMapper.wxMsgValidationcodeModelInit(initSql3); -// String initSql4 = "insert into `mallink`.`wx_msg_validationcode_model` ( `id`, `tenant_id`, `type`, `name`, `signature`, `content`, `createtime`, `status`, `minutes`, `model_id`, `email_bg_img`, `msg_type`)" + -// "values ( '" + idWorker.nextId() + "', '" + tenantId + "', '13', '欠缴账单通知', '富茂', " + -// " '\\n\\n\\n\\n \\n \\n \\n \\n \\n \\n 富茂审批邮件\\n \\n \\n\\n\\n\\n
\\n
\\n \\n
\\n \\n
\\n
欠缴账单通知
\\n
您当前的欠缴账单为{price}元,截止日期为{date}请登录您的商户端小程序查看账单并缴费
\\n
\\n
\\n
\\n 租金账单\\n
\\n
账单类型
\\n
账单金额(元)
\\n
缴费时间
\\n
逾期天数
\\n
\\n {billList}\\n
\\n
\\n
\\n
遇到问题?
\\n
\\n 请联系商管负责人:\\n {linkName}{linkPhone}\\n
\\n
\\n
\\n
\\n\\n\\n'," + -// "'" + nowTimestr + "', '1', null, '500', '" + emailBgImg + "', '2');"; -// wxMsgValidationcodeModelMapper.wxMsgValidationcodeModelInit(initSql4); -// String initSql5 = "insert into `mallink`.`wx_msg_validationcode_model` ( `id`, `tenant_id`, `type`, `name`, `signature`, `content`, `createtime`, `status`, `minutes`, `model_id`, `email_bg_img`, `msg_type`)" + -// " values ( '" + idWorker.nextId() + "', '" + tenantId + "', '14', '待办通知', '富茂'," + -// " '\\n\\n\\n\\n \\n \\n \\n \\n \\n \\n 富茂审批邮件\\n \\n \\n\\n\\n\\n
\\n
\\n \\n
\\n \\n
\\n
待办通知
\\n
{name}提交了一个{bustype}待您审批,电脑登录{page}查看您的待办
\\n
\\n
\\n
\\n
申请时间:
\\n
{applyTime}
\\n
\\n
\\n
申请进度:
\\n
\\n \\n {taskList}\\n
\\n
\\n
\\n
\\n
遇到问题?
\\n
\\n 请联系申请人:\\n {linkName}{linkPhone}\\n
\\n
\\n
\\n
\\n\\n\\n'," + -// " '" + nowTimestr + "', '1', null, '500', '" + emailBgImg + "', '2');"; -// wxMsgValidationcodeModelMapper.wxMsgValidationcodeModelInit(initSql5); -// String initSql6 = "insert into `mallink`.`wx_msg_validationcode_model` ( `id`, `tenant_id`, `type`, `name`, `signature`, `content`, `createtime`, `status`, `minutes`, `model_id`, `email_bg_img`, `msg_type`)" + -// " values ( '" + idWorker.nextId() + "', '" + tenantId + "', '15', '驳回通知', '富茂', " + -// " '\\n\\n\\n\\n \\n \\n \\n \\n \\n \\n 富茂审批邮件\\n \\n \\n\\n\\n\\n
\\n
\\n \\n
\\n \\n
\\n
审批通过通知
\\n
编号{contract}的{bustype}审批被驳回,请登录{page}查看审批明细
\\n
\\n
\\n
\\n 驳回人:\\n {name}\\n
\\n
\\n 驳回原因:\\n {remark}\\n
\\n
\\n
\\n
遇到问题?
\\n
\\n 请联系驳回人:\\n {linkName}{linkPhone}\\n
\\n
\\n
\\n
\\n\\n\\n'," + -// " '" + nowTimestr + "', '1', null, '500', '" + emailBgImg + "', '2');"; -// wxMsgValidationcodeModelMapper.wxMsgValidationcodeModelInit(initSql6); - } - @Override public PageInfo listAsPage(WxMsgValidationcodeModel record, Integer pageIndex, Integer pageSize) { return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxMsgValidationcodeModelMapper.findList(record)); diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxOrderGroupServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxOrderGroupServiceImpl.java index c85303f7c..aba17482e 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxOrderGroupServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxOrderGroupServiceImpl.java @@ -191,7 +191,8 @@ public class WxOrderGroupServiceImpl implements WxOrderGroupService { wxOrderGroup.setCreateDate(date); wxOrderGroup.setUpdateDate(date); wxOrderGroup.setStatus(EnumOrderStatus.ORDER_STATUS_COOPERATING.getCode()); - Date expiredDate = DateUtils.getHourTimeAfter(wxCoupon.getPressLimitHours(), new Date()); +// Date expiredDate = DateUtils.getHourTimeAfter(wxCoupon.getPressLimitHours(), new Date()); + Date expiredDate = DateUtils.getMinuteTimeAfter(wxCoupon.getPressLimitHours(), new Date()); if (expiredDate.after(wxCoupon.getValidEndDate())) { expiredDate = wxCoupon.getValidEndDate(); } diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java index 29e7d2dd2..525cb80a8 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java @@ -3450,7 +3450,8 @@ public class WxOrderServiceImpl implements WxOrderService { // 初始砍价信息 record.setPressCurrentNum(0); // 砍价券过期时间取券的过期时间和砍价限制时间中时间小的那个 - Date pressEndDate = DateUtils.getHourTimeAfter(coupon.getPressLimitHours(), new Date()); +// Date pressEndDate = DateUtils.getHourTimeAfter(coupon.getPressLimitHours(), new Date()); + Date pressEndDate = DateUtils.getMinuteTimeAfter(coupon.getPressLimitHours(), new Date()); if (pressEndDate.after(coupon.getValidEndDate())) pressEndDate = coupon.getValidEndDate(); record.setPressEndDate(pressEndDate); diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxPayAccountBillServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxPayAccountBillServiceImpl.java index ef30ea7a9..a9a32bd27 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxPayAccountBillServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxPayAccountBillServiceImpl.java @@ -29,6 +29,14 @@ public class WxPayAccountBillServiceImpl implements WxPayAccountBillService { @Autowired WxBillPropertyMapper wxBillPropertyMapper; + @Override + public void payAccountBillInit(TenantEntity tenantInfo) { + WxPayAccountBill record = new WxPayAccountBill(); + record.setId(Long.parseLong(tenantInfo.getTenantId())); + record.updateTenantInfo(tenantInfo); + wxPayAccountBillMapper.insert(record); + } + @Override public PageInfo listAsPage(WxPayAccountBill record, Integer pageIndex, Integer pageSize) { return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxPayAccountBillMapper.findList(record)); diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxProjectConfigServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxProjectConfigServiceImpl.java index 860d0c5a8..e6aca8d0f 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxProjectConfigServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxProjectConfigServiceImpl.java @@ -66,6 +66,8 @@ public class WxProjectConfigServiceImpl implements WxProjectConfigService { WxFlowService wxFlowService; @Autowired MallUserInfoService userInfoService; + @Autowired + WxBusinessService wxBusinessService; @Autowired @Qualifier("objectCommonRedisTemplate") @@ -149,12 +151,14 @@ public class WxProjectConfigServiceImpl implements WxProjectConfigService { wxTemplateMsgService.wxTemplateMsgInit(wxMall.getTenantId()); // # 19. wx_question wxQuestionService.wxQuestionInit(wxMall.getTenantId()); - //# 20. wx_msg_validationcode_model, 数据重新一下 - wxMsgValidationcodeModelService.wxMsgValidationcodeModelInit(wxMall.getTenantId(), wxMall.getName(), wxMall.getImgUrlH()); //wx_flow_config wxFlowService.wxFlowConfigInit(wxMall.getTenantId()); //wx_msg_config(默认aliyun) wxMsgConfigService.wxMsgConfigInit(wxMall.getTenantInfo()); + //wx_business + wxBusinessService.businessInit(wxMall.getTenantInfo()); + //wx_pay_account_bill + wxPayAccountBillService.payAccountBillInit(wxMall.getTenantInfo()); } wxMallService.update(wxMall); } diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxRefundOrderServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxRefundOrderServiceImpl.java index 8f0da04c1..d736b9f2c 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxRefundOrderServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxRefundOrderServiceImpl.java @@ -1280,6 +1280,7 @@ public class WxRefundOrderServiceImpl implements WxRefundOrderService { final IdWorker idWorker = IdWorker.get(); record.setId(idWorker.nextId()); + record.setCardType(cardSend.getCardType()); record.setOwnerId(cardSend.getOwnerId()); record.setMerchantId(cardSend.getMerchantId()); record.setPayFrom(EnumCardSpendFrom.refund.getCode()); diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxTemplateMsgServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxTemplateMsgServiceImpl.java index b5dcde541..185c1c96b 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxTemplateMsgServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxTemplateMsgServiceImpl.java @@ -70,7 +70,6 @@ public class WxTemplateMsgServiceImpl implements WxTemplateMsgService { wxTemplateMsg.setType(EnumTemplateType.SEND_COUPON_REMIND.getCode()); wxTemplateMsg.setCustomParam("{\"index\": [\"thing1\", \"time3\", \"time4\", \"thing5\"], \"emphasis\": \"\"}"); wxTemplateMsgMapper.insert(wxTemplateMsg); - wxTemplateMsg.setId(null); wxTemplateMsg.setType(EnumTemplateType.CARD_BALANCE_CHANGE.getCode()); wxTemplateMsg.setCustomParam("{\"index\": [\"thing7\", \"amount1\", \"amount2\", \"amount4\", \"thing6\"], \"emphasis\": \"\"}"); diff --git a/mallinkService/src/main/java/com/iformall/utils/DateUtils.java b/mallinkService/src/main/java/com/iformall/utils/DateUtils.java index 89b943d52..2588fa558 100755 --- a/mallinkService/src/main/java/com/iformall/utils/DateUtils.java +++ b/mallinkService/src/main/java/com/iformall/utils/DateUtils.java @@ -393,8 +393,8 @@ public class DateUtils { /** * 获得当前时间前几秒的时间 * - * @param hour - * 前几小时 + * @param + * * @return */ public static String getSecondsTimeBefore(int seconds, Date myDate) { @@ -407,8 +407,7 @@ public class DateUtils { /** * 获得当前时间后几秒的时间 * - * @param hour - * 后几小时 + * @param * @return */ public static Date getSecondsTimeAfter(int seconds, Date myDate) { @@ -416,6 +415,18 @@ public class DateUtils { Date testDate = new Date(myTime * 1000); return testDate; } + + /** + * 获得当前时间后几分钟的时间 + * + * @param + * @return + */ + public static Date getMinuteTimeAfter(int minute, Date myDate) { + long myTime = (myDate.getTime() / 1000) + 60 * minute; + Date testDate = new Date(myTime * 1000); + return testDate; + } /** * 获得当前时间后几小时的时间 diff --git a/mallinkService/src/main/resources/mapper/WxCardSpendMapper.xml b/mallinkService/src/main/resources/mapper/WxCardSpendMapper.xml index 17e78578e..198a81792 100644 --- a/mallinkService/src/main/resources/mapper/WxCardSpendMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxCardSpendMapper.xml @@ -6,6 +6,7 @@ + @@ -29,7 +30,7 @@ - `id`,`tenant_id`,`parent_tenant_id`,`card_id`,`owner_id`,`pay_type`,`merchant_id`,`order_id`,`pos_order_id`, + `id`,`tenant_id`,`parent_tenant_id`,`card_id`,`card_type`,`owner_id`,`pay_type`,`merchant_id`,`order_id`,`pos_order_id`, `deduction_amount`,`payment`,`real_payment`,`subsidy`, `card_remain_amount`, `card_before_amount`,`card_remain_real_amount`,`card_before_real_amount`, `create_date`, `update_date`, `pay_status`, `pay_from`, `refund_status`, `refund_remark`, `settlement_status`