Bläddra i källkod

调整SysOrgMapper,删除字段部分语句没有删除完;新增 shortName、Remark 字段;调整同步机构代码

zhulu 2 år sedan
förälder
incheckning
6de0e2f15b

+ 3 - 2
soc-api/soc-api-system/src/main/java/com/xunmei/system/api/RemoteOrgService.java

@@ -4,6 +4,7 @@ import com.xunmei.common.core.constant.SecurityConstants;
 import com.xunmei.common.core.constant.ServiceNameConstants;
 import com.xunmei.common.core.domain.R;
 import com.xunmei.system.api.domain.Org;
+import com.xunmei.system.api.domain.SysOrg;
 import com.xunmei.system.api.factory.RemoteOrgFallbackFactory;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.*;
@@ -19,9 +20,9 @@ public interface RemoteOrgService {
      * @return 结果
      */
     @GetMapping("/org/list/nopage")
-    public R<List<Org>> getAllOrg(@RequestHeader(SecurityConstants.FROM_SOURCE) String source);
+    public R<List<SysOrg>> getAllOrg(@RequestHeader(SecurityConstants.FROM_SOURCE) String source);
 
     @PostMapping("/org/sync/batch")
-    public R<List<Org>> batchSaveSyncOrg(@RequestBody List<Org> orgList, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
+    public R<Boolean> batchSaveSyncOrg(@RequestBody List<SysOrg> orgList, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
 
 }

+ 21 - 4
soc-api/soc-api-system/src/main/java/com/xunmei/system/api/domain/SysOrg.java

@@ -50,7 +50,7 @@ public class SysOrg extends BaseEntity {
 
     @ApiModelProperty(value = "禁用")
     @TableField(value = "is_lock")
-    private String isLock;
+    private Integer isLock;
 
     @ApiModelProperty(value = "负责人")
     @TableField(value = "manager")
@@ -83,7 +83,7 @@ public class SysOrg extends BaseEntity {
 
     @ApiModelProperty(value = "机构类型")
     @TableField(value = "type")
-    private Long type;
+    private Integer type;
 
     @ApiModelProperty(value = "路径")
     @TableField(value = "path")
@@ -91,11 +91,11 @@ public class SysOrg extends BaseEntity {
 
     @ApiModelProperty(value = "是否删除")
     @TableField(value = "deleted")
-    private Long deleted;
+    private Integer deleted;
 
     @TableField(value = "sort")
     @ApiModelProperty(value = "排序")
-    private BigDecimal sort;
+    private Double sort;
     @ApiModelProperty(value = "天气城市区域编码")
     @TableField(value = "weather_city_code")
     private String weatherCityCode;
@@ -106,12 +106,29 @@ public class SysOrg extends BaseEntity {
     @ApiModelProperty(value = "机构来源, 0:系统新增 1:fjnx同步")
     @TableField(value = "source")
     private Integer source;
+
+    /**
+     * 机构简称
+     */
+    @ApiModelProperty(value = "机构简称")
+    @TableField(value = "short_name")
+    private String shortName;
+
+    /**
+     * 备注
+     */
+    @ApiModelProperty(value = "备注")
+    @TableField(value = "remark")
+    private String remark;
+
     /**
      * 子机构
      */
     @TableField(exist = false)
     private List<SysOrg> children = new ArrayList<SysOrg>();
 
+
+
     @Override
     public String toString() {
         return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)

+ 3 - 2
soc-api/soc-api-system/src/main/java/com/xunmei/system/api/factory/RemoteOrgFallbackFactory.java

@@ -5,6 +5,7 @@ import com.xunmei.system.api.RemoteOrgService;
 import com.xunmei.system.api.RemoteUserService;
 import com.xunmei.system.api.domain.Org;
 import com.xunmei.system.api.domain.SysOperLog;
+import com.xunmei.system.api.domain.SysOrg;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.cloud.openfeign.FallbackFactory;
@@ -29,13 +30,13 @@ public class RemoteOrgFallbackFactory implements FallbackFactory<RemoteOrgServic
         return new RemoteOrgService()
         {
             @Override
-            public R<List<Org>> getAllOrg(String source)
+            public R<List<SysOrg>> getAllOrg(String source)
             {
                 return R.fail("获取获取机构失败:" + throwable.getMessage());
             }
 
             @Override
-            public R<List<Org>> batchSaveSyncOrg(List<Org> orgList, String source) {
+            public R<Boolean> batchSaveSyncOrg(List<SysOrg> orgList, String source) {
                 return null;
             }
 

+ 69 - 49
soc-modules/soc-modules-sync/src/main/java/com/xunmei/sync/service/impl/FJNXSyncServiceImpl.java

@@ -17,6 +17,7 @@ import com.xunmei.sync.service.IFJNXUserSyncService;
 import com.xunmei.sync.service.IOrgJinxService;
 import com.xunmei.system.api.RemoteOrgService;
 import com.xunmei.system.api.domain.Org;
+import com.xunmei.system.api.domain.SysOrg;
 import io.netty.util.internal.StringUtil;
 import lombok.extern.slf4j.Slf4j;
 import okhttp3.internal.Internal;
@@ -25,6 +26,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
+import java.math.BigDecimal;
 import java.util.*;
 import java.util.stream.Collectors;
 
@@ -147,28 +149,43 @@ public class FJNXSyncServiceImpl implements IFJNXSyncService {
         iOrgJinxService.saveOrUpdateBatch(fjnxOrgList);
 
 
-        R<List<Org>> existAllOrgResult = remoteOrgService.getAllOrg(SecurityConstants.INNER);
-        List<Org> existOrgList = existAllOrgResult.getData();
+        R<List<SysOrg>> existAllOrgResult = remoteOrgService.getAllOrg(SecurityConstants.INNER);
+        if(existAllOrgResult.getCode()!=200){
+            return existAllOrgResult.getMsg();
+        }
+        List<SysOrg> existOrgList = existAllOrgResult.getData();
 
 
 //        List<OrgExtendInfo> orgExtendInfoList = new ArrayList<>();
         // 第一同步所有机构
         if (ObjectUtil.isEmpty(existOrgList)) {
-            remoteOrgService.batchSaveSyncOrg(FjnxOrgsConvertToOrgs(fjnxXmlOrgDto.getOrgVos()),SecurityConstants.INNER);
+            List<SysOrg> rList = FjnxOrgsConvertToSysOrgs(fjnxOrgList);
+            resetParentIdAndPath(rList);
+            final R<Boolean> listR = remoteOrgService.batchSaveSyncOrg(rList, SecurityConstants.INNER);
+            if(listR.getCode()!=200)
+            {
+                log.error("调用远程服务接口remoteOrgService.batchSaveSyncOrg 失败:{0}",listR.getMsg());
+                return listR.getMsg();
+            }
             return null;
         }
 
-        List<Org> addList = new ArrayList<>();
-        List<Org> updateList = new ArrayList<>();
-        List<Org> deleteList;
+        List<SysOrg> addList = new ArrayList<>();
+        List<SysOrg> updateList = new ArrayList<>();
+        List<SysOrg> deleteList;
         List<String> fjnxOrgCodeList = new ArrayList<>();
         fjnxOrgList.stream().forEach(fjnxOrg -> {
             String fjnxorgCode = fjnxOrg.getOrgCode();
             if (!StringUtil.isNullOrEmpty(fjnxorgCode)) {
-                Optional<Org> optional = existOrgList.stream().filter(x -> fjnxOrg.getOrgCode().equals(x.getCode())).findFirst();
-                if (optional.isPresent()) {
-                    updateList.add(FjnxOrgConvertToSysOrg(optional.get(), fjnxOrg));
-                } else {
+                if(ObjectUtil.isNotEmpty(existOrgList)){
+                    Optional<SysOrg> optional = existOrgList.stream().filter(x -> fjnxOrg.getOrgCode().equals(x.getCode())).findFirst();
+                    if (optional.isPresent()) {
+                        updateList.add(FjnxOrgConvertToSysOrg(optional.get(), fjnxOrg));
+                    }else {
+                        addList.add(FjnxOrgConvertToSysOrg(fjnxOrg));
+                    }
+                }
+                else {
                     addList.add(FjnxOrgConvertToSysOrg(fjnxOrg));
                 }
                 fjnxOrgCodeList.add(fjnxOrg.getOrgCode());
@@ -187,7 +204,12 @@ public class FJNXSyncServiceImpl implements IFJNXSyncService {
 
         resetParentIdAndPath(existOrgList);
 
-        remoteOrgService.batchSaveSyncOrg(existOrgList, SecurityConstants.INNER);
+        final R<Boolean> listR = remoteOrgService.batchSaveSyncOrg(existOrgList, SecurityConstants.INNER);
+        if(ObjectUtil.isNotEmpty(listR) && listR.getCode()!=200)
+        {
+            log.error("调用远程服务接口remoteOrgService.batchSaveSyncOrg 失败:{0}",listR.getMsg());
+            return listR.getMsg();
+        }
         return null;
     }
 
@@ -230,12 +252,12 @@ public class FJNXSyncServiceImpl implements IFJNXSyncService {
 //        return;
     }
 
-    public void resetParentIdAndPath(List<Org> orgList) {
+    public void resetParentIdAndPath(List<SysOrg> orgList) {
 
-        final List<Org> collect = orgList.stream().filter(topOrg -> StringUtil.isNullOrEmpty(topOrg.getParentGuid()) && 0==topOrg.getDeleted()).collect(Collectors.toList());
+        final List<SysOrg> collect = orgList.stream().filter(topOrg -> StringUtil.isNullOrEmpty(topOrg.getParentGuid()) && 0==topOrg.getDeleted()).collect(Collectors.toList());
         collect.stream().forEach(org -> {
             org.setParentId(-1L);
-            org.setLevel(1);
+//            org.setLevel(1);
             org.setPath(org.getId() + "-");
         });
 
@@ -252,11 +274,11 @@ public class FJNXSyncServiceImpl implements IFJNXSyncService {
             }
 
             if (!StringUtil.isNullOrEmpty(org.getParentGuid())) {
-                Optional<Org> parentOrgOptional = orgList.stream().filter(pOrg ->!StringUtil.isNullOrEmpty(pOrg.getGuid()) && pOrg.getGuid().equals(org.getParentGuid())).findFirst();
+                Optional<SysOrg> parentOrgOptional = orgList.stream().filter(pOrg ->!StringUtil.isNullOrEmpty(pOrg.getGuid()) && pOrg.getGuid().equals(org.getParentGuid())).findFirst();
                 if (parentOrgOptional.isPresent()) {
                     org.setParentId(parentOrgOptional.get().getId());
                     if (StringUtil.isNullOrEmpty(parentOrgOptional.get().getPath())) {
-                        List<Org> childOrg = new ArrayList<>();
+                        List<SysOrg> childOrg = new ArrayList<>();
                         childOrg.add(org);
                         resetParentOrgPath(parentOrgOptional.get(), childOrg, orgList);
                     } else {
@@ -267,14 +289,14 @@ public class FJNXSyncServiceImpl implements IFJNXSyncService {
                 }
             } else {
                 org.setParentId(-1L);
-                org.setLevel(1);
+//                org.setLevel(1);
                 org.setPath(org.getId() + "-");
             }
         });
     }
 
-    public void resetParentOrgPath(Org parentOrg, List<Org> childOrg, List<Org> orgList) {
-        Optional<Org> parentOrgOptional = orgList.stream().filter(pOrg ->!StringUtil.isNullOrEmpty(pOrg.getGuid()) && pOrg.getGuid().equals(parentOrg.getParentGuid())).findFirst();
+    public void resetParentOrgPath(SysOrg parentOrg, List<SysOrg> childOrg, List<SysOrg> orgList) {
+        Optional<SysOrg> parentOrgOptional = orgList.stream().filter(pOrg ->!StringUtil.isNullOrEmpty(pOrg.getGuid()) && pOrg.getGuid().equals(parentOrg.getParentGuid())).findFirst();
         if (parentOrgOptional.isPresent()) {
             parentOrg.setParentId(parentOrgOptional.get().getId());
             if (!StringUtil.isNullOrEmpty(parentOrgOptional.get().getPath())) {
@@ -290,20 +312,20 @@ public class FJNXSyncServiceImpl implements IFJNXSyncService {
         }
     }
 
-    public void retOrgPath(Org parentOrg, Org org) {
+    public void retOrgPath(SysOrg parentOrg, SysOrg org) {
         org.setParentId(parentOrg.getId());
-        if (parentOrg.getLevel() != null) {
-            parentOrg.setLevel(parentOrg.getLevel() + 1);
-        }
+//        if (parentOrg.getLevel() != null) {
+//            parentOrg.setLevel(parentOrg.getLevel() + 1);
+//        }
         org.setPath(parentOrg.getPath() + parentOrg.getId() + "-");
     }
 
-    public void retChildOrgPath(Org parentOrg, List<Org> childOrgs) {
+    public void retChildOrgPath(SysOrg parentOrg, List<SysOrg> childOrgs) {
         if (ObjectUtil.isNotEmpty(childOrgs)) {
             if (ObjectUtil.isNotEmpty(parentOrg)) {
-                Optional<Org> orgOptional = childOrgs.stream().filter(org -> org.getParentId().equals(parentOrg.getId())).findFirst();
+                Optional<SysOrg> orgOptional = childOrgs.stream().filter(org -> org.getParentId().equals(parentOrg.getId())).findFirst();
                 if (orgOptional.isPresent()) {
-                    Org childOrg = orgOptional.get();
+                    SysOrg childOrg = orgOptional.get();
                     retOrgPath(parentOrg, childOrg);
                     childOrgs.remove(childOrg);
                     retChildOrgPath(childOrg, childOrgs);
@@ -329,18 +351,18 @@ public class FJNXSyncServiceImpl implements IFJNXSyncService {
 //        return org;
 //    }
 //
-    private List<Org> FjnxOrgsConvertToOrgs(List<FJNXOrgDto> fjnxOrgDtoList) {
-        List<Org> result = new ArrayList<>();
-        if (ObjectUtil.isNotEmpty(fjnxOrgDtoList)) {
-            fjnxOrgDtoList.stream().forEach(x -> {
-                result.add(FjnxOrgConvertToOrg(x));
-            });
-        }
-        return result;
-    }
+//    private List<SysOrg> FjnxOrgsConvertToSysOrgs(List<OrgFjnx> fjnxOrgDtoList) {
+//        List<SysOrg> result = new ArrayList<>();
+//        if (ObjectUtil.isNotEmpty(fjnxOrgDtoList)) {
+//            fjnxOrgDtoList.stream().forEach(x -> {
+//                result.add(FjnxOrgConvertToSysOrg(x));
+//            });
+//        }
+//        return result;
+//    }
 
-    private Org FjnxOrgConvertToOrg(FJNXOrgDto fjnxOrgDto) {
-        Org org = new Org();
+    private SysOrg FjnxOrgConvertToOrg(OrgFjnx fjnxOrgDto) {
+        SysOrg org = new SysOrg();
         org.setId(IDHelper.id());
         org.setName(fjnxOrgDto.getOrgName());
         org.setShortName(fjnxOrgDto.getShortName());
@@ -353,7 +375,7 @@ public class FJNXSyncServiceImpl implements IFJNXSyncService {
         org.setSort(fjnxOrgDto.getOrgOrder());
         org.setUpdateTime(fjnxOrgDto.getUpdateTime());
         org.setRemark(fjnxOrgDto.getRemark());
-        org.setLevel(fjnxOrgDto.getOrgPath().split("/").length);
+//        org.setLevel(fjnxOrgDto.getOrgPath().split("/").length);
         // TODO 机构状态和机构类型转换
         //org.setIsLock(fjnxOrgDto.getUsableFlag());
         org.setIsLock(fjnxOrgDto.getUsableFlag());
@@ -361,8 +383,8 @@ public class FJNXSyncServiceImpl implements IFJNXSyncService {
 
     }
 
-    private List<Org> FjnxOrgsConvertToSysOrgs(List<OrgFjnx> fjnxOrgList) {
-        List<Org> result = new ArrayList<>();
+    private List<SysOrg> FjnxOrgsConvertToSysOrgs(List<OrgFjnx> fjnxOrgList) {
+        List<SysOrg> result = new ArrayList<>();
         if (ObjectUtil.isNotEmpty(fjnxOrgList)) {
             fjnxOrgList.stream().forEach(x -> {
                 result.add(FjnxOrgConvertToSysOrg(x));
@@ -371,8 +393,8 @@ public class FJNXSyncServiceImpl implements IFJNXSyncService {
         return result;
     }
 
-    private Org FjnxOrgConvertToSysOrg(OrgFjnx fjnxOrgDto) {
-        Org org = new Org();
+    private SysOrg FjnxOrgConvertToSysOrg(OrgFjnx fjnxOrgDto) {
+        SysOrg org = new SysOrg();
         org.setId(IDHelper.id());
         org.setName(fjnxOrgDto.getOrgName());
         org.setShortName(fjnxOrgDto.getShortName());
@@ -384,9 +406,10 @@ public class FJNXSyncServiceImpl implements IFJNXSyncService {
         org.setSort(fjnxOrgDto.getOrgOrder());
         org.setUpdateTime(fjnxOrgDto.getUpdateTime());
         org.setRemark(fjnxOrgDto.getRemark());
-        org.setLevel(fjnxOrgDto.getOrgPath().split("/").length);
+        //org.setLevel(fjnxOrgDto.getOrgPath().split("/").length);
         org.setIsLock(fjnxOrgDto.getUsableFlag());
         org.setDeleted(0);
+        org.setSource(1);
         return org;
     }
 //
@@ -448,7 +471,7 @@ public class FJNXSyncServiceImpl implements IFJNXSyncService {
 
     }
 
-    private Org FjnxOrgConvertToSysOrg(Org org, OrgFjnx fjnxOrg) {
+    private SysOrg FjnxOrgConvertToSysOrg(SysOrg org, OrgFjnx fjnxOrg) {
         org.setName(fjnxOrg.getOrgName());
         org.setShortName(fjnxOrg.getShortName());
         org.setCode(fjnxOrg.getOrgCode());
@@ -459,9 +482,10 @@ public class FJNXSyncServiceImpl implements IFJNXSyncService {
         org.setSort(fjnxOrg.getOrgOrder());
         org.setUpdateTime(fjnxOrg.getUpdateTime());
         org.setRemark(fjnxOrg.getRemark());
-        org.setLevel(fjnxOrg.getOrgPath().split("/").length);
+//        org.setLevel(fjnxOrg.getOrgPath().split("/").length);
         // TODO 机构状态和机构类型转换
         org.setIsLock(fjnxOrg.getUsableFlag());
+        org.setSource(1);
         return org;
 
     }
@@ -529,11 +553,7 @@ public class FJNXSyncServiceImpl implements IFJNXSyncService {
         if (ObjectUtil.isEmpty(list)) {
             return new ArrayList<OrgFjnx>();
         }
-
-
         List<FjnxOrgBusinessRelation> fjnxOrgBusinessRelationList = fjnxOrgBusinessRelationMapper.selectList(Wrappers.emptyWrapper());
-
-
         final ArrayList<OrgFjnx> resultList = new ArrayList<>();
         Date syncDateTime=new Date();
         list.stream().forEach(item -> {

+ 1 - 1
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/impl/SysOrgServiceImpl.java

@@ -31,7 +31,7 @@ public class SysOrgServiceImpl extends ServiceImpl<SysOrgMapper, SysOrg> impleme
     @Override
     public TableDataInfo selectPage(SysOrg org) {
         //未删除
-        org.setDeleted(0L);
+        org.setDeleted(0);
         Page<SysOrg> page;
         //分页
         if (org.getPageNum() != null && org.getPageSize() != null) {

+ 206 - 182
soc-modules/soc-modules-system/src/main/resources/mapper/system/SysOrgMapper.xml

@@ -24,12 +24,15 @@
                 <result property="deleted" column="deleted"/>
                 <result property="sort" column="sort"/>
                 <result property="source" column="source"/>
+                <result property="shortName" column="short_name"/>
+                <result property="remark" column="remark"/>
+                <result property="source" column="source"/>
                 <result property="createBy" column="create_by"/>
                 <result property="updateBy" column="update_by"/>
     </resultMap>
 
     <sql id="selectSysOrgVo">
-        select id, address, code, guid, is_lock, manager, manager_phone, name, parent_id, phone, city_code , type, create_time, update_time, parent_guid, deleted, sort,  create_by, update_by,weather_city_code,org_extend_id,source
+        select id, address, code, guid, is_lock, manager, manager_phone, name, parent_id, phone, city_code , type, create_time, update_time, parent_guid, deleted, sort,  create_by, update_by,weather_city_code,org_extend_id,source,short_name,remark
         from sys_org
     </sql>
 
@@ -43,9 +46,9 @@
                         <if test="code != null  and code != ''">
                             and code = #{code}
                         </if>
-                        <if test="deviceCount != null ">
-                            and device_count = #{deviceCount}
-                        </if>
+<!--                        <if test="deviceCount != null ">-->
+<!--                            and device_count = #{deviceCount}-->
+<!--                        </if>-->
                         <if test="guid != null  and guid != ''">
                             and guid = #{guid}
                         </if>
@@ -70,63 +73,63 @@
                         <if test="cityCode != null  and cityCode != ''">
                             and city_code = #{cityCode}
                         </if>
-                        <if test="openYear != null ">
-                            and open_year = #{openYear}
-                        </if>
-                        <if test="fitYear != null ">
-                            and fit_year = #{fitYear}
-                        </if>
-                        <if test="floorage != null  and floorage != ''">
-                            and floorage = #{floorage}
-                        </if>
-                        <if test="employee != null ">
-                            and employee = #{employee}
-                        </if>
-                        <if test="isOwnRight != null ">
-                            and is_own_right = #{isOwnRight}
-                        </if>
-                        <if test="isRent != null ">
-                            and is_rent = #{isRent}
-                        </if>
-                        <if test="isOnly != null ">
-                            and is_only = #{isOnly}
-                        </if>
-                        <if test="buildYear != null ">
-                            and build_year = #{buildYear}
-                        </if>
-                        <if test="placeType != null ">
-                            and place_type = #{placeType}
-                        </if>
-                        <if test="buildHeight != null ">
-                            and build_height = #{buildHeight}
-                        </if>
-                        <if test="social != null ">
-                            and social = #{social}
-                        </if>
-                        <if test="naturalEnvir != null ">
-                            and natural_envir = #{naturalEnvir}
-                        </if>
+<!--                        <if test="openYear != null ">-->
+<!--                            and open_year = #{openYear}-->
+<!--                        </if>-->
+<!--                        <if test="fitYear != null ">-->
+<!--                            and fit_year = #{fitYear}-->
+<!--                        </if>-->
+<!--                        <if test="floorage != null  and floorage != ''">-->
+<!--                            and floorage = #{floorage}-->
+<!--                        </if>-->
+<!--                        <if test="employee != null ">-->
+<!--                            and employee = #{employee}-->
+<!--                        </if>-->
+<!--                        <if test="isOwnRight != null ">-->
+<!--                            and is_own_right = #{isOwnRight}-->
+<!--                        </if>-->
+<!--                        <if test="isRent != null ">-->
+<!--                            and is_rent = #{isRent}-->
+<!--                        </if>-->
+<!--                        <if test="isOnly != null ">-->
+<!--                            and is_only = #{isOnly}-->
+<!--                        </if>-->
+<!--                        <if test="buildYear != null ">-->
+<!--                            and build_year = #{buildYear}-->
+<!--                        </if>-->
+<!--                        <if test="placeType != null ">-->
+<!--                            and place_type = #{placeType}-->
+<!--                        </if>-->
+<!--                        <if test="buildHeight != null ">-->
+<!--                            and build_height = #{buildHeight}-->
+<!--                        </if>-->
+<!--                        <if test="social != null ">-->
+<!--                            and social = #{social}-->
+<!--                        </if>-->
+<!--                        <if test="naturalEnvir != null ">-->
+<!--                            and natural_envir = #{naturalEnvir}-->
+<!--                        </if>-->
                         <if test="type != null ">
                             and type = #{type}
                         </if>
-                        <if test="modifiedName != null  and modifiedName != ''">
-                            and modified_name like concat('%', #{modifiedName}, '%')
-                        </if>
-                        <if test="modifiedId != null ">
-                            and modified_id = #{modifiedId}
+                        <if test="updateBy != null  and updateBy != ''">
+                            and update_by like concat('%', #{updateBy}, '%')
                         </if>
+<!--                        <if test="modifiedId != null ">-->
+<!--                            and modified_id = #{modifiedId}-->
+<!--                        </if>-->
                         <if test="path != null  and path != ''">
                             and path = #{path}
                         </if>
-                        <if test="vid != null ">
-                            and vid = #{vid}
-                        </if>
-                        <if test="level != null ">
-                            and level = #{level}
-                        </if>
-                        <if test="oid != null  and oid != ''">
-                            and oid = #{oid}
-                        </if>
+<!--                        <if test="vid != null ">-->
+<!--                            and vid = #{vid}-->
+<!--                        </if>-->
+<!--                        <if test="level != null ">-->
+<!--                            and level = #{level}-->
+<!--                        </if>-->
+<!--                        <if test="oid != null  and oid != ''">-->
+<!--                            and oid = #{oid}-->
+<!--                        </if>-->
                         <if test="parentGuid != null  and parentGuid != ''">
                             and parent_guid = #{parentGuid}
                         </if>
@@ -136,9 +139,9 @@
                         <if test="sort != null ">
                             and sort = #{sort}
                         </if>
-                        <if test="location != null ">
-                            and location = #{location}
-                        </if>
+<!--                        <if test="location != null ">-->
+<!--                            and location = #{location}-->
+<!--                        </if>-->
         </where>
     </select>
 
@@ -164,8 +167,8 @@
                     </if>
                     <if test="code != null">code,
                     </if>
-                    <if test="deviceCount != null">device_count,
-                    </if>
+<!--                    <if test="deviceCount != null">device_count,-->
+<!--                    </if>-->
                     <if test="guid != null">guid,
                     </if>
                     <if test="isLock != null">is_lock,
@@ -176,52 +179,54 @@
                     </if>
                     <if test="name != null">name,
                     </if>
+                    <if test="shortName != null">short_name,
+                    </if>
                     <if test="parentId != null">parent_id,
                     </if>
                     <if test="phone != null">phone,
                     </if>
                     <if test="cityCode != null">city_code,
                     </if>
-                    <if test="openYear != null">open_year,
-                    </if>
-                    <if test="fitYear != null">fit_year,
-                    </if>
-                    <if test="floorage != null">floorage,
-                    </if>
-                    <if test="employee != null">employee,
-                    </if>
-                    <if test="isOwnRight != null">is_own_right,
-                    </if>
-                    <if test="isRent != null">is_rent,
-                    </if>
-                    <if test="isOnly != null">is_only,
-                    </if>
-                    <if test="buildYear != null">build_year,
-                    </if>
-                    <if test="placeType != null">place_type,
-                    </if>
-                    <if test="buildHeight != null">build_height,
-                    </if>
-                    <if test="social != null">social,
-                    </if>
-                    <if test="naturalEnvir != null">natural_envir,
-                    </if>
+<!--                    <if test="openYear != null">open_year,-->
+<!--                    </if>-->
+<!--                    <if test="fitYear != null">fit_year,-->
+<!--                    </if>-->
+<!--                    <if test="floorage != null">floorage,-->
+<!--                    </if>-->
+<!--                    <if test="employee != null">employee,-->
+<!--                    </if>-->
+<!--                    <if test="isOwnRight != null">is_own_right,-->
+<!--                    </if>-->
+<!--                    <if test="isRent != null">is_rent,-->
+<!--                    </if>-->
+<!--                    <if test="isOnly != null">is_only,-->
+<!--                    </if>-->
+<!--                    <if test="buildYear != null">build_year,-->
+<!--                    </if>-->
+<!--                    <if test="placeType != null">place_type,-->
+<!--                    </if>-->
+<!--                    <if test="buildHeight != null">build_height,-->
+<!--                    </if>-->
+<!--                    <if test="social != null">social,-->
+<!--                    </if>-->
+<!--                    <if test="naturalEnvir != null">natural_envir,-->
+<!--                    </if>-->
                     <if test="type != null">type,
                     </if>
                     <if test="createTime != null">create_time,
                     </if>
-                    <if test="modifiedName != null">modified_name,
+                    <if test="updateBy != null">update_by,
                     </if>
                     <if test="updateTime != null">update_time,
                     </if>
-                    <if test="modifiedId != null">modified_id,
-                    </if>
+<!--                    <if test="modifiedId != null">modified_id,-->
+<!--                    </if>-->
                     <if test="path != null">path,
                     </if>
-                    <if test="vid != null">vid,
-                    </if>
-                    <if test="level != null">level,
-                    </if>
+<!--                    <if test="vid != null">vid,-->
+<!--                    </if>-->
+<!--                    <if test="level != null">level,-->
+<!--                    </if>-->
                     <if test="oid != null">oid,
                     </if>
                     <if test="parentGuid != null">parent_guid,
@@ -230,8 +235,12 @@
                     </if>
                     <if test="sort != null">sort,
                     </if>
-                    <if test="location != null">location,
+                    <if test="source != null">source,
+                    </if>
+                    <if test="remark != null">remark,
                     </if>
+<!--                    <if test="location != null">location,-->
+<!--                    </if>-->
                     <if test="createBy != null">create_by,
                     </if>
                     <if test="updateBy != null">update_by,
@@ -242,8 +251,8 @@
                     </if>
                     <if test="code != null">#{code},
                     </if>
-                    <if test="deviceCount != null">#{deviceCount},
-                    </if>
+<!--                    <if test="deviceCount != null">#{deviceCount},-->
+<!--                    </if>-->
                     <if test="guid != null">#{guid},
                     </if>
                     <if test="isLock != null">#{isLock},
@@ -254,62 +263,68 @@
                     </if>
                     <if test="name != null">#{name},
                     </if>
+                    <if test="shortName != null">#{shortName},
+                    </if>
                     <if test="parentId != null">#{parentId},
                     </if>
                     <if test="phone != null">#{phone},
                     </if>
                     <if test="cityCode != null">#{cityCode},
                     </if>
-                    <if test="openYear != null">#{openYear},
-                    </if>
-                    <if test="fitYear != null">#{fitYear},
-                    </if>
-                    <if test="floorage != null">#{floorage},
-                    </if>
-                    <if test="employee != null">#{employee},
-                    </if>
-                    <if test="isOwnRight != null">#{isOwnRight},
-                    </if>
-                    <if test="isRent != null">#{isRent},
-                    </if>
-                    <if test="isOnly != null">#{isOnly},
-                    </if>
-                    <if test="buildYear != null">#{buildYear},
-                    </if>
-                    <if test="placeType != null">#{placeType},
-                    </if>
-                    <if test="buildHeight != null">#{buildHeight},
-                    </if>
-                    <if test="social != null">#{social},
-                    </if>
-                    <if test="naturalEnvir != null">#{naturalEnvir},
-                    </if>
+<!--                    <if test="openYear != null">#{openYear},-->
+<!--                    </if>-->
+<!--                    <if test="fitYear != null">#{fitYear},-->
+<!--                    </if>-->
+<!--                    <if test="floorage != null">#{floorage},-->
+<!--                    </if>-->
+<!--                    <if test="employee != null">#{employee},-->
+<!--                    </if>-->
+<!--                    <if test="isOwnRight != null">#{isOwnRight},-->
+<!--                    </if>-->
+<!--                    <if test="isRent != null">#{isRent},-->
+<!--                    </if>-->
+<!--                    <if test="isOnly != null">#{isOnly},-->
+<!--                    </if>-->
+<!--                    <if test="buildYear != null">#{buildYear},-->
+<!--                    </if>-->
+<!--                    <if test="placeType != null">#{placeType},-->
+<!--                    </if>-->
+<!--                    <if test="buildHeight != null">#{buildHeight},-->
+<!--                    </if>-->
+<!--                    <if test="social != null">#{social},-->
+<!--                    </if>-->
+<!--                    <if test="naturalEnvir != null">#{naturalEnvir},-->
+<!--                    </if>-->
                     <if test="type != null">#{type},
                     </if>
                     <if test="createTime != null">#{createTime},
                     </if>
-                    <if test="modifiedName != null">#{modifiedName},
+                    <if test="updateBy != null">#{updateBy},
                     </if>
                     <if test="updateTime != null">#{updateTime},
                     </if>
-                    <if test="modifiedId != null">#{modifiedId},
-                    </if>
+<!--                    <if test="modifiedId != null">#{modifiedId},-->
+<!--                    </if>-->
                     <if test="path != null">#{path},
                     </if>
-                    <if test="vid != null">#{vid},
-                    </if>
-                    <if test="level != null">#{level},
-                    </if>
-                    <if test="oid != null">#{oid},
-                    </if>
+<!--                    <if test="vid != null">#{vid},-->
+<!--                    </if>-->
+<!--                    <if test="level != null">#{level},-->
+<!--                    </if>-->
+<!--                    <if test="oid != null">#{oid},-->
+<!--                    </if>-->
                     <if test="parentGuid != null">#{parentGuid},
                     </if>
                     <if test="deleted != null">#{deleted},
                     </if>
                     <if test="sort != null">#{sort},
                     </if>
-                    <if test="location != null">#{location},
+                    <if test="source != null">#{source},
+                    </if>
+                    <if test="remark != null">#{remark},
                     </if>
+<!--                    <if test="location != null">#{location},-->
+<!--                    </if>-->
                     <if test="createBy != null">#{createBy},
                     </if>
                     <if test="updateBy != null">#{updateBy},
@@ -326,9 +341,9 @@
                     <if test="code != null">code =
                         #{code},
                     </if>
-                    <if test="deviceCount != null">device_count =
-                        #{deviceCount},
-                    </if>
+<!--                    <if test="deviceCount != null">device_count =-->
+<!--                        #{deviceCount},-->
+<!--                    </if>-->
                     <if test="guid != null">guid =
                         #{guid},
                     </if>
@@ -344,6 +359,9 @@
                     <if test="name != null">name =
                         #{name},
                     </if>
+                    <if test="shortName != null">short_name =
+                        #{shortName},
+                    </if>
                     <if test="parentId != null">parent_id =
                         #{parentId},
                     </if>
@@ -353,69 +371,69 @@
                     <if test="cityCode != null">city_code =
                         #{cityCode},
                     </if>
-                    <if test="openYear != null">open_year =
-                        #{openYear},
-                    </if>
-                    <if test="fitYear != null">fit_year =
-                        #{fitYear},
-                    </if>
-                    <if test="floorage != null">floorage =
-                        #{floorage},
-                    </if>
-                    <if test="employee != null">employee =
-                        #{employee},
-                    </if>
-                    <if test="isOwnRight != null">is_own_right =
-                        #{isOwnRight},
-                    </if>
-                    <if test="isRent != null">is_rent =
-                        #{isRent},
-                    </if>
-                    <if test="isOnly != null">is_only =
-                        #{isOnly},
-                    </if>
-                    <if test="buildYear != null">build_year =
-                        #{buildYear},
-                    </if>
-                    <if test="placeType != null">place_type =
-                        #{placeType},
-                    </if>
-                    <if test="buildHeight != null">build_height =
-                        #{buildHeight},
-                    </if>
-                    <if test="social != null">social =
-                        #{social},
-                    </if>
-                    <if test="naturalEnvir != null">natural_envir =
-                        #{naturalEnvir},
-                    </if>
+<!--                    <if test="openYear != null">open_year =-->
+<!--                        #{openYear},-->
+<!--                    </if>-->
+<!--                    <if test="fitYear != null">fit_year =-->
+<!--                        #{fitYear},-->
+<!--                    </if>-->
+<!--                    <if test="floorage != null">floorage =-->
+<!--                        #{floorage},-->
+<!--                    </if>-->
+<!--                    <if test="employee != null">employee =-->
+<!--                        #{employee},-->
+<!--                    </if>-->
+<!--                    <if test="isOwnRight != null">is_own_right =-->
+<!--                        #{isOwnRight},-->
+<!--                    </if>-->
+<!--                    <if test="isRent != null">is_rent =-->
+<!--                        #{isRent},-->
+<!--                    </if>-->
+<!--                    <if test="isOnly != null">is_only =-->
+<!--                        #{isOnly},-->
+<!--                    </if>-->
+<!--                    <if test="buildYear != null">build_year =-->
+<!--                        #{buildYear},-->
+<!--                    </if>-->
+<!--                    <if test="placeType != null">place_type =-->
+<!--                        #{placeType},-->
+<!--                    </if>-->
+<!--                    <if test="buildHeight != null">build_height =-->
+<!--                        #{buildHeight},-->
+<!--                    </if>-->
+<!--                    <if test="social != null">social =-->
+<!--                        #{social},-->
+<!--                    </if>-->
+<!--                    <if test="naturalEnvir != null">natural_envir =-->
+<!--                        #{naturalEnvir},-->
+<!--                    </if>-->
                     <if test="type != null">type =
                         #{type},
                     </if>
                     <if test="createTime != null">create_time =
                         #{createTime},
                     </if>
-                    <if test="modifiedName != null">modified_name =
-                        #{modifiedName},
+                    <if test="updateBy != null">update_by =
+                        #{updateBy},
                     </if>
                     <if test="updateTime != null">update_time =
                         #{updateTime},
                     </if>
-                    <if test="modifiedId != null">modified_id =
-                        #{modifiedId},
-                    </if>
+<!--                    <if test="modifiedId != null">modified_id =-->
+<!--                        #{modifiedId},-->
+<!--                    </if>-->
                     <if test="path != null">path =
                         #{path},
                     </if>
-                    <if test="vid != null">vid =
-                        #{vid},
-                    </if>
-                    <if test="level != null">level =
-                        #{level},
-                    </if>
-                    <if test="oid != null">oid =
-                        #{oid},
-                    </if>
+<!--                    <if test="vid != null">vid =-->
+<!--                        #{vid},-->
+<!--                    </if>-->
+<!--                    <if test="level != null">level =-->
+<!--                        #{level},-->
+<!--                    </if>-->
+<!--                    <if test="oid != null">oid =-->
+<!--                        #{oid},-->
+<!--                    </if>-->
                     <if test="parentGuid != null">parent_guid =
                         #{parentGuid},
                     </if>
@@ -425,9 +443,15 @@
                     <if test="sort != null">sort =
                         #{sort},
                     </if>
-                    <if test="location != null">location =
-                        #{location},
+                    <if test="source != null">source =
+                        #{source},
+                    </if>
+                    <if test="remark != null">remark =
+                        #{remark},
                     </if>
+<!--                    <if test="location != null">location =-->
+<!--                        #{location},-->
+<!--                    </if>-->
                     <if test="createBy != null">create_by =
                         #{createBy},
                     </if>