Kaynağa Gözat

第三方接口调整提交代码

liuchengsen 1 ay önce
ebeveyn
işleme
73a14d813b

+ 1 - 1
zhijiayun-activity/src/main/java/com/xuekairui/activity/dto/AdminCheckInRecordResponse.java

@@ -29,7 +29,7 @@ public class AdminCheckInRecordResponse {
     /** 用户昵称 */
     private String nickname;
 
-    /** 药店名称 */
+    /** 药店名称(取入驻信息 t_business_license.store_name) */
     private String pharmacyName;
 
     /** 签到日期 */

+ 3 - 2
zhijiayun-activity/src/main/resources/mapper/CheckInRecordMapper.xml

@@ -3,14 +3,14 @@
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.xuekairui.activity.mapper.CheckInRecordMapper">
 
-    <!-- 运营端:分页查询签到记录(关联用户基础信息) -->
+    <!-- 运营端:分页查询签到记录(关联用户基础信息 + 入驻信息) -->
     <select id="selectAdminRecordsPage" resultType="com.xuekairui.activity.dto.AdminCheckInRecordResponse">
         SELECT
             r.id              AS id,
             r.user_id         AS userId,
             u.phone           AS phone,
             u.nickname        AS nickname,
-            u.pharmacy_name   AS pharmacyName,
+            bl.store_name     AS pharmacyName,
             r.checkin_date    AS checkinDate,
             r.continuous_days AS continuousDays,
             r.reward_type     AS rewardType,
@@ -19,6 +19,7 @@
             r.create_time     AS createTime
         FROM t_checkin_record r
         LEFT JOIN t_user u ON u.id = r.user_id
+        LEFT JOIN t_business_license bl ON bl.user_id = r.user_id
         <where>
             <if test="userId != null">
                 AND r.user_id = #{userId}