提交 b18d41be authored 作者: chaoyanjun's avatar chaoyanjun

--no commit message

上级 175bf3da
......@@ -14,6 +14,7 @@ import com.zrqx.core.util.page.PageParam;
import com.zrqx.core.util.response.CallBack;
import com.zrqx.sysuser.commons.form.bg.FooterVo;
import com.zrqx.sysuser.commons.model.footer.Footer;
import com.zrqx.sysuser.commons.model.footer.FooterColumn;
import com.zrqx.sysuser.fg.service.footer.FgFooterService;
import io.swagger.annotations.Api;
......@@ -36,15 +37,15 @@ public class FgFooterController {
}
return CallBack.success(footerService.queryAll(pageParam));
}
@ApiOperation(value = "查询页脚" , notes = "按条件分页查询页脚")
@ApiOperation(value = "查询栏目" , notes = "查询所有栏目内容")
@GetMapping(value = "/list")
public CallBack<List<FooterVo>> getList(){
public CallBack<List<FooterColumn>> getList(){
return CallBack.success(footerService.getList());
}
@ApiOperation(value = "查询页脚" , notes = "根据页脚ID查询一个页脚")
@ApiOperation(value = "查询页脚内容" , notes = "根据栏目ID查询一个内容")
@GetMapping(value = "/{oid}")
public CallBack<FooterVo> get(@ApiParam(value = "页脚ID", required = true) @PathVariable Integer oid){
public CallBack<List<FooterVo>> get(@ApiParam(value = "页脚ID", required = true) @PathVariable Integer oid){
return CallBack.success(footerService.selectById(oid));
}
}
......@@ -9,6 +9,7 @@ import org.apache.ibatis.annotations.Select;
import com.zrqx.core.mapper.BaseMapper;
import com.zrqx.sysuser.commons.form.bg.FooterVo;
import com.zrqx.sysuser.commons.model.footer.Footer;
import com.zrqx.sysuser.commons.model.footer.FooterColumn;
/**
* 前台-页脚
* @author ycw
......@@ -23,15 +24,14 @@ public interface FgFooterMapper extends BaseMapper<Footer>{
+ " sys_footer f left join sys_footer_column c "
+ " on f.columnId = c.id "
+ " where 1=1 "
+ " eq(f.id,id)"
+ " eq(c.id,id)"
+ "</script>")
FooterVo selectById(@Param("id") Integer oid);
List<FooterVo> selectById(@Param("id") Integer oid);
@Select("<script>"
+ " select f.*,c.name columnName from "
+ " sys_footer f left join sys_footer_column c "
+ " on f.columnId = c.id "
+ " select c.* from "
+ " sys_footer_column c "
+ "</script>")
List<FooterVo> getList();
List<FooterColumn> getList();
}
\ No newline at end of file
......@@ -5,11 +5,12 @@ import java.util.List;
import com.zrqx.core.service.BaseService;
import com.zrqx.sysuser.commons.form.bg.FooterVo;
import com.zrqx.sysuser.commons.model.footer.Footer;
import com.zrqx.sysuser.commons.model.footer.FooterColumn;
public interface FgFooterService extends BaseService<Footer, Integer> {
FooterVo selectById(Integer oid);
List<FooterVo> selectById(Integer oid);
List<FooterVo> getList();
List<FooterColumn> getList();
}
......@@ -9,6 +9,7 @@ import com.zrqx.core.mapper.BaseMapper;
import com.zrqx.core.service.BaseServiceImpl;
import com.zrqx.sysuser.commons.form.bg.FooterVo;
import com.zrqx.sysuser.commons.model.footer.Footer;
import com.zrqx.sysuser.commons.model.footer.FooterColumn;
import com.zrqx.sysuser.fg.mapper.footer.FgFooterMapper;
/**
* 前台-页脚
......@@ -27,12 +28,12 @@ public class FgFooterServiceImpl extends BaseServiceImpl<Footer, Integer> implem
}
@Override
public FooterVo selectById(Integer oid) {
public List<FooterVo> selectById(Integer oid) {
return mapper.selectById(oid);
}
@Override
public List<FooterVo> getList() {
public List<FooterColumn> getList() {
return mapper.getList();
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论