feat:修改专题活动service

new-v20240713
wangxy 1 week ago
parent ddc0dda586
commit d7fa1e0a01

@ -2,6 +2,7 @@ package com.ruoyi.web.controller.home;
import cn.hutool.core.convert.Convert; import cn.hutool.core.convert.Convert;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.R; import com.ruoyi.common.core.domain.R;
@ -109,7 +110,7 @@ public class ColumnTreeController extends BaseController {
} }
columnQueryWrapper.orderByAsc(SysColumn::getOrderNum); columnQueryWrapper.orderByAsc(SysColumn::getOrderNum);
List<SysColumn> columns = columnService.list(columnQueryWrapper); List<SysColumn> columns = columnService.list(columnQueryWrapper);
if (columns.isEmpty() && StringUtils.isEmpty(columnId)) { if (columns.isEmpty() && Objects.isNull(columnId)) {
columnQueryWrapper.clear(); columnQueryWrapper.clear();
columnQueryWrapper.eq(SysColumn::getColumnId, id) columnQueryWrapper.eq(SysColumn::getColumnId, id)
.eq(SysColumn::getStatus, STATUS) .eq(SysColumn::getStatus, STATUS)
@ -120,10 +121,9 @@ public class ColumnTreeController extends BaseController {
SysSpecialVo sysSpecialVo = new SysSpecialVo(); SysSpecialVo sysSpecialVo = new SysSpecialVo();
sysSpecialVo.setColumnId(column.getColumnId()); sysSpecialVo.setColumnId(column.getColumnId());
sysSpecialVo.setColumnName(column.getColumnName()); sysSpecialVo.setColumnName(column.getColumnName());
SysSpecial sysSpecial = new SysSpecial(); List<SysSpecial> specialList = specialService.lambdaQuery()
sysSpecial.setStatus(STATUS); .eq(SysSpecial::getColumnId, column.getColumnId())
sysSpecial.setColumnId(column.getColumnId()); .eq(SysSpecial::getStatus, STATUS).list();
List<SysSpecial> specialList = specialService.selectSysSpecialList(sysSpecial);
sysSpecialVo.setSysSpecials(specialList); sysSpecialVo.setSysSpecials(specialList);
sysSpecialVos.add(sysSpecialVo); sysSpecialVos.add(sysSpecialVo);
}); });

@ -1,5 +1,6 @@
package com.ruoyi.system.mapper; package com.ruoyi.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.system.domain.SysSpecial; import com.ruoyi.system.domain.SysSpecial;
import java.util.List; import java.util.List;
@ -7,7 +8,7 @@ import java.util.List;
/** /**
* @author wangxy * @author wangxy
*/ */
public interface SysSpecialMapper { public interface SysSpecialMapper extends BaseMapper<SysSpecial> {
/** /**

@ -1,5 +1,6 @@
package com.ruoyi.system.service; package com.ruoyi.system.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.system.domain.SysSpecial; import com.ruoyi.system.domain.SysSpecial;
import java.util.List; import java.util.List;
@ -7,7 +8,7 @@ import java.util.List;
/** /**
* @author wangxy * @author wangxy
*/ */
public interface ISysSpecialService { public interface ISysSpecialService extends IService<SysSpecial> {
/** /**

@ -1,5 +1,6 @@
package com.ruoyi.system.service.impl; package com.ruoyi.system.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.core.text.Convert; import com.ruoyi.common.core.text.Convert;
import com.ruoyi.system.domain.SysSpecial; import com.ruoyi.system.domain.SysSpecial;
import com.ruoyi.system.mapper.SysSpecialMapper; import com.ruoyi.system.mapper.SysSpecialMapper;
@ -15,7 +16,7 @@ import java.util.List;
*/ */
@Service @Service
@Transactional @Transactional
public class SysSpecialServiceImpl implements ISysSpecialService { public class SysSpecialServiceImpl extends ServiceImpl<SysSpecialMapper, SysSpecial> implements ISysSpecialService {
@Autowired @Autowired
private SysSpecialMapper specialMapper; private SysSpecialMapper specialMapper;

Loading…
Cancel
Save