diff --git a/src/main/java/com/sqx/modules/artificer/controller/ArtificerController.java b/src/main/java/com/sqx/modules/artificer/controller/ArtificerController.java index 8f34d2a..22973af 100644 --- a/src/main/java/com/sqx/modules/artificer/controller/ArtificerController.java +++ b/src/main/java/com/sqx/modules/artificer/controller/ArtificerController.java @@ -93,11 +93,10 @@ public class ArtificerController { return Result.success(); } - @GetMapping("/selectMassageTypePage") @ApiOperation("查询按摩分类(分页)") - public Result selectMassageTypePage(Integer page,Integer limit,Integer status,Integer sort,String city,Integer authentication,Integer by,String title,Long artificerId,Long userId,Long parentId,Long classifyId){ - return massageTypeService.selectMassageTypePage(page, limit, status, city, sort,authentication,by,title,artificerId,userId,parentId,classifyId); + public Result selectMassageTypePage(Integer page,Integer limit,Integer status,String city,Integer sort,Integer authentication,Integer by,String title,Long artificerId,Long userId,Long parentId,String classifyId,Long classifyIdT){ + return massageTypeService.selectMassageTypePage(page, limit, status, city, sort,authentication,by,title,artificerId,userId,parentId,classifyId,classifyIdT); } @GetMapping("/selectMassageTypeChildrenPage") @ApiOperation("查询按摩分类子项目(分页)") @@ -120,7 +119,7 @@ public class ArtificerController { @ApiOperation("查询技师列表") public Result selectArtificerList(Integer page, Integer limit, Long massageTypeId, String artificerName, String longitude,String latitude,Integer sort,Integer authentication, - Integer by,Integer status,String city,Long classifyId,String phone,Integer isStart,Integer technicianType,String isBack){ + Integer by,Integer status,String city,String classifyId,String phone,Integer isStart,Integer technicianType,String isBack){ return artificerService.selectArtificerList(page, limit, massageTypeId, artificerName,longitude,latitude, sort,authentication,by,status,city,classifyId,phone,null,isStart,technicianType,isBack); } @@ -143,8 +142,8 @@ public class ArtificerController { @GetMapping("/selectArtificerMassageList") @ApiOperation("查询技师服务列表") - public Result selectArtificerMassageList(Long artificerId,Integer status){ - return massageTypeService.selectArtificerMassageList(artificerId,status); + public Result selectArtificerMassageList(Long artificerId,Integer status,String classifyId,String title){ + return massageTypeService.selectArtificerMassageList(artificerId,status,classifyId,title); } @GetMapping("/selectArtificerById") diff --git a/src/main/java/com/sqx/modules/artificer/controller/app/AppArtificerController.java b/src/main/java/com/sqx/modules/artificer/controller/app/AppArtificerController.java index a4af811..24bd8f3 100644 --- a/src/main/java/com/sqx/modules/artificer/controller/app/AppArtificerController.java +++ b/src/main/java/com/sqx/modules/artificer/controller/app/AppArtificerController.java @@ -95,12 +95,10 @@ public class AppArtificerController { @GetMapping("/selectMassageTypePage") @ApiOperation("查询按摩分类(分页)") - public Result selectMassageTypePage(Integer page,Integer limit,Integer status,Integer sort,String city,Integer authentication,Integer by,String title,Long artificerId,Long userId,Long parentId,Long classifyId){ - return massageTypeService.selectMassageTypePage(page, limit, status, city, sort,authentication,by,title,artificerId,userId,parentId,classifyId); + public Result selectMassageTypePage(Integer page,Integer limit,Integer status,Integer sort,String city,Integer authentication,Integer by,String title,Long artificerId,Long userId,Long parentId,String classifyId,Long classifyIdT){ + return massageTypeService.selectMassageTypePage(page, limit, status, city, sort,authentication,by,title,artificerId,userId,parentId,classifyId,classifyIdT); } - - @GetMapping("/selectMassageTypeQyPage") @ApiOperation("查询按摩分类(分页)") public Result selectMassageTypeQyPage(Integer page,Integer limit,String city,String title){ @@ -137,7 +135,7 @@ public class AppArtificerController { @ApiOperation("查询技师列表") public Result selectArtificerList(Integer page, Integer limit, Long massageTypeId, String artificerName, String longitude,String latitude,Integer sort,Integer authentication, - Integer by,String city,Long classifyId,String phone, Integer isStart,Integer technicianType,String isBack,Integer status){ + Integer by,String city,String classifyId,String phone, Integer isStart,Integer technicianType,String isBack,Integer status){ if(status == null){ status = -1; } @@ -148,8 +146,8 @@ public class AppArtificerController { @GetMapping("/selectArtificerMassageList") @ApiOperation("查询技师服务列表") - public Result selectArtificerMassageList(Long artificerId,Integer status){ - return massageTypeService.selectArtificerMassageList(artificerId,status); + public Result selectArtificerMassageList(Long artificerId,Integer status,String classifyId,String title){ + return massageTypeService.selectArtificerMassageList(artificerId,status,classifyId,title); } diff --git a/src/main/java/com/sqx/modules/artificer/dao/ArtificerDao.java b/src/main/java/com/sqx/modules/artificer/dao/ArtificerDao.java index 1ece737..e3e6066 100644 --- a/src/main/java/com/sqx/modules/artificer/dao/ArtificerDao.java +++ b/src/main/java/com/sqx/modules/artificer/dao/ArtificerDao.java @@ -21,7 +21,7 @@ public interface ArtificerDao extends BaseMapper { @Param("latitude")String latitude,@Param("sort") Integer sort, @Param("authentication") Integer authentication,@Param("by") Integer by, @Param("status") Integer status,@Param("city") String city, - @Param("classifyId") Long classifyId,@Param("phone") String phone, + @Param("classifyId") String classifyId,@Param("phone") String phone, Integer user,@Param("isStart") Integer isStart,@Param("technicianType")Integer technicianType,@Param("isBack")String isBack); Artificer selectArtificerById(@Param("userId") Long userId,@Param("artificerId") Long artificerId,@Param("longitude") String longitude,@Param("latitude") String latitude); diff --git a/src/main/java/com/sqx/modules/artificer/dao/MassageTypeDao.java b/src/main/java/com/sqx/modules/artificer/dao/MassageTypeDao.java index e7ed425..cb47d1c 100644 --- a/src/main/java/com/sqx/modules/artificer/dao/MassageTypeDao.java +++ b/src/main/java/com/sqx/modules/artificer/dao/MassageTypeDao.java @@ -15,13 +15,13 @@ import java.util.List; @Mapper public interface MassageTypeDao extends BaseMapper { - List selectArtificerMassageList(@Param("artificerId") Long artificerId,@Param("status") Integer status); + List selectArtificerMassageList(@Param("artificerId") Long artificerId,@Param("status") Integer status,@Param("classifyId") String classifyId,@Param("title") String title); - IPage selectMassageTypePage(Page page,@Param("status") Integer status,@Param("city") String city,@Param("sort") Integer sort,@Param("authentication") Integer authentication,@Param("by")Integer by,@Param("title") String title,@Param("artificerId") Long artificerId,@Param("parentId") Long parentId,@Param("classifyId") Long classifyId); + IPage selectMassageTypePage(Page page,@Param("status") Integer status,@Param("city") String city,@Param("sort") Integer sort,@Param("authentication") Integer authentication,@Param("by")Integer by,@Param("title") String title,@Param("artificerId") Long artificerId,@Param("parentId") Long parentId,@Param("classifyId") String classifyId,@Param("classifyIdT") Long classifyIdT); List selectMassageTypeList(@Param("status") Integer status,@Param("city") String city,@Param("sort") Integer sort,@Param("authentication") Integer authentication,@Param("by")Integer by,@Param("title") String title,@Param("artificerId") Long artificerId,@Param("parentId") Long parentId,@Param("classifyId") Long classifyId); IPage selectMassageTypeChildrenPage(Page pages, Integer status, String city, Integer sort, Integer authentication, Integer by, String title, Long artificerId, Long parentId, Long classifyId); - IPage selectMassageTypeQyPage(Page pages, @Param("city")String city, @Param("title")String title); + IPage selectMassageTypeQyPage(Page pages, @Param("city")String city, @Param("title")String title); } \ No newline at end of file diff --git a/src/main/java/com/sqx/modules/artificer/service/ArtificerService.java b/src/main/java/com/sqx/modules/artificer/service/ArtificerService.java index a8dfdf2..0374e83 100644 --- a/src/main/java/com/sqx/modules/artificer/service/ArtificerService.java +++ b/src/main/java/com/sqx/modules/artificer/service/ArtificerService.java @@ -14,7 +14,7 @@ public interface ArtificerService extends IService { Result selectArtificerList(Integer page, Integer limit, Long massageTypeId, String artificerName, String longitude,String latitude,Integer sort,Integer authentication, - Integer by,Integer status,String city,Long classifyId,String phone,Integer user, Integer isStart,Integer technicianType,String isBack); + Integer by,Integer status,String city,String classifyId,String phone,Integer user, Integer isStart,Integer technicianType,String isBack); Artificer selectArtificerById(Long userId,Long artificerId,String longitude,String latitude); diff --git a/src/main/java/com/sqx/modules/artificer/service/MassageTypeService.java b/src/main/java/com/sqx/modules/artificer/service/MassageTypeService.java index a24d72a..433bf60 100644 --- a/src/main/java/com/sqx/modules/artificer/service/MassageTypeService.java +++ b/src/main/java/com/sqx/modules/artificer/service/MassageTypeService.java @@ -8,9 +8,9 @@ import com.sqx.modules.artificer.entity.MassageType; public interface MassageTypeService extends IService { - Result selectArtificerMassageList(Long artificerId,Integer status); + Result selectArtificerMassageList(Long artificerId,Integer status,String classifyId,String title); - Result selectMassageTypePage(Integer page,Integer limit,Integer status,String city,Integer sort,Integer authentication,Integer by,String title,Long artificerId,Long userId,Long parentId,Long classifyId); + Result selectMassageTypePage(Integer page,Integer limit,Integer status,String city,Integer sort,Integer authentication,Integer by,String title,Long artificerId,Long userId,Long parentId,String classifyId,Long classifyIdT); Result selectMassageTypeList(Integer status,String city,Integer sort,Integer authentication,Integer by,String title,Long artificerId,Long userId,Long parentId,Long classifyId); diff --git a/src/main/java/com/sqx/modules/artificer/service/impl/ArtificerServiceImpl.java b/src/main/java/com/sqx/modules/artificer/service/impl/ArtificerServiceImpl.java index 3e9df69..e6ada28 100644 --- a/src/main/java/com/sqx/modules/artificer/service/impl/ArtificerServiceImpl.java +++ b/src/main/java/com/sqx/modules/artificer/service/impl/ArtificerServiceImpl.java @@ -78,7 +78,7 @@ public class ArtificerServiceImpl extends ServiceImpl i @Override public Result selectArtificerList(Integer page, Integer limit, Long massageTypeId,String artificerName, String longitude,String latitude,Integer sort,Integer authentication, - Integer by,Integer status,String city,Long classifyId,String phone,Integer user, Integer isStart,Integer technicianType,String isBack){ + Integer by,Integer status,String city,String classifyId,String phone,Integer user, Integer isStart,Integer technicianType,String isBack){ Page pages=new Page<>(page,limit); if(StringUtils.isEmpty(longitude)){ diff --git a/src/main/java/com/sqx/modules/artificer/service/impl/MassageTypeServiceImpl.java b/src/main/java/com/sqx/modules/artificer/service/impl/MassageTypeServiceImpl.java index 73006e5..be69aea 100644 --- a/src/main/java/com/sqx/modules/artificer/service/impl/MassageTypeServiceImpl.java +++ b/src/main/java/com/sqx/modules/artificer/service/impl/MassageTypeServiceImpl.java @@ -30,18 +30,18 @@ public class MassageTypeServiceImpl extends ServiceImpl massageTypes = baseMapper.selectArtificerMassageList(artificerId, status); + public Result selectArtificerMassageList(Long artificerId,Integer status,String classifyId,String title){ + List massageTypes = baseMapper.selectArtificerMassageList(artificerId, status,classifyId,title); return Result.success().put("data",massageTypes); } @Override - public Result selectMassageTypePage(Integer page,Integer limit,Integer status,String city,Integer sort,Integer authentication,Integer by,String title,Long artificerId,Long userId,Long parentId,Long classifyId){ + public Result selectMassageTypePage(Integer page,Integer limit,Integer status,String city,Integer sort,Integer authentication,Integer by,String title,Long artificerId,Long userId,Long parentId,String classifyId,Long classifyIdT){ if(StringUtils.isNotEmpty(title) && userId!=null){ appSearchService.insetAppSearch(title, userId); } Page pages=new Page<>(page,limit); - return Result.success().put("data",new PageUtils(baseMapper.selectMassageTypePage(pages,status,city,sort,authentication,by,title,artificerId,parentId,classifyId))); + return Result.success().put("data",new PageUtils(baseMapper.selectMassageTypePage(pages,status,city,sort,authentication,by,title,artificerId,parentId,classifyId,classifyIdT))); } @Override public Result selectMassageTypeChildrenPage(Integer page,Integer limit,Integer status,String city,Integer sort,Integer authentication,Integer by,String title,Long artificerId,Long userId,Long parentId,Long classifyId){ diff --git a/src/main/resources/mapper/artificer/ArtificerDao.xml b/src/main/resources/mapper/artificer/ArtificerDao.xml index 04334fc..0c54e2c 100644 --- a/src/main/resources/mapper/artificer/ArtificerDao.xml +++ b/src/main/resources/mapper/artificer/ArtificerDao.xml @@ -23,8 +23,8 @@ and a.is_start=#{isStart} - - and classify_id=#{classifyId} + + and FIND_IN_SET(#{classifyId},a.classify_id) > 0 and a.technician_type=#{technicianType} diff --git a/src/main/resources/mapper/artificer/MassageTypeDao.xml b/src/main/resources/mapper/artificer/MassageTypeDao.xml index c2f76a2..8d61125 100644 --- a/src/main/resources/mapper/artificer/MassageTypeDao.xml +++ b/src/main/resources/mapper/artificer/MassageTypeDao.xml @@ -4,13 +4,20 @@ @@ -26,7 +33,7 @@ where 1=1 and ifnull(qy_type,0) = 0 - and m.massage_type_id not in (select massage_type_id from artificer_massage where artificer_id=#{artificerId}) + and m.massage_type_id not in (select massage_type_id from artificer_massage where artificer_id=#{artificerId}) and m.status=#{status} @@ -37,8 +44,11 @@ and m.parent_id=#{parentId} - - and m.classify_id=#{classifyId} + + and FIND_IN_SET(m.classify_id,#{classifyId}) > 0 + + + and m.classify_id=#{classifyIdT} and (m.city like concat('%',#{city},'%') or m.city='不限')