Ver código fonte

修复业主编辑 文件丢失问题

吴学文 6 anos atrás
pai
commit
c633161ee7

+ 2 - 0
CommunityService/src/main/java/com/java110/community/smo/impl/UnitInnerServiceSMOImpl.java

@@ -9,6 +9,7 @@ import com.java110.core.smo.user.IUserInnerServiceSMO;
 import com.java110.dto.PageDto;
 import com.java110.dto.UnitDto;
 import com.java110.dto.UserDto;
+import com.java110.utils.util.StringUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RestController;
@@ -44,6 +45,7 @@ public class UnitInnerServiceSMOImpl extends BaseServiceSMO implements IUnitInne
             unitDto.setPage((page - 1) * unitDto.getRow());
         }
 
+
         List<UnitDto> units = BeanConvertUtil.covertBeanList(unitServiceDaoImpl.getUnitInfo(BeanConvertUtil.beanCovertMap(unitDto)), UnitDto.class);
 
         if (units == null || units.size() == 0) {

+ 1 - 1
WebService/src/main/resources/components/ownerPackage/edit-owner/editOwner.html

@@ -3,7 +3,7 @@
     <div class="modal-dialog modal-lg">
         <div class="modal-content">
             <div class="modal-body">
-                <h3 class="m-t-none m-b ">修改小区楼</h3>
+                <h3 class="m-t-none m-b ">修改信息</h3>
                 <div class="ibox-content">
                     <div class="row">
                         <div class="col-sm-6" style="text-align:center">

+ 7 - 2
WebService/src/main/resources/components/ownerPackage/edit-owner/editOwner.js

@@ -1,5 +1,5 @@
 (function(vc){
-
+    var _fileUrl = 'https://hc.demo.winqi.cn/callComponent/download/getFile/fileByObjId';
     vc.extends({
         propTypes: {
             notifyLoadDataComponentName:vc.propTypes.string
@@ -24,7 +24,7 @@
             vc.on('editOwner','openEditOwnerModal',function(_owner){
                 vc.copyObject(_owner,vc.component.editOwnerInfo);
                 //根据memberId 查询 照片信息
-                vc.component.editOwnerInfo.ownerPhoto = "https://hc.demo.winqi.cn/callComponent/download/getFile/fileByObjId?objId="+
+                vc.component.editOwnerInfo.ownerPhoto = _fileUrl+"?objId="+
                    vc.component.editOwnerInfo.memberId +"&communityId="+vc.getCurrentCommunity().communityId+"&fileTypeCd=10000&time="+new Date();
                 $('#editOwnerModel').modal('show');
                 vc.component._initAddOwnerMediaForEdit();
@@ -99,6 +99,11 @@
                 }
 
                 vc.component.editOwnerInfo.communityId = vc.getCurrentCommunity().communityId;
+
+                //编辑时 ownerPhoto 中内容不是照片内容,则清空
+                if(vc.component.editOwnerInfo.ownerPhoto.indexOf(_fileUrl) == -1){
+                    vc.component.editOwnerInfo.ownerPhoto = "";
+                }
                 vc.http.post(
                     'editOwner',
                     'changeOwner',

+ 0 - 3
java110-db/src/main/resources/mapper/community/UnitServiceDaoImplMapper.xml

@@ -120,9 +120,6 @@
         <if test="statusCd !=null and statusCd != ''">
             and t.status_cd= #{statusCd}
         </if>
-        <if test="statusCd ==null or statusCd == ''">
-            and t.status_cd= '0'
-        </if>
         <if test="remark !=null and remark != ''">
             and t.remark= #{remark}
         </if>