已添加15个文件
已删除1个文件
已修改13个文件
| | |
| | | # å¼åç¯å¢é
ç½® |
| | | NODE_ENV = 'development' |
| | | VUE_APP_API_URL = 'http://192.168.0.109:10010' |
| | |
| | | # ç产ç¯å¢é
ç½® |
| | | NODE_ENV = 'production' |
| | | |
| | | VUE_APP_API_URL = 'http://192.168.0.109:10010' |
¶Ô±ÈÐÂÎļþ |
| | |
| | | # æµè¯ç¯å¢é
ç½® |
| | | NODE_ENV = 'production' |
| | | |
| | | VUE_APP_API_URL = 'http://192.168.0.109:10010' |
| | |
| | | "private": true, |
| | | "scripts": { |
| | | "serve": "vue-cli-service serve", |
| | | "build": "vue-cli-service build", |
| | | "build:staging": "vue-cli-service build --mode staging", |
| | | "build": "vue-cli-service build --mode production", |
| | | "build:staging": "vue-cli-service build --mode test", |
| | | "lint": "vue-cli-service lint", |
| | | "fix": "eslint --ext .js,.vue src --fix" |
| | | }, |
| | |
| | | |
| | | // è·åå¾çéªè¯ç |
| | | export function getCaptcha () { |
| | | return request.get('/common/captcha') |
| | | return request.get('/captcha') |
| | | } |
| | | |
| | | // æ ¹æ®å¯ç ç»å½ |
| | | export function loginByPassword (data) { |
| | | return request.post('/system/login', data) |
| | | return request.post('/login', data) |
| | | } |
| | | |
| | | // è·åå·²ç»å½çç¨æ·ä¿¡æ¯ |
| | | export function getUserInfo () { |
| | | return request.get('/getUserInfo', { |
| | | autoLogin: false |
| | | }) |
| | | } |
| | | |
| | | // ç»åº |
| | | export function logout (data) { |
| | | return request.post('/system/logout', data) |
| | | return request.post('/logout', data) |
| | | } |
| | | |
| | | // ä¿®æ¹å¯ç |
| | | export function updatePwd (data) { |
| | | return request.post('/system/updatePwd', data) |
| | | } |
| | | |
| | | // è·åå·²ç»å½çç¨æ·ä¿¡æ¯ |
| | | export function getUserInfo () { |
| | | return request.get('/system/getUserInfo', { |
| | | autoLogin: false |
| | | }) |
| | | } |
| | | |
| | | // 访客æ¥è®¿é
ç½® |
| | |
| | | |
| | | // æ¥è¯¢èåæ |
| | | export function fetchMenuTree () { |
| | | return request.get('/system/menu/treeNodes') |
| | | return request.get('/visitsAdmin/system/menu/treeNodes') |
| | | } |
| | | |
| | | // æåº |
| | | export function sort (data) { |
| | | return request.post('/system/menu/updateSort', data) |
| | | return request.post('/visitsAdmin/system/menu/updateSort', data) |
| | | } |
| | |
| | | // 设置æä½å¹³å° |
| | | config.headers['eva-platform'] = `pc-${pkg.version}` |
| | | // 设置认è¯å¤´ |
| | | const authToken = Cookies.get('eva-auth-token') |
| | | const authToken = Cookies.get('dm_user_token') |
| | | if (authToken != null) { |
| | | config.headers['eva-auth-token'] = authToken |
| | | config.headers['dm_user_token'] = authToken |
| | | } |
| | | return config |
| | | }, function (error) { |
| | |
| | | // æªç»å½ |
| | | if (response.data.code === 401) { |
| | | if (response.config.autoLogin !== false) { |
| | | window.location.href = process.env.VUE_APP_ROUTER_MODE === 'history' ? '/#/login' : '/login' |
| | | Cookies.set('dm_user_token','') |
| | | window.location.href = process.env.VUE_APP_ROUTER_MODE === 'hash' ? (process.env.VUE_APP_CONTEXT_PATH +'/#/login') : (process.env.VUE_APP_CONTEXT_PATH+'/login') |
| | | } |
| | | return Promise.reject(response.data) |
| | | } |
| | |
| | | <script> |
| | | import { mapMutations } from 'vuex' |
| | | import { getCaptcha, loginByPassword } from '@/api/system/common' |
| | | import Cookies from "js-cookie"; |
| | | |
| | | export default { |
| | | name: 'Login', |
| | |
| | | code: this.captcha.value.trim(), |
| | | uuid: this.captcha.uuid |
| | | }) |
| | | .then(() => { |
| | | .then((res) => { |
| | | // window.location.href = process.env.VUE_APP_CONTEXT_PATH |
| | | Cookies.set('dm_user_token',res) |
| | | window.location.reload() |
| | | }) |
| | | .catch(e => { |
| | |
| | | port: 10012, |
| | | proxy: { |
| | | [process.env.VUE_APP_API_PREFIX]: { |
| | | // http://192.168.0.134:10028 任康 |
| | | // http://192.168.0.110:10013 ç£ç£ |
| | | // http://192.168.0.132:10013 å¸
å¥ |
| | | // http://192.168.0.176:10028 èå§ |
| | | // http://192.168.0.186:10028 任康 |
| | | // https://dmtest.ahapp.net/admin_api æµè¯æ |
| | | // http://10.10.99.63/admin_interface/ ææ°æµè¯æï¼å
ç½ï¼ |
| | | // http://218.23.218.228:8018/admin_interface ææ°æµè¯æï¼å¤ç½ï¼ |
| | | // target: 'http://218.23.218.228:8018/admin_interface', |
| | | // http://218.23.218.228:9912/admin_interface |
| | | // http://facepay.huasunsolar.com/admin_interface |
| | | target: 'http://facepay.huasunsolar.com/admin_interface', |
| | | target: process.env.VUE_APP_API_URL, |
| | | changeOrigin: true, |
| | | pathRewrite: { |
| | | [`^${[process.env.VUE_APP_API_PREFIX]}`]: '' |
| | |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.system.dto.LoginDTO; |
| | | import com.doumee.service.common.CaptchaService; |
| | | import com.doumee.service.system.SystemLoginService; |
| | | import com.doumee.service.system.SystemUserService; |
| | | import io.swagger.annotations.Api; |
| | |
| | | |
| | | @Autowired |
| | | private SystemLoginService systemLoginService; |
| | | @Autowired |
| | | private CaptchaService captchaService; |
| | | |
| | | /** |
| | | * @author Eva.Caesar Liu |
| | | * @date 2023/03/21 14:49 |
| | | */ |
| | | @ApiOperation("è·åå¾çéªè¯ç ") |
| | | @GetMapping("/captcha") |
| | | public ApiResponse<CaptchaService.Captcha> getCaptcha() { |
| | | return ApiResponse.success(captchaService.genCaptcha()); |
| | | } |
| | | |
| | | @PreventRepeat(limit = 10, lockTime = 10000) |
| | | @ApiOperation("ç»å½") |
| | |
| | | */ |
| | | @PostMapping("/refreshtoken") |
| | | @ApiOperation("å·æ°token") |
| | | public ApiResponse<String> refreshtoken(@RequestHeader("userToken") String oldToken){ |
| | | public ApiResponse<String> refreshtoken(@RequestHeader(Constants.HEADER_USER_TOKEN) String oldToken){ |
| | | try { |
| | | if(!jwtTokenUtil.isTokenExpired(oldToken)){ |
| | | return ApiResponse.success(jwtTokenUtil.refreshToken(oldToken)); |
| | |
| | | } |
| | | |
| | | } |
| | | /** |
| | | * å·æ°JWT令ç,ç¨æ§çä»¤çæ¢æ°ç令ç |
| | | */ |
| | | @PostMapping("/logout") |
| | | @ApiOperation("éåºç»é") |
| | | public ApiResponse<String> logout(@RequestHeader(Constants.HEADER_USER_TOKEN) String oldToken){ |
| | | try { |
| | | jwtTokenUtil.logout(oldToken); |
| | | }catch (BusinessException e){ |
| | | return ApiResponse.failed(e.getCode(),e.getMessage()); |
| | | }catch (Exception e){ |
| | | return ApiResponse.failed(ResponseStatus.SERVER_ERROR); |
| | | } |
| | | return ApiResponse.success(null); |
| | | |
| | | } |
| | | |
| | | /** |
| | | * å·æ°JWT令ç,ç¨æ§çä»¤çæ¢æ°ç令ç |
| | |
| | | } |
| | | return refreshedToken; |
| | | } |
| | | /** |
| | | * éåºç»é |
| | | * |
| | | * @param token å令ç |
| | | * @return æ°ä»¤ç |
| | | */ |
| | | public void logout(String token) { |
| | | try { |
| | | redisTemplate.delete(Constants.REDIS_TOKEN_KEY+token);//å é¤èçtoken |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * éªè¯ä»¤ç |
| | |
| | | - /meetingAdmin/** |
| | | - /visitsAdmin/** |
| | | - /login |
| | | - /captcha |
| | | - /doc.html |
| | | - /v2/api-docs/** |
| | | - /**.js |
| | |
| | | package com.doumee.api; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.utils.Constants; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.web.context.request.RequestContextHolder; |
| | | import org.springframework.web.context.request.ServletRequestAttributes; |
| | | |
| | |
| | | @Slf4j |
| | | public class BaseController { |
| | | |
| | | @Autowired |
| | | private RedisTemplate<String,Object> stringRedisTemplate; |
| | | /** |
| | | * è·åå½åç»å½ç¨æ· |
| | | * @author Eva.Caesar Liu |
| | |
| | | protected LoginUserInfo getLoginUser () { |
| | | return (LoginUserInfo)SecurityUtils.getSubject().getPrincipal(); |
| | | } |
| | | /** |
| | | * è·åå½åç»å½ç¨æ· |
| | | * @author Eva.Caesar Liu |
| | | * @date 2023/03/21 14:49 |
| | | */ |
| | | protected LoginUserInfo getLoginUser (String token) { |
| | | if (token == null || token.isEmpty()) { |
| | | throw new BusinessException(ResponseStatus.NO_LOGIN.getCode(),"æªç»å½"); |
| | | } |
| | | String userinfo =(String) stringRedisTemplate.opsForValue().get(Constants.REDIS_TOKEN_KEY + token); |
| | | if (StringUtils.isBlank(userinfo)) { |
| | | throw new BusinessException(ResponseStatus.NO_LOGIN.getCode(),"æªç»å½"); |
| | | } |
| | | LoginUserInfo user = JSONObject.toJavaObject(JSONObject.parseObject(userinfo),LoginUserInfo.class ); |
| | | if(user ==null ){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"ç¨æ·ç»é已失æï¼è¯·éæ°ç»éï¼"); |
| | | } |
| | | return user; |
| | | } |
| | | |
| | | |
| | | /** |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.cloud; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.system.model.Notices; |
| | | import com.doumee.service.system.NoticesService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/01/16 10:03 |
| | | */ |
| | | @Api(tags = "ç³»ç»æ¶æ¯ä¿¡æ¯è¡¨") |
| | | @RestController |
| | | @RequestMapping("/cloudService/business/notices") |
| | | public class NoticesController extends BaseController { |
| | | |
| | | @Autowired |
| | | private NoticesService noticesService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:notices:create") |
| | | public ApiResponse create(@RequestBody Notices notices) { |
| | | return ApiResponse.success(noticesService.create(notices)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:notices:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | noticesService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:notices:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | noticesService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:notices:update") |
| | | public ApiResponse updateById(@RequestBody Notices notices) { |
| | | noticesService.updateById(notices); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:notices:query") |
| | | public ApiResponse<PageData<Notices>> findPage (@RequestBody PageWrap<Notices> pageWrap) { |
| | | pageWrap.getModel().setPalt(Constants.ZERO); |
| | | return ApiResponse.success(noticesService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:notices:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<Notices> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(Notices.class).export(noticesService.findPage(pageWrap).getRecords(), "ç³»ç»æ¶æ¯ä¿¡æ¯è¡¨", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:notices:query") |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(noticesService.findById(id)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.cloud; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.biz.system.SystemUserBiz; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.annotation.trace.Trace; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.system.dto.LoginDTO; |
| | | import com.doumee.dao.system.dto.UpdatePwdDto; |
| | | import com.doumee.service.system.SystemLoginService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.apache.shiro.subject.Subject; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | | /** |
| | | * @author Eva.Caesar Liu |
| | | * @date 2023/03/21 14:49 |
| | | */ |
| | | @Api(tags = "ç³»ç»åè½") |
| | | @Trace(exclude = true) |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/cloudService/system") |
| | | public class SystemController extends BaseController { |
| | | |
| | | @Autowired |
| | | private SystemUserBiz systemUserBiz; |
| | | |
| | | @Autowired |
| | | private SystemLoginService systemLoginService; |
| | | |
| | | @Trace(withRequestParameters = false) |
| | | @ApiOperation("ä¿®æ¹å½åç¨æ·å¯ç ") |
| | | @PostMapping("/updatePwd") |
| | | public ApiResponse updatePwd (@RequestHeader(Constants.HEADER_USER_TOKEN) String token, @Validated @RequestBody UpdatePwdDto dto) { |
| | | dto.setUserId(this.getLoginUser(token).getId()); |
| | | systemUserBiz.updatePwd(dto); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.cloud; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.biz.system.SystemDataPermissionBiz; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.annotation.trace.Trace; |
| | | import com.doumee.core.constants.DataPermissionConstants; |
| | | import com.doumee.core.constants.OperaType; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.system.model.SystemDataPermission; |
| | | import com.doumee.dao.system.vo.SystemDataPermissionListVO; |
| | | import com.doumee.service.system.SystemDataPermissionService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author Eva.Caesar Liu |
| | | * @date 2023/03/21 14:49 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/cloudService/system/dataPermission") |
| | | @Api(tags = "ç³»ç»æ°æ®æé") |
| | | public class SystemDataPermissionController extends BaseController { |
| | | |
| | | @Autowired |
| | | private SystemDataPermissionService systemDataPermissionService; |
| | | |
| | | @Autowired |
| | | private SystemDataPermissionBiz systemDataPermissionBiz; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("system:datapermission:create") |
| | | public ApiResponse create(@RequestHeader(Constants.HEADER_USER_TOKEN) String token, @Validated(OperaType.Create.class) @RequestBody SystemDataPermission systemDataPermission) { |
| | | systemDataPermission.setCreateUser(this.getLoginUser(token).getId()); |
| | | return ApiResponse.success(systemDataPermissionBiz.create(systemDataPermission)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("system:datapermission:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | systemDataPermissionService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("system:datapermission:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | systemDataPermissionService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("ä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("system:datapermission:update") |
| | | public ApiResponse updateById(@RequestHeader(Constants.HEADER_USER_TOKEN) String token,@Validated(OperaType.Update.class) @RequestBody SystemDataPermission systemDataPermission) { |
| | | systemDataPermission.setCreateUser(this.getLoginUser(token).getId()); |
| | | systemDataPermissionBiz.update(systemDataPermission); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("ä¿®æ¹ç¶æ") |
| | | @PostMapping("/updateStatus") |
| | | @RequiresPermissions("system:datapermission:update") |
| | | public ApiResponse updateStatus(@RequestHeader(Constants.HEADER_USER_TOKEN) String token,@Validated(OperaType.UpdateStatus.class) @RequestBody SystemDataPermission systemDataPermission) { |
| | | systemDataPermission.setCreateUser(this.getLoginUser(token).getId()); |
| | | systemDataPermissionBiz.updateStatus(systemDataPermission); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("system:datapermission:query") |
| | | public ApiResponse<PageData<SystemDataPermissionListVO>> findPage (@RequestHeader(Constants.HEADER_USER_TOKEN) String token,@RequestBody PageWrap<SystemDataPermission> pageWrap) { |
| | | return ApiResponse.success(systemDataPermissionService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @Trace(exclude = true) |
| | | @ApiOperation("æ¥è¯¢æ°æ®æéç±»å") |
| | | @GetMapping("/types") |
| | | public ApiResponse<List<Map<String, Object>>> findTypes (@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(DataPermissionConstants.Type.valueList()); |
| | | } |
| | | @Trace(exclude = true) |
| | | @ApiOperation("æ¥è¯¢æ°æ®æé模å") |
| | | @GetMapping("/modules") |
| | | public ApiResponse<List<Map<String, Object>>> findModules (@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(DataPermissionConstants.Module.valueList()); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.cloud; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.biz.system.SystemDepartmentBiz; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.annotation.trace.Trace; |
| | | import com.doumee.core.constants.OperaType; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.system.dto.QuerySystemUserDTO; |
| | | import com.doumee.dao.system.model.SystemDepartment; |
| | | import com.doumee.dao.system.vo.SystemDepartmentListVO; |
| | | import com.doumee.dao.system.vo.SystemUserListVO; |
| | | import com.doumee.service.system.SystemUserService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author Eva.Caesar Liu |
| | | * @date 2023/03/21 14:49 |
| | | */ |
| | | @Api(tags = "é¨é¨") |
| | | @RestController |
| | | @RequestMapping("/cloudService/system/department") |
| | | public class SystemDepartmentController extends BaseController { |
| | | |
| | | @Autowired |
| | | private SystemDepartmentBiz systemDepartmentBiz; |
| | | |
| | | @Autowired |
| | | private SystemUserService systemUserService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("system:department:create") |
| | | public ApiResponse create(@RequestHeader(Constants.HEADER_USER_TOKEN) String token,@Validated(OperaType.Create.class) @RequestBody SystemDepartment systemDepartment) { |
| | | systemDepartment.setCreateUser(getLoginUser().getId()); |
| | | systemDepartment.setUpdateUser(getLoginUser().getId()); |
| | | return ApiResponse.success(systemDepartmentBiz.create(systemDepartment)); |
| | | } |
| | | |
| | | @ApiOperation("å é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("system:department:delete") |
| | | public ApiResponse deleteById(@RequestHeader(Constants.HEADER_USER_TOKEN) String token,@PathVariable Integer id) { |
| | | systemDepartmentBiz.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @PreventRepeat |
| | | @RequiresPermissions("system:department:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestHeader(Constants.HEADER_USER_TOKEN) String token,@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | systemDepartmentBiz.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("ä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("system:department:update") |
| | | public ApiResponse updateById(@RequestHeader(Constants.HEADER_USER_TOKEN) String token,@Validated(OperaType.Update.class) @RequestBody SystemDepartment systemDepartment) { |
| | | systemDepartment.setCreateUser(getLoginUser().getId()); |
| | | systemDepartment.setUpdateUser(getLoginUser().getId()); |
| | | systemDepartmentBiz.updateById(systemDepartment); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¥è¯¢é¨é¨å表") |
| | | @PostMapping("/tree") |
| | | @RequiresPermissions("system:department:query") |
| | | public ApiResponse<List<SystemDepartmentListVO>> findTree (@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(systemDepartmentBiz.findTree()); |
| | | } |
| | | |
| | | @ApiOperation("æ¥è¯¢é¨é¨å表åé¨é¨ä¸ç人å") |
| | | @GetMapping("/findTreeUser") |
| | | @RequiresPermissions("system:department:query") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "parentId", value = "parentId", paramType = "query", dataType = "Integer"), |
| | | }) |
| | | public ApiResponse<SystemDepartmentListVO> findTreeUser(@RequestHeader(Constants.HEADER_USER_TOKEN) String token,Integer parentId) { |
| | | return ApiResponse.success(systemDepartmentBiz.findTreeUser(parentId)); |
| | | } |
| | | |
| | | @Trace(exclude = true) |
| | | @ApiOperation("æ¥è¯¢é¨é¨äººå") |
| | | @PostMapping("/users") |
| | | @RequiresPermissions("system:department:queryUsers") |
| | | public ApiResponse<PageData<SystemUserListVO>> findPage (@RequestHeader(Constants.HEADER_USER_TOKEN) String token,@RequestBody PageWrap<QuerySystemUserDTO> pageWrap) { |
| | | return ApiResponse.success(systemUserService.findPage(pageWrap)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.cloud; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.biz.system.SystemDictBiz; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.constants.OperaType; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.system.dto.QuerySystemDictDTO; |
| | | import com.doumee.dao.system.model.SystemDict; |
| | | import com.doumee.dao.system.vo.SystemDictListVO; |
| | | import com.doumee.service.system.SystemDictService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author Eva.Caesar Liu |
| | | * @date 2023/03/21 14:49 |
| | | */ |
| | | @Api(tags = "ç³»ç»åå
¸") |
| | | @RestController |
| | | @RequestMapping("/cloudService/system/dict") |
| | | public class SystemDictController extends BaseController { |
| | | |
| | | @Autowired |
| | | private SystemDictService systemDictService; |
| | | |
| | | @Autowired |
| | | private SystemDictBiz systemDictBiz; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("system:dict:create") |
| | | public ApiResponse create(@RequestHeader(Constants.HEADER_USER_TOKEN) String token, @Validated(OperaType.Create.class) @RequestBody SystemDict systemDict) { |
| | | return ApiResponse.success(systemDictBiz.create(systemDict)); |
| | | } |
| | | |
| | | @ApiOperation("å é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("system:dict:delete") |
| | | public ApiResponse deleteById(@RequestHeader(Constants.HEADER_USER_TOKEN) String token,@PathVariable Integer id) { |
| | | systemDictService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("system:dict:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestHeader(Constants.HEADER_USER_TOKEN) String token,@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | systemDictService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("ä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("system:dict:update") |
| | | public ApiResponse updateById(@RequestHeader(Constants.HEADER_USER_TOKEN) String token,@Validated(OperaType.Update.class) @RequestBody SystemDict systemDict) { |
| | | systemDictBiz.updateById(systemDict); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("system:dict:query") |
| | | public ApiResponse<PageData<SystemDictListVO>> findPage (@RequestHeader(Constants.HEADER_USER_TOKEN) String token,@RequestBody PageWrap<QuerySystemDictDTO> pageWrap) { |
| | | return ApiResponse.success(systemDictService.findPage(pageWrap)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.cloud; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.constants.OperaType; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.system.dto.QuerySystemDictDataDTO; |
| | | import com.doumee.dao.system.model.SystemDictData; |
| | | import com.doumee.dao.system.vo.SystemDictDataListVO; |
| | | import com.doumee.service.system.SystemDictDataService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author Eva.Caesar Liu |
| | | * @date 2023/03/21 14:49 |
| | | */ |
| | | @Api(tags = "åå
¸æ°æ®") |
| | | @RestController |
| | | @RequestMapping("/cloudService/system/dictData") |
| | | public class SystemDictDataController extends BaseController { |
| | | |
| | | @Autowired |
| | | private SystemDictDataService systemDictDataService; |
| | | |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("system:dict:update") |
| | | public ApiResponse create(@RequestHeader(Constants.HEADER_USER_TOKEN) String token, @Validated(OperaType.Create.class) @RequestBody SystemDictData systemDictData) { |
| | | return ApiResponse.success(systemDictDataBiz.create(systemDictData)); |
| | | } |
| | | |
| | | @ApiOperation("å é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("system:dict:update") |
| | | public ApiResponse deleteById(@RequestHeader(Constants.HEADER_USER_TOKEN) String token,@PathVariable Integer id) { |
| | | systemDictDataService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("system:dict:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestHeader(Constants.HEADER_USER_TOKEN) String token,@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | systemDictDataService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("ä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("system:dict:update") |
| | | public ApiResponse updateById(@RequestHeader(Constants.HEADER_USER_TOKEN) String token,@Validated(OperaType.Update.class) @RequestBody SystemDictData systemDictData) { |
| | | systemDictDataBiz.updateById(systemDictData); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("system:dict:update") |
| | | public ApiResponse<PageData<SystemDictDataListVO>> findPage (@RequestHeader(Constants.HEADER_USER_TOKEN) String token,@RequestBody PageWrap<QuerySystemDictDataDTO> pageWrap) { |
| | | return ApiResponse.success(systemDictDataService.findPage(pageWrap)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "æ¥è¯¢åå
¸å¼æ°æ®" ) |
| | | @GetMapping("/getSystemDictData") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", dataType = "String", name = "label", value = "æ°æ®åå
¸å¼H5_LINK_ADDR", required = true), |
| | | @ApiImplicitParam(paramType = "query", dataType = "String", name = "dictCode", value = "ç³»ç»åå
¸å¼SYSTEM", required = true) |
| | | }) |
| | | public ApiResponse<SystemDictData> getSystemDictData(@RequestHeader(Constants.HEADER_USER_TOKEN) String token,@RequestParam String dictCode, @RequestParam String label) { |
| | | return ApiResponse.success(systemDictDataBiz.queryByCode(dictCode,label)); |
| | | } |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.cloud; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.system.dto.QuerySystemLoginLogDTO; |
| | | import com.doumee.dao.system.model.SystemLoginLog; |
| | | import com.doumee.service.system.SystemLoginLogService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * @author Eva.Caesar Liu |
| | | * @date 2023/03/21 14:49 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/cloudService/system/loginLog") |
| | | @Api(tags = "ç»å½æ¥å¿") |
| | | public class SystemLoginLogController extends BaseController { |
| | | |
| | | @Autowired |
| | | private SystemLoginLogService systemLoginLogService; |
| | | |
| | | @PostMapping("/page") |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @RequiresPermissions("system:loginLog:query") |
| | | public ApiResponse<PageData<SystemLoginLog>> findPage (@RequestBody PageWrap<QuerySystemLoginLogDTO> pageWrap) { |
| | | return ApiResponse.success(systemLoginLogService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @PostMapping("/exportExcel") |
| | | @ApiOperation("导åºExcel") |
| | | @RequiresPermissions("system:loginLog:query") |
| | | public void export (@RequestBody PageWrap<QuerySystemLoginLogDTO> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(SystemLoginLog.class).export(systemLoginLogService.findPage(pageWrap).getRecords(), "ç»å½æ¥å¿", response); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.cloud; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.biz.system.SystemMenuBiz; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.constants.OperaType; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.system.dto.UpdateSystemMenuSortDTO; |
| | | import com.doumee.dao.system.model.SystemMenu; |
| | | import com.doumee.dao.system.vo.SystemMenuListVO; |
| | | import com.doumee.dao.system.vo.SystemMenuNodeVO; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author Eva.Caesar Liu |
| | | * @date 2023/03/21 14:49 |
| | | */ |
| | | @Api(tags = "ç³»ç»èå") |
| | | @RestController |
| | | @RequestMapping("/cloudService/system/menu") |
| | | public class SystemMenuController extends BaseController { |
| | | |
| | | @Autowired |
| | | private SystemMenuBiz systemMenuBiz; |
| | | |
| | | @ApiOperation("èåæåº") |
| | | @PostMapping("/updateSort") |
| | | @RequiresPermissions("system:menu:sort") |
| | | public ApiResponse updateSort (@RequestHeader(Constants.HEADER_USER_TOKEN) String token, @Validated @RequestBody UpdateSystemMenuSortDTO dto) { |
| | | systemMenuBiz.updateSort(dto); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¥è¯¢èåæ ") |
| | | @GetMapping("/treeNodes") |
| | | public ApiResponse<List<SystemMenuNodeVO>> getTreeMenu (@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(systemMenuBiz.findTree(this.getLoginUser().getId())); |
| | | } |
| | | |
| | | @ApiOperation("æ¥è¯¢å表æ ") |
| | | @PostMapping("/treeList") |
| | | @RequiresPermissions("system:menu:query") |
| | | public ApiResponse<List<SystemMenuListVO>> findTree (@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(systemMenuBiz.findTree()); |
| | | } |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("system:menu:create") |
| | | public ApiResponse create(@RequestHeader(Constants.HEADER_USER_TOKEN) String token,@Validated(OperaType.Create.class) @RequestBody SystemMenu systemMenu) { |
| | | return ApiResponse.success(systemMenuBiz.create(systemMenu)); |
| | | } |
| | | |
| | | @ApiOperation("å é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("system:menu:delete") |
| | | public ApiResponse deleteById(@RequestHeader(Constants.HEADER_USER_TOKEN) String token,@PathVariable Integer id) { |
| | | systemMenuBiz.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("system:menu:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestHeader(Constants.HEADER_USER_TOKEN) String token,@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | systemMenuBiz.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("ä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("system:menu:update") |
| | | public ApiResponse updateById(@RequestHeader(Constants.HEADER_USER_TOKEN) String token,@Validated(OperaType.Update.class) @RequestBody SystemMenu systemMenu) { |
| | | systemMenuBiz.updateById(systemMenu); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("ä¿®æ¹èåç¶æ") |
| | | @PostMapping("/updateStatus") |
| | | @RequiresPermissions("system:menu:update") |
| | | public ApiResponse updateStatus(@RequestHeader(Constants.HEADER_USER_TOKEN) String token,@Validated(OperaType.UpdateStatus.class) @RequestBody SystemMenu systemMenu) { |
| | | systemMenuBiz.updateById(systemMenu); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.cloud; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.trace.Trace; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.Monitor; |
| | | import com.doumee.core.utils.Utils; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestHeader; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * @author Eva.Caesar Liu |
| | | * @date 2023/03/21 14:49 |
| | | */ |
| | | @Api(tags = "ç³»ç»çå¬") |
| | | @Trace(exclude = true) |
| | | @RestController |
| | | @RequestMapping("/cloudService/system/monitor") |
| | | public class SystemMonitorController extends BaseController { |
| | | |
| | | @ApiOperation("è·åç³»ç»ä¿¡æ¯") |
| | | @GetMapping("/getSystemInfo") |
| | | @RequiresPermissions("system:monitor:query") |
| | | public ApiResponse<Monitor> getSystemInfo (@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(Utils.Monitor.current()); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.cloud; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.biz.system.SystemPermissionBiz; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.constants.OperaType; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.system.dto.QuerySystemPermissionDTO; |
| | | import com.doumee.dao.system.model.SystemPermission; |
| | | import com.doumee.dao.system.vo.SystemPermissionListVO; |
| | | import com.doumee.service.system.SystemPermissionService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author Eva.Caesar Liu |
| | | * @date 2023/03/21 14:49 |
| | | */ |
| | | @Api(tags = "ç³»ç»æé") |
| | | @RestController |
| | | @RequestMapping("/cloudService/system/permission") |
| | | public class SystemPermissionController extends BaseController { |
| | | |
| | | @Autowired |
| | | private SystemPermissionService systemPermissionService; |
| | | |
| | | @Autowired |
| | | private SystemPermissionBiz systemPermissionBiz; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("system:permission:create") |
| | | public ApiResponse create(@RequestHeader(Constants.HEADER_USER_TOKEN) String token, @Validated(OperaType.Create.class) @RequestBody SystemPermission systemPermission) { |
| | | return ApiResponse.success(systemPermissionBiz.create(systemPermission)); |
| | | } |
| | | |
| | | @ApiOperation("å é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("system:permission:delete") |
| | | public ApiResponse deleteById(@RequestHeader(Constants.HEADER_USER_TOKEN) String token,@PathVariable Integer id) { |
| | | systemPermissionBiz.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("system:permission:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestHeader(Constants.HEADER_USER_TOKEN) String token,@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | systemPermissionBiz.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("ä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("system:permission:update") |
| | | public ApiResponse updateById(@RequestHeader(Constants.HEADER_USER_TOKEN) String token,@Validated(OperaType.Update.class) @RequestBody SystemPermission systemPermission) { |
| | | systemPermissionBiz.updateById(systemPermission); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("system:permission:query") |
| | | public ApiResponse<PageData<SystemPermissionListVO>> findPage (@RequestHeader(Constants.HEADER_USER_TOKEN) String token,@RequestBody PageWrap<QuerySystemPermissionDTO> pageWrap) { |
| | | return ApiResponse.success(systemPermissionService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("æ¥è¯¢ææ") |
| | | @GetMapping("/all") |
| | | @RequiresPermissions("system:permission:query") |
| | | public ApiResponse<List<SystemPermission>> findAll (@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | SystemPermission systemPermission = new SystemPermission(); |
| | | systemPermission.setDeleted(Boolean.FALSE); |
| | | return ApiResponse.success(systemPermissionService.findList(systemPermission)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.cloud; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.biz.system.SystemPositionBiz; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.annotation.trace.Trace; |
| | | import com.doumee.core.constants.OperaType; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.system.dto.QuerySystemUserDTO; |
| | | import com.doumee.dao.system.model.SystemPosition; |
| | | import com.doumee.dao.system.vo.SystemPositionListVO; |
| | | import com.doumee.dao.system.vo.SystemUserListVO; |
| | | import com.doumee.service.system.SystemPositionService; |
| | | import com.doumee.service.system.SystemUserService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | /** |
| | | * å²ä½æ¥å£ |
| | | * @author Eva.Caesar Liu |
| | | * @date 2023/03/21 14:49 |
| | | */ |
| | | @Api(tags = "å²ä½") |
| | | @RestController |
| | | @RequestMapping("/cloudService/system/position") |
| | | public class SystemPositionController extends BaseController { |
| | | |
| | | @Autowired |
| | | private SystemPositionService systemPositionService; |
| | | |
| | | @Autowired |
| | | private SystemPositionBiz systemPositionBiz; |
| | | |
| | | @Autowired |
| | | private SystemUserService systemUserService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("system:position:create") |
| | | public ApiResponse create(@RequestHeader(Constants.HEADER_USER_TOKEN) String token, @Validated(OperaType.Create.class) @RequestBody SystemPosition systemPosition) { |
| | | return ApiResponse.success(systemPositionBiz.create(systemPosition)); |
| | | } |
| | | |
| | | @ApiOperation("å é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("system:position:delete") |
| | | public ApiResponse deleteById(@RequestHeader(Constants.HEADER_USER_TOKEN) String token,@PathVariable Integer id) { |
| | | systemPositionBiz.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("system:position:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestHeader(Constants.HEADER_USER_TOKEN) String token,@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | systemPositionBiz.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("ä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("system:position:update") |
| | | public ApiResponse updateById(@RequestHeader(Constants.HEADER_USER_TOKEN) String token,@Validated(OperaType.Update.class) @RequestBody SystemPosition systemPosition) { |
| | | systemPositionBiz.updateById(systemPosition); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¥è¯¢å²ä½æ å表") |
| | | @PostMapping("/tree") |
| | | @RequiresPermissions("system:position:query") |
| | | public ApiResponse<List<SystemPositionListVO>> findTree (@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(systemPositionBiz.findTree()); |
| | | } |
| | | |
| | | @ApiOperation("æ¥è¯¢å²ä½å表") |
| | | @PostMapping("/all") |
| | | @RequiresPermissions("system:position:query") |
| | | public ApiResponse<List<SystemPosition>> findList (@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | SystemPosition systemPosition = new SystemPosition(); |
| | | systemPosition.setDeleted(Boolean.FALSE); |
| | | return ApiResponse.success(systemPositionService.findList(systemPosition)); |
| | | } |
| | | |
| | | @Trace(exclude = true) |
| | | @ApiOperation("æ¥è¯¢å²ä½äººå") |
| | | @PostMapping("/users") |
| | | @RequiresPermissions("system:position:queryUsers") |
| | | public ApiResponse<PageData<SystemUserListVO>> findPage (@RequestHeader(Constants.HEADER_USER_TOKEN) String token,@RequestBody PageWrap<QuerySystemUserDTO> pageWrap) { |
| | | return ApiResponse.success(systemUserService.findPage(pageWrap)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.cloud; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.biz.system.SystemRoleBiz; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.constants.OperaType; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.system.dto.CreateRoleMenuDTO; |
| | | import com.doumee.dao.system.dto.CreateRolePermissionDTO; |
| | | import com.doumee.dao.system.dto.QuerySystemRoleDTO; |
| | | import com.doumee.dao.system.model.SystemRole; |
| | | import com.doumee.dao.system.vo.SystemRoleListVO; |
| | | import com.doumee.service.system.SystemRoleService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | /** |
| | | * @author Eva.Caesar Liu |
| | | * @date 2023/03/21 14:49 |
| | | */ |
| | | @Api(tags = "ç³»ç»è§è²") |
| | | @RestController |
| | | @RequestMapping("/cloudService/system/role") |
| | | public class SystemRoleController extends BaseController { |
| | | |
| | | @Autowired |
| | | private SystemRoleService systemRoleService; |
| | | |
| | | @Autowired |
| | | private SystemRoleBiz systemRoleBiz; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("é
ç½®è§è²èå") |
| | | @PostMapping("/createRoleMenu") |
| | | @RequiresPermissions("system:role:createRoleMenu") |
| | | public ApiResponse createRoleMenu (@RequestHeader(Constants.HEADER_USER_TOKEN) String token, @Validated @RequestBody CreateRoleMenuDTO dto) { |
| | | systemRoleBiz.createRoleMenu(dto); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("é
ç½®è§è²æé") |
| | | @PostMapping("/createRolePermission") |
| | | @RequiresPermissions("system:role:createRolePermission") |
| | | public ApiResponse createRolePermission (@RequestHeader(Constants.HEADER_USER_TOKEN) String token,@Validated @RequestBody CreateRolePermissionDTO dto) { |
| | | systemRoleBiz.createRolePermission(dto); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("system:role:create") |
| | | public ApiResponse create(@RequestHeader(Constants.HEADER_USER_TOKEN) String token,@Validated(OperaType.Create.class) @RequestBody SystemRole systemRole) { |
| | | return ApiResponse.success(systemRoleBiz.create(systemRole)); |
| | | } |
| | | |
| | | @ApiOperation("å é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("system:role:delete") |
| | | public ApiResponse deleteById(@RequestHeader(Constants.HEADER_USER_TOKEN) String token,@PathVariable Integer id) { |
| | | systemRoleBiz.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("system:role:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestHeader(Constants.HEADER_USER_TOKEN) String token,@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | systemRoleBiz.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("ä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("system:role:update") |
| | | public ApiResponse updateById(@RequestHeader(Constants.HEADER_USER_TOKEN) String token,@Validated(OperaType.Update.class) @RequestBody SystemRole systemRole) { |
| | | systemRoleBiz.updateById(systemRole); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("system:role:query") |
| | | public ApiResponse<PageData<SystemRoleListVO>> findPage (@RequestHeader(Constants.HEADER_USER_TOKEN) String token,@RequestBody PageWrap<QuerySystemRoleDTO> pageWrap) { |
| | | return ApiResponse.success(systemRoleService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("æ¥è¯¢ææ") |
| | | @GetMapping("/all") |
| | | @RequiresPermissions("system:role:query") |
| | | public ApiResponse<List<SystemRole>> findAll (@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | SystemRole systemRole = new SystemRole(); |
| | | systemRole.setDeleted(Boolean.FALSE); |
| | | return ApiResponse.success(systemRoleService.findList(systemRole)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.cloud; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.system.dto.QuerySystemTraceLogDTO; |
| | | import com.doumee.dao.system.model.SystemTraceLog; |
| | | import com.doumee.service.system.SystemTraceLogService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * @author Eva.Caesar Liu |
| | | * @date 2023/03/21 14:49 |
| | | */ |
| | | @Api(tags = "è·è¸ªæ¥å¿") |
| | | @RestController |
| | | @RequestMapping("/cloudService/system/traceLog") |
| | | public class SystemTraceLogController extends BaseController { |
| | | |
| | | @Autowired |
| | | private SystemTraceLogService systemTraceLogService; |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("system:traceLog:query") |
| | | public ApiResponse findPage (@RequestBody PageWrap<QuerySystemTraceLogDTO> pageWrap) { |
| | | return ApiResponse.success(systemTraceLogService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("system:traceLog:query") |
| | | public void exportExcel (@RequestBody PageWrap<QuerySystemTraceLogDTO> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(SystemTraceLog.class).export(systemTraceLogService.findPage(pageWrap).getRecords(), "æä½æ¥å¿", response); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.cloud; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.biz.system.SystemUserBiz; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.annotation.trace.Trace; |
| | | import com.doumee.core.constants.OperaType; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.system.dto.CreateSystemUserDTO; |
| | | import com.doumee.dao.system.dto.CreateUserRoleDTO; |
| | | import com.doumee.dao.system.dto.QuerySystemUserDTO; |
| | | import com.doumee.dao.system.dto.ResetSystemUserPwdDTO; |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import com.doumee.dao.system.vo.SystemUserListVO; |
| | | import com.doumee.service.system.SystemUserService; |
| | | import io.swagger.annotations.*; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.File; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | /** |
| | | * @author Eva.Caesar Liu |
| | | * @date 2023/03/21 14:49 |
| | | */ |
| | | @Api(tags = "ç¨æ·") |
| | | @RestController |
| | | @RequestMapping("/cloudService/system/user") |
| | | public class SystemUserController extends BaseController { |
| | | |
| | | @Autowired |
| | | private SystemUserService systemUserService; |
| | | |
| | | @Autowired |
| | | private SystemUserBiz systemUserBiz; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("é
ç½®ç¨æ·è§è²") |
| | | @PostMapping("/createUserRole") |
| | | @RequiresPermissions("system:user:createUserRole") |
| | | public ApiResponse createUserRole (@Validated @RequestBody CreateUserRoleDTO dto) { |
| | | systemUserBiz.createUserRole(dto); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @Trace(withRequestParameters = false) |
| | | @PreventRepeat |
| | | @ApiOperation("éç½®ç¨æ·å¯ç ") |
| | | @PostMapping("/resetPwd") |
| | | @RequiresPermissions("system:user:resetPwd") |
| | | public ApiResponse resetPwd (@Validated @RequestBody ResetSystemUserPwdDTO dto) { |
| | | dto.setOperaUserId(this.getLoginUser().getId()); |
| | | systemUserBiz.resetPwd(dto); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @Trace(withRequestParameters = false) |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("system:user:create") |
| | | public ApiResponse create(@Validated(OperaType.Create.class) @RequestBody CreateSystemUserDTO systemUser) { |
| | | systemUser.setCreateUser(this.getLoginUser().getId()); |
| | | systemUserBiz.create(systemUser); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("system:user:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | systemUserBiz.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("system:user:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | systemUserBiz.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @Trace(withRequestParameters = false) |
| | | @ApiOperation("ä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("system:user:update") |
| | | public ApiResponse updateById( @RequestBody CreateSystemUserDTO systemUser) { |
| | | systemUser.setUpdateUser(this.getLoginUser().getId()); |
| | | systemUserBiz.updateById(systemUser); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("system:user:query") |
| | | public ApiResponse<PageData<SystemUserListVO>> findPage (@RequestBody PageWrap<QuerySystemUserDTO> pageWrap) { |
| | | return ApiResponse.success(systemUserService.findPage(pageWrap)); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @ApiOperation("æ¥è¯¢ææç³»ç»ç¨æ·") |
| | | @PostMapping("/findAllList") |
| | | @RequiresPermissions("system:user:query") |
| | | public ApiResponse<List<SystemUser>> findAllList (@RequestBody SystemUser pageWrap) { |
| | | return ApiResponse.success(systemUserService.findAllList(pageWrap)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("system:user:query") |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(systemUserService.findById(id)); |
| | | } |
| | | |
| | | @ApiOperation("ç¨æ·å¯¼å
¥") |
| | | @PostMapping("/importSystemUserBatch") |
| | | @RequiresPermissions("system:user:query") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "file", value = "file", required = true, paramType = "query", dataType = "file", dataTypeClass = File.class), |
| | | }) |
| | | public ApiResponse importSystemUserBatch(@ApiParam(value = "file") MultipartFile file){ |
| | | return ApiResponse.success(systemUserBiz.importSystemUserBatch(file)); |
| | | } |
| | | } |
| | |
| | | } |
| | | String pwd = Utils.Secure.encryptPassword(new String(dto.getPassword()), user.getSalt()); |
| | | // æ¯è¾å¯ç |
| | | if( StringUtils.equals(pwd, user.getPassword())){ |
| | | if( !StringUtils.equals(pwd, user.getPassword())){ |
| | | throw new BusinessException(ResponseStatus.ACCOUNT_INCORRECT); |
| | | } |
| | | // è·åç»å½ç¨æ·ä¿¡æ¯ |