Merge remote-tracking branch 'origin/master'

This commit is contained in:
齐天大圣 2024-01-02 09:18:54 +08:00
commit 53062019b4
28 changed files with 401 additions and 72 deletions

View File

@ -1,2 +1,17 @@
1、 transaction_id存储
2、
2、
20231219
1.中台组织架构删除有遮挡
2.油站管理 滚动异样
3.VueX页面刷新丢失缓存
4.编辑油站 》 图片上传
5.支付通道查询
6.支付通道发布
7.注意 进入油站配置链接
8.进入油站错误提示
9.首页没对齐
10.门店二维码 收款二维码
11.门店信息保存按钮
12.角色组问题

View File

@ -63,9 +63,12 @@ public class MerchantConfig extends BaseEntity implements Serializable {
*/
private Double amount;
/**
* 小程序appid
* 微信小程序appid
*/
private String appid;
/**
* 支付宝小程序appid
*/
private String alipayAppid;
}

View File

@ -341,14 +341,10 @@ public class FyPayServiceImpl implements FyPayService {
// 私钥
Const.INS_PRIVATE_KEY = merchantConfig.getPrivateKey();
Map<String, String> map = Builder.buildFuiou23();
// 微信open_id
map.put("sub_openid", userVo.getOpenId());
// 机构号
map.put("ins_cd", merchantConfig.getInsCd());
// 商户号
map.put("mchnt_cd", merchantConfig.getMchntCd());
// appid
map.put("sub_appid", merchantConfig.getAppid());
// 订单号
map.put("mchnt_order_no",receiveParameter.getOrderNo());
// 订单总金额
@ -358,8 +354,16 @@ public class FyPayServiceImpl implements FyPayService {
map.put("goods_des", receiveParameter.getContent());
if (receiveParameter.getPayType().equals("WECHAT")){
map.put("trade_type","LETPAY");
// 微信open_id
map.put("sub_openid", userVo.getOpenId());
// appid
map.put("sub_appid", merchantConfig.getAppid());
} else if (receiveParameter.getPayType().equals("ALIPAY")){
map.put("trade_type","FWC");
// 支付宝userId
map.put("sub_openid", userVo.getUserId());
// appid
map.put("sub_appid", merchantConfig.getAlipayAppid());
}else {
res.put("code","error");
res.put("msg","暂不支持其他支付方式");

View File

@ -0,0 +1,22 @@
package com.fuint.business.indexBanner.controller;
import com.fuint.business.indexBanner.service.IndexBannerService;
import com.fuint.framework.web.BaseController;
import com.fuint.framework.web.ResponseObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/business/indexBanner")
public class IndexBannerController extends BaseController {
@Autowired
private IndexBannerService indexBannerService;
@GetMapping("/list/{storeId}")
public ResponseObject list(@PathVariable Integer storeId){
return getSuccessResult(indexBannerService.selectIndexBannerList(storeId));
}
}

View File

@ -0,0 +1,123 @@
package com.fuint.business.indexBanner.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fuint.framework.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
import java.io.Serializable;
/**
* 首页轮播图(IndexBanner)实体类
*/
@Data
@TableName("index_banner")
@ApiModel(value = "IndexBanner对象", description = "首页轮播图")
public class IndexBanner extends BaseEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 自增ID
*/
@ApiModelProperty("自增ID")
@TableId(value = "ID", type = IdType.AUTO)
private Integer id;
/**
* 店铺id
*/
private Integer storeId;
/**
* 轮播图地址
*/
private String bannerUrl;
/**
* 路由地址
*/
private String routeUrl;
/**
* 创建时间
*/
private Date createTime;
/**
* 创建人
*/
private String createBy;
/**
* 更新时间
*/
private Date updateTime;
/**
* 更新人
*/
private String updateBy;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getStoreId() {
return storeId;
}
public void setStoreId(Integer storeId) {
this.storeId = storeId;
}
public String getBannerUrl() {
return bannerUrl;
}
public void setBannerUrl(String bannerUrl) {
this.bannerUrl = bannerUrl;
}
public String getRouteUrl() {
return routeUrl;
}
public void setRouteUrl(String routeUrl) {
this.routeUrl = routeUrl;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getUpdateBy() {
return updateBy;
}
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy;
}
}

View File

@ -0,0 +1,7 @@
package com.fuint.business.indexBanner.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fuint.business.indexBanner.entity.IndexBanner;
public interface IndexBannerMapper extends BaseMapper<IndexBanner> {
}

View File

@ -0,0 +1,13 @@
package com.fuint.business.indexBanner.service;
import com.fuint.business.indexBanner.entity.IndexBanner;
import java.util.List;
public interface IndexBannerService {
/**
* 根据店铺id查询首页banner图
* @return
*/
List<IndexBanner> selectIndexBannerList(int storeId);
}

View File

@ -0,0 +1,22 @@
package com.fuint.business.indexBanner.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.business.indexBanner.entity.IndexBanner;
import com.fuint.business.indexBanner.mapper.IndexBannerMapper;
import com.fuint.business.indexBanner.service.IndexBannerService;
import com.fuint.common.dto.AccountInfo;
import com.fuint.common.util.TokenUtil;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class IndexBannerServiceImpl extends ServiceImpl<IndexBannerMapper, IndexBanner> implements IndexBannerService {
@Override
public List<IndexBanner> selectIndexBannerList(int storeId) {
// AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
QueryWrapper queryWrapper = new QueryWrapper<>();
queryWrapper.eq("store_id",storeId);
return baseMapper.selectList(queryWrapper);
}
}

View File

@ -97,8 +97,8 @@ public class ActiveExchangeController extends BaseController {
* @param paymentActiveDTO
* @return
*/
@GetMapping("test")
public ResponseObject paymentActiveVO(@Param("transferDTO") PaymentActiveDTO paymentActiveDTO) {
@PostMapping("test")
public ResponseObject paymentActiveVO(@RequestBody PaymentActiveDTO paymentActiveDTO) {
return getSuccessResult(this.activeExchangeService.paymentActive(paymentActiveDTO));
}

View File

@ -395,10 +395,10 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService {
if (activeDiscountPayVO.getOilId().contains(paymentActiveDTO.getOilId().toString()) &&
activeDiscountPayVO.getAdaptUser().contains(paymentActiveDTO.getMtUserLevel().toString())){
if (activeDiscountPayVO.getDiscount() * activeDiscountPayVO.getAmount() > amount){
amount = activeDiscountPayVO.getDiscount() * activeDiscountPayVO.getAmount();
amount = paymentActiveDTO.getAmount() - (activeDiscountPayVO.getDiscount() * activeDiscountPayVO.getAmount());
paymentActiveVO.setActiveId(activeDiscountPayVO.getActiveId());
paymentActiveVO.setAmount(activeDiscountPayVO.getAmount());
paymentActiveVO.setFavorableAmount(amount);
paymentActiveVO.setAmount(amount);
paymentActiveVO.setFavorableAmount(activeDiscountPayVO.getAmount());
}
}
}
@ -410,10 +410,10 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService {
if (activeDiscountPayVO.getOilId().contains(paymentActiveDTO.getOilId().toString()) &&
activeDiscountPayVO.getAdaptUser().contains(paymentActiveDTO.getMtUserLevel().toString())){
if (activeDiscountPayVO.getAmount() > amount){
amount = activeDiscountPayVO.getDiscount() * activeDiscountPayVO.getAmount();
amount = paymentActiveDTO.getAmount() - activeDiscountPayVO.getAmount();
paymentActiveVO.setActiveId(activeDiscountPayVO.getActiveId());
paymentActiveVO.setAmount(activeDiscountPayVO.getAmount());
paymentActiveVO.setFavorableAmount(amount);
paymentActiveVO.setAmount(amount);
paymentActiveVO.setFavorableAmount(activeDiscountPayVO.getAmount());
}
}
}

View File

@ -359,7 +359,7 @@
adc.deduction_amount discount
FROM
active_fullminus af
LEFT JOIN active_discount_child adc ON af.id = adc.active_discount_id
LEFT JOIN active_discount_child adc ON af.id = adc.active_fullminus_id
where af.store_id = #{storeId}
and adc.amount &lt;= #{amount}
</select>

View File

@ -890,8 +890,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
// 查询会员等级列表信息
Page page = new Page(1,20);
LJUserGrade ljUserGrade1 = new LJUserGrade();
IPage<LJUserGrade> ljUserGradeIPage = userGradeService.selectUserGradeList(page, ljUserGrade1);
List<LJUserGrade> records = ljUserGradeIPage.getRecords();
List<LJUserGrade> records = userGradeService.selectUserGradeAll(storeId);
if (oilName.getOilType().equals("汽油")){
gasGrowthValue = Integer.valueOf(sysConfigService.getValueByKey("gas_growth_value"));
Integer addVal = (int) (gasGrowthValue * oilActualPay);

View File

@ -132,7 +132,7 @@
</select>
<select id="selectOilNumberNameByStoreId" resultType="com.fuint.business.petrolStationManagement.vo.OilNumberNameVo"
parameterType="java.lang.Integer">
select onu.*,ona.oil_type,ona.oil_name oilNames,ot.id tankId from oil_tank ot
select onu.*,ona.oil_type,ona.oil_name oilNames,ona.id oilId,ot.id tankId from oil_tank ot
left join oil_number onu on ot.number_id = onu.number_id
left join oil_name ona on onu.oil_name = ona.id
<where>

View File

@ -11,4 +11,6 @@ public class OilNumberNameVo extends OilNumber {
private String oilNames;
// 油罐id
private String tankId;
// 油品id
private Integer oilId;
}

View File

@ -117,6 +117,7 @@
<include refid="selectUser"></include>
<where>
mu.id = #{id}
limit 1
</where>
</select>

View File

@ -19,6 +19,13 @@ public interface LJUserGradeService extends IService<LJUserGrade> {
*/
public IPage<LJUserGrade> selectUserGradeList(Page page, LJUserGrade userGrade);
/**
* 根据店铺id查询当前店铺所有等级列表信息
* @param storeId
* @return
*/
public List<LJUserGrade> selectUserGradeAll(int storeId);
/**
* 查询所有会员等级信息
* @return

View File

@ -46,6 +46,14 @@ public class LJUserGradeServiceImpl extends ServiceImpl<LJUserGradeMapper, LJUse
return ljUserGradeIPage;
}
@Override
public List<LJUserGrade> selectUserGradeAll(int storeId) {
QueryWrapper queryWrapper = new QueryWrapper<>();
queryWrapper.eq("status","qy");
queryWrapper.eq("store_id",storeId);
return baseMapper.selectList(queryWrapper);
}
@Override
public List<LJUserGrade> selectUserGradeAll() {
QueryWrapper queryWrapper = new QueryWrapper<>();

View File

@ -234,6 +234,7 @@ public class LJUserServiceImpl extends ServiceImpl<LJUserMapper, LJUser> impleme
user1.setName(user.getName());
}
user1.setOpenId(user.getOpenId());
user1.setUserId(user.getUserId());
user1.setMobile(user.getMobile());
user1.setIdcard(user.getIdcard());
user1.setSex(user.getSex());

View File

@ -35,6 +35,9 @@ public class LJUserVo extends BaseEntity {
// @ExcelProperty(value = "微信")
private String openId;
// 支付宝userid
private String userId;
// 手机号码
@ExcelProperty(value = "手机号码(必填)")
private String mobile;

View File

@ -4,12 +4,17 @@ import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONObject;
import com.alipay.api.AlipayApiException;
import com.alipay.api.response.AlipaySystemOauthTokenResponse;
import com.fuint.business.storeInformation.entity.LJStore;
import com.fuint.business.storeInformation.service.ILJStoreService;
import com.fuint.business.userManager.entity.LJUser;
import com.fuint.business.userManager.service.LJUserService;
import com.fuint.business.userManager.vo.LJUserVo;
import com.fuint.common.dto.AccountInfo;
import com.fuint.common.util.TokenUtil;
import com.fuint.framework.web.BaseController;
import com.fuint.framework.web.ResponseObject;
import com.fuint.module.AlipayApi.service.AlipayService1;
import com.fuint.module.backendApi.response.LoginResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -19,6 +24,8 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
import java.util.Date;
import java.util.Map;
@RestController
@ -29,6 +36,8 @@ public class AlipayController extends BaseController {
private AlipayService1 alipayService;
@Autowired
private LJUserService userService;
@Autowired
private ILJStoreService iljStoreService;
/**
* 获取支付宝userId
@ -36,32 +45,51 @@ public class AlipayController extends BaseController {
* @return
*/
@PostMapping("/getUserid")
public ResponseObject getUserId(@Validated @RequestBody Map<String,String> map) throws AlipayApiException {
public ResponseObject getUserId(@RequestBody Map<String,String> map,HttpServletRequest request) throws AlipayApiException {
String authCode = map.get("authCode");
JSONObject paramsObj = new JSONObject(map.isEmpty());
logger.info("微信授权登录参数:{}", map);
JSONObject userInfo = paramsObj.getJSONObject("userInfo");
String storeId = ObjectUtil.isEmpty(userInfo.get("storeId"))? "" : userInfo.get("storeId").toString();
if ("".equals(storeId)) return getFailureResult(0, "微信登录失败");
logger.info("支付宝授权登录参数:{}", map);
String storeId = map.get("storeId");
if ("".equals(storeId)) return getFailureResult(0, "支付宝登录失败");
// 根据storeId查找对应的连锁店id
LJStore ljStore = iljStoreService.selectStoreByIdUni(Integer.parseInt(storeId));
// 获取支付宝userid
AlipaySystemOauthTokenResponse alipayProfile = alipayService.getAlipayProfile(authCode);
if (alipayProfile == null) {
return getFailureResult(0, "支付宝登录失败");
}
String userId = alipayProfile.getUserId();
// 根据手机号查询用户信息
LJUser user = userService.selectUserByMobile(userInfo.get("phone").toString());
LJUser user = userService.selectUserByMobile(map.get("phone"));
if (ObjectUtil.isNotEmpty(user)){
// 添加用户的支付宝userid
// 存在则修改用户的支付宝userid
user.setUserId(userId);
userService.updateById(user);
}else {
// 不存在则添加用户的支付宝userid
LJUserVo ljUser = new LJUserVo();
ljUser.setMobile(userInfo.get("phone").toString());
ljUser.setMobile(map.get("phone"));
ljUser.setUserId(userId);
userService.insertUser(ljUser);
}
LJUser ljUser = userService.selectUserByMobile(map.get("phone"));
return getSuccessResult("");
String userAgent = request.getHeader("user-agent");
AccountInfo accountInfo = new AccountInfo();
accountInfo.setId(ljUser.getId());
accountInfo.setDeptId(-1L);
if (ObjectUtil.isNotEmpty(storeId) && storeId!= "") {
accountInfo.setStoreId(Integer.parseInt(storeId));
}
String token = TokenUtil.generateToken(userAgent, ljUser.getId());
accountInfo.setToken(token);
TokenUtil.saveAccountToken(accountInfo);
LoginResponse response = new LoginResponse();
response.setLogin(true);
response.setChainStoreId(ljStore.getChainStoreId());
response.setToken(token);
response.setTokenCreatedTime(new Date());
return getSuccessResult("登录成功",response);
}
}

View File

@ -41,7 +41,7 @@
// #ifdef MP-ALIPAY
uni.setStorageSync("appltType","ALIPAY")
console.log("支付宝")
my.canIUse('button.open-type.getAuthorize')
// #endif
},
onShow: function() {

View File

@ -5,7 +5,7 @@ module.exports = {
baseUrl: 'http://192.168.0.121:8080/',
// baseUrl: 'http://192.168.1.5:8002/cdJdc',
imagesUrl: 'http://www.nuoyunr.com/lananRsc',
imagesUrl: 'https://www.tuofeng.cc/oilRescue',
// 应用信息
appInfo: {
// 应用名称

View File

@ -7,7 +7,7 @@ import share from './utils/share.js'
Vue.mixin(share)
const baseUrl = config.baseUrl
Vue.prototype.$baseUrl = baseUrl;
Vue.prototype.$imageUrl = config.imageUrl;
// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'

View File

@ -5,15 +5,16 @@
<!-- 顶部 -->
<view class="conttainer-top">
<!-- 轮播图 -->
<!-- <view style="width: 100%;height: 300px;">
<swiper class="swiper" circular :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval"
<view style="width: 100%;height: 300px;">
<swiper class="swiper" style="width: 100%;height: 300px;" circular :indicator-dots="indicatorDots"
:autoplay="autoplay" :interval="interval"
:duration="duration">
<swiper-item v-for="(item,index) in list1" :key="index">
<view class="swiper-item uni-bg-red">A</view>
<image :src="item"></image>
<swiper-item v-for="(item,index) in list1" :key="index" @click="goPage(item.routeUrl)">
<view class="swiper-item uni-bg-red"></view>
<image style="width: 100%;" :src="item.bannerUrl"></image>
</swiper-item>
</swiper>
</view> -->
</view>
<!-- 标题 -->
<view class="top-title">
@ -185,7 +186,7 @@
if (q == undefined) {
let str = q.split("?")[1];
let arr = str.split("&");
let storeId = "";
let storeId = "16";
let staffId = "";
arr.forEach(item => {
if (item.includes("storeId")) {
@ -206,12 +207,30 @@
},
onShow() {
this.isJoined()
this.getIndexBanner()
// this.isExistStoreId();
},
components: {
tabbar
},
methods: {
// banner
goPage(url){
uni.navigateTo({
url:url,
})
},
//
getIndexBanner(){
if (uni.getStorageSync("storeId")){
request({
url: 'business/indexBanner/list/'+uni.getStorageSync("storeId"),
method: 'get',
}).then(res => {
this.list1 = res.data
})
}
},
//
isJoined() {
request({
@ -277,10 +296,11 @@
let _this = this;
// this.getAddress();
wx.getSetting({
uni.getSetting({
success(res) {
console.log(res,111)
if (!res.authSetting['scope.userLocation']) {
wx.authorize({
uni.authorize({
scope: 'scope.userLocation',
success() {
//
@ -493,7 +513,7 @@
width: 100%;
height: 250px;
// background-color: #3da4df;
background: url('http://47.95.206.185:83/topbj.png')center no-repeat;
// background: url('http://47.95.206.185:83/topbj.png')center no-repeat;
background-size: 100% 100%;
position: relative;
margin-bottom: 60px;

View File

@ -113,7 +113,7 @@
data() {
return {
value: '',
liters:"",
liters:"",
show: false,
pic: 0,
hindex: 0,
@ -159,7 +159,7 @@
orderAmount:0,
discountAmount:0,
payAmount:0,
payType:"WECHAT",
payType:uni.getStorageSync("appltType"),
},
}
},
@ -189,6 +189,7 @@
onShow() {
// this.isExistStoreId();
this.getStore(uni.getStorageSync("storeId"));
// this.getStore(0);
},
methods: {
isExistStoreId(){

View File

@ -57,6 +57,7 @@
// return;
// }
console.log(e)
let _this = this;
my.getAuthCode({
scopes: 'auth_base',
@ -68,15 +69,23 @@
method: 'post',
data: {
authCode:authCode,
userInfo: {
storeId: 0,
staffId: "",
phone: '18457621459'
},
storeId:0,
staffId:"",
phone:"18457621459",
},
}).then((resp)=>{
console.log(resp)
// uni.setStorageSync("userId",resp.data)
if (resp.code == 200) {
uni.setStorageSync('App-Token', resp.data.token);
uni.setStorageSync('chainStoreId', resp.data.chainStoreId);
uni.navigateTo({
url: '/pages/index/index'
})
}
console.log("swq", uni.getStorageSync(
'App-Token'));
})
},
fail: err => {

View File

@ -72,6 +72,7 @@
let _this = this;
let tempFilePath = e.detail.avatarUrl //
let maxSizeInBytes = 1024*1024 //
console.log(111)
uni.getFileInfo({
filePath:tempFilePath,
success(res) {

View File

@ -60,15 +60,15 @@
<view class="desc" >
<view style="display: flex;">
满减活动优惠
<span style="display: flex;">(满减活动})</span>
活动优惠
<!-- <span style="display: flex;">(满减活动)</span> -->
</view>
<view style="display: flex;">
<span style="margin-right: 10px;">-{{fullRedece}}</span>
</view>
</view>
<view class="desc" >
<!-- <view class="desc" >
<view style="display: flex;">
优惠券优惠
<span style="display: flex;">(优惠券)</span>
@ -76,7 +76,7 @@
<view style="display: flex;">
<span style="margin-right: 10px;">-{{couponRedece}}</span>
</view>
</view>
</view> -->
<view class="desc" v-if="isGradePreferential">
<view style="display: flex;">
@ -94,17 +94,20 @@
<view style="background-color: white;width: 94%;margin: 15px auto;height: 100px;">
<view style="font-weight: bold;height: 40px;line-height: 40px;margin-left: 10px;margin-top: 20px;">支付方式
</view>
<!-- <view class="desc">
<view>微信支付</view>
<u-radio-group v-model="value">
<u-radio name="wx"></u-radio>
</u-radio-group>
</view> -->
<!-- #ifdef MP-WEIXIN -->
<view class="scc">
<image src="@/static/imgs/wechat.png" class="imgIcon"></image>
<span style="width: 70%;margin-top: 5px;">微信支付</span>
<radio value="r1" checked="true" />
</view>
<!-- #endif -->
<!-- #ifdef MP-ALIPAY -->
<view class="scc">
<image src="@/static/imgs/alipay.png" class="imgIcon"></image>
<span style="width: 70%;margin-top: 5px;">支付宝支付</span>
<radio value="r1" checked="true" />
</view>
<!-- #endif -->
</view>
<!-- 支付信息 -->
@ -130,7 +133,7 @@
data() {
return {
// WECHAT ALIPAY
appltType: "WECHAT",
appltType: uni.getStorageSync("appltType"),
gradeDis:"",
title: '',
value: true,
@ -146,6 +149,8 @@
oilName: "",
//
oilType:"",
// id
oilId:"",
//
user:{
cardBalance:0,
@ -179,11 +184,17 @@
isStoreValueCard:false,
// 使
isGradePreferential:false,
transferDTO:{
type:0,
amount:0,
oilId:"",
mtUserLevel:"",
}
}
},
onLoad(e) {
this.orderNo = e.orderNo
// this.orderNo = "234520231226154037a1f53b"
// this.orderNo = "234520231229140854e4c4ca"
},
onShow() {
this.getOilOrder();
@ -214,14 +225,14 @@
method: 'post',
data: map,
}).then(res => {
// console.log(res)
// console.log(res,_this.appltType)
let payProvider = "wxpay"
if (_this.appltType== "WECHAT"){
payProvider = "wxpay"
}else{
payProvider = "alipay"
}
if (res.data.reservedPayInfo!=null && res.data.reservedPayInfo!=""){
if (res.data.data.reservedPayInfo!=null && res.data.data.reservedPayInfo!=""){
_this.orderInfo = JSON.parse(res.data.data.reservedPayInfo);
uni.requestPayment({
// provider: 'wxpay' 'alipay'
@ -260,6 +271,9 @@
my.tradePay({ tradeNO: res.data.data.reservedTransactionId }, function(resp){
if(resp.resultCode == '9000'){
console.log("支付成功")
uni.reLaunch({
url: '/pagesRefuel/orderSuccess/index'
})
}else{
request({
url: "/business/allOrderInfo/orderStatus",
@ -312,6 +326,7 @@
this.deductAmount = this.oilOrder.orderAmount - this.balanceRedece
this.payAmount = this.oilOrder.orderAmount - this.balanceRedece
}
this.preferential.amount = this.deductAmount
}else{
// 使
//
@ -325,6 +340,7 @@
}
}else{
this.deductAmount = this.oilOrder.orderAmount
this.transferDTO.amount = this.deductAmount
}
},
// 使
@ -336,6 +352,7 @@
}).then((res) => {
if (res.data != null && res.data != ""){
that.userGrade = res.data
that.chooseFullOrCoupon();
if (res.data.preferential== "自定义优惠"){
if (that.oilType == "汽油"){
//
@ -477,6 +494,25 @@
}
})
},
// 使
chooseFullOrCoupon(){
this.transferDTO.amount = this.deductAmount
this.transferDTO.mtUserLevel = this.userGrade.id
this.transferDTO.oilId = this.oilId
console.log(this.transferDTO)
let _this = this;
request({
url: "business/marketingActivity/activeExchange/test",
method: 'post',
data:_this.transferDTO,
}).then((res) => {
console.log(res)
if (res.data.amount!=0){
_this.payAmount = res.data.amount - _this.gradeRedece
_this.fullRedece = res.data.favorableAmount
}
})
},
//
countPayMent(){
@ -510,11 +546,14 @@
orderNo: _this.orderNo
},
}).then((res) => {
_this.oilOrder = res.data
_this.getStaffList(res.data.staffId)
_this.getStore(res.data.storeId)
_this.getOilNumber(res.data.storeId)
_this.getUser(res.data.userId)
// console.log(res)
if(res.data!=null){
_this.oilOrder = res.data
_this.getStaffList(res.data.staffId)
_this.getStore(res.data.storeId)
_this.getOilNumber(res.data.storeId)
_this.getUser(res.data.userId)
}
})
},
//
@ -552,6 +591,7 @@
_this.oilPrice = item.gbPrice;
_this.oilName = item.oilNames;
_this.oilType = item.oilType;
_this.oilId = item.oilId;
}
})
})