From 76b5e34bccb723c3d414b3d981ed8b00b79411d8 Mon Sep 17 00:00:00 2001 From: 邱宇豪 <qyh123230312> Date: 星期三, 27 九月 2023 17:28:11 +0800 Subject: [PATCH] 调整区域包保 --- hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/regionHazardInform/service/impl/TRegionHazardInformServiceImpl.java | 24 +++++++++++++----------- 1 files changed, 13 insertions(+), 11 deletions(-) diff --git a/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/regionHazardInform/service/impl/TRegionHazardInformServiceImpl.java b/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/regionHazardInform/service/impl/TRegionHazardInformServiceImpl.java index 157bf98..075b4b1 100644 --- a/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/regionHazardInform/service/impl/TRegionHazardInformServiceImpl.java +++ b/hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/regionHazardInform/service/impl/TRegionHazardInformServiceImpl.java @@ -4,15 +4,16 @@ import com.github.pagehelper.PageInfo; import com.thhy.general.common.BasicResult; import com.thhy.general.config.SysUserInfo; +import com.thhy.general.utils.UUIDUtils; import com.thhy.general.utils.UserInfoUtils; import com.thhy.secure.modules.biz.regionHazardInform.dto.TRegionHazardInformDto; +import com.thhy.secure.modules.biz.regionHazardInform.entity.RegionHazardInformEntity; import com.thhy.secure.modules.biz.regionHazardInform.entity.TRegionHazardInformEntity; -import com.thhy.secure.modules.biz.regionHazardInform.mapper.TRegionHazardInformMapper; +import com.thhy.secure.modules.biz.regionHazardInform.mapper.RegionHazardInformMapper; import com.thhy.secure.modules.biz.regionHazardInform.service.TRegionHazardInformService; -import org.checkerframework.checker.units.qual.A; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import javax.annotation.Resource; import java.util.List; /** @@ -23,36 +24,37 @@ @Service public class TRegionHazardInformServiceImpl implements TRegionHazardInformService { - @Autowired - private TRegionHazardInformMapper tRegionHazardInformMapper; + @Resource + private RegionHazardInformMapper tRegionHazardInformMapper; @Override public BasicResult findAll(TRegionHazardInformDto tRegionHazardInformDto) { SysUserInfo userInfo = UserInfoUtils.getInstance().getUserInfo(); tRegionHazardInformDto.setCompanyId(userInfo.getCompanyId()); PageHelper.startPage(tRegionHazardInformDto.getPageNum(), tRegionHazardInformDto.getPageSize()); - List<TRegionHazardInformEntity> all = this.tRegionHazardInformMapper.findAll(tRegionHazardInformDto); - PageInfo<TRegionHazardInformEntity> pageInfo = new PageInfo<>(all); + List<RegionHazardInformEntity> all = this.tRegionHazardInformMapper.findAllRegionHazardInform(tRegionHazardInformDto); + PageInfo<RegionHazardInformEntity> pageInfo = new PageInfo<>(all); return BasicResult.success(pageInfo); } @Override public BasicResult findEntity(String id) { - TRegionHazardInformEntity entity = this.tRegionHazardInformMapper.findEntity(id); + RegionHazardInformEntity entity = this.tRegionHazardInformMapper.findEntity(id); return BasicResult.success(entity); } @Override - public BasicResult insert(TRegionHazardInformEntity tRegionHazardInformEntity) { + public BasicResult insert(RegionHazardInformEntity tRegionHazardInformEntity) { SysUserInfo userInfo = UserInfoUtils.getInstance().getUserInfo(); tRegionHazardInformEntity.setCompanyId(userInfo.getCompanyId()); tRegionHazardInformEntity.setCreateUser(userInfo.getRealName()); - this.tRegionHazardInformMapper.insert(tRegionHazardInformEntity); + tRegionHazardInformEntity.setId(UUIDUtils.create()); + tRegionHazardInformMapper.insertTRegionHazardInform(tRegionHazardInformEntity); return BasicResult.success(); } @Override - public BasicResult update(TRegionHazardInformEntity tRegionHazardInformEntity) { + public BasicResult update(RegionHazardInformEntity tRegionHazardInformEntity) { this.tRegionHazardInformMapper.update(tRegionHazardInformEntity); return BasicResult.success(); } -- Gitblit v1.9.3