From 29dbbca735430b7bb95975021e0c08bb986d476c Mon Sep 17 00:00:00 2001 From: wangh <9483> Date: Thu, 4 Jan 2024 15:52:02 +0800 Subject: [PATCH 1/3] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fuintAdmin_zt/.env.development | 5 +- fuintAdmin_zt/src/api/system/Site/site.js | 6 +- fuintAdmin_zt/src/main.js | 1 + fuintAdmin_zt/src/views/Site/index.vue | 8 +- .../src/views/components/Service/index.vue | 6 +- .../src/views/components/Service/payment.vue | 136 ++++++++++++++++-- fuintAdmin_zt/src/views/system/role/index.vue | 3 +- .../integral/mapper/IntegralDetailMapper.java | 2 +- .../mapper/xml/IntegralDetailMapper.xml | 8 +- .../mapper/xml/IntegralOrdersMapper.xml | 3 + .../impl/IntegralOrdersServiceImpl.java | 56 ++++++-- .../impl/IntegralSettingsServiceImpl.java | 2 +- .../system/dept/mapper/xml/SysDeptMapper.xml | 14 +- .../dept/service/impl/SysDeptServiceImpl.java | 4 +- .../main/resources/mapper/TAccountMapper.xml | 54 ++++--- fuintCashierWeb/src/router/index.js | 5 + .../views/cashier/NewComponents/Integral.vue | 4 +- gasStation-uni/pages/index/index.vue | 8 +- .../PointsGoodsDetails/PointsGoodsDetails.vue | 4 +- gasStation-uni/pagesHome/order/order.vue | 29 ++++ 20 files changed, 283 insertions(+), 75 deletions(-) diff --git a/fuintAdmin_zt/.env.development b/fuintAdmin_zt/.env.development index 22deba912..b4d6f2162 100644 --- a/fuintAdmin_zt/.env.development +++ b/fuintAdmin_zt/.env.development @@ -11,5 +11,8 @@ VUE_APP_BASE_API = '/dev-api' VUE_APP_PUBLIC_PATH = '/' # 后端接口地址 -VUE_APP_SERVER_URL = 'http://192.168.0.138:8080/' +# VUE_APP_SERVER_URL = 'http://192.168.0.138:8080/' +VUE_APP_SERVER_URL = 'http://192.168.0.178:8008/' +# cp端地址 +VUE_PC_SERVER_URL = 'http://192.168.0.178:82/' diff --git a/fuintAdmin_zt/src/api/system/Site/site.js b/fuintAdmin_zt/src/api/system/Site/site.js index 130f82d8f..2cabe565c 100644 --- a/fuintAdmin_zt/src/api/system/Site/site.js +++ b/fuintAdmin_zt/src/api/system/Site/site.js @@ -159,10 +159,12 @@ export function updateAuthRole(data) { } // 查询部门下拉树结构 -export function deptTreeSelect() { +export function deptTreeSelect(data) { return request({ url: '/system/dept/deptTree', - method: 'get' + method: 'get', + params: data + }) } diff --git a/fuintAdmin_zt/src/main.js b/fuintAdmin_zt/src/main.js index f6a04b9db..029c93f67 100644 --- a/fuintAdmin_zt/src/main.js +++ b/fuintAdmin_zt/src/main.js @@ -47,6 +47,7 @@ Vue.prototype.addDateRange = addDateRange Vue.prototype.getName = getName Vue.prototype.download = download Vue.prototype.handleTree = handleTree +Vue.prototype.pcUrl = 'http://192.168.0.178:82/' // 全局组件挂载 Vue.component('DictTag', DictTag) diff --git a/fuintAdmin_zt/src/views/Site/index.vue b/fuintAdmin_zt/src/views/Site/index.vue index 37f21ec94..f41a3fe6d 100644 --- a/fuintAdmin_zt/src/views/Site/index.vue +++ b/fuintAdmin_zt/src/views/Site/index.vue @@ -8,7 +8,8 @@ + v-model="filterText" + @input="inputDeptName()">
@@ -787,7 +788,7 @@ /** 查询用户列表 */ async getList() { console.log("123123123",this.form) - await deptTreeSelect().then(response => { + await deptTreeSelect({deptName :this.filterText}).then(response => { this.Thetree = response.data if(this.Thetree.length>0 && !this.queryParams.deptId) { this.queryParams.deptId = this.Thetree[0].id @@ -1075,6 +1076,9 @@ // 提交上传文件 submitFileForm() { this.$refs.upload.submit(); + }, + inputDeptName() { + this.getList() } } }; diff --git a/fuintAdmin_zt/src/views/components/Service/index.vue b/fuintAdmin_zt/src/views/components/Service/index.vue index 290f81df0..22f3abb45 100644 --- a/fuintAdmin_zt/src/views/components/Service/index.vue +++ b/fuintAdmin_zt/src/views/components/Service/index.vue @@ -455,13 +455,9 @@ } singleSignOnApi(this.id).then(res=>{ if (res.code == 200) { - let url = - // let url = process.env.VUE_APP_SERVER_URL - console.log("url",url) - window.open( 'http://localhost:81/index?entrance='+this.id) + window.open(this.pcUrl+'index?entrance='+this.id) } }) - // 在token+入 }, diff --git a/fuintAdmin_zt/src/views/components/Service/payment.vue b/fuintAdmin_zt/src/views/components/Service/payment.vue index 92f98b18a..db16d294e 100644 --- a/fuintAdmin_zt/src/views/components/Service/payment.vue +++ b/fuintAdmin_zt/src/views/components/Service/payment.vue @@ -20,6 +20,7 @@ +
添加商户信息
@@ -30,13 +31,14 @@
- {{ item.merchantName }} + 切换为当前通道 当前使用中
-
商户编号:{{ item.mchntCd }}
+
商户编号: {{ item.mchntCd }}
+
备注: {{ item.remark ? item.remark : "--" }}
@@ -101,18 +103,67 @@
注:规则按照顺序进行处理并自动更换支付通道,新增或变更规则后需要发布当前规则才生效,发布生效后的规则将从序号1的配置生效
+ + + + + + + + + + + + + + + + 取 消 + 确 定 + + + + + 请输入备注信息 + + + + 取 消 + 确 定 + + + - - + :disabled="isDis" placeholder="请选择商户信息" style="width: 100%"> + + + + + (111({{ item.remark ? item.remark : "--" }})) + {{ item.mchntCd }} + @@ -149,7 +200,13 @@ + + diff --git a/fuintAdmin_zt/src/views/indexBanner/index.vue b/fuintAdmin_zt/src/views/indexBanner/index.vue index c98fa5f54..ff255dec4 100644 --- a/fuintAdmin_zt/src/views/indexBanner/index.vue +++ b/fuintAdmin_zt/src/views/indexBanner/index.vue @@ -2,19 +2,18 @@
- - + + + + - + {{scope.row.storeId ? storeName(storeList,scope.row.storeId) : "--"}} - + + + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/MerchantConfigServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/MerchantConfigServiceImpl.java index 773a411ac..19e37f117 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/MerchantConfigServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/MerchantConfigServiceImpl.java @@ -1,5 +1,6 @@ package com.fuint.api.fuyou.service.impl; +import cn.hutool.core.util.ObjectUtil; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.fuint.api.fuyou.entity.FuYouPublicMerchant; @@ -128,7 +129,12 @@ public class MerchantConfigServiceImpl extends ServiceImpl implemen */ @Override public List selectDutyList() { - return baseMapper.selectList(null); + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("duty_type","4"); + return baseMapper.selectList(queryWrapper); } /** diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/service/impl/LJStaffServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/service/impl/LJStaffServiceImpl.java index 45565136a..7ff4952f7 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/service/impl/LJStaffServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/service/impl/LJStaffServiceImpl.java @@ -108,7 +108,7 @@ public class LJStaffServiceImpl extends ServiceImpl impl @Override public void deleteStaffByIds(Integer[] ids) { for (int id : ids){ - baseMapper.deleteById(id); + this.deleteStaffById(id); } } @@ -118,6 +118,8 @@ public class LJStaffServiceImpl extends ServiceImpl impl */ @Override public void deleteStaffById(Integer id) { + LJStaff staff = this.selectStaffById(id); + accountService.deleteAccountByUserName(staff.getMobile()); baseMapper.deleteById(id); } @@ -152,7 +154,7 @@ public class LJStaffServiceImpl extends ServiceImpl impl account.setAccountName(staff.getMobile()); account.setAccountStatus(1); account.setRealName(staff.getRealName()); - account.setRoleIds("0"); + account.setRoleIds(staff.getRoleId()); account.setStaffId(staff1.getId()); account.setCreateTime(new Date()); account.setUpdateTime(new Date()); diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/OilOrderServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/OilOrderServiceImpl.java index 3592729a1..e5280584c 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/OilOrderServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/OilOrderServiceImpl.java @@ -743,8 +743,8 @@ public class OilOrderServiceImpl extends ServiceImpl i oilOrder.setTankId(tankId); - Map applet = null; - + Map applet = new HashMap<>(); + applet.put("success",""); if (!map.get("payAmount").equals("0")) { // 调用支付接口 // 判断是否开启支付规则 @@ -777,6 +777,7 @@ public class OilOrderServiceImpl extends ServiceImpl i oilOrder.setPayTime(new Date()); oilOrder.setOrderStatus("paid"); baseMapper.updateById(oilOrder); + applet.put("success","ok"); } return applet; } @@ -885,7 +886,7 @@ public class OilOrderServiceImpl extends ServiceImpl i Integer dieselGrowthValue = null; Integer naturalGrowthValue = null; LJStore store = storeService.selectStoreByStoreId(storeId); - UserBalance balance = userBalanceService.selectUserBalanceByStorId(userid,storeId); + UserBalance balance = userBalanceService.selectUserBalance(userid,store.getChainStoreId()); int growth = balance.getGrowthValue(); balance.setRefuelMoney(refuelMoney); // 查询会员等级列表信息 @@ -944,15 +945,18 @@ public class OilOrderServiceImpl extends ServiceImpl i AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); // 根据用户id查询用户余额信息 LJStore store = storeService.selectStoreByStoreId(storeId); - UserBalance balance = userBalanceService.selectUserBalanceByStorId(userId,storeId); -// 修改余额信息 - Double beforeBalance = balance.getCardBalance(); - Double afterBalance = beforeBalance - amount; - balance.setCardBalance(afterBalance); + UserBalance balance = userBalanceService.selectUserBalance(userId,store.getChainStoreId()); + if (ObjectUtil.isNotEmpty(balance)){ + // 修改余额信息 + Double beforeBalance = balance.getCardBalance(); + Double afterBalance = beforeBalance - amount; + balance.setCardBalance(afterBalance); // 修改加油次数 - Integer consumeNum = balance.getConsumeNum(); - balance.setConsumeNum(consumeNum+1); - userBalanceService.updateUserBalance(balance); + Integer consumeNum = balance.getConsumeNum(); + balance.setConsumeNum(consumeNum+1); + userBalanceService.updateUserBalance(balance); + } + // 添加余额记录信息 CardBalanceChange cardBalanceChange = new CardBalanceChange(); cardBalanceChange.setUserId(userId); diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/controller/ExportController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/controller/ExportController.java index e1f584a3f..7ce8af284 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/controller/ExportController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/controller/ExportController.java @@ -57,7 +57,7 @@ public class ExportController extends BaseController{ if (list.size() >= 1) { for (int i = 0; i < list.size(); i++) { LJUserVo user = (LJUserVo) list.get(i); - LJUser user1 = service.selectUserByMobile(user.getMobile()); + LJUserVo user1 = service.selectUserByMobileAndChantStoreId(user.getMobile()); if (user1!=null){ repeat += 1; }else { diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/controller/LJUserController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/controller/LJUserController.java index 263b6be9f..b547f876b 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/controller/LJUserController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/controller/LJUserController.java @@ -113,6 +113,17 @@ public class LJUserController extends BaseController { return getSuccessResult(user); } + /** + * 根据storeId查询会员信息 + * @param storeId + * @return + */ + @GetMapping("/storeUser/{storeId}") + public ResponseObject userVoInfo(@PathVariable Integer storeId){ + LJUserVo user = userService.queryUserByStoreId(storeId); + return getSuccessResult(user); + } + @GetMapping("/getByUniApp") public ResponseObject getByUniApp(Integer chainStoreId){ LJUserVo user = userService.getByUniApp(chainStoreId); @@ -128,6 +139,18 @@ public class LJUserController extends BaseController { return getSuccessResult(userBalanceService.getUserBalance()); } + /** + * 根据手机号查询会员信息 + * @param map + * @return + */ + @PostMapping("/phone") + public ResponseObject userInfoByPhone(@Validated @RequestBody Map map){ + String mobile = map.get("mobile"); + LJUserVo user = userService.selectUserByMobileAndChantStoreId(mobile); + return getSuccessResult(user); + } + /** * 根据手机号查询会员信息 * @param map diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/controller/LJUserGradeController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/controller/LJUserGradeController.java index 5fd7678dd..f3f2f3564 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/controller/LJUserGradeController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/controller/LJUserGradeController.java @@ -6,16 +6,19 @@ import com.fuint.business.userManager.entity.LJUserGrade; import com.fuint.business.userManager.service.LJUserGradeService; import com.fuint.framework.web.BaseController; import com.fuint.framework.web.ResponseObject; +import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +import java.util.HashMap; import java.util.Map; /** * 会员等级信息 controller层 */ @RestController +@Slf4j @RequestMapping("/business/userManager/userGrade") public class LJUserGradeController extends BaseController { @Autowired @@ -72,13 +75,21 @@ public class LJUserGradeController extends BaseController { /** * 根据id查询会员等级信息 - * @param id + * @param map * @return */ - @GetMapping("/isUse/{id}") - public ResponseObject userGrade(@PathVariable Integer id){ - LJUserGrade userGrade = userGradeService.selectUserGradeByIdIsUse(id); - return getSuccessResult(userGrade); + @PostMapping("/isUse") + public ResponseObject userGrade(@RequestBody Map map){ + Map map1 =new HashMap<>(); + try { + Integer userId = Integer.valueOf(map.get("userId")); + String storeId = map.get("storeId"); + String gradeId = map.get("gradeId"); + map1 = userGradeService.selectUserGradeByIdIsUse(userId, storeId, gradeId); + }catch (Exception e){ + log.error(e.getMessage()); + } + return getSuccessResult(map1); } /** diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/mapper/LJUserMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/mapper/LJUserMapper.java index 2a860228c..05a76cf3a 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/mapper/LJUserMapper.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/mapper/LJUserMapper.java @@ -28,6 +28,13 @@ public interface LJUserMapper extends BaseMapper { */ public List queryUserList(@Param("storeId") int storeId); + /** + * 根据手机号和连锁店id查询会员信息 + * @param mobile + * @return + */ + public LJUserVo selectUserByMobileAndChantStoreId(@Param("mobile") String mobile,@Param("chainStoreId") int chainStoreId); + /** * 根据id查询用户信息 * @param id @@ -35,6 +42,13 @@ public interface LJUserMapper extends BaseMapper { */ public LJUserVo selectUserById(@Param("id") Integer id); + /** + * 根据连锁店id查询用户信息 + * @param chainStoreId + * @return + */ + public LJUserVo queryUserByChainStoreId(@Param("userId") int userId,@Param("chainStoreId") int chainStoreId); + /** * uniapp使用 * @param id diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/mapper/xml/LJUserMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/mapper/xml/LJUserMapper.xml index 3bf11ae1c..18a2feca5 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/mapper/xml/LJUserMapper.xml +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/mapper/xml/LJUserMapper.xml @@ -4,22 +4,25 @@ select mu.*,mub.grade_id,mub.card_balance,mub.points,mub.consume_num,mub.growth_value,mub.refuel_money, mub.second_card,mub.fixing_level, - mi.storeId,mi.staffId,mi.inviterId,mi.chain_store_id from mt_user mu - left join mt_user_balance mub on mu.id = mub.mt_user_id - left join mt_invitation mi on mu.id = mi.userId + mi.storeId,mi.staffId,mi.inviterId,mub.chain_store_id from mt_user mu + inner join mt_user_balance mub on mu.id = mub.mt_user_id + inner join mt_invitation mi on mu.id = mi.userId + + + select mu.*,mub.grade_id,mub.card_balance,mub.points,mub.consume_num,mub.growth_value,mub.refuel_money, + mub.second_card,mub.fixing_level + FROM mt_user mu + LEFT JOIN mt_user_balance mub ON mu.id = mub.mt_user_id - + mu.mobile = #{mobile} @@ -70,6 +73,24 @@ + + + +