囤油锁价
This commit is contained in:
parent
29e40a4132
commit
d4b8578e73
@ -48,6 +48,7 @@ public class CardValueRecord extends Model<CardValueRecord> {
|
||||
private Double rechargeBalance;
|
||||
//储值卡赠送金额
|
||||
private Double giftBalance;
|
||||
private Double lockupPrice;
|
||||
//积分
|
||||
private Integer points;
|
||||
//成长值
|
||||
|
@ -76,7 +76,7 @@
|
||||
create_time createTime, chain_store_id chainStoreId, store_id storeId,pay_status payStatus,update_time expireTime FROM card_value_record
|
||||
UNION
|
||||
SELECT '囤油卡' AS recordName,payment_type paymentType,mt_user_id mtUserId, recharge_balance rechargeBalance,
|
||||
income_litres obtain,oil_name oilName,type, create_time createTime, chain_store_id chainStoreId,
|
||||
lockup_price obtain,oil_name oilName,type, create_time createTime, chain_store_id chainStoreId,
|
||||
store_id storeId,pay_status payStatus,expire_time expireTime FROM card_fuel_record
|
||||
UNION
|
||||
SELECT '储值卡' AS recordName,
|
||||
|
@ -0,0 +1,92 @@
|
||||
package com.fuint.business.marketingActivity.favorableRecords.controller;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.marketingActivity.cardValueOrders.entity.CardValueOrders;
|
||||
import com.fuint.business.marketingActivity.favorableRecords.entity.FavorableRecords;
|
||||
import com.fuint.business.marketingActivity.favorableRecords.service.FavorableRecordsService;
|
||||
import com.fuint.framework.web.BaseController;
|
||||
import com.fuint.framework.web.ResponseObject;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 优惠记录表(FavorableRecords)表控制层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-05-11 11:19:34
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("business/marketingActivity/favorableRecords")
|
||||
public class FavorableRecordsController extends BaseController {
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Resource
|
||||
private FavorableRecordsService favorableRecordsService;
|
||||
|
||||
/**
|
||||
* 分页查询所有数据
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param favorableRecords
|
||||
* @return
|
||||
*/
|
||||
@GetMapping
|
||||
public ResponseObject selectAll(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
|
||||
@Param("cardValueOrders") FavorableRecords favorableRecords) {
|
||||
Page page = new Page(pageNo, pageSize);
|
||||
return getSuccessResult(this.favorableRecordsService.selectList(page, favorableRecords));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 单条数据
|
||||
*/
|
||||
@GetMapping("{id}")
|
||||
public ResponseObject selectOne(@PathVariable Serializable id) {
|
||||
return getSuccessResult(this.favorableRecordsService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param favorableRecords 实体对象
|
||||
* @return 新增结果
|
||||
*/
|
||||
@PostMapping
|
||||
public ResponseObject insert(@RequestBody FavorableRecords favorableRecords) {
|
||||
return getSuccessResult(this.favorableRecordsService.insert(favorableRecords));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param favorableRecords 实体对象
|
||||
* @return 修改结果
|
||||
*/
|
||||
@PutMapping
|
||||
public ResponseObject update(@RequestBody FavorableRecords favorableRecords) {
|
||||
return getSuccessResult(this.favorableRecordsService.updateById(favorableRecords));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*
|
||||
* @param idList 主键结合
|
||||
* @return 删除结果
|
||||
*/
|
||||
@DeleteMapping
|
||||
public ResponseObject delete(@RequestParam("idList") List<Long> idList) {
|
||||
return getSuccessResult(this.favorableRecordsService.removeByIds(idList));
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,140 @@
|
||||
package com.fuint.business.marketingActivity.favorableRecords.entity;
|
||||
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 优惠记录表(FavorableRecords)表实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-05-11 11:19:34
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
@Data
|
||||
public class FavorableRecords extends Model<FavorableRecords> {
|
||||
//主键id
|
||||
private Integer id;
|
||||
//所属连锁店id
|
||||
private Integer chainStoreId;
|
||||
//所属店铺id
|
||||
private Integer storeId;
|
||||
//优惠类型
|
||||
private String favType;
|
||||
//优惠来源
|
||||
private String favFrom;
|
||||
//优惠金额
|
||||
private Double favMoney;
|
||||
//消费类型
|
||||
private String favConsumptionType;
|
||||
//创建者
|
||||
private String createBy;
|
||||
//创建时间
|
||||
private Date createTime;
|
||||
//更新者
|
||||
private String updateBy;
|
||||
//更新时间
|
||||
private Date updateTime;
|
||||
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getChainStoreId() {
|
||||
return chainStoreId;
|
||||
}
|
||||
|
||||
public void setChainStoreId(Integer chainStoreId) {
|
||||
this.chainStoreId = chainStoreId;
|
||||
}
|
||||
|
||||
public Integer getStoreId() {
|
||||
return storeId;
|
||||
}
|
||||
|
||||
public void setStoreId(Integer storeId) {
|
||||
this.storeId = storeId;
|
||||
}
|
||||
|
||||
public String getFavType() {
|
||||
return favType;
|
||||
}
|
||||
|
||||
public void setFavType(String favType) {
|
||||
this.favType = favType;
|
||||
}
|
||||
|
||||
public String getFavFrom() {
|
||||
return favFrom;
|
||||
}
|
||||
|
||||
public void setFavFrom(String favFrom) {
|
||||
this.favFrom = favFrom;
|
||||
}
|
||||
|
||||
public Double getFavMoney() {
|
||||
return favMoney;
|
||||
}
|
||||
|
||||
public void setFavMoney(Double favMoney) {
|
||||
this.favMoney = favMoney;
|
||||
}
|
||||
|
||||
public String getFavConsumptionType() {
|
||||
return favConsumptionType;
|
||||
}
|
||||
|
||||
public void setFavConsumptionType(String favConsumptionType) {
|
||||
this.favConsumptionType = favConsumptionType;
|
||||
}
|
||||
|
||||
public String getCreateBy() {
|
||||
return createBy;
|
||||
}
|
||||
|
||||
public void setCreateBy(String createBy) {
|
||||
this.createBy = createBy;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public String getUpdateBy() {
|
||||
return updateBy;
|
||||
}
|
||||
|
||||
public void setUpdateBy(String updateBy) {
|
||||
this.updateBy = updateBy;
|
||||
}
|
||||
|
||||
public Date getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public void setUpdateTime(Date updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取主键值
|
||||
*
|
||||
* @return 主键值
|
||||
*/
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.id;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,15 @@
|
||||
package com.fuint.business.marketingActivity.favorableRecords.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.fuint.business.marketingActivity.favorableRecords.entity.FavorableRecords;
|
||||
|
||||
/**
|
||||
* 优惠记录表(FavorableRecords)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-05-11 11:19:34
|
||||
*/
|
||||
public interface FavorableRecordsMapper extends BaseMapper<FavorableRecords> {
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,20 @@
|
||||
package com.fuint.business.marketingActivity.favorableRecords.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.fuint.business.marketingActivity.favorableRecords.entity.FavorableRecords;
|
||||
|
||||
/**
|
||||
* 优惠记录表(FavorableRecords)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-05-11 11:19:34
|
||||
*/
|
||||
public interface FavorableRecordsService extends IService<FavorableRecords> {
|
||||
|
||||
boolean insert(FavorableRecords favorableRecords);
|
||||
|
||||
IPage selectList(Page page, FavorableRecords favorableRecords);
|
||||
}
|
||||
|
@ -0,0 +1,44 @@
|
||||
package com.fuint.business.marketingActivity.favorableRecords.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
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.marketingActivity.favorableRecords.mapper.FavorableRecordsMapper;
|
||||
import com.fuint.business.marketingActivity.favorableRecords.entity.FavorableRecords;
|
||||
import com.fuint.business.marketingActivity.favorableRecords.service.FavorableRecordsService;
|
||||
import com.fuint.common.dto.AccountInfo;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 优惠记录表(FavorableRecords)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-05-11 11:19:34
|
||||
*/
|
||||
@Service("favorableRecordsService")
|
||||
public class FavorableRecordsServiceImpl extends ServiceImpl<FavorableRecordsMapper, FavorableRecords> implements FavorableRecordsService {
|
||||
|
||||
@Override
|
||||
public boolean insert(FavorableRecords favorableRecords) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
favorableRecords.setStoreId(nowAccountInfo.getStoreId());
|
||||
favorableRecords.setChainStoreId(nowAccountInfo.getChainStoreId());
|
||||
return save(favorableRecords);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage selectList(Page page, FavorableRecords favorableRecords) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
LambdaQueryWrapper<FavorableRecords> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(FavorableRecords::getStoreId, nowAccountInfo.getStoreId());
|
||||
queryWrapper.eq(FavorableRecords::getChainStoreId, nowAccountInfo.getChainStoreId());
|
||||
queryWrapper.eq(FavorableRecords::getFavFrom, favorableRecords.getFavFrom());
|
||||
queryWrapper.eq(FavorableRecords::getFavType, favorableRecords.getFavType());
|
||||
queryWrapper.eq(FavorableRecords::getFavConsumptionType, favorableRecords.getFavConsumptionType());
|
||||
IPage page1 = page(page, queryWrapper);
|
||||
return page1;
|
||||
}
|
||||
}
|
||||
|
@ -10,8 +10,8 @@
|
||||
<view class="dis">
|
||||
<view class="touxiang" @click="goSetup">
|
||||
<image v-if="user.avatar!='' && user.avatar!=null && user.avatar!=undefined"
|
||||
:src="baseUrl + user.avatar" mode="aspectFit"></image>
|
||||
<image v-else src="../../static/imgs/myx.png" mode="aspectFit"></image>
|
||||
:src="baseUrl + user.avatar" mode="aspectFit"></image>
|
||||
<image v-else src="../../static/imgs/myx.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="">
|
||||
<view class="user-tel" @click="goSetup">{{user.mobile?user.mobile:"点击登录"}}</view>
|
||||
@ -31,8 +31,8 @@
|
||||
</view>
|
||||
<text style="color: #999999;">|</text>
|
||||
<view class="jg-box" @click="goOil()">
|
||||
<view class="jg-box-title">囤油升数</view>
|
||||
<view class="jg-box-nmb">{{refuelMoney[0].refuelMoney || 0 }}L</view>
|
||||
<view class="jg-box-title">锁价次数</view>
|
||||
<view class="jg-box-nmb">{{countList.length || 0 }}次</view>
|
||||
</view>
|
||||
|
||||
<text style="color: #999999;">|</text>
|
||||
@ -50,7 +50,7 @@
|
||||
<view class="my-top-box" style="margin-top: 45px;">
|
||||
<view class="centenr-sx" @click="goMyOrder(0)">
|
||||
<view class="centenr-img">
|
||||
<image src="../../static/my/dingdan.png" mode="aspectFit"></image>
|
||||
<image src="../../static/my/dingdan.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="centenr-size">
|
||||
我的订单
|
||||
@ -60,7 +60,7 @@
|
||||
|
||||
<view class="centenr-sx" @click="goMyOrder(1)">
|
||||
<view class="centenr-img">
|
||||
<image src="../../static/my/dsy.png" mode="aspectFit"></image>
|
||||
<image src="../../static/my/dsy.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="centenr-size">
|
||||
待支付
|
||||
@ -69,7 +69,7 @@
|
||||
|
||||
<view class="centenr-sx" @click="goMyOrder(2)">
|
||||
<view class="centenr-img">
|
||||
<image src="../../static/my/ywc.png" mode="aspectFit"></image>
|
||||
<image src="../../static/my/ywc.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="centenr-size">
|
||||
已完成
|
||||
@ -77,7 +77,7 @@
|
||||
</view>
|
||||
<view class="centenr-sx" @click="goMyOrder(3)">
|
||||
<view class="centenr-img">
|
||||
<image src="../../static/my/dpj.png" mode="aspectFit"></image>
|
||||
<image src="../../static/my/dpj.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="centenr-size">
|
||||
待评价
|
||||
@ -97,7 +97,7 @@
|
||||
</view>
|
||||
<view class="centenr-sx" @click="goToDaby">
|
||||
<view class="centenr-img">
|
||||
<image src="../../static/my/jryj.png" mode="aspectFit"></image>
|
||||
<image src="../../static/my/jryj.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="centenr-size">
|
||||
今日油价
|
||||
@ -107,7 +107,7 @@
|
||||
|
||||
<view class="centenr-sx" @click="goWriteoff()">
|
||||
<view class="centenr-img">
|
||||
<image src="../../static/my/jl.png" mode="aspectFit"></image>
|
||||
<image src="../../static/my/jl.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="centenr-size">
|
||||
核销记录
|
||||
@ -175,6 +175,15 @@
|
||||
pageNo: 1,
|
||||
pageSize: 10
|
||||
},
|
||||
querys: {
|
||||
mtUserId: '',
|
||||
storeId: '',
|
||||
chainStoreId: '',
|
||||
recordName: '囤油卡',
|
||||
pageNo: 1,
|
||||
pageSize: 100
|
||||
},
|
||||
countList: [],
|
||||
myPoints: 0,
|
||||
cardsList: [],
|
||||
refuelMoney: [],
|
||||
@ -196,11 +205,31 @@
|
||||
this.getUser()
|
||||
this.query.storeId = uni.getStorageSync("storeId")
|
||||
this.query.chainStoreId = uni.getStorageSync('chainStoreId')
|
||||
this.querys.storeId = uni.getStorageSync("storeId")
|
||||
this.querys.chainStoreId = uni.getStorageSync('chainStoreId')
|
||||
this.getUserBalance();
|
||||
this.getGiftRecords();
|
||||
this.getStore(uni.getStorageSync("storeId"));
|
||||
this.getAllOrderList();
|
||||
},
|
||||
methods: {
|
||||
// 查询全部充值订单
|
||||
getAllOrderList() {
|
||||
request({
|
||||
url: 'business/marketingActivity/cardValueRecord/selectAllRecord',
|
||||
method: 'get',
|
||||
params: this.querys
|
||||
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
|
||||
this.countList = res.data.records
|
||||
this.totalDetail = res.data.total
|
||||
this.show = false
|
||||
uni.hideLoading();
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取门店信息
|
||||
getStore(id) {
|
||||
let _this = this;
|
||||
@ -216,7 +245,7 @@
|
||||
},
|
||||
// 查询当前登录用户信息
|
||||
getUser() {
|
||||
console.log(this.AppToken,2343);
|
||||
console.log(this.AppToken, 2343);
|
||||
if (!this.AppToken) {
|
||||
return;
|
||||
}
|
||||
@ -224,7 +253,7 @@
|
||||
url: 'business/userManager/user/getUser',
|
||||
method: 'get',
|
||||
}).then(res => {
|
||||
console.log(res,1541);
|
||||
console.log(res, 1541);
|
||||
if (res.data) {
|
||||
this.user = res.data
|
||||
uni.setStorageSync('userId', res.data.id)
|
||||
|
@ -31,8 +31,8 @@
|
||||
<view class="reds">¥{{item.obtain}}</view>
|
||||
</view>
|
||||
<view class="but-box" v-else>
|
||||
<view class="huis">所得升数</view>
|
||||
<view class="reds">{{item.obtain}}L</view>
|
||||
<view class="huis">锁价单价</view>
|
||||
<view class="reds">{{item.obtain}}元/L</view>
|
||||
</view>
|
||||
<view class="but-box">
|
||||
<view class="huis">订单时间</view>
|
||||
@ -92,7 +92,7 @@
|
||||
|
||||
},
|
||||
onLoad(e) {
|
||||
if (e.index){
|
||||
if (e.index) {
|
||||
console.log(e.index);
|
||||
this.tindex = e.index
|
||||
this.tapindex(e.index)
|
||||
@ -151,7 +151,7 @@
|
||||
this.totalDetail = res.data.total
|
||||
this.show = false
|
||||
uni.hideLoading();
|
||||
console.log(this.list,123);
|
||||
console.log(this.list, 123);
|
||||
}
|
||||
})
|
||||
},
|
||||
|
@ -36,7 +36,7 @@
|
||||
</view>
|
||||
<view class="y-bt">
|
||||
<view class="sizehui">油品名称</view>
|
||||
<view class="sizehei">¥{{item.type}}</view>
|
||||
<view class="sizehei">{{item.type}}:{{item.oilName}}</view>
|
||||
</view>
|
||||
<!-- <view class="y-bt">
|
||||
<view class="sizehui">油品名称</view>
|
||||
@ -47,8 +47,8 @@
|
||||
<view class="sizehei">¥{{item.rechargeBalance}}</view>
|
||||
</view>
|
||||
<view class="y-bt">
|
||||
<view class="sizehui">所得升数</view>
|
||||
<view class="sizehong">{{item.obtain}}L</view>
|
||||
<view class="sizehui">锁价单价</view>
|
||||
<view class="sizehong">{{item.obtain}}元/L</view>
|
||||
</view>
|
||||
<view class="y-bt">
|
||||
<view class="sizehui">订单时间</view>
|
||||
|
Loading…
Reference in New Issue
Block a user