mybatisPlus

1.所有业务层接口继承 IService<T>,T表示实体类

public interface IAgentServiceRuleService extends IService<AgentServiceRule> {}

2.所有业务层接口实现类 继承 ServiceImpl<TMapper,T>类,并实现自己的业务层接口

@Service
public class AgentServiceRuleServiceImpl extends ServiceImpl<AgentServiceRuleMapper, AgentServiceRule> implements IAgentServiceRuleService {}//AgentServiceRuleMapper是该实体类的dao接口

3.所有的dao接口继承BaseMapper<T>

public interface AgentServiceRuleMapper extends BaseMapper<AgentServiceRule> {}

4.自定义SQL语句和mybatis相同

5.

posted @ 2020-04-24 10:58  王兴龙123  阅读(155)  评论(0编辑  收藏  举报