QueryWrapper<>(); 用法样例


/**
     * 在此逻辑中需要先做判断,判断数据库中是否已经存在编码,如果存在,那么对用户发出提示
     * @param fcEstate
     * @return
     */
    public Integer insertEstate(FcEstate fcEstate){
        int result = 0;
        QueryWrapper<FcEstate> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("estate_code", fcEstate.getEstateCode());
        FcEstate fe = fcEstateMapper.selectOne(queryWrapper);
        if (fe == null) {
            result = fcEstateMapper.insert(fcEstate);
        }
        return result;
    }
View Code

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM