| | |
| | | package com.ruoyi.web.controller.api; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.framework.web.service.TokenService; |
| | | import com.ruoyi.system.model.TSysActivity; |
| | | import com.ruoyi.system.query.TSysActivityQuery; |
| | | import com.ruoyi.system.service.TSysActivityService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @author xiaochen |
| | | * @since 2025-08-20 |
| | | */ |
| | | @Api(tags = "热门活动") |
| | | @RestController |
| | | @RequestMapping("/t-sys-activity") |
| | | public class TSysActivityController { |
| | | |
| | | private final TSysActivityService sysActivityService; |
| | | private final TokenService tokenService; |
| | | @Autowired |
| | | public TSysActivityController(TSysActivityService sysActivityService, TokenService tokenService) { |
| | | this.sysActivityService = sysActivityService; |
| | | this.tokenService = tokenService; |
| | | } |
| | | |
| | | /** |
| | | * 获取热门活动管理列表 |
| | | */ |
| | | @ApiOperation(value = "获取热门活动分页列表") |
| | | @PostMapping(value = "/pageList") |
| | | public R<PageInfo<TSysActivity>> pageList(@RequestBody TSysActivityQuery query) { |
| | | Integer roleType = tokenService.getLoginUser().getUser().getRoleType(); |
| | | if(roleType == 5){ |
| | | query.setRoleType(roleType); |
| | | } |
| | | return R.ok(sysActivityService.pageList(query)); |
| | | } |
| | | |
| | | /** |
| | | * 获取热门活动管理列表 |
| | | */ |
| | | @ApiOperation(value = "获取热门活动列表") |
| | | @PostMapping(value = "/list") |
| | | public R<List<TSysActivity>> list() { |
| | | return R.ok(sysActivityService.list(Wrappers.lambdaQuery(TSysActivity.class).orderByDesc(TSysActivity::getCreateTime))); |
| | | } |
| | | |
| | | /** |
| | | * 添加热门活动管理 |
| | | */ |
| | | @Log(title = "热门活动信息-新增热门活动", businessType = BusinessType.INSERT) |
| | | @ApiOperation(value = "添加热门活动") |
| | | @PostMapping(value = "/add") |
| | | public R<Boolean> add(@Validated @RequestBody TSysActivity dto) { |
| | | return R.ok(sysActivityService.save(dto)); |
| | | } |
| | | |
| | | /** |
| | | * 修改热门活动 |
| | | */ |
| | | @Log(title = "热门活动信息-修改热门活动", businessType = BusinessType.UPDATE) |
| | | @ApiOperation(value = "修改热门活动") |
| | | @PostMapping(value = "/update") |
| | | public R<Boolean> update(@Validated @RequestBody TSysActivity dto) { |
| | | return R.ok(sysActivityService.updateById(dto)); |
| | | } |
| | | |
| | | /** |
| | | * 查看热门活动详情 |
| | | */ |
| | | @ApiOperation(value = "查看热门活动详情") |
| | | @GetMapping(value = "/getDetailById") |
| | | public R<TSysActivity> getDetailById(@RequestParam String id) { |
| | | return R.ok(sysActivityService.getById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 删除热门活动 |
| | | */ |
| | | @Log(title = "热门活动信息-删除热门活动", businessType = BusinessType.DELETE) |
| | | @ApiOperation(value = "删除热门活动") |
| | | @DeleteMapping(value = "/deleteById") |
| | | public R<Boolean> deleteById(@RequestParam String id) { |
| | | return R.ok(sysActivityService.removeById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 批量删除热门活动 |
| | | */ |
| | | @Log(title = "热门活动信息-删除热门活动", businessType = BusinessType.DELETE) |
| | | @ApiOperation(value = "批量删除热门活动") |
| | | @DeleteMapping(value = "/deleteByIds") |
| | | public R<Boolean> deleteByIds(@RequestBody List<String> ids) { |
| | | return R.ok(sysActivityService.removeByIds(ids)); |
| | | } |
| | | |
| | | /** |
| | | * 热门活动上下架 |
| | | */ |
| | | @Log(title = "热门活动信息-上下架", businessType = BusinessType.UPDATE) |
| | | @ApiOperation(value = "热门活动信息上下架") |
| | | @PutMapping(value = "/upAndDown") |
| | | public R<String> upAndDown(@RequestParam(value = "id") String id, |
| | | @RequestParam(value = "status")Integer status) { |
| | | sysActivityService.update(Wrappers.<TSysActivity>lambdaUpdate() |
| | | .set(TSysActivity::getStatus,status) |
| | | .eq(TSysActivity::getId,id)); |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | package com.ruoyi.web.controller.api; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.framework.web.service.TokenService; |
| | | import com.ruoyi.system.model.TSysEducationalInfo; |
| | | import com.ruoyi.system.query.TSysEducationalInfoQuery; |
| | | import com.ruoyi.system.service.TSysEducationalInfoService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @author xiaochen |
| | | * @since 2025-08-20 |
| | | */ |
| | | @Api(tags = "教育资讯") |
| | | @RestController |
| | | @RequestMapping("/t-sys-educational-info") |
| | | public class TSysEducationalInfoController { |
| | | |
| | | private final TSysEducationalInfoService sysEducationalInfoService; |
| | | private final TokenService tokenService; |
| | | @Autowired |
| | | public TSysEducationalInfoController(TSysEducationalInfoService sysEducationalInfoService, TokenService tokenService) { |
| | | this.sysEducationalInfoService = sysEducationalInfoService; |
| | | this.tokenService = tokenService; |
| | | } |
| | | |
| | | /** |
| | | * 获取教育资讯管理列表 |
| | | */ |
| | | @ApiOperation(value = "获取教育资讯分页列表") |
| | | @PostMapping(value = "/pageList") |
| | | public R<PageInfo<TSysEducationalInfo>> pageList(@RequestBody TSysEducationalInfoQuery query) { |
| | | Integer roleType = tokenService.getLoginUser().getUser().getRoleType(); |
| | | if(roleType == 5){ |
| | | query.setRoleType(roleType); |
| | | } |
| | | return R.ok(sysEducationalInfoService.pageList(query)); |
| | | } |
| | | |
| | | /** |
| | | * 获取教育资讯管理列表 |
| | | */ |
| | | @ApiOperation(value = "获取教育资讯列表") |
| | | @PostMapping(value = "/list") |
| | | public R<List<TSysEducationalInfo>> list() { |
| | | return R.ok(sysEducationalInfoService.list(Wrappers.lambdaQuery(TSysEducationalInfo.class).orderByDesc(TSysEducationalInfo::getCreateTime))); |
| | | } |
| | | |
| | | /** |
| | | * 添加教育资讯管理 |
| | | */ |
| | | @Log(title = "教育资讯信息-新增教育资讯", businessType = BusinessType.INSERT) |
| | | @ApiOperation(value = "添加教育资讯") |
| | | @PostMapping(value = "/add") |
| | | public R<Boolean> add(@Validated @RequestBody TSysEducationalInfo dto) { |
| | | return R.ok(sysEducationalInfoService.save(dto)); |
| | | } |
| | | |
| | | /** |
| | | * 修改教育资讯 |
| | | */ |
| | | @Log(title = "教育资讯信息-修改教育资讯", businessType = BusinessType.UPDATE) |
| | | @ApiOperation(value = "修改教育资讯") |
| | | @PostMapping(value = "/update") |
| | | public R<Boolean> update(@Validated @RequestBody TSysEducationalInfo dto) { |
| | | return R.ok(sysEducationalInfoService.updateById(dto)); |
| | | } |
| | | |
| | | /** |
| | | * 查看教育资讯详情 |
| | | */ |
| | | @ApiOperation(value = "查看教育资讯详情") |
| | | @GetMapping(value = "/getDetailById") |
| | | public R<TSysEducationalInfo> getDetailById(@RequestParam String id) { |
| | | return R.ok(sysEducationalInfoService.getById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 删除教育资讯 |
| | | */ |
| | | @Log(title = "教育资讯信息-删除教育资讯", businessType = BusinessType.DELETE) |
| | | @ApiOperation(value = "删除教育资讯") |
| | | @DeleteMapping(value = "/deleteById") |
| | | public R<Boolean> deleteById(@RequestParam String id) { |
| | | return R.ok(sysEducationalInfoService.removeById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 批量删除教育资讯 |
| | | */ |
| | | @Log(title = "教育资讯信息-删除教育资讯", businessType = BusinessType.DELETE) |
| | | @ApiOperation(value = "批量删除教育资讯") |
| | | @DeleteMapping(value = "/deleteByIds") |
| | | public R<Boolean> deleteByIds(@RequestBody List<String> ids) { |
| | | return R.ok(sysEducationalInfoService.removeByIds(ids)); |
| | | } |
| | | |
| | | /** |
| | | * 教育资讯上下架 |
| | | */ |
| | | @Log(title = "教育资讯信息-上下架", businessType = BusinessType.UPDATE) |
| | | @ApiOperation(value = "教育资讯信息上下架") |
| | | @PutMapping(value = "/upAndDown") |
| | | public R<String> upAndDown(@RequestParam(value = "id") String id, |
| | | @RequestParam(value = "status")Integer status) { |
| | | sysEducationalInfoService.update(Wrappers.<TSysEducationalInfo>lambdaUpdate() |
| | | .set(TSysEducationalInfo::getStatus,status) |
| | | .eq(TSysEducationalInfo::getId,id)); |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | package com.ruoyi.web.controller.api; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.framework.web.service.TokenService; |
| | | import com.ruoyi.system.model.TSysLive; |
| | | import com.ruoyi.system.query.TSysLiveQuery; |
| | | import com.ruoyi.system.service.TSysLiveService; |
| | | import com.ruoyi.system.vo.TSysLiveVO; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @author xiaochen |
| | | * @since 2025-08-20 |
| | | */ |
| | | @Api(tags = "直播管理") |
| | | @RestController |
| | | @RequestMapping("/t-sys-live") |
| | | public class TSysLiveController { |
| | | |
| | | private final TSysLiveService sysLiveService; |
| | | private final TokenService tokenService; |
| | | @Autowired |
| | | public TSysLiveController(TSysLiveService sysLiveService, TokenService tokenService) { |
| | | this.sysLiveService = sysLiveService; |
| | | this.tokenService = tokenService; |
| | | } |
| | | |
| | | /** |
| | | * 获取直播管理管理列表 |
| | | */ |
| | | @ApiOperation(value = "获取直播管理分页列表") |
| | | @PostMapping(value = "/pageList") |
| | | public R<PageInfo<TSysLiveVO>> pageList(@RequestBody TSysLiveQuery query) { |
| | | return R.ok(sysLiveService.pageList(query)); |
| | | } |
| | | |
| | | /** |
| | | * 获取直播管理管理列表 |
| | | */ |
| | | @ApiOperation(value = "获取直播管理列表") |
| | | @PostMapping(value = "/list") |
| | | public R<List<TSysLive>> list() { |
| | | return R.ok(sysLiveService.list(Wrappers.lambdaQuery(TSysLive.class).orderByDesc(TSysLive::getCreateTime))); |
| | | } |
| | | |
| | | /** |
| | | * 添加直播管理管理 |
| | | */ |
| | | @Log(title = "直播管理信息-新增直播管理", businessType = BusinessType.INSERT) |
| | | @ApiOperation(value = "添加直播管理") |
| | | @PostMapping(value = "/add") |
| | | public R<Boolean> add(@Validated @RequestBody TSysLive dto) { |
| | | // 直播开始时间无法小于当前时间 |
| | | if (dto.getStartTime().isBefore(LocalDateTime.now())) { |
| | | return R.fail("直播开始时间无法小于当前时间"); |
| | | } |
| | | // 计算结束时间 |
| | | dto.setEndTime(dto.getStartTime().plusMinutes(dto.getExpectedDuration())); |
| | | dto.setPassword(SecurityUtils.encryptPassword(dto.getPassword())); |
| | | return R.ok(sysLiveService.save(dto)); |
| | | } |
| | | |
| | | /** |
| | | * 修改直播管理 |
| | | */ |
| | | @Log(title = "直播管理信息-修改直播管理", businessType = BusinessType.UPDATE) |
| | | @ApiOperation(value = "修改直播管理") |
| | | @PostMapping(value = "/update") |
| | | public R<Boolean> update(@Validated @RequestBody TSysLive dto) { |
| | | // 直播已开始无法编辑 |
| | | // if (dto.getStartTime().isBefore(LocalDateTime.now())) { |
| | | // return R.fail("直播已开始,无法编辑"); |
| | | // } |
| | | // 计算结束时间 |
| | | dto.setEndTime(dto.getStartTime().plusMinutes(dto.getExpectedDuration())); |
| | | dto.setPassword(SecurityUtils.encryptPassword(dto.getPassword())); |
| | | return R.ok(sysLiveService.updateById(dto)); |
| | | } |
| | | |
| | | /** |
| | | * 查看直播管理详情 |
| | | */ |
| | | @ApiOperation(value = "查看直播管理详情") |
| | | @GetMapping(value = "/getDetailById") |
| | | public R<TSysLive> getDetailById(@RequestParam String id) { |
| | | return R.ok(sysLiveService.getById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 删除直播管理 |
| | | */ |
| | | @Log(title = "直播管理信息-删除直播管理", businessType = BusinessType.DELETE) |
| | | @ApiOperation(value = "删除直播管理") |
| | | @DeleteMapping(value = "/deleteById") |
| | | public R<Boolean> deleteById(@RequestParam String id) { |
| | | return R.ok(sysLiveService.removeById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 批量删除直播管理 |
| | | */ |
| | | @Log(title = "直播管理信息-删除直播管理", businessType = BusinessType.DELETE) |
| | | @ApiOperation(value = "批量删除直播管理") |
| | | @DeleteMapping(value = "/deleteByIds") |
| | | public R<Boolean> deleteByIds(@RequestBody List<String> ids) { |
| | | return R.ok(sysLiveService.removeByIds(ids)); |
| | | } |
| | | |
| | | /** |
| | | * 直播管理推送用户 |
| | | */ |
| | | @Log(title = "直播管理信息-推送用户", businessType = BusinessType.UPDATE) |
| | | @ApiOperation(value = "直播管理信息推送用户") |
| | | @PutMapping(value = "/pushUser") |
| | | public R<String> pushUser(@RequestParam(value = "id") String id, |
| | | @RequestParam(value = "pushType")String pushType) { |
| | | sysLiveService.pushUser(id,pushType); |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | package com.ruoyi.web.controller.api; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.framework.web.service.TokenService; |
| | | import com.ruoyi.system.model.TSysProductIntroduction; |
| | | import com.ruoyi.system.query.TSysProductIntroductionQuery; |
| | | import com.ruoyi.system.service.TSysProductIntroductionService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @author xiaochen |
| | | * @since 2025-08-20 |
| | | */ |
| | | @Api(tags = "产品介绍") |
| | | @RestController |
| | | @RequestMapping("/t-sys-product-introduction") |
| | | public class TSysProductIntroductionController { |
| | | |
| | | private final TSysProductIntroductionService sysProductIntroductionService; |
| | | private final TokenService tokenService; |
| | | @Autowired |
| | | public TSysProductIntroductionController(TSysProductIntroductionService sysProductIntroductionService, TokenService tokenService) { |
| | | this.sysProductIntroductionService = sysProductIntroductionService; |
| | | this.tokenService = tokenService; |
| | | } |
| | | |
| | | /** |
| | | * 获取产品介绍管理列表 |
| | | */ |
| | | @ApiOperation(value = "获取产品介绍分页列表") |
| | | @PostMapping(value = "/pageList") |
| | | public R<PageInfo<TSysProductIntroduction>> pageList(@RequestBody TSysProductIntroductionQuery query) { |
| | | Integer roleType = tokenService.getLoginUser().getUser().getRoleType(); |
| | | if(roleType == 5){ |
| | | query.setRoleType(roleType); |
| | | } |
| | | return R.ok(sysProductIntroductionService.pageList(query)); |
| | | } |
| | | |
| | | /** |
| | | * 获取产品介绍管理列表 |
| | | */ |
| | | @ApiOperation(value = "获取产品介绍列表") |
| | | @PostMapping(value = "/list") |
| | | public R<List<TSysProductIntroduction>> list() { |
| | | return R.ok(sysProductIntroductionService.list(Wrappers.lambdaQuery(TSysProductIntroduction.class).orderByDesc(TSysProductIntroduction::getCreateTime))); |
| | | } |
| | | |
| | | /** |
| | | * 添加产品介绍管理 |
| | | */ |
| | | @Log(title = "产品介绍信息-新增产品介绍", businessType = BusinessType.INSERT) |
| | | @ApiOperation(value = "添加产品介绍") |
| | | @PostMapping(value = "/add") |
| | | public R<Boolean> add(@Validated @RequestBody TSysProductIntroduction dto) { |
| | | return R.ok(sysProductIntroductionService.save(dto)); |
| | | } |
| | | |
| | | /** |
| | | * 修改产品介绍 |
| | | */ |
| | | @Log(title = "产品介绍信息-修改产品介绍", businessType = BusinessType.UPDATE) |
| | | @ApiOperation(value = "修改产品介绍") |
| | | @PostMapping(value = "/update") |
| | | public R<Boolean> update(@Validated @RequestBody TSysProductIntroduction dto) { |
| | | return R.ok(sysProductIntroductionService.updateById(dto)); |
| | | } |
| | | |
| | | /** |
| | | * 查看产品介绍详情 |
| | | */ |
| | | @ApiOperation(value = "查看产品介绍详情") |
| | | @GetMapping(value = "/getDetailById") |
| | | public R<TSysProductIntroduction> getDetailById(@RequestParam String id) { |
| | | return R.ok(sysProductIntroductionService.getById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 删除产品介绍 |
| | | */ |
| | | @Log(title = "产品介绍信息-删除产品介绍", businessType = BusinessType.DELETE) |
| | | @ApiOperation(value = "删除产品介绍") |
| | | @DeleteMapping(value = "/deleteById") |
| | | public R<Boolean> deleteById(@RequestParam String id) { |
| | | return R.ok(sysProductIntroductionService.removeById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 批量删除产品介绍 |
| | | */ |
| | | @Log(title = "产品介绍信息-删除产品介绍", businessType = BusinessType.DELETE) |
| | | @ApiOperation(value = "批量删除产品介绍") |
| | | @DeleteMapping(value = "/deleteByIds") |
| | | public R<Boolean> deleteByIds(@RequestBody List<String> ids) { |
| | | return R.ok(sysProductIntroductionService.removeByIds(ids)); |
| | | } |
| | | |
| | | /** |
| | | * 产品介绍上下架 |
| | | */ |
| | | @Log(title = "产品介绍信息-上下架", businessType = BusinessType.UPDATE) |
| | | @ApiOperation(value = "产品介绍信息上下架") |
| | | @PutMapping(value = "/upAndDown") |
| | | public R<String> upAndDown(@RequestParam(value = "id") String id, |
| | | @RequestParam(value = "status")Integer status) { |
| | | sysProductIntroductionService.update(Wrappers.<TSysProductIntroduction>lambdaUpdate() |
| | | .set(TSysProductIntroduction::getStatus,status) |
| | | .eq(TSysProductIntroduction::getId,id)); |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | @PostMapping("/list") |
| | | public AjaxResult list(@RequestBody SysRoleQuery query) |
| | | { |
| | | |
| | | Integer roleType = tokenService.getLoginUser().getUser().getRoleType(); |
| | | if(roleType == 1 || roleType == 4 || roleType == 5){ |
| | | query.setRoleType(roleType); |
| | | } |
| | | |
| | | PageInfo<SysRole> list = roleService.selectPageList(query); |
| | | return AjaxResult.success(list); |
| | | } |
| | |
| | | map.put("stop",stop); |
| | | return AjaxResult.success(map); |
| | | } |
| | | |
| | | // @Log(title = "角色管理", businessType = BusinessType.EXPORT) |
| | | // // @PreAuthorize("@ss.hasPermi('system:role:export')") |
| | | // @PostMapping("/export") |
| | | // public void export(HttpServletResponse response, SysRole role) |
| | | // { |
| | | // List<SysRole> list = roleService.selectRoleList(role); |
| | | // ExcelUtil<SysRole> util = new ExcelUtil<SysRole>(SysRole.class); |
| | | // util.exportExcel(response, list, "角色数据"); |
| | | // } |
| | | |
| | | /** |
| | | * 根据角色编号获取详细信息 |
| | |
| | | if(flag){ |
| | | return error("新增角色'" + dto.getRoleName() + "'失败,角色名称已存在"); |
| | | } |
| | | Integer roleType = tokenService.getLoginUser().getUser().getRoleType(); |
| | | dto.setRoleType(roleType); |
| | | roleService.saveRole(dto); |
| | | return AjaxResult.success(); |
| | | |
| | |
| | | @PreAuthorize("@ss.hasPermi('system:user')") |
| | | public AjaxResult list(@RequestBody SysUserQuery query) |
| | | { |
| | | Integer roleType = tokenService.getLoginUser().getUser().getRoleType(); |
| | | if(roleType == 1 || roleType == 4 || roleType == 5){ |
| | | query.setRoleType(roleType); |
| | | } |
| | | PageInfo<SysUserVO> list = userService.pageList(query); |
| | | return AjaxResult.success(list); |
| | | } |
| | |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@Validated @RequestBody SysUser user) |
| | | { |
| | | Integer roleType = tokenService.getLoginUser().getUser().getRoleType(); |
| | | user.setRoleType(roleType); |
| | | user.setUserName(user.getUserName()); |
| | | if (!userService.checkUserNameUnique(user)) |
| | | { |
| | |
| | | return error("新增用户'" + user.getUserName() + "'失败,手机号码已存在"); |
| | | } |
| | | user.setCreateBy(getUsername()); |
| | | user.setPassword(SecurityUtils.encryptPassword("123456")); |
| | | user.setPassword(SecurityUtils.encryptPassword("a123456")); |
| | | userService.insertUser(user); |
| | | return AjaxResult.success(); |
| | | } |
| | |
| | | { |
| | | userService.checkUserAllowed(user); |
| | | // userService.checkUserDataScope(user.getUserId()); |
| | | if(!org.springframework.util.StringUtils.hasLength(user.getPassword())){ |
| | | user.setPassword("a123456"); |
| | | } |
| | | user.setPassword(SecurityUtils.encryptPassword(user.getPassword())); |
| | | user.setUpdateBy(getUsername()); |
| | | return AjaxResult.success(userService.resetPwd(user)); |
| | |
| | | druid: |
| | | # 主库数据源 |
| | | master: |
| | | url: jdbc:mysql://172.27.0.13:3306/xizang?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=Asia/Shanghai |
| | | url: jdbc:mysql://172.27.0.13:3306/xizang?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true |
| | | username: xzgt |
| | | password: changyun!6f2gshj6h3j |
| | | # url: jdbc:mysql://cd-cdb-mrjncn8m.sql.tencentcdb.com:20945/xizang?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=Asia/Shanghai |
| | |
| | | druid: |
| | | # 主库数据源 |
| | | master: |
| | | url: jdbc:mysql://127.0.0.1:3306/haizhentong?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=Asia/Shanghai |
| | | url: jdbc:mysql://127.0.0.1:3306/haizhentong?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true |
| | | username: root |
| | | password: 123456 |
| | | # 从库数据源 |
| | |
| | | package com.ruoyi.web.test; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.TypeReference; |
| | | import com.ruoyi.RuoYiApplication; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.junit.Test; |
| | | import org.junit.runner.RunWith; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.test.context.SpringBootTest; |
| | | import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; |
| | | import org.springframework.context.ApplicationContext; |
| | | import org.springframework.context.ApplicationContextAware; |
| | | import org.springframework.context.EnvironmentAware; |
| | | import org.springframework.core.env.Environment; |
| | | import org.springframework.test.context.junit4.SpringRunner; |
| | | |
| | | @RunWith(SpringRunner.class) |
| | | @SpringBootTest(classes = RuoYiApplication.class,webEnvironment = WebEnvironment.MOCK) |
| | | @Slf4j |
| | | public class BaseTest implements ApplicationContextAware, EnvironmentAware { |
| | | |
| | | static { |
| | | System.setProperty("spring.profiles.active","test"); |
| | | } |
| | | |
| | | protected ApplicationContext applicationContext; |
| | | protected Environment environment; |
| | | |
| | | @Override |
| | | public void setApplicationContext(ApplicationContext applicationContext) { |
| | | this.applicationContext = applicationContext; |
| | | } |
| | | |
| | | public ApplicationContext getApplicationContext() { |
| | | return applicationContext; |
| | | } |
| | | |
| | | @Override |
| | | public void setEnvironment(Environment environment) { |
| | | this.environment = environment; |
| | | } |
| | | |
| | | public Environment getEnvironment() { |
| | | return environment; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | //package com.ruoyi.web.test; |
| | | // |
| | | //import com.alibaba.fastjson.JSON; |
| | | //import com.alibaba.fastjson.JSONArray; |
| | | //import com.alibaba.fastjson.JSONObject; |
| | | //import com.alibaba.fastjson.TypeReference; |
| | | //import com.ruoyi.RuoYiApplication; |
| | | //import com.ruoyi.common.core.domain.entity.SysMenu; |
| | | //import com.ruoyi.system.domain.SysRoleMenu; |
| | | //import com.ruoyi.system.mapper.SysRoleMenuMapper; |
| | | //import com.ruoyi.system.service.ISysMenuService; |
| | | //import com.ruoyi.system.service.ISysRoleService; |
| | | //import com.tencentcloudapi.cws.v20180312.models.Site; |
| | | //import lombok.extern.slf4j.Slf4j; |
| | | //import org.junit.jupiter.api.Test; |
| | | //import org.junit.runner.RunWith; |
| | | //import org.springframework.beans.factory.annotation.Autowired; |
| | | //import org.springframework.boot.test.context.SpringBootTest; |
| | | //import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; |
| | | //import org.springframework.context.ApplicationContext; |
| | | //import org.springframework.context.ApplicationContextAware; |
| | | //import org.springframework.context.EnvironmentAware; |
| | | //import org.springframework.core.env.Environment; |
| | | //import org.springframework.test.context.junit4.SpringRunner; |
| | | //import org.springframework.util.CollectionUtils; |
| | | // |
| | | //import javax.annotation.Resource; |
| | | //import java.util.ArrayList; |
| | | //import java.util.List; |
| | | //import java.util.stream.Collectors; |
| | | // |
| | | //@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = RuoYiApplication.class) |
| | | //public class BaseTest{ |
| | | // |
| | | // @Resource |
| | | // private ISysMenuService sysMenuService; |
| | | // |
| | | // public String menuStr = "[\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"/financialStatements\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"财务报表\",\n" + |
| | | // " \"icon\": \"hugeicons:menu\",\n" + |
| | | // " \"rank\": 1\n" + |
| | | // " },\n" + |
| | | // " \"children\": [\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"/financialStatements/clinicProcurementReport\",\n" + |
| | | // " \"component\": \"financialStatements/clinicProcurementReport/index\",\n" + |
| | | // " \"name\": \"ClinicProcurementReport\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"诊所采购报表\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " },\n" + |
| | | // " \"children\": [\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"\",\n" + |
| | | // " \"component\": \"permission:btn:export\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"导出\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " }\n" + |
| | | // " }\n" + |
| | | // " ]\n" + |
| | | // " }\n" + |
| | | // " ]\n" + |
| | | // " },\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"/featured\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"热门推荐\",\n" + |
| | | // " \"icon\": \"hugeicons:menu\",\n" + |
| | | // " \"rank\": 2\n" + |
| | | // " },\n" + |
| | | // " \"children\": [\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"/featured/educationalInformation\",\n" + |
| | | // " \"component\": \"featured/educationalInformation/index\",\n" + |
| | | // " \"name\": \"EducationalInformation\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"教育资讯\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " },\n" + |
| | | // " \"children\": []\n" + |
| | | // " },\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"/featured/productIntroduction\",\n" + |
| | | // " \"component\": \"featured/productIntroduction/index\",\n" + |
| | | // " \"name\": \"ProductIntroduction\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"产品介绍\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " },\n" + |
| | | // " \"children\": []\n" + |
| | | // " },\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"/featured/popularEvent\",\n" + |
| | | // " \"component\": \"featured/popularEvent/index\",\n" + |
| | | // " \"name\": \"PopularEvent\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"热门活动\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " },\n" + |
| | | // " \"children\": []\n" + |
| | | // " },\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"/featured/popularLiveStream\",\n" + |
| | | // " \"component\": \"featured/popularLiveStream/index\",\n" + |
| | | // " \"name\": \"PopularLiveStream\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"热门直播\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " },\n" + |
| | | // " \"children\": []\n" + |
| | | // " }\n" + |
| | | // " ]\n" + |
| | | // " },\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"/system\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"系统管理\",\n" + |
| | | // " \"icon\": \"hugeicons:menu\",\n" + |
| | | // " \"rank\": 3\n" + |
| | | // " },\n" + |
| | | // " \"children\": [\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"/system/permissionManagement\",\n" + |
| | | // " \"component\": \"system/permissionManagement/index\",\n" + |
| | | // " \"name\": \"PermissionManagement\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"权限管理\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " },\n" + |
| | | // " \"children\": [\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"\",\n" + |
| | | // " \"component\": \"permission:btn:add\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"添加\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " }\n" + |
| | | // " },\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"\",\n" + |
| | | // " \"component\": \"permission:btn:edit\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"编辑\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " }\n" + |
| | | // " },\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"\",\n" + |
| | | // " \"component\": \"permission:btn:delete\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"删除\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " }\n" + |
| | | // " },\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"\",\n" + |
| | | // " \"component\": \"permission:btn:detail\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"详情\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " }\n" + |
| | | // " }\n" + |
| | | // " ]\n" + |
| | | // " },\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"/system/accountManagement\",\n" + |
| | | // " \"component\": \"system/accountManagement/index\",\n" + |
| | | // " \"name\": \"AccountManagement\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"账号管理\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " },\n" + |
| | | // " \"children\": [\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"\",\n" + |
| | | // " \"component\": \"permission:btn:add\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"添加\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " }\n" + |
| | | // " },\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"\",\n" + |
| | | // " \"component\": \"permission:btn:edit\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"编辑\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " }\n" + |
| | | // " },\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"\",\n" + |
| | | // " \"component\": \"permission:btn:delete\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"删除\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " }\n" + |
| | | // " },\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"\",\n" + |
| | | // " \"component\": \"permission:btn:resetPassword\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"重置密码\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " }\n" + |
| | | // " }\n" + |
| | | // " ]\n" + |
| | | // " }\n" + |
| | | // " ]\n" + |
| | | // " },\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"/erpSystem\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"ERP系统\",\n" + |
| | | // " \"icon\": \"hugeicons:menu\",\n" + |
| | | // " \"rank\": 4\n" + |
| | | // " },\n" + |
| | | // " \"children\": [\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"/erpSystem/productManagement\",\n" + |
| | | // " \"component\": \"erpSystem/productManagement/index\",\n" + |
| | | // " \"name\": \"ProductManagement\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"商品管理\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " },\n" + |
| | | // " \"children\": [\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"\",\n" + |
| | | // " \"component\": \"permission:btn:fetchProduct\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"一键获取商品\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " }\n" + |
| | | // " },\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"\",\n" + |
| | | // " \"component\": \"permission:btn:add\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"添加\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " }\n" + |
| | | // " },\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"\",\n" + |
| | | // " \"component\": \"permission:btn:detail\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"详情\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " }\n" + |
| | | // " },\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"\",\n" + |
| | | // " \"component\": \"permission:btn:edit\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"修改\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " }\n" + |
| | | // " },\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"\",\n" + |
| | | // " \"component\": \"permission:btn:delete\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"删除\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " }\n" + |
| | | // " }\n" + |
| | | // " ]\n" + |
| | | // " },\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"/erpSystem/inventoryManagement\",\n" + |
| | | // " \"component\": \"erpSystem/inventoryManagement/index\",\n" + |
| | | // " \"name\": \"InventoryManagement\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"库存管理\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " },\n" + |
| | | // " \"children\": [\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"\",\n" + |
| | | // " \"component\": \"permission:btn:fetchProduct\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"一键采购\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " }\n" + |
| | | // " },\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"\",\n" + |
| | | // " \"component\": \"permission:btn:add\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"问题上报\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " }\n" + |
| | | // " }\n" + |
| | | // " ]\n" + |
| | | // " },\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"/erpSystem/inventoryManagement/:id\",\n" + |
| | | // " \"name\": \"InventoryManagementDetail\",\n" + |
| | | // " \"component\": \"erpSystem/inventoryManagement/detail\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"库存详情\",\n" + |
| | | // " \"showLink\": false\n" + |
| | | // " }\n" + |
| | | // " },\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"/erpSystem/inventoryProcurement\",\n" + |
| | | // " \"component\": \"erpSystem/inventoryProcurement/index\",\n" + |
| | | // " \"name\": \"InventoryProcurement\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"库存采购\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " },\n" + |
| | | // " \"children\": [\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"\",\n" + |
| | | // " \"component\": \"permission:btn:add\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"添加采购\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " }\n" + |
| | | // " },\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"\",\n" + |
| | | // " \"component\": \"permission:btn:detail\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"详情\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " }\n" + |
| | | // " },\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"\",\n" + |
| | | // " \"component\": \"permission:btn:delete\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"删除\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " }\n" + |
| | | // " },\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"\",\n" + |
| | | // " \"component\": \"permission:btn:cancel\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"取消\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " }\n" + |
| | | // " }\n" + |
| | | // " ]\n" + |
| | | // " },\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"/erpSystem/inventoryProcurement/addPurchase\",\n" + |
| | | // " \"name\": \"AddPurchase\",\n" + |
| | | // " \"component\": \"erpSystem/inventoryProcurement/addPurchase\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"添加采购\",\n" + |
| | | // " \"showLink\": false\n" + |
| | | // " }\n" + |
| | | // " },\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"/erpSystem/inventoryProcurement/:id\",\n" + |
| | | // " \"name\": \"InventoryProcurementDetail\",\n" + |
| | | // " \"component\": \"erpSystem/inventoryProcurement/detail\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"采购详情\",\n" + |
| | | // " \"showLink\": false\n" + |
| | | // " }\n" + |
| | | // " },\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"/erpSystem/inventoryInbound\",\n" + |
| | | // " \"name\": \"InventoryInbound\",\n" + |
| | | // " \"component\": \"erpSystem/inventoryInbound/index\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"库存入库\",\n" + |
| | | // " \"showLink\": false\n" + |
| | | // " }\n" + |
| | | // " },\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"/erpSystem/inventoryInbound/:id\",\n" + |
| | | // " \"name\": \"InventoryInboundDetail\",\n" + |
| | | // " \"component\": \"erpSystem/inventoryInbound/detail\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"入库详情\",\n" + |
| | | // " \"showLink\": false\n" + |
| | | // " }\n" + |
| | | // " },\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"/erpSystem/inventoryInbound/productInbound\",\n" + |
| | | // " \"name\": \"ProductInbound\",\n" + |
| | | // " \"component\": \"erpSystem/inventoryInbound/productInbound\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"商品入库\",\n" + |
| | | // " \"showLink\": false\n" + |
| | | // " }\n" + |
| | | // " },\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"/erpSystem/inventoryOutbound\",\n" + |
| | | // " \"name\": \"InventoryOutbound\",\n" + |
| | | // " \"component\": \"erpSystem/inventoryOutbound/index\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"库存出库\",\n" + |
| | | // " \"showLink\": false\n" + |
| | | // " }\n" + |
| | | // " },\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"/erpSystem/inventoryOutbound/:id\",\n" + |
| | | // " \"name\": \"InventoryOutboundDetail\",\n" + |
| | | // " \"component\": \"erpSystem/inventoryOutbound/detail\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"出库详情\",\n" + |
| | | // " \"showLink\": false\n" + |
| | | // " }\n" + |
| | | // " },\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"/erpSystem/inventoryOutbound/productOutbound\",\n" + |
| | | // " \"name\": \"ProductOutbound\",\n" + |
| | | // " \"component\": \"erpSystem/inventoryOutbound/productOutbound\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"商品出库\",\n" + |
| | | // " \"showLink\": false\n" + |
| | | // " }\n" + |
| | | // " },\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"/erpSystem/issueReport\",\n" + |
| | | // " \"component\": \"erpSystem/issueReport/index\",\n" + |
| | | // " \"name\": \"IssueReport\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"问题上报\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " },\n" + |
| | | // " \"children\": [\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"\",\n" + |
| | | // " \"component\": \"permission:btn:add\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"问题上报\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " }\n" + |
| | | // " },\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"\",\n" + |
| | | // " \"component\": \"permission:btn:detail\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"详情\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " }\n" + |
| | | // " }\n" + |
| | | // " ]\n" + |
| | | // " },\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"/erpSystem/maintenanceReminder\",\n" + |
| | | // " \"component\": \"erpSystem/maintenanceReminder/index\",\n" + |
| | | // " \"name\": \"MaintenanceReminder\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"保养提醒\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " },\n" + |
| | | // " \"children\": [\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"\",\n" + |
| | | // " \"component\": \"permission:btn:detail\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"详情\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " }\n" + |
| | | // " }\n" + |
| | | // " ]\n" + |
| | | // " },\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"/erpSystem/expirationWarning\",\n" + |
| | | // " \"component\": \"erpSystem/expirationWarning/index\",\n" + |
| | | // " \"name\": \"ExpirationWarning\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"有效期预警\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " },\n" + |
| | | // " \"children\": [\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"\",\n" + |
| | | // " \"component\": \"permission:btn:addStockOut\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"添加出库\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " }\n" + |
| | | // " }\n" + |
| | | // " ]\n" + |
| | | // " }\n" + |
| | | // " ]\n" + |
| | | // " },\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"/crmSystem\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"患者诊疗\",\n" + |
| | | // " \"icon\": \"hugeicons:menu\",\n" + |
| | | // " \"rank\": 5\n" + |
| | | // " },\n" + |
| | | // " \"children\": [\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"/crmSystem/orderManagement\",\n" + |
| | | // " \"component\": \"crmSystem/orderManagement/index\",\n" + |
| | | // " \"name\": \"OrderManagement\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"订单管理\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " },\n" + |
| | | // " \"children\": [\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"\",\n" + |
| | | // " \"component\": \"permission:btn:add\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"添加\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " }\n" + |
| | | // " },\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"\",\n" + |
| | | // " \"component\": \"permission:btn:detail\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"详情\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " }\n" + |
| | | // " }\n" + |
| | | // " ]\n" + |
| | | // " },\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"/crmSystem/orderManagement/addPurchaseRecord\",\n" + |
| | | // " \"component\": \"crmSystem/orderManagement/addPurchaseRecord\",\n" + |
| | | // " \"name\": \"AddPurchaseRecord\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"添加购药记录\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " },\n" + |
| | | // " \"children\": []\n" + |
| | | // " },\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"/crmSystem/patientManagement/index\",\n" + |
| | | // " \"component\": \"crmSystem/patientManagement/index\",\n" + |
| | | // " \"name\": \"patientManagement\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"用户管理\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " },\n" + |
| | | // " \"children\": [\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"\",\n" + |
| | | // " \"component\": \"permission:btn:add\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"添加\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " }\n" + |
| | | // " },\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"\",\n" + |
| | | // " \"component\": \"permission:btn:detail\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"详情\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " }\n" + |
| | | // " },\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"\",\n" + |
| | | // " \"component\": \"permission:btn:edit\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"修改\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " }\n" + |
| | | // " }\n" + |
| | | // " ]\n" + |
| | | // " },\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"/crmSystem/patientManagement/:id\",\n" + |
| | | // " \"name\": \"PatientDetail\",\n" + |
| | | // " \"component\": \"/crmSystem/patientManagement/detail\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"患者详情\",\n" + |
| | | // " \"showLink\": false\n" + |
| | | // " }\n" + |
| | | // " },\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"/crmSystem/chronicDiseasePatientManagement\",\n" + |
| | | // " \"component\": \"crmSystem/chronicDiseasePatientManagement/index\",\n" + |
| | | // " \"name\": \"ChronicDiseasePatientManagement\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"慢性病患者管理\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " },\n" + |
| | | // " \"children\": [\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"\",\n" + |
| | | // " \"component\": \"permission:btn:export\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"导出\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " }\n" + |
| | | // " },\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"\",\n" + |
| | | // " \"component\": \"permission:btn:detail\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"详情\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " }\n" + |
| | | // " },\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"\",\n" + |
| | | // " \"component\": \"permission:btn:edit\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"用药提醒\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " }\n" + |
| | | // " }\n" + |
| | | // " ]\n" + |
| | | // " },\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"/crmSystem/chronicDiseasePatientManagement/:id\",\n" + |
| | | // " \"name\": \"ChronicDiseasePatientDetail\",\n" + |
| | | // " \"component\": \"/crmSystem/chronicDiseasePatientManagement/detail\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"慢性病患者详情\",\n" + |
| | | // " \"showLink\": false\n" + |
| | | // " }\n" + |
| | | // " }\n" + |
| | | // " ]\n" + |
| | | // " },\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"/pointsMallManagement\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"积分商城\",\n" + |
| | | // " \"icon\": \"hugeicons:menu\",\n" + |
| | | // " \"rank\": 6\n" + |
| | | // " },\n" + |
| | | // " \"children\": [\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"/pointsMallManagement/pointsMall\",\n" + |
| | | // " \"component\": \"pointsMallManagement/pointsMall/index\",\n" + |
| | | // " \"name\": \"PointsMall\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"积分商城\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " },\n" + |
| | | // " \"children\": [\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"\",\n" + |
| | | // " \"component\": \"permission:btn:detail\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"详情\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " }\n" + |
| | | // " }\n" + |
| | | // " ]\n" + |
| | | // " },\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"/pointsMallManagement/redemptionRecord\",\n" + |
| | | // " \"component\": \"pointsMallManagement/redemptionRecord/index\",\n" + |
| | | // " \"name\": \"RedemptionRecord\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"兑换记录\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " },\n" + |
| | | // " \"children\": [\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"\",\n" + |
| | | // " \"component\": \"permission:btn:detail\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"详情\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " }\n" + |
| | | // " }\n" + |
| | | // " ]\n" + |
| | | // " },\n" + |
| | | // " {\n" + |
| | | // " \"path\": \"/pointsMallManagement/pointsChangeDetail\",\n" + |
| | | // " \"component\": \"pointsMallManagement/pointsChangeDetail/index\",\n" + |
| | | // " \"name\": \"PointsChangeDetail\",\n" + |
| | | // " \"meta\": {\n" + |
| | | // " \"title\": \"积分变更明细\",\n" + |
| | | // " \"showLink\": true\n" + |
| | | // " },\n" + |
| | | // " \"children\": []\n" + |
| | | // " }\n" + |
| | | // " ]\n" + |
| | | // " }\n" + |
| | | // "]\n"; |
| | | // |
| | | // @Test |
| | | // public void insertMenu(){ |
| | | // JSONArray jsonArray = JSON.parseArray(menuStr); |
| | | // for (int i = 0; i < jsonArray.size(); i++) { |
| | | // JSONObject jsonObject = JSONObject.parseObject(jsonArray.get(i).toString()); |
| | | // String path = jsonObject.getString("path"); |
| | | // JSONObject meta = jsonObject.getJSONObject("meta"); |
| | | // String menu_name = meta.getString("title"); |
| | | // String icon = meta.getString("icon"); |
| | | // Integer order_num = meta.getInteger("rank"); |
| | | // SysMenu sysMenu = new SysMenu(); |
| | | // sysMenu.setParentId(0L); |
| | | // sysMenu.setMenuName(menu_name); |
| | | // sysMenu.setPath(path); |
| | | // sysMenu.setIcon(icon); |
| | | // sysMenu.setOrderNum(order_num); |
| | | // sysMenu.setRoleType(5); |
| | | // sysMenu.setMenuType("M"); |
| | | // sysMenuService.insertMenu(sysMenu); |
| | | // JSONArray children1 = jsonObject.getJSONArray("children"); |
| | | // if(!CollectionUtils.isEmpty(children1)){ |
| | | // for (int j = 0; j < children1.size(); j++) { |
| | | // JSONObject jsonObject1 = JSONObject.parseObject(children1.get(j).toString()); |
| | | // String path1 = jsonObject1.getString("path"); |
| | | // String component = jsonObject1.getString("component"); |
| | | // String name1 = jsonObject1.getString("name"); |
| | | // JSONObject meta1 = jsonObject1.getJSONObject("meta"); |
| | | // String menu_name1 = meta1.getString("title"); |
| | | // String showLink1 = meta1.getString("showLink"); |
| | | // SysMenu sysMenu1 = new SysMenu(); |
| | | // sysMenu1.setParentId(sysMenu.getMenuId()); |
| | | // sysMenu1.setMenuName(menu_name1); |
| | | // sysMenu1.setPath(path1); |
| | | // sysMenu1.setComponent(component); |
| | | // sysMenu1.setRoleType(5); |
| | | // sysMenu1.setMenuType("C"); |
| | | // sysMenuService.insertMenu(sysMenu1); |
| | | // JSONArray children2 = jsonObject1.getJSONArray("children"); |
| | | // if(!CollectionUtils.isEmpty(children2)){ |
| | | // for (int k = 0; k < children2.size(); k++) { |
| | | // JSONObject jsonObject2 = JSONObject.parseObject(children2.get(k).toString()); |
| | | // String path2 = jsonObject2.getString("path"); |
| | | // String component2 = jsonObject2.getString("component"); |
| | | // JSONObject meta2 = jsonObject2.getJSONObject("meta"); |
| | | // String title = meta2.getString("title"); |
| | | // String showLink2 = meta2.getString("showLink"); |
| | | // SysMenu sysMenu2 = new SysMenu(); |
| | | // sysMenu2.setParentId(sysMenu1.getMenuId()); |
| | | // sysMenu2.setMenuName(title); |
| | | // sysMenu2.setPath(path2); |
| | | // sysMenu2.setComponent(component2); |
| | | // sysMenu2.setRoleType(5); |
| | | // sysMenu2.setMenuType("F"); |
| | | // sysMenuService.insertMenu(sysMenu2); |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | // |
| | | // @Autowired |
| | | // private ISysRoleService sysRoleService; |
| | | // @Autowired |
| | | // private SysRoleMenuMapper roleMenuMapper; |
| | | // @Test |
| | | // public void insertRoleMenu(){ |
| | | // |
| | | // List<SysMenu> list = sysMenuService.selectList(); |
| | | // List<SysMenu> platform = list.stream().filter(e -> e.getRoleType().equals(1)).collect(Collectors.toList()); |
| | | // List<SysMenu> supplier = list.stream().filter(e -> e.getRoleType().equals(4)).collect(Collectors.toList()); |
| | | // List<SysMenu> clinic = list.stream().filter(e -> e.getRoleType().equals(5)).collect(Collectors.toList()); |
| | | // |
| | | // List<SysRoleMenu> sysRoleMenus = new ArrayList<>(); |
| | | // for (SysMenu sysMenu : platform) { |
| | | // SysRoleMenu sysRoleMenu = new SysRoleMenu(); |
| | | // sysRoleMenu.setRoleId(1L); |
| | | // sysRoleMenu.setMenuId(sysMenu.getMenuId()); |
| | | // sysRoleMenus.add(sysRoleMenu); |
| | | // } |
| | | // roleMenuMapper.batchRoleMenu(sysRoleMenus); |
| | | // List<SysRoleMenu> sysRoleMenus1 = new ArrayList<>(); |
| | | // for (SysMenu sysMenu : supplier) { |
| | | // SysRoleMenu sysRoleMenu = new SysRoleMenu(); |
| | | // sysRoleMenu.setRoleId(4L); |
| | | // sysRoleMenu.setMenuId(sysMenu.getMenuId()); |
| | | // sysRoleMenus1.add(sysRoleMenu); |
| | | // } |
| | | // roleMenuMapper.batchRoleMenu(sysRoleMenus1); |
| | | // List<SysRoleMenu> sysRoleMenus2 = new ArrayList<>(); |
| | | // for (SysMenu sysMenu : clinic) { |
| | | // SysRoleMenu sysRoleMenu = new SysRoleMenu(); |
| | | // sysRoleMenu.setRoleId(5L); |
| | | // sysRoleMenu.setMenuId(sysMenu.getMenuId()); |
| | | // sysRoleMenus2.add(sysRoleMenu); |
| | | // } |
| | | // roleMenuMapper.batchRoleMenu(sysRoleMenus2); |
| | | // |
| | | // } |
| | | // |
| | | //} |
| | |
| | | druid: |
| | | # 主库数据源 |
| | | master: |
| | | url: jdbc:mysql://172.27.0.13:3306/xizang?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=Asia/Shanghai |
| | | url: jdbc:mysql://172.27.0.13:3306/xizang?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true |
| | | username: xzgt |
| | | password: changyun!6f2gshj6h3j |
| | | # url: jdbc:mysql://cd-cdb-mrjncn8m.sql.tencentcdb.com:20945/xizang?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=Asia/Shanghai |
| | |
| | | druid: |
| | | # 主库数据源 |
| | | master: |
| | | url: jdbc:mysql://127.0.0.1:3306/haizhentong?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=Asia/Shanghai |
| | | url: jdbc:mysql://127.0.0.1:3306/haizhentong?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true |
| | | username: root |
| | | password: 123456 |
| | | # 从库数据源 |
| | |
| | | |
| | | /** 菜单图标 */ |
| | | private String icon; |
| | | /** 角色类型,逗号分割 1=平台 2=分公司 3=业务员 4=供应商 5=诊所端 6=仓库员 */ |
| | | /** 角色类型 1=平台 2=分公司 3=业务员 4=供应商 5=诊所端 6=仓库员 */ |
| | | @TableField(value = "role_type") |
| | | private String roleType; |
| | | private Integer roleType; |
| | | |
| | | /** 子菜单 */ |
| | | private List<SysMenu> children = new ArrayList<SysMenu>(); |
| | | |
| | | public String getRoleType() { |
| | | public Integer getRoleType() { |
| | | return roleType; |
| | | } |
| | | |
| | | public void setRoleType(String roleType) { |
| | | public void setRoleType(Integer roleType) { |
| | | this.roleType = roleType; |
| | | } |
| | | |
| | |
| | | */ |
| | | private Integer removeDays; |
| | | /** |
| | | * 岗位类型 1=经理 2=负责人 3=专员 |
| | | * 岗位类型 1=平台 2=分公司 3=业务员 4=供应商 5=诊所端 6=仓库员 |
| | | */ |
| | | private Integer postType; |
| | | @TableField(value = "role_type") |
| | | private Integer roleType; |
| | | |
| | | /** |
| | | * 角色人数 |
| | | */ |
| | | @TableField(exist = false) |
| | | private Integer userCount; |
| | | |
| | | public Integer getPostType() { |
| | | return postType; |
| | | public Integer getRoleType() { |
| | | return roleType; |
| | | } |
| | | |
| | | public void setPostType(Integer postType) { |
| | | this.postType = postType; |
| | | public void setRoleType(Integer roleType) { |
| | | this.roleType = roleType; |
| | | } |
| | | |
| | | public SysRole() |
| | |
| | | } |
| | | } |
| | | /** |
| | | * 获取营业部ID |
| | | **/ |
| | | public static String getBusinessDeptId() |
| | | { |
| | | try |
| | | { |
| | | return getLoginUser().getUser().getBusinessDeptId(); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | throw new ServiceException("获取营业部ID异常", HttpStatus.UNAUTHORIZED); |
| | | } |
| | | } |
| | | /** |
| | | * 获取用户账户 |
| | | **/ |
| | | public static String getUsername() |
| | |
| | | private String roleName; |
| | | |
| | | @ApiModelProperty(value = "类型") |
| | | private Integer postType; |
| | | private Integer roleType; |
| | | @ApiModelProperty(value = "备注") |
| | | private String remark; |
| | | |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.model.TSysActivity; |
| | | import com.ruoyi.system.query.TSysActivityQuery; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TSysActivityMapper extends BaseMapper<TSysActivity> { |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * |
| | | * @param query |
| | | * @param pageInfo |
| | | * @return |
| | | */ |
| | | List<TSysActivity> pageList(@Param("query") TSysActivityQuery query, @Param("pageInfo")PageInfo<TSysActivity> pageInfo); |
| | | } |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.model.TSysEducationalInfo; |
| | | import com.ruoyi.system.query.TSysEducationalInfoQuery; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TSysEducationalInfoMapper extends BaseMapper<TSysEducationalInfo> { |
| | | |
| | | /** |
| | | * 获取教育资讯分页列表 |
| | | * @param query |
| | | * @param pageInfo |
| | | * @return |
| | | */ |
| | | List<TSysEducationalInfo> pageList(@Param("query") TSysEducationalInfoQuery query, @Param("pageInfo")PageInfo<TSysEducationalInfo> pageInfo); |
| | | } |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.model.TSysLive; |
| | | import com.ruoyi.system.query.TSysLiveQuery; |
| | | import com.ruoyi.system.vo.TSysLiveVO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TSysLiveMapper extends BaseMapper<TSysLive> { |
| | | |
| | | /** |
| | | * 获取直播管理分页列表 |
| | | * |
| | | * @param query 查询参数 |
| | | * @return 直播管理列表 |
| | | */ |
| | | List<TSysLiveVO> pageList(@Param("query") TSysLiveQuery query, @Param("pageInfo")PageInfo<TSysLiveVO> pageInfo); |
| | | } |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.model.TSysProductIntroduction; |
| | | import com.ruoyi.system.query.TSysProductIntroductionQuery; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TSysProductIntroductionMapper extends BaseMapper<TSysProductIntroduction> { |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * |
| | | * @param query |
| | | * @param pageInfo |
| | | * @return |
| | | */ |
| | | List<TSysProductIntroduction> pageList(@Param("query") TSysProductIntroductionQuery query, @Param("pageInfo")PageInfo<TSysProductIntroduction> pageInfo); |
| | | } |
| | |
| | | @TableField("start_time") |
| | | private LocalDateTime startTime; |
| | | |
| | | @ApiModelProperty(value = "结束时间") |
| | | @TableField("end_time") |
| | | private LocalDateTime endTime; |
| | | |
| | | @ApiModelProperty(value = "预计时长") |
| | | @TableField("expected_duration") |
| | | private Integer expectedDuration; |
| | |
| | | @TableField("live_detail") |
| | | private String liveDetail; |
| | | |
| | | @ApiModelProperty(value = "推送类型 1=诊所 2=用户 3=业务员") |
| | | @ApiModelProperty(value = "推送类型,逗号分隔 1=诊所 2=用户 3=业务员") |
| | | @TableField("push_type") |
| | | private Integer pushType; |
| | | private String pushType; |
| | | |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "角色名称") |
| | | private String roleName; |
| | | |
| | | @ApiModelProperty(value = "角色状态 0=正常,1=停用") |
| | | private Integer status; |
| | | @ApiModelProperty(value = "角色类型 1=平台 2=分公司 3=业务员 4=供应商 5=诊所端 6=仓库员 前端忽略") |
| | | private Integer roleType; |
| | | } |
| | |
| | | public class SysUserQuery extends BasePage { |
| | | |
| | | @ApiModelProperty(value = "姓名") |
| | | private String nickNameOrPhone; |
| | | private String nickName; |
| | | @ApiModelProperty(value = "电话") |
| | | private String phonenumber; |
| | | |
| | | @ApiModelProperty(value = "角色id") |
| | | private List<Integer> roleIds; |
| | |
| | | @ApiModelProperty(value = "状态 0=正常 1=停用") |
| | | private String status; |
| | | |
| | | @ApiModelProperty(value = "营业部id",hidden = true) |
| | | private String businessDeptId; |
| | | |
| | | @ApiModelProperty(value = "角色类型 1=平台 2=分公司 3=业务员 4=供应商 5=诊所端 6=仓库员 前端忽略") |
| | | private Integer roleType; |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.query; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.ruoyi.common.core.domain.BasePage; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "活动信息查询参数TSysActivityQuery") |
| | | public class TSysActivityQuery extends BasePage { |
| | | |
| | | @ApiModelProperty(value = "活动名称") |
| | | private String activityName; |
| | | |
| | | @ApiModelProperty(value = "展示类型 1=仅患者 2=仅诊所 3=患者和诊所") |
| | | private Integer showType; |
| | | |
| | | @ApiModelProperty(value = "状态 1=上架 2=下架") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "角色类型") |
| | | private Integer roleType; |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.query; |
| | | |
| | | import com.ruoyi.common.core.domain.BasePage; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "教育资讯查询参数Query") |
| | | public class TSysEducationalInfoQuery extends BasePage { |
| | | |
| | | @ApiModelProperty(value = "资讯标题") |
| | | private String infoTitle; |
| | | |
| | | @ApiModelProperty(value = "展示类型 1=仅患者 2=仅诊所 3=患者和诊所") |
| | | private Integer showType; |
| | | |
| | | @ApiModelProperty(value = "状态 1=上架中 2=下架") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "角色类型") |
| | | private Integer roleType; |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.query; |
| | | |
| | | import com.ruoyi.common.core.domain.BasePage; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "直播管理查询参数TSysLiveQuery") |
| | | public class TSysLiveQuery extends BasePage { |
| | | |
| | | @ApiModelProperty(value = "标题") |
| | | private String liveTitle; |
| | | |
| | | @ApiModelProperty(value = "直播状态 1=未开始 2=已开始 3=已结束") |
| | | private Integer liveStatus; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.query; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.ruoyi.common.core.domain.BasePage; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "产品介绍查询参数TSysProductIntroductionQuery") |
| | | public class TSysProductIntroductionQuery extends BasePage { |
| | | |
| | | @ApiModelProperty(value = "产品名称") |
| | | private String productName; |
| | | |
| | | @ApiModelProperty(value = "展示类型 1=仅患者 2=仅诊所 3=患者和诊所") |
| | | private Integer showType; |
| | | |
| | | @ApiModelProperty(value = "状态 1=上架 2=下架") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "角色类型") |
| | | private Integer roleType; |
| | | } |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.model.TSysActivity; |
| | | import com.ruoyi.system.query.TSysActivityQuery; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TSysActivityService extends IService<TSysActivity> { |
| | | |
| | | /** |
| | | * 获取热门活动分页列表 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | PageInfo<TSysActivity> pageList(TSysActivityQuery query); |
| | | } |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.model.TSysEducationalInfo; |
| | | import com.ruoyi.system.query.TSysEducationalInfoQuery; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TSysEducationalInfoService extends IService<TSysEducationalInfo> { |
| | | |
| | | /** |
| | | * 获取教育资讯分页列表 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | PageInfo<TSysEducationalInfo> pageList(TSysEducationalInfoQuery query); |
| | | } |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.system.model.TSysLive; |
| | | import com.ruoyi.system.query.TSysLiveQuery; |
| | | import com.ruoyi.system.vo.TSysLiveVO; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TSysLiveService extends IService<TSysLive> { |
| | | |
| | | /** |
| | | * 直播管理信息推送用户 |
| | | * @param id |
| | | * @param pushType |
| | | */ |
| | | R pushUser(String id, String pushType); |
| | | |
| | | /** |
| | | * 获取直播管理分页列表 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | PageInfo<TSysLiveVO> pageList(TSysLiveQuery query); |
| | | } |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.model.TSysProductIntroduction; |
| | | import com.ruoyi.system.query.TSysProductIntroductionQuery; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TSysProductIntroductionService extends IService<TSysProductIntroduction> { |
| | | |
| | | /** |
| | | * 获取产品介绍分页列表 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | PageInfo<TSysProductIntroduction> pageList(TSysProductIntroductionQuery query); |
| | | } |
| | |
| | | // 添加角色 |
| | | SysRole sysRole = new SysRole(); |
| | | sysRole.setRoleName(dto.getRoleName()); |
| | | sysRole.setPostType(dto.getPostType()); |
| | | sysRole.setRoleType(dto.getRoleType()); |
| | | sysRole.setRemark(dto.getRemark()); |
| | | roleMapper.insertRole(sysRole); |
| | | |
| | |
| | | SysRole sysRole = new SysRole(); |
| | | sysRole.setRoleId(dto.getRoleId()); |
| | | sysRole.setRoleName(dto.getRoleName()); |
| | | sysRole.setPostType(dto.getPostType()); |
| | | sysRole.setRoleType(dto.getRoleType()); |
| | | sysRole.setRemark(dto.getRemark()); |
| | | roleMapper.updateRole(sysRole); |
| | | // 删除角色与菜单关联 |
| | |
| | | @Override |
| | | public PageInfo<SysUserVO> pageList(SysUserQuery query) { |
| | | PageInfo<SysUserVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | String businessDeptId = SecurityUtils.getBusinessDeptId(); |
| | | query.setBusinessDeptId(businessDeptId); |
| | | List<SysUserVO> list = userMapper.pageList(query,pageInfo); |
| | | if(CollectionUtils.isEmpty(list)){ |
| | | return pageInfo; |
| | |
| | | package com.ruoyi.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.mapper.TSysActivityMapper; |
| | | import com.ruoyi.system.model.TSysActivity; |
| | | import com.ruoyi.system.model.TSysEducationalInfo; |
| | | import com.ruoyi.system.query.TSysActivityQuery; |
| | | import com.ruoyi.system.service.TSysActivityService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class TSysActivityServiceImpl extends ServiceImpl<TSysActivityMapper, TSysActivity> implements TSysActivityService { |
| | | |
| | | @Override |
| | | public PageInfo<TSysActivity> pageList(TSysActivityQuery query) { |
| | | PageInfo<TSysActivity> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<TSysActivity> list = this.baseMapper.pageList(query,pageInfo); |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.system.service.impl; |
| | | |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.model.TErpGoodsType; |
| | | import com.ruoyi.system.model.TSysEducationalInfo; |
| | | import com.ruoyi.system.mapper.TSysEducationalInfoMapper; |
| | | import com.ruoyi.system.query.TSysEducationalInfoQuery; |
| | | import com.ruoyi.system.service.TSysEducationalInfoService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class TSysEducationalInfoServiceImpl extends ServiceImpl<TSysEducationalInfoMapper, TSysEducationalInfo> implements TSysEducationalInfoService { |
| | | |
| | | @Override |
| | | public PageInfo<TSysEducationalInfo> pageList(TSysEducationalInfoQuery query) { |
| | | PageInfo<TSysEducationalInfo> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<TSysEducationalInfo> list = this.baseMapper.pageList(query,pageInfo); |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.system.mapper.TSysLiveMapper; |
| | | import com.ruoyi.system.model.TSysEducationalInfo; |
| | | import com.ruoyi.system.model.TSysLive; |
| | | import com.ruoyi.system.query.TSysLiveQuery; |
| | | import com.ruoyi.system.service.TSysLiveService; |
| | | import com.ruoyi.system.vo.TSysLiveVO; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class TSysLiveServiceImpl extends ServiceImpl<TSysLiveMapper, TSysLive> implements TSysLiveService { |
| | | |
| | | @Override |
| | | public R pushUser(String id, String pushType) { |
| | | TSysLive sysLive = this.getById(id); |
| | | if (Objects.nonNull(sysLive)){ |
| | | sysLive.setPushType(pushType); |
| | | this.updateById(sysLive); |
| | | // TODO 添加定时推送 |
| | | |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public PageInfo<TSysLiveVO> pageList(TSysLiveQuery query) { |
| | | PageInfo<TSysLiveVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<TSysLiveVO> list = this.baseMapper.pageList(query,pageInfo); |
| | | // 判断状态 |
| | | for (TSysLiveVO sysLive : list) { |
| | | if(sysLive.getStartTime().isAfter(LocalDateTime.now())){ |
| | | sysLive.setLiveStatus(1); |
| | | } |
| | | if(sysLive.getStartTime().isBefore(LocalDateTime.now()) && sysLive.getEndTime().isAfter(LocalDateTime.now())){ |
| | | sysLive.setLiveStatus(2); |
| | | } |
| | | if(sysLive.getEndTime().isBefore(LocalDateTime.now())){ |
| | | sysLive.setLiveStatus(3); |
| | | } |
| | | } |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.mapper.TSysProductIntroductionMapper; |
| | | import com.ruoyi.system.model.TSysEducationalInfo; |
| | | import com.ruoyi.system.model.TSysProductIntroduction; |
| | | import com.ruoyi.system.query.TSysProductIntroductionQuery; |
| | | import com.ruoyi.system.service.TSysProductIntroductionService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class TSysProductIntroductionServiceImpl extends ServiceImpl<TSysProductIntroductionMapper, TSysProductIntroduction> implements TSysProductIntroductionService { |
| | | |
| | | @Override |
| | | public PageInfo<TSysProductIntroduction> pageList(TSysProductIntroductionQuery query) { |
| | | PageInfo<TSysProductIntroduction> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<TSysProductIntroduction> list = this.baseMapper.pageList(query,pageInfo); |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.vo; |
| | | |
| | | import com.ruoyi.system.model.TSysLive; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "直播管理信息TSysLiveVO") |
| | | public class TSysLiveVO extends TSysLive { |
| | | |
| | | @ApiModelProperty(value = "直播状态 1=未开始 2=已开始 3=已结束") |
| | | private Integer liveStatus; |
| | | |
| | | } |
| | |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.system.mapper.SysConfigMapper"> |
| | | |
| | | <resultMap type="SysConfig" id="SysConfigResult"> |
| | | <resultMap type="com.ruoyi.system.domain.SysConfig" id="SysConfigResult"> |
| | | <id property="configId" column="config_id" /> |
| | | <result property="configName" column="config_name" /> |
| | | <result property="configKey" column="config_key" /> |
| | |
| | | </where> |
| | | </sql> |
| | | |
| | | <select id="selectConfig" parameterType="SysConfig" resultMap="SysConfigResult"> |
| | | <select id="selectConfig" parameterType="com.ruoyi.system.domain.SysConfig" resultMap="SysConfigResult"> |
| | | <include refid="selectConfigVo"/> |
| | | <include refid="sqlwhereSearch"/> |
| | | </select> |
| | | |
| | | <select id="selectConfigList" parameterType="SysConfig" resultMap="SysConfigResult"> |
| | | <select id="selectConfigList" parameterType="com.ruoyi.system.domain.SysConfig" resultMap="SysConfigResult"> |
| | | <include refid="selectConfigVo"/> |
| | | <where> |
| | | <if test="configName != null and configName != ''"> |
| | |
| | | where config_key = #{configKey} limit 1 |
| | | </select> |
| | | |
| | | <insert id="insertConfig" parameterType="SysConfig"> |
| | | <insert id="insertConfig" parameterType="com.ruoyi.system.domain.SysConfig"> |
| | | insert into sys_config ( |
| | | <if test="configName != null and configName != '' ">config_name,</if> |
| | | <if test="configKey != null and configKey != '' ">config_key,</if> |
| | |
| | | ) |
| | | </insert> |
| | | |
| | | <update id="updateConfig" parameterType="SysConfig"> |
| | | <update id="updateConfig" parameterType="com.ruoyi.system.domain.SysConfig"> |
| | | update sys_config |
| | | <set> |
| | | <if test="configName != null and configName != ''">config_name = #{configName},</if> |
| | |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.system.mapper.SysDeptMapper"> |
| | | |
| | | <resultMap type="SysDept" id="SysDeptResult"> |
| | | <resultMap type="com.ruoyi.common.core.domain.entity.SysDept" id="SysDeptResult"> |
| | | <id property="deptId" column="dept_id" /> |
| | | <result property="parentId" column="parent_id" /> |
| | | <result property="ancestors" column="ancestors" /> |
| | |
| | | from sys_dept d |
| | | </sql> |
| | | |
| | | <select id="selectDeptList" parameterType="SysDept" resultMap="SysDeptResult"> |
| | | <select id="selectDeptList" parameterType="com.ruoyi.common.core.domain.entity.SysDept" resultMap="SysDeptResult"> |
| | | <include refid="selectDeptVo"/> |
| | | where d.del_flag = '0' |
| | | <if test="deptId != null and deptId != 0"> |
| | |
| | | where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0' limit 1 |
| | | </select> |
| | | |
| | | <insert id="insertDept" parameterType="SysDept"> |
| | | <insert id="insertDept" parameterType="com.ruoyi.common.core.domain.entity.SysDept"> |
| | | insert into sys_dept( |
| | | <if test="deptId != null and deptId != 0">dept_id,</if> |
| | | <if test="parentId != null and parentId != 0">parent_id,</if> |
| | |
| | | ) |
| | | </insert> |
| | | |
| | | <update id="updateDept" parameterType="SysDept"> |
| | | <update id="updateDept" parameterType="com.ruoyi.common.core.domain.entity.SysDept"> |
| | | update sys_dept |
| | | <set> |
| | | <if test="parentId != null and parentId != 0">parent_id = #{parentId},</if> |
| | |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.system.mapper.SysDictDataMapper"> |
| | | |
| | | <resultMap type="SysDictData" id="SysDictDataResult"> |
| | | <resultMap type="com.ruoyi.common.core.domain.entity.SysDictData" id="SysDictDataResult"> |
| | | <id property="dictCode" column="dict_code" /> |
| | | <result property="dictSort" column="dict_sort" /> |
| | | <result property="dictLabel" column="dict_label" /> |
| | |
| | | from sys_dict_data |
| | | </sql> |
| | | |
| | | <select id="selectDictDataList" parameterType="SysDictData" resultMap="SysDictDataResult"> |
| | | <select id="selectDictDataList" parameterType="com.ruoyi.common.core.domain.entity.SysDictData" resultMap="SysDictDataResult"> |
| | | <include refid="selectDictDataVo"/> |
| | | <where> |
| | | <if test="dictType != null and dictType != ''"> |
| | |
| | | order by dict_sort asc |
| | | </select> |
| | | |
| | | <select id="selectDictDataByType" parameterType="SysDictData" resultMap="SysDictDataResult"> |
| | | <select id="selectDictDataByType" parameterType="com.ruoyi.common.core.domain.entity.SysDictData" resultMap="SysDictDataResult"> |
| | | <include refid="selectDictDataVo"/> |
| | | where status = '0' and dict_type = #{dictType} order by dict_sort asc |
| | | </select> |
| | |
| | | </foreach> |
| | | </delete> |
| | | |
| | | <update id="updateDictData" parameterType="SysDictData"> |
| | | <update id="updateDictData" parameterType="com.ruoyi.common.core.domain.entity.SysDictData"> |
| | | update sys_dict_data |
| | | <set> |
| | | <if test="dictSort != null">dict_sort = #{dictSort},</if> |
| | |
| | | update sys_dict_data set dict_type = #{newDictType} where dict_type = #{oldDictType} |
| | | </update> |
| | | |
| | | <insert id="insertDictData" parameterType="SysDictData"> |
| | | <insert id="insertDictData" parameterType="com.ruoyi.common.core.domain.entity.SysDictData"> |
| | | insert into sys_dict_data( |
| | | <if test="dictSort != null">dict_sort,</if> |
| | | <if test="dictLabel != null and dictLabel != ''">dict_label,</if> |
| | |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.system.mapper.SysDictTypeMapper"> |
| | | |
| | | <resultMap type="SysDictType" id="SysDictTypeResult"> |
| | | <resultMap type="com.ruoyi.common.core.domain.entity.SysDictType" id="SysDictTypeResult"> |
| | | <id property="dictId" column="dict_id" /> |
| | | <result property="dictName" column="dict_name" /> |
| | | <result property="dictType" column="dict_type" /> |
| | |
| | | from sys_dict_type |
| | | </sql> |
| | | |
| | | <select id="selectDictTypeList" parameterType="SysDictType" resultMap="SysDictTypeResult"> |
| | | <select id="selectDictTypeList" parameterType="com.ruoyi.common.core.domain.entity.SysDictType" resultMap="SysDictTypeResult"> |
| | | <include refid="selectDictTypeVo"/> |
| | | <where> |
| | | <if test="dictName != null and dictName != ''"> |
| | |
| | | </foreach> |
| | | </delete> |
| | | |
| | | <update id="updateDictType" parameterType="SysDictType"> |
| | | <update id="updateDictType" parameterType="com.ruoyi.common.core.domain.entity.SysDictType"> |
| | | update sys_dict_type |
| | | <set> |
| | | <if test="dictName != null and dictName != ''">dict_name = #{dictName},</if> |
| | |
| | | where dict_id = #{dictId} |
| | | </update> |
| | | |
| | | <insert id="insertDictType" parameterType="SysDictType"> |
| | | <insert id="insertDictType" parameterType="com.ruoyi.common.core.domain.entity.SysDictType"> |
| | | insert into sys_dict_type( |
| | | <if test="dictName != null and dictName != ''">dict_name,</if> |
| | | <if test="dictType != null and dictType != ''">dict_type,</if> |
| | |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.system.mapper.SysLogininforMapper"> |
| | | |
| | | <resultMap type="SysLogininfor" id="SysLogininforResult"> |
| | | <resultMap type="com.ruoyi.system.domain.SysLogininfor" id="SysLogininforResult"> |
| | | <id property="infoId" column="info_id" /> |
| | | <result property="userName" column="user_name" /> |
| | | <result property="status" column="status" /> |
| | |
| | | <result property="loginTime" column="login_time" /> |
| | | </resultMap> |
| | | |
| | | <insert id="insertLogininfor" parameterType="SysLogininfor"> |
| | | <insert id="insertLogininfor" parameterType="com.ruoyi.system.domain.SysLogininfor"> |
| | | insert into sys_logininfor (user_name, status, ipaddr, login_location, browser, os, msg, login_time) |
| | | values (#{userName}, #{status}, #{ipaddr}, #{loginLocation}, #{browser}, #{os}, #{msg}, sysdate()) |
| | | </insert> |
| | | |
| | | <select id="selectLogininforList" parameterType="SysLogininfor" resultMap="SysLogininforResult"> |
| | | <select id="selectLogininforList" parameterType="com.ruoyi.system.domain.SysLogininfor" resultMap="SysLogininforResult"> |
| | | select info_id, user_name, ipaddr, login_location, browser, os, status, msg, login_time from sys_logininfor |
| | | <where> |
| | | <if test="ipaddr != null and ipaddr != ''"> |
| | |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.system.mapper.SysMenuMapper"> |
| | | |
| | | <resultMap type="SysMenu" id="SysMenuResult"> |
| | | <resultMap type="com.ruoyi.common.core.domain.entity.SysMenu" id="SysMenuResult"> |
| | | <id property="menuId" column="menu_id" /> |
| | | <result property="menuName" column="menu_name" /> |
| | | <result property="parentName" column="parent_name" /> |
| | |
| | | from sys_menu |
| | | </sql> |
| | | |
| | | <select id="selectMenuList" parameterType="SysMenu" resultMap="SysMenuResult"> |
| | | <select id="selectMenuList" parameterType="com.ruoyi.common.core.domain.entity.SysMenu" resultMap="SysMenuResult"> |
| | | <include refid="selectMenuVo"/> |
| | | <where> |
| | | <if test="menuName != null and menuName != ''"> |
| | |
| | | order by m.parent_id, m.order_num |
| | | </select> |
| | | |
| | | <select id="selectMenuListByUserId" parameterType="SysMenu" resultMap="SysMenuResult"> |
| | | <select id="selectMenuListByUserId" parameterType="com.ruoyi.common.core.domain.entity.SysMenu" resultMap="SysMenuResult"> |
| | | select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, ifnull(m.perms,'') as perms, |
| | | m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time, m.role_type |
| | | from sys_menu m |
| | |
| | | select count(1) from sys_menu where parent_id = #{menuId} |
| | | </select> |
| | | |
| | | <select id="checkMenuNameUnique" parameterType="SysMenu" resultMap="SysMenuResult"> |
| | | <select id="checkMenuNameUnique" parameterType="com.ruoyi.common.core.domain.entity.SysMenu" resultMap="SysMenuResult"> |
| | | <include refid="selectMenuVo"/> |
| | | where menu_name=#{menuName} and parent_id = #{parentId} limit 1 |
| | | </select> |
| | |
| | | from sys_menu |
| | | </select> |
| | | |
| | | <update id="updateMenu" parameterType="SysMenu"> |
| | | <update id="updateMenu" parameterType="com.ruoyi.common.core.domain.entity.SysMenu"> |
| | | update sys_menu |
| | | <set> |
| | | <if test="menuName != null and menuName != ''">menu_name = #{menuName},</if> |
| | |
| | | where menu_id = #{menuId} |
| | | </update> |
| | | |
| | | <insert id="insertMenu" parameterType="SysMenu"> |
| | | <insert id="insertMenu" parameterType="com.ruoyi.common.core.domain.entity.SysMenu" useGeneratedKeys="true" keyProperty="menuId"> |
| | | insert into sys_menu( |
| | | <if test="menuId != null and menuId != 0">menu_id,</if> |
| | | <if test="parentId != null and parentId != 0">parent_id,</if> |
| | |
| | | <if test="icon != null and icon != ''">icon,</if> |
| | | <if test="remark != null and remark != ''">remark,</if> |
| | | <if test="createBy != null and createBy != ''">create_by,</if> |
| | | <if test="roleType != null">role_type,</if> |
| | | create_time |
| | | )values( |
| | | <if test="menuId != null and menuId != 0">#{menuId},</if> |
| | |
| | | <if test="icon != null and icon != ''">#{icon},</if> |
| | | <if test="remark != null and remark != ''">#{remark},</if> |
| | | <if test="createBy != null and createBy != ''">#{createBy},</if> |
| | | <if test="roleType != null">#{roleType},</if> |
| | | sysdate() |
| | | ) |
| | | </insert> |
| | |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.system.mapper.SysNoticeMapper"> |
| | | |
| | | <resultMap type="SysNotice" id="SysNoticeResult"> |
| | | <resultMap type="com.ruoyi.system.domain.SysNotice" id="SysNoticeResult"> |
| | | <result property="noticeId" column="notice_id" /> |
| | | <result property="noticeTitle" column="notice_title" /> |
| | | <result property="noticeType" column="notice_type" /> |
| | |
| | | where notice_id = #{noticeId} |
| | | </select> |
| | | |
| | | <select id="selectNoticeList" parameterType="SysNotice" resultMap="SysNoticeResult"> |
| | | <select id="selectNoticeList" parameterType="com.ruoyi.system.domain.SysNotice" resultMap="SysNoticeResult"> |
| | | <include refid="selectNoticeVo"/> |
| | | <where> |
| | | <if test="noticeTitle != null and noticeTitle != ''"> |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | <insert id="insertNotice" parameterType="SysNotice"> |
| | | <insert id="insertNotice" parameterType="com.ruoyi.system.domain.SysNotice"> |
| | | insert into sys_notice ( |
| | | <if test="noticeTitle != null and noticeTitle != '' ">notice_title, </if> |
| | | <if test="noticeType != null and noticeType != '' ">notice_type, </if> |
| | |
| | | ) |
| | | </insert> |
| | | |
| | | <update id="updateNotice" parameterType="SysNotice"> |
| | | <update id="updateNotice" parameterType="com.ruoyi.system.domain.SysNotice"> |
| | | update sys_notice |
| | | <set> |
| | | <if test="noticeTitle != null and noticeTitle != ''">notice_title = #{noticeTitle}, </if> |
| | |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.system.mapper.SysOperLogMapper"> |
| | | |
| | | <resultMap type="SysOperLog" id="SysOperLogResult"> |
| | | <resultMap type="com.ruoyi.system.domain.SysOperLog" id="SysOperLogResult"> |
| | | <id property="operId" column="oper_id" /> |
| | | <result property="title" column="title" /> |
| | | <result property="businessType" column="business_type" /> |
| | |
| | | from sys_oper_log |
| | | </sql> |
| | | |
| | | <insert id="insertOperlog" parameterType="SysOperLog"> |
| | | <insert id="insertOperlog" parameterType="com.ruoyi.system.domain.SysOperLog"> |
| | | insert into sys_oper_log(title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, json_result, status, error_msg, cost_time,companyName,roleName,phonenumber,userId,nickName, oper_time) |
| | | values (#{title}, #{businessType}, #{method}, #{requestMethod}, #{operatorType}, #{operName}, #{deptName}, #{operUrl}, #{operIp}, #{operLocation}, #{operParam}, #{jsonResult}, #{status}, #{errorMsg}, #{costTime},#{companyName},#{roleName},#{phonenumber},#{userId},#{nickName}, sysdate()) |
| | | </insert> |
| | | |
| | | <select id="selectOperLogList" parameterType="SysOperLog" resultMap="SysOperLogResult"> |
| | | <select id="selectOperLogList" parameterType="com.ruoyi.system.domain.SysOperLog" resultMap="SysOperLogResult"> |
| | | <include refid="selectOperLogVo"/> |
| | | <where> |
| | | <if test="operIp != null and operIp != ''"> |
| | |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.system.mapper.SysPostMapper"> |
| | | |
| | | <resultMap type="SysPost" id="SysPostResult"> |
| | | <resultMap type="com.ruoyi.system.domain.SysPost" id="SysPostResult"> |
| | | <id property="postId" column="post_id" /> |
| | | <result property="postCode" column="post_code" /> |
| | | <result property="postName" column="post_name" /> |
| | |
| | | from sys_post |
| | | </sql> |
| | | |
| | | <select id="selectPostList" parameterType="SysPost" resultMap="SysPostResult"> |
| | | <select id="selectPostList" parameterType="com.ruoyi.system.domain.SysPost" resultMap="SysPostResult"> |
| | | <include refid="selectPostVo"/> |
| | | <where> |
| | | <if test="postCode != null and postCode != ''"> |
| | |
| | | where post_code=#{postCode} limit 1 |
| | | </select> |
| | | |
| | | <update id="updatePost" parameterType="SysPost"> |
| | | <update id="updatePost" parameterType="com.ruoyi.system.domain.SysPost"> |
| | | update sys_post |
| | | <set> |
| | | <if test="postCode != null and postCode != ''">post_code = #{postCode},</if> |
| | |
| | | where post_id = #{postId} |
| | | </update> |
| | | |
| | | <insert id="insertPost" parameterType="SysPost" useGeneratedKeys="true" keyProperty="postId"> |
| | | <insert id="insertPost" parameterType="com.ruoyi.system.domain.SysPost" useGeneratedKeys="true" keyProperty="postId"> |
| | | insert into sys_post( |
| | | <if test="postId != null and postId != 0">post_id,</if> |
| | | <if test="postCode != null and postCode != ''">post_code,</if> |
| | |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.system.mapper.SysRoleDeptMapper"> |
| | | |
| | | <resultMap type="SysRoleDept" id="SysRoleDeptResult"> |
| | | <resultMap type="com.ruoyi.system.domain.SysRoleDept" id="SysRoleDeptResult"> |
| | | <result property="roleId" column="role_id" /> |
| | | <result property="deptId" column="dept_id" /> |
| | | </resultMap> |
| | |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.system.mapper.SysRoleMapper"> |
| | | |
| | | <resultMap type="SysRole" id="SysRoleResult"> |
| | | <resultMap type="com.ruoyi.common.core.domain.entity.SysRole" id="SysRoleResult"> |
| | | <id property="roleId" column="role_id" /> |
| | | <result property="roleName" column="role_name" /> |
| | | <result property="roleKey" column="role_key" /> |
| | |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="remark" column="remark" /> |
| | | <result property="removeDays" column="removeDays" /> |
| | | <result property="postType" column="postType" /> |
| | | <result property="roleType" column="role_type" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectRoleVo"> |
| | | select distinct r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.menu_check_strictly, r.dept_check_strictly, |
| | | r.status, r.del_flag, r.create_time, r.remark,r.postType,r.removeDays |
| | | r.status, r.del_flag, r.create_time, r.remark,r.role_type AS roleType,r.removeDays |
| | | from sys_role r |
| | | left join sys_user_role ur on ur.role_id = r.role_id |
| | | left join sys_user u on u.user_id = ur.user_id |
| | | left join sys_dept d on u.dept_id = d.dept_id |
| | | </sql> |
| | | |
| | | <select id="selectRoleList" parameterType="SysRole" resultMap="SysRoleResult"> |
| | | <select id="selectRoleList" parameterType="com.ruoyi.common.core.domain.entity.SysRole" resultMap="SysRoleResult"> |
| | | <include refid="selectRoleVo"/> |
| | | where r.del_flag = '0' |
| | | <if test="roleId != null and roleId != 0"> |
| | |
| | | <select id="selectPageList" resultType="com.ruoyi.common.core.domain.entity.SysRole"> |
| | | select a.role_id AS roleId, a.role_name AS roleName, a.role_key AS roleKey, a.role_sort AS roleSort, a.data_scope AS dataScope, |
| | | a.menu_check_strictly AS menuCheckStrictly, a.dept_check_strictly AS deptCheckStrictly,a.status AS status, a.del_flag AS delFlag, |
| | | a.create_time AS createTime,a.create_by AS createBy,a.postType AS postType,a.removeDays AS removeDays, |
| | | a.create_time AS createTime,a.create_by AS createBy,a.role_type AS roleType,a.removeDays AS removeDays, |
| | | IFNULL(b.userCount,0) as userCount |
| | | from sys_role a |
| | | LEFT JOIN |
| | |
| | | <if test="query.status != null"> |
| | | AND a.status = #{query.status} |
| | | </if> |
| | | <if test="query.roleType != null"> |
| | | AND a.role_type = #{query.roleType} |
| | | </if> |
| | | AND a.del_flag = 0 |
| | | </where> |
| | | </select> |
| | |
| | | <select id="selectListByDelFlag" resultType="com.ruoyi.common.core.domain.entity.SysRole"> |
| | | select role_id AS roleId, role_name AS roleName, role_key AS roleKey, role_sort AS roleSort, data_scope AS dataScope, |
| | | menu_check_strictly AS menuCheckStrictly, dept_check_strictly AS deptCheckStrictly,status AS status, del_flag AS delFlag, |
| | | create_time AS createTime,create_by AS createBy,postType AS postType,removeDays AS removeDays |
| | | create_time AS createTime,create_by AS createBy,role_type AS roleType,removeDays AS removeDays |
| | | from sys_role where del_flag = 0 |
| | | </select> |
| | | |
| | | <select id="selectRoleByUserId" resultType="com.ruoyi.common.core.domain.entity.SysRole"> |
| | | select distinct r.role_id AS roleId, r.role_name AS roleName, r.role_key AS roleKey, r.role_sort AS roleSort, r.data_scope AS dataScope, |
| | | r.menu_check_strictly AS menuCheckStrictly, r.dept_check_strictly AS deptCheckStrictly,r.status AS status, |
| | | r.del_flag AS delFlag, r.create_time AS createTime,r.create_by AS createBy,r.postType AS postType,r.removeDays AS removeDays |
| | | r.del_flag AS delFlag, r.create_time AS createTime,r.create_by AS createBy,r.role_type AS roleType,r.removeDays AS removeDays |
| | | from sys_role r |
| | | left join sys_user_role ur on ur.role_id = r.role_id |
| | | where ur.user_id = #{userId} |
| | |
| | | </foreach> |
| | | </select> |
| | | |
| | | <insert id="insertRole" parameterType="SysRole" useGeneratedKeys="true" keyProperty="roleId"> |
| | | <insert id="insertRole" parameterType="com.ruoyi.common.core.domain.entity.SysRole" useGeneratedKeys="true" keyProperty="roleId"> |
| | | insert into sys_role( |
| | | <if test="roleId != null and roleId != 0">role_id,</if> |
| | | <if test="roleName != null and roleName != ''">role_name,</if> |
| | |
| | | <if test="remark != null and remark != ''">remark,</if> |
| | | <if test="createBy != null and createBy != ''">create_by,</if> |
| | | <if test="removeDays != null">removeDays,</if> |
| | | <if test="postType != null">postType,</if> |
| | | <if test="roleType != null">role_type,</if> |
| | | create_time |
| | | )values( |
| | | <if test="roleId != null and roleId != 0">#{roleId},</if> |
| | |
| | | <if test="remark != null and remark != ''">#{remark},</if> |
| | | <if test="createBy != null and createBy != ''">#{createBy},</if> |
| | | <if test="removeDays != null">#{removeDays},</if> |
| | | <if test="postType != null">#{postType},</if> |
| | | <if test="roleType != null">#{roleType},</if> |
| | | sysdate() |
| | | ) |
| | | </insert> |
| | | |
| | | <update id="updateRole" parameterType="SysRole"> |
| | | <update id="updateRole" parameterType="com.ruoyi.common.core.domain.entity.SysRole"> |
| | | update sys_role |
| | | <set> |
| | | <if test="roleName != null and roleName != ''">role_name = #{roleName},</if> |
| | |
| | | <if test="remark != null">remark = #{remark},</if> |
| | | <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> |
| | | <if test="removeDays != null">removeDays = #{removeDays},</if> |
| | | <if test="postType != null">postType = #{postType},</if> |
| | | <if test="roleType != null">role_type = #{roleType},</if> |
| | | update_time = sysdate() |
| | | </set> |
| | | where role_id = #{roleId} |
| | | </update> |
| | | <update id="updateStatus" parameterType="SysRole"> |
| | | <update id="updateStatus" parameterType="com.ruoyi.common.core.domain.entity.SysRole"> |
| | | update sys_role |
| | | <set> |
| | | <if test="status != null">status = #{status},</if> |
| | |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.system.mapper.SysRoleMenuMapper"> |
| | | |
| | | <resultMap type="SysRoleMenu" id="SysRoleMenuResult"> |
| | | <resultMap type="com.ruoyi.system.domain.SysRoleMenu" id="SysRoleMenuResult"> |
| | | <result property="roleId" column="role_id" /> |
| | | <result property="menuId" column="menu_id" /> |
| | | </resultMap> |
| | |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.system.mapper.SysUserMapper"> |
| | | |
| | | <resultMap type="SysUser" id="SysUserResult"> |
| | | <resultMap type="com.ruoyi.common.core.domain.entity.SysUser" id="SysUserResult"> |
| | | <id property="userId" column="user_id" /> |
| | | <result property="deptId" column="dept_id" /> |
| | | <result property="userName" column="user_name" /> |
| | |
| | | <collection property="roles" javaType="java.util.List" resultMap="RoleResult" /> |
| | | </resultMap> |
| | | |
| | | <resultMap id="deptResult" type="SysDept"> |
| | | <resultMap id="deptResult" type="com.ruoyi.common.core.domain.entity.SysDept"> |
| | | <id property="deptId" column="dept_id" /> |
| | | <result property="parentId" column="parent_id" /> |
| | | <result property="deptName" column="dept_name" /> |
| | |
| | | <result property="status" column="dept_status" /> |
| | | </resultMap> |
| | | |
| | | <resultMap id="RoleResult" type="SysRole"> |
| | | <resultMap id="RoleResult" type="com.ruoyi.common.core.domain.entity.SysRole"> |
| | | <id property="roleId" column="role_id" /> |
| | | <result property="roleName" column="role_name" /> |
| | | <result property="roleKey" column="role_key" /> |
| | |
| | | left join sys_role r on r.role_id = ur.role_id |
| | | </sql> |
| | | |
| | | <select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult"> |
| | | <select id="selectUserList" parameterType="com.ruoyi.common.core.domain.entity.SysUser" resultMap="SysUserResult"> |
| | | select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, |
| | | u.create_by, u.create_time, u.remark, d.dept_name, d.leader from sys_user u |
| | | left join sys_dept d on u.dept_id = d.dept_id |
| | |
| | | ${params.dataScope} |
| | | </select> |
| | | |
| | | <select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult"> |
| | | <select id="selectAllocatedList" parameterType="com.ruoyi.common.core.domain.entity.SysUser" resultMap="SysUserResult"> |
| | | select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time |
| | | from sys_user u |
| | | left join sys_dept d on u.dept_id = d.dept_id |
| | |
| | | ${params.dataScope} |
| | | </select> |
| | | |
| | | <select id="selectUnallocatedList" parameterType="SysUser" resultMap="SysUserResult"> |
| | | <select id="selectUnallocatedList" parameterType="com.ruoyi.common.core.domain.entity.SysUser" resultMap="SysUserResult"> |
| | | select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time |
| | | from sys_user u |
| | | left join sys_dept d on u.dept_id = d.dept_id |
| | |
| | | left join sys_user_role ur on u.user_id = ur.user_id |
| | | left join sys_role r on r.role_id = ur.role_id |
| | | WHERE u.del_flag = 0 |
| | | <if test="query.nickNameOrPhone != null and query.nickNameOrPhone != ''"> |
| | | AND (u.nick_name LIKE concat('%',#{query.nickNameOrPhone},'%') |
| | | OR u.phonenumber LIKE concat('%',#{query.nickNameOrPhone},'%')) |
| | | <if test="query.nickName != null and query.nickName != ''"> |
| | | AND u.nick_name LIKE concat('%',#{query.nickName},'%') |
| | | </if> |
| | | <if test="query.status != null and query.status != ''"> |
| | | AND u.status = #{query.status} |
| | | </if> |
| | | <if test="query.phonenumber != null and query.phonenumber != ''"> |
| | | AND u.phonenumber LIKE concat('%',#{query.phonenumber},'%') |
| | | </if> |
| | | <if test="query.roleType != null"> |
| | | AND u.role_type = #{query.roleType} |
| | | </if> |
| | | <if test="query.deptIds != null and query.deptIds.size()>0"> |
| | | AND u.user_id IN (select DISTINCT user_id from t_dept_to_user where dept_id IN |
| | |
| | | select user_id from sys_user where phonenumber = #{phonenumber} and status = 0 and del_flag = 0 |
| | | </select> |
| | | |
| | | <insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId"> |
| | | <insert id="insertUser" parameterType="com.ruoyi.common.core.domain.entity.SysUser" useGeneratedKeys="true" keyProperty="userId"> |
| | | insert into sys_user( |
| | | <if test="userId != null and userId != 0">user_id,</if> |
| | | <if test="deptId != null and deptId != 0">dept_id,</if> |
| | |
| | | <if test="remark != null and remark != ''">remark,</if> |
| | | <if test="ifBlack != null">ifBlack,</if> |
| | | <if test="districtId != null">districtId,</if> |
| | | <if test="roleType != null">role_type,</if> |
| | | create_time |
| | | )values( |
| | | <if test="userId != null and userId != ''">#{userId},</if> |
| | | <if test="deptId != null and deptId != ''">#{deptId},</if> |
| | | <if test="userName != null and userName != ''">#{userName},</if> |
| | | <if test="deptName != null and deptName != ''">#{deptName},</if> |
| | | |
| | | <if test="nickName != null and nickName != ''">#{nickName},</if> |
| | | <if test="deptName != null and deptName != ''">#{deptName},</if> |
| | | <if test="nickName != null and nickName != ''">#{nickName},</if> |
| | | <if test="email != null and email != ''">#{email},</if> |
| | | <if test="avatar != null and avatar != ''">#{avatar},</if> |
| | | <if test="phonenumber != null and phonenumber != ''">#{phonenumber},</if> |
| | | <if test="sex != null and sex != ''">#{sex},</if> |
| | | <if test="sex != null and sex != ''">#{sex},</if> |
| | | <if test="password != null and password != ''">#{password},</if> |
| | | <if test="status != null and status != ''">#{status},</if> |
| | | <if test="createBy != null and createBy != ''">#{createBy},</if> |
| | | <if test="remark != null and remark != ''">#{remark},</if> |
| | | <if test="ifBlack != null">#{ifBlack},</if> |
| | | <if test="districtId != null">#{districtId},</if> |
| | | <if test="roleType != null">#{roleType},</if> |
| | | sysdate() |
| | | ) |
| | | </insert> |
| | | |
| | | <update id="updateUser" parameterType="SysUser"> |
| | | <update id="updateUser" parameterType="com.ruoyi.common.core.domain.entity.SysUser"> |
| | | update sys_user |
| | | <set> |
| | | <if test="deptId != null and deptId != 0">dept_id = #{deptId},</if> |
| | |
| | | where user_id = #{userId} |
| | | </update> |
| | | |
| | | <update id="updateUserStatus" parameterType="SysUser"> |
| | | <update id="updateUserStatus" parameterType="com.ruoyi.common.core.domain.entity.SysUser"> |
| | | update sys_user set status = #{status} where user_id = #{userId} |
| | | </update> |
| | | |
| | | <update id="updateUserAvatar" parameterType="SysUser"> |
| | | <update id="updateUserAvatar" parameterType="com.ruoyi.common.core.domain.entity.SysUser"> |
| | | update sys_user set avatar = #{avatar} where user_name = #{userName} |
| | | </update> |
| | | |
| | | <update id="resetUserPwd" parameterType="SysUser"> |
| | | <update id="resetUserPwd" parameterType="com.ruoyi.common.core.domain.entity.SysUser"> |
| | | update sys_user set password = #{password} where user_name = #{userName} |
| | | </update> |
| | | <update id="updateUserIfBlack"> |
| | |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.system.mapper.SysUserPostMapper"> |
| | | |
| | | <resultMap type="SysUserPost" id="SysUserPostResult"> |
| | | <resultMap type="com.ruoyi.system.domain.SysUserPost" id="SysUserPostResult"> |
| | | <result property="userId" column="user_id" /> |
| | | <result property="postId" column="post_id" /> |
| | | </resultMap> |
| | |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.system.mapper.SysUserRoleMapper"> |
| | | |
| | | <resultMap type="SysUserRole" id="SysUserRoleResult"> |
| | | <resultMap type="com.ruoyi.system.domain.SysUserRole" id="SysUserRoleResult"> |
| | | <result property="userId" column="user_id" /> |
| | | <result property="roleId" column="role_id" /> |
| | | </resultMap> |
| | |
| | | </foreach> |
| | | </insert> |
| | | |
| | | <delete id="deleteUserRoleInfo" parameterType="SysUserRole"> |
| | | <delete id="deleteUserRoleInfo" parameterType="com.ruoyi.system.domain.SysUserRole"> |
| | | delete from sys_user_role where user_id=#{userId} and role_id=#{roleId} |
| | | </delete> |
| | | |
| | |
| | | <sql id="Base_Column_List"> |
| | | id, activity_name, show_type, activity_introduction, activity_cover, activity_detail, status, sort_by, click_count, create_time, update_time, create_by, update_by, disabled |
| | | </sql> |
| | | <select id="pageList" resultType="com.ruoyi.system.model.TSysActivity"> |
| | | SELECT |
| | | <include refid="Base_Column_List"/> |
| | | FROM t_sys_activity |
| | | <where> |
| | | <if test="query.activityName != null and query.activityName != ''"> |
| | | AND activity_name LIKE concat('%',#{query.activityName},'%') |
| | | </if> |
| | | <if test="query.showType != null"> |
| | | AND show_type = #{query.showType} |
| | | </if> |
| | | <if test="query.status != null"> |
| | | AND status = #{query.status} |
| | | </if> |
| | | <if test="roleType != null and query.roleType == 5"> |
| | | AND show_type in (2,3) |
| | | </if> |
| | | AND disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY create_time DESC |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <sql id="Base_Column_List"> |
| | | id, info_title, show_type, info_cover, info_content, status, sort_by, click_count, create_time, update_time, create_by, update_by, disabled |
| | | </sql> |
| | | <select id="pageList" resultType="com.ruoyi.system.model.TSysEducationalInfo"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from t_sys_educational_info |
| | | <where> |
| | | <if test="query.infoTitle != null and query.infoTitle != ''"> |
| | | and info_title like concat('%',#{query.infoTitle},'%') |
| | | </if> |
| | | <if test="query.showType != null"> |
| | | and show_type = #{query.showType} |
| | | </if> |
| | | <if test="query.status != null"> |
| | | and status = #{query.status} |
| | | </if> |
| | | <if test="query.roleType != null and query.roleType == 5"> |
| | | and show_type in (2,3) |
| | | </if> |
| | | AND disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY create_time DESC |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <result column="live_cover" property="liveCover" /> |
| | | <result column="live_introduction" property="liveIntroduction" /> |
| | | <result column="start_time" property="startTime" /> |
| | | <result column="end_time" property="endTime" /> |
| | | <result column="expected_duration" property="expectedDuration" /> |
| | | <result column="live_way" property="liveWay" /> |
| | | <result column="live_mode" property="liveMode" /> |
| | |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, live_title, live_cover, live_introduction, start_time, expected_duration, live_way, live_mode, live_lecturer, live_type, password, live_detail, push_type, create_time, update_time, create_by, update_by, disabled |
| | | id, live_title, live_cover, live_introduction, start_time,end_time, expected_duration, live_way, live_mode, |
| | | live_lecturer, live_type, password, live_detail, push_type, create_time, update_time, create_by, update_by, disabled |
| | | </sql> |
| | | <select id="pageList" resultType="com.ruoyi.system.vo.TSysLiveVO"> |
| | | SELECT |
| | | <include refid="Base_Column_List"/> |
| | | FROM t_sys_live |
| | | <where> |
| | | <if test="query.liveTitle != null and query.liveTitle != ''"> |
| | | AND live_title LIKE concat('%',#{query.liveTitle},'%') |
| | | </if> |
| | | <if test="query.liveStatus != null and query.liveStatus == 1"> |
| | | AND date_format(start_time,'%y%m%d %H%i%s') > date_format(NOW(),'%y%m%d %H%i%s') |
| | | </if> |
| | | <if test="query.liveStatus != null and query.liveStatus == 2"> |
| | | AND date_format(start_time,'%y%m%d %H%i%s') <= date_format(NOW(),'%y%m%d %H%i%s') |
| | | AND date_format(end_time,'%y%m%d %H%i%s') >= date_format(NOW(),'%y%m%d %H%i%s') |
| | | </if> |
| | | <if test="query.liveStatus != null and query.liveStatus == 3"> |
| | | AND date_format(end_time,'%y%m%d %H%i%s') < date_format(NOW(),'%y%m%d %H%i%s') |
| | | </if> |
| | | AND disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY create_time DESC |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <sql id="Base_Column_List"> |
| | | id, product_name, show_type, product_introduction, product_cover, product_detail, status, sort_by, click_count, create_time, update_time, create_by, update_by, disabled |
| | | </sql> |
| | | <select id="pageList" resultType="com.ruoyi.system.model.TSysProductIntroduction"> |
| | | SELECT |
| | | <include refid="Base_Column_List"/> |
| | | FROM t_sys_product_introduction |
| | | <where> |
| | | <if test="query.productName != null and query.productName != ''"> |
| | | AND product_name LIKE concat('%',#{query.productName},'%') |
| | | </if> |
| | | <if test="query.showType != null"> |
| | | AND show_type = #{query.showType} |
| | | </if> |
| | | <if test="query.status != null"> |
| | | AND status = #{query.status} |
| | | </if> |
| | | <if test="query.roleType != null and query.roleType == 5"> |
| | | AND show_type in (2,3) |
| | | </if> |
| | | AND disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY create_time DESC |
| | | </select> |
| | | |
| | | </mapper> |