diff --git a/fuintAdmin/src/api/staff/user/user.js b/fuintAdmin/src/api/staff/user/user.js index 9a4171acb..c780ce0fd 100644 --- a/fuintAdmin/src/api/staff/user/user.js +++ b/fuintAdmin/src/api/staff/user/user.js @@ -42,6 +42,14 @@ export function getUserMobile(data) { data: data }) } +// 根据手机号查询会员详细 +export function getUserPhone(data) { + return request({ + url: '/business/userManager/user/phone' , + method: 'post', + data: data + }) +} // 新增会员 export function addUser(data) { diff --git a/fuintAdmin/src/views/member/fixingLevel.vue b/fuintAdmin/src/views/member/fixingLevel.vue index 372c53b6d..7bf02fcee 100644 --- a/fuintAdmin/src/views/member/fixingLevel.vue +++ b/fuintAdmin/src/views/member/fixingLevel.vue @@ -38,18 +38,18 @@ /> - - - + + + + + + + + + + + + 搜索 @@ -73,18 +73,18 @@ /> - - - + + + + + + + + + + + + 搜索 diff --git a/fuintAdmin/src/views/member/index.vue b/fuintAdmin/src/views/member/index.vue index f5b5950dc..e1bf90fe3 100644 --- a/fuintAdmin/src/views/member/index.vue +++ b/fuintAdmin/src/views/member/index.vue @@ -2,11 +2,11 @@
- - - - - + + + + + { - if(response.data!=null){ + getUserPhone({mobile:this.form.mobile}).then( response => { + if(response.data){ this.$modal.msgError("手机号已存在"); }else { addUser(this.form).then(response => { diff --git a/fuintAdmin/src/views/member/userInfo.vue b/fuintAdmin/src/views/member/userInfo.vue index 581a1758f..b6aee601f 100644 --- a/fuintAdmin/src/views/member/userInfo.vue +++ b/fuintAdmin/src/views/member/userInfo.vue @@ -14,7 +14,7 @@
- +
绑定实体卡
@@ -29,7 +29,7 @@ {{form.name ? form.name : "--"}} {{form.idcard ? form.idcard : "--"}} - -- + @@ -43,10 +43,10 @@ {{ grade.name }} - -- - - 跟随全局总配置 - + + + + {{form.fixingLevel ? fixingLevelinfo(fixingLevelList,form.fixingLevel) : "--"}} @@ -716,6 +716,7 @@ export default { dicts: ['official','zhzt','zcrzdj','payment_type'], data(){ return{ + baseUrl:process.env.VUE_APP_BASE_API, flag:null, fixingLevelList:[], // 充值余额列表 diff --git a/fuintAdmin/src/views/staff/list.vue b/fuintAdmin/src/views/staff/list.vue index b797f9420..a8e53cec6 100644 --- a/fuintAdmin/src/views/staff/list.vue +++ b/fuintAdmin/src/views/staff/list.vue @@ -166,18 +166,18 @@ - - - - - - + v-for="item in roleList" + :key="item.dutyId" + :label="item.dutyName" + :value="item.dutyId" + > + + + + + + @@ -569,7 +569,7 @@ :title="title" :visible.sync="dialogVisible" style="margin-top: 100px" - width="20%"> + width="23%">
@@ -987,8 +987,8 @@ export default { margin-bottom: 20px; } .qrcode{ - width: 200px; - height: 300px; + width: 80%; + margin: 0 auto; margin-top: 15px; } diff --git a/fuintAdmin_zt/src/api/indexBanner/indexBanner.js b/fuintAdmin_zt/src/api/indexBanner/indexBanner.js index 1a6dccc18..22dc0e19f 100644 --- a/fuintAdmin_zt/src/api/indexBanner/indexBanner.js +++ b/fuintAdmin_zt/src/api/indexBanner/indexBanner.js @@ -29,7 +29,7 @@ export function addIndexBanner(data) { // 修改首页轮播图信息 export function updateIndexBanner(data) { return request({ - url: '/business/indexBanner/lists', + url: '/business/indexBanner', method: 'put', data: data }) diff --git a/fuintAdmin_zt/src/views/indexBanner/imgUpload/imgUpload.vue b/fuintAdmin_zt/src/views/indexBanner/imgUpload/imgUpload.vue new file mode 100644 index 000000000..95efb7dde --- /dev/null +++ b/fuintAdmin_zt/src/views/indexBanner/imgUpload/imgUpload.vue @@ -0,0 +1,270 @@ + + + + + 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 @@ + + + +