| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.service.business.third.model.LoginUserInfo; |
| | | import com.doumee.service.business.third.model.PageData; |
| | | import com.doumee.service.business.third.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.PlatformShowParamMapper; |
| | | import com.doumee.dao.business.model.PlatformShowParam; |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 月台_显示配置信息表Service实现 |
| | | * @author 江蹄蹄 |
| | | * @since 2024/04/28 16:06 |
| | | * @date 2024/06/28 10:03 |
| | | */ |
| | | @Service |
| | | public class PlatformShowParamServiceImpl implements PlatformShowParamService { |
| | |
| | | QueryWrapper<PlatformShowParam> wrapper = new QueryWrapper<>(platformShowParam); |
| | | return platformShowParamMapper.selectCount(wrapper); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {BusinessException.class,Exception.class}) |
| | | public void updUserConfig(List<Integer> showIdList, LoginUserInfo loginUserInfo){ |
| | | platformShowParamMapper.delete(new QueryWrapper<PlatformShowParam>() |
| | | .lambda().eq(PlatformShowParam::getMemberId,loginUserInfo.getMemberId()) |
| | | ); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(showIdList)){ |
| | | List<PlatformShowParam> platformShowParamList = new ArrayList<>(); |
| | | for (Integer id:showIdList) { |
| | | PlatformShowParam platformShowParam = new PlatformShowParam(); |
| | | platformShowParam.setCreateDate(new Date()); |
| | | platformShowParam.setMemberId(loginUserInfo.getMemberId()); |
| | | platformShowParam.setIsdeleted(Constants.ZERO); |
| | | platformShowParam.setPlatformId(id); |
| | | platformShowParamList.add(platformShowParam); |
| | | } |
| | | platformShowParamMapper.insert(platformShowParamList); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |