无关风月
2025-01-15 45668b8088fab170fe261ccce79afe24529facba
修改bug
5个文件已修改
20 ■■■■ 已修改文件
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TechnicianController.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/TechnicianMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/TechnicianService.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TechnicianServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/resources/mapper/other/TechnicianMapper.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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);
    }
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/TechnicianMapper.java
@@ -18,7 +18,7 @@
 */
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);
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/TechnicianService.java
@@ -4,6 +4,7 @@
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;
@@ -16,7 +17,7 @@
 * @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);
}
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TechnicianServiceImpl.java
@@ -39,8 +39,8 @@
    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
ruoyi-service/ruoyi-other/src/main/resources/mapper/other/TechnicianMapper.xml
@@ -25,6 +25,12 @@
            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