Merge branch 'feature'
All checks were successful
JslGroup/JslDeveloper/JSL_OrganizeInternalOA/pipeline/head This commit looks good
All checks were successful
JslGroup/JslDeveloper/JSL_OrganizeInternalOA/pipeline/head This commit looks good
This commit is contained in:
commit
620daf9612
40
Jenkinsfile
vendored
40
Jenkinsfile
vendored
@ -1,24 +1,24 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
environment {
|
environment {
|
||||||
QODANA_TOKEN = credentials('eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJvcmdhbml6YXRpb24iOiJwNTZYRyIsInByb2plY3QiOiIzd1JQNyIsInRva2VuIjoiQWFxVkoifQ.R3TH0E2LgVpBorJ1wyIx3zjIM1p4j-taEEShZKhH2l8')
|
QODANA_TOKEN=credentials('qodana-token')
|
||||||
}
|
|
||||||
agent {
|
|
||||||
docker {
|
|
||||||
args '''
|
|
||||||
-v "${WORKSPACE}":/data/project
|
|
||||||
--entrypoint=""
|
|
||||||
'''
|
|
||||||
image 'jetbrains/qodana-jvm'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stages {
|
|
||||||
stage('Qodana') {
|
|
||||||
when {
|
|
||||||
branch 'feature'
|
|
||||||
}
|
|
||||||
steps {
|
|
||||||
sh '''qodana'''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
agent {
|
||||||
|
docker {
|
||||||
|
args '''
|
||||||
|
-v "${WORKSPACE}":/data/project
|
||||||
|
--entrypoint=""
|
||||||
|
'''
|
||||||
|
image 'jetbrains/qodana-jvm'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Qodana') {
|
||||||
|
when {
|
||||||
|
branch 'feature'
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
sh '''qodana'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
11
qodana.yaml
11
qodana.yaml
@ -29,3 +29,14 @@ include:
|
|||||||
- name: JavaLangImport
|
- name: JavaLangImport
|
||||||
- name: UNUSED_IMPORT
|
- name: UNUSED_IMPORT
|
||||||
- name: SamePackageImport
|
- name: SamePackageImport
|
||||||
|
- name: CheckDependencyLicenses
|
||||||
|
- name: ArgNamesErrorsInspection
|
||||||
|
- name: ArgNamesWarningsInspection
|
||||||
|
- name: AssertMessageNotString
|
||||||
|
- name: EqualsCalledOnEnumConstant
|
||||||
|
- name: ListIndexOfReplaceableByContains
|
||||||
|
- name: ObjectsEqualsCanBeSimplified
|
||||||
|
- name: SizeReplaceableByIsEmpty
|
||||||
|
- name: ArrayCreationWithoutNewKeyword
|
||||||
|
exclude:
|
||||||
|
- name: VulnerableLibrariesLocal
|
||||||
|
@ -3,7 +3,6 @@ package com.jsl.oa.config.redis;
|
|||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.context.annotation.Lazy;
|
|
||||||
import org.springframework.data.redis.connection.RedisConnectionFactory;
|
import org.springframework.data.redis.connection.RedisConnectionFactory;
|
||||||
import org.springframework.data.redis.connection.RedisStandaloneConfiguration;
|
import org.springframework.data.redis.connection.RedisStandaloneConfiguration;
|
||||||
import org.springframework.data.redis.connection.jedis.JedisConnectionFactory;
|
import org.springframework.data.redis.connection.jedis.JedisConnectionFactory;
|
||||||
|
@ -37,18 +37,18 @@ public class InfoController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PutMapping("/info/header-image/edit")
|
@PutMapping("/info/header-image/edit")
|
||||||
public BaseResponse infoEditHeaderImage(@RequestBody @Validated CarouselVO carouselVO, @RequestParam Integer id, HttpServletRequest request, @NotNull BindingResult bindingResult) {
|
public BaseResponse infoEditHeaderImage(@RequestBody @Validated CarouselVO carouselVO, HttpServletRequest request, @NotNull BindingResult bindingResult) {
|
||||||
log.info("请求接口[PUT]: /info/header-image/edit");
|
log.info("请求接口[PUT]: /info/header-image/edit");
|
||||||
// 参数校验
|
// 参数校验
|
||||||
if (bindingResult.hasErrors()) {
|
if (bindingResult.hasErrors()) {
|
||||||
log.warn("参数校验失败: {}", Processing.getValidatedErrorList(bindingResult));
|
log.warn("参数校验失败: {}", Processing.getValidatedErrorList(bindingResult));
|
||||||
return ResultUtil.error(ErrorCode.PARAMETER_ERROR, Processing.getValidatedErrorList(bindingResult));
|
return ResultUtil.error(ErrorCode.PARAMETER_ERROR, Processing.getValidatedErrorList(bindingResult));
|
||||||
}
|
}
|
||||||
if (id == null) {
|
if (carouselVO.getId() == null) {
|
||||||
log.warn("参数校验失败: {}", "id不能为空");
|
log.warn("参数校验失败: {}", "id不能为空");
|
||||||
return ResultUtil.error(ErrorCode.PARAMETER_ERROR, "id不能为空");
|
return ResultUtil.error(ErrorCode.PARAMETER_ERROR, "id不能为空");
|
||||||
}
|
}
|
||||||
return infoService.editHeaderImage(request, carouselVO, id);
|
return infoService.editHeaderImage(request, carouselVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@DeleteMapping("/info/header-image/del")
|
@DeleteMapping("/info/header-image/del")
|
||||||
|
@ -1,13 +1,10 @@
|
|||||||
package com.jsl.oa.controllers;
|
package com.jsl.oa.controllers;
|
||||||
|
|
||||||
import com.jsl.oa.common.constant.BusinessConstants;
|
|
||||||
import com.jsl.oa.services.MessageService;
|
import com.jsl.oa.services.MessageService;
|
||||||
import com.jsl.oa.services.impl.MessageServiceImpl;
|
|
||||||
import com.jsl.oa.utils.BaseResponse;
|
import com.jsl.oa.utils.BaseResponse;
|
||||||
import com.jsl.oa.utils.ErrorCode;
|
import com.jsl.oa.utils.ErrorCode;
|
||||||
import com.jsl.oa.utils.JwtUtil;
|
import com.jsl.oa.utils.JwtUtil;
|
||||||
import com.jsl.oa.utils.ResultUtil;
|
import com.jsl.oa.utils.ResultUtil;
|
||||||
import com.jsl.oa.utils.redis.TokenRedisUtil;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
@ -36,10 +33,10 @@ public class MessageController {
|
|||||||
private final MessageService messageService;
|
private final MessageService messageService;
|
||||||
|
|
||||||
@DeleteMapping("/message/delete")
|
@DeleteMapping("/message/delete")
|
||||||
public BaseResponse messageDelete(@RequestParam Long id, HttpServletRequest request){
|
public BaseResponse messageDelete(@RequestParam Long id, HttpServletRequest request) {
|
||||||
if(id == null){
|
if (id == null) {
|
||||||
return ResultUtil.error(ErrorCode.PARAMETER_ERROR);
|
return ResultUtil.error(ErrorCode.PARAMETER_ERROR);
|
||||||
} else return messageService.messageDelete(id,request);
|
} else return messageService.messageDelete(id, request);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/message/get")
|
@GetMapping("/message/get")
|
||||||
@ -47,28 +44,28 @@ public class MessageController {
|
|||||||
@RequestParam(defaultValue = "10") Long pageSize,
|
@RequestParam(defaultValue = "10") Long pageSize,
|
||||||
HttpServletRequest request,
|
HttpServletRequest request,
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate begin,
|
@DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate begin,
|
||||||
@DateTimeFormat (pattern = "yyyy-MM-dd") LocalDate end) {
|
@DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate end) {
|
||||||
log.info("请求接口[GET]:/message/get");
|
log.info("请求接口[GET]:/message/get");
|
||||||
String token = request.getHeader("Authorization").replace("Bearer ", "");
|
String token = request.getHeader("Authorization").replace("Bearer ", "");
|
||||||
Long uid = JwtUtil.getUserId(token);
|
Long uid = JwtUtil.getUserId(token);
|
||||||
if(uid == null){
|
if (uid == null) {
|
||||||
return ResultUtil.error(ErrorCode.USER_NOT_EXIST);
|
return ResultUtil.error(ErrorCode.USER_NOT_EXIST);
|
||||||
} else return messageService.messageGet(begin,end,page,pageSize,uid);
|
} else return messageService.messageGet(begin, end, page, pageSize, uid);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/message/get/all")
|
@GetMapping("/message/get/all")
|
||||||
public BaseResponse messageGetAll(@RequestParam(defaultValue = "1") Long page,
|
public BaseResponse messageGetAll(@RequestParam(defaultValue = "1") Long page,
|
||||||
@RequestParam(defaultValue = "10") Long pageSize,
|
@RequestParam(defaultValue = "10") Long pageSize,
|
||||||
HttpServletRequest request,
|
HttpServletRequest request,
|
||||||
@RequestParam Long uid,
|
@RequestParam Long uid,
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate begin,
|
@DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate begin,
|
||||||
@DateTimeFormat (pattern = "yyyy-MM-dd") LocalDate end) {
|
@DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate end) {
|
||||||
log.info("请求接口[GET]:/message/get/all");
|
log.info("请求接口[GET]:/message/get/all");
|
||||||
String token = request.getHeader("Authorization").replace("Bearer ", "");
|
String token = request.getHeader("Authorization").replace("Bearer ", "");
|
||||||
Long LoginId = JwtUtil.getUserId(token);
|
Long LoginId = JwtUtil.getUserId(token);
|
||||||
if(LoginId == null){
|
if (LoginId == null) {
|
||||||
return ResultUtil.error(ErrorCode.USER_NOT_EXIST);
|
return ResultUtil.error(ErrorCode.USER_NOT_EXIST);
|
||||||
} else return messageService.messageGetAll(request,begin,end,page,pageSize,LoginId,uid);
|
} else return messageService.messageGetAll(request, begin, end, page, pageSize, LoginId, uid);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2,9 +2,7 @@ package com.jsl.oa.controllers;
|
|||||||
|
|
||||||
|
|
||||||
import com.jsl.oa.model.voData.NewsAddVO;
|
import com.jsl.oa.model.voData.NewsAddVO;
|
||||||
import com.jsl.oa.model.voData.PermissionEditVO;
|
|
||||||
import com.jsl.oa.services.NewsService;
|
import com.jsl.oa.services.NewsService;
|
||||||
import com.jsl.oa.services.RoleService;
|
|
||||||
import com.jsl.oa.utils.BaseResponse;
|
import com.jsl.oa.utils.BaseResponse;
|
||||||
import com.jsl.oa.utils.ErrorCode;
|
import com.jsl.oa.utils.ErrorCode;
|
||||||
import com.jsl.oa.utils.Processing;
|
import com.jsl.oa.utils.Processing;
|
||||||
@ -37,14 +35,14 @@ public class NewsController {
|
|||||||
private final NewsService newsService;
|
private final NewsService newsService;
|
||||||
|
|
||||||
@PostMapping("/news/add")
|
@PostMapping("/news/add")
|
||||||
public BaseResponse newsAdd(@RequestBody @Validated NewsAddVO newsAddVO, BindingResult bindingResult, HttpServletRequest request){
|
public BaseResponse newsAdd(@RequestBody @Validated NewsAddVO newsAddVO, BindingResult bindingResult, HttpServletRequest request) {
|
||||||
log.info("请求接口[POST]: /news/add");
|
log.info("请求接口[POST]: /news/add");
|
||||||
// 判断是否有参数错误
|
// 判断是否有参数错误
|
||||||
if (bindingResult.hasErrors()) {
|
if (bindingResult.hasErrors()) {
|
||||||
return ResultUtil.error(ErrorCode.REQUEST_BODY_ERROR, Processing.getValidatedErrorList(bindingResult));
|
return ResultUtil.error(ErrorCode.REQUEST_BODY_ERROR, Processing.getValidatedErrorList(bindingResult));
|
||||||
}
|
}
|
||||||
|
|
||||||
return newsService.newsAdd(newsAddVO,request);
|
return newsService.newsAdd(newsAddVO, request);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,6 @@ package com.jsl.oa.dao;
|
|||||||
|
|
||||||
import com.jsl.oa.mapper.NewsMapper;
|
import com.jsl.oa.mapper.NewsMapper;
|
||||||
import com.jsl.oa.model.doData.NewsDO;
|
import com.jsl.oa.model.doData.NewsDO;
|
||||||
import com.jsl.oa.model.voData.NewsAddVO;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
@ -15,13 +14,13 @@ public class NewsDAO {
|
|||||||
|
|
||||||
private final NewsMapper newsMapper;
|
private final NewsMapper newsMapper;
|
||||||
|
|
||||||
public void addNews(NewsDO newsVO,Long uid){
|
public void addNews(NewsDO newsVO, Long uid) {
|
||||||
log.info("\t> 执行 DAO 层 NewsDAO.addNews 方法");
|
log.info("\t> 执行 DAO 层 NewsDAO.addNews 方法");
|
||||||
log.info("\t\t> 从 MySQL 获取数据");
|
log.info("\t\t> 从 MySQL 获取数据");
|
||||||
// 添加新闻数据
|
// 添加新闻数据
|
||||||
newsMapper.addNews(newsVO);
|
newsMapper.addNews(newsVO);
|
||||||
// 添加作者
|
// 添加作者
|
||||||
newsMapper.addNewsUser(uid,newsVO.getId());
|
newsMapper.addNewsUser(uid, newsVO.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package com.jsl.oa.mapper;
|
package com.jsl.oa.mapper;
|
||||||
|
|
||||||
import com.jsl.oa.model.doData.MessageDO;
|
import com.jsl.oa.model.doData.MessageDO;
|
||||||
import org.apache.ibatis.annotations.Delete;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Select;
|
import org.apache.ibatis.annotations.Select;
|
||||||
import org.apache.ibatis.annotations.Update;
|
import org.apache.ibatis.annotations.Update;
|
||||||
@ -24,6 +23,7 @@ public interface MessageMapper {
|
|||||||
@Select("select count(*) from organize_oa.oa_message where uid = #{uid}")
|
@Select("select count(*) from organize_oa.oa_message where uid = #{uid}")
|
||||||
Long count(Long uid);
|
Long count(Long uid);
|
||||||
|
|
||||||
@Select("select * from organize_oa.oa_message where uid = #{uid}") //and created_at between #{begin} and #{end} limit #{start},#{pageSize}")
|
@Select("select * from organize_oa.oa_message where uid = #{uid}")
|
||||||
List<MessageDO> page(LocalDate begin,LocalDate end,Long uid, Long start, Long pageSize);
|
//and created_at between #{begin} and #{end} limit #{start},#{pageSize}")
|
||||||
|
List<MessageDO> page(LocalDate begin, LocalDate end, Long uid, Long start, Long pageSize);
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,6 @@ import com.jsl.oa.model.doData.ProjectCuttingDO;
|
|||||||
import com.jsl.oa.model.doData.ProjectDO;
|
import com.jsl.oa.model.doData.ProjectDO;
|
||||||
import com.jsl.oa.model.doData.ProjectUserDO;
|
import com.jsl.oa.model.doData.ProjectUserDO;
|
||||||
import com.jsl.oa.model.voData.ProjectInfoVO;
|
import com.jsl.oa.model.voData.ProjectInfoVO;
|
||||||
import com.jsl.oa.utils.BaseResponse;
|
|
||||||
import org.apache.ibatis.annotations.*;
|
import org.apache.ibatis.annotations.*;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -61,8 +60,8 @@ public interface ProjectMapper {
|
|||||||
ProjectCuttingDO getProjectCuttingById(Long id);
|
ProjectCuttingDO getProjectCuttingById(Long id);
|
||||||
|
|
||||||
@Select("SELECT * FROM organize_oa.oa_project_user WHERE pid = #{pid} AND uid = #{uid}")
|
@Select("SELECT * FROM organize_oa.oa_project_user WHERE pid = #{pid} AND uid = #{uid}")
|
||||||
ProjectUserDO getProjectUserByPidAndUid(Long pid,Long uid);
|
ProjectUserDO getProjectUserByPidAndUid(Long pid, Long uid);
|
||||||
|
|
||||||
@Update("UPDATE organize_oa.oa_project_user SET uid = #{uid} , updated_at = CURRENT_TIMESTAMP WHERE id = #{id}")
|
@Update("UPDATE organize_oa.oa_project_user SET uid = #{uid} , updated_at = CURRENT_TIMESTAMP WHERE id = #{id}")
|
||||||
boolean updateUserForProjectUser(Long uid,Long id);
|
boolean updateUserForProjectUser(Long uid, Long id);
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package com.jsl.oa.model.voData;
|
package com.jsl.oa.model.voData;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
|
@ -1,11 +1,9 @@
|
|||||||
package com.jsl.oa.model.voData;
|
package com.jsl.oa.model.voData;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.Value;
|
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
import java.sql.Timestamp;
|
|
||||||
|
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
|
@ -5,7 +5,6 @@ import lombok.Data;
|
|||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
import java.sql.Timestamp;
|
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class ProjectCuttingEditVO {
|
public class ProjectCuttingEditVO {
|
||||||
|
@ -1,9 +1,6 @@
|
|||||||
package com.jsl.oa.model.voData;
|
package com.jsl.oa.model.voData;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
|
@ -3,9 +3,7 @@ package com.jsl.oa.model.voData;
|
|||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
|
||||||
import javax.validation.constraints.Pattern;
|
import javax.validation.constraints.Pattern;
|
||||||
import java.sql.Timestamp;
|
|
||||||
|
|
||||||
@Setter
|
@Setter
|
||||||
@Getter
|
@Getter
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.jsl.oa.model.voData.business.info;
|
package com.jsl.oa.model.voData.business.info;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -12,7 +13,9 @@ import lombok.Data;
|
|||||||
* @author 筱锋xiao_lfeng
|
* @author 筱锋xiao_lfeng
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
public class CarouselVO {
|
public class CarouselVO {
|
||||||
|
private Integer id;
|
||||||
private Integer displayOrder;
|
private Integer displayOrder;
|
||||||
private String image;
|
private String image;
|
||||||
private String title;
|
private String title;
|
||||||
|
@ -36,7 +36,7 @@ public interface InfoService {
|
|||||||
* @param id 轮播图ID
|
* @param id 轮播图ID
|
||||||
* @return {@link BaseResponse}
|
* @return {@link BaseResponse}
|
||||||
*/
|
*/
|
||||||
BaseResponse editHeaderImage(HttpServletRequest request, CarouselVO carouselVO, Integer id);
|
BaseResponse editHeaderImage(HttpServletRequest request, CarouselVO carouselVO);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <h2>获取轮播图</h2>
|
* <h2>获取轮播图</h2>
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package com.jsl.oa.services;
|
package com.jsl.oa.services;
|
||||||
|
|
||||||
import com.jsl.oa.model.doData.info.ProjectShowDO;
|
|
||||||
import com.jsl.oa.model.voData.ProjectCuttingAddVO;
|
import com.jsl.oa.model.voData.ProjectCuttingAddVO;
|
||||||
import com.jsl.oa.model.voData.ProjectCuttingEditVO;
|
import com.jsl.oa.model.voData.ProjectCuttingEditVO;
|
||||||
import com.jsl.oa.model.voData.ProjectInfoVO;
|
import com.jsl.oa.model.voData.ProjectInfoVO;
|
||||||
@ -10,13 +9,13 @@ import com.jsl.oa.utils.BaseResponse;
|
|||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
public interface ProjectService {
|
public interface ProjectService {
|
||||||
BaseResponse projectAdd(HttpServletRequest request,ProjectInfoVO projectAdd);
|
BaseResponse projectAdd(HttpServletRequest request, ProjectInfoVO projectAdd);
|
||||||
|
|
||||||
BaseResponse projectEdit(HttpServletRequest request,ProjectInfoVO projectEdit);
|
BaseResponse projectEdit(HttpServletRequest request, ProjectInfoVO projectEdit);
|
||||||
|
|
||||||
BaseResponse projectGetUserInCutting(Long uid);
|
BaseResponse projectGetUserInCutting(Long uid);
|
||||||
|
|
||||||
BaseResponse projectAddUserForCutting(HttpServletRequest request,Long uid, Long pid);
|
BaseResponse projectAddUserForCutting(HttpServletRequest request, Long uid, Long pid);
|
||||||
|
|
||||||
BaseResponse getHeader(Integer id);
|
BaseResponse getHeader(Integer id);
|
||||||
|
|
||||||
@ -30,7 +29,7 @@ public interface ProjectService {
|
|||||||
|
|
||||||
BaseResponse getByName(String name);
|
BaseResponse getByName(String name);
|
||||||
|
|
||||||
BaseResponse projectDelete(HttpServletRequest request,Long id);
|
BaseResponse projectDelete(HttpServletRequest request, Long id);
|
||||||
|
|
||||||
BaseResponse addProjectCutting(HttpServletRequest request, ProjectCuttingAddVO projectCuttingAddVO);
|
BaseResponse addProjectCutting(HttpServletRequest request, ProjectCuttingAddVO projectCuttingAddVO);
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ public class InfoServiceImpl implements InfoService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@CheckUserHasPermission("info.image.edit")
|
@CheckUserHasPermission("info.image.edit")
|
||||||
public BaseResponse editHeaderImage(HttpServletRequest request, CarouselVO carouselVO, Integer id) {
|
public BaseResponse editHeaderImage(HttpServletRequest request, @NotNull CarouselVO carouselVO) {
|
||||||
log.info("\t> 执行 Service 层 InfoService.editHeaderImage 方法");
|
log.info("\t> 执行 Service 层 InfoService.editHeaderImage 方法");
|
||||||
// 获取用户
|
// 获取用户
|
||||||
Long userId = Processing.getAuthHeaderToUserId(request);
|
Long userId = Processing.getAuthHeaderToUserId(request);
|
||||||
@ -77,10 +77,10 @@ public class InfoServiceImpl implements InfoService {
|
|||||||
// 获取轮播图信息
|
// 获取轮播图信息
|
||||||
CarouselDO carouselDO = infoDAO.getCarousel();
|
CarouselDO carouselDO = infoDAO.getCarousel();
|
||||||
// 获取指定轮播图
|
// 获取指定轮播图
|
||||||
if (id > carouselDO.getData().size()) {
|
if (carouselVO.getId() > carouselDO.getData().size()) {
|
||||||
return ResultUtil.error(ErrorCode.ID_NOT_EXIST);
|
return ResultUtil.error(ErrorCode.ID_NOT_EXIST);
|
||||||
}
|
}
|
||||||
CarouselDO.DataDO carousel = carouselDO.getData().get(id - 1);
|
CarouselDO.DataDO carousel = carouselDO.getData().get(carouselVO.getId() - 1);
|
||||||
carousel.setDisplayOrder(carouselVO.getDisplayOrder())
|
carousel.setDisplayOrder(carouselVO.getDisplayOrder())
|
||||||
.setImage(carouselVO.getImage())
|
.setImage(carouselVO.getImage())
|
||||||
.setDescription(carouselVO.getDescription())
|
.setDescription(carouselVO.getDescription())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user