From cf631ad033230060b7d03119d5c188d57cf3038b Mon Sep 17 00:00:00 2001
From: cun-nan <19819293608@163.com>
Date: Tue, 23 Jan 2024 18:14:56 +0800
Subject: [PATCH] bug
---
.../src/components/map/mapComponent.vue | 2 +-
fuintAdmin/src/views/staff/list.vue | 6 ++--
.../controller/AlipayController.java | 27 +++++++++++++++++
gasStation-uni/pages/index/index.vue | 4 ++-
gasStation-uni/pagesLogin/login/login.vue | 7 +++--
gasStation-uni/pagesMy/comment/comment.vue | 30 ++++++++++++++-----
gasStation-uni/pagesMy/details/details.vue | 6 ++--
gasStation-uni/pagesMy/myorder/myorder.vue | 13 +++++---
.../pagesRefuel/orderDetail/index.vue | 1 +
9 files changed, 76 insertions(+), 20 deletions(-)
diff --git a/fuintAdmin/src/components/map/mapComponent.vue b/fuintAdmin/src/components/map/mapComponent.vue
index c0b4ba933..7d491c087 100644
--- a/fuintAdmin/src/components/map/mapComponent.vue
+++ b/fuintAdmin/src/components/map/mapComponent.vue
@@ -91,7 +91,7 @@ export default {
}).then((AMap) => {
this.map = new AMap.Map("container", {
viewMode: "2D", //是否为3D地图模式
- zoom: 11, //初始化地图级别
+ zoom: 16, //初始化地图级别
center: [_this.form.lng, _this.form.lat], //初始化地图中心点位置
});
// console.log(this.map.center)
diff --git a/fuintAdmin/src/views/staff/list.vue b/fuintAdmin/src/views/staff/list.vue
index 62a88220c..821641377 100644
--- a/fuintAdmin/src/views/staff/list.vue
+++ b/fuintAdmin/src/views/staff/list.vue
@@ -633,7 +633,9 @@ export default {
submitForm: function() {
this.$refs["form"].validate(valid => {
if (valid) {
- this.form.auditPrem = this.form.auditPrem.toString();
+ if (this.form.auditPrem){
+ this.form.auditPrem = this.form.auditPrem.toString();
+ }
if (!this.form.id) {
queryStaff({mobile:this.form.mobile}).then( response => {
if(response.data!=null){
@@ -676,7 +678,7 @@ export default {
this.form.refundPassword = '123456'
this.open = true;
this.title = "编辑员工信息";
- if (this.form.auditPrem.length > 0){
+ if (this.form.auditPrem && this.form.auditPrem.length > 0){
// this.form.auditPrem = this.form.auditPrem.split(",");
this.auditPrem = []
this.auditPrem = this.form.auditPrem.split(",");
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/module/AlipayApi/controller/AlipayController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/module/AlipayApi/controller/AlipayController.java
index 2654e4f2b..41ecdd6ca 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/module/AlipayApi/controller/AlipayController.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/module/AlipayApi/controller/AlipayController.java
@@ -7,7 +7,11 @@ 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.entity.LJUserGrade;
+import com.fuint.business.userManager.entity.UserBalance;
+import com.fuint.business.userManager.service.LJUserGradeService;
import com.fuint.business.userManager.service.LJUserService;
+import com.fuint.business.userManager.service.UserBalanceService;
import com.fuint.business.userManager.vo.LJUserVo;
import com.fuint.common.dto.AccountInfo;
import com.fuint.common.util.TokenUtil;
@@ -38,6 +42,10 @@ public class AlipayController extends BaseController {
private LJUserService userService;
@Autowired
private ILJStoreService iljStoreService;
+ @Autowired
+ private UserBalanceService userBalanceService;
+ @Autowired
+ private LJUserGradeService ljUserGradeService;
/**
* 获取支付宝userId
@@ -80,6 +88,25 @@ public class AlipayController extends BaseController {
userService.addUser(ljUser);
}
LJUser ljUser = userService.selectUserByMobile(mobile);
+ // 根据userid和连锁店id查询是否存在对应的余额信息
+ UserBalance userBalance = userBalanceService.selectUserBalance(ljUser.getId(), ljStore.getChainStoreId());
+ if (ObjectUtil.isEmpty(userBalance)) {
+ // 新增余额信息
+ UserBalance userBalanceAdd = new UserBalance();
+ userBalanceAdd.setMtUserId(ljUser.getId());
+ userBalanceAdd.setStoreId(Integer.parseInt(storeId));
+ userBalanceAdd.setChainStoreId(ljStore.getChainStoreId());
+ userBalanceAdd.setCardBalance(0.0);
+ userBalanceAdd.setPoints(0);
+ userBalanceAdd.setGrowthValue(0);
+ userBalanceAdd.setConsumeNum(0);
+ LJUserGrade ljUserGrade = ljUserGradeService.selectUserGradeByStoreId(Integer.parseInt(storeId));
+ if (ObjectUtil.isNotEmpty(ljUserGrade) && ObjectUtil.isNotEmpty(ljUserGrade.getId())) {
+ userBalanceAdd.setGradeId(ljUserGrade.getId());
+ }
+ // 新增会员余额信息
+ userBalanceService.insertUserBalance(userBalanceAdd);
+ }
String userAgent = request.getHeader("user-agent");
AccountInfo accountInfo = new AccountInfo();
diff --git a/gasStation-uni/pages/index/index.vue b/gasStation-uni/pages/index/index.vue
index 0059c2024..f056ddb7c 100644
--- a/gasStation-uni/pages/index/index.vue
+++ b/gasStation-uni/pages/index/index.vue
@@ -184,7 +184,8 @@ import { callWithErrorHandling } from "vue"
},
onLoad(query) {
if (query.storeId) {
- uni.setStorageSync("y_storeId", query.storeId)
+ // uni.setStorageSync("y_storeId", query.storeId)
+ uni.setStorageSync("storeId", query.storeId)
}
if (query.type) {
uni.setStorageSync("y_type", query.type)
@@ -435,6 +436,7 @@ import { callWithErrorHandling } from "vue"
uni.setStorageSync("storeId", response.data.store.id)
uni.setStorageSync("chainStoreId", response.data.store
.chainStoreId)
+ console.log(uni.getStorageSync("chainStoreId"));
let welfare = response.data.store.welfare
if (welfare) {
if (welfare.includes(",")) {
diff --git a/gasStation-uni/pagesLogin/login/login.vue b/gasStation-uni/pagesLogin/login/login.vue
index 0380fcd65..5ba0aa001 100644
--- a/gasStation-uni/pagesLogin/login/login.vue
+++ b/gasStation-uni/pagesLogin/login/login.vue
@@ -86,13 +86,13 @@
method: 'post',
data: {
authCode: authCode,
- storeId: 0,
+ storeId: uni.getStorageSync("storeId"),
staffId: "",
phone: "18457621459",
encryptedData: encryptedData,
},
}).then((resp) => {
- console.log(resp)
+ // console.log(resp)
if (resp.code == 200) {
uni.setStorageSync('App-Token', resp.data.token);
@@ -210,7 +210,8 @@
url: "clientApi/sign/alipayLogin/getUserid",
method: 'post',
data: {
- storeId: uni.getStorageSync("y_storeId"),
+ storeId: uni.getStorageSync("storeId"),
+ // storeId: uni.getStorageSync("y_storeId"),
type: uni.getStorageSync("y_type"),
userId: uni.getStorageSync("y_userId"),
},
diff --git a/gasStation-uni/pagesMy/comment/comment.vue b/gasStation-uni/pagesMy/comment/comment.vue
index 2f850f8ec..98b8c9fab 100644
--- a/gasStation-uni/pagesMy/comment/comment.vue
+++ b/gasStation-uni/pagesMy/comment/comment.vue
@@ -13,10 +13,11 @@
您对工作人员满意吗
-
+
+
- username(13583017106)
+ {{user.name?user.name:"未填写"}}({{user.mobile}})
@@ -38,13 +39,14 @@