Browse Source

Merge remote-tracking branch 'origin/master'

zhongwei
yang_shj 1 year ago
parent
commit
50a4dae58d
  1. 8
      hzims-service/message/src/main/java/com/hnac/hzims/message/push/feign/PushMsgClient.java
  2. 55
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationServiceImpl.java

8
hzims-service/message/src/main/java/com/hnac/hzims/message/push/feign/PushMsgClient.java

@ -28,8 +28,8 @@ import org.springframework.web.bind.annotation.RestController;
public class PushMsgClient implements IPushMsgClient { public class PushMsgClient implements IPushMsgClient {
@Override @Override
@PostMapping("/sendMail") @PostMapping("/sendSms")
@ApiOperation("发送邮件") @ApiOperation("发送短信")
@ApiOperationSupport(order=1) @ApiOperationSupport(order=1)
public R<String> sendSms(SmsPushDto smsPushDto) { public R<String> sendSms(SmsPushDto smsPushDto) {
IPushService pushService = SpringUtil.getBean("smsPushService"); IPushService pushService = SpringUtil.getBean("smsPushService");
@ -37,8 +37,8 @@ public class PushMsgClient implements IPushMsgClient {
} }
@Override @Override
@PostMapping("/sendSms") @PostMapping("/sendMail")
@ApiOperation("发送短信") @ApiOperation("发送邮件")
@ApiOperationSupport(order=2) @ApiOperationSupport(order=2)
public R<String> sendMail(MailPushDto mailPushDto) { public R<String> sendMail(MailPushDto mailPushDto) {
IPushService pushService = SpringUtil.getBean("mailPushService"); IPushService pushService = SpringUtil.getBean("mailPushService");

55
hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationServiceImpl.java

@ -91,7 +91,8 @@ public class StationServiceImpl extends BaseServiceImpl<StationMapper, StationEn
}); });
Optional<Integer> sort = Optional.ofNullable(this.getStationMaxOrder()); Optional<Integer> sort = Optional.ofNullable(this.getStationMaxOrder());
req.setSort(sort.isPresent() ? sort.get() + 1 : 1); req.setSort(sort.isPresent() ? sort.get() + 1 : 1);
Assert.isTrue(this.saveOrUpdate(req), () -> { boolean updateResult = this.saveOrUpdate(req);
Assert.isTrue(updateResult, () -> {
throw new ServiceException("创建/修改站点信息失败!"); throw new ServiceException("创建/修改站点信息失败!");
}); });
this.pushStation(req); this.pushStation(req);
@ -229,32 +230,32 @@ public class StationServiceImpl extends BaseServiceImpl<StationMapper, StationEn
return userList; return userList;
} }
@Override // @Override
public boolean updateById(StationEntity req) { // public boolean updateById(StationEntity req) {
return super.update(Wrappers.<StationEntity>lambdaUpdate() // return super.update(Wrappers.<StationEntity>lambdaUpdate()
.set(StationEntity::getCode, req.getCode()) // .set(StationEntity::getCode, req.getCode())
.set(StationEntity::getName, req.getName()) // .set(StationEntity::getName, req.getName())
.set(StationEntity::getType, req.getType()) // .set(StationEntity::getType, req.getType())
.set(StationEntity::getCommissionTime, req.getCommissionTime()) // .set(StationEntity::getCommissionTime, req.getCommissionTime())
.set(StationEntity::getEnableControl, req.getEnableControl()) // .set(StationEntity::getEnableControl, req.getEnableControl())
.set(StationEntity::getLgtd, req.getLgtd()) // .set(StationEntity::getLgtd, req.getLgtd())
.set(StationEntity::getLttd, req.getLttd()) // .set(StationEntity::getLttd, req.getLttd())
.set(StationEntity::getRefDept, req.getRefDept()) // .set(StationEntity::getRefDept, req.getRefDept())
.set(StationEntity::getAreaCode, req.getAreaCode()) // .set(StationEntity::getAreaCode, req.getAreaCode())
.set(StationEntity::getRefDomain, req.getRefDomain()) // .set(StationEntity::getRefDomain, req.getRefDomain())
.set(StationEntity::getRefBasin, req.getRefBasin()) // .set(StationEntity::getRefBasin, req.getRefBasin())
.set(StationEntity::getRefArea, req.getRefArea()) // .set(StationEntity::getRefArea, req.getRefArea())
.set(StationEntity::getRemark, req.getRemark()) // .set(StationEntity::getRemark, req.getRemark())
.set(StationEntity::getPic, req.getPic()) // .set(StationEntity::getPic, req.getPic())
.set(StationEntity::getContact, req.getContact()) // .set(StationEntity::getContact, req.getContact())
.set(StationEntity::getContactor, req.getContactor()) // .set(StationEntity::getContactor, req.getContactor())
.set(StationEntity::getAddress, req.getAddress()) // .set(StationEntity::getAddress, req.getAddress())
.set(StationEntity::getCompany, req.getCompany()) // .set(StationEntity::getCompany, req.getCompany())
.set(StationEntity::getCreateDept, req.getCreateDept()) // .set(StationEntity::getCreateDept, req.getCreateDept())
.set(StationEntity::getServeType, req.getServeType()) // .set(StationEntity::getServeType, req.getServeType())
.set(StationEntity::getLimitWaterLevel, req.getLimitWaterLevel()) // .set(StationEntity::getLimitWaterLevel, req.getLimitWaterLevel())
.eq(StationEntity::getId, req.getId())); // .eq(StationEntity::getId, req.getId()));
} // }
@Override @Override

Loading…
Cancel
Save