Selaa lähdekoodia

族友圈类型去掉,添加家族id,用于判断是否为空;修改添加家族成员

Alex 4 vuotta sitten
vanhempi
commit
b7a1eb0ea9

+ 2 - 2
ruoyi-app/src/main/java/com/ruoyi/app/controller/FamilyMemberController.java

@@ -164,8 +164,8 @@ public class FamilyMemberController extends AppBaseController {
         if (org.apache.commons.lang3.StringUtils.isBlank(memberVo.getMobile())){
             return AjaxResult.error("手机号不能为空");
         }
-        // 申请 1
-        memberVo.setStatus("1");
+        // 管理员添加成员,直接设置通过 2
+        memberVo.setStatus("2");
         return toAjax(memberService.saveOrUpdate(memberVo) ? 1 : 0);
     }
 

+ 2 - 2
ruoyi-system/src/main/java/com/ruoyi/app/domain/TbMyPublish.java

@@ -121,8 +121,8 @@ public class TbMyPublish extends BaseEntity {
     @TableField(exist = false)
     private String name;
 
-    @ApiModelProperty(value="族友圈类型 1族友 2好友")
+    @ApiModelProperty(value="家族id")
     @TableField(exist = false)
-    private String publishType;
+    private String familyId;
 
 }

+ 4 - 4
ruoyi-system/src/main/resources/mapper/app/TbMyPublishMapper.xml

@@ -28,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectPublish" resultType="com.ruoyi.app.domain.TbMyPublish">
         select b.*,(case when message = 'Y' then concat('#给',nick_name,'的留言纪念') else '' end) message_content
          from (
-            select a.*,
+            select a.*,#{familyId} family_id,
             (select id from tb_family_member m where m.app_user_id = a.app_user_id) member_id,
             (select name from tb_family_member m where m.app_user_id = a.app_user_id) name,
             (select nick_name from tb_app_user us where us.id = a.app_user_id)nick_name,
@@ -37,10 +37,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             (select avatar from tb_app_user us where us.id = a.message_user_id)message_user_avatar,
             (select count(1)  from tb_publish_thumbs where publish_id = a.id)thumbs
             from (
-                select p.*,'1' publish_type from tb_my_publish p
+                select p.* from tb_my_publish p
                 where deleted = 'N' and app_user_id = #{appUserId}
                 union
-                select p.*,'2' publish_type from tb_my_publish p
+                select p.* from tb_my_publish p
                 where deleted = 'N' and app_user_id in (
                     select f.app_user_id uid from tb_my_friends f where friends_user_id = #{appUserId} and status = 2
                     union all
@@ -48,7 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 )
                 <if test="familyId != null and familyId != '' ">
                 union
-                select p.*,'1' publish_type from tb_my_publish p
+                select p.* from tb_my_publish p
                 where deleted = 'N' and app_user_id in (
                     select u.id from tb_app_user u
                     left join tb_family_member m on u.id = m.app_user_id