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