diff --git a/fuintAdmin/.env.development b/fuintAdmin/.env.development index 89b6b1bdb..bbd9ea05c 100644 --- a/fuintAdmin/.env.development +++ b/fuintAdmin/.env.development @@ -11,7 +11,7 @@ VUE_APP_BASE_API = '/dev-api' 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/ diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/pay/controller/PayCenterController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/pay/controller/PayCenterController.java new file mode 100644 index 000000000..070905d8a --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/pay/controller/PayCenterController.java @@ -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 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("查询成功",); + } + +} diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/pay/service/PayCenterService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/pay/service/PayCenterService.java new file mode 100644 index 000000000..7cc892811 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/pay/service/PayCenterService.java @@ -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 map); +} diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/pay/service/impl/PayCenterServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/pay/service/impl/PayCenterServiceImpl.java new file mode 100644 index 000000000..f28f8a107 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/pay/service/impl/PayCenterServiceImpl.java @@ -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 map) { + return null; + } +} diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/pay/vo/ActivityVO.java b/fuintBackend/fuint-application/src/main/java/com/fuint/pay/vo/ActivityVO.java new file mode 100644 index 000000000..9e133a242 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/pay/vo/ActivityVO.java @@ -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; +} diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/pay/vo/CouponVO.java b/fuintBackend/fuint-application/src/main/java/com/fuint/pay/vo/CouponVO.java new file mode 100644 index 000000000..3f517a70b --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/pay/vo/CouponVO.java @@ -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; +} diff --git a/fuintBackend/fuint-application/src/main/resources/application.properties b/fuintBackend/fuint-application/src/main/resources/application.properties index 2a7c7577f..ea6ede1ea 100644 --- a/fuintBackend/fuint-application/src/main/resources/application.properties +++ b/fuintBackend/fuint-application/src/main/resources/application.properties @@ -3,7 +3,7 @@ server.port=8081 env.profile=dev #env.properties.path=D:/workspaces/oil-stations/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=/www/wwwroot/shenlanshuke/oilAdmin/ diff --git a/fuintCashierWeb/.env.development b/fuintCashierWeb/.env.development deleted file mode 100644 index d5d76f22e..000000000 --- a/fuintCashierWeb/.env.development +++ /dev/null @@ -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/' diff --git a/fuintCashierWeb/src/api/newHome/newHome.js b/fuintCashierWeb/src/api/newHome/newHome.js index 7b0cc5b41..104d19a3d 100644 --- a/fuintCashierWeb/src/api/newHome/newHome.js +++ b/fuintCashierWeb/src/api/newHome/newHome.js @@ -15,3 +15,11 @@ export function cashRegisterGoodsList() { method: 'get', }) } + +export function getActivityAndCoupon(data) { + return request({ + url: '/pay/paycenter/getActivityAndCoupon', + method: 'get', + params: data + }) +} diff --git a/fuintCashierWeb/src/views/cashier/NewComponents/newHome.vue b/fuintCashierWeb/src/views/cashier/NewComponents/newHome.vue index 68710ed3e..8b5d254e0 100644 --- a/fuintCashierWeb/src/views/cashier/NewComponents/newHome.vue +++ b/fuintCashierWeb/src/views/cashier/NewComponents/newHome.vue @@ -378,7 +378,7 @@ import pickUp from './newHomeComponents/pickUpTheOrder.vue' import accountPending from './newHomeComponents/accountPending.vue' import memberRecharge from './newHomeComponents/memberRecharge.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 { data() { @@ -450,7 +450,7 @@ export default { }, //油枪列表数据 dataList: {}, - userInfo: true,//判断登录状态 + userInfo: false,//判断登录状态 ruleIndex: 0, tabIndex: 0, newMember: false, @@ -534,7 +534,19 @@ export default { }, methods: { + /** + * @description 油枪金额和商品金额发生变化,请求后端查询可用优惠活动和优惠券 + * 传入后台的参数,会员的用户id、加油油号、加油订单金额(不包括商品金额)、加油订单总金额(包括商品金额)、加油总升数 + * @author vinjor-m + * @date 2024年9月19日 + */ + getActivityAndCoupon(){ + //组装请求参数 + let dataObj = {userId:"",oil:"",oilAmount:"",orderAmount:"",oilLiter:""} + getActivityAndCoupon(dataObj).then(res => { + }) + }, //油枪初始化 getOilList() { cashRegisterList().then(res => { diff --git a/产品文档/油站数据库设计.xls b/产品文档/油站数据库设计.xls index 7a581698a..80257d23f 100644 Binary files a/产品文档/油站数据库设计.xls and b/产品文档/油站数据库设计.xls differ