From a0a29587681bed434199487a1912940229f71385 Mon Sep 17 00:00:00 2001 From: xuhy <3313886187@qq.com> Date: 星期三, 15 一月 2025 10:38:43 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TechnicianController.java | 24 ++++++++++++++++++------ 1 files changed, 18 insertions(+), 6 deletions(-) diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TechnicianController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TechnicianController.java index a1980d6..3691afe 100644 --- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TechnicianController.java +++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TechnicianController.java @@ -61,9 +61,10 @@ */ @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); } @@ -85,11 +86,8 @@ @PostMapping("/manage/addorupdate") @ApiOperation(value = "添加编辑", tags = {"门店-技师列表"}) public R<Page<Technician>> add(@RequestBody Technician technician) { - Long userid = tokenService.getLoginUser().getUserid(); SysUser sysUser = sysUserClient.getSysUser(userid).getData(); - - if (technician.getId()==null) { technician.setSubscribeStatus(2); List<Technician> list = technicianService.lambdaQuery() @@ -144,7 +142,21 @@ @GetMapping("/manage/delete") @ApiOperation(value = "删除", tags = {"门店-技师列表"}) public R<Page<Technician>> delete(@RequestParam Integer id) { - technicianService.removeById(id); + Technician technician = technicianService.getById(id); + technician.setDelFlag(1); + technicianService.updateById(technician); + //检查删除app_user_shop数据 + AppUserShop appUserShop = new AppUserShop(); + appUserShop.setAppUserId(technician.getAppUserId()); + appUserShop.setShopId(technician.getShopId()); + appUserShop.setRoleType(3); + appUserShopClient.delAppUserShop(appUserShop); + List<AppUserShop> userShopList = appUserShopClient.getAppUserShop(technician.getAppUserId()).getData(); + if(userShopList.size() == 0){ + AppUser appUser = appUserClient.getAppUserById(technician.getAppUserId()); + appUser.setUserType(1); + appUserClient.editAppUserById(appUser); + } return R.ok(); } -- Gitblit v1.7.1