xiaoyong931011
2022-06-13 36a143b19cc919c9a814d065029b2340ef7330d7
20220606
9 files renamed
3 files modified
53 ■■■■■ changed files
src/main/java/com/xcong/farmer/cms/modules/system/controller/AdminArticleController.java 2 ●●● patch | view | raw | blame | history
src/main/java/com/xcong/farmer/cms/modules/system/controller/AdminBelongController.java 2 ●●● patch | view | raw | blame | history
src/main/java/com/xcong/farmer/cms/modules/system/controller/AdminColumnController.java 3 ●●●● patch | view | raw | blame | history
src/main/java/com/xcong/farmer/cms/modules/system/controller/AdminCommonController.java 13 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/farmer/cms/modules/system/controller/AdminMenuController.java 5 ●●●● patch | view | raw | blame | history
src/main/java/com/xcong/farmer/cms/modules/system/controller/AdminNavigationBarController.java 3 ●●●● patch | view | raw | blame | history
src/main/java/com/xcong/farmer/cms/modules/system/controller/AdminRoleController.java 5 ●●●● patch | view | raw | blame | history
src/main/java/com/xcong/farmer/cms/modules/system/controller/AdminUserController.java 6 ●●●● patch | view | raw | blame | history
src/main/java/com/xcong/farmer/cms/modules/system/controller/AdminWebSetController.java 2 ●●● patch | view | raw | blame | history
src/main/java/com/xcong/farmer/cms/modules/system/dto/AdminUpdateUserDto.java 3 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/farmer/cms/modules/system/service/Impl/UserServiceImpl.java 6 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/farmer/cms/modules/system/vo/AdminSeeUserInfoVo.java 3 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/farmer/cms/modules/system/controller/AdminArticleController.java
File was renamed from src/main/java/com/xcong/farmer/cms/modules/system/Controller/AdminArticleController.java
@@ -1,4 +1,4 @@
package com.xcong.farmer.cms.modules.system.Controller;
package com.xcong.farmer.cms.modules.system.controller;
import com.xcong.farmer.cms.common.response.Result;
import com.xcong.farmer.cms.modules.system.dto.*;
src/main/java/com/xcong/farmer/cms/modules/system/controller/AdminBelongController.java
File was renamed from src/main/java/com/xcong/farmer/cms/modules/system/Controller/AdminBelongController.java
@@ -1,4 +1,4 @@
package com.xcong.farmer.cms.modules.system.Controller;
package com.xcong.farmer.cms.modules.system.controller;
import com.xcong.farmer.cms.common.response.Result;
import com.xcong.farmer.cms.modules.system.dto.*;
src/main/java/com/xcong/farmer/cms/modules/system/controller/AdminColumnController.java
File was renamed from src/main/java/com/xcong/farmer/cms/modules/system/Controller/AdminColumnController.java
@@ -1,4 +1,4 @@
package com.xcong.farmer.cms.modules.system.Controller;
package com.xcong.farmer.cms.modules.system.controller;
import com.xcong.farmer.cms.common.response.Result;
import com.xcong.farmer.cms.modules.system.dto.*;
@@ -9,7 +9,6 @@
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import lombok.extern.slf4j.Slf4j;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
src/main/java/com/xcong/farmer/cms/modules/system/controller/AdminCommonController.java
File was renamed from src/main/java/com/xcong/farmer/cms/modules/system/Controller/AdminCommonController.java
@@ -1,32 +1,21 @@
package com.xcong.farmer.cms.modules.system.Controller;
package com.xcong.farmer.cms.modules.system.controller;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil;
import com.xcong.farmer.cms.common.contants.AppContants;
import com.xcong.farmer.cms.common.response.Result;
import com.xcong.farmer.cms.configurations.properties.ApplicationProperties;
import com.xcong.farmer.cms.modules.system.dto.AdminBase64UploadDto;
import com.xcong.farmer.cms.modules.system.dto.AdminLoginDto;
import com.xcong.farmer.cms.modules.system.service.ICommonService;
import com.xcong.farmer.cms.utils.SpringContextHolder;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.util.FileCopyUtils;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import sun.misc.BASE64Decoder;
import javax.annotation.Resource;
import java.io.File;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
import cn.hutool.core.util.ObjectUtil;
@RestController
src/main/java/com/xcong/farmer/cms/modules/system/controller/AdminMenuController.java
File was renamed from src/main/java/com/xcong/farmer/cms/modules/system/Controller/AdminMenuController.java
@@ -1,17 +1,14 @@
package com.xcong.farmer.cms.modules.system.Controller;
package com.xcong.farmer.cms.modules.system.controller;
import com.xcong.farmer.cms.common.response.Result;
import com.xcong.farmer.cms.modules.system.dto.*;
import com.xcong.farmer.cms.modules.system.service.IMenuService;
import com.xcong.farmer.cms.modules.system.service.IRoleService;
import com.xcong.farmer.cms.modules.system.vo.AdminMenuVo;
import com.xcong.farmer.cms.modules.system.vo.AdminRoleVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import lombok.extern.slf4j.Slf4j;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
src/main/java/com/xcong/farmer/cms/modules/system/controller/AdminNavigationBarController.java
File was renamed from src/main/java/com/xcong/farmer/cms/modules/system/Controller/AdminNavigationBarController.java
@@ -1,4 +1,4 @@
package com.xcong.farmer.cms.modules.system.Controller;
package com.xcong.farmer.cms.modules.system.controller;
import com.xcong.farmer.cms.common.response.Result;
import com.xcong.farmer.cms.modules.system.dto.*;
@@ -9,7 +9,6 @@
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import lombok.extern.slf4j.Slf4j;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
src/main/java/com/xcong/farmer/cms/modules/system/controller/AdminRoleController.java
File was renamed from src/main/java/com/xcong/farmer/cms/modules/system/Controller/AdminRoleController.java
@@ -1,17 +1,14 @@
package com.xcong.farmer.cms.modules.system.Controller;
package com.xcong.farmer.cms.modules.system.controller;
import com.xcong.farmer.cms.common.response.Result;
import com.xcong.farmer.cms.modules.system.dto.*;
import com.xcong.farmer.cms.modules.system.service.IRoleService;
import com.xcong.farmer.cms.modules.system.service.IUserService;
import com.xcong.farmer.cms.modules.system.vo.AdminRoleVo;
import com.xcong.farmer.cms.modules.system.vo.AdminUserVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import lombok.extern.slf4j.Slf4j;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
src/main/java/com/xcong/farmer/cms/modules/system/controller/AdminUserController.java
File was renamed from src/main/java/com/xcong/farmer/cms/modules/system/Controller/AdminUserController.java
@@ -1,18 +1,14 @@
package com.xcong.farmer.cms.modules.system.Controller;
package com.xcong.farmer.cms.modules.system.controller;
import com.xcong.farmer.cms.common.response.Result;
import com.xcong.farmer.cms.modules.system.dto.*;
import com.xcong.farmer.cms.modules.system.service.IUserService;
import com.xcong.farmer.cms.modules.system.vo.AdminUserVo;
import com.xcong.farmer.cms.modules.test.dto.TestUserDto;
import com.xcong.farmer.cms.modules.test.entity.TestUserEntity;
import com.xcong.farmer.cms.modules.test.mapper.TestUserEntityMapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import lombok.extern.slf4j.Slf4j;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
src/main/java/com/xcong/farmer/cms/modules/system/controller/AdminWebSetController.java
File was renamed from src/main/java/com/xcong/farmer/cms/modules/system/Controller/AdminWebSetController.java
@@ -1,4 +1,4 @@
package com.xcong.farmer.cms.modules.system.Controller;
package com.xcong.farmer.cms.modules.system.controller;
import com.xcong.farmer.cms.common.response.Result;
import com.xcong.farmer.cms.modules.system.dto.AdminUpdateWebSetDto;
src/main/java/com/xcong/farmer/cms/modules/system/dto/AdminUpdateUserDto.java
@@ -23,6 +23,9 @@
    @ApiModelProperty(value = "邮箱")
    private String email;
    @ApiModelProperty(value = "所属公司ID")
    private Long belongId;
    @ApiModelProperty(value = "角色IDS")
    private String roleIds;
src/main/java/com/xcong/farmer/cms/modules/system/service/Impl/UserServiceImpl.java
@@ -175,6 +175,7 @@
        adminSeeUserInfoVo.setNickname(userEntity.getNickname());
        adminSeeUserInfoVo.setPhone(userEntity.getPhone());
        adminSeeUserInfoVo.setEmail(userEntity.getEmail());
        adminSeeUserInfoVo.setBelongId(userEntity.getBelongId());
        List<AdminRoleVo> adminRoleVos = new ArrayList<>();
        QueryWrapper<UserRoleEntity> objectQueryWrapper = new QueryWrapper<>();
@@ -208,10 +209,15 @@
        if(StrUtil.isEmpty(phone)){
            return Result.fail("请输入联系电话");
        }
        Long belongId = adminUpdateUserDto.getBelongId() == null ? UserEntity.USER_BELONG_TOP : adminUpdateUserDto.getBelongId();
        if(UserEntity.USER_BELONG_TOP == belongId){
            return Result.fail("请输入所属公司");
        }
        UserEntity userEntity =  this.baseMapper.selectById(adminUpdateUserDto.getId());
        if(ObjectUtil.isEmpty(userEntity)){
            return Result.fail("用户不存在");
        }
        userEntity.setBelongId(belongId);
        userEntity.setUsername(username);
        userEntity.setPhone(phone);
        if(StrUtil.isNotEmpty(adminUpdateUserDto.getNickname())){
src/main/java/com/xcong/farmer/cms/modules/system/vo/AdminSeeUserInfoVo.java
@@ -24,6 +24,9 @@
    @ApiModelProperty(value = "邮箱")
    private String email;
    @ApiModelProperty(value = "所属公司ID")
    private Long belongId;
    @ApiModelProperty(value = "角色")
    private  List<AdminRoleVo> AdminRoleVos;