| | |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.system.mapper.SystemConfigMapper; |
| | | import com.ruoyi.system.domain.SystemConfig; |
| | | import com.ruoyi.system.pojo.dto.AddSystemConfigDTO; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.math.BigDecimal; |
| | | |
| | | @Service |
| | | public class SystemConfigServiceImpl extends ServiceImpl<SystemConfigMapper, SystemConfig> implements SystemConfigService { |
| | |
| | | //根据类型删除 |
| | | systemConfigMapper.delete(new LambdaQueryWrapper<SystemConfig>().eq(SystemConfig::getType, dto.getType())); |
| | | if (dto.getType()==3){ |
| | | if (dto.getPlatform().add(dto.getUser()).compareTo(BigDecimal.valueOf(100)) > 0){ |
| | | throw new ServiceException("平台提成+绑定用户提成不能超过100"); |
| | | } |
| | | //抽单设置 |
| | | DrawSheet drawSheet = new DrawSheet(); |
| | | drawSheet.setPlatform(dto.getPlatform()); |