Ver código fonte

feature 代码提交

xiahan 4 meses atrás
pai
commit
c65e75bf63

+ 6 - 1
zhsw-common/src/main/java/com/rongwei/zhsw/system/wechat/impl/WeChatLoginServiceImpl.java

@@ -88,6 +88,7 @@ public class WeChatLoginServiceImpl implements WeChatLoginService {
         TenantDo tenantDo = new TenantDo();
         if (userByDsKey != null && !userByDsKey.isEmpty()) {
             tenantDo.setDskey(userByDsKey.get(0).getDsKey());
+            tenantDo.setId(userByDsKey.get(0).getDsId());
         }
         sysUserVo.setTenantDo(tenantDo);
         if(autoWeChatLoginApiPara.isNeverExpires()){
@@ -139,8 +140,8 @@ public class WeChatLoginServiceImpl implements WeChatLoginService {
      */
     // 获取系统中的所有户号信息
     public List<SwUserManagementVo> getAllOwnerByOpenId(String openId, List<String> dsKeyList) {
+        List<TenantDo> tenantDos = commonBusinessDao.getById("");
         if (dsKeyList == null || dsKeyList.isEmpty()) {
-            List<TenantDo> tenantDos = commonBusinessDao.getById("");
             dsKeyList = tenantDos.stream().map(TenantDo::getDskey).collect(Collectors.toList());
         }
         // 获取当前用户所绑定的所有用户信息
@@ -169,6 +170,10 @@ public class WeChatLoginServiceImpl implements WeChatLoginService {
         //         }).collect(Collectors.toList());
         // login.setWaterCompany(waterCompany);
         List<SwUserManagementVo> userByDsKey = swUserManagementService.getBaseMapper().getUserByDsKey(dsANdOwnerIdMap, openId);
+        userByDsKey.forEach(data->{
+            TenantDo tenantDo = tenantDos.stream().filter(info -> info.getDskey().equals(data.getDsKey())).findFirst().orElse(null);
+            data.setDsId(tenantDo.getId());
+        });
         // userByDsKey.stream().collect(Collectors.groupingBy(SwUserManagementVo::getDsKey,Collectors.mapping(get)))
         // redisService.redisCatchInit(openId, sysUserVo, DEFAULT_OWNER_CACHE_SECONDS);
         return userByDsKey;

+ 23 - 2
zhsw-common/src/main/java/com/rongwei/zhsw/system/wechat/impl/WeChatMineServiceImpl.java

@@ -1,6 +1,7 @@
 package com.rongwei.zhsw.system.wechat.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.rongwe.zhsw.system.domain.SwFeedBackOpinionDo;
 import com.rongwe.zhsw.system.domain.SwUserRepairDo;
 import com.rongwei.rwcommon.base.BaseDo;
 import com.rongwei.rwcommon.base.R;
@@ -44,15 +45,35 @@ public class WeChatMineServiceImpl implements WeChatMineService {
             if(StringUtils.isBlank(images)){
                 return;
             }
-            String imgIds = Arrays.stream(images.split("\\^_\\^")).map(img -> img.split("-;-")[1]).collect(Collectors.joining(","));
+            String imgIds = Arrays.stream(images.split("\\^_\\^"))
+                    .map(img -> img.split("-;-")[0])
+                    .collect(Collectors.joining(","));
             data.setImages(imgIds);
         });
+        // 数据字典切换
+        ZhswCommonUtils.replaceSysDictMethod(list,SwUserRepairDo::getRepairtype,SwUserRepairDo::setRepairtype,"repair_management_report_type");
+
         return R.ok(list);
     }
 
     @Override
     public R feedbackList() {
         String currentWeChatOpenId = WeChatUtils.getCurrentWeChatOpenId();
-        return null;
+        List<SwFeedBackOpinionDo> list = swFeedBackOpinionService.list(new LambdaQueryWrapper<SwFeedBackOpinionDo>()
+                .eq(BaseDo::getDeleted, "0")
+                .eq(BaseDo::getCreateuserid, currentWeChatOpenId)
+                .orderByDesc(BaseDo::getCreatedate));
+        // 对附件信息数据进行处理
+        list.forEach(data->{
+            String images = data.getFile();
+            if(StringUtils.isBlank(images)){
+                return;
+            }
+            String imgIds = Arrays.stream(images.split("\\^_\\^"))
+                    .map(img -> img.split("-;-")[0])
+                    .collect(Collectors.joining(","));
+            data.setFile(imgIds);
+        });
+        return R.ok(list);
     }
 }

+ 4 - 0
zhsw-entity/src/main/java/com/rongwe/zhsw/system/domain/SwFeedBackOpinionDo.java

@@ -107,4 +107,8 @@ public class SwFeedBackOpinionDo extends BaseDo {
      * 是否完成(1:是2:否)
      */
     private String iscompleted;
+    /**
+     * 回复内容
+     */
+    private String replycontent;
 }

+ 8 - 0
zhsw-entity/src/main/java/com/rongwe/zhsw/system/domain/SwUserRepairDo.java

@@ -102,4 +102,12 @@ public class SwUserRepairDo extends BaseDo {
      * 照片
      */
     private String images;
+    /**
+     * 回复时间
+     */
+    private Date recoverydate;
+    /**
+     * 回复内容
+     */
+    private String replycontent;
 }

+ 3 - 0
zhsw-entity/src/main/java/com/rongwe/zhsw/system/vo/SwUserManagementVo.java

@@ -22,6 +22,9 @@ public class SwUserManagementVo  extends SwUserManagementDo {
     private String defaultAccount;
     // 分组名
     private String groupName;
+
+    private String dsId;
+
     private List<String> wechatSign =new ArrayList<>();
 
     public void setWechatSign(String wechatSign) {