收银台
This commit is contained in:
parent
733b552060
commit
776ab61925
@ -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/
|
||||||
|
@ -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("查询成功",);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -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);
|
||||||
|
}
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
@ -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;
|
||||||
|
}
|
@ -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;
|
||||||
|
}
|
@ -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/
|
||||||
|
|
||||||
|
@ -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/'
|
|
@ -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
|
||||||
|
})
|
||||||
|
}
|
||||||
|
@ -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 => {
|
||||||
|
BIN
产品文档/油站数据库设计.xls
BIN
产品文档/油站数据库设计.xls
Binary file not shown.
Loading…
Reference in New Issue
Block a user