|  |  |  | 
|---|
|  |  |  | package com.doumee.service.business.impl; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 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.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; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | 
|---|
|  |  |  | 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); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|