Merge remote-tracking branch 'origin/master'
| | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.utils.bean.BeanUtils; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.common.redis.annotation.DistributedLock; |
| | | import com.ruoyi.common.security.service.TokenService; |
| | | import com.ruoyi.order.feignClient.OrderClient; |
| | | import com.ruoyi.order.feignClient.RemoteOrderGoodsClient; |
| | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.utils.StringUtils; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.common.redis.annotation.DistributedLock; |
| | | import com.ruoyi.common.redis.service.RedisService; |
| | | import com.ruoyi.common.security.service.TokenService; |
| | | import com.ruoyi.other.api.domain.*; |
| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "订单id", name = "id", required = true, dataType = "String"), |
| | | }) |
| | | @GetMapping("/writeOff/{id}/{shopId}") |
| | | public R<Void> writeOff(@PathVariable("id") String id, @PathVariable("shopId") Integer shopId, Integer technicianId){ |
| | | orderService.writeOff(id, shopId, technicianId); |
| | | @GetMapping("/writeOff") |
| | | public R<Void> writeOff(String code, Integer shopId, String technicianId){ |
| | | orderService.writeOff(code, shopId, technicianId); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | } |
| | | RefundPass one = refundPassService.getOne(new LambdaQueryWrapper<RefundPass>().eq(RefundPass::getOrderId, orderId) |
| | | .eq(RefundPass::getDelFlag, 0).last(" order by create_time desc limit 0,1")); |
| | | if(null == one){ |
| | | return R.fail("无效的售后数据"); |
| | | } |
| | | one.setIdStr(one.getId().toString()); |
| | | one.setAddressJson(order.getAddressJson()); |
| | | return R.ok(one); |
| | |
| | | |
| | | boolean check(Order order, Integer shopId, Long userId); |
| | | |
| | | void writeOff(String id,Integer shopId, Integer technicianId); |
| | | void writeOff(String id,Integer shopId, String technicianId); |
| | | |
| | | |
| | | /** |
| | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void writeOff(String id,Integer shopId, Integer technicianId) { |
| | | public void writeOff(String id, Integer shopId, String technicianId) { |
| | | LoginUser loginUserApplet = tokenService.getLoginUserApplet(); |
| | | Order order = orderMapper.selectById(id); |
| | | boolean check = check(order, shopId, loginUserApplet.getUserid()); |
| | |
| | | order.setAfterSaleTime(LocalDateTime.now().plusDays(days)); |
| | | order.setEndTime(LocalDateTime.now()); |
| | | order.setCancellerAppUserId(loginUserApplet.getUserid()); |
| | | order.setTechnicianId(technicianId); |
| | | if(StringUtils.isNotEmpty(technicianId) && !"null".equals(technicianId)){ |
| | | order.setTechnicianId(Integer.valueOf(technicianId)); |
| | | } |
| | | orderMapper.updateById(order); |
| | | } |
| | | |
| | |
| | | userPoint.setAppUserId(order.getAppUserId()); |
| | | userPoint.setObjectId(order.getId()); |
| | | userPointClient.saveUserPoint(userPoint); |
| | | appUserClient.editAppUserById(appUser); |
| | | } |
| | | |
| | | order.setRefundStatus(2); |
| | |
| | | refundPass.setPhone(jsonObject.getString("phone")); |
| | | refundPass.setAddress(jsonObject.getString("address")); |
| | | this.save(refundPass); |
| | | order.setOldOrderStatus(order.getOrderStatus()); |
| | | order.setOrderStatus(7); |
| | | orderService.updateById(order); |
| | | return R.ok(); |
| | |
| | | private SysUserClient sysUserClient; |
| | | |
| | | |
| | | |
| | | @GetMapping("/getShopById") |
| | | @ApiOperation("通过门店id获取账户信息回填") |
| | | public R<Shop> getShopById(Integer id) { |
| | | return R.ok(shopService.getById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 提现申请列表 |
| | |
| | | return R.ok(Page.of(pageNum, pageSize)); |
| | | } |
| | | Page<ShopWithdraw> page = shopWithdrawService.page(Page.of(pageNum, pageSize), new LambdaQueryWrapper<ShopWithdraw>() |
| | | .in(collect1.size() > 0, ShopWithdraw::getShopId, collect1)); |
| | | .in(collect1.size() > 0, ShopWithdraw::getShopId, collect1) |
| | | .orderByDesc(ShopWithdraw::getCreateTime)); |
| | | List<ShopWithdraw> records = page.getRecords(); |
| | | List<Integer> collect = records.stream().map(ShopWithdraw::getShopId).collect(Collectors.toList()); |
| | | List<Shop> shops = null; |
| | |
| | | }else { |
| | | byId.setWithdrawAuditMoney(BigDecimal.ZERO); |
| | | } |
| | | byId.setWithdrawMoney(byId.getWithdrawMoney().subtract(byId.getWithdrawAuditMoney())); |
| | | return R.ok(byId); |
| | | } |
| | | |
| | |
| | | */ |
| | | @GetMapping("/technicianListByShopId") |
| | | @ApiOperation(value = "技师列表", tags = {"技师列表-小程序"}) |
| | | public R<TableDataInfo<TechnicianVO>> technicianListByShopId(@ApiParam("门店id") @RequestParam Long shopId,@ApiParam("技师姓名") String name) { |
| | | public R<TableDataInfo<TechnicianVO>> technicianListByShopId(@ApiParam("门店id") @RequestParam Long shopId,@ApiParam("技师姓名") String name,@ApiParam("评分") Integer point) { |
| | | //@ApiParam("评分") Integer point 1倒序 2正序 |
| | | startPage(); |
| | | List<TechnicianVO> technicianListByShopId = technicianService.getTechnicianListByShopId(shopId, name); |
| | | List<TechnicianVO> technicianListByShopId = technicianService.getTechnicianListByShopId(shopId, name,point); |
| | | TableDataInfo<TechnicianVO> dataTable = getDataTable(technicianListByShopId); |
| | | return R.ok(dataTable); |
| | | } |
| | |
| | | @ApiOperation(value = "预约列表", tags = {"门店-预约列表"}) |
| | | public R<PageInfo<TechnicianSubscribeVO>> shoplist(@ApiParam(value = "状态") Integer status, |
| | | @ApiParam("电话")String phone, |
| | | @ApiParam("姓名")String name, |
| | | @ApiParam("姓名")String userName, |
| | | @ApiParam("服务方式:1=上门服务,2=到店服务")Integer serviceMode, Integer pageCurr, Integer pageSize) { |
| | | Long userid = tokenService.getLoginUser().getUserid(); |
| | | SysUser sysUser = sysUserClient.getSysUser(userid).getData(); |
| | | PageInfo<TechnicianSubscribeVO> pageInfo = technicianSubscribeService.getTechnicianSubscribeByUserAndShop1(Long.valueOf(sysUser.getObjectId()), status, phone, name, serviceMode, pageCurr, pageSize); |
| | | PageInfo<TechnicianSubscribeVO> pageInfo = technicianSubscribeService.getTechnicianSubscribeByUserAndShop1(Long.valueOf(sysUser.getObjectId()), status, phone, userName, serviceMode, pageCurr, pageSize); |
| | | return R.ok(pageInfo); |
| | | } |
| | | |
| | |
| | | */ |
| | | public interface TechnicianMapper extends BaseMapper<Technician> { |
| | | |
| | | List<TechnicianVO> selectTechnicianListByShopId(@Param("shopId") Long shopId,@Param("name") String name); |
| | | List<TechnicianVO> selectTechnicianListByShopId(@Param("shopId") Long shopId,@Param("name") String name,@Param("point")Integer point); |
| | | |
| | | TechnicianDetailVO selectTechnicianDetail(Long technicianId); |
| | | |
| | |
| | | import com.ruoyi.other.api.domain.Technician; |
| | | import com.ruoyi.other.vo.TechnicianDetailVO; |
| | | import com.ruoyi.other.vo.TechnicianVO; |
| | | import io.swagger.models.auth.In; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * @since 2024-11-20 |
| | | */ |
| | | public interface TechnicianService extends IService<Technician> { |
| | | List<TechnicianVO> getTechnicianListByShopId(Long shopId, String name); |
| | | List<TechnicianVO> getTechnicianListByShopId(Long shopId, String name, Integer point); |
| | | |
| | | TechnicianDetailVO technicianDetail(Long technicianId); |
| | | } |
| | |
| | | PageInfo<GoodsVO> pageInfo = new PageInfo<>(); |
| | | pageInfo.setSize(search.getPageSize()); |
| | | pageInfo.setTotal(list.size()); |
| | | Integer pageSize = search.getPageSize(); |
| | | Integer pageNum = (search.getPageCurr() - 1) * pageSize; |
| | | |
| | | if(list.size() >= (pageNum + 1) * pageSize){ |
| | | list = list.subList(pageNum, pageNum + pageSize); |
| | | }else if(pageNum < list.size() && list.size() < (pageNum + 1) * pageSize){ |
| | | list = list.subList(pageNum, list.size()); |
| | | }else{ |
| | | list = new ArrayList<>(); |
| | | int pageSize = search.getPageSize(); |
| | | int pageCurr = search.getPageCurr(); |
| | | |
| | | // 计算起始索引 |
| | | int pageNum = (pageCurr - 1) * pageSize; |
| | | |
| | | // 检查 pageNum 是否合法 |
| | | if (pageNum < 0 || pageNum >= list.size()) { |
| | | // 如果 pageNum 不合法,返回空列表 |
| | | pageInfo.setRecords(new ArrayList<>()); |
| | | return pageInfo; |
| | | } |
| | | return pageInfo.setRecords(list); |
| | | |
| | | // 计算结束索引 |
| | | int endIndex = Math.min(pageNum + pageSize, list.size()); |
| | | |
| | | // 获取分页数据 |
| | | List<GoodsVO> pageList = list.subList(pageNum, endIndex); |
| | | |
| | | // 设置分页结果 |
| | | pageInfo.setRecords(pageList); |
| | | return pageInfo; |
| | | } |
| | | |
| | | @Override |
| | |
| | | area.setProvinceCode(goodsArea.getProvinceCode()); |
| | | area.setCityCode(goodsArea.getCityCode()); |
| | | area.setDistrictsCode(goodsArea.getDistrictsCode()); |
| | | if(null != area.getSellingPrice() || null != area.getIntegral()){ |
| | | // if(null != area.getSellingPrice() || null != area.getIntegral()){ |
| | | // goodsAreaList2.add(area); |
| | | // } |
| | | goodsAreaList2.add(area); |
| | | } |
| | | } |
| | | goodsAreaService.saveBatch(goodsAreaList2); |
| | | } |
| | |
| | | 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(cityCode)){ |
| | | queryWrapper.eq(GoodsArea::getCityCode, cityCode); |
| | | } |
| | | 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(districtCode)){ |
| | | queryWrapper.and(i -> i.eq(GoodsArea::getDistrictsCode, districtCode).or().isNull(GoodsArea::getDistrictsCode)); |
| | | } |
| | | GoodsArea goodsArea = goodsAreaService.getOne(queryWrapper); |
| | | if(null == goodsArea){ |
| | | //没有地区价格,则使用会员价格 |
| | |
| | | public ShopPointStatistics statistics(IPage<ShopPoint> page, ShopPoint shopPoint) { |
| | | Long userid = tokenService.getLoginUser().getUserid(); |
| | | SysUser sysUser = sysUserClient.getSysUser(userid).getData(); |
| | | |
| | | List<Shop> shopList = shopService.list(new LambdaQueryWrapper<Shop>() |
| | | .eq(Shop::getAppUserId,sysUser.getObjectId())); |
| | | Integer sPoint = 0; |
| | | Integer shopCommissionPoint = 0; |
| | | Integer subShopCommissionPoint = 0; |
| | | for (Shop shop : shopList) { |
| | | Shop shop = shopService.getById(sysUser.getObjectId()); |
| | | sPoint += shop.getServerPoint(); |
| | | shopCommissionPoint += shop.getSharePoint(); |
| | | subShopCommissionPoint += shop.getLowerLevelSharePoint(); |
| | | } |
| | | |
| | | ShopPointStatistics shopPointStatistics = new ShopPointStatistics(); |
| | | shopPointStatistics.setTotalPoint(sPoint + shopCommissionPoint + subShopCommissionPoint); |
| | | shopPointStatistics.setShopPoint(sPoint); |
| | |
| | | private TechnicianScoreService technicianScoreService; |
| | | |
| | | @Override |
| | | public List<TechnicianVO> getTechnicianListByShopId(Long shopId, String name) { |
| | | return technicianMapper.selectTechnicianListByShopId(shopId,name); |
| | | public List<TechnicianVO> getTechnicianListByShopId(Long shopId, String name,Integer point) { |
| | | return technicianMapper.selectTechnicianListByShopId(shopId,name,point); |
| | | } |
| | | |
| | | @Override |
| | |
| | | @ApiModelProperty(value = "展示状态:0下架中 1上架中") |
| | | private Integer showStatus; |
| | | |
| | | |
| | | public Integer getType(){ |
| | | return goodsType; |
| | | } |
| | | |
| | | } |
| | |
| | | tgs.selling_price as sellingPrice, |
| | | tgs.integral as integral, |
| | | tg.sale_num as saleNum, |
| | | tg.type goodsType, |
| | | tsai.start_time as startTime, |
| | | tsai.end_time as endTime |
| | | FROM |
| | |
| | | tt.`name`, |
| | | tt.introduction, |
| | | tt.home_picture |
| | | <if test="point != null and point == 1"> |
| | | order by ttsc.score DESC |
| | | </if> |
| | | <if test="point != null and point == 2"> |
| | | order by ttsc.score |
| | | </if> |
| | | </select> |
| | | <select id="selectTechnicianDetail" resultType="com.ruoyi.other.vo.TechnicianDetailVO"> |
| | | SELECT |