ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysUserController.java
@@ -172,6 +172,8 @@ } //添加门店员工关系数据 UserShop one1 = userShopService.getOne(new LambdaQueryWrapper<UserShop>().eq(UserShop::getUserId, one.getUserId()).eq(UserShop::getShopId, sysUser1.getObjectId())); if(null == one1){ UserShop userShop = new UserShop(); userShop.setUserId(one.getUserId()); userShop.setShopId(sysUser1.getObjectId()); @@ -181,6 +183,7 @@ userShop.setNickName(user.getNickName()); userShop.setCreateTime(LocalDateTime.now()); userShopService.save(userShop); } }else{ user.setCreateBy(SecurityUtils.getUsername()); user.setPassword(SecurityUtils.encryptPassword("a123456")); ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/UserPointServiceImpl.java
@@ -97,6 +97,11 @@ userPointDetailVO.setVariablePoint(p.getVariablePoint()); String format = p.getCreateTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); userPointDetailVO.setCreateTime(format); Integer historicalPoint = p.getHistoricalPoint(); Integer balance = p.getBalance(); if (historicalPoint != null && balance != null) { userPointDetailVO.setFlag(historicalPoint > balance ? 2 : 1); } return userPointDetailVO; }).collect(Collectors.toList()); PageInfo<UserPointDetailVO> pageInfo1 = new PageInfo<>(pageCurr, pageSize); ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/UserPointDetailVO.java
@@ -21,4 +21,6 @@ @ApiModelProperty(value = "变动时间") private String createTime; @ApiModelProperty(value = "增或减标识: 1-增 2-减") private Integer flag; } ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java
@@ -132,8 +132,8 @@ @ApiImplicitParam(value = "订单id", name = "id", required = true, dataType = "String"), }) @GetMapping("/writeOff") public R<Void> writeOff(String id, Integer shopId, String technicianId){ orderService.writeOff(id, shopId, technicianId); public R<Void> writeOff(String code, Integer shopId, String technicianId){ orderService.writeOff(code, shopId, technicianId); return R.ok(); } ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java
@@ -598,6 +598,7 @@ userPoint.setAppUserId(order.getAppUserId()); userPoint.setObjectId(order.getId()); userPointClient.saveUserPoint(userPoint); appUserClient.editAppUserById(appUser); } order.setRefundStatus(2); ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/RefundPassServiceImpl.java
@@ -110,8 +110,8 @@ refundPass.setPhone(jsonObject.getString("phone")); refundPass.setAddress(jsonObject.getString("address")); this.save(refundPass); order.setOldOrderStatus(order.getOrderStatus()); order.setOrderStatus(7); order.setOldOrderStatus(7); orderService.updateById(order); return R.ok(); } ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java
@@ -585,14 +585,14 @@ if(null == bargainPriceDetail){ //没有门店特价,判断地区价格配置 LambdaQueryWrapper<GoodsArea> queryWrapper = new LambdaQueryWrapper<GoodsArea>().eq(GoodsArea::getGoodsId, goodsId).eq(GoodsArea::getVip, vip); if(StringUtils.isNotEmpty(districtCode)){ queryWrapper.eq(GoodsArea::getDistrictsCode, districtCode); if(StringUtils.isNotEmpty(provinceCode)){ queryWrapper.eq(GoodsArea::getProvinceCode, provinceCode); } if(StringUtils.isNotEmpty(cityCode)){ queryWrapper.and(i -> i.eq(GoodsArea::getCityCode, cityCode).or().isNull(GoodsArea::getCityCode)); } if(StringUtils.isNotEmpty(provinceCode)){ queryWrapper.and(i -> i.eq(GoodsArea::getProvinceCode, provinceCode).or().isNull(GoodsArea::getProvinceCode)); if(StringUtils.isNotEmpty(districtCode)){ queryWrapper.and(i -> i.eq(GoodsArea::getDistrictsCode, districtCode).or().isNull(GoodsArea::getDistrictsCode)); } GoodsArea goodsArea = goodsAreaService.getOne(queryWrapper); if(null == goodsArea){ ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TechnicianSubscribeServiceImpl.java
@@ -1,5 +1,6 @@ package com.ruoyi.other.service.impl; import com.alibaba.fastjson2.JSON; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; @@ -8,6 +9,7 @@ import com.ruoyi.account.api.feignClient.AppUserShopClient; import com.ruoyi.account.api.model.AppUser; import com.ruoyi.account.api.model.AppUserShop; import com.ruoyi.account.api.model.UserAddress; import com.ruoyi.common.core.utils.StringUtils; import com.ruoyi.common.core.web.page.PageInfo; import com.ruoyi.common.security.service.TokenService; @@ -70,11 +72,15 @@ Optional<AppUserShop> first = data.stream().filter(s -> s.getShopId() == shopId.intValue() && s.getRoleType() == 3).findFirst(); Integer technicianId = null; if(first.isPresent()){ //既是店员又是技师,需要取员工身份获取列表数据 Optional<AppUserShop> first1 = data.stream().filter(s -> s.getShopId() == shopId.intValue() && s.getRoleType() != 3).findFirst(); if(!first1.isPresent()){ AppUserShop appUserShop = first.get(); Technician technician = technicianService.getOne(new LambdaQueryWrapper<Technician>().eq(Technician::getAppUserId, appUserShop.getAppUserId()) .eq(Technician::getShopId, appUserShop.getShopId()).eq(Technician::getDelFlag, 0).eq(Technician::getStatus, 2)); if(null != technician){ technicianId = technician.getId(); } } } List<TechnicianSubscribeVO> list = technicianSubscribeMapper.getTechnicianSubscribeByUserAndShop(pageInfo, shopId, status, technicianId); @@ -84,6 +90,11 @@ AppUser appUser = appUserClient.getAppUserById(technicianSubscribe.getAppUserId()); technicianSubscribeVO.setUserName(appUser.getName()); technicianSubscribeVO.setPhone(appUser.getPhone()); Integer serviceMode = technicianSubscribeVO.getServiceMode(); if(1 == serviceMode){ UserAddress userAddress = JSON.parseObject(technicianSubscribeVO.getUserAddress(), UserAddress.class); technicianSubscribeVO.setUserAddress(userAddress.getProvince() + userAddress.getCity() + userAddress.getDistrict() + userAddress.getRecieveAddress()); } } return pageInfo.setRecords(list); } ruoyi-service/ruoyi-other/src/main/resources/mapper/other/TechnicianSubscribeMapper.xml
@@ -13,6 +13,7 @@ ts.latitude, tts.subscribe_time, tts.service_mode, tts.user_address, tts.status FROM t_technician_subscribe tts