Commit bfc745ab authored by luben's avatar luben

fix

parent 783bebff
...@@ -906,4 +906,12 @@ public class RegionController extends BaseController { ...@@ -906,4 +906,12 @@ public class RegionController extends BaseController {
return AjaxResult.success(gridRegionMapper.selectByExample(example1)); return AjaxResult.success(gridRegionMapper.selectByExample(example1));
} }
@RequestMapping(value = "/changeNameByCode",method = RequestMethod.GET)
@ResponseBody
public AjaxResult changeNameByCode(@RequestParam(value = "id", required = false) String id,
@RequestParam(value = "name", required = false) String name
){
return AjaxResult.success(gridRegionMapper.changeTreeNodeNameByCode(id,name));
}
} }
...@@ -63,4 +63,6 @@ public interface GridRegionMapper { ...@@ -63,4 +63,6 @@ public interface GridRegionMapper {
String getWgCodeById(String id); String getWgCodeById(String id);
List<GridRegion> selectAllByIdAndWgType(@Param("wgType")String wgType, @Param("wgCode")String wgCode); List<GridRegion> selectAllByIdAndWgType(@Param("wgType")String wgType, @Param("wgCode")String wgCode);
int changeTreeNodeNameByCode(@Param("code") String code, @Param("name") String name);
} }
\ No newline at end of file
...@@ -712,5 +712,8 @@ ...@@ -712,5 +712,8 @@
<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>
<update id="changeTreeNodeNameByCode">
update grid_region set wg_name=#{name} where wg_code = #{code}
</update>
</mapper> </mapper>
\ 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