bug
This commit is contained in:
parent
53627e2f41
commit
8215f03ac9
@ -97,7 +97,7 @@
|
||||
<!-- <span>{{ scope.row.qrCodeLink }}</span>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="参与次数" align="center" prop="count"/>
|
||||
<!-- <el-table-column label="参与次数" align="center" prop="count"/>-->
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.createTime }}</span>
|
||||
@ -171,9 +171,9 @@
|
||||
<el-form-item label="使用说明" prop="useInstructions">
|
||||
<el-input type="textarea" v-model="form.useInstructions" placeholder="请输入使用说明"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="参与次数" prop="count">
|
||||
<!-- <el-form-item label="参与次数" prop="count">
|
||||
<el-input-number v-model="form.count" controls-position="right" :min="1" :max="999"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-form-item>-->
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio label="0">启用</el-radio>
|
||||
@ -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' }
|
||||
]
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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));
|
||||
}
|
||||
|
||||
|
@ -16,6 +16,6 @@ public interface ActiveNewlywedsRecordsService extends IService<ActiveNewlywedsR
|
||||
* @param activeNewlywedsRecords
|
||||
* @return
|
||||
*/
|
||||
boolean add(ActiveNewlywedsRecords activeNewlywedsRecords);
|
||||
boolean add(ActiveNewlywedsRecords activeNewlywedsRecords) throws Exception;
|
||||
}
|
||||
|
||||
|
@ -55,12 +55,15 @@ public class ActiveNewlywedsRecordsServiceImpl extends ServiceImpl<ActiveNewlywe
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public boolean add(ActiveNewlywedsRecords activeNewlywedsRecords) {
|
||||
public boolean add(ActiveNewlywedsRecords activeNewlywedsRecords) throws Exception {
|
||||
boolean save = false;
|
||||
//用户信息
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
Integer userId = nowAccountInfo.getId();
|
||||
LJUserVo ljUserVo = userService.selectUserById(userId,activeNewlywedsRecords.getStoreId());
|
||||
/*if (ObjectUtils.isEmpty(ljUserVo)){
|
||||
userBalanceService.initBalance(userId,activeNewlywedsRecords.getChainStoreId());
|
||||
}*/
|
||||
//保存新人有礼记录
|
||||
ActiveNewlywedsVO activeNewlyweds = activeNewlywedsService.getOneByStoreId(activeNewlywedsRecords.getStoreId());
|
||||
activeNewlywedsRecords.setActiveNewlywedsId(activeNewlyweds.getId());
|
||||
|
@ -114,10 +114,14 @@ public class CardFavorableServiceImpl extends ServiceImpl<CardFavorableMapper, C
|
||||
if (CollectionUtils.isNotEmpty(list)){
|
||||
for (CardFavorableRecord cardFavorableRecord : list) {
|
||||
for (CardFavorable record : records) {
|
||||
if(!cardFavorableRecord.getCardFavorableId().equals(record.getId())){
|
||||
if(record.getClaimRule().equals("0") && !cardFavorableRecord.getCardFavorableId().equals(record.getId())){
|
||||
CardFavorable one = getById(record.getId());
|
||||
cardFavorableArrayList.add(one);
|
||||
}
|
||||
if (record.getClaimRule().equals("1")){
|
||||
//查询当天有没有领取这张券
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -86,9 +86,9 @@
|
||||
|
||||
<view class="station-title" style="display: flex;justify-content: space-between;">
|
||||
{{store.name}}{{store.description ? "("+store.description+")" : ""}}
|
||||
<!-- <view class="" @click="goChooseAddress" style="width: 22%;font-size: 14px;font-weight: 400;">
|
||||
<view class="" @click="goChooseAddress" style="width: 22%;font-size: 14px;font-weight: 400;">
|
||||
<view>切换位置 <uni-icons type="right" color="#304fff" size="16"></uni-icons> </view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view><!--顺通石化加油站(工业南路站)-->
|
||||
<view style="display: flex;">
|
||||
<view class="bule-icon" v-if="welfare.length!=0" v-for="(item,index) in welfare" :key="index">
|
||||
@ -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
|
||||
@ -302,7 +306,8 @@ import { callWithErrorHandling } from "vue"
|
||||
url: 'business/marketingActivity/activeNewlywedsRecords',
|
||||
method: 'post',
|
||||
data: {
|
||||
storeId: this.storeId
|
||||
storeId: this.storeId,
|
||||
chainStoreId: this.chainStoreId,
|
||||
}
|
||||
}).then(res => {
|
||||
console.log("11111" + res)
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user