夏文涛 1 anno fa
parent
commit
d4d100ae1d

+ 1 - 1
src/main/java/com/sqx/modules/app/controller/app/AppController.java

@@ -46,7 +46,7 @@ public class AppController {
 
         UserEntity userEntity = userService.selectUserById(userId);
         if (userEntity != null) {
-            //tb_user表中的user_type = 2 标识当前用户是骑手,
+            //tb_user表中的根据rider_open_id是不是null判断他是不是骑手 标识当前用户是骑手,
             //tb_user表中的rider_station_id 标识当前骑手所在站点,
             //tb_user表中的on_line_flag 中存储的值0是休息,1是接单中;
             //查找被转单骑手是要找同一个站点,并且接单中的

+ 3 - 0
src/main/java/com/sqx/modules/app/entity/queryRidersVo.java

@@ -25,4 +25,7 @@ public class queryRidersVo {
 
     @ApiModelProperty("站点名称")
     private String stationName;
+
+    @ApiModelProperty("骑手头像")
+    private String avatar;
 }

+ 2 - 2
src/main/resources/mapper/app/UserDao.xml

@@ -52,10 +52,10 @@
     </select>
 
     <select id="queryRiders" resultType="com.sqx.modules.app.entity.queryRidersVo">
-        select u.user_id,u.user_name,u.phone,r.station_name
+        select u.user_id,u.user_name,u.phone,u.avatar,r.station_name
         from tb_user u
         left join rider_station r on r.id = u.rider_station_id
-        where u.user_type = 2 and u.on_line_flag = 1
+        where u.rider_open_id is not null and u.on_line_flag = 1
         and u.rider_station_id = #{riderStationId} and u.user_id != #{userId}
         <if test="keyword != null and keyword != ''">
             and (u.phone like concat('%',#{keyword},'%') or u.user_name like concat('%',#{keyword},'%'))