package com.iailab.module.param.service.impl;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.iailab.framework.common.service.impl.BaseServiceImpl;
|
import com.iailab.framework.common.util.object.ConvertUtils;
|
import com.iailab.module.param.dao.PageParamDao;
|
import com.iailab.module.param.dto.PageParamDTO;
|
import com.iailab.module.param.entity.PageParamEntity;
|
import com.iailab.module.param.service.PageParmService;
|
import org.springframework.stereotype.Service;
|
|
import java.util.List;
|
|
/**
|
* @author Jay
|
*/
|
@Service
|
public class PageParamServiceImpl extends BaseServiceImpl<PageParamDao, PageParamEntity> implements PageParmService {
|
@Override
|
public String selectValue(String page, String paramCode) {
|
|
String value = baseDao.selectOne(
|
new QueryWrapper<PageParamEntity>()
|
.eq("page",page)
|
.eq("param_code",paramCode)
|
)==null?"":baseDao.selectOne(
|
new QueryWrapper<PageParamEntity>()
|
.eq("page",page)
|
.eq("param_code",paramCode)
|
).getParamValue();
|
|
return value;
|
}
|
|
@Override
|
public List<PageParamDTO> selectPageParamByPage(String page) {
|
QueryWrapper<PageParamEntity> queryWrapper = new QueryWrapper<PageParamEntity>()
|
.eq("page", page)
|
.orderByAsc("id");
|
return ConvertUtils.sourceToTarget(baseDao.selectList(queryWrapper), PageParamDTO.class);
|
}
|
}
|