123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- package com.ruoyi.system.service.impl;
- import com.ruoyi.common.utils.DateUtils;
- import com.ruoyi.common.utils.SecurityUtils;
- import com.ruoyi.system.domain.bonus.ZxBonus;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.stereotype.Service;
- import com.ruoyi.system.mapper.ZxBonusMapper;
- import com.ruoyi.system.service.IZxBonusService;
- import java.util.List;
- /**
- * 政协履职加分Service业务层处理
- *
- * @author boman
- * @date 2024-03-11
- */
- @Service
- public class ZxBonusServiceImpl implements IZxBonusService
- {
- @Autowired
- private ZxBonusMapper zxBonusMapper;
- /**
- * 查询政协履职加分
- *
- * @param bonusId 政协履职加分主键
- * @return 政协履职加分
- */
- @Override
- public ZxBonus selectZxBonusByBonusId(Long bonusId)
- {
- return zxBonusMapper.selectZxBonusByBonusId(bonusId);
- }
- /**
- * 查询政协履职加分列表
- *
- * @param zxBonus 政协履职加分
- * @return 政协履职加分
- */
- @Override
- public List<ZxBonus> selectZxBonusList(ZxBonus zxBonus)
- {
- return zxBonusMapper.selectZxBonusList(zxBonus);
- }
- /**
- * 新增政协履职加分
- *
- * @param zxBonus 政协履职加分
- * @return 结果
- */
- @Override
- public int insertZxBonus(ZxBonus zxBonus)
- {
- //只能给自己账号加分
- zxBonus.setUserId(SecurityUtils.getUserId());
- zxBonus.setCreateTime(DateUtils.getNowDate());
- return zxBonusMapper.insertZxBonus(zxBonus);
- }
- /**
- * 修改政协履职加分
- *
- * @param zxBonus 政协履职加分
- * @return 结果
- */
- @Override
- public int updateZxBonus(ZxBonus zxBonus)
- {
- zxBonus.setUpdateTime(DateUtils.getNowDate());
- return zxBonusMapper.updateZxBonus(zxBonus);
- }
- /**
- * 批量删除政协履职加分
- *
- * @param bonusIds 需要删除的政协履职加分主键
- * @return 结果
- */
- @Override
- public int deleteZxBonusByBonusIds(Long[] bonusIds)
- {
- return zxBonusMapper.deleteZxBonusByBonusIds(bonusIds);
- }
- /**
- * 删除政协履职加分信息
- *
- * @param bonusId 政协履职加分主键
- * @return 结果
- */
- @Override
- public int deleteZxBonusByBonusId(Long bonusId)
- {
- return zxBonusMapper.deleteZxBonusByBonusId(bonusId);
- }
- }
|