
/** * 在此邏輯中需要先做判斷,判斷數據庫中是否已經存在編碼,如果存在,那么對用戶發出提示 * @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; }