| | |
| | | */ |
| | | @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); |
| | | } |
| | |
| | | @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() |
| | |
| | | @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(); |
| | | } |
| | | |