Commit a38da442 authored by luben's avatar luben

fix

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