123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- package com.lqkj.info.service;
- import java.util.List;
- import com.lqkj.info.mapper.AreaInfoMapper;
- import com.lqkj.type.service.AreaTypeService;
- import org.apache.commons.lang.StringEscapeUtils;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.stereotype.Service;
- import com.lqkj.info.entity.AreaInfo;
- /**
- * 区域对象:area_infoService业务层处理
- *
- * @author lqkj
- * @date 2024-11-11
- */
- @Service
- public class AreaInfoService
- {
- @Autowired
- private AreaInfoMapper areaInfoMapper;
- @Autowired
- private AreaTypeService areaTypeService;
- /**
- * 查询区域对象:area_info
- *
- * @param areaId 区域对象:area_info主键
- * @return 区域对象:area_info
- */
-
- public AreaInfo selectAreaInfoByAreaId(Integer areaId)
- {
- return areaInfoMapper.selectAreaInfoByAreaId(areaId);
- }
- /**
- * 查询区域对象:area_info列表
- *
- * @param areaInfo 区域对象:area_info
- * @return 区域对象:area_info
- */
- public List<AreaInfo> selectAreaInfoList(AreaInfo areaInfo)
- {
- List<AreaInfo> areaInfos = areaInfoMapper.selectAreaInfoList(areaInfo);
- areaInfos.stream().forEach(areaInfo1 -> {
- areaInfo1.setTypeName(areaTypeService.selectAreaTypeByTypeId(areaInfo1.getTypeId()).getTypeName());
- });
- return areaInfos;
- }
- /**
- * 新增区域对象:area_info
- *
- * @param areaInfo 区域对象:area_info
- * @return 结果
- */
-
- public int insertAreaInfo(AreaInfo areaInfo)
- {
- // areaInfo.setLocation(StringEscapeUtils.unescapeHtml(areaInfo.getLocation().toString()));
- areaInfo.setMemo(StringEscapeUtils.unescapeHtml(areaInfo.getMemo()));
- return areaInfoMapper.insertAreaInfo(areaInfo);
- }
- /**
- * 修改区域对象:area_info
- *
- * @param areaInfo 区域对象:area_info
- * @return 结果
- */
-
- public int updateAreaInfo(AreaInfo areaInfo)
- {
- // areaInfo.setLocation(StringEscapeUtils.unescapeHtml(areaInfo.getLocation().toString()));
- areaInfo.setMemo(StringEscapeUtils.unescapeHtml(areaInfo.getMemo()));
- return areaInfoMapper.updateAreaInfo(areaInfo);
- }
- /**
- * 批量删除区域对象:area_info
- *
- * @param areaIds 需要删除的区域对象:area_info主键
- * @return 结果
- */
-
- public int deleteAreaInfoByAreaIds(Integer[] areaIds)
- {
- return areaInfoMapper.deleteAreaInfoByAreaIds(areaIds);
- }
- /**
- * 删除区域对象:area_info信息
- *
- * @param areaId 区域对象:area_info主键
- * @return 结果
- */
-
- public int deleteAreaInfoByAreaId(Integer areaId)
- {
- return areaInfoMapper.deleteAreaInfoByAreaId(areaId);
- }
- }
|