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); + } + }