| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.PlatformMapper; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.business.model.Platform; |
| | | import com.doumee.dao.business.model.PlatformGroup; |
| | | import com.doumee.service.business.PlatformService; |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | public void updateById(Platform platform) { |
| | | platformMapper.updateById(platform); |
| | | } |
| | | @Override |
| | | public void updateStatusById(Platform platform) { |
| | | Platform model =platformMapper.selectById(platform.getId()); |
| | | if(model ==null) { |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对不起,人员信息不存在!"); |
| | | } |
| | | LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | if(loginUserInfo == null){ |
| | | loginUserInfo = platform.getLoginUserInfo(); |
| | | } |
| | | Platform update = new Platform(); |
| | | update.setEditDate(new Date()); |
| | | update.setEditor(loginUserInfo.getId()); |
| | | update.setStatus(platform.getStatus()); |
| | | platformMapper.updateById(update); |
| | | } |
| | | |
| | | @Override |
| | | public void updateByIdInBatch(List<Platform> platforms) { |