mybatis-plus Included in BaseMapper,Iservice Two interfaces and ServiceImpl class ,BaseMapper in the light of dao Encapsulation method of layer
CRUD,IService Encapsulation for business logic layer , Need to specify Dao Layer class and corresponding entity class , It's in BaseMapper Strengthening on the basis of ,ServiceImpl
Implementation of business logic layer , Understand the relationship between the three can understand how to use ;

  In general, typical use examples ,XxImpl Class inherits from ServiceImpl class , And instantiate BaseMapper Subclass of XxMapper And persistence bean class , Implement custom XxService Interface ( inherit IService Interface ), stay XxImpl Class implementation CRUD The function of adding, deleting, modifying and checking , And rewrite in XxService Methods of interface definition ;
@Slf4j @Service @DS("ads") public class TbAdsZtCgrxxDayImpl extends
ServiceImpl<TbAdsZtCgrxxDayMapper,TbAdsZtCgrxxDay> implements
TbAdsZtCgrxxDayService { @Autowired private GetResponse getResponse; @Override
public List<TbAdsZtCgrxxDay> selectAllList() { return
this.baseMapper.selectAllList(); } @Override public Future<Boolean>
updateBaseInfo(TbAdsZtCgrxxDay cgr) { String ztmc=cgr.getZzmc();" What is the purchaser currently processing |{}",ztmc ); try{ String legalname
=getResponse.getBaseInfo(ztmc).get(0).getData().get(0).getLegalName(); String
cgr.setFrmc(legalname); cgr.setXydm(socialcode); }catch (Exception ex){
log.error(" Legal person or credit code available {}",ex.getMessage()); }finally {" Mission in progress , The number of tasks remaining in the thread pool is |{}",
int result = this.baseMapper.updateBaseInfo(cgr); return
AsyncResult.forValue(result>0); } } }
The relationship is as follows :

ServiceImpl Class holding BaseMapper An example of this interface , And it has been realized Iservice This interface ,
therefore XxImpl class ( Where the main business logic is implemented ) In succession ServiceImpl Class can be specified BaseMapper To instantiate ( That's the example TdAdsZtCgrxxDayMapper), and TbAdsZtCgrxxDayService yes Iservice Sub interface of interface ,XxImpl Class TdAdsZtCgrxxDaySerivice This interface defines several business logic functions ;

©2019-2020 Toolsou All rights reserved,
tkinter Implementation of user login interface Vue Invalid render dynamic component in subcomponent ( First invalid , Valid for the second time )9 ride 9 Sudoku C/C++ Memory model TypeScript actual combat -12-TS The mechanism of type checking - Type inference Java Thread safety and insecurity JLink,STLink,DAPLink,CMSIS DAP Differences in use Chapter 10 use SpringMVC Frame transformation of supermarket order management system -1C Language calculation of deposit interest About the Blue Bridge Cup , Things you should know !