From ec73339e08669dc5a0d4ff93e6640f51473c08cd Mon Sep 17 00:00:00 2001 From: 无关风月 <443237572@qq.com> Date: 星期六, 11 一月 2025 18:03:50 +0800 Subject: [PATCH] 修改bug --- ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TechnicianSubscribeController.java | 38 ++++++++++++++++++++++++++++++-------- 1 files changed, 30 insertions(+), 8 deletions(-) diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TechnicianSubscribeController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TechnicianSubscribeController.java index f683fff..740990f 100644 --- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TechnicianSubscribeController.java +++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TechnicianSubscribeController.java @@ -7,11 +7,15 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.ruoyi.common.core.domain.R; import com.ruoyi.common.core.web.controller.BaseController; +import com.ruoyi.common.core.web.page.PageInfo; import com.ruoyi.common.core.web.page.TableDataInfo; +import com.ruoyi.common.security.service.TokenService; import com.ruoyi.common.security.utils.SecurityUtils; import com.ruoyi.other.api.domain.TechnicianSubscribe; import com.ruoyi.other.service.TechnicianSubscribeService; import com.ruoyi.other.vo.TechnicianSubscribeVO; +import com.ruoyi.system.api.domain.SysUser; +import com.ruoyi.system.api.feignClient.SysUserClient; import io.swagger.annotations.*; import org.springframework.web.bind.annotation.*; @@ -32,18 +36,37 @@ public class TechnicianSubscribeController extends BaseController { @Resource private TechnicianSubscribeService technicianSubscribeService; + @Resource + private TokenService tokenService; + @Resource + private SysUserClient sysUserClient; + + + + + + + @GetMapping("/shop/list") + @ApiOperation(value = "预约列表", tags = {"门店-预约列表"}) + public R<PageInfo<TechnicianSubscribeVO>> shoplist(@ApiParam(value = "状态") Integer status, + @ApiParam("电话")String phone, + @ApiParam("姓名")String name, + @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); + return R.ok(pageInfo); + } /** * 预约列表 */ @GetMapping("/list") @ApiOperation(value = "预约列表", notes = "预约列表", tags = {"小程序-个人中心-门店管理-预约列表"}) - public TableDataInfo<TechnicianSubscribeVO> list(@ApiParam(value = "状态") Integer status, - @ApiParam(value = "门店id") @RequestParam Long shopId) { - startPage(); - List<TechnicianSubscribeVO> list = technicianSubscribeService - .getTechnicianSubscribeByUserAndShop(shopId,status); - return getDataTable(list); + public R<PageInfo<TechnicianSubscribeVO>> list(@ApiParam(value = "状态") Integer status, + @ApiParam(value = "门店id") @RequestParam Long shopId, Integer current, Integer size) { + PageInfo<TechnicianSubscribeVO> pageInfo = technicianSubscribeService.getTechnicianSubscribeByUserAndShop(shopId, status, current, size); + return R.ok(pageInfo); } /** @@ -60,9 +83,8 @@ * 取消服务 */ @GetMapping("/cancel") - @ApiOperation(value = "取消服务", notes = "取消服务", tags = {"小程序-个人中心-门店管理,小程序-个人中心-我的预约"}) + @ApiOperation(value = "取消服务", notes = "取消服务", tags = {"小程序-个人中心-门店管理,小程序-个人中心-我的预约","门店-预约管理"}) public R<Void> cancel(@ApiParam(value = "预约id") @RequestParam Long id) { - TechnicianSubscribe subscribe = technicianSubscribeService.getOne(new LambdaQueryWrapper<TechnicianSubscribe>() .eq(TechnicianSubscribe::getId, id) .eq(TechnicianSubscribe::getStatus, 0)); -- Gitblit v1.7.1