Merge branch 'master' of https://gitee.com/nny_1/oilSystem
# Conflicts: # fuintBackend/fuint-application/src/main/java/com/fuint/business/storeInformation/service/impl/QRCodeServiceImpl.java
This commit is contained in:
commit
bbded088aa
@ -7,7 +7,7 @@
|
||||
</div>
|
||||
<div>
|
||||
<el-button type="primary" plain round @click="subCard">子卡管理<i class="el-icon-bank-card el-icon--right"></i></el-button>
|
||||
<el-button type="primary" plain round>会员码</el-button>
|
||||
<!-- <el-button type="primary" plain round>会员码</el-button>-->
|
||||
</div>
|
||||
</div>
|
||||
<div>基础资料</div>
|
||||
|
@ -224,7 +224,7 @@
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="等级" prop="grade">
|
||||
<el-input v-model="form.grade" placeholder="请输入等级,正整数" maxlength="10" />
|
||||
<el-input v-model="form.grade" placeholder="请输入等级级别,必须为正整数,且不可重复" maxlength="10" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -238,7 +238,7 @@
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="所需成长值" prop="growthValue">
|
||||
<el-input v-model="form.growthValue" placeholder="1">
|
||||
<el-input v-model="form.growthValue" placeholder="达到当前等级需要的成长值">
|
||||
<template slot="append">成长值</template>
|
||||
</el-input>
|
||||
<!-- <e-row>-->
|
||||
|
@ -77,7 +77,7 @@ public class FyPayController {
|
||||
public void updateOrderStatus(String orderNo,String type){
|
||||
if ("1".equals(type)) {
|
||||
orderService.updateOrderStatus(orderNo,"paid");
|
||||
}else if ("积分订单".equals(type)) {
|
||||
}else if ("4".equals(type)) {
|
||||
integralOrdersService.editPayStatus(orderNo,"paid",-1);
|
||||
integralOrdersService.checkTheStatusOfYourPaymentByIntegral(orderNo);
|
||||
|
||||
|
@ -12,7 +12,7 @@ public class ReceiveParameter {
|
||||
*/
|
||||
private String orderNo;
|
||||
/**
|
||||
* 类型:1、油品;2、商品;3、储值卡;4、积分;5、囤油卡;6、油品加商品
|
||||
* 类型:1、油品;2、商品;3、储值卡;4、积分;5、囤油卡;6、油品加商品(收银台订单);7、挂账订单
|
||||
*/
|
||||
private String type;
|
||||
/**
|
||||
|
@ -23,6 +23,13 @@ public interface MerchantConfigService extends IService<MerchantConfig> {
|
||||
*/
|
||||
public MerchantConfig selectMeChByIdIsUse(int storeId);
|
||||
|
||||
/**
|
||||
* 根据storeId修改消费后的金额信息
|
||||
* @param storeId
|
||||
* @param amount
|
||||
*/
|
||||
void updateMeChAmountByStoreId(Integer storeId,Double amount);
|
||||
|
||||
/**
|
||||
* 根据店铺id查询商户信息
|
||||
* @return
|
||||
@ -45,9 +52,9 @@ public interface MerchantConfigService extends IService<MerchantConfig> {
|
||||
public MerchantConfig selectMerchById(int id);
|
||||
|
||||
/**
|
||||
* 将所有的使用1改为0
|
||||
* 将此店铺中所有的使用1改为0
|
||||
*/
|
||||
public void updateMerchOrter();
|
||||
public void updateMerchOrter(int store);
|
||||
|
||||
/**
|
||||
* 修改商户使用状态
|
||||
|
@ -9,10 +9,13 @@ import com.fuint.api.fuyou.entity.*;
|
||||
import com.fuint.api.fuyou.service.FyPayService;
|
||||
import com.fuint.api.fuyou.service.MerchantConfigService;
|
||||
import com.fuint.api.fuyou.util.Utils;
|
||||
import com.fuint.business.integral.entity.IntegralOrders;
|
||||
import com.fuint.business.integral.service.IntegralOrdersService;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorableRecord;
|
||||
import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableRecordService;
|
||||
import com.fuint.business.marketingActivity.cardFule.entity.CardFuelRecord;
|
||||
import com.fuint.business.marketingActivity.cardFule.service.CardFuelRecordService;
|
||||
import com.fuint.business.marketingActivity.cardValue.entity.CardValueRecord;
|
||||
import com.fuint.business.marketingActivity.cardValue.service.CardValueRecordService;
|
||||
import com.fuint.business.order.entity.*;
|
||||
import com.fuint.business.order.service.*;
|
||||
@ -68,14 +71,7 @@ public class FyPayServiceImpl implements FyPayService {
|
||||
map.put("ins_cd", insCd);
|
||||
map.put("mchnt_cd", mchntCd);
|
||||
map.put("goods_des", goodsDes);
|
||||
// ReceiveParameter receiveParameter = new ReceiveParameter();
|
||||
// receiveParameter.setOrderNo(orderNo);
|
||||
// receiveParameter.setType("油品订单");
|
||||
// receiveParameter.setContent(map1.get("goodsDes"));
|
||||
// receiveParameter.setGoodsMoney(Double.valueOf(map1.get("allAmount")));
|
||||
// receiveParameter.setStoreId(oilOrder.getStoreId());
|
||||
// receiveParameter.setPayType(oilOrder.getPayType());
|
||||
// receiveParameter.setUserId(oilOrder.getUserId());
|
||||
|
||||
|
||||
// 请求报文
|
||||
String reqBody = Message.requestMsg(map);
|
||||
@ -87,7 +83,6 @@ public class FyPayServiceImpl implements FyPayService {
|
||||
|
||||
String str = resMap.get("sign");
|
||||
if (Utils.verifySign(resMap, str)){
|
||||
// this.insertAllOrderInfo(receiveParameter);
|
||||
ThreadUtil.execAsync(() -> {
|
||||
Timer timer = new Timer();
|
||||
timer.schedule(new TimerTask() {
|
||||
@ -125,7 +120,6 @@ public class FyPayServiceImpl implements FyPayService {
|
||||
|
||||
@Override
|
||||
public Map<String, String> queryOrder(Map<String, String> map1) throws Exception {
|
||||
// AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
Map<String, String> resMap =new HashMap<>();
|
||||
resMap.put("msg","error");
|
||||
try {
|
||||
@ -144,10 +138,17 @@ public class FyPayServiceImpl implements FyPayService {
|
||||
// 余额新增
|
||||
String type = "";
|
||||
String payStates="";
|
||||
String payStatus="unpaid";
|
||||
if (!ObjectUtil.isEmpty(map1.get("type"))) {
|
||||
type = map1.get("type");
|
||||
}
|
||||
|
||||
ReceiveParameter receiveParameter = new ReceiveParameter();
|
||||
receiveParameter.setOrderNo(orderNo);
|
||||
receiveParameter.setGoodsMoney(allAmount*100);
|
||||
receiveParameter.setStoreId(storeId1);
|
||||
receiveParameter.setPayType(payType);
|
||||
|
||||
// 请求报文
|
||||
String reqBody = Message.requestMsg(map);
|
||||
// 响应报文
|
||||
@ -165,10 +166,12 @@ public class FyPayServiceImpl implements FyPayService {
|
||||
List<ReturnRecord> returnRecords = returnRecordService.selectReturnRecordByOrderNo(orderNo);
|
||||
Date date = new Date();
|
||||
if (reqMap.get("trans_stat").equals("SUCCESS")){
|
||||
payStatus = "paid";
|
||||
if (!ObjectUtil.isEmpty(oilOrder)){
|
||||
// 油品订单
|
||||
oilOrder.setOrderStatus("paid");
|
||||
oilOrder.setPayTime(date);
|
||||
|
||||
// 修改油罐容量
|
||||
List<JSONObject> jsonObjects = JSONArray.parseArray(map1.get("oilOrder"), JSONObject.class);
|
||||
if (jsonObjects.size()<=1) {
|
||||
@ -190,6 +193,7 @@ public class FyPayServiceImpl implements FyPayService {
|
||||
// 商品订单
|
||||
goodsOrder.setStatus("paid");
|
||||
goodsOrder.setPayTime(date);
|
||||
|
||||
if (!map1.get("goodsOrder").equals("[]")){
|
||||
List<JSONObject> goods = JSONArray.parseArray(map1.get("goodsOrder"), JSONObject.class);
|
||||
OrderGoods orderGoods = new OrderGoods();
|
||||
@ -197,7 +201,7 @@ public class FyPayServiceImpl implements FyPayService {
|
||||
orderGoods.setOrderId(goodsOrder.getId());
|
||||
orderGoods.setGoodsId(Integer.valueOf(good.get("id").toString()));
|
||||
orderGoods.setNum(Integer.valueOf(good.get("num").toString()));
|
||||
orderGoodsService.insertOrderGoods(orderGoods);
|
||||
orderGoodsService.insertOrderGoods(orderGoods,storeId1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -215,6 +219,8 @@ public class FyPayServiceImpl implements FyPayService {
|
||||
hangBillService.updateHangBill(returnRecord.getHangBillId(), returnRecord.getAmount());
|
||||
returnRecordService.updateReturnRecord(returnRecord);
|
||||
}
|
||||
receiveParameter.setType("7");
|
||||
receiveParameter.setContent("挂账订单");
|
||||
}
|
||||
if (!ArrayUtil.isEmpty(list)){
|
||||
if (list.size()>1){
|
||||
@ -241,6 +247,10 @@ public class FyPayServiceImpl implements FyPayService {
|
||||
}
|
||||
if ("CVR".equals(type)) {
|
||||
payStates = "paid";
|
||||
receiveParameter.setType("2");
|
||||
if (goodsOrder.getUserId()!=null){
|
||||
receiveParameter.setUserId(goodsOrder.getUserId());
|
||||
}
|
||||
// if (!ObjectUtil.isEmpty(map1.get("orderId"))) {
|
||||
//
|
||||
// }
|
||||
@ -259,6 +269,7 @@ public class FyPayServiceImpl implements FyPayService {
|
||||
}else if (reqMap.get("trans_stat").equals("USERPAYING")){
|
||||
resMap.put("msg","unpaid");
|
||||
}else {
|
||||
payStatus = "payFail";
|
||||
if (!ObjectUtil.isEmpty(oilOrder)){
|
||||
oilOrder.setOrderStatus("payFail");
|
||||
}
|
||||
@ -274,6 +285,9 @@ public class FyPayServiceImpl implements FyPayService {
|
||||
returnRecord.setPayStatus("payFail");
|
||||
returnRecordService.updateReturnRecord(returnRecord);
|
||||
}
|
||||
|
||||
receiveParameter.setType("7");
|
||||
receiveParameter.setContent("挂账订单");
|
||||
}
|
||||
if (!ArrayUtil.isEmpty(list)){
|
||||
if (list.size()>1) {
|
||||
@ -297,29 +311,77 @@ public class FyPayServiceImpl implements FyPayService {
|
||||
}
|
||||
}
|
||||
if (!ObjectUtil.isEmpty(oilOrder)){
|
||||
receiveParameter.setType("1");
|
||||
if (oilOrder.getUserId()!=null){
|
||||
receiveParameter.setUserId(oilOrder.getUserId());
|
||||
}
|
||||
receiveParameter.setContent("油品订单");
|
||||
|
||||
oilOrderService.updateOilOrder(oilOrder);
|
||||
}
|
||||
if (!ObjectUtil.isEmpty(goodsOrder)){
|
||||
receiveParameter.setType("2");
|
||||
if (goodsOrder.getUserId()!=null){
|
||||
receiveParameter.setUserId(goodsOrder.getUserId());
|
||||
}
|
||||
receiveParameter.setContent("商品订单");
|
||||
|
||||
goodsOrderService.updateGoodOrder(goodsOrder);
|
||||
}
|
||||
if (!ObjectUtil.isEmpty(cashierOrder)){
|
||||
receiveParameter.setType("6");
|
||||
if (!ObjectUtil.isEmpty(oilOrder)){
|
||||
if (oilOrder.getUserId()!=null){
|
||||
receiveParameter.setUserId(oilOrder.getUserId());
|
||||
}
|
||||
}
|
||||
if (!ObjectUtil.isEmpty(goodsOrder)){
|
||||
if (goodsOrder.getUserId()!=null){
|
||||
receiveParameter.setUserId(goodsOrder.getUserId());
|
||||
}
|
||||
}
|
||||
receiveParameter.setContent("收银台订单");
|
||||
|
||||
cashierOrderService.updateCashierOrder(cashierOrder);
|
||||
}
|
||||
if ("CVR".equals(type) && !ObjectUtil.isEmpty(map1.get("orderId"))) {
|
||||
// 储值卡
|
||||
Integer id = Integer.parseInt(map1.get("orderId"));
|
||||
cardValueRecordService.editPayStatus(id, payStates);
|
||||
|
||||
CardValueRecord byId = cardValueRecordService.getById(id);
|
||||
receiveParameter.setType("3");
|
||||
if (byId.getMtUserId()!=null){
|
||||
receiveParameter.setUserId(byId.getMtUserId());
|
||||
}
|
||||
receiveParameter.setContent("储值卡订单");
|
||||
}
|
||||
if ("CFR".equals(type) && !ObjectUtil.isEmpty(map1.get("orderId"))) {
|
||||
// 存油卡
|
||||
// 囤油卡
|
||||
Integer id = Integer.parseInt(map1.get("orderId"));
|
||||
cardFuelRecordService.editPayStatus(id, payStates);
|
||||
|
||||
CardFuelRecord cardFuelRecord = cardFuelRecordService.queryById(id);
|
||||
receiveParameter.setType("5");
|
||||
if (cardFuelRecord.getMtUserId()!=null){
|
||||
receiveParameter.setUserId(cardFuelRecord.getMtUserId());
|
||||
}
|
||||
receiveParameter.setContent("囤油卡订单");
|
||||
}
|
||||
if ("IOS".equals(type)) {
|
||||
// 存油卡
|
||||
// 积分商城
|
||||
String storeId = ObjectUtil.isEmpty(map1.get("storeId"))?"-1":map1.get("storeId");
|
||||
integralOrdersService.editPayStatus(orderNo, payStates,Integer.parseInt(storeId));
|
||||
|
||||
IntegralOrders integralOrders = integralOrdersService.queryIntegralOrdersByOrderNo(orderNo, Integer.parseInt(storeId));
|
||||
receiveParameter.setType("4");
|
||||
if (integralOrders.getUserId()!=null){
|
||||
receiveParameter.setUserId(integralOrders.getUserId());
|
||||
}
|
||||
receiveParameter.setContent("积分订单");
|
||||
}
|
||||
|
||||
this.insertAllOrderInfo(receiveParameter,payStatus);
|
||||
}
|
||||
}catch (Exception e){
|
||||
log.error(e.getMessage());
|
||||
@ -409,6 +471,26 @@ public class FyPayServiceImpl implements FyPayService {
|
||||
@Autowired
|
||||
private AllOrderInfoService allOrderInfoService;
|
||||
|
||||
/**
|
||||
* 添加所有订单信息
|
||||
*/
|
||||
private void insertAllOrderInfo(ReceiveParameter receiveParameter,String payStatus){
|
||||
AllOrderInfo allOrderInfo = new AllOrderInfo();
|
||||
allOrderInfo.setOrderNo(receiveParameter.getOrderNo());
|
||||
allOrderInfo.setType(receiveParameter.getType());
|
||||
allOrderInfo.setStoreId(receiveParameter.getStoreId());
|
||||
allOrderInfo.setGoodsMoney(receiveParameter.getGoodsMoney());
|
||||
allOrderInfo.setPayType(receiveParameter.getPayType());
|
||||
allOrderInfo.setUserId(receiveParameter.getUserId());
|
||||
allOrderInfo.setPayChannel("cashier");
|
||||
allOrderInfo.setStatus(payStatus);
|
||||
allOrderInfo.setContent(receiveParameter.getContent());
|
||||
allOrderInfoService.insertAllOrderInfo(allOrderInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加所有订单信息
|
||||
*/
|
||||
private void insertAllOrderInfo(ReceiveParameter receiveParameter){
|
||||
AllOrderInfo allOrderInfo = new AllOrderInfo();
|
||||
allOrderInfo.setOrderNo(receiveParameter.getOrderNo());
|
||||
|
@ -35,6 +35,16 @@ public class MerchantConfigServiceImpl extends ServiceImpl<MerchantConfigMapper,
|
||||
return merchantConfig;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateMeChAmountByStoreId(Integer storeId,Double amount) {
|
||||
MerchantConfig merchantConfig = this.selectMeChByIdIsUse(storeId);
|
||||
if (ObjectUtil.isNotEmpty(merchantConfig)){
|
||||
Double amount1 = merchantConfig.getAmount();
|
||||
merchantConfig.setAmount(amount1);
|
||||
this.updateMerch(merchantConfig);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MerchantConfig> selectMeChByIsOpen() {
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
@ -68,9 +78,10 @@ public class MerchantConfigServiceImpl extends ServiceImpl<MerchantConfigMapper,
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateMerchOrter() {
|
||||
public void updateMerchOrter(int storeId) {
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("is_use","1");
|
||||
queryWrapper.eq("store_id",storeId);
|
||||
List<MerchantConfig> list = baseMapper.selectList(queryWrapper);
|
||||
if (list.size()>0){
|
||||
for (MerchantConfig merchantConfig : list) {
|
||||
|
@ -54,7 +54,7 @@ public class OilConfigServiceImpl extends ServiceImpl<OilConfigMapper, OilConfig
|
||||
}
|
||||
}
|
||||
// 将其他使用的账户关掉
|
||||
merchantConfigService.updateMerchOrter();
|
||||
merchantConfigService.updateMerchOrter(nowAccountInfo.getStoreId());
|
||||
// 改变目前使用账户
|
||||
MerchantConfig merchantConfig = merchantConfigService.selectMerchById(list.get(index).getMerchConfigId());
|
||||
merchantConfig.setIsUse("1");
|
||||
|
@ -105,5 +105,12 @@ public interface IntegralOrdersMapper {
|
||||
|
||||
int editPayStatus(@Param("orderNumber") String orderNumber,@Param("payStates") String payStates, @Param("storeId") Integer storeId );
|
||||
// int editPayStatus(@Param("orderNumber") String orderNumber,@Param("payStates") String payStates, @Param("storeId") Integer storeId );
|
||||
|
||||
/**
|
||||
* 根据订单号查询订单信息
|
||||
* @param orderNo
|
||||
* @return
|
||||
*/
|
||||
IntegralOrders queryIntegralOrdersByOrderNo(@Param("orderNumber") String orderNo,@Param("storeId") Integer storeId);
|
||||
}
|
||||
|
||||
|
@ -440,6 +440,12 @@
|
||||
|
||||
</update>
|
||||
|
||||
<select id="queryIntegralOrdersByOrderNo">
|
||||
select * from integral_orders where order_number = #{orderNumber}
|
||||
<if test="storeId != -1">
|
||||
and store_id = #{storeId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
|
@ -91,4 +91,11 @@ public interface IntegralOrdersService {
|
||||
*/
|
||||
Boolean checkTheRedemptionLimit(Integer giftId);
|
||||
|
||||
/**
|
||||
* 根据订单号查询订单信息
|
||||
* @param orderNo
|
||||
* @return
|
||||
*/
|
||||
IntegralOrders queryIntegralOrdersByOrderNo(String orderNo,Integer storeId);
|
||||
|
||||
}
|
||||
|
@ -516,4 +516,9 @@ public class IntegralOrdersServiceImpl implements IntegralOrdersService {
|
||||
|
||||
return flag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IntegralOrders queryIntegralOrdersByOrderNo(String orderNo,Integer storeId) {
|
||||
return integralOrdersDao.queryIntegralOrdersByOrderNo(orderNo,storeId);
|
||||
}
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ public class AllOrderInfo extends BaseEntity implements Serializable {
|
||||
*/
|
||||
private String orderNo;
|
||||
/**
|
||||
* 类型:1、油品;2、商品;3、储值卡;4、积分;5、囤油卡;6、油品加商品
|
||||
* 类型:1、油品;2、商品;3、储值卡;4、积分;5、囤油卡;6、油品加商品(收银台订单);7、挂账订单
|
||||
*/
|
||||
private String type;
|
||||
/**
|
||||
|
@ -24,11 +24,11 @@ public interface OrderGoodsService extends IService<OrderGoods> {
|
||||
* @param goods
|
||||
* @return
|
||||
*/
|
||||
public int insertOrderGoods(OrderGoods goods);
|
||||
public int insertOrderGoods(OrderGoods goods,Integer storeId);
|
||||
|
||||
/**
|
||||
* 添加库存跟踪信息
|
||||
* @param goods
|
||||
*/
|
||||
public void insertStockTrack(OrderGoods goods);
|
||||
public void insertStockTrack(OrderGoods goods,Integer storeId);
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package com.fuint.business.order.service.impl;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fuint.api.fuyou.service.MerchantConfigService;
|
||||
import com.fuint.business.order.entity.AllOrderInfo;
|
||||
import com.fuint.business.order.mapper.AllOrderInfoMapper;
|
||||
import com.fuint.business.order.service.AllOrderInfoService;
|
||||
@ -10,6 +11,8 @@ import com.fuint.business.order.service.OilOrderService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Service
|
||||
public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllOrderInfo> implements AllOrderInfoService {
|
||||
@Override
|
||||
@ -24,8 +27,12 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllO
|
||||
return baseMapper.insert(allOrderInfo);
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private MerchantConfigService merchantConfigService;
|
||||
|
||||
@Override
|
||||
public int updateAllOrderInfo(AllOrderInfo allOrderInfo) {
|
||||
merchantConfigService.updateMeChAmountByStoreId(allOrderInfo.getStoreId(),allOrderInfo.getPayMoney());
|
||||
return baseMapper.updateById(allOrderInfo);
|
||||
}
|
||||
|
||||
@ -37,7 +44,9 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllO
|
||||
int row = 0;
|
||||
AllOrderInfo allOrderInfo = this.selectAllOrderInfoByOrderNo(orderNo);
|
||||
if (ObjectUtil.isNotEmpty(allOrderInfo)){
|
||||
allOrderInfo.setStatus(status);
|
||||
allOrderInfo.setPayMoney(allOrderInfo.getGoodsMoney());
|
||||
allOrderInfo.setStatus("paid");
|
||||
allOrderInfo.setPayTime(new Date());
|
||||
row = this.updateAllOrderInfo(allOrderInfo);
|
||||
// 修改油品订单状态
|
||||
orderService.updateOrderStatus(orderNo,status);
|
||||
|
@ -287,7 +287,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
orderGoods.setOrderId(ljOrder2.getId());
|
||||
orderGoods.setGoodsId(Integer.valueOf(good.get("id").toString()));
|
||||
orderGoods.setNum(Integer.valueOf(good.get("num").toString()));
|
||||
orderGoodsService.insertOrderGoods(orderGoods);
|
||||
orderGoodsService.insertOrderGoods(orderGoods,storeId);
|
||||
}
|
||||
}
|
||||
ljOrder1 = orderService.selectGoodsOrder(orderNo);
|
||||
@ -402,7 +402,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
cashierOrder.setGoodsOrderId(goodsOrder1.getId());
|
||||
}
|
||||
cashierOrderService.insertCashierOrder(cashierOrder);
|
||||
this.insertAllOrderInfo(orderNo,storeId,oilAmount,payType,userId,"PC");
|
||||
// this.insertAllOrderInfo(orderNo,storeId,oilAmount,payType,userId,"PC");
|
||||
return orders;
|
||||
}
|
||||
|
||||
@ -516,7 +516,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
cashierOrder.setOilOrderId(oilOrder.getId());
|
||||
cashierOrderService.insertCashierOrder(cashierOrder);
|
||||
this.updateGrowthValue1(oilAmount,userId, Integer.valueOf(oilOrder.getOils()),0.0,storeId);
|
||||
this.insertAllOrderInfo(orderNo,accountInfo.getStoreId(),oilAmount,map.get("payType"),userId,"applet");
|
||||
// this.insertAllOrderInfo(orderNo,accountInfo.getStoreId(),oilAmount,map.get("payType"),userId,"applet");
|
||||
|
||||
res.put("success","success");
|
||||
} else {
|
||||
@ -590,7 +590,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
}
|
||||
|
||||
cashierOrderService.insertCashierOrder(cashierOrder);
|
||||
this.insertAllOrderInfo(orderNo,accountInfo.getStoreId(),oilAmount,map.get("payType"),userId,"applet");
|
||||
// this.insertAllOrderInfo(orderNo,accountInfo.getStoreId(),oilAmount,map.get("payType"),userId,"applet");
|
||||
res.put("success","success");
|
||||
}
|
||||
|
||||
|
@ -35,16 +35,18 @@ public class OrderGoodsServiceImpl extends ServiceImpl<OrderGoodsMapper, OrderGo
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertOrderGoods(OrderGoods goods) {
|
||||
public int insertOrderGoods(OrderGoods goods,Integer storeId) {
|
||||
int row = baseMapper.insert(goods);
|
||||
this.insertStockTrack(goods);
|
||||
this.insertStockTrack(goods,storeId);
|
||||
return row;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void insertStockTrack(OrderGoods goods) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
Integer storeId = nowAccountInfo.getStoreId();
|
||||
public void insertStockTrack(OrderGoods goods,Integer storeId) {
|
||||
if (storeId==null){
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
storeId = nowAccountInfo.getStoreId();
|
||||
}
|
||||
// 查询插入的库存统计信息
|
||||
StockStatistic stockStatistic = stockService.selectStockByGoodsId(goods.getGoodsId());
|
||||
// 添加库存跟踪信息
|
||||
|
@ -94,10 +94,11 @@ public class QRCodeServiceImpl extends ServiceImpl<QRCodeMapper, QRCode> impleme
|
||||
if (ObjectUtil.isEmpty(qrCode1)){
|
||||
qrCode.setStoreId(store.getId());
|
||||
qrCode.setChainStoreId(store.getChainStoreId());
|
||||
// 带有店铺id 跳转首页
|
||||
qrCode.setCollection("https://www.tuofeng.cc/oilIndex?storeId="+store.getChainStoreId());
|
||||
// 带有店铺id 跳转一键加油页面
|
||||
qrCode.setPayment("https://www.tuofeng.cc/oilRefuel?storeId="+store.getChainStoreId());
|
||||
|
||||
// 带有店铺id 跳转首页
|
||||
qrCode.setCollection("https://www.tuofeng.cc/oilIndex?storeId="+store.getId());
|
||||
// 带有店铺id 跳转一键加油页面
|
||||
qrCode.setPayment("https://www.tuofeng.cc/oilRefuel?storeId="+store.getId());
|
||||
row = baseMapper.insert(qrCode);
|
||||
IndexBanner indexBanner = new IndexBanner();
|
||||
indexBannerService.insertIndexBanner(indexBanner,storeId);
|
||||
|
@ -91,6 +91,7 @@
|
||||
<div class="bottom-posi">
|
||||
<div class="center-left-wrap">
|
||||
<div class="wrap-box" v-for="item in payList"
|
||||
v-if="item.dictValue!='APPLET_CODE'"
|
||||
:key="item.dictValue"
|
||||
:value="item.dictValue">
|
||||
<span @click="payMethod(item.dictValue)">{{ item.dictLabel }}</span>
|
||||
@ -391,7 +392,7 @@ import {
|
||||
import BigNumber from 'bignumber.js';
|
||||
import PointsCashier from "@/views/cashier/NewComponents/integralOrder/pointsCashier";
|
||||
import {getDicts} from "@/api/dict/data";
|
||||
import {getUserVoMobile, getUserVoName} from "@/api/cashier/user";
|
||||
import {getUserInfoMobile, getUserVoMobile, getUserVoName} from "@/api/cashier/user";
|
||||
import {getUserGrade} from "@/api/cashier/usergrade";
|
||||
import {queryStaffs, staffInfo} from "@/api/cashier/staff";
|
||||
|
||||
@ -555,7 +556,7 @@ import {
|
||||
// 根据手机号查询会员信息
|
||||
getUser(){
|
||||
if(this.select1=="会员手机号"){
|
||||
getUserVoMobile({mobile:this.userNo}).then( response => {
|
||||
getUserInfoMobile({mobile:this.userNo}).then( response => {
|
||||
if (response.data!=null){
|
||||
this.member = response.data
|
||||
}else {
|
||||
|
@ -1032,7 +1032,7 @@
|
||||
// 油号列表
|
||||
oilNumberList:[],
|
||||
// 是否可以点会员确定按钮
|
||||
isSure:true,
|
||||
isSure:false,
|
||||
// 优惠券消费金额
|
||||
couponAmount:0,
|
||||
// 是否为满减互斥
|
||||
@ -1447,7 +1447,7 @@
|
||||
this.userNo = "";
|
||||
this.oilActualPay = (this.oilAmount - this.oilDiscount).toFixed(2)
|
||||
this.goodsActualPay = this.goodsAmount - this.goodsDiscount
|
||||
this.isSure = true;
|
||||
this.isSure = false;
|
||||
this.handleChange();
|
||||
},
|
||||
// 根据会员等级信息获取等级优惠信息
|
||||
@ -2190,7 +2190,7 @@
|
||||
},
|
||||
// 选择会员信息
|
||||
handleChoose(data) {
|
||||
this.isSure = false;
|
||||
this.isSure = true;
|
||||
this.member = data;
|
||||
if (data.refuelMoney != null && data.refuelMoney != ""){
|
||||
this.refuelMoney = JSON.parse(data.refuelMoney)
|
||||
@ -2582,7 +2582,7 @@
|
||||
_this.resetting1();
|
||||
},
|
||||
resetting1(){
|
||||
console.log(111)
|
||||
// console.log(111)
|
||||
let _this = this;
|
||||
this.authCode = "";
|
||||
if (_this.isPaySuccess == true){
|
||||
|
@ -128,7 +128,7 @@
|
||||
userInfo: {
|
||||
storeId: 12,
|
||||
staffId: "",
|
||||
phone: '18457621459'
|
||||
phone: '16548796325'
|
||||
},
|
||||
|
||||
type: 'phone',
|
||||
|
@ -100,7 +100,10 @@
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- 状态:加载更多、没有更多了... -->
|
||||
<u-load-more :status="status"></u-load-more>
|
||||
<!-- <u-load-more :status="status"></u-load-more> -->
|
||||
<u-empty v-if="list.length == 0" mode="coupon" text="内容为空"
|
||||
icon="http://cdn.uviewui.com/uview/empty/coupon.png">
|
||||
</u-empty>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
|
@ -17,8 +17,8 @@
|
||||
<view class="box-hang" @click="goEdit(0)">
|
||||
<view class="">昵称</view>
|
||||
<view class="dis">
|
||||
<text v-if="user.name==''">未填写</text>
|
||||
<text>{{user.name}}</text>
|
||||
<text v-if="!user.name">未填写</text>
|
||||
<text v-else>{{user.name}}</text>
|
||||
<uni-icons type="right" size="16"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
@ -32,7 +32,10 @@
|
||||
</view>
|
||||
<view class="box-hang" @click="goEdit(2)">
|
||||
<view class="">车牌号</view>
|
||||
<view class="dis"> <text>{{user.carNo}}</text> <uni-icons type="right" size="16"></uni-icons> </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 class="box-hang" @click="goEdit(3)">
|
||||
<view class="">支付密码</view>
|
||||
|
@ -199,7 +199,7 @@
|
||||
},
|
||||
onLoad(e) {
|
||||
this.orderNo = e.orderNo
|
||||
// this.orderNo = "234520240104104141863b59"
|
||||
// this.orderNo = "2345202401061730169a69d8"
|
||||
},
|
||||
onShow() {
|
||||
this.getOilOrder();
|
||||
|
Loading…
Reference in New Issue
Block a user