From cc71deba29a060e3b54434bfb591358dace0d5d5 Mon Sep 17 00:00:00 2001 From: cun-nan <19819293608@163.com> Date: Mon, 9 Sep 2024 08:46:27 +0800 Subject: [PATCH] 9.9 --- fuintAdmin/src/views/power/payment/index.vue | 30 +++++++++++-------- .../controller/MerchantConfigController.java | 7 +++-- .../impl/PaymentRuleConfigServiceImpl.java | 11 +++++++ 3 files changed, 34 insertions(+), 14 deletions(-) diff --git a/fuintAdmin/src/views/power/payment/index.vue b/fuintAdmin/src/views/power/payment/index.vue index 9ef8483ed..90a83eb48 100644 --- a/fuintAdmin/src/views/power/payment/index.vue +++ b/fuintAdmin/src/views/power/payment/index.vue @@ -408,7 +408,7 @@ - + - + + style="width: 350px">
@@ -495,7 +495,7 @@ - + @@ -569,7 +569,7 @@ - + { + // listRuleConfigs().then(response => { + // + // console.log(response.data + " -==- -==-") - console.log(response.data + " -==- -==-") - - this.tableData1 = response.data; + // this.tableData1 = response.data; /*this.merchantList.forEach(item => { if (item.isOpenRule == "1") { this.value1 = false; @@ -1241,6 +1244,9 @@ export default { listOilConfig().then(response => { this.oilConfigList = response.data; })*/ + // }) + listRuleConfig().then(res => { + this.tableData1 = res.data }) }, open() { @@ -1275,7 +1281,7 @@ export default { .new-box { width: 100%; - height: 80vh; + height: 89vh; overflow: auto; background: #fff; box-sizing: border-box; diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/controller/MerchantConfigController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/controller/MerchantConfigController.java index 8ca591a67..9dfc9c361 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/controller/MerchantConfigController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/controller/MerchantConfigController.java @@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.fuint.api.fuyou.entity.MerchantConfig; import com.fuint.api.fuyou.service.MerchantConfigService; import com.fuint.api.fuyou.vo.MerchantConfigVo; +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.springframework.beans.factory.annotation.Autowired; @@ -40,8 +42,9 @@ public class MerchantConfigController extends BaseController { */ @GetMapping("/list") public ResponseObject list(){ - List list = merchantConfigService.selectMerchList(); - return getSuccessResult(list); +// List list = merchantConfigService.selectMerchList(); + AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); + return getSuccessResult(merchantConfigService.selectMerchList(nowAccountInfo.getStoreId())); } @GetMapping("/list2") diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/PaymentRuleConfigServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/PaymentRuleConfigServiceImpl.java index 1de8ac36a..ff05e4433 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/PaymentRuleConfigServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/PaymentRuleConfigServiceImpl.java @@ -11,6 +11,8 @@ import com.fuint.api.fuyou.service.OilConfigService; import com.fuint.api.fuyou.service.PaymentRuleConfigService; import com.fuint.api.fuyou.vo.OilConfigVo; import com.fuint.api.fuyou.vo.PaymentRuleConfigVo; +import com.fuint.common.dto.AccountInfo; +import com.fuint.common.util.TokenUtil; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotation.Scheduled; @@ -30,6 +32,10 @@ public class PaymentRuleConfigServiceImpl extends ServiceImpl selectList(PaymentRuleConfig paymentRuleConfig) { + if (ObjectUtil.isEmpty(paymentRuleConfig.getStoreId())){ + AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); + paymentRuleConfig.setStoreId(nowAccountInfo.getStoreId()); + } List list = baseMapper.selectListByStoreId(paymentRuleConfig); for (PaymentRuleConfig ruleConfig : list) { List oilConfigs = oilConfigService.selectListByRuleConfigId(ruleConfig.getId()); @@ -76,6 +82,11 @@ public class PaymentRuleConfigServiceImpl extends ServiceImpl