service配置:
public Channel getById(long id);
public List<Channel> getByParentId(long plateId);</span>
serviceIpml配置:
public List<Channel> getByParentId(long plateId){
List<Channel> oneList = channelMapper.getByParentId(plateId);
return oneList;
}
public Channel getById(long id) {
eturn (Channel)ChannelUtil.getMap().get(""+id);
}
mapper.xml配置:
<select id="getByParentId" parameterType="long" resultMap="ChanelResultMap">
<![CDATA[
SELECT * FROM t_plate WHERE parent_id = #{id} AND STATUS=0 order by seq_no
]]>
</select>
controller配置:
/**
* 首页跳转
* @param model
* @return
*/
@RequestMapping(value="/")
public ModelAndView homePage(ModelMap model){
return new ModelAndView("f/index");