update
This commit is contained in:
parent
5c1332690c
commit
7e72b8b392
|
@ -1,4 +1,5 @@
|
||||||
package com.ydool.staff.entity;
|
package com.ydool.staff.entity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.ydool.common.base.BaseEntity;
|
import com.ydool.common.base.BaseEntity;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
|
@ -39,4 +40,8 @@ public class Attachment extends BaseEntity{
|
||||||
@ApiModelProperty(value = "文件大小")
|
@ApiModelProperty(value = "文件大小")
|
||||||
private String size;
|
private String size;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "文件后缀")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String suffix;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -108,7 +108,7 @@ public class PersonnelRequest {
|
||||||
|
|
||||||
@ApiModelProperty(value = "入职时间")
|
@ApiModelProperty(value = "入职时间")
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
private Date hiredate;
|
private Date hireDate;
|
||||||
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "退休返聘开始时间")
|
@ApiModelProperty(value = "退休返聘开始时间")
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
package com.ydool.staff.service.impl;
|
package com.ydool.staff.service.impl;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.stp.StpUtil;
|
||||||
|
import cn.hutool.core.io.FileUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.ydool.common.base.BaseService;
|
import com.ydool.common.base.BaseService;
|
||||||
|
@ -7,6 +9,7 @@ import com.ydool.common.data.dto.AjaxResult;
|
||||||
import com.ydool.staff.entity.Attachment;
|
import com.ydool.staff.entity.Attachment;
|
||||||
import com.ydool.staff.mapper.AttachmentMapper;
|
import com.ydool.staff.mapper.AttachmentMapper;
|
||||||
import com.ydool.staff.service.IAttachmentService;
|
import com.ydool.staff.service.IAttachmentService;
|
||||||
|
import com.ydool.system.mapper.UserMapper;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@ -25,6 +28,8 @@ public class AttachmentServiceImpl extends BaseService<AttachmentMapper, Attachm
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
AttachmentMapper attachmentMapper;
|
AttachmentMapper attachmentMapper;
|
||||||
|
@Autowired
|
||||||
|
UserMapper userMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean savePersonnel(Attachment entity) {
|
public boolean savePersonnel(Attachment entity) {
|
||||||
|
@ -44,7 +49,13 @@ public class AttachmentServiceImpl extends BaseService<AttachmentMapper, Attachm
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult fileList(Page<Attachment> page, String id) {
|
public AjaxResult fileList(Page<Attachment> page, String id) {
|
||||||
return AjaxResult.ok().data(attachmentMapper.selectPage(page, new LambdaQueryWrapper<Attachment>().eq(Attachment::getTargetId, id)));
|
Page<Attachment> attachmentPage = attachmentMapper.selectPage(page, new LambdaQueryWrapper<Attachment>().eq(Attachment::getTargetId, id).eq(Attachment::getCreatedId, StpUtil.getLoginIdAsString()));
|
||||||
|
for (Attachment record : attachmentPage.getRecords()) {
|
||||||
|
record.setSuffix(FileUtil.extName(record.getPath()).toUpperCase());
|
||||||
|
record.setCreatedId(userMapper.selectById(record.getCreatedId()).getUserName());
|
||||||
|
record.setUpdatedId(userMapper.selectById(record.getUpdatedId()).getUserName());
|
||||||
|
}
|
||||||
|
return AjaxResult.ok().data(attachmentPage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -107,7 +107,7 @@ sa-token:
|
||||||
# 在多人登录同一账号时,是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token)
|
# 在多人登录同一账号时,是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token)
|
||||||
is-share: true
|
is-share: true
|
||||||
# token风格
|
# token风格
|
||||||
token-style: uuid
|
token-style: simple-uuid
|
||||||
# 是否输出操作日志
|
# 是否输出操作日志
|
||||||
is-log: false
|
is-log: false
|
||||||
# token前缀
|
# token前缀
|
||||||
|
|
Loading…
Reference in New Issue