1
This commit is contained in:
parent
555d9a0db6
commit
bd6ed30f61
@ -4,6 +4,8 @@ import java.util.ArrayList;
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
@ -109,4 +111,18 @@ public class BaseConfigController extends BaseController
|
|||||||
List<String> list = new ArrayList<>(Arrays.asList(ids));
|
List<String> list = new ArrayList<>(Arrays.asList(ids));
|
||||||
return toAjax(baseConfigService.removeByIds(list));
|
return toAjax(baseConfigService.removeByIds(list));
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 获取基础配置-账户配置、小程序配置的内容详细信息-根据code获取
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/getConfigByCode")
|
||||||
|
public AjaxResult getConfigByCode(String code)
|
||||||
|
{
|
||||||
|
LambdaQueryWrapper<BaseConfig> queryWrapper = new LambdaQueryWrapper<BaseConfig>().eq(BaseConfig::getCode,code);
|
||||||
|
List<BaseConfig> list = baseConfigService.list(queryWrapper);
|
||||||
|
if(list.isEmpty()){
|
||||||
|
error("未查询到相关配置!");
|
||||||
|
}
|
||||||
|
return success(list.get(0));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<select id="queryListPage" parameterType="BaseConfig" resultMap="BaseConfigResult">
|
<select id="queryListPage" parameterType="BaseConfig" resultMap="BaseConfigResult">
|
||||||
<include refid="selectBaseConfigVo"/>
|
<include refid="selectBaseConfigVo"/>
|
||||||
<where>
|
<where>
|
||||||
|
del_flag=0
|
||||||
<if test="entity.code != null and entity.code != ''"> and code = #{entity.code}</if>
|
<if test="entity.code != null and entity.code != ''"> and code = #{entity.code}</if>
|
||||||
<if test="entity.title != null and entity.title != ''"> and title = #{entity.title}</if>
|
<if test="entity.title != null and entity.title != ''"> and title = #{entity.title}</if>
|
||||||
<if test="entity.jsonStr != null and entity.jsonStr != ''"> and json_str = #{entity.jsonStr}</if>
|
<if test="entity.jsonStr != null and entity.jsonStr != ''"> and json_str = #{entity.jsonStr}</if>
|
||||||
|
@ -28,11 +28,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<select id="queryListPage" parameterType="BaseRights" resultMap="BaseRightsResult">
|
<select id="queryListPage" parameterType="BaseRights" resultMap="BaseRightsResult">
|
||||||
<include refid="selectBaseRightsVo"/>
|
<include refid="selectBaseRightsVo"/>
|
||||||
<where>
|
<where>
|
||||||
|
del_flag=0
|
||||||
<if test="entity.userType != null and entity.userType != ''"> and user_type = #{entity.userType}</if>
|
<if test="entity.userType != null and entity.userType != ''"> and user_type = #{entity.userType}</if>
|
||||||
<if test="entity.code != null and entity.code != ''"> and code = #{entity.code}</if>
|
<if test="entity.code != null and entity.code != ''"> and code = #{entity.code}</if>
|
||||||
<if test="entity.name != null and entity.name != ''"> and name like concat('%', #{entity.name}, '%')</if>
|
<if test="entity.name != null and entity.name != ''"> and name like concat('%', #{entity.name}, '%')</if>
|
||||||
<if test="entity.rightsType != null and entity.rightsType != ''"> and rights_type = #{entity.rightsType}</if>
|
<if test="entity.rightsType != null and entity.rightsType != ''"> and rights_type = #{entity.rightsType}</if>
|
||||||
<if test="entity.rightsCycle != null and entity.rightsCycle != ''"> and rights_cycle = #{entity.rightsCycle}</if>
|
<if test="entity.rightsCycle != null and entity.rightsCycle != ''"> and rights_cycle = #{entity.rightsCycle}</if>
|
||||||
</where>
|
</where>
|
||||||
|
order by user_type,sort asc,create_time asc
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.extension.incrementer.H2KeyGenerator;
|
|||||||
import com.baomidou.mybatisplus.extension.incrementer.KingbaseKeyGenerator;
|
import com.baomidou.mybatisplus.extension.incrementer.KingbaseKeyGenerator;
|
||||||
import com.baomidou.mybatisplus.extension.incrementer.OracleKeyGenerator;
|
import com.baomidou.mybatisplus.extension.incrementer.OracleKeyGenerator;
|
||||||
import com.baomidou.mybatisplus.extension.incrementer.PostgreKeyGenerator;
|
import com.baomidou.mybatisplus.extension.incrementer.PostgreKeyGenerator;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
|
||||||
import com.ruoyi.framework.handler.DefaultDBFieldHandler;
|
import com.ruoyi.framework.handler.DefaultDBFieldHandler;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.mybatis.spring.annotation.MapperScan;
|
import org.mybatis.spring.annotation.MapperScan;
|
||||||
@ -33,4 +34,15 @@ public class MybatisAutoConfiguration {
|
|||||||
return new DefaultDBFieldHandler(); // 自动填充参数类
|
return new DefaultDBFieldHandler(); // 自动填充参数类
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Mybatis plus 分页插件 **/
|
||||||
|
@Bean
|
||||||
|
public PaginationInterceptor paginationInterceptor() {
|
||||||
|
PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
|
||||||
|
// 设置请求的页面大于最大页后操作, true调回到首页,false 继续请求 默认false
|
||||||
|
// paginationInterceptor.setOverflow(false);
|
||||||
|
// 设置最大单页限制数量,默认 500 条,-1 不受限制
|
||||||
|
paginationInterceptor.setLimit(-1);
|
||||||
|
return paginationInterceptor;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user