| | |
| | | secureRegistry.excludePathPatterns("/record/**"); |
| | | secureRegistry.excludePathPatterns("/revoke/**"); |
| | | secureRegistry.excludePathPatterns("/recordk/**"); |
| | | secureRegistry.excludePathPatterns("/punish/**"); |
| | | secureRegistry.excludePathPatterns("/blade-resource/attach/**"); |
| | | return secureRegistry; |
| | | } |
| | |
| | | import org.springblade.modules.permit.entity.Permit; |
| | | import org.springblade.modules.permit.service.IPermitService; |
| | | import org.springblade.modules.permit.vo.PermitVO; |
| | | import org.springblade.modules.punish.entity.Punish; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import springfox.documentation.annotations.ApiIgnore; |
| | | |
| | | import javax.validation.Valid; |
| | | import java.util.Date; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 控制器 |
| | |
| | | @GetMapping("/list") |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "分页", notes = "传入permit") |
| | | public R<IPage<Permit>> list(Permit permit, Query query) { |
| | | IPage<Permit> pages = permitService.page(Condition.getPage(query), Condition.getQueryWrapper(permit)); |
| | | public R<IPage<Permit>> list(@ApiIgnore @RequestParam Map<String, Object> permit, Query query) { |
| | | IPage<Permit> pages = permitService.page(Condition.getPage(query), Condition.getQueryWrapper(permit, Permit.class)); |
| | | return R.data(pages); |
| | | } |
| | | |
| | |
| | | */ |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("blade-punish/punish") |
| | | @RequestMapping("/punish") |
| | | @Api(value = "", tags = "接口") |
| | | public class PunishController extends BladeController { |
| | | |
| | |
| | | @PostMapping("/save") |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "新增", notes = "传入punish") |
| | | public R save(@Valid @RequestBody Punish punish) { |
| | | public R save(@Valid @RequestBody Punish punish) { |
| | | return R.status(punishService.save(punish)); |
| | | } |
| | | |
| | |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.modules.permit.entity.Permit; |
| | | import org.springblade.modules.record.entity.Record; |
| | | import org.springblade.modules.record.service.IRecordService; |
| | | import org.springblade.modules.record.vo.RecordVO; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import springfox.documentation.annotations.ApiIgnore; |
| | | |
| | | import javax.validation.Valid; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 控制器 |
| | |
| | | @GetMapping("/list") |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "分页", notes = "传入record") |
| | | public R<IPage<Record>> list(Record record, Query query) { |
| | | IPage<Record> pages = recordService.page(Condition.getPage(query), Condition.getQueryWrapper(record)); |
| | | public R<IPage<Record>> list(@ApiIgnore @RequestParam Map<String, Object> record, Query query) { |
| | | IPage<Record> pages = recordService.page(Condition.getPage(query), Condition.getQueryWrapper(record, Record.class)); |
| | | return R.data(pages); |
| | | } |
| | | |
| | |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.modules.record.entity.Record; |
| | | import org.springblade.modules.recordk.entity.Recordk; |
| | | import org.springblade.modules.recordk.service.IRecordkService; |
| | | import org.springblade.modules.recordk.vo.RecordkVO; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import springfox.documentation.annotations.ApiIgnore; |
| | | |
| | | import javax.validation.Valid; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 控制器 |
| | |
| | | @GetMapping("/list") |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "分页", notes = "传入recordk") |
| | | public R<IPage<Recordk>> list(Recordk recordk, Query query) { |
| | | IPage<Recordk> pages = recordkService.page(Condition.getPage(query), Condition.getQueryWrapper(recordk)); |
| | | public R<IPage<Recordk>> list(@ApiIgnore @RequestParam Map<String, Object> recordk, Query query) { |
| | | IPage<Recordk> pages = recordkService.page(Condition.getPage(query), Condition.getQueryWrapper(recordk, Recordk.class)); |
| | | return R.data(pages); |
| | | } |
| | | |
| | |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.modules.recordk.entity.Recordk; |
| | | import org.springblade.modules.revoke.entity.Revoke; |
| | | import org.springblade.modules.revoke.service.IRevokeService; |
| | | import org.springblade.modules.revoke.vo.RevokeVO; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import springfox.documentation.annotations.ApiIgnore; |
| | | |
| | | import javax.validation.Valid; |
| | | import java.util.Date; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 控制器 |
| | |
| | | @GetMapping("/list") |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "分页", notes = "传入revoke") |
| | | public R<IPage<Revoke>> list(Revoke revoke, Query query) { |
| | | IPage<Revoke> pages = revokeService.page(Condition.getPage(query), Condition.getQueryWrapper(revoke)); |
| | | public R<IPage<Revoke>> list(@ApiIgnore @RequestParam Map<String, Object> revoke, Query query) { |
| | | IPage<Revoke> pages = revokeService.page(Condition.getPage(query), Condition.getQueryWrapper(revoke, Revoke.class)); |
| | | return R.data(pages); |
| | | } |
| | | |
| | |
| | | return R.data(deptService.selectIn()); |
| | | } |
| | | |
| | | /** |
| | | * 懒加载获取部门树形结构,不包含顶级管理员公安局 |
| | | */ |
| | | @GetMapping("/security_lazy-tree") |
| | | @ApiOperation(value = "懒加载树形结构", notes = "树形结构") |
| | | public R<List<DeptVO>> securityLazyTree(String tenantId, Long parentId, BladeUser bladeUser) { |
| | | List<DeptVO> tree = deptService.securityLazyTree(Func.toStrWithEmpty(tenantId, bladeUser.getTenantId()), parentId); |
| | | return R.data(tree); |
| | | } |
| | | } |
| | |
| | | List<Map<Object,String>> selectCount(); |
| | | List<Map<Object,String>> selectId(String id); |
| | | Map<Object,Integer> selectHold(String deptid); |
| | | |
| | | /** |
| | | * 懒加载获取部门树形结构,不包含顶级管理员公安局 |
| | | */ |
| | | List<DeptVO> securityLazyTree(String tenantId, Long parentId); |
| | | } |
| | |
| | | <select id="selectId" resultType="java.util.HashMap"> |
| | | SELECT id FROM blade_dept WHERE parent_id =#{id} and is_deleted = 0 |
| | | </select> |
| | | |
| | | <select id="securityLazyTree" resultMap="treeNodeResultMap" > |
| | | SELECT |
| | | dept.id, |
| | | dept.parent_id, |
| | | dept.dept_name AS title, |
| | | dept.id AS "value", |
| | | dept.id AS "key", |
| | | ( |
| | | SELECT |
| | | CASE WHEN count(1) > 0 THEN 1 ELSE 0 END |
| | | FROM |
| | | blade_dept |
| | | WHERE |
| | | parent_id = dept.id and is_deleted = 0 |
| | | ) AS "has_children" |
| | | FROM |
| | | blade_dept dept |
| | | WHERE |
| | | dept.parent_id = #{param2} AND dept.is_deleted = 0 |
| | | and dept_category = 1 |
| | | <if test="param1!=null and param1!=''"> |
| | | and dept.tenant_id = #{param1} |
| | | </if> |
| | | ORDER BY dept.sort |
| | | </select> |
| | | </mapper> |
| | |
| | | List<Map<Object,String>> selectId(String id); |
| | | Map<Object,Integer> selectHold(String deptid); |
| | | List<String> selectIn(); |
| | | List<DeptVO> securityLazyTree(String tenantId, Long parentId); |
| | | } |
| | |
| | | List<Dept> deptList = baseMapper.selectList(queryWrapper); |
| | | return DeptWrapper.build().listNodeVO(deptList); |
| | | } |
| | | /** |
| | | * 懒加载获取部门树形结构,不包含顶级管理员公安局 |
| | | */ |
| | | @Override |
| | | public List<DeptVO> securityLazyTree(String tenantId, Long parentId) { |
| | | if (AuthUtil.isAdministrator()) { |
| | | tenantId = StringPool.EMPTY; |
| | | } |
| | | return ForestNodeMerger.merge(baseMapper.securityLazyTree(tenantId, parentId)); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<Object,String>> selectCount() { |