From c8f7aff9eedfa87b8a7a6c43d59b4e59d183e584 Mon Sep 17 00:00:00 2001 From: wangxy <1481820854@qq.com> Date: Tue, 24 Sep 2024 10:52:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E8=BD=BD=E4=BD=93=E4=B8=8B=E5=8F=91?= =?UTF-8?q?=E7=99=BB=E8=AE=B0=E6=8E=A5=E5=8F=A3=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../manager/CarrierIssuedManager.java | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/CarrierIssuedManager.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/CarrierIssuedManager.java index 12e4609..8967cc9 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/CarrierIssuedManager.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/CarrierIssuedManager.java @@ -1,9 +1,17 @@ package com.ruoyi.web.controller.manager; +import cn.hutool.core.convert.Convert; +import cn.hutool.core.text.CharSequenceUtil; +import com.ruoyi.common.utils.ShiroUtils; +import com.ruoyi.system.domain.carrier.TdCarrier; +import com.ruoyi.system.domain.carrier.TdCarrierIssued; import com.ruoyi.system.service.carrier.TdCarrierIssuedService; import org.springframework.stereotype.Component; import javax.annotation.Resource; +import java.util.Arrays; +import java.util.Date; +import java.util.List; /** * ClassName: TdCarrierIssuedManager @@ -21,4 +29,30 @@ public class CarrierIssuedManager { @Resource private TdCarrierIssuedService carrierIssuedService; + + public List selectTdCarrierList(TdCarrierIssued tdCarrierIssued) { + return carrierIssuedService.selectTdCarrierList(tdCarrierIssued); + } + + public boolean saveOrUpdate(TdCarrierIssued tdCarrierIssued) { + if (CharSequenceUtil.isNotBlank(tdCarrierIssued.getId())) { + tdCarrierIssued.setUpdateBy(ShiroUtils.getSysUser().getLoginName()); + tdCarrierIssued.setUpdateTime(new Date()); + } else { + tdCarrierIssued.setCreateBy(ShiroUtils.getSysUser().getLoginName()); + tdCarrierIssued.setCreateTime(new Date()); + } + return carrierIssuedService.saveOrUpdate(tdCarrierIssued); + } + + + public TdCarrierIssued selectTdCarrier(String id) { + return carrierIssuedService.getById(id); + } + + public boolean deletedTdCarrierByids(String ids) { + List list = Arrays.asList(Convert.toStrArray(ids)); + return carrierIssuedService.removeByIds(list); + } + }