Commit aa9194e8 authored by luben's avatar luben

Merge branch 'dev-lb' into 'dev'

Dev lb

See merge request !130
parents 3200b113 a38da442
Pipeline #143249 passed with stages
in 6 minutes and 9 seconds
...@@ -895,9 +895,13 @@ public class RegionController extends BaseController { ...@@ -895,9 +895,13 @@ public class RegionController extends BaseController {
if(id==null || id.isEmpty()){ if(id==null || id.isEmpty()){
return AjaxResult.success(); return AjaxResult.success();
} }
String code = gridRegionMapper.getWgCodeById(id);
if(code == null){
return AjaxResult.success("id不存在");
}
GridRegionExample example1 = new GridRegionExample(); GridRegionExample example1 = new GridRegionExample();
GridRegionExample.Criteria criteria1 = example1.createCriteria(); GridRegionExample.Criteria criteria1 = example1.createCriteria();
criteria1.andWgParentIdEqualTo("id"); criteria1.andWgParentIdEqualTo(code);
criteria1.andWgTypeEqualTo(wgType); criteria1.andWgTypeEqualTo(wgType);
return AjaxResult.success(gridRegionMapper.selectByExample(example1)); return AjaxResult.success(gridRegionMapper.selectByExample(example1));
} }
......
...@@ -59,4 +59,6 @@ public interface GridRegionMapper { ...@@ -59,4 +59,6 @@ public interface GridRegionMapper {
int changeTreeNodeName(@Param("id") String id, @Param("name") String name); int changeTreeNodeName(@Param("id") String id, @Param("name") String name);
List<GridRegion> getAllLevelTwoByType(@Param("wgCodeLikes")List<String> wgCodeLikes); List<GridRegion> getAllLevelTwoByType(@Param("wgCodeLikes")List<String> wgCodeLikes);
String getWgCodeById(String id);
} }
\ No newline at end of file
...@@ -698,8 +698,11 @@ ...@@ -698,8 +698,11 @@
</if> </if>
and level = 2 and level = 2
</select> </select>
<select id="getWgCodeById" resultType="java.lang.String">
select wg_code from grid_region where id = #{id}
</select>
<update id="changeTreeNodeName"> <update id="changeTreeNodeName">
update grid_region set wg_name=#{name} where id = #{id} update grid_region set wg_name=#{name} where id = #{id}
</update> </update>
......
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