电商ego-cms系统源码:内容分类与管理.pdfVIP

  • 0
  • 0
  • 约2.17万字
  • 约 42页
  • 2026-02-04 发布于北京
  • 举报

电商ego-cms系统源码:内容分类与管理.pdf

[今日课程大纲]

容类查询

内分

内容分类新增

内容分类重命

名内容分类删

除内容查询内

容新增内容删

除内容修改

[知识点详解]

一.内容分类查询

1.在ego‑service新建TbContentCategoryDubboService及实现类

publicinterfaceTbContentCategoryDubboService{

/**

*根据父id查询所有子类目

*@paramid

*@return

*/

ListTbContentCategoryselByPid(longid);

}

[今日课程大纲]

内容分类查询

内容分类新增

内容分类重命名

内容分类删除

内容查询

内容新增

内容删除

内容修改

[知识点详解]

一.内容分类查询

1.在ego-service新建TbContentCategoryDubboService及实现类

publicinterfaceTbContentCategoryDubboService{

/**

*根据父id查询所有子类目

*@paramid

*@return

*/

ListTbContentCategoryselByPid(longid);

}

publicclassTbContentCategoryDubboServiceImpl实现

TbContentCategoryDubboService{@Resource私有

T

b

C

o

n

tentCategoryMappertbContentCategoryMapper;@Override公

共列表TbContentCategoryselByPid(长整型id){

TbContentCategoryExample示例=新

TbContentCategoryExample();示例.创建条件().和父ID等于

(id).和状态等于(1);返回tbContentCategoryMapper.根据示例选

择(示例);}}

2.在ego‑service‑impl的applicationContext‑dubbo.xml中接口

!--内容分类--dubbo:service接口=

com.ego.dubbo.service.TbContentCategoryDubboService

publicclassTbContentCategoryDubboServiceImpl

implementsTbContentCategoryDubboService

{@Resource

privateTbContentCategoryMapper

tbContentCategoryMapper;

@Override

publicListTbContentCategoryselByPid(longid)

{TbContentCategoryExampleexample=new

TbContentCategoryExample();

example.createCriteria().andParentIdEqualTo(id).and

StatusEqualTo(1);

return

tbContentCategoryMapper.selectByExample(example);

}

}

2.在ego-service-impl的applicationContext-dubbo.xml中接口

!--内容分类--

dubbo:service

interface=com.ego.dubbo.service.TbContentCategoryDub

boService

ref=tbContentCategoryDubboServiceImpl/dubbo:服务

beaid=tbContentCategoryDubboServiceImpl

class=

c

o

m.

e

g

o.

o.

dubbo.service.impl.ontentCategorrryyDubboServiceImpl

dubbo.service.impl.ontentCa

文档评论(0)

1亿VIP精品文档

相关文档