From c0297e3783143def93fb415c62241f305027df81 Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期三, 15 一月 2025 09:11:37 +0800
Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/qijisheng

---
 ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TechnicianController.java    |    5 +++--
 ruoyi-service/ruoyi-other/src/main/resources/mapper/other/TechnicianMapper.xml                  |    6 ++++++
 ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/TechnicianMapper.java            |    2 +-
 ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TechnicianServiceImpl.java |    4 ++--
 ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/TechnicianService.java          |    3 ++-
 5 files changed, 14 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 68e1cff..d5d560c 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);
     }
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/TechnicianMapper.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/TechnicianMapper.java
index 9143f45..ff0b619 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/TechnicianMapper.java
+++ b/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);
 
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/TechnicianService.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/TechnicianService.java
index 9e245e6..78a865c 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/TechnicianService.java
+++ b/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);
 }
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TechnicianServiceImpl.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TechnicianServiceImpl.java
index 049adcb..a47544b 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TechnicianServiceImpl.java
+++ b/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
diff --git a/ruoyi-service/ruoyi-other/src/main/resources/mapper/other/TechnicianMapper.xml b/ruoyi-service/ruoyi-other/src/main/resources/mapper/other/TechnicianMapper.xml
index 8ac6d57..640c729 100644
--- a/ruoyi-service/ruoyi-other/src/main/resources/mapper/other/TechnicianMapper.xml
+++ b/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

--
Gitblit v1.7.1