Commit d7293d49 authored by luben's avatar luben

Merge branch 'dev-lb' into 'dev'

fix

See merge request !206
parents 4126242c dc1e34e4
Pipeline #144640 failed with stages
in 29 minutes and 48 seconds
...@@ -872,10 +872,10 @@ public class RegionController extends BaseController { ...@@ -872,10 +872,10 @@ public class RegionController extends BaseController {
GridRegionExample.Criteria criteria1 = example1.createCriteria(); GridRegionExample.Criteria criteria1 = example1.createCriteria();
criteria1.andIsValidEqualTo("1"); criteria1.andIsValidEqualTo("1");
criteria1.andWgParentIdEqualTo(wgCode); criteria1.andWgParentIdEqualTo(wgCode);
long count = gridRegionMapper.countByExample(example1); // long count = gridRegionMapper.countByExample(example1);
if(count>0){ // if(count>0){
throw new RuntimeException("当前菜单存在下级菜单,无法删除"); // throw new RuntimeException("当前菜单存在下级菜单,无法删除");
} // }
if(gridRegionMapper.countByFourthCode(wgCode)>0){ if(gridRegionMapper.countByFourthCode(wgCode)>0){
throw new RuntimeException("当前菜单存在房源,无法删除"); throw new RuntimeException("当前菜单存在房源,无法删除");
} }
...@@ -886,7 +886,10 @@ public class RegionController extends BaseController { ...@@ -886,7 +886,10 @@ public class RegionController extends BaseController {
criteria.andIsValidEqualTo("1"); criteria.andIsValidEqualTo("1");
criteria.andIdEqualTo(id); criteria.andIdEqualTo(id);
return AjaxResult.success(gridRegionMapper.deleteByExample(example)); gridRegionMapper.deleteByExample(example);
gridRegionMapper.deleteByExample(example1);
return AjaxResult.success();
} }
@RequestMapping(value = "/changeName",method = RequestMethod.GET) @RequestMapping(value = "/changeName",method = RequestMethod.GET)
......
...@@ -781,7 +781,7 @@ ...@@ -781,7 +781,7 @@
<select id="countByFourthCode" resultType="Integer"> <select id="countByFourthCode" resultType="Integer">
select count(*) from house_resource select count(*) from house_resource
where four = #{code} where four = #{code} or three = #{code}
</select> </select>
</mapper> </mapper>
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