//package jj.tech.paolu.biz.webadmin.controller;
//
//import static org.mybatis.dynamic.sql.SqlBuilder.select;
//
//import org.mybatis.dynamic.sql.render.RenderingStrategies;
//import org.mybatis.dynamic.sql.select.render.SelectStatementProvider;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//import io.swagger.v3.oas.annotations.Operation;
//import io.swagger.v3.oas.annotations.tags.Tag;
//import jj.tech.paolu.repository.mybatis.dao.SysRoleSignMapper;
//import jj.tech.paolu.repository.mybatis.dao.support.SysRoleSignDynamicSqlSupport;
//import jj.tech.paolu.utils.R;
//@RestController
//@RequestMapping(value = "/op/roleSign")
//@Tag(name = "RoleSignController", description = "角色标记")
//public class RoleSignController {
//	
//	@Autowired SysRoleSignMapper sysRoleSignMapper;
//	
//	
////	@Operation(summary = "角色列表", description = "")
////    @PostMapping("/list")
////    public Object list(@RequestBody SysRoleListVo parame) {
////
////        Page p = new Page(parame.pageNum, parame.pageSize);
////
////        if (StringUtils.isNotBlank(parame.rolename)) {
////            parame.rolename = "%" + parame.rolename + "%";
////        }
////        if (StringUtils.isNotBlank(parame.describe)) {
////            parame.describe = "%" + parame.describe + "%";
////        }
////
////        var from = select(SysRoleMapper.selectList)
////                .from(SysRoleDynamicSqlSupport.sysRole);
////
////        var where = SqlBuilder.where(SysRoleDynamicSqlSupport.id, isNotEqualTo(1L));
////
////        where.and(SysRoleDynamicSqlSupport.rolename, isLikeWhenPresent(parame.rolename));
////        where.and(SysRoleDynamicSqlSupport.describe, isLikeWhenPresent(parame.describe));
////        where.and(SysRoleDynamicSqlSupport.is_open, isEqualToWhenPresent(parame.is_open));
////
////        WhereApplier applier = where.toWhereApplier();
////        SelectStatementProvider provider = from
////                .applyWhere(applier)
////                .configureStatement(config -> config.setNonRenderingWhereClauseAllowed(true))
////                .limit(p.getPageSize())
////                .offset(p.limitStart())
////                .build()
////                .render(RenderingStrategies.MYBATIS3);
////
////        var list = sysRoleMapper.selectMany(provider);
////        long total = sysRoleMapper.count(c -> c
////                .applyWhere(applier)
////                .configureStatement(config -> config.setNonRenderingWhereClauseAllowed(true))
////        );
////        p.setList(list);
////        p.setTotal(total);
////        return R.SUCCESS(p);
////    }
//
//    @Operation(summary = "所有标记", description = "")
//    @PostMapping("/all")
//    public Object all() {
//
//        var from = select(SysRoleSignMapper.selectList)
//                .from(SysRoleSignDynamicSqlSupport.sysRoleSign)
//                ;
//                
//        SelectStatementProvider provider = from
//                .configureStatement(config -> config.setNonRenderingWhereClauseAllowed(true))
//                .orderBy(SysRoleSignDynamicSqlSupport.id)
//                .limit(2000)
//                .build()
//                .render(RenderingStrategies.MYBATIS3);
//
//        var list = sysRoleSignMapper.selectMany(provider);
//
//        return R.SUCCESS(list);
//    }
//}
