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 implements PageParmService { @Override public String selectValue(String page, String paramCode) { String value = baseDao.selectOne( new QueryWrapper() .eq("page",page) .eq("param_code",paramCode) )==null?"":baseDao.selectOne( new QueryWrapper() .eq("page",page) .eq("param_code",paramCode) ).getParamValue(); return value; } @Override public List selectPageParamByPage(String page) { QueryWrapper queryWrapper = new QueryWrapper() .eq("page", page) .orderByAsc("id"); return ConvertUtils.sourceToTarget(baseDao.selectList(queryWrapper), PageParamDTO.class); } }