This commit is contained in:
Vinjor 2024-09-26 13:45:56 +08:00
commit e71c53ef96
31 changed files with 777 additions and 156 deletions

View File

@ -124,3 +124,14 @@
.el-pagination.is-background .el-pager li:hover{
color: #FF9655 !important;/*hover时候的文字颜色*/
}
/* 修改选中状态的背景色 */
.el-radio .el-radio__input.is-checked .el-radio__inner {
background-color: #FF9655; /* 你想要的任何颜色 */
border-color: #FF9655;
}
/* 修改选中状态的文字颜色 */
.el-radio .el-radio__input.is-checked+ .el-radio__label {
color: #FF9655 !important; /* 文字颜色 */
}

View File

@ -56,7 +56,7 @@
</div>
</div>
<div style="margin-top: 20px">
<el-form-item label="时间段" prop="suitTimeSlotFront" label-width="70px" >
<el-form-item label="时间段" prop="suitTimeSlot" label-width="70px" >
<el-time-picker
v-model="ruleForm.suitTimeSlotFront"
format="HH:mm"
@ -269,8 +269,9 @@ export default {
activeTimeType: [
{required: true, message: '活动时间不能为空', trigger: 'blur'},
],
suitTimeSlotFront: [
{required: true, message: '时间段不能为空', trigger: 'blur'},
//
suitTimeSlot: [
{ required:true, validator: this.validateTimeRange, trigger: 'change' }
],
userGradeIds: [
{required: true, message: '适用会员等级不能为空', trigger: 'blur'},
@ -298,6 +299,23 @@ export default {
this.listUserGrade()
},
methods: {
//
validateTimeRange(rule, value, callback) {
const { suitTimeSlotFront, suitTimeSlotAfter } = this.ruleForm;
if (!suitTimeSlotFront && !suitTimeSlotAfter) {
callback(new Error('请选择开始时间和结束时间'));
} else if (!suitTimeSlotFront) {
callback(new Error('请选择开始时间'));
} else if (!suitTimeSlotAfter) {
callback(new Error('请选择结束时间'));
} else if (suitTimeSlotFront >= suitTimeSlotAfter) {
callback(new Error('结束时间必须晚于开始时间'));
} else {
callback();
}
},
Typeindex3(index) {
this.tindex3 = index
this.ruleForm.suitTimeSlotType = index

View File

@ -647,7 +647,7 @@
<!-- 添加或修改对话框 -->
<el-dialog :title="title" :visible.sync="open2" append-to-body width="42%">
<el-form ref="form2" :model="form2" :rules="rules" label-width="120px">
<el-form ref="form2" :model="form2" :rules="rules" label-width="120px">
<el-form-item label="会员等级" prop="gradeId">
<el-select v-model="form2.gradeId" placeholder="请选择会员等级" style="width: 100%">
@ -677,30 +677,25 @@
</el-form-item>
<el-form-item label="节假日是否通用" prop="holidayIsUse">
<div class="d-s">
<div class="icon-type" v-for="(item,index) in useTypeList" :key="index"
:class="{ 'acvtive' : index === tindex1 }" @click="Typeindex1(index)">
<img src="../../assets/images/wx.png" style="width: 20px;height: 20px" v-if="index != tindex1">
<img src="../../assets/images/xz.png" style="width: 20px;height: 20px" v-if="index == tindex1">
{{ item }}
</div>
</div>
<el-radio-group v-model="form2.holidayIsUse">
<el-radio :label="'0'">可用</el-radio>
<el-radio :label="'1'">不可用</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="适用日期" prop="suitDateType">
<div class="d-s">
<div class="icon-type" v-for="(item,index) in dateTypeList" :key="index"
:class="{ 'acvtive' : index === tindex2 }" @click="Typeindex2(index)">
<img src="../../assets/images/wx.png" style="width: 20px;height: 20px" v-if="index != tindex1">
<img src="../../assets/images/xz.png" style="width: 20px;height: 20px" v-if="index == tindex1">
{{ item }}
</div>
<el-radio-group v-model="form2.suitDateType">
<el-radio :label="'0'">永久</el-radio>
<el-radio :label="'1'">自定义</el-radio>
</el-radio-group>
<el-date-picker
v-model="form2.suitDateFront"
style="width: 160px"
style="width: 160px;margin-left: 10px;"
type="date"
placeholder="开始日期">
</el-date-picker>
<div style="margin: 0 10px;"></div>
<el-date-picker
v-model="form2.suitDateAfter"
style="width: 160px"
@ -709,19 +704,25 @@
</el-date-picker>
</div>
</el-form-item>
<el-form-item label="适用时间段" prop="suitTimeSlotType">
<div>
<div class="icon-type" v-for="(item,index) in weekMonthTypeList" :key="index"
:class="{ 'acvtive' : index === tindex3 }" @click="Typeindex3(index)">
<img src="../../assets/images/wx.png" style="width: 20px;height: 20px" v-if="index != tindex3">
<img src="../../assets/images/xz.png" style="width: 20px;height: 20px" v-if="index == tindex3">
{{ item }}
<el-checkbox-group v-model="weekDay" v-if="item=='每周'" style="margin-left: 20px" :disabled="tindex3!=0">
<el-checkbox v-for="(item,index) in weekList" :key="index" :label="item"></el-checkbox>
</el-checkbox-group>
<el-select v-model="monthDay" placeholder="请选择每月固定日期" multiple v-if="item=='每月'"
:disabled="tindex3!=1"
style="margin-left: 20px">
<el-form-item label="时间段设置" prop="availableOrUn">
<el-radio-group v-model="form2.availableOrUn">
<el-radio :label="'0'">适用时间段</el-radio>
<el-radio :label="'1'">不可用时间段</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item v-if="form2.availableOrUn == '0'" label="适用时间段" prop="suitTimeSlotType">
<div style="width: 100px;margin-top: 10px">
<el-radio-group v-model="form2.suitTimeSlotType">
<div style="display: flex; width: 500px;margin-bottom: 15px;">
<el-radio :label="'1'">每周</el-radio>
<el-checkbox-group v-model="weekDay" style="margin-left: 20px" :disabled="form2.suitTimeSlotType!='1'">
<el-checkbox v-for="(item,index) in weekList" :key="index" :label="item"></el-checkbox>
</el-checkbox-group>
</div>
<el-radio :label="'2'">每月
<el-select :disabled="form2.suitTimeSlotType!='2'" v-model="monthDay" placeholder="请选择每月固定日期" multiple style="margin-left: 20px">
<el-option
v-for="item in 31"
:key="item.value"
@ -729,7 +730,8 @@
:value="item">
</el-option>
</el-select>
</div>
</el-radio>
</el-radio-group>
</div>
<div style="margin-top: 20px">
<el-form-item label="时间段" prop="suitTimeSlotFront" label-width="70px">
@ -749,28 +751,25 @@
</el-form-item>
</div>
</el-form-item>
<el-form-item label="指定不可用日期" prop="noUseTimeType">
<el-form-item v-else label="不适用时间段" prop="noUseTimeType">
<div>
<div class="icon-type" v-for="(item,index) in weekMonthTypeList" :key="index"
:class="{ 'acvtive' : index === tindex4 }" @click="Typeindex4(index)">
<img src="../../assets/images/wx.png" style="width: 20px;height: 20px" v-if="index != tindex4">
<img src="../../assets/images/xz.png" style="width: 20px;height: 20px" v-if="index == tindex4">
{{ item }}
<el-checkbox-group v-model="weekDay1" :disabled="tindex4!=0" v-if="item=='每周'"
style="margin-left: 20px">
<el-checkbox v-for="(item,index) in weekList" :key="index" :label="item"></el-checkbox>
</el-checkbox-group>
<el-select v-model="monthDay1" placeholder="请选择每月固定日期" multiple v-if="item=='每月'"
:disabled="tindex4!=1"
style="margin-left: 20px">
<el-option
v-for="item in 31"
:key="item"
:label="item+'日'"
:value="item+''">
</el-option>
</el-select>
</div>
<el-radio-group v-model="form2.noUseTimeType">
<el-radio :label="'1'">每周
<el-checkbox-group v-model="weekDay1" style="margin-left: 20px" :disabled="form2.noUseTimeType!='1'">
<el-checkbox v-for="(item,index) in weekList" :key="index" :label="item"></el-checkbox>
</el-checkbox-group>
</el-radio>
<el-radio :label="'2'">每月
<el-select :disabled="form2.noUseTimeType!='2'" v-model="monthDay1" placeholder="请选择每月固定日期" multiple style="margin-left: 20px">
<el-option
v-for="item in 31"
:key="item.value"
:label="item+'日'"
:value="item">
</el-option>
</el-select>
</el-radio>
</el-radio-group>
</div>
<div style="margin-top: 20px">
<el-form-item label="时间段" prop="noUseTimeFront" label-width="70px">
@ -1107,7 +1106,9 @@ export default {
catchTypeList: [],
//
open: false,
form2: {},
form2: {
availableOrUn:'0'
},
open2: false,
gradeList: [],
@ -1178,6 +1179,9 @@ export default {
total2: 0,
//
rules: {
availableOrUn:[
{required: true, message: "不能为空", trigger: "blur"},
],
grade: [
{required: true, message: "升降顺序不能为空", trigger: "blur"},
{pattern: /^[0-9]{1,10}$/, message: `必须正整数`, trigger: 'blur'}
@ -1244,14 +1248,17 @@ export default {
suitTimeSlotType: [
{required: true, message: "请选择适用时间段", trigger: "blur"},
],
noUseTimeType: [
{required: true, message: "请选择不适用时间段", trigger: "blur"},
],
suitTimeSlotFront: [
{required: true, message: "请选择适用时间段", trigger: "blur"},
],
noUseDate: [
{required: true, message: "请选择指定不可用日期", trigger: "blur"},
{required: true, message: "请选择不适用时间段", trigger: "blur"},
],
noUseTimeFront: [
{required: true, message: "请选择指定不可用日期", trigger: "blur"},
{required: true, message: "请选择不适用时间段", trigger: "blur"},
],
}
};
@ -1374,10 +1381,11 @@ export default {
handleAdd2() {
this.form2 = {
usePaymentWay: [],
holidayIsUse: 0,
suitDateType: 0,
suitTimeSlotType: 0,
noUseTimeType: 0,
holidayIsUse: '0',
suitDateType: '0',
suitTimeSlotType: '0',
noUseTimeType: '0',
availableOrUn:'0'
}
this.weekDay = []
this.monthDay = []

View File

@ -0,0 +1,41 @@
package com.fuint.business.fleet.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.fleet.service.IFleetLinesChangeService;
import com.fuint.business.fleet.vo.FleetLinesChangeVo;
import com.fuint.business.order.dto.CardBalanceChangeDto;
import com.fuint.business.order.vo.CardBalanceChangeVo;
import com.fuint.framework.web.BaseController;
import com.fuint.framework.web.ResponseObject;
import io.lettuce.core.dynamic.annotation.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestParam;
/**
* <p>
* 车队额度变化表 前端控制器
* </p>
*
* @author dianliang
* @since 2024-09-25
*/
@Controller
@RequestMapping("/fleet-lines-change")
public class FleetLinesChangeController extends BaseController {
@Autowired
private IFleetLinesChangeService fleetLinesChangeService;
public ResponseObject queryByPageUni(@RequestParam(value = "page",defaultValue = "1") Integer page,
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
@Param("integralDetail") FleetLinesChangeVo fleetLinesChangeVo) {
Page page1 = new Page(page, pageSize);
IPage<FleetLinesChangeVo> iPageList = fleetLinesChangeService.queryByPageUni(page1, fleetLinesChangeVo);
return getSuccessResult(iPageList);
}
}

View File

@ -0,0 +1,70 @@
package com.fuint.business.fleet.entity;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* <p>
* 车队额度变化表
* </p>
*
* @author dianliang
* @since 2024-09-25
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("fleet_lines_change")
@ApiModel(value="FleetLinesChange对象", description="车队额度变化表")
public class FleetLinesChange implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "主键")
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@ApiModelProperty(value = "车队id")
private Integer fleetId;
@ApiModelProperty(value = "店铺id")
private Integer storeId;
@ApiModelProperty(value = "调整类型0增加、1扣除")
private String adjustType;
@ApiModelProperty(value = "调整额度")
private BigDecimal adjustLimit;
@ApiModelProperty(value = "创建人")
private String createBy;
@ApiModelProperty(value = "创建时间")
private LocalDateTime createTime;
@ApiModelProperty(value = "更新人")
private String updateBy;
@ApiModelProperty(value = "更新时间")
private LocalDateTime updateTime;
@ApiModelProperty(value = "剩余额度")
private BigDecimal remainingCreditLimit;
@ApiModelProperty(value = "被调整额度的用户id")
private Integer userId;
@ApiModelProperty(value = "订单id")
private Integer orderId;
}

View File

@ -0,0 +1,20 @@
package com.fuint.business.fleet.mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.fleet.entity.FleetLinesChange;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fuint.business.fleet.vo.FleetLinesChangeVo;
/**
* <p>
* 车队额度变化表 Mapper 接口
* </p>
*
* @author dianliang
* @since 2024-09-25
*/
public interface FleetLinesChangeMapper extends BaseMapper<FleetLinesChange> {
IPage<FleetLinesChangeVo> queryAllByLimit(Page page1, FleetLinesChangeVo fleetLinesChangeVo);
}

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.fuint.business.fleet.mapper.FleetLinesChangeMapper">
</mapper>

View File

@ -6,6 +6,8 @@ import com.fuint.business.fleet.entity.FleetInfo;
import com.fuint.business.fleet.vo.FleetInfoUniVo;
import com.fuint.business.fleet.vo.FleetInfoVo;
import java.util.List;
/**
* 车队信息(FleetInfo)表服务接口
*
@ -65,7 +67,7 @@ public interface FleetInfoService {
* @param storeId
* @return
*/
FleetInfoUniVo queryByStoreId(Integer storeId);
List<FleetInfoUniVo> queryByStoreId(Integer storeId);
/**
* 新增车队信息(小程序)

View File

@ -0,0 +1,20 @@
package com.fuint.business.fleet.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.fleet.entity.FleetLinesChange;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fuint.business.fleet.vo.FleetLinesChangeVo;
/**
* <p>
* 车队额度变化表 服务类
* </p>
*
* @author dianliang
* @since 2024-09-25
*/
public interface IFleetLinesChangeService extends IService<FleetLinesChange> {
IPage<FleetLinesChangeVo> queryByPageUni(Page page1, FleetLinesChangeVo fleetLinesChangeVo);
}

View File

@ -1,6 +1,7 @@
package com.fuint.business.fleet.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@ -35,9 +36,11 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.Random;
import java.util.stream.Collectors;
/**
@ -219,22 +222,29 @@ public class FleetInfoServiceImpl extends ServiceImpl<FleetInfoMapper,FleetInfo>
* @return
*/
@Override
public FleetInfoUniVo queryByStoreId(Integer storeId) {
public List<FleetInfoUniVo> queryByStoreId(Integer storeId) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
FleetInfo fleetInfo = baseMapper.selectOne(new LambdaQueryWrapper<FleetInfo>()
.eq(FleetInfo::getStoreId, storeId)
.eq(FleetInfo::getUserId, nowAccountInfo.getId())
.last("limit 1"));
if (ObjectUtil.isEmpty(fleetInfo)) {
throw new RuntimeException("该会员未绑定车队");
//查询当前登录人的车队信息
List<FleetMember> fleetMembers = fleetMemberMapper.selectList(new LambdaQueryWrapper<FleetMember>()
.eq(FleetMember::getStoreId, storeId)
.eq(FleetMember::getUserId, nowAccountInfo.getId()));
//获取所在车队的id集合
List<Integer> fleetIds = fleetMembers.stream().map(FleetMember::getFleetId).collect(Collectors.toList());
if (CollUtil.isEmpty(fleetIds)) {
throw new RuntimeException("未绑定车队");
}
// FleetInfo fleetInfo = baseMapper.selectById(fleetMember.getFleetId());
FleetInfoUniVo fleetInfoUniVo = BeanUtil.copyProperties(fleetInfo, FleetInfoUniVo.class);
fleetInfoUniVo.setStoreName(mtStoreMapper.selectById(storeId).getName());
return fleetInfoUniVo;
List<FleetInfo> fleetInfos = baseMapper.selectList(new LambdaQueryWrapper<FleetInfo>()
.eq(FleetInfo::getStoreId, storeId)
.in(FleetInfo::getId, fleetIds));
List<FleetInfoUniVo> fleetInfoUniVos = new ArrayList<>();
for (FleetInfo fleetInfo : fleetInfos) {
FleetInfoUniVo fleetInfoUniVo = BeanUtil.copyProperties(fleetInfo, FleetInfoUniVo.class);
fleetInfoUniVo.setStoreName(mtStoreMapper.selectById(storeId).getName());
fleetInfoUniVos.add(fleetInfoUniVo);
}
return fleetInfoUniVos;
}
/**

View File

@ -0,0 +1,42 @@
package com.fuint.business.fleet.service.impl;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.fleet.entity.FleetLinesChange;
import com.fuint.business.fleet.mapper.FleetLinesChangeMapper;
import com.fuint.business.fleet.service.IFleetLinesChangeService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.business.fleet.vo.FleetLinesChangeVo;
import com.fuint.common.dto.AccountInfo;
import com.fuint.common.util.TokenUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* <p>
* 车队额度变化表 服务实现类
* </p>
*
* @author dianliang
* @since 2024-09-25
*/
@Service
public class FleetLinesChangeServiceImpl extends ServiceImpl<FleetLinesChangeMapper, FleetLinesChange> implements IFleetLinesChangeService {
@Autowired
private FleetLinesChangeMapper fleetLinesChangeMapper;
@Override
public IPage<FleetLinesChangeVo> queryByPageUni(Page page1, FleetLinesChangeVo fleetLinesChangeVo) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
fleetLinesChangeVo.setUserId(nowAccountInfo.getId());
if (ObjectUtil.isNotEmpty(fleetLinesChangeVo.getStartTime())) {
DateTime parse = DateUtil.parse(fleetLinesChangeVo.getStartTime(), "yyyy-MM");
fleetLinesChangeVo.setStartTime(DateUtil.beginOfMonth(parse).toString());
fleetLinesChangeVo.setEndTime(DateUtil.endOfMonth(parse).toString());
}
return this.baseMapper.queryAllByLimit(page1, fleetLinesChangeVo);
}
}

View File

@ -0,0 +1,23 @@
package com.fuint.business.fleet.vo;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fuint.business.fleet.entity.FleetLinesChange;
import lombok.Data;
@Data
public class FleetLinesChangeVo extends FleetLinesChange {
/**
* 用户名称
*/
private String userName;
/**
* 操作人名称
*/
private String creatName;
@JsonIgnore
private String startTime;
@JsonIgnore
private String endTime;
}

View File

@ -128,5 +128,15 @@ public class IntegralGift extends BaseEntity {
*/
private Integer storeId;
/**
* 兑换说明
*/
private String exchangeInstructions;
/**
* 使用须知
*/
private String useInstructions;
}

View File

@ -1,5 +1,6 @@
package com.fuint.business.marketingActivity.cardGift.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
@ -12,6 +13,9 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.business.marketingActivity.cardGift.mapper.CardGiftMapper;
import com.fuint.business.marketingActivity.cardGift.entity.CardGift;
import com.fuint.business.marketingActivity.cardGift.service.CardGiftService;
import com.fuint.business.marketingActivity.cardGift.vo.CardGiftVo;
import com.fuint.business.marketingActivity.cardGiftActive.entity.CardGiftActive;
import com.fuint.business.marketingActivity.cardGiftActive.mapper.CardGiftActiveMapper;
import com.fuint.business.member.entity.LJStaff;
import com.fuint.business.member.service.ILJStaffService;
import com.fuint.business.oilDepotConfiguration.entity.OilDepotConfig;
@ -30,6 +34,7 @@ import com.fuint.common.util.TokenUtil;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
@ -64,6 +69,8 @@ public class CardGiftServiceImpl extends ServiceImpl<CardGiftMapper, CardGift> i
private LJUserService ljUserService;
@Resource
private ILJStaffService ljStaffService;
@Autowired
private CardGiftActiveMapper cardGiftActiveMapper;
/**
* 新增数据
@ -246,7 +253,23 @@ public class CardGiftServiceImpl extends ServiceImpl<CardGiftMapper, CardGift> i
LambdaQueryWrapper<CardGift> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(CardGift::getUserId,userId);
queryWrapper.orderByDesc(CardGift::getUpdateTime);
return page(page,queryWrapper);
IPage page1 = page(page, queryWrapper);
List<CardGiftVo> cardGiftVos = new ArrayList<>();
for (Object record : page1.getRecords()) {
CardGiftVo cardGiftVo = BeanUtil.copyProperties(record, CardGiftVo.class);
CardGiftActive cardGiftActive = cardGiftActiveMapper.selectOne(new LambdaQueryWrapper<CardGiftActive>()
.eq(CardGiftActive::getId, cardGiftVo.getActiveId())
.last("limit 1"));
if (ObjectUtils.isNotEmpty(cardGiftActive)) {
cardGiftVo.setActiveName(cardGiftActive.getActiveName());
}
cardGiftVos.add(cardGiftVo);
}
page1.setRecords(cardGiftVos);
//查询兑换记录的活动名称
return page1;
}
/**

View File

@ -0,0 +1,9 @@
package com.fuint.business.marketingActivity.cardGift.vo;
import com.fuint.business.marketingActivity.cardGift.entity.CardGift;
import lombok.Data;
@Data
public class CardGiftVo extends CardGift {
private String activeName;
}

View File

@ -89,6 +89,7 @@ public class MtUserExpressAddressController extends BaseController {
/**
* 查询默认快递地址
*/
@GetMapping("getDefault")
public ResponseObject getDefault() {
return getSuccessResult(this.mtUserExpressAddressService.getDefault());
}

View File

@ -1,5 +1,6 @@
package com.fuint.business.userManager.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.userManager.entity.MtUserExpressAddress;
@ -14,7 +15,7 @@ import java.util.List;
* @author makejava
* @since 2023-11-09 09:31:12
*/
public interface MtUserExpressAddressMapper {
public interface MtUserExpressAddressMapper extends BaseMapper<MtUserExpressAddress> {
/**
* 通过ID查询单条数据

View File

@ -1,8 +1,10 @@
package com.fuint.business.userManager.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.business.userManager.entity.MtUserExpressAddress;
import com.fuint.business.userManager.mapper.MtUserExpressAddressMapper;
import com.fuint.business.userManager.service.MtUserExpressAddressService;
@ -21,7 +23,7 @@ import java.util.List;
* @since 2023-11-09 09:31:33
*/
@Service("mtUserExpressAddressService")
public class MtUserExpressAddressServiceImpl implements MtUserExpressAddressService {
public class MtUserExpressAddressServiceImpl extends ServiceImpl<MtUserExpressAddressMapper,MtUserExpressAddress> implements MtUserExpressAddressService {
@Resource
private MtUserExpressAddressMapper mtUserExpressAddressMapper;
@ -101,8 +103,10 @@ public class MtUserExpressAddressServiceImpl implements MtUserExpressAddressServ
@Override
public MtUserExpressAddress getDefault() {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
return null;
QueryWrapper queryWrapper = new QueryWrapper<>();
queryWrapper.eq("user_id", nowAccountInfo.getId());
queryWrapper.eq("if_default", "1");
return baseMapper.selectOne(queryWrapper);
}
@Override

View File

@ -430,6 +430,7 @@
{{ payForm.realyPayBills }}
</div>
<!-- <div style="text-align: center;margin-bottom: 10px">赠送金额</div> -->
<div v-if="payForm.paymentType !== 'CASH' ">
<div>
<el-input v-model="payForm.authCode"
@ -554,7 +555,12 @@ export default {
//
oilLiter:0,
openConfirm:false,
//
isPay:false,
isPaySuccess:false,
isAwait: false,
rechargeBalCard:false,
isQuery:true,
loading:false,
//
collectionImg: '',

View File

@ -203,6 +203,13 @@
"style": {
"navigationBarTitleText": "卡包"
}
},
{
"path": "userRegister/index",
"style": {
"navigationBarTitleText": "会员注册"
}
}
]
@ -342,8 +349,7 @@
{
"path": "myorder/myorder",
"style": {
"navigationBarTitleText": "我的订单",
"navigationStyle": "custom"
"navigationBarTitleText": "消费记录"
}
},
{

View File

@ -38,7 +38,7 @@
<image src="../../static/new/n7.png" mode=""></image>
<view class="">每日抽奖</view>
</view>
<view class="_bgox">
<view class="_bgox" @click="goSignIn()">
<image src="../../static/new/n8.png" mode=""></image>
<view class="">签到有礼</view>
</view>
@ -261,6 +261,11 @@
tabbar
},
methods: {
goSignIn(){
uni.navigateTo({
url: '/pagesMy/signIn/index'
})
},
goInvite() {
uni.navigateTo({
url: '/pagesMy/invite/invite'

View File

@ -6,9 +6,9 @@
</view>
<!-- 顶部区域 -->
<view class="my-top">
<view class="dis-box" v-if="userinfo">
<view class="dis">
<view class="touxiang" @click="goSetup">
<view class="dis-box" v-if="!user">
<view class="dis" @click="goSetup()">
<view class="touxiang">
<image src="@/static/icon/icon/newmy.png" mode="aspectFit" style="margin-right: 10px;">
</image>
</view>
@ -19,15 +19,16 @@
</view>
</view>
<view class="dis-box" v-else>
<view class="dis">
<view class="touxiang" @click="goSetup">
<image src="@/static/icon/icon/newmy.png" mode="aspectFit" style="margin-right: 10px;">
</image>
<view class="dis" @click="goSetup()">
<view class="touxiang">
<image v-if="user.avatar" :src="baseUrl+user.avatar" mode="aspectFit"
style="margin-right: 10px;"></image>
<image v-else src="@/static/icon/icon/newmy.png" mode="aspectFit"
style="margin-right: 10px;"></image>
</view>
<view class="">
<view class="user-tel">用户昵称</view>
<view class="user-name">手机号: xxxxxxxxxxxx</view>
<view class="user-tel">{{user.name}}</view>
<view class="user-name">手机号: {{user.mobile}}</view>
</view>
</view>
<view class="" @click="goMypages(2)">
@ -46,7 +47,7 @@
<view class="jg-box-nmb">{{countList.length || 0 }}</view>
</view>
<text style="color: #999999;">|</text>
<view class="jg-box" @click="toCoupons">
<view class="jg-box" @click="toCoupons()">
<view class="jg-box-title">优惠券</view>
<view class="jg-box-nmb">{{cardsList.length || 0 }}</view>
</view>
@ -95,7 +96,7 @@
积分商城
</view>
</view>
<view class="centenr-sx">
<view class="centenr-sx" @click="goSetup()">
<view class="centenr-img">
<image src="@/static/icon/icon/newmy5.png"></image>
</view>
@ -103,7 +104,7 @@
个人资料
</view>
</view>
<view class="centenr-sx">
<view class="centenr-sx" @click="goInvte()">
<view class="centenr-img">
<image src="@/static/icon/icon/newmy6.png"></image>
</view>
@ -111,7 +112,7 @@
邀请有礼
</view>
</view>
<view class="centenr-sx">
<view class="centenr-sx" @click="goCar()">
<view class="centenr-img">
<image src="@/static/icon/icon/newmy7.png"></image>
</view>
@ -127,7 +128,7 @@
成长值记录
</view>
</view>
<view class="centenr-sx">
<view class="centenr-sx" @click="goCard()">
<view class="centenr-img">
<image src="@/static/icon/icon/newmy9.png"></image>
</view>
@ -135,12 +136,12 @@
礼品卡
</view>
</view>
<view class="centenr-sx">
<view class="centenr-sx" @click="goFleet()">
<view class="centenr-img">
<image src="@/static/icon/icon/newmy10.png"></image>
</view>
<view class="centenr-size">
副卡管理
车队管理
</view>
</view>
<view class="centenr-sx">
@ -151,7 +152,7 @@
我的奖品
</view>
</view>
<view class="centenr-sx">
<view class="centenr-sx" @click="goFeedback()">
<view class="centenr-img">
<image src="@/static/icon/icon/newmy12.png"></image>
</view>
@ -175,11 +176,9 @@
return {
query: {
storeId: '',
chainStoreId: '',
couponType: '',
useStatus: 0,
pageNo: 1,
pageSize: 10
status: 0,
page: 1,
pageSize: 1000
},
querys: {
mtUserId: '',
@ -299,7 +298,7 @@
url: 'business/userManager/user/getUser',
method: 'get',
}).then(res => {
console.log(res, 1541);
console.log(res, 302);
if (res.data) {
this.user = res.data
uni.setStorageSync('userId', res.data.id)
@ -376,12 +375,17 @@
},
goCard() {
uni.navigateTo({
url: '/pagesMy/CardManagement/CardManagement'
url: '/pagesHome/RechargeRecords/RechargeRecords'
})
},
govip() {
goCar() {
uni.navigateTo({
url: '/pagesMy/VIP/vip'
url: '/pagesMy/licensePlate/index'
})
},
goFleet() {
uni.navigateTo({
url: '/pagesMy/fleetInfo/index'
})
},
goFeedback() {
@ -399,12 +403,12 @@
params: this.query
}).then(res => {
if (res.data) {
this.cardBalance = res.data.cardBalance,
this.myPoints = res.data.points,
/* if (res.data.refuelMoney!=null && res.data.refuelMoney!=""){
this.refuelMoney = JSON.parse(res.data.refuelMoney);
} */
this.cardBalance = res.data.cardBalance
this.myPoints = res.data.points
/* if (res.data.refuelMoney!=null && res.data.refuelMoney!=""){
this.refuelMoney = JSON.parse(res.data.refuelMoney);
} */
this.refuelMoney = JSON.parse(res.data.refuelMoney);
console.log("333333333333333", this.refuelMoney);
}
})
@ -414,7 +418,7 @@
return;
}
request({
url: 'business/marketingActivity/cardFavorable/applet',
url: 'cardCouponUser/queryPage',
method: 'get',
params: this.query
}).then(res => {

View File

@ -8,7 +8,7 @@
</view>
<!-- 顶部区域 -->
<view class="box-xianze" v-for="(item,index) in dataList" :key="index">
<view class="">
<view class="" @click="choose(item)">
<view style="display: flex;align-items: center;margin-bottom: 5px;">
<view class="">{{item.name || '--'}}</view>
<view style="margin: 0 10px;" v-if="item.sex==0"> 先生</view>
@ -97,7 +97,6 @@
if (item.ifDefault == 1) {
item.checked = true
}
this.$set(item, 'checked', item.checked); //
})
console.log(res, this.dataList, 98);
this.$forceUpdate()

View File

@ -34,18 +34,18 @@
<view class="hui-time">
<view style="color: #FC1708; font-size: 14px;">
<span
v-if="item.exchangeMethod == '积分' || item.exchangeMethod == '积分+金额' || item.exchangeMethod == '积分+加钱购'">{{item.exchangePoints}}</span>
v-if="item.exchangeMethod == '积分' || item.exchangeMethod == '积分+金额' || item.exchangeMethod == '积分+加钱购'">{{item.exchangePoints}}积分</span>
<span v-if="item.exchangeMethod == '积分+金额'">+</span>
<span
v-if="item.exchangeMethod == '金额' || item.exchangeMethod == '积分+金额'">{{item.exchangeAmount}}</span>
<span>积分</span>
<!-- <span>积分</span> -->
</view>
</view>
<view style="display: flex;align-items: center;justify-content: space-between;">
<view class="hui_">
3.5
{{item.market || 0}}
</view>
<view class="anniux">
<text v-if="!item.remainingInventory || item.remainingInventory==0"
@ -109,7 +109,7 @@
methods: {
transferIndex(index, categoryId) {
this.qhindex = index
if (categoryId == undefined || categoryId == null) {
if (!categoryId) {
this.query.categoryId = ''
} else {
this.query.categoryId = categoryId
@ -139,6 +139,9 @@
}).then((res) => {
if (res.code == 200) {
this.integralGiftList = res.data.records
console.log(res.data, 142);
}else{
this.integralGiftList = []
}
})
},

View File

@ -6,18 +6,22 @@
<view class="">积分余额</view>
<view class="d-s">{{cardBalance.points || 0}}<u-icon name="arrow-right"></u-icon> </view>
</view>
<view class="f-box" v-for="(item,index) in 3" :key="index" @click="goDetails()">
<view class="f-top">中建锦绣二期站可用</view>
<view class="f-box" v-for="(item,index) in integralGiftList" :key="index" @click="goDetails(item)">
<view class="f-top">{{item.storeName}}可用</view>
<view class="f-bs">
<image src="../../static/logo.png" style="width: 60px; height: 60px; "></image>
<image v-if="item.coverImage" :src="baseUrl+item.coverImage" mode="aspectFit"
style="width: 60px; height: 60px; "></image>
<image v-else src="../../static/logo.png" style="width: 60px; height: 60px; "></image>
<view class="r-box">
<view class="">
<view class="m_">虚拟</view>
<view class="m_">{{item.giftName}}</view>
<view class="p_">300ml瓶装</view>
<view class="q_">兑换券</view>
</view>
<view class="">
<view class="an_">100积分</view>
<view class="an_">
{{item.exchangePoints}}积分
</view>
<u-line-progress :percentage="50" :showText="false" height="6"
activeColor="#FA6400"></u-line-progress>
<view class="hui_">券已领70%</view>
@ -26,15 +30,21 @@
</view>
</view>
</view>
<u-empty v-if="integralGiftList.length == 0" style="margin: 5px auto;" mode="data"
icon="http://cdn.uviewui.com/uview/empty/data.png">
</u-empty>
</view>
</view>
</template>
<script>
import config from '@/config'
import request from '../../utils/request'
export default {
data() {
return {
baseUrl: config.baseUrl,
query: {
chainStoreId: '',
couponType: '',
@ -43,13 +53,66 @@
pageSize: 10
},
cardBalance: {},
queryParam: {
storeId: uni.getStorageSync('storeId'),
status: '启用',
categoryId: '',
giftName: '',
deliveryMethod: '',
page: 1,
pageSize: 30
},
integralGiftList: [],
total: 0
}
},
onPullDownRefresh() {
//
this.queryParam = {
storeId: uni.getStorageSync('storeId'),
status: '启用',
categoryId: '',
giftName: '',
deliveryMethod: '',
page: 1,
pageSize: 30
}
this.getIntegralGiftList()
uni.stopPullDownRefresh()
},
onReachBottom() {
//
if (this.queryParam.page >= this.total) {
uni.showToast({
title: '没有下一页数据',
icon: 'none'
})
} else {
this.queryParam.page++
this.getIntegralGiftList()
}
},
onShow() {
this.query.chainStoreId = uni.getStorageSync('chainStoreId');
this.getUserBalance()
this.getIntegralGiftList()
},
methods: {
//
getIntegralGiftList() {
request({
url: 'business/integral/integralGift/queryByPageByStoreId',
method: 'get',
params: this.queryParam
}).then((res) => {
if (res.code == 200) {
this.integralGiftList = res.data.records
this.total = res.data.total
console.log(res, 100);
}
})
},
//
getUserBalance() {
request({
@ -67,7 +130,7 @@
url: '/pagesMy/integral/integral'
})
},
goDetails() {
goDetails(data) {
uni.navigateTo({
url: '/pagesHome/PointsRedemption/details'
})

View File

@ -12,13 +12,20 @@
</view>
<view class="bai-box">
<view class="box-title">{{goodsInfo.giftName}}</view>
<view class="price_num">100积分</view>
<view class="price_num">
<span
v-if="goodsInfo.exchangeMethod == '积分' || goodsInfo.exchangeMethod == '积分+金额' || goodsInfo.exchangeMethod == '积分+加钱购'">{{goodsInfo.exchangePoints}}积分</span>
<span v-if="goodsInfo.exchangeMethod == '积分+金额'">+</span>
<span
v-if="goodsInfo.exchangeMethod == '金额' || goodsInfo.exchangeMethod == '积分+金额'">{{goodsInfo.exchangeAmount}}</span>
</view>
<view class="dt-box">
<view class="hui_">
3.5
{{goodsInfo.market}}
</view>
<view class="or_size">
门店自提
<view class="or_size" v-if="goodsInfo.deliveryMethod">
{{JSON.parse(goodsInfo.deliveryMethod)}}
</view>
</view>
</view>
@ -64,6 +71,7 @@
}
})
uni.$emit('un')
console.log(this.goodsInfo,67);
},
methods: {

View File

@ -13,16 +13,16 @@
<view class="gang" v-if="qhindex == index"></view>
</view>
</scroll-view> -->
<view class="box-bai" v-if="qhindex == 0" @click="goAddress()">
<view class="box-bai" v-if="qhindex == 0" @click="goAdd()">
<view class="dis">
<view class="boximg">
<image src="../../static/imgs/telicon.png"
style="width: 30px; height: 30px;margin-right: 10px; "></image>
</view>
<view style="display: flex;align-items: center;">
<view class="">收货人姓名</view>
<view class="">{{addrInfo.name || '--'}}</view>
<view class="hui-time">
13583028521
{{addrInfo.mobile || '--'}}
</view>
</view>
@ -132,7 +132,7 @@
allAmout: 0,
orderInfo: {},
addrInfo: {
address: ''
name:''
},
appltType: uni.getStorageSync("appltType"),
shippingType: '',
@ -145,7 +145,7 @@
{
text: '快递配送'
}
]
],
}
},
@ -168,32 +168,31 @@
},
onShow() {
uni.$on('chooseAddr', (data) => {
this.addrInfo = data
})
uni.$emit('unChooseAddr')
//
if (!this.addrInfo.address) {
this.getAddr()
if (!this.addrInfo.name ) {
//
this.getAddress()
}
console.log(this.addrInfo,181);
this.transferIndex(0)
// storeId
this.getInfoByStoreId()
//
this.getUserInfoList()
},
methods: {
goAddress(){
uni.navigateTo({
url:'/pagesHome/Address/Address'
getAddress() {
request({
url: "/business/userManager/mtUserExpressAddress/getDefault",
method: 'get',
}).then((res) => {
this.addrInfo = res.data
})
},
//
@ -721,6 +720,7 @@
.hui-time {
font-size: 14px;
color: #666666;
margin-left: 10px;
}
.dis-box {

View File

@ -0,0 +1,204 @@
<template>
<view class="content">
<view class="container">
<view class="card_box"
style="background: url('../../static/imgs/zc.png') no-repeat;background-size: 100% 100%;">
<view style="font-size: 16px;">会员开卡</view>
</view>
<view class="box-zhong">
<view class="box-shang">
激活立享会员特权
</view>
<view class="box-hang">
<view class="dis">必填信息</view>
</view>
<view class="box-hang">
<view class="">手机号</view>
<view>
<input v-model="value" style="text-align: right;"></input>
</view>
</view>
<view class="box-hang">
<view class="dis">选填信息</view>
</view>
<view class="box-hang">
<view class="">姓名</view>
<view>
<input v-model="value" style="text-align: right;"></input>
</view>
</view>
<view class="box-hang">
<view class="">性别</view>
<view>
<input v-model="value" style="text-align: right;"></input>
</view>
</view>
<view class="box-hang">
<view class="">生日</view>
<view>
<input v-model="value" style="text-align: right;"></input>
</view>
</view>
<view class="box-yd" @click="chooseAgree()">
<view class="acvf" v-if="isAgree == false"></view>
<view class="acv" v-else><u-icon name="checkbox-mark" color="#FF9655" size="14"></u-icon></view>
<view class="dis">
我已阅读并同意会员卡信息使用说明
</view>
</view>
<view class="but-sub">提交</view>
<view style="height: 20px;"></view>
</view>
<view class="dis" style="text-align: center;font-size: 12px;display: flex;justify-content: center;">
个人资料将由并仅限百业兴油站使用</view>
</view>
</view>
</template>
<script>
import request from '../../utils/request';
export default {
data() {
return {
title: '',
List: [],
pageNo: 1,
pageSize: 10,
totalPage: '',
value: 'xxxxxx',
isAgree: false
}
},
onLoad() {},
onPullDownRefresh() {
//
uni.stopPullDownRefresh()
},
onReachBottom() {
//
if (this.pageNo >= this.totalPage) {
} else {
this.pageNo++
}
},
components: {
},
methods: {
chooseAgree() {
this.isAgree = !this.isAgree
},
goback() {
uni.navigateBack()
}
}
}
</script>
<style scoped lang="scss">
.content {
background: #f4f5f6;
}
.container {
width: 100%;
height: 100vh;
box-sizing: border-box;
padding-top: 11px;
}
.card_box {
width: 94%;
height: 90px;
margin: 0 auto;
box-sizing: border-box;
padding: 10px;
color: #fff;
font-size: 14px;
text-align: center;
display: flex;
align-items: center;
justify-content: center;
}
.box-zhong {
width: 94%;
margin: 10px auto;
background: #fff;
}
.box-hang {
background-color: white;
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 15px 15px;
border-bottom: 1px solid #f4f5f6;
}
.acvf {
border-radius: 4px;
border: 1px solid #eee;
height: 16px;
width: 16px;
display: flex;
align-items: center;
justify-content: center;
margin-right: 10px;
}
.acv {
border-radius: 4px;
border: 1px solid #FF9655;
height: 16px;
width: 16px;
color: #FF9655;
margin-right: 10px;
display: flex;
align-items: center;
justify-content: center;
}
.dis {
color: #999999;
}
.box-yd {
display: flex;
margin: 20px 0;
padding-left: 10px;
box-sizing: border-box;
font-size: 12px;
}
.box-shang {
color: #333333;
font-weight: bold;
font-size: 16px;
text-align: center;
border-bottom: #EEEEEE 1px dashed;
height: 56px;
line-height: 56px;
}
.box-end {
text-align: center;
margin-top: 10px;
}
.but-sub {
width: 94%;
height: 40px;
line-height: 40px;
margin: 0 auto;
background-color: #FF9655;
color: white;
border-radius: 5px;
text-align: center;
}
</style>

View File

@ -3,7 +3,7 @@
<view class="container">
<view class="my-header">
<view class="my-icons" @click="goBack"> <uni-icons type="left" size="16"></uni-icons> </view>
<view class="my-text">设置</view>
<view class="my-text">个人资料</view>
<view class="my-icons"></view>
</view>
<!-- 顶部区域 -->
@ -13,7 +13,7 @@
<view class="touxiang">
<image class="touxiang" v-if="user.avatar!='' && user.avatar!=null && user.avatar!=undefined"
:src="baseUrl + user.avatar" mode="aspectFit"></image>
<image class="touxiang" v-else src="@/static/imgs/myx.png" mode="aspectFit"></image>
<image class="touxiang" v-else src="@/static/icon/icon/newmy.png" mode="aspectFit"></image>
</view>
</button>
<!-- #endif -->
@ -23,7 +23,7 @@
<view class="touxiang">
<image class="touxiang" v-if="user.avatar!='' && user.avatar!=null && user.avatar!=undefined"
:src="baseUrl + user.avatar" mode="aspectFit"></image>
<image class="touxiang" v-else src="@/static/imgs/myx.png" mode="aspectFit"></image>
<image class="touxiang" v-else src="@/static/icon/icon/newmy.png" mode="aspectFit"></image>
</view>
</button>
<!-- #endif -->
@ -37,7 +37,12 @@
</view>
<view class="box-hang" @click="show1 =!show1">
<view class="">性别</view>
<view class="dis"> <text>{{user.sex}}</text> <uni-icons type="right" size="16"></uni-icons> </view>
<view class="dis">
<text v-if="user.sex==1"></text>
<text v-else-if="user.sex==0"></text>
<text v-else>不详</text>
<uni-icons type="right" size="16"></uni-icons>
</view>
</view>
<view class="box-hang" @click="show=!show">
<view class="">生日</view>
@ -51,13 +56,13 @@
<view class="">会员号</view>
<view class="dis"> <text>{{user.userNo}}</text> <uni-icons type="right" size="16"></uni-icons> </view>
</view> -->
<view class="box-hang" @click="goEdit(2)">
<!-- <view class="box-hang" @click="goEdit(2)">
<view class="">车牌号</view>
<view class="dis">
<text v-if="!user.carNo">未填写</text>
<text v-else>{{user.carNo}}</text> <uni-icons type="right" size="16"></uni-icons>
</view>
</view>
</view> -->
<!-- <view class="box-hang" @click="goEdit(3)">
<view class="">会员支付设置</view>
<view class="dis"> <text>已设置</text> <uni-icons type="right" size="16"></uni-icons> </view>

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB