财务门户设计
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package com.jeesite.modules.biz.dao;
|
||||
|
||||
import com.jeesite.common.dao.CrudDao;
|
||||
import com.jeesite.common.mybatis.annotation.MyBatisDao;
|
||||
import com.jeesite.modules.biz.entity.BizNotes;
|
||||
|
||||
/**
|
||||
* 便签管理表DAO接口
|
||||
* @author gaoxq
|
||||
* @version 2026-02-19
|
||||
*/
|
||||
@MyBatisDao(dataSourceName="work")
|
||||
public interface BizNotesDao extends CrudDao<BizNotes> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package com.jeesite.modules.biz.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import com.jeesite.common.mybatis.annotation.JoinTable;
|
||||
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
|
||||
import com.jeesite.common.entity.DataEntity;
|
||||
import com.jeesite.common.mybatis.annotation.Column;
|
||||
import com.jeesite.common.mybatis.annotation.Table;
|
||||
import com.jeesite.common.mybatis.mapper.query.QueryType;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 便签管理表Entity
|
||||
*
|
||||
* @author gaoxq
|
||||
* @version 2026-02-19
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table(name = "biz_notes", alias = "a", label = "便签管理表信息", columns = {
|
||||
@Column(name = "create_time", attrName = "createTime", label = "创建时间", isUpdate = false, isQuery = false, isUpdateForce = true),
|
||||
@Column(name = "id", attrName = "id", label = "便签唯一标识", isPK = true),
|
||||
@Column(name = "content", attrName = "content", label = "便签内容", queryType = QueryType.LIKE),
|
||||
@Column(name = "ustatus", attrName = "ustatus", label = "便签状态"),
|
||||
@Column(name = "update_time", attrName = "updateTime", label = "更新时间"),
|
||||
@Column(name = "create_user", attrName = "createUser", label = "创建用户", isUpdate = false, isUpdateForce = true),
|
||||
}, orderBy = "a.create_time DESC"
|
||||
)
|
||||
@Data
|
||||
public class BizNotes extends DataEntity<BizNotes> implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
private Date createTime; // 创建时间
|
||||
private String content; // 便签内容
|
||||
private String ustatus; // 便签状态
|
||||
private Date updateTime; // 更新时间
|
||||
private String createUser; // 创建用户
|
||||
|
||||
public BizNotes() {
|
||||
this(null);
|
||||
}
|
||||
|
||||
public BizNotes(String id) {
|
||||
super(id);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
package com.jeesite.modules.biz.service;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.jeesite.common.entity.Page;
|
||||
import com.jeesite.common.service.CrudService;
|
||||
import com.jeesite.modules.biz.entity.BizNotes;
|
||||
import com.jeesite.modules.biz.dao.BizNotesDao;
|
||||
|
||||
/**
|
||||
* 便签管理表Service
|
||||
* @author gaoxq
|
||||
* @version 2026-02-19
|
||||
*/
|
||||
@Service
|
||||
public class BizNotesService extends CrudService<BizNotesDao, BizNotes> {
|
||||
|
||||
/**
|
||||
* 获取单条数据
|
||||
* @param bizNotes 主键
|
||||
*/
|
||||
@Override
|
||||
public BizNotes get(BizNotes bizNotes) {
|
||||
return super.get(bizNotes);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询分页数据
|
||||
* @param bizNotes 查询条件
|
||||
* @param bizNotes page 分页对象
|
||||
*/
|
||||
@Override
|
||||
public Page<BizNotes> findPage(BizNotes bizNotes) {
|
||||
return super.findPage(bizNotes);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表数据
|
||||
* @param bizNotes 查询条件
|
||||
*/
|
||||
@Override
|
||||
public List<BizNotes> findList(BizNotes bizNotes) {
|
||||
return super.findList(bizNotes);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存数据(插入或更新)
|
||||
* @param bizNotes 数据对象
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void save(BizNotes bizNotes) {
|
||||
super.save(bizNotes);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新状态
|
||||
* @param bizNotes 数据对象
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void updateStatus(BizNotes bizNotes) {
|
||||
super.updateStatus(bizNotes);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
* @param bizNotes 数据对象
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void delete(BizNotes bizNotes) {
|
||||
super.delete(bizNotes);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
package com.jeesite.modules.biz.web;
|
||||
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import com.jeesite.common.config.Global;
|
||||
import com.jeesite.common.entity.Page;
|
||||
import com.jeesite.common.web.BaseController;
|
||||
import com.jeesite.modules.biz.entity.BizNotes;
|
||||
import com.jeesite.modules.biz.service.BizNotesService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 便签管理表Controller
|
||||
*
|
||||
* @author gaoxq
|
||||
* @version 2026-02-19
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping(value = "${adminPath}/biz/notes")
|
||||
public class BizNotesController extends BaseController {
|
||||
|
||||
private final BizNotesService bizNotesService;
|
||||
|
||||
public BizNotesController(BizNotesService bizNotesService) {
|
||||
this.bizNotesService = bizNotesService;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取数据
|
||||
*/
|
||||
@ModelAttribute
|
||||
public BizNotes get(String id, boolean isNewRecord) {
|
||||
return bizNotesService.get(id, isNewRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
@RequestMapping(value = {"list", ""})
|
||||
public String list(BizNotes bizNotes, Model model) {
|
||||
model.addAttribute("bizNotes", bizNotes);
|
||||
return "modules/biz/bizNotesList";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表数据
|
||||
*/
|
||||
@RequestMapping(value = "listData")
|
||||
@ResponseBody
|
||||
public Page<BizNotes> listData(BizNotes bizNotes, HttpServletRequest request, HttpServletResponse response) {
|
||||
bizNotes.setPage(new Page<>(request, response));
|
||||
Page<BizNotes> page = bizNotesService.findPage(bizNotes);
|
||||
return page;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看编辑表单
|
||||
*/
|
||||
@RequestMapping(value = "form")
|
||||
public String form(BizNotes bizNotes, Model model) {
|
||||
model.addAttribute("bizNotes", bizNotes);
|
||||
return "modules/biz/bizNotesForm";
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存数据
|
||||
*/
|
||||
@PostMapping(value = "save")
|
||||
@ResponseBody
|
||||
public String save(@Validated BizNotes bizNotes) {
|
||||
bizNotesService.save(bizNotes);
|
||||
return renderResult(Global.TRUE, text("保存便签管理表成功!"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*/
|
||||
@RequestMapping(value = "delete")
|
||||
@ResponseBody
|
||||
public String delete(BizNotes bizNotes) {
|
||||
bizNotesService.delete(bizNotes);
|
||||
return renderResult(Global.TRUE, text("删除便签管理表成功!"));
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "listAll")
|
||||
@ResponseBody
|
||||
public List<BizNotes> listAll(BizNotes bizNotes) {
|
||||
return bizNotesService.findList(bizNotes);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user