From f0cd5b76e083986009243bf00ce5c60eaab2c944 Mon Sep 17 00:00:00 2001 From: Xia Kaixiang Date: Mon, 3 Jun 2019 14:00:29 +0800 Subject: [PATCH] =?utf8?q?paytype=E6=94=B9=E4=B8=BAsourcetype=E7=9A=84?= =?utf8?q?=E9=A1=B5=E9=9D=A2bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../system/service/impl/ParamServiceImpl.java | 2 +- .../templates/system/param/paytype.html | 36 +++++++++---------- .../templates/system/param/paytypeconfig.html | 2 +- .../templates/system/param/paytypeform.html | 4 +-- .../templates/system/shop/config.html | 32 ++++++++--------- .../templates/system/shop/configform.html | 2 +- .../templates/system/shop/configpara.html | 2 +- .../templates/system/shop/index.html | 1 + 8 files changed, 41 insertions(+), 40 deletions(-) diff --git a/src/main/java/com/supwisdom/dlpay/system/service/impl/ParamServiceImpl.java b/src/main/java/com/supwisdom/dlpay/system/service/impl/ParamServiceImpl.java index 4709fdaa..f774582f 100644 --- a/src/main/java/com/supwisdom/dlpay/system/service/impl/ParamServiceImpl.java +++ b/src/main/java/com/supwisdom/dlpay/system/service/impl/ParamServiceImpl.java @@ -151,7 +151,7 @@ public class ParamServiceImpl implements ParamService { @Override public PageResult getPaytypePage(String paytype, int pageNo, int pageSize) { - Pageable pageable = PageRequest.of(pageNo - 1, pageSize, Sort.by("paytype")); + Pageable pageable = PageRequest.of(pageNo - 1, pageSize, Sort.by("sourceType")); if (!StringUtil.isEmpty(paytype)) { return new PageResult<>(paytypeDao.findBySourceTypeContaining(paytype.trim(), pageable)); } diff --git a/src/main/resources/templates/system/param/paytype.html b/src/main/resources/templates/system/param/paytype.html index fd065d68..06fc5f21 100644 --- a/src/main/resources/templates/system/param/paytype.html +++ b/src/main/resources/templates/system/param/paytype.html @@ -25,35 +25,35 @@ @@ -107,7 +107,7 @@ // 搜索按钮点击事件 $('#btn-search-param').click(function () { var sourceType = $("#search-global-sourceType").val(); - table.reload('paytypeTable', {where: {sourceType: sourceType}, page: {curr: 1}}); + table.reload('paytypeTable', {where: {paytype: sourceType}, page: {curr: 1}}); }); $('#btn-add-param').click(function () { @@ -128,8 +128,8 @@ form.on('switch(enable-tpl-state)', function (obj) { var token = $("meta[name='_csrf_token']").attr("value"); admin.go('/param/updatepaytypestate', { - sourceType: obj.elem.value, - state: obj.elem.checked ? 'yes' : 'no', + paytype: obj.elem.value, + state: obj.elem.checked, _csrf: token }, function (data) { if (data.code == 200) { @@ -170,8 +170,8 @@ function updatePaytypeState(obj, optype, token) { admin.go('/param/updatepaytypestate', { - sourceType: obj.elem.value, - state: obj.elem.checked ? 'yes' : 'no', + paytype: obj.elem.value, + state: obj.elem.checked, optype: optype, _csrf: token }, function (data) { @@ -198,7 +198,7 @@ var row = obj.data; //得到所在行所有键值 var newval = obj.value; //得到修改后的值 admin.go('/param/updatepaytypename', { - sourceType: row.sourceType, + paytype: row.sourceType, paydesc: newval, _csrf: $("meta[name='_csrf_token']").attr("value"), }, function (data) { @@ -226,7 +226,7 @@ if (confirm("确定要删除支付方式[" + data.sourceType + "_" + data.paydesc + "]吗?")) { layer.load(2); admin.go('/param/deletepaytype', { - sourceType: data.sourceType, + paytype: data.sourceType, _csrf: $("meta[name='_csrf_token']").attr("value") }, function (data) { console.log(data.code); @@ -251,7 +251,7 @@ }else if('config' ==obj.event){ admin.popupCenter({ title: "配置参数【" + data.sourceType + "_" + data.paydesc + "】", - path: '/param/load4paytypeconfig?sourceType='+data.sourceType, + path: '/param/load4paytypeconfig?paytype='+data.sourceType, area: '800px', finish: function () { table.reload('paytypeTable'); diff --git a/src/main/resources/templates/system/param/paytypeconfig.html b/src/main/resources/templates/system/param/paytypeconfig.html index f964907b..cc7b38e3 100644 --- a/src/main/resources/templates/system/param/paytypeconfig.html +++ b/src/main/resources/templates/system/param/paytypeconfig.html @@ -1,6 +1,6 @@
diff --git a/src/main/resources/templates/system/param/paytypeform.html b/src/main/resources/templates/system/param/paytypeform.html index 5bd04c54..e47d48d7 100644 --- a/src/main/resources/templates/system/param/paytypeform.html +++ b/src/main/resources/templates/system/param/paytypeform.html @@ -2,7 +2,7 @@
-
@@ -62,7 +62,7 @@ url: '/param/checkpaytype', async: false, data: { - sourceType: e + paytype: e }, success: function (result) { if (result.code != 200) { diff --git a/src/main/resources/templates/system/shop/config.html b/src/main/resources/templates/system/shop/config.html index 9afd11f0..9bc1ccc7 100644 --- a/src/main/resources/templates/system/shop/config.html +++ b/src/main/resources/templates/system/shop/config.html @@ -48,23 +48,23 @@