From 60ccc78c46db0a47f355406988e2f5c3cdcd39f6 Mon Sep 17 00:00:00 2001 From: cun-nan <19819293608@163.com> Date: Mon, 29 Jan 2024 09:50:28 +0800 Subject: [PATCH] bug --- fuintAdmin/src/views/power/payment/index.vue | 8 ++++++-- .../src/views/components/Service/payment.vue | 10 +++++----- .../MerchantConfigRecordController.java | 2 +- .../api/fuyou/controller/OilConfigController.java | 15 +++++++++++---- .../mapper/xml/MerchantConfigRecordMapper.xml | 2 +- .../api/fuyou/service/MerchantConfigService.java | 2 +- .../fuint/api/fuyou/service/OilConfigService.java | 2 +- .../service/impl/MerchantConfigServiceImpl.java | 9 ++++++--- .../fuyou/service/impl/OilConfigServiceImpl.java | 4 ++-- 9 files changed, 34 insertions(+), 20 deletions(-) diff --git a/fuintAdmin/src/views/power/payment/index.vue b/fuintAdmin/src/views/power/payment/index.vue index 1104edd91..f5774d961 100644 --- a/fuintAdmin/src/views/power/payment/index.vue +++ b/fuintAdmin/src/views/power/payment/index.vue @@ -228,7 +228,7 @@ :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.pageSize" - @pagination="getList" + @pagination="getMerchantList(merchantId)" /> @@ -305,6 +305,7 @@ export default { merchantRecordList:[], total:0, loading:false, + merchantId:"", } }, created() { @@ -314,7 +315,10 @@ export default { getMerchantList(id){ this.dialogVisibleList = true this.loading = true; - this.queryParams.merchantId = id + if (id){ + this.merchantId = id + } + this.queryParams.merchantId = this.merchantId listMerchantConfigRecord(this.queryParams).then(res => { this.merchantRecordList = res.data.records; this.total = res.data.total; diff --git a/fuintAdmin_zt/src/views/components/Service/payment.vue b/fuintAdmin_zt/src/views/components/Service/payment.vue index e3d60dfc5..58ca48333 100644 --- a/fuintAdmin_zt/src/views/components/Service/payment.vue +++ b/fuintAdmin_zt/src/views/components/Service/payment.vue @@ -93,7 +93,7 @@
{{index + 1}}.通道
-
{{ item.merchantName }}
+
{{ item.merchantName }}({{ item.remark }})
商户号
{{ item.mchntCd }}
@@ -440,7 +440,7 @@ export default { // 修改启用状态 changeStatus(){ if (this.value){ - isOpenOilConfig({isOpen:1,ruleCycle:this.ruleCycle}).then( response => { + isOpenOilConfig({isOpen:1,ruleCycle:this.ruleCycle,storeId:this.id}).then( response => { if (response.data!=1){ this.$message({ type: 'error', @@ -457,18 +457,18 @@ export default { } }) }else { - isOpenOilConfig({isOpen:0,ruleCycle:this.ruleCycle}).then( response => { + isOpenOilConfig({isOpen:0,ruleCycle:this.ruleCycle,storeId:this.id}).then( response => { this.value1 = true; }) } }, changeStatus1(){ if (this.value1){ - isOpenOilConfig({isOpen:0,ruleCycle:this.ruleCycle}).then( response => { + isOpenOilConfig({isOpen:0,ruleCycle:this.ruleCycle,storeId:this.id}).then( response => { this.value = false; }) }else { - isOpenOilConfig({isOpen:1,ruleCycle:this.ruleCycle}).then( response => { + isOpenOilConfig({isOpen:1,ruleCycle:this.ruleCycle,storeId:this.id}).then( response => { if (response.data!=1){ this.$message({ type: 'error', diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/controller/MerchantConfigRecordController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/controller/MerchantConfigRecordController.java index 90d39bf85..af59f9748 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/controller/MerchantConfigRecordController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/controller/MerchantConfigRecordController.java @@ -28,7 +28,7 @@ public class MerchantConfigRecordController extends BaseController { * @return */ @GetMapping("/list") - public ResponseObject list(@Param("staff") MerchantConfigRecord merchantConfigRecord, + public ResponseObject list(MerchantConfigRecord merchantConfigRecord, @RequestParam(value = "page",defaultValue = "1") Integer pageNo, @RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){ Page page =new Page(pageNo,pageSize); diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/controller/OilConfigController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/controller/OilConfigController.java index d2f6008f2..c8448e5eb 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/controller/OilConfigController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/controller/OilConfigController.java @@ -8,6 +8,7 @@ import com.fuint.common.dto.AccountInfo; import com.fuint.common.util.TokenUtil; import com.fuint.framework.web.BaseController; import com.fuint.framework.web.ResponseObject; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -48,20 +49,26 @@ public class OilConfigController extends BaseController { public ResponseObject isOpen(@Validated @RequestBody Map map){ String isOpen = map.get("isOpen"); String ruleCycle = map.get("ruleCycle"); + Integer storeId = null; + if (StringUtils.isNotEmpty(map.get("storeId"))){ + storeId = Integer.valueOf(map.get("storeId")); + }else { + AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); + storeId = nowAccountInfo.getStoreId(); + } // 2 代表不启用规则 int result = 2; // isOpen=1开启规则 if (isOpen.equals("1")){ result = oilConfigService.judgmentProportion(); if (result==1){ - AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); - oilConfigService.oilRule(nowAccountInfo.getStoreId()); + oilConfigService.oilRule(storeId); // 开启定时关闭规则 - oilConfigService.ruleCycle(ruleCycle); + oilConfigService.ruleCycle(ruleCycle,storeId); } }else { // 不开启规则 - merchantConfigService.updateMerchIsOpen("0"); + merchantConfigService.updateMerchIsOpen("0",storeId); } return getSuccessResult(result); } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/mapper/xml/MerchantConfigRecordMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/mapper/xml/MerchantConfigRecordMapper.xml index beaaace1b..adb3b1408 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/mapper/xml/MerchantConfigRecordMapper.xml +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/mapper/xml/MerchantConfigRecordMapper.xml @@ -7,7 +7,7 @@ store_id = #{merchantConfigRecord.storeId} - and merchant_id like concat('%', #{merchantConfigRecord.merchantId}, '%') + and merchant_id = #{merchantConfigRecord.merchantId} diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/MerchantConfigService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/MerchantConfigService.java index 2fd73e293..90a241bbf 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/MerchantConfigService.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/MerchantConfigService.java @@ -76,7 +76,7 @@ public interface MerchantConfigService extends IService { * @param isOpenRule * @return */ - public int updateMerchIsOpen(String isOpenRule); + public int updateMerchIsOpen(String isOpenRule,Integer storeId); /** * 根据id修改用户备注信息 diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/OilConfigService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/OilConfigService.java index 802d4f197..5d20695a4 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/OilConfigService.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/OilConfigService.java @@ -24,7 +24,7 @@ public interface OilConfigService extends IService { /** * 规则周期是否为当日 */ - public void ruleCycle(String ruleCycle); + public void ruleCycle(String ruleCycle,Integer storeId); /** * 查询油品配置信息 diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/MerchantConfigServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/MerchantConfigServiceImpl.java index f434f9316..558015354 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/MerchantConfigServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/MerchantConfigServiceImpl.java @@ -127,10 +127,13 @@ public class MerchantConfigServiceImpl extends ServiceImpl list = baseMapper.selectList(queryWrapper); int row = 0; for (MerchantConfig merchantConfig : list) { diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/OilConfigServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/OilConfigServiceImpl.java index 7599d6ad8..70ad6a72c 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/OilConfigServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/OilConfigServiceImpl.java @@ -81,7 +81,7 @@ public class OilConfigServiceImpl extends ServiceImpl