收银台

This commit is contained in:
Vinjor 2024-09-21 09:14:15 +08:00
parent 733b552060
commit 776ab61925
11 changed files with 158 additions and 18 deletions

View File

@ -11,7 +11,7 @@ VUE_APP_BASE_API = '/dev-api'
VUE_APP_PUBLIC_PATH = '/' VUE_APP_PUBLIC_PATH = '/'
# 后端接口地址 # 后端接口地址
VUE_APP_SERVER_URL = 'http://192.168.31.178:8080/' VUE_APP_SERVER_URL = 'http://127.0.0.1:8081/'
# http://192.168.0.121:8080/ # http://192.168.0.121:8080/

View File

@ -0,0 +1,52 @@
package com.fuint.pay.controller;
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 org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.util.Map;
/**
* 收银台支付中心逻辑控制层
* @author vinjor-M
* @date 11:55 2024/9/19
**/
@RestController
@RequestMapping("/pay/paycenter")
public class PayCenterController extends BaseController {
private Logger logger = LoggerFactory.getLogger(PayCenterController.class);
/**
* 收银台获取可用优惠券和可以参加的优惠活动
* @author vinjor-M
* @date 12:01 2024/9/19
* @param map 请求参数
* @param request
* @return com.fuint.framework.web.ResponseObject
**/
@GetMapping("/getActivityAndCoupon")
public ResponseObject getActivityAndCoupon(Map<String,String> map,HttpServletRequest request) throws Exception {
logger.info("收银台获取可用优惠券和可以参加的优惠活动参数:{}", map);
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
//会员的用户id
String userId = map.get("userId");
//油号
String oil = map.get("oil");
//加油金额不含商品金额
String oilAmount = map.get("oilAmount");
//订单总额含商品金额
String orderAmount = map.get("orderAmount");
//油升数
String oilLiter = map.get("oilLiter");
//当前店铺id
Integer storeId = nowAccountInfo.getStoreId();
return getSuccessResult("查询成功",);
}
}

View File

@ -0,0 +1,20 @@
package com.fuint.pay.service;
import java.util.Map;
/**
* 收银台支付中心逻辑层
* @author vinjor-M
* @date 14:10 2024/9/19
**/
public interface PayCenterService {
/**
* 收银台获取可用优惠券和可以参加的优惠活动
* @author vinjor-M
* @date 14:24 2024/9/19
* @param map 请求参数
* @return java.lang.Object
**/
Object getActivityAndCoupon(Map<String,String> map);
}

View File

@ -0,0 +1,26 @@
package com.fuint.pay.service.impl;
import com.fuint.module.AlipayApi.service.impl.AlipayServiceImpl1;
import com.fuint.pay.service.PayCenterService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import java.util.Map;
@Service
public class PayCenterServiceImpl implements PayCenterService {
private static final Logger logger = LoggerFactory.getLogger(PayCenterServiceImpl.class);
/**
* 收银台获取可用优惠券和可以参加的优惠活动
*
* @param map 请求参数
* @return java.lang.Object
* @author vinjor-M
* @date 14:24 2024/9/19
**/
@Override
public Object getActivityAndCoupon(Map<String, String> map) {
return null;
}
}

View File

@ -0,0 +1,18 @@
package com.fuint.pay.vo;
import lombok.Data;
import java.io.Serializable;
/**
* 收银台可用营销活动VO
* @author vinjor-M
* @date 14:11 2024/9/19
**/
@Data
public class ActivityVO implements Serializable {
/** 活动id */
private Integer id;
/** 活动类别 */
private String type;
}

View File

@ -0,0 +1,18 @@
package com.fuint.pay.vo;
import lombok.Data;
import java.io.Serializable;
/**
* 收银台可用优惠券VO
* @author vinjor-M
* @date 14:11 2024/9/19
**/
@Data
public class CouponVO implements Serializable {
/** 优惠券id */
private Integer id;
/** 优惠券名称 */
private String name;
}

View File

@ -3,7 +3,7 @@ server.port=8081
env.profile=dev env.profile=dev
#env.properties.path=D:/workspaces/oil-stations/fuintBackend/configure/ #env.properties.path=D:/workspaces/oil-stations/fuintBackend/configure/
#env.properties.path=F:/work/oilSystem/fuintBackend/configure/ #env.properties.path=F:/work/oilSystem/fuintBackend/configure/
env.properties.path=D:/oil/new-oil/oilSystem/fuintBackend/configure/ env.properties.path=D:/my_project/oil-station/fuintBackend/configure/
#env.properties.path=D:/work/oilSystem/fuintBackend/configure/ #env.properties.path=D:/work/oilSystem/fuintBackend/configure/
#env.properties.path=/www/wwwroot/shenlanshuke/oilAdmin/ #env.properties.path=/www/wwwroot/shenlanshuke/oilAdmin/

View File

@ -1,14 +0,0 @@
# 页面标题
VUE_APP_TITLE = 百业兴智慧收银台
# 开发环境配置
ENV = 'development'
# fuint会员营销系统/开发环境
VUE_APP_BASE_API = '/dev-api'
# 发布目录
VUE_APP_PUBLIC_PATH = '/'
# 后端接口地址
VUE_APP_SERVER_URL = 'http://192.168.31.95:8080/'

View File

@ -15,3 +15,11 @@ export function cashRegisterGoodsList() {
method: 'get', method: 'get',
}) })
} }
export function getActivityAndCoupon(data) {
return request({
url: '/pay/paycenter/getActivityAndCoupon',
method: 'get',
params: data
})
}

View File

@ -378,7 +378,7 @@ import pickUp from './newHomeComponents/pickUpTheOrder.vue'
import accountPending from './newHomeComponents/accountPending.vue' import accountPending from './newHomeComponents/accountPending.vue'
import memberRecharge from './newHomeComponents/memberRecharge.vue' import memberRecharge from './newHomeComponents/memberRecharge.vue'
import refuelingAmount from './newHomeComponents/refuelingAmount.vue' import refuelingAmount from './newHomeComponents/refuelingAmount.vue'
import { cashRegisterList, cashRegisterGoodsList } from '@/api/newHome/newHome.js' import { cashRegisterList, cashRegisterGoodsList,getActivityAndCoupon } from '@/api/newHome/newHome.js'
export default { export default {
data() { data() {
@ -450,7 +450,7 @@ export default {
}, },
// //
dataList: {}, dataList: {},
userInfo: true,// userInfo: false,//
ruleIndex: 0, ruleIndex: 0,
tabIndex: 0, tabIndex: 0,
newMember: false, newMember: false,
@ -534,7 +534,19 @@ export default {
}, },
methods: { methods: {
/**
* @description 油枪金额和商品金额发生变化请求后端查询可用优惠活动和优惠券
* 传入后台的参数会员的用户id加油油号加油订单金额不包括商品金额加油订单总金额包括商品金额加油总升数
* @author vinjor-m
* @date 2024年9月19日
*/
getActivityAndCoupon(){
//
let dataObj = {userId:"",oil:"",oilAmount:"",orderAmount:"",oilLiter:""}
getActivityAndCoupon(dataObj).then(res => {
})
},
// //
getOilList() { getOilList() {
cashRegisterList().then(res => { cashRegisterList().then(res => {