From 8215f03ac92361652f14b44f8f2e5a635a07c8d9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BD=90=E5=A4=A9=E5=A4=A7=E5=9C=A3?= <17615834396@163.com>
Date: Wed, 24 Jan 2024 15:22:16 +0800
Subject: [PATCH] bug
---
.../EventMarketing/cardExchange/index.vue | 10 +--
.../impl/ActiveExchangeServiceImpl.java | 64 +++++++++++++++++++
.../ActiveNewlywedsRecordsController.java | 2 +-
.../ActiveNewlywedsRecordsService.java | 2 +-
.../ActiveNewlywedsRecordsServiceImpl.java | 5 +-
.../impl/CardFavorableServiceImpl.java | 6 +-
gasStation-uni/pages/index/index.vue | 29 +++++----
gasStation-uni/pagesMy/Recharge/Recharge.vue | 7 +-
8 files changed, 103 insertions(+), 22 deletions(-)
diff --git a/fuintAdmin/src/views/EventMarketing/cardExchange/index.vue b/fuintAdmin/src/views/EventMarketing/cardExchange/index.vue
index a2bc84779..edc262568 100644
--- a/fuintAdmin/src/views/EventMarketing/cardExchange/index.vue
+++ b/fuintAdmin/src/views/EventMarketing/cardExchange/index.vue
@@ -97,7 +97,7 @@
-
+
{{ scope.row.createTime }}
@@ -171,9 +171,9 @@
-
+
启用
@@ -275,9 +275,9 @@ export default {
useInstructions: [
{ required: true, message: '请输入使用说明', trigger: 'change' }
],
- count: [
+ /*count: [
{ required: true, message: '请输入参与次数', trigger: 'change' }
- ],
+ ],*/
status: [
{ required: true, message: '请选择状态', trigger: 'change' }
]
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/service/impl/ActiveExchangeServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/service/impl/ActiveExchangeServiceImpl.java
index 963d0b08f..7cb46f4f7 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/service/impl/ActiveExchangeServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/service/impl/ActiveExchangeServiceImpl.java
@@ -761,6 +761,70 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService {
}
}
}
+
+ //三个优惠都不为空
+ BigDecimal bigDecimal = new BigDecimal("0.00");
+ if (ObjectUtils.isNotEmpty(paymentActiveVO.getActiveFavorableAmount()) && ObjectUtils.isNotEmpty(paymentActiveVO.getCardFavorableAmount())&& ObjectUtils.isNotEmpty(paymentActiveVO.getMemberFavorableAmount())) {
+ BigDecimal add3 = paymentActiveVO.getActiveFavorableAmount().add(paymentActiveVO.getCardFavorableAmount()).add(paymentActiveVO.getMemberFavorableAmount());
+ if (add3.compareTo(paymentActiveDTO.getAmount()) > 0){
+ BigDecimal add21 = paymentActiveVO.getActiveFavorableAmount().add(paymentActiveVO.getCardFavorableAmount());
+ BigDecimal add22 = paymentActiveVO.getActiveFavorableAmount().add(paymentActiveVO.getMemberFavorableAmount());
+ BigDecimal add23 = paymentActiveVO.getCardFavorableAmount().add(paymentActiveVO.getMemberFavorableAmount());
+ if (add21.compareTo(add22)>0 && add21.compareTo(add23)>0){
+ paymentActiveVO.setMemberFavorableAmount(bigDecimal);
+ }
+ if (add22.compareTo(add21)>0 && add22.compareTo(add23)>0){
+ paymentActiveVO.setCardFavorableAmount(bigDecimal);
+ }
+ if (add23.compareTo(add21)>0 && add23.compareTo(add22)>0){
+ paymentActiveVO.setActiveFavorableAmount(bigDecimal);
+ }
+
+
+ if (paymentActiveVO.getActiveFavorableAmount().compareTo(add23)>0){
+ paymentActiveVO.setCardFavorableAmount(bigDecimal);
+ paymentActiveVO.setMemberFavorableAmount(bigDecimal);
+ }
+ if (paymentActiveVO.getCardFavorableAmount().compareTo(add22)>0){
+ paymentActiveVO.setActiveFavorableAmount(bigDecimal);
+ paymentActiveVO.setMemberFavorableAmount(bigDecimal);
+ }
+ if (paymentActiveVO.getMemberFavorableAmount().compareTo(add21)>0){
+ paymentActiveVO.setActiveFavorableAmount(bigDecimal);
+ paymentActiveVO.setCardFavorableAmount(bigDecimal);
+ }
+ }
+ }
+ //有空值
+ if (ObjectUtils.isEmpty(paymentActiveVO.getActiveFavorableAmount()) || ObjectUtils.isEmpty(paymentActiveVO.getCardFavorableAmount()) || ObjectUtils.isEmpty(paymentActiveVO.getMemberFavorableAmount())){
+ if (ObjectUtils.isEmpty(paymentActiveVO.getActiveFavorableAmount()) && ObjectUtils.isNotEmpty(paymentActiveVO.getCardFavorableAmount())&& ObjectUtils.isNotEmpty(paymentActiveVO.getMemberFavorableAmount())){
+ if (paymentActiveVO.getCardFavorableAmount().add(paymentActiveVO.getMemberFavorableAmount()).compareTo(paymentActiveDTO.getAmount())>0){
+ if (paymentActiveVO.getCardFavorableAmount().compareTo(paymentActiveVO.getMemberFavorableAmount())>0){
+ paymentActiveVO.setMemberFavorableAmount(bigDecimal);
+ }else {
+ paymentActiveVO.setCardFavorableAmount(bigDecimal);
+ }
+ }
+ }
+ if (ObjectUtils.isEmpty(paymentActiveVO.getCardFavorableAmount()) && ObjectUtils.isNotEmpty(paymentActiveVO.getActiveFavorableAmount())&& ObjectUtils.isNotEmpty(paymentActiveVO.getMemberFavorableAmount())){
+ if (paymentActiveVO.getActiveFavorableAmount().add(paymentActiveVO.getMemberFavorableAmount()).compareTo(paymentActiveDTO.getAmount())>0){
+ if (paymentActiveVO.getActiveFavorableAmount().compareTo(paymentActiveVO.getMemberFavorableAmount())>0){
+ paymentActiveVO.setMemberFavorableAmount(bigDecimal);
+ }else {
+ paymentActiveVO.setActiveFavorableAmount(bigDecimal);
+ }
+ }
+ }
+ if (ObjectUtils.isEmpty(paymentActiveVO.getMemberFavorableAmount()) && ObjectUtils.isNotEmpty(paymentActiveVO.getCardFavorableAmount())&& ObjectUtils.isNotEmpty(paymentActiveVO.getActiveFavorableAmount())){
+ if (paymentActiveVO.getCardFavorableAmount().add(paymentActiveVO.getActiveFavorableAmount()).compareTo(paymentActiveDTO.getAmount())>0){
+ if (paymentActiveVO.getCardFavorableAmount().compareTo(paymentActiveVO.getActiveFavorableAmount())>0){
+ paymentActiveVO.setActiveFavorableAmount(bigDecimal);
+ }else {
+ paymentActiveVO.setCardFavorableAmount(bigDecimal);
+ }
+ }
+ }
+ }
return paymentActiveVO;
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/controller/ActiveNewlywedsRecordsController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/controller/ActiveNewlywedsRecordsController.java
index 96c783786..ffb8ca3fb 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/controller/ActiveNewlywedsRecordsController.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/controller/ActiveNewlywedsRecordsController.java
@@ -86,7 +86,7 @@ public class ActiveNewlywedsRecordsController extends BaseController {
* @return 新增结果
*/
@PostMapping
- public ResponseObject insert(@RequestBody ActiveNewlywedsRecords activeNewlywedsRecords) {
+ public ResponseObject insert(@RequestBody ActiveNewlywedsRecords activeNewlywedsRecords) throws Exception {
return getSuccessResult(this.activeNewlywedsRecordsService.add(activeNewlywedsRecords));
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/ActiveNewlywedsRecordsService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/ActiveNewlywedsRecordsService.java
index 509436b60..04eabae9b 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/ActiveNewlywedsRecordsService.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/service/ActiveNewlywedsRecordsService.java
@@ -16,6 +16,6 @@ public interface ActiveNewlywedsRecordsService extends IService
-
+
@@ -86,9 +86,9 @@
{{store.name}}{{store.description ? "("+store.description+")" : ""}}
-
+
@@ -136,10 +136,13 @@
import tabbar from "../../components/tabbar/tabbar.vue"
import config from '@/config'
import request from '../../utils/request'
-import { callWithErrorHandling } from "vue"
+ import {
+ callWithErrorHandling
+ } from "vue"
export default {
data() {
return {
+ chainStoreId: '',
indicatorDots: true,
autoplay: true,
interval: 2000,
@@ -215,6 +218,7 @@ import { callWithErrorHandling } from "vue"
uni.setStorageSync("storeId", storeId)
uni.setStorageSync("inviteStaffId", staffId)
this.storeId = uni.getStorageSync("storeId")
+ this.chainStoreId = uni.getStorageSync("chainStoreId")
this.staffId = uni.getStorageSync("inviteStaffId")
uni.showLoading({
title: uni.getStorageSync("storeId") + "++" + uni.getStorageSync("inviteStaffId") + q
@@ -242,11 +246,11 @@ import { callWithErrorHandling } from "vue"
},
methods: {
// 返回图片路径
- getBannerUrl(url){
+ getBannerUrl(url) {
let imgurl = ""
- if (url.includes("http")){
+ if (url.includes("http")) {
imgurl = url
- }else {
+ } else {
imgurl = this.baseUrl + url
}
return imgurl;
@@ -266,10 +270,10 @@ import { callWithErrorHandling } from "vue"
method: 'get',
}).then(res => {
_this.list1 = res.data
- for (let i = 0;i {
console.log("11111" + res)
@@ -862,4 +867,4 @@ import { callWithErrorHandling } from "vue"
color: white;
margin: 0 auto;
}
-
+
\ No newline at end of file
diff --git a/gasStation-uni/pagesMy/Recharge/Recharge.vue b/gasStation-uni/pagesMy/Recharge/Recharge.vue
index 1d7187ffc..e78c28fa3 100644
--- a/gasStation-uni/pagesMy/Recharge/Recharge.vue
+++ b/gasStation-uni/pagesMy/Recharge/Recharge.vue
@@ -56,6 +56,7 @@
export default {
data() {
return {
+ appltType: "",
title: '',
tindex: 0,
status: 'loading',
@@ -68,7 +69,8 @@
storeId: '',
recordName: '',
pageNo: 1,
- pageSize: 10
+ pageSize: 10,
+ appltType: '',
},
tapList: [{
text: "全部"
@@ -88,6 +90,9 @@
components: {
+ },
+ onLoad() {
+ this.appltType = uni.getstorageSync("appltType");
},
onShow() {
this.getAllOrderList();