Commit dc1e34e4 authored by luben's avatar luben

fix

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