Browse Source

1.小程序激活码查询条件添加参数

yuanliang 1 year ago
parent
commit
791b623d37

+ 3 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dto/search/StudentSearch.java

@@ -68,6 +68,9 @@ public class StudentSearch extends QueryInfo{
     @ApiModelProperty("机构ID")
     private Long tenantId;
 
+    @ApiModelProperty("机构小组ID")
+    private Long tenantGroupId = -1L;
+
     @ApiModelProperty("机构名称")
     private String tenantName;
 

+ 4 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/Student.java

@@ -104,6 +104,10 @@ public class Student implements Serializable {
     @TableField(value = "avatar_")
     private String avatar;
 
+    @ApiModelProperty("机构小组ID")
+    @TableField(value = "tenant_group_id_")
+    private Long tenantGroupId;
+
     public Long getTenantId() {
         return tenantId;
     }

+ 3 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/wrapper/TenantActivationCodeWrapper.java

@@ -46,6 +46,9 @@ public class TenantActivationCodeWrapper {
         @ApiModelProperty("机构ID")
         private Long tenantId;
 
+        @ApiModelProperty("机构小组ID")
+        private Long tenantGroupId;
+
         @ApiModelProperty("声部ID")
         private String subjectId;
 

+ 3 - 0
cooleshow-user/user-biz/src/main/resources/config/mybatis/StudentMapper.xml

@@ -175,6 +175,9 @@
                     #{item}
                 </foreach>
             </if>
+            <if test="param.tenantGroupId != null">
+                and t.tenant_group_id_ = #{param.tenantGroupId}
+            </if>
         </where>
         <choose>
             <when test="param.orderBy != null and param.orderBy.trim() != ''">

+ 5 - 2
cooleshow-user/user-biz/src/main/resources/config/mybatis/TenantActivationCodeMapper.xml

@@ -24,7 +24,7 @@
         su.avatar_ as activationUserAvatar
         FROM tenant_activation_code t
         LEFT JOIN tenant_album_purchase ta on t.tenant_album_purchase_id_ = ta.id_
-        LEFT JOIN sys_user su on t.activation_user_id_ = su.id_
+        LEFT JOIN sys_user su on t.activation_phone_ = su.phone_
         LEFT JOIN student st on su.id_ = st.user_id_
         <if test="param.orderNo != null and param.orderNo != ''">
             left join tenant_album_purchase t4 on t4.id_ = t.tenant_album_purchase_id_
@@ -61,7 +61,10 @@
                 and ${param.orderNo} = t4.order_no_
             </if>
             <if test="param.subjectId != null and param.subjectId.trim() != ''">
-                and ${param.subjectId} = su.subject_id_
+                and #{param.subjectId} = st.subject_id_
+            </if>
+            <if test="param.tenantGroupId != null">
+                and st.tenant_group_id_ = #{param.tenantGroupId}
             </if>
         </where>
         order by t.activation_status_ asc, t.id_ desc