| | |
| | | public class LEDProgramService extends BaseServiceImpl<LEDProgramMapper, LEDProgram> { |
| | | |
| | | |
| | | |
| | | public boolean addProgram(LEDProgramParam receiveParam) { |
| | | |
| | | LEDProgram led = new LEDProgram(); |
| | |
| | | } |
| | | |
| | | |
| | | public boolean updateProgram(Long pid,LEDProgramParam receiveParam) { |
| | | public boolean updateProgram(Long pid, LEDProgramParam receiveParam) { |
| | | |
| | | LEDProgram byId = getById(pid); |
| | | if (byId == null) { |
| | |
| | | if (byId == null) { |
| | | throw new BusinessException("未找到该节目"); |
| | | } |
| | | LEDProgramParam param=new LEDProgramParam(); |
| | | LEDProgramParam param = new LEDProgramParam(); |
| | | param.setId(byId.getId()); |
| | | param.setHeight(byId.getHeight()); |
| | | param.setWidth(byId.getWidth()); |
| | |
| | | |
| | | |
| | | public LambdaQueryWrapper<LEDProgram> listProgram() { |
| | | if (SecurityUtils.getClientId() != null) { |
| | | return Wrappers.lambdaQuery(LEDProgram.class).eq(LEDProgram::getUserId, SecurityUtils.getClientId()); |
| | | } else { |
| | | if (SecurityUtils.getClientId() == null) { |
| | | return Wrappers.lambdaQuery(LEDProgram.class); |
| | | } else { |
| | | return Wrappers.lambdaQuery(LEDProgram.class).eq(LEDProgram::getUserId, SecurityUtils.getUserId()) |
| | | .or(w -> { |
| | | w.eq(LEDProgram::getClientId, SecurityUtils.getClientId()); |
| | | }); |
| | | } |
| | | } |
| | | |
| | | } |