Compare commits

...

7 Commits

Author SHA1 Message Date
wangliwen d0cca3951c 通知优化 2022-06-23 15:21:44 +08:00
wangliwen a911fdeee9 评论审核流程 2022-06-23 14:42:54 +08:00
wangliwen 6f394a3f99 ... 2022-06-23 11:48:28 +08:00
wangliwen 35a87b2f3d Merge remote-tracking branch 'origin/project-qiaosen-0621' 2022-06-23 11:45:37 +08:00
wangliwen b5d084128c 需求评论增加删除标识 2022-06-23 11:45:19 +08:00
qiaosen f6a8112a04 添加建表sql 2022-06-23 10:45:46 +08:00
qiaosen f35e726d54 新增项目管理 2022-06-23 10:21:48 +08:00
36 changed files with 1555 additions and 68 deletions

View File

@ -333,6 +333,7 @@ public class ActivitiNoticeAspect {
dto.setSenderDate(new Date()); dto.setSenderDate(new Date());
dto.setCreator(sysUserService.getByUsername("admin").getId()); dto.setCreator(sysUserService.getByUsername("admin").getId());
dto.setCreateDate(new Date()); dto.setCreateDate(new Date());
dto.setFrom("通知");
sysNoticeService.save(dto); sysNoticeService.save(dto);
}).thenRunAsync(() -> { // 审批者 }).thenRunAsync(() -> { // 审批者
SysUserDTO owner = sysUserService.get(Long.valueOf(finalCreator)); SysUserDTO owner = sysUserService.get(Long.valueOf(finalCreator));
@ -348,6 +349,7 @@ public class ActivitiNoticeAspect {
dto.setSenderDate(new Date()); dto.setSenderDate(new Date());
dto.setCreator(sysUserService.getByUsername("admin").getId()); dto.setCreator(sysUserService.getByUsername("admin").getId());
dto.setCreateDate(new Date()); dto.setCreateDate(new Date());
dto.setFrom("通知");
sysNoticeService.save(dto); sysNoticeService.save(dto);
}).thenRunAsync(() -> { // 防止重放 }).thenRunAsync(() -> { // 防止重放
new Thread(() -> { new Thread(() -> {

View File

@ -29,6 +29,7 @@ import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.concurrent.CompletableFuture;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -109,10 +110,12 @@ public class AbilityCenterController {
processStartDTO.setVariables(variables); processStartDTO.setVariables(variables);
ProcessInstanceDTO dto = actRunningService.startOfBusinessKey(processStartDTO); ProcessInstanceDTO dto = actRunningService.startOfBusinessKey(processStartDTO);
if (Long.valueOf(dto.getBusinessKey()) != null) { // 仿照请求接口 /processForm/tabilityapplication/updateInstanceId
// 仿照请求接口 /processForm/tabilityapplication/updateInstanceId CompletableFuture.runAsync(() -> {
tAbilityApplicationService.updateInstanceId(dto.getProcessInstanceId(), Long.valueOf(dto.getBusinessKey())); if (Long.valueOf(dto.getBusinessKey()) != null) {
} tAbilityApplicationService.updateInstanceId(dto.getProcessInstanceId(), Long.valueOf(dto.getBusinessKey()));
}
});
return dto; return dto;
}).filter(index -> ObjectUtil.isNotNull(index)).collect(Collectors.toList())); }).filter(index -> ObjectUtil.isNotNull(index)).collect(Collectors.toList()));
} }

View File

@ -0,0 +1,99 @@
package io.renren.common.controller;
import io.renren.common.page.PageData;
import io.renren.common.utils.Result;
import io.renren.modules.activiti.dto.ProcessInstanceDTO;
import io.renren.modules.activiti.dto.ProcessStartDTO;
import io.renren.modules.activiti.service.ActProcessService;
import io.renren.modules.activiti.service.ActRunningService;
import io.renren.modules.demandComment.dto.TDemandCommentDTO;
import io.renren.modules.demandComment.service.TDemandCommentService;
import io.renren.modules.processForm.service.TAbilityApplicationService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.codehaus.jackson.map.ObjectMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
@Api(tags = "评论审核")
@RestController
@RequestMapping("/comment/center")
public class CommentController {
@Autowired
private ActProcessService actProcessService;
@Autowired
private TAbilityApplicationService tAbilityApplicationService;
@Autowired
private ActRunningService actRunningService;
@Autowired
private TDemandCommentService tDemandCommentService;
@Autowired
private JdbcTemplate jdbcTemplate;
private static Logger logger = LoggerFactory.getLogger(CommentController.class);
private static String key = "comment_review";
private static Map<String, Object> params = new HashMap<String, Object>() {
{
put("isLatestVersion", true); // 取最新版本
put("key", key); // 限定
}
};
/**
* 批量进行批量能力申请
*
* @param tDemandCommentDTO
* @return
*/
@PostMapping(value = "/apply")
@ApiOperation("批量进行评论审核申请")
public Result<ProcessInstanceDTO> apply(@RequestBody TDemandCommentDTO tDemandCommentDTO) {
// 仿照请求接口 /act/process/lastestPage
PageData<Map<String, Object>> page = actProcessService.page(params);
if (page.getTotal() <= 0) { //
return new Result().error("联系管理员添加流程");
}
if (tDemandCommentDTO.getId() == null) {
return new Result().error("参数异常");
}
tDemandCommentDTO = tDemandCommentService.get(tDemandCommentDTO.getId());
if (tDemandCommentDTO.getId() == null) {
return new Result().error("该评论不存在");
}
tDemandCommentDTO.setDelFlag(2); // 待审核
tDemandCommentDTO.setCompleteEntry(Boolean.TRUE);
tDemandCommentService.update(tDemandCommentDTO);
// 仿照请求接口 /act/running/startOfBusinessKey
ProcessStartDTO processStartDTO = new ProcessStartDTO();
processStartDTO.setBusinessKey(tDemandCommentDTO.getId().toString());
processStartDTO.setProcessDefinitionKey(key); //限定
ObjectMapper oMapper = new ObjectMapper();
Map<String, Object> variables = oMapper.convertValue(tDemandCommentDTO, Map.class);
processStartDTO.setVariables(variables);
ProcessInstanceDTO dto = actRunningService.startOfBusinessKey(processStartDTO);
tDemandCommentDTO.setDelFlag(3); // 审核中
tDemandCommentService.update(tDemandCommentDTO);
CompletableFuture.runAsync(() -> {
if (Long.valueOf(dto.getBusinessKey()) != null) {
jdbcTemplate.update(String.format("UPDATE t_demand_comment SET instance_id = '%s' WHERE id = %s", dto.getProcessInstanceId(), dto.getBusinessKey()));
}
});
return new Result<ProcessInstanceDTO>().ok(dto);
}
}

View File

@ -104,7 +104,7 @@ public class TDemandCommentController {
@ApiOperation("保存") @ApiOperation("保存")
@LogOperation("保存") @LogOperation("保存")
// @RequiresPermissions("demandComment:tdemandcomment:save") // @RequiresPermissions("demandComment:tdemandcomment:save")
public Result save(@RequestBody TDemandCommentDTO dto) { public Result<TDemandCommentDTO> save(@RequestBody TDemandCommentDTO dto) {
//效验数据 //效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
TDemandDataDTO dto1 = TDemandDataDTO dto1 =
@ -115,9 +115,10 @@ public class TDemandCommentController {
if (dto1.getFlag() != 3) { if (dto1.getFlag() != 3) {
return new Result().error("该评论主题未审批通过!"); return new Result().error("该评论主题未审批通过!");
} }
dto.setDelFlag(1);
tDemandCommentService.save(dto); tDemandCommentService.save(dto);
return new Result(); return new Result().ok(dto);
} }
@PutMapping @PutMapping

View File

@ -1,5 +1,6 @@
package io.renren.modules.demandComment.dto; package io.renren.modules.demandComment.dto;
import io.renren.common.dto.AuditingBaseDTO;
import io.renren.modules.demanData.dto.TDemandDataDTO; import io.renren.modules.demanData.dto.TDemandDataDTO;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
@ -16,7 +17,7 @@ import java.util.Date;
*/ */
@Data @Data
@ApiModel(value = "需求评论") @ApiModel(value = "需求评论")
public class TDemandCommentDTO implements Serializable { public class TDemandCommentDTO extends AuditingBaseDTO implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private Long id; private Long id;
@ -42,6 +43,8 @@ public class TDemandCommentDTO implements Serializable {
private String note4; private String note4;
@ApiModelProperty(value = "备用字段") @ApiModelProperty(value = "备用字段")
private String note5; private String note5;
@ApiModelProperty(value = "删除标志0:正常1:已删除2:待审核3:审核中9其他")
private Integer delFlag;
@ApiModelProperty(value = "评论所属需求主题") @ApiModelProperty(value = "评论所属需求主题")
private TDemandDataDTO demandDataDTO; private TDemandDataDTO demandDataDTO;

View File

@ -1,10 +1,9 @@
package io.renren.modules.demandComment.entity; package io.renren.modules.demandComment.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.renren.common.entity.BaseEntity;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import com.baomidou.mybatisplus.annotation.*;
import java.util.Date;
import io.renren.common.entity.BaseEntity;
/** /**
* 需求评论 * 需求评论
@ -13,45 +12,50 @@ import io.renren.common.entity.BaseEntity;
* @since 1.0 2022-04-26 * @since 1.0 2022-04-26
*/ */
@Data @Data
@EqualsAndHashCode(callSuper=false) @EqualsAndHashCode(callSuper = false)
@TableName("t_demand_comment") @TableName("t_demand_comment")
public class TDemandCommentEntity extends BaseEntity { public class TDemandCommentEntity extends BaseEntity {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* 评论人部门名称 * 评论人部门名称
*/ */
private String createDeptName; private String createDeptName;
/** /**
* 评论人姓名 * 评论人姓名
*/ */
private String name; private String name;
/** /**
* 评论内容 * 评论内容
*/ */
private String comment; private String comment;
/** /**
* 评论主题id * 评论主题id
*/ */
private Long targetId; private Long targetId;
/** /**
* 备用字段 * 备用字段
*/ */
private String note1; private String note1;
/** /**
* 备用字段 * 备用字段
*/ */
private String note2; private String note2;
/** /**
* 备用字段 * 备用字段
*/ */
private String note3; private String note3;
/** /**
* 备用字段 * 备用字段
*/ */
private String note4; private String note4;
/** /**
* 备用字段 * 备用字段
*/ */
private String note5; private String note5;
/**
* 删除标志0:正常1:已删除2:待审核3:审核中9其他
*/
private Integer delFlag;
} }

View File

@ -0,0 +1,143 @@
package io.renren.modules.demandComment.listener;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonDeserializer;
import com.google.gson.JsonElement;
import io.renren.common.annotation.ActivitiNoticeOperation;
import io.renren.modules.demandComment.dto.TDemandCommentDTO;
import io.renren.modules.demandComment.service.TDemandCommentService;
import io.renren.modules.sys.dto.SysDeptDTO;
import io.renren.modules.sys.dto.SysRoleDTO;
import io.renren.modules.sys.dto.SysUserDTO;
import io.renren.modules.sys.service.SysDeptService;
import io.renren.modules.sys.service.SysRoleService;
import io.renren.modules.sys.service.SysRoleUserService;
import io.renren.modules.sys.service.SysUserService;
import org.activiti.engine.TaskService;
import org.activiti.engine.delegate.*;
import org.activiti.engine.delegate.event.ActivitiEvent;
import org.activiti.engine.delegate.event.ActivitiEventListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import java.util.Date;
import java.util.Map;
/**
* 大数据局动态审批人
*/
@Component
public class CommentListener implements TaskListener, ExecutionListener, ActivitiEventListener, JavaDelegate {
private static Logger logger = LoggerFactory.getLogger(CommentListener.class);
@Value("${big_date.name}")
private String bigDateDeptName; // 大数据局名称
@Value("${big_date.assignee_role_name}")
private String roleName; // 具备审批的角色名称
@Autowired
private SysRoleService sysRoleService;
@Autowired
private TaskService taskService;
@Autowired
private SysUserService sysUserService;
@Autowired
private SysRoleUserService sysRoleUserService;
@Autowired
private SysDeptService sysDeptService;
@Autowired
private TDemandCommentService tDemandCommentService;
@Override
public void notify(DelegateExecution delegateExecution) throws Exception {
logger.error("----------------------进入审批结束节点---------------------------");
delegateExecution.getProcessBusinessKey();
final String eventName = delegateExecution.getEventName();
switch (eventName) {
case EVENTNAME_END:
endTake(delegateExecution.getVariables());
break;
}
}
/**
* 结束审批
*
* @param kv
*/
private void endTake(Map<String, Object> kv) { // 进入最后结束节点
GsonBuilder builder = new GsonBuilder();
builder.registerTypeAdapter(Date.class, (JsonDeserializer<Date>) (json, typeOfT, context) -> new Date(json.getAsJsonPrimitive().getAsLong()));
Gson gson = builder.create();
JsonElement jsonElement = gson.toJsonTree(kv);
TDemandCommentDTO tDemandCommentDTO = gson.fromJson(jsonElement, TDemandCommentDTO.class);
if (tDemandCommentDTO != null) {
if (tDemandCommentDTO.getReject() != null && tDemandCommentDTO.getReject() == Boolean.TRUE) { // 存在被拒绝的节点
tDemandCommentDTO.setDelFlag(1);
tDemandCommentService.update(tDemandCommentDTO);
logger.error("评论审核不通过不通过申请id:" + tDemandCommentDTO.getId());
} else {
tDemandCommentDTO.setDelFlag(0);
tDemandCommentService.update(tDemandCommentDTO);
logger.error("审批通过评论id:" + tDemandCommentDTO.getId());
}
}
}
@Override
public void execute(DelegateExecution delegateExecution) throws Exception {
}
@Override
@ActivitiNoticeOperation(value = "评论审核", process = "评论审核流程")
public void notify(DelegateTask delegateTask) {
logger.error("事件类型:" + delegateTask.getEventName());
final String eventName = delegateTask.getEventName();
switch (eventName) {
case EVENTNAME_CREATE:
createEvent(delegateTask);
break;
default:
logger.error("未处理该事件:" + eventName);
}
}
@Override
public void onEvent(ActivitiEvent activitiEvent) {
}
@Override
public boolean isFailOnException() {
return false;
}
/**
* 节点创建时动态分配大数据局审批人
*
* @param delegateTask
*/
private void createEvent(DelegateTask delegateTask) {
logger.error("大数据局名称:" + bigDateDeptName);
SysDeptDTO deptDTO = sysDeptService.getByName(bigDateDeptName);
logger.error("deptDTOId:" + deptDTO.getId());
SysRoleDTO roleDTO = sysRoleService.getByName(roleName);
logger.error("roleDTOId:" + roleDTO.getId());
SysUserDTO userDTO = sysUserService.getByDeptIdAndRoleId(deptDTO.getId(), roleDTO.getId());
if (userDTO != null) {
logger.error("审批人id:" + userDTO.getId());
taskService.setAssignee(delegateTask.getId(), userDTO.getId().toString());
} else {
delegateTask.setAssignee("1516728698224427010");
logger.error("未查到该部门对应 " + roleName);
}
}
}

View File

@ -76,23 +76,30 @@ public class TDemandCommentServiceImpl extends CrudServiceImpl<TDemandCommentDao
@Override @Override
public void save(TDemandCommentDTO tDemandCommentDTO) { public void save(TDemandCommentDTO tDemandCommentDTO) {
super.save(tDemandCommentDTO); super.save(tDemandCommentDTO);
CompletableFuture.runAsync(() -> { // 发起人 }
Optional<TDemandDataDTO> tDemandDataDTO = Optional.ofNullable(tDemandDataService.get(tDemandCommentDTO.getTargetId()));
Optional<SysUserDTO> sysUserDTO = Optional.ofNullable(sysUserService.get(tDemandDataDTO.isPresent() ? tDemandDataDTO.get().getCreator() : null)); @Override
String content = "【评论】" + (sysUserDTO.isPresent() ? sysUserDTO.get().getRealName() : "") + "您发起的需求 " + tDemandDataDTO.orElse(new TDemandDataDTO()).getDemandSubject() + "有新的评论,请前往查看详情"; public void update(TDemandCommentDTO tDemandCommentDTO) {
SysNoticeDTO dto = new SysNoticeDTO(); super.update(tDemandCommentDTO);
dto.setType(2); if (tDemandCommentDTO.getDelFlag() == 0) {
dto.setTitle("需求评论系统通知"); CompletableFuture.runAsync(() -> { // 发起人
dto.setContent(content); // 通知内容 Optional<TDemandDataDTO> tDemandDataDTO = Optional.ofNullable(tDemandDataService.get(tDemandCommentDTO.getTargetId()));
dto.setReceiverType(1); Optional<SysUserDTO> sysUserDTO = Optional.ofNullable(sysUserService.get(tDemandDataDTO.isPresent() ? tDemandDataDTO.get().getCreator() : null));
dto.setReceiverTypeIds(tDemandDataDTO.isPresent() ? tDemandDataDTO.get().getCreator().toString() : ""); String content = "【评论】" + (sysUserDTO.isPresent() ? sysUserDTO.get().getRealName() : "") + "您发起的需求 " + tDemandDataDTO.orElse(new TDemandDataDTO()).getDemandSubject() + "有新的评论,请前往查看详情";
dto.setStatus(NoticeStatusEnum.SEND.value()); SysNoticeDTO dto = new SysNoticeDTO();
dto.setSenderName("流程系统"); dto.setType(2);
dto.setSenderDate(new Date()); dto.setTitle("需求评论系统通知");
dto.setCreator(sysUserService.getByUsername("admin").getId()); dto.setContent(content); // 通知内容
dto.setCreateDate(new Date()); dto.setReceiverType(1);
dto.setFrom("评论"); dto.setReceiverTypeIds(tDemandDataDTO.isPresent() ? tDemandDataDTO.get().getCreator().toString() : "");
sysNoticeService.save(dto); dto.setStatus(NoticeStatusEnum.SEND.value());
}); dto.setSenderName("流程系统");
dto.setSenderDate(new Date());
dto.setCreator(sysUserService.getByUsername("admin").getId());
dto.setCreateDate(new Date());
dto.setFrom("评论");
sysNoticeService.save(dto);
});
}
} }
} }

View File

@ -40,6 +40,7 @@ public class SysNoticeEntity extends BaseEntity {
/** /**
* 发送状态 0草稿 1已发布 * 发送状态 0草稿 1已发布
*/ */
@TableField(value = "`status`")
private Integer status; private Integer status;
/** /**
* 发送者 * 发送者
@ -68,5 +69,6 @@ public class SysNoticeEntity extends BaseEntity {
/** /**
* 通知来源 (通知评论其他) * 通知来源 (通知评论其他)
*/ */
@TableField(value = "`from`")
private String from; private String from;
} }

View File

@ -86,7 +86,9 @@ public class SysNoticeServiceImpl extends CrudServiceImpl<SysNoticeDao, SysNotic
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void save(SysNoticeDTO dto) { public void save(SysNoticeDTO dto) {
SysNoticeEntity entity = ConvertUtils.sourceToTarget(dto, SysNoticeEntity.class); SysNoticeEntity entity = ConvertUtils.sourceToTarget(dto, SysNoticeEntity.class);
entity.setFrom("其它"); // 站内信通知来源 (通知评论其它) if (StringUtils.isEmpty(entity.getFrom())) {
entity.setFrom("其它"); // 站内信通知来源 (通知评论其它)
}
//更新发送者信息 //更新发送者信息
if (dto.getStatus() == NoticeStatusEnum.SEND.value() && StringUtils.isEmpty(dto.getSenderName())) { if (dto.getStatus() == NoticeStatusEnum.SEND.value() && StringUtils.isEmpty(dto.getSenderName())) {

View File

@ -0,0 +1,116 @@
package io.renren.modules.project.controller;
import io.renren.common.annotation.LogOperation;
import io.renren.common.constant.Constant;
import io.renren.common.page.PageData;
import io.renren.common.utils.ExcelUtils;
import io.renren.common.utils.Result;
import io.renren.common.validator.AssertUtils;
import io.renren.common.validator.ValidatorUtils;
import io.renren.common.validator.group.AddGroup;
import io.renren.common.validator.group.DefaultGroup;
import io.renren.common.validator.group.UpdateGroup;
import io.renren.modules.project.dto.TbProjectContribDTO;
import io.renren.modules.project.excel.TbProjectContribExcel;
import io.renren.modules.project.service.TbProjectContribService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 项目贡献表
*
* @author qs
* @since 3.0 2022-06-22
*/
@RestController
@RequestMapping("projectcontrib")
@Api(tags="项目贡献表")
public class TbProjectContribController {
@Autowired
private TbProjectContribService tbProjectContribService;
@GetMapping("page")
@ApiOperation("分页")
@ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String")
})
@RequiresPermissions("project:tbprojectcontrib:page")
public Result<PageData<TbProjectContribDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
PageData<TbProjectContribDTO> page = tbProjectContribService.page(params);
return new Result<PageData<TbProjectContribDTO>>().ok(page);
}
@GetMapping("{id}")
@ApiOperation("信息")
@RequiresPermissions("project:tbprojectcontrib:info")
public Result<TbProjectContribDTO> get(@PathVariable("id") Long id){
TbProjectContribDTO data = tbProjectContribService.get(id);
return new Result<TbProjectContribDTO>().ok(data);
}
@PostMapping
@ApiOperation("保存")
@LogOperation("保存")
@RequiresPermissions("project:tbprojectcontrib:save")
public Result save(@RequestBody TbProjectContribDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
tbProjectContribService.save(dto);
return new Result();
}
@PutMapping
@ApiOperation("修改")
@LogOperation("修改")
@RequiresPermissions("project:tbprojectcontrib:update")
public Result update(@RequestBody TbProjectContribDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
tbProjectContribService.update(dto);
return new Result();
}
@DeleteMapping
@ApiOperation("删除")
@LogOperation("删除")
@RequiresPermissions("project:tbprojectcontrib:delete")
public Result delete(@RequestBody Long[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
tbProjectContribService.delete(ids);
return new Result();
}
@GetMapping("export")
@ApiOperation("导出")
@LogOperation("导出")
@RequiresPermissions("project:tbprojectcontrib:export")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<TbProjectContribDTO> list = tbProjectContribService.list(params);
ExcelUtils.exportExcelToTarget(response, null, "项目贡献表", list, TbProjectContribExcel.class);
}
}

View File

@ -0,0 +1,116 @@
package io.renren.modules.project.controller;
import io.renren.common.annotation.LogOperation;
import io.renren.common.constant.Constant;
import io.renren.common.page.PageData;
import io.renren.common.utils.ExcelUtils;
import io.renren.common.utils.Result;
import io.renren.common.validator.AssertUtils;
import io.renren.common.validator.ValidatorUtils;
import io.renren.common.validator.group.AddGroup;
import io.renren.common.validator.group.DefaultGroup;
import io.renren.common.validator.group.UpdateGroup;
import io.renren.modules.project.dto.TbProjectDTO;
import io.renren.modules.project.excel.TbProjectExcel;
import io.renren.modules.project.service.TbProjectService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 项目表
*
* @author qiaosen
* @since 3.0 2022-06-22
*/
@RestController
@RequestMapping("project")
@Api(tags="项目表")
public class TbProjectController {
@Autowired
private TbProjectService tbProjectService;
@GetMapping("page")
@ApiOperation("分页")
@ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String")
})
@RequiresPermissions("project:tbproject:page")
public Result<PageData<TbProjectDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
PageData<TbProjectDTO> page = tbProjectService.page(params);
return new Result<PageData<TbProjectDTO>>().ok(page);
}
@GetMapping("{id}")
@ApiOperation("信息")
@RequiresPermissions("project:tbproject:info")
public Result<TbProjectDTO> get(@PathVariable("id") Long id){
TbProjectDTO data = tbProjectService.get(id);
return new Result<TbProjectDTO>().ok(data);
}
@PostMapping
@ApiOperation("保存")
@LogOperation("保存")
@RequiresPermissions("project:tbproject:save")
public Result save(@RequestBody TbProjectDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
tbProjectService.save(dto);
return new Result();
}
@PutMapping
@ApiOperation("修改")
@LogOperation("修改")
@RequiresPermissions("project:tbproject:update")
public Result update(@RequestBody TbProjectDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
tbProjectService.update(dto);
return new Result();
}
@DeleteMapping
@ApiOperation("删除")
@LogOperation("删除")
@RequiresPermissions("project:tbproject:delete")
public Result delete(@RequestBody Long[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
tbProjectService.delete(ids);
return new Result();
}
@GetMapping("export")
@ApiOperation("导出")
@LogOperation("导出")
@RequiresPermissions("project:tbproject:export")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<TbProjectDTO> list = tbProjectService.list(params);
ExcelUtils.exportExcelToTarget(response, null, "项目表", list, TbProjectExcel.class);
}
}

View File

@ -0,0 +1,116 @@
package io.renren.modules.project.controller;
import io.renren.common.annotation.LogOperation;
import io.renren.common.constant.Constant;
import io.renren.common.page.PageData;
import io.renren.common.utils.ExcelUtils;
import io.renren.common.utils.Result;
import io.renren.common.validator.AssertUtils;
import io.renren.common.validator.ValidatorUtils;
import io.renren.common.validator.group.AddGroup;
import io.renren.common.validator.group.DefaultGroup;
import io.renren.common.validator.group.UpdateGroup;
import io.renren.modules.project.dto.TbProjectUseDTO;
import io.renren.modules.project.excel.TbProjectUseExcel;
import io.renren.modules.project.service.TbProjectUseService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 项目使用表
*
* @author qs sunlightcs@gmail.com
* @since 3.0 2022-06-22
*/
@RestController
@RequestMapping("projectuse")
@Api(tags="项目使用表")
public class TbProjectUseController {
@Autowired
private TbProjectUseService tbProjectUseService;
@GetMapping("page")
@ApiOperation("分页")
@ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String")
})
@RequiresPermissions("project:tbprojectuse:page")
public Result<PageData<TbProjectUseDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
PageData<TbProjectUseDTO> page = tbProjectUseService.page(params);
return new Result<PageData<TbProjectUseDTO>>().ok(page);
}
@GetMapping("{id}")
@ApiOperation("信息")
@RequiresPermissions("project:tbprojectuse:info")
public Result<TbProjectUseDTO> get(@PathVariable("id") Long id){
TbProjectUseDTO data = tbProjectUseService.get(id);
return new Result<TbProjectUseDTO>().ok(data);
}
@PostMapping
@ApiOperation("保存")
@LogOperation("保存")
@RequiresPermissions("project:tbprojectuse:save")
public Result save(@RequestBody TbProjectUseDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
tbProjectUseService.save(dto);
return new Result();
}
@PutMapping
@ApiOperation("修改")
@LogOperation("修改")
@RequiresPermissions("project:tbprojectuse:update")
public Result update(@RequestBody TbProjectUseDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
tbProjectUseService.update(dto);
return new Result();
}
@DeleteMapping
@ApiOperation("删除")
@LogOperation("删除")
@RequiresPermissions("project:tbprojectuse:delete")
public Result delete(@RequestBody Long[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
tbProjectUseService.delete(ids);
return new Result();
}
@GetMapping("export")
@ApiOperation("导出")
@LogOperation("导出")
@RequiresPermissions("project:tbprojectuse:export")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<TbProjectUseDTO> list = tbProjectUseService.list(params);
ExcelUtils.exportExcelToTarget(response, null, "项目使用表", list, TbProjectUseExcel.class);
}
}

View File

@ -0,0 +1,16 @@
package io.renren.modules.project.dao;
import io.renren.common.dao.BaseDao;
import io.renren.modules.project.entity.TbProjectContribEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 项目贡献表
*
* @author qs
* @since 3.0 2022-06-22
*/
@Mapper
public interface TbProjectContribDao extends BaseDao<TbProjectContribEntity> {
}

View File

@ -0,0 +1,16 @@
package io.renren.modules.project.dao;
import io.renren.common.dao.BaseDao;
import io.renren.modules.project.entity.TbProjectEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 项目表
*
* @author qiaosen
* @since 3.0 2022-06-22
*/
@Mapper
public interface TbProjectDao extends BaseDao<TbProjectEntity> {
}

View File

@ -0,0 +1,16 @@
package io.renren.modules.project.dao;
import io.renren.common.dao.BaseDao;
import io.renren.modules.project.entity.TbProjectUseEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 项目使用表
*
* @author qs sunlightcs@gmail.com
* @since 3.0 2022-06-22
*/
@Mapper
public interface TbProjectUseDao extends BaseDao<TbProjectUseEntity> {
}

View File

@ -0,0 +1,56 @@
package io.renren.modules.project.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 项目贡献表
*
* @author qs
* @since 3.0 2022-06-22
*/
@Data
@ApiModel(value = "项目贡献表")
public class TbProjectContribDTO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "主键")
private Long id;
@ApiModelProperty(value = "项目名称")
private String projectName;
@ApiModelProperty(value = "应用名称")
private String resourceName;
@ApiModelProperty(value = "能力名称")
private String abilityName;
@ApiModelProperty(value = "能力类型")
private String abilityType;
@ApiModelProperty(value = "上架时间")
private Date applyTime;
@ApiModelProperty(value = "申请次数")
private String applyNum;
@ApiModelProperty(value = "浏览次数")
private String browseNum;
@ApiModelProperty(value = "创建人")
private Long creator;
@ApiModelProperty(value = "创建时间")
private Date createDate;
@ApiModelProperty(value = "修改人")
private Long updater;
@ApiModelProperty(value = "修改时间")
private Date updateDate;
@ApiModelProperty(value = "备用字段")
private String note1;
@ApiModelProperty(value = "备用字段")
private String note2;
@ApiModelProperty(value = "备用字段")
private String note3;
@ApiModelProperty(value = "备用字段")
private String note4;
@ApiModelProperty(value = "备用字段")
private String note5;
}

View File

@ -0,0 +1,62 @@
package io.renren.modules.project.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 项目表
*
* @author qiaosen
* @since 3.0 2022-06-22
*/
@Data
@ApiModel(value = "项目表")
public class TbProjectDTO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "主键")
private Long id;
@ApiModelProperty(value = "项目名称")
private String projectName;
@ApiModelProperty(value = "申请单位")
private String applyDep;
@ApiModelProperty(value = "申请人")
private String applyUser;
@ApiModelProperty(value = "申请时间")
private Date applyTime;
@ApiModelProperty(value = "所属区市")
private String regionName;
@ApiModelProperty(value = "责任处室")
private String respDep;
@ApiModelProperty(value = "业务联系人")
private String businessUser;
@ApiModelProperty(value = "业务联系电话")
private String businessPhone;
@ApiModelProperty(value = "技术联系人")
private String techUser;
@ApiModelProperty(value = "技术联系电话")
private String techPhone;
@ApiModelProperty(value = "创建人")
private Long creator;
@ApiModelProperty(value = "创建时间")
private Date createDate;
@ApiModelProperty(value = "修改人")
private Long updater;
@ApiModelProperty(value = "修改时间")
private Date updateDate;
@ApiModelProperty(value = "备用字段")
private String note1;
@ApiModelProperty(value = "备用字段")
private String note2;
@ApiModelProperty(value = "备用字段")
private String note3;
@ApiModelProperty(value = "备用字段")
private String note4;
@ApiModelProperty(value = "备用字段")
private String note5;
}

View File

@ -0,0 +1,56 @@
package io.renren.modules.project.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 项目使用表
*
* @author qs sunlightcs@gmail.com
* @since 3.0 2022-06-22
*/
@Data
@ApiModel(value = "项目使用表")
public class TbProjectUseDTO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "主键")
private Long id;
@ApiModelProperty(value = "项目名称")
private String projectName;
@ApiModelProperty(value = "应用名称")
private String resourceName;
@ApiModelProperty(value = "能力名称")
private String abilityName;
@ApiModelProperty(value = "能力类型")
private String abilityType;
@ApiModelProperty(value = "上架时间")
private Date applyTime;
@ApiModelProperty(value = "申请次数")
private String applyNum;
@ApiModelProperty(value = "浏览次数")
private String browseNum;
@ApiModelProperty(value = "创建人")
private Long creator;
@ApiModelProperty(value = "创建时间")
private Date createDate;
@ApiModelProperty(value = "修改人")
private Long updater;
@ApiModelProperty(value = "修改时间")
private Date updateDate;
@ApiModelProperty(value = "备用字段")
private String note1;
@ApiModelProperty(value = "备用字段")
private String note2;
@ApiModelProperty(value = "备用字段")
private String note3;
@ApiModelProperty(value = "备用字段")
private String note4;
@ApiModelProperty(value = "备用字段")
private String note5;
}

View File

@ -0,0 +1,79 @@
package io.renren.modules.project.entity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.baomidou.mybatisplus.annotation.*;
import java.util.Date;
import io.renren.common.entity.BaseEntity;
/**
* 项目贡献表
*
* @author qs
* @since 3.0 2022-06-22
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("tb_project_contrib")
public class TbProjectContribEntity extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 项目名称
*/
private String projectName;
/**
* 应用名称
*/
private String resourceName;
/**
* 能力名称
*/
private String abilityName;
/**
* 能力类型
*/
private String abilityType;
/**
* 上架时间
*/
private Date applyTime;
/**
* 申请次数
*/
private String applyNum;
/**
* 浏览次数
*/
private String browseNum;
/**
* 修改人
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private Long updater;
/**
* 修改时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private Date updateDate;
/**
* 备用字段
*/
private String note1;
/**
* 备用字段
*/
private String note2;
/**
* 备用字段
*/
private String note3;
/**
* 备用字段
*/
private String note4;
/**
* 备用字段
*/
private String note5;
}

View File

@ -0,0 +1,91 @@
package io.renren.modules.project.entity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.baomidou.mybatisplus.annotation.*;
import java.util.Date;
import io.renren.common.entity.BaseEntity;
/**
* 项目表
*
* @author qiaosen
* @since 3.0 2022-06-22
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("tb_project")
public class TbProjectEntity extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 项目名称
*/
private String projectName;
/**
* 申请单位
*/
private String applyDep;
/**
* 申请人
*/
private String applyUser;
/**
* 申请时间
*/
private Date applyTime;
/**
* 所属区市
*/
private String regionName;
/**
* 责任处室
*/
private String respDep;
/**
* 业务联系人
*/
private String businessUser;
/**
* 业务联系电话
*/
private String businessPhone;
/**
* 技术联系人
*/
private String techUser;
/**
* 技术联系电话
*/
private String techPhone;
/**
* 修改人
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private Long updater;
/**
* 修改时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private Date updateDate;
/**
* 备用字段
*/
private String note1;
/**
* 备用字段
*/
private String note2;
/**
* 备用字段
*/
private String note3;
/**
* 备用字段
*/
private String note4;
/**
* 备用字段
*/
private String note5;
}

View File

@ -0,0 +1,79 @@
package io.renren.modules.project.entity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.baomidou.mybatisplus.annotation.*;
import java.util.Date;
import io.renren.common.entity.BaseEntity;
/**
* 项目使用表
*
* @author qs sunlightcs@gmail.com
* @since 3.0 2022-06-22
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("tb_project_use")
public class TbProjectUseEntity extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 项目名称
*/
private String projectName;
/**
* 应用名称
*/
private String resourceName;
/**
* 能力名称
*/
private String abilityName;
/**
* 能力类型
*/
private String abilityType;
/**
* 上架时间
*/
private Date applyTime;
/**
* 申请次数
*/
private String applyNum;
/**
* 浏览次数
*/
private String browseNum;
/**
* 修改人
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private Long updater;
/**
* 修改时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private Date updateDate;
/**
* 备用字段
*/
private String note1;
/**
* 备用字段
*/
private String note2;
/**
* 备用字段
*/
private String note3;
/**
* 备用字段
*/
private String note4;
/**
* 备用字段
*/
private String note5;
}

View File

@ -0,0 +1,55 @@
package io.renren.modules.project.excel;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import lombok.Data;
import java.util.Date;
/**
* 项目贡献表
*
* @author qs
* @since 3.0 2022-06-22
*/
@Data
@ContentRowHeight(20)
@HeadRowHeight(20)
@ColumnWidth(25)
public class TbProjectContribExcel {
@ExcelProperty(value = "主键", index = 0)
private Long id;
@ExcelProperty(value = "项目名称", index = 1)
private String projectName;
@ExcelProperty(value = "应用名称", index = 2)
private String resourceName;
@ExcelProperty(value = "能力名称", index = 3)
private String abilityName;
@ExcelProperty(value = "能力类型", index = 4)
private String abilityType;
@ExcelProperty(value = "上架时间", index = 5)
private Date applyTime;
@ExcelProperty(value = "申请次数", index = 6)
private String applyNum;
@ExcelProperty(value = "浏览次数", index = 7)
private String browseNum;
@ExcelProperty(value = "创建人", index = 8)
private Long creator;
@ExcelProperty(value = "创建时间", index = 9)
private Date createDate;
@ExcelProperty(value = "修改人", index = 10)
private Long updater;
@ExcelProperty(value = "修改时间", index = 11)
private Date updateDate;
@ExcelProperty(value = "备用字段", index = 12)
private String note1;
@ExcelProperty(value = "备用字段", index = 13)
private String note2;
@ExcelProperty(value = "备用字段", index = 14)
private String note3;
@ExcelProperty(value = "备用字段", index = 15)
private String note4;
@ExcelProperty(value = "备用字段", index = 16)
private String note5;
}

View File

@ -0,0 +1,61 @@
package io.renren.modules.project.excel;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import lombok.Data;
import java.util.Date;
/**
* 项目表
*
* @author qiaosen
* @since 3.0 2022-06-22
*/
@Data
@ContentRowHeight(20)
@HeadRowHeight(20)
@ColumnWidth(25)
public class TbProjectExcel {
@ExcelProperty(value = "主键", index = 0)
private Long id;
@ExcelProperty(value = "项目名称", index = 1)
private String projectName;
@ExcelProperty(value = "申请单位", index = 2)
private String applyDep;
@ExcelProperty(value = "申请人", index = 3)
private String applyUser;
@ExcelProperty(value = "申请时间", index = 4)
private Date applyTime;
@ExcelProperty(value = "所属区市", index = 5)
private String regionName;
@ExcelProperty(value = "责任处室", index = 6)
private String respDep;
@ExcelProperty(value = "业务联系人", index = 7)
private String businessUser;
@ExcelProperty(value = "业务联系电话", index = 8)
private String businessPhone;
@ExcelProperty(value = "技术联系人", index = 9)
private String techUser;
@ExcelProperty(value = "技术联系电话", index = 10)
private String techPhone;
@ExcelProperty(value = "创建人", index = 11)
private Long creator;
@ExcelProperty(value = "创建时间", index = 12)
private Date createDate;
@ExcelProperty(value = "修改人", index = 13)
private Long updater;
@ExcelProperty(value = "修改时间", index = 14)
private Date updateDate;
@ExcelProperty(value = "备用字段", index = 15)
private String note1;
@ExcelProperty(value = "备用字段", index = 16)
private String note2;
@ExcelProperty(value = "备用字段", index = 17)
private String note3;
@ExcelProperty(value = "备用字段", index = 18)
private String note4;
@ExcelProperty(value = "备用字段", index = 19)
private String note5;
}

View File

@ -0,0 +1,55 @@
package io.renren.modules.project.excel;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import lombok.Data;
import java.util.Date;
/**
* 项目使用表
*
* @author qs sunlightcs@gmail.com
* @since 3.0 2022-06-22
*/
@Data
@ContentRowHeight(20)
@HeadRowHeight(20)
@ColumnWidth(25)
public class TbProjectUseExcel {
@ExcelProperty(value = "主键", index = 0)
private Long id;
@ExcelProperty(value = "项目名称", index = 1)
private String projectName;
@ExcelProperty(value = "应用名称", index = 2)
private String resourceName;
@ExcelProperty(value = "能力名称", index = 3)
private String abilityName;
@ExcelProperty(value = "能力类型", index = 4)
private String abilityType;
@ExcelProperty(value = "上架时间", index = 5)
private Date applyTime;
@ExcelProperty(value = "申请次数", index = 6)
private String applyNum;
@ExcelProperty(value = "浏览次数", index = 7)
private String browseNum;
@ExcelProperty(value = "创建人", index = 8)
private Long creator;
@ExcelProperty(value = "创建时间", index = 9)
private Date createDate;
@ExcelProperty(value = "修改人", index = 10)
private Long updater;
@ExcelProperty(value = "修改时间", index = 11)
private Date updateDate;
@ExcelProperty(value = "备用字段", index = 12)
private String note1;
@ExcelProperty(value = "备用字段", index = 13)
private String note2;
@ExcelProperty(value = "备用字段", index = 14)
private String note3;
@ExcelProperty(value = "备用字段", index = 15)
private String note4;
@ExcelProperty(value = "备用字段", index = 16)
private String note5;
}

View File

@ -0,0 +1,15 @@
package io.renren.modules.project.service;
import io.renren.common.service.CrudService;
import io.renren.modules.project.dto.TbProjectContribDTO;
import io.renren.modules.project.entity.TbProjectContribEntity;
/**
* 项目贡献表
*
* @author qs
* @since 3.0 2022-06-22
*/
public interface TbProjectContribService extends CrudService<TbProjectContribEntity, TbProjectContribDTO> {
}

View File

@ -0,0 +1,15 @@
package io.renren.modules.project.service;
import io.renren.common.service.CrudService;
import io.renren.modules.project.dto.TbProjectDTO;
import io.renren.modules.project.entity.TbProjectEntity;
/**
* 项目表
*
* @author qiaosen
* @since 3.0 2022-06-22
*/
public interface TbProjectService extends CrudService<TbProjectEntity, TbProjectDTO> {
}

View File

@ -0,0 +1,15 @@
package io.renren.modules.project.service;
import io.renren.common.service.CrudService;
import io.renren.modules.project.dto.TbProjectUseDTO;
import io.renren.modules.project.entity.TbProjectUseEntity;
/**
* 项目使用表
*
* @author qs sunlightcs@gmail.com
* @since 3.0 2022-06-22
*/
public interface TbProjectUseService extends CrudService<TbProjectUseEntity, TbProjectUseDTO> {
}

View File

@ -0,0 +1,34 @@
package io.renren.modules.project.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.renren.common.service.impl.CrudServiceImpl;
import io.renren.common.constant.Constant;
import io.renren.modules.project.dao.TbProjectContribDao;
import io.renren.modules.project.dto.TbProjectContribDTO;
import io.renren.modules.project.entity.TbProjectContribEntity;
import io.renren.modules.project.service.TbProjectContribService;
import io.renren.modules.security.user.SecurityUser;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import java.util.Map;
/**
* 项目贡献表
*
* @author qs
* @since 3.0 2022-06-22
*/
@Service
public class TbProjectContribServiceImpl extends CrudServiceImpl<TbProjectContribDao, TbProjectContribEntity, TbProjectContribDTO> implements TbProjectContribService {
@Override
public QueryWrapper<TbProjectContribEntity> getWrapper(Map<String, Object> params){
QueryWrapper<TbProjectContribEntity> wrapper = new QueryWrapper<>();
return wrapper;
}
}

View File

@ -0,0 +1,34 @@
package io.renren.modules.project.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.renren.common.service.impl.CrudServiceImpl;
import io.renren.common.constant.Constant;
import io.renren.modules.project.dao.TbProjectDao;
import io.renren.modules.project.dto.TbProjectDTO;
import io.renren.modules.project.entity.TbProjectEntity;
import io.renren.modules.project.service.TbProjectService;
import io.renren.modules.security.user.SecurityUser;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import java.util.Map;
/**
* 项目表
*
* @author qiaosen
* @since 3.0 2022-06-22
*/
@Service
public class TbProjectServiceImpl extends CrudServiceImpl<TbProjectDao, TbProjectEntity, TbProjectDTO> implements TbProjectService {
@Override
public QueryWrapper<TbProjectEntity> getWrapper(Map<String, Object> params){
QueryWrapper<TbProjectEntity> wrapper = new QueryWrapper<>();
return wrapper;
}
}

View File

@ -0,0 +1,34 @@
package io.renren.modules.project.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.renren.common.service.impl.CrudServiceImpl;
import io.renren.common.constant.Constant;
import io.renren.modules.project.dao.TbProjectUseDao;
import io.renren.modules.project.dto.TbProjectUseDTO;
import io.renren.modules.project.entity.TbProjectUseEntity;
import io.renren.modules.project.service.TbProjectUseService;
import io.renren.modules.security.user.SecurityUser;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import java.util.Map;
/**
* 项目使用表
*
* @author qs sunlightcs@gmail.com
* @since 3.0 2022-06-22
*/
@Service
public class TbProjectUseServiceImpl extends CrudServiceImpl<TbProjectUseDao, TbProjectUseEntity, TbProjectUseDTO> implements TbProjectUseService {
@Override
public QueryWrapper<TbProjectUseEntity> getWrapper(Map<String, Object> params){
QueryWrapper<TbProjectUseEntity> wrapper = new QueryWrapper<>();
return wrapper;
}
}

View File

@ -51,7 +51,11 @@ spring:
wall: wall:
config: config:
multi-statement-allow: true multi-statement-allow: true
flyway:
enabled: true
validate-on-migrate: false
# 允许乱序执行
out-of-order: true
#上传的静态资源配置 #上传的静态资源配置
resource: resource:
root_url: 15.2.21.238 root_url: 15.2.21.238

View File

@ -61,6 +61,7 @@ spring:
locations: filesystem:config/db locations: filesystem:config/db
baseline-on-migrate: true baseline-on-migrate: true
baseline-version: 0 baseline-version: 0
validate-on-migrate: true
fdfs: fdfs:

View File

@ -0,0 +1,77 @@
CREATE TABLE `tb_project` (
`id` bigint(20) NOT NULL COMMENT '主键',
`project_name` varchar(128) DEFAULT NULL COMMENT '项目名称',
`apply_dep` varchar(128) DEFAULT NULL COMMENT '申请单位',
`apply_user` varchar(128) DEFAULT NULL COMMENT '申请人',
`apply_time` datetime DEFAULT NULL COMMENT '申请时间',
`region_name` varchar(128) DEFAULT NULL COMMENT '所属区市',
`resp_dep` varchar(128) DEFAULT NULL COMMENT '责任处室',
`business_user` varchar(128) DEFAULT NULL COMMENT '业务联系人',
`business_phone` varchar(32) DEFAULT NULL COMMENT '业务联系电话',
`tech_user` varchar(128) DEFAULT NULL COMMENT '技术联系人',
`tech_phone` varchar(32) DEFAULT NULL COMMENT '技术联系电话',
`creator` bigint(20) DEFAULT NULL COMMENT '创建人',
`create_date` datetime DEFAULT NULL COMMENT '创建时间',
`updater` bigint(20) DEFAULT NULL COMMENT '修改人',
`update_date` datetime DEFAULT NULL COMMENT '修改时间',
`note1` longtext COMMENT '备用字段',
`note2` varchar(200) DEFAULT NULL COMMENT '备用字段',
`note3` varchar(500) DEFAULT NULL COMMENT '备用字段',
`note4` varchar(1000) DEFAULT NULL COMMENT '备用字段',
`note5` varchar(2000) DEFAULT NULL COMMENT '备用字段',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='项目表';
CREATE TABLE `tb_project_contrib` (
`id` bigint(20) NOT NULL COMMENT '主键',
`project_name` varchar(128) DEFAULT NULL COMMENT '项目名称',
`resource_name` varchar(128) DEFAULT NULL COMMENT '应用名称',
`ability_name` varchar(128) DEFAULT NULL COMMENT '能力名称',
`ability_type` varchar(64) DEFAULT NULL COMMENT '能力类型',
`apply_time` datetime DEFAULT NULL COMMENT '上架时间',
`apply_num` varchar(10) DEFAULT NULL COMMENT '申请次数',
`browse_num` varchar(10) DEFAULT NULL COMMENT '浏览次数',
`creator` bigint(20) DEFAULT NULL COMMENT '创建人',
`create_date` datetime DEFAULT NULL COMMENT '创建时间',
`updater` bigint(20) DEFAULT NULL COMMENT '修改人',
`update_date` datetime DEFAULT NULL COMMENT '修改时间',
`note1` longtext COMMENT '备用字段',
`note2` varchar(200) DEFAULT NULL COMMENT '备用字段',
`note3` varchar(500) DEFAULT NULL COMMENT '备用字段',
`note4` varchar(1000) DEFAULT NULL COMMENT '备用字段',
`note5` varchar(2000) DEFAULT NULL COMMENT '备用字段',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='项目贡献表';
CREATE TABLE `tb_project_use` (
`id` bigint(20) NOT NULL COMMENT '主键',
`project_name` varchar(128) DEFAULT NULL COMMENT '项目名称',
`resource_name` varchar(128) DEFAULT NULL COMMENT '应用名称',
`ability_name` varchar(128) DEFAULT NULL COMMENT '能力名称',
`ability_type` varchar(64) DEFAULT NULL COMMENT '能力类型',
`apply_time` datetime DEFAULT NULL COMMENT '上架时间',
`apply_num` varchar(10) DEFAULT NULL COMMENT '申请次数',
`browse_num` varchar(10) DEFAULT NULL COMMENT '浏览次数',
`creator` bigint(20) DEFAULT NULL COMMENT '创建人',
`create_date` datetime DEFAULT NULL COMMENT '创建时间',
`updater` bigint(20) DEFAULT NULL COMMENT '修改人',
`update_date` datetime DEFAULT NULL COMMENT '修改时间',
`note1` longtext COMMENT '备用字段',
`note2` varchar(200) DEFAULT NULL COMMENT '备用字段',
`note3` varchar(500) DEFAULT NULL COMMENT '备用字段',
`note4` varchar(1000) DEFAULT NULL COMMENT '备用字段',
`note5` varchar(2000) DEFAULT NULL COMMENT '备用字段',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='项目使用表';
CREATE TABLE `tb_data_resource_rel` (
`key_id` bigint(20) DEFAULT NULL COMMENT '应用资源id',
`reference_id` bigint(20) DEFAULT NULL COMMENT '关联id',
`del_flag` int(11) DEFAULT '0' COMMENT '删除标志:\r\n0:正常;\r\n1:已删除;\r\n2:待审核;\r\n3:审核中;\r\n9其他',
`creator` bigint(20) DEFAULT NULL COMMENT '创建人',
`create_date` datetime DEFAULT NULL COMMENT '创建时间',
`updater` bigint(20) DEFAULT NULL COMMENT '修改人',
`update_date` datetime DEFAULT NULL COMMENT '修改时间',
`id` bigint(20) NOT NULL COMMENT 'id',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='组件-应用资源关系表';

View File

@ -0,0 +1 @@
ALTER TABLE `t_demand_comment` ADD COLUMN `del_flag` int(11) NULL COMMENT '删除标志:\r\n0:正常;\r\n1:已删除;\r\n2:待审核;\r\n3:审核中;\r\n9其他';

View File

@ -0,0 +1 @@
ALTER TABLE `t_demand_comment` ADD COLUMN `instance_id` varchar(64) NULL COMMENT '流程实例ID';