Merge branch 'dev'
This commit is contained in:
commit
4a6c279d57
|
@ -3,11 +3,9 @@ package io.renren.common.controller;
|
|||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.renren.common.annotation.LogOperation;
|
||||
import io.renren.common.constant.Constant;
|
||||
import io.renren.common.dto.AuditingBaseDTO;
|
||||
import io.renren.common.page.PageData;
|
||||
import io.renren.common.utils.CodeGenerationUtils;
|
||||
import io.renren.common.utils.DateUtils;
|
||||
import io.renren.common.utils.Result;
|
||||
import io.renren.common.validator.ValidatorUtils;
|
||||
import io.renren.common.validator.group.AddGroup;
|
||||
|
|
|
@ -122,7 +122,7 @@ public class ActTaskController {
|
|||
public Result<PageData<TaskDTO>> myToDoTaskPage(@ApiIgnore @RequestParam Map<String, Object> params) {
|
||||
String userId = SecurityUser.getUserId().toString();
|
||||
params.put("userId", userId);
|
||||
logger.info("--------------------------------------------------------{}",userId);
|
||||
logger.info("--------------------------------------------------------{}", userId);
|
||||
PageData<TaskDTO> page = actTaskService.page(params);
|
||||
for (TaskDTO taskDTO : page.getList()) {
|
||||
if (!StringUtils.isEmpty(taskDTO.getAssignee())) {
|
||||
|
|
|
@ -145,7 +145,7 @@ public class TAbilityApplicationController {
|
|||
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "ended", value = "是否完成(true, false)", paramType = "query", dataType = "String")
|
||||
}
|
||||
}
|
||||
)
|
||||
public Result<PageData<TAbilityApplicationDTO>> myPage(@ApiIgnore @RequestParam Map<String, Object> params) {
|
||||
final UserDetail user = SecurityUser.getUser();
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package io.renren.modules.processForm.service;
|
||||
|
||||
import io.renren.common.service.CrudService;
|
||||
import io.renren.common.utils.Result;
|
||||
import io.renren.modules.processForm.dto.TAbilityApplicationDTO;
|
||||
import io.renren.modules.processForm.entity.TAbilityApplicationEntity;
|
||||
|
||||
|
@ -55,6 +54,7 @@ public interface TAbilityApplicationService extends CrudService<TAbilityApplicat
|
|||
|
||||
/**
|
||||
* 获取申请能力部门列表
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
Object getApplyDeptList();
|
||||
|
|
|
@ -291,7 +291,7 @@ public class TAbilityApplicationServiceImpl extends CrudServiceImpl<TAbilityAppl
|
|||
|
||||
Long sum = 0L;
|
||||
sum = sum + abilityApplicationDao.getApplyPriceCount();
|
||||
return sum ;
|
||||
return sum;
|
||||
}
|
||||
|
||||
}
|
|
@ -8,7 +8,6 @@ import org.apache.ibatis.annotations.Mapper;
|
|||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.cache.annotation.Cacheable;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
|
|
@ -152,6 +152,7 @@ public interface ResourceService extends CrudService<ResourceEntity, ResourceDTO
|
|||
|
||||
/**
|
||||
* 无需分页
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
|
|
|
@ -70,7 +70,7 @@ public class ResourceBrowseController {
|
|||
params.put("userId", id);
|
||||
}
|
||||
Integer page = params.get("page") != null ? Integer.parseInt(params.get("page").toString()) - 1 : 0;
|
||||
Integer pageSize = params.get("limit")!= null ? Integer.parseInt(params.get("limit").toString()) : 5;
|
||||
Integer pageSize = params.get("limit") != null ? Integer.parseInt(params.get("limit").toString()) : 5;
|
||||
params.put("pageNum", page * pageSize);
|
||||
params.put("pageSize", pageSize);
|
||||
|
||||
|
|
|
@ -4,9 +4,7 @@ import io.renren.common.dao.BaseDao;
|
|||
import io.renren.modules.resourceMountApply.entity.TResourceMountApplyEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 资源挂载申请表单
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package io.renren.modules.security.oauth2;
|
||||
|
||||
import cn.hutool.core.date.DateField;
|
||||
import cn.hutool.core.date.DateUnit;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.net.url.UrlBuilder;
|
||||
import cn.hutool.core.util.CharsetUtil;
|
||||
|
@ -15,7 +14,6 @@ import io.renren.modules.security.service.SysUserTokenService;
|
|||
import io.renren.modules.security.user.SecurityUser;
|
||||
import io.renren.modules.sys.dao.SysUserDao;
|
||||
import io.renren.modules.sys.entity.SysUserEntity;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.http.HttpStatus;
|
||||
import org.apache.shiro.authc.AuthenticationException;
|
||||
|
@ -34,7 +32,6 @@ import javax.servlet.http.HttpServletRequest;
|
|||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
|
@ -70,7 +67,7 @@ public class Oauth2Filter extends AuthenticatingFilter {
|
|||
@Autowired
|
||||
private RestTemplate restTemplate;
|
||||
|
||||
static class SDTToken{
|
||||
static class SDTToken {
|
||||
private String accessToken;
|
||||
private Date expiresIn;
|
||||
}
|
||||
|
@ -194,9 +191,9 @@ public class Oauth2Filter extends AuthenticatingFilter {
|
|||
//先在这里直接处理山东通逻辑,有时间再重构
|
||||
if (sdtEnable && requestUri.contains("code=") && requestUri.contains("state=")) {
|
||||
if (sdtToken == null || sdtToken.expiresIn.before(new Date()) || sdtToken.accessToken == null) {
|
||||
synchronized (this.getClass()){
|
||||
synchronized (this.getClass()) {
|
||||
if (sdtToken == null || sdtToken.expiresIn.before(new Date()) || sdtToken.accessToken == null) {
|
||||
String sdtApiUrl = String.format("%s/cgi-bin/gettoken?corpid=%s&corpsecret=%s",apiUrl, corpid, secret);
|
||||
String sdtApiUrl = String.format("%s/cgi-bin/gettoken?corpid=%s&corpsecret=%s", apiUrl, corpid, secret);
|
||||
JSONObject tokenObj = restTemplate.getForObject(sdtApiUrl, JSONObject.class);
|
||||
if (tokenObj.getIntValue("errcode") == 0) {
|
||||
SDTToken token = new SDTToken();
|
||||
|
@ -204,7 +201,7 @@ public class Oauth2Filter extends AuthenticatingFilter {
|
|||
Integer expiresIn = tokenObj.getInteger("expires_in");
|
||||
//提前5分钟,防止误差
|
||||
Integer expiresOffset = 60 * 5;
|
||||
expiresIn = expiresIn < expiresOffset ? expiresIn / 2 : expiresIn -expiresOffset;
|
||||
expiresIn = expiresIn < expiresOffset ? expiresIn / 2 : expiresIn - expiresOffset;
|
||||
token.expiresIn = DateUtil.offset(new Date(), DateField.SECOND, expiresIn);
|
||||
sdtToken = token;
|
||||
}
|
||||
|
|
|
@ -83,7 +83,7 @@ public class Oauth2Realm extends AuthorizingRealm {
|
|||
}
|
||||
|
||||
if (userDetail.getStatus() == 2) {
|
||||
throw new LockedAccountException(MessageUtils.getMessage(500 ,"账号已锁定!"));
|
||||
throw new LockedAccountException(MessageUtils.getMessage(500, "账号已锁定!"));
|
||||
}
|
||||
|
||||
//获取用户对应的部门数据权限
|
||||
|
|
|
@ -44,7 +44,7 @@ public class SysUserTokenServiceImpl extends BaseServiceImpl<SysUserTokenDao, Sy
|
|||
|
||||
//判断是否生成过token
|
||||
SysUserTokenEntity tokenEntity = baseDao.getByUserId(userId);
|
||||
if(tokenEntity == null){
|
||||
if (tokenEntity == null) {
|
||||
//生成一个token
|
||||
token = TokenGenerator.generateValue();
|
||||
|
||||
|
@ -56,7 +56,7 @@ public class SysUserTokenServiceImpl extends BaseServiceImpl<SysUserTokenDao, Sy
|
|||
|
||||
//保存token
|
||||
this.insert(tokenEntity);
|
||||
}else{
|
||||
} else {
|
||||
//判断是否允许同时登录,0:不允许,1:允许
|
||||
//允许同时在线时返回同一token且不校验过期时间
|
||||
if (allowSimultaneousLogin == 0 && tokenEntity.getExpireDate().getTime() < System.currentTimeMillis()) {
|
||||
|
|
|
@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.annotation.FieldFill;
|
|||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.renren.common.entity.BaseEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
|
|
@ -5,12 +5,12 @@ import io.renren.modules.sysnoticemanagement.entity.SysNoticeManagementEntity;
|
|||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 公告管理
|
||||
*
|
||||
* @author dg 2498628697@qq.com
|
||||
* @since 1.0 2022-12-01
|
||||
*/
|
||||
* 公告管理
|
||||
*
|
||||
* @author dg 2498628697@qq.com
|
||||
* @since 1.0 2022-12-01
|
||||
*/
|
||||
@Mapper
|
||||
public interface SysNoticeManagementDao extends BaseDao<SysNoticeManagementEntity> {
|
||||
|
||||
|
||||
}
|
|
@ -1,18 +1,17 @@
|
|||
package io.renren.modules.sysnoticemanagement.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 公告管理
|
||||
*
|
||||
* @author dg 2498628697@qq.com
|
||||
* @since 1.0 2022-12-01
|
||||
*/
|
||||
* 公告管理
|
||||
*
|
||||
* @author dg 2498628697@qq.com
|
||||
* @since 1.0 2022-12-01
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "公告管理")
|
||||
public class SysNoticeManagementDTO implements Serializable {
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
package io.renren.modules.sysnoticemanagement.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
@ -13,18 +16,18 @@ import java.util.Date;
|
|||
* @since 1.0 2022-12-01
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper=false)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("sys_notice_management")
|
||||
public class SysNoticeManagementEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId
|
||||
private Long id;
|
||||
private String content;
|
||||
private Date publishTime;
|
||||
private Integer delFlag;
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createDate;
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Long creator;
|
||||
@TableId
|
||||
private Long id;
|
||||
private String content;
|
||||
private Date publishTime;
|
||||
private Integer delFlag;
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createDate;
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Long creator;
|
||||
}
|
|
@ -23,7 +23,7 @@ import java.util.Map;
|
|||
public class SysNoticeManagementServiceImpl extends CrudServiceImpl<SysNoticeManagementDao, SysNoticeManagementEntity, SysNoticeManagementDTO> implements SysNoticeManagementService {
|
||||
|
||||
@Override
|
||||
public QueryWrapper<SysNoticeManagementEntity> getWrapper(Map<String, Object> params){
|
||||
public QueryWrapper<SysNoticeManagementEntity> getWrapper(Map<String, Object> params) {
|
||||
QueryWrapper<SysNoticeManagementEntity> wrapper = new QueryWrapper<>();
|
||||
|
||||
if (params.get("days") != null) {
|
||||
|
|
Loading…
Reference in New Issue