| | |
| | | * @date 2022-02-16 16:22:18 |
| | | */ |
| | | List<ComPbCheckUnitVo> queryAllByList(@Param("dto") PageComPbCheckUnitDto comPbCheckUnit); |
| | | |
| | | Long selectCommunityId(@Param("area") String area,@Param("town")String town,@Param("community")String community); |
| | | } |
| | | |
| | |
| | | @Override |
| | | @Transactional |
| | | public R insert(AddComPbCheckUnitDto comPbCheckUnit) { |
| | | Long communityId=this.baseMapper.selectCommunityId(comPbCheckUnit.getHelpCommunityName().split(",")[0],comPbCheckUnit.getHelpCommunityName().split(",")[1],comPbCheckUnit.getHelpCommunityName().split(",")[2]); |
| | | ComPbCheckUnit entity = new ComPbCheckUnit(); |
| | | BeanUtils.copyProperties(comPbCheckUnit, entity); |
| | | if(communityId!=null){ |
| | | entity.setCommunityId(communityId); |
| | | } |
| | | if (this.baseMapper.insert(entity) > 0) { |
| | | return R.ok(); |
| | | } |
| | |
| | | order by cpcu.create_at desc |
| | | </select> |
| | | |
| | | <select id="selectCommunityId" resultType="Integer"> |
| | | select community_id from com_area_town_community where area=#{area} and town=#{town} and community=#{community} |
| | | </select> |
| | | |
| | | </mapper> |
| | | |