Commit fd5b203a authored by 廖旭伟's avatar 廖旭伟

达梦数据库配置

parent 68a0603f
package com.mortals.xhx.module.area.service.impl; package com.mortals.xhx.module.area.service.impl;
import com.mortals.framework.common.Rest; import com.mortals.framework.common.Rest;
import com.mortals.framework.service.impl.AbstractCRUDCacheServiceImpl;
import com.mortals.xhx.module.area.model.AreaEntity;
import com.mortals.xhx.module.area.model.AreaQuery;
import com.mortals.xhx.module.area.model.AreaTreeSelect;
import com.mortals.xhx.module.base.service.BaseAreaService;
import com.mortals.xhx.module.site.service.SiteService;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.framework.service.impl.AbstractCRUDCacheServiceImpl;
import com.mortals.xhx.common.code.SatusEnum; import com.mortals.xhx.common.code.SatusEnum;
import com.mortals.xhx.module.area.dao.AreaDao; import com.mortals.xhx.module.area.dao.AreaDao;
import com.mortals.xhx.module.area.model.AreaEntity;
import com.mortals.xhx.module.area.model.AreaQuery;
import com.mortals.xhx.module.area.model.AreaTreeSelect;
import com.mortals.xhx.module.area.service.AreaService; import com.mortals.xhx.module.area.service.AreaService;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import java.util.*; import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
...@@ -195,12 +194,12 @@ public class AreaServiceImpl extends AbstractCRUDCacheServiceImpl<AreaDao, AreaE ...@@ -195,12 +194,12 @@ public class AreaServiceImpl extends AbstractCRUDCacheServiceImpl<AreaDao, AreaE
@Override @Override
public List<AreaTreeSelect> getListByParentId(String parentId, Context context) { public List<AreaTreeSelect> getListByParentId(String parentId, Context context) {
if (ObjectUtils.isEmpty(parentId)) { if (ObjectUtils.isEmpty(parentId)) {
parentId = "0"; parentId = "%0%";
} }
//只做一层 //只做一层
List<AreaTreeSelect> collect = this.find(new AreaQuery().pid(parentId), context).stream().map(item -> new AreaTreeSelect(item) List<AreaTreeSelect> collect = this.find(new AreaQuery().pid(parentId), context).stream().map(item -> new AreaTreeSelect(item)
).collect(Collectors.toList()); ).collect(Collectors.toList());
if ("0".equals(parentId)) { if ("%0%".equals(parentId)) {
return collect; return collect;
} }
// AreaEntity areaEntity = this.selectOne(new AreaQuery().iid(parentId)); // AreaEntity areaEntity = this.selectOne(new AreaQuery().iid(parentId));
......
...@@ -22,9 +22,9 @@ ...@@ -22,9 +22,9 @@
<property name="showSql" value="false" /> <property name="showSql" value="false" />
</plugin> </plugin>
<!-- <plugin interceptor="com.mortals.framework.thirty.dm.DmTransInterceptor"> <plugin interceptor="com.mortals.framework.thirty.dm.DmTransInterceptor">
</plugin>--> </plugin>
</plugins> </plugins>
</configuration> </configuration>
\ No newline at end of file
...@@ -18,5 +18,8 @@ ...@@ -18,5 +18,8 @@
<property name="enableExecutorTime" value="true" /> <property name="enableExecutorTime" value="true" />
<property name="showSql" value="false" /> <property name="showSql" value="false" />
</plugin> </plugin>
<plugin interceptor="com.mortals.framework.thirty.dm.DmTransInterceptor">
</plugin>
</plugins> </plugins>
</configuration> </configuration>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment