Commit 22bca504 by 吴迪

编辑字段 最后编辑字段 修改提交

parent 1ee93933
package io.office.modules.manage.controller; package io.office.modules.manage.controller;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.office.common.annotation.SysLog; import io.office.common.annotation.SysLog;
import io.office.modules.manage.entity.GlossaryEntity; import io.office.common.utils.PageUtils;
import io.office.modules.manage.entity.MedicalEntity; import io.office.common.utils.R;
import io.office.modules.manage.entity.NewsEntity; import io.office.modules.manage.entity.AnnounceEntity;
import io.office.modules.manage.entity.dto.NewsParams; import io.office.modules.manage.entity.dto.NewsParams;
import io.office.modules.manage.service.AnnounceService;
import io.office.modules.sys.controller.AbstractController; import io.office.modules.sys.controller.AbstractController;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import io.office.modules.manage.entity.AnnounceEntity; import java.util.Date;
import io.office.modules.manage.service.AnnounceService; import java.util.List;
import io.office.common.utils.PageUtils;
import io.office.common.utils.R;
...@@ -30,7 +27,7 @@ import io.office.common.utils.R; ...@@ -30,7 +27,7 @@ import io.office.common.utils.R;
* 公告通知 * 公告通知
* *
* @author wudi * @author wudi
* @email * @email
* @date 2021-12-07 15:26:10 * @date 2021-12-07 15:26:10
*/ */
@RestController @RestController
...@@ -89,7 +86,7 @@ public class AnnounceController extends AbstractController { ...@@ -89,7 +86,7 @@ public class AnnounceController extends AbstractController {
@RequestMapping("/update") @RequestMapping("/update")
@RequiresPermissions("manage:announce:update") @RequiresPermissions("manage:announce:update")
public R update(@RequestBody AnnounceEntity announce){ public R update(@RequestBody AnnounceEntity announce){
announce.setEditor(getUser().getUsername()); announce.setLasteditor(getUser().getUsername());
announce.setUpdatedate(new Date()); announce.setUpdatedate(new Date());
announceService.updateById(announce); announceService.updateById(announce);
return R.ok("修改成功!"); return R.ok("修改成功!");
......
...@@ -3,16 +3,16 @@ package io.office.modules.manage.entity; ...@@ -3,16 +3,16 @@ package io.office.modules.manage.entity;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
import lombok.Data;
/** /**
* ${comments} * ${comments}
* *
* @author wudi * @author wudi
* @email * @email
* @date 2021-12-07 15:26:10 * @date 2021-12-07 15:26:10
*/ */
@Data @Data
...@@ -77,4 +77,7 @@ public class AnnounceEntity implements Serializable { ...@@ -77,4 +77,7 @@ public class AnnounceEntity implements Serializable {
@TableField(exist = false) @TableField(exist = false)
private String className; private String className;
private String lasteditor;
} }
...@@ -47,6 +47,7 @@ public class AnnounceServiceImpl extends ServiceImpl<AnnounceDao, AnnounceEntity ...@@ -47,6 +47,7 @@ public class AnnounceServiceImpl extends ServiceImpl<AnnounceDao, AnnounceEntity
public void insertAnnounce(AnnounceEntity announce, SysUserEntity user) { public void insertAnnounce(AnnounceEntity announce, SysUserEntity user) {
announce.setReleasedate(new Date()); announce.setReleasedate(new Date());
announce.setUpdatedate(new Date()); announce.setUpdatedate(new Date());
announce.setLasteditor(user.getUsername());
announce.setEditor(user.getUsername()); announce.setEditor(user.getUsername());
announce.setStatus(0); announce.setStatus(0);
this.baseMapper.insert(announce); this.baseMapper.insert(announce);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment