From c0bf52690604d78dcbff7bf465e088133f1d2eea Mon Sep 17 00:00:00 2001
From: tangzy <tangzy123456>
Date: Wed, 11 Aug 2021 11:30:51 +0800
Subject: [PATCH] 1.表现,从业记录通过保安员编码查询
---
src/main/java/org/springblade/modules/information/excel/InforExcel.java | 9
src/main/java/org/springblade/modules/talk/vo/TalkVO.java | 36 +++
src/main/java/org/springblade/modules/permit/entity/Permit.java | 5
src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml | 3
src/main/java/org/springblade/modules/system/excel/UserExcel.java | 9
src/main/java/org/springblade/modules/talk/entity/Talk.java | 83 ++++++++
src/main/java/org/springblade/modules/talk/service/ITalkService.java | 41 ++++
src/main/java/org/springblade/modules/permit/service/IPermitService.java | 4
src/main/java/sql/talk.menu.mysql | 10 +
src/main/java/org/springblade/modules/permit/mapper/PermitMapper.java | 3
src/main/java/org/springblade/modules/information/entity/Information.java | 7
src/main/java/org/springblade/modules/permit/mapper/PermitMapper.xml | 9
src/main/java/org/springblade/modules/permit/controller/PermitController.java | 18 +
src/main/java/org/springblade/modules/permit/service/impl/PermitServiceImpl.java | 7
src/main/java/org/springblade/modules/system/controller/UserController.java | 9
src/main/java/org/springblade/modules/system/mapper/UserMapper.xml | 9
src/main/java/org/springblade/modules/auth/utils/TokenUtil.java | 2
src/main/java/org/springblade/modules/talk/mapper/TalkMapper.java | 42 ++++
src/main/java/org/springblade/modules/talk/controller/TalkController.java | 130 +++++++++++++
src/main/java/org/springblade/modules/talk/mapper/TalkMapper.xml | 25 ++
src/main/java/org/springblade/modules/talk/dto/TalkDTO.java | 34 +++
src/main/java/org/springblade/modules/system/entity/User.java | 4
src/main/java/org/springblade/common/config/BladeConfiguration.java | 1
src/main/java/org/springblade/modules/system/service/impl/UserServiceImpl.java | 5
src/main/java/org/springblade/modules/system/mapper/UserMapper.java | 1
src/main/java/org/springblade/modules/system/service/IUserService.java | 3
src/main/java/org/springblade/modules/talk/service/impl/TalkServiceImpl.java | 41 ++++
27 files changed, 547 insertions(+), 3 deletions(-)
diff --git a/src/main/java/org/springblade/common/config/BladeConfiguration.java b/src/main/java/org/springblade/common/config/BladeConfiguration.java
index a9b7983..53c80bf 100644
--- a/src/main/java/org/springblade/common/config/BladeConfiguration.java
+++ b/src/main/java/org/springblade/common/config/BladeConfiguration.java
@@ -74,6 +74,7 @@
secureRegistry.excludePathPatterns("/trainingRegistration/**");
secureRegistry.excludePathPatterns("/seinspect/**");
secureRegistry.excludePathPatterns("/coinspect/**");
+ secureRegistry.excludePathPatterns("/blade-user/**");
return secureRegistry;
}
diff --git a/src/main/java/org/springblade/modules/auth/utils/TokenUtil.java b/src/main/java/org/springblade/modules/auth/utils/TokenUtil.java
index 2c578dc..a8b2eeb 100644
--- a/src/main/java/org/springblade/modules/auth/utils/TokenUtil.java
+++ b/src/main/java/org/springblade/modules/auth/utils/TokenUtil.java
@@ -95,6 +95,7 @@
param.put(TokenConstant.ROLE_NAME, Func.join(userInfo.getRoles()));
param.put(TokenConstant.DETAIL, userInfo.getDetail());
param.put("jurisdiction", user.getJurisdiction());
+ param.put("cardid", user.getCardid());
//拼装accessToken
try {
@@ -106,6 +107,7 @@
.set(TokenConstant.POST_ID, user.getPostId())
.set(TokenConstant.ROLE_ID, user.getRoleId())
.set("jurisdiction", user.getJurisdiction())
+ .set("cardid", user.getCardid())
.set(TokenConstant.OAUTH_ID, userInfo.getOauthId())
.set(TokenConstant.ACCOUNT, user.getAccount())
.set(TokenConstant.USER_NAME, user.getAccount())
diff --git a/src/main/java/org/springblade/modules/information/entity/Information.java b/src/main/java/org/springblade/modules/information/entity/Information.java
index bdfa49b..feb4f7b 100644
--- a/src/main/java/org/springblade/modules/information/entity/Information.java
+++ b/src/main/java/org/springblade/modules/information/entity/Information.java
@@ -66,8 +66,8 @@
*/
@ApiModelProperty(value = "成立日期")
@TableField("establishTime")
- @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
- @DateTimeFormat(pattern = "yyyy-MM-dd")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date establishtime;
/**
* 注册资本
@@ -136,6 +136,9 @@
private String stats;
private String jurisdiction;
+ private String representativecell;
+ private String contacts;
+ private String contactscell;
}
diff --git a/src/main/java/org/springblade/modules/information/excel/InforExcel.java b/src/main/java/org/springblade/modules/information/excel/InforExcel.java
index 3b4754b..0c8571a 100644
--- a/src/main/java/org/springblade/modules/information/excel/InforExcel.java
+++ b/src/main/java/org/springblade/modules/information/excel/InforExcel.java
@@ -49,6 +49,15 @@
@ExcelProperty("法定代表人")
private String representative;
+ @ExcelProperty("法定代表人电话")
+ private String representativecell;
+
+ @ExcelProperty("联系人")
+ private String contacts;
+
+ @ExcelProperty("联系人电话")
+ private String contactscell;
+
@ColumnWidth(15)
@ExcelProperty("成立日期")
private String establishtime;
diff --git a/src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml b/src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml
index c17c570..258cd79 100644
--- a/src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml
+++ b/src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml
@@ -24,6 +24,9 @@
<result column="departmentid" property="departmentid"/>
<result column="stats" property="stats"/>
<result column="jurisdiction" property="jurisdiction"/>
+ <result column="representativecell" property="representativecell"/>
+ <result column="contacts" property="contacts"/>
+ <result column="contactscell" property="contactscell"/>
</resultMap>
diff --git a/src/main/java/org/springblade/modules/permit/controller/PermitController.java b/src/main/java/org/springblade/modules/permit/controller/PermitController.java
index 2883567..216d740 100644
--- a/src/main/java/org/springblade/modules/permit/controller/PermitController.java
+++ b/src/main/java/org/springblade/modules/permit/controller/PermitController.java
@@ -116,6 +116,24 @@
}
/**
+ * 新增
+ */
+ @PostMapping("/storage")
+ @ApiOperation(value = "新增", notes = "传入permit")
+ public R storage(@Valid @RequestBody Permit permit) {
+ permit.setStorage("0");
+ permit.setPermitime(new Date());
+ return R.status(permitService.save(permit));
+ }
+
+
+ @PostMapping("/selectIn")
+ public R selectIn(String cardid) {
+ Map map = permitService.selectIn(cardid);
+ return R.data(map);
+ }
+
+ /**
* 修改
*/
@PostMapping("/update")
diff --git a/src/main/java/org/springblade/modules/permit/entity/Permit.java b/src/main/java/org/springblade/modules/permit/entity/Permit.java
index 724bc99..74621b0 100644
--- a/src/main/java/org/springblade/modules/permit/entity/Permit.java
+++ b/src/main/java/org/springblade/modules/permit/entity/Permit.java
@@ -136,6 +136,11 @@
private Integer id;
private String deptid;
private String ptype;
+ private String storage;
+ private String cardid;
+ private String representativecell;
+ private String contacts;
+ private String contactscell;
}
diff --git a/src/main/java/org/springblade/modules/permit/mapper/PermitMapper.java b/src/main/java/org/springblade/modules/permit/mapper/PermitMapper.java
index 98e17e3..c5b4dcd 100644
--- a/src/main/java/org/springblade/modules/permit/mapper/PermitMapper.java
+++ b/src/main/java/org/springblade/modules/permit/mapper/PermitMapper.java
@@ -22,6 +22,7 @@
import org.springblade.modules.permit.vo.PermitVO;
import java.util.List;
+import java.util.Map;
/**
* Mapper 接口
@@ -40,4 +41,6 @@
*/
List<PermitVO> selectPermitPage(IPage page, PermitVO permit);
+ Map selectIn(String cardid);
+
}
diff --git a/src/main/java/org/springblade/modules/permit/mapper/PermitMapper.xml b/src/main/java/org/springblade/modules/permit/mapper/PermitMapper.xml
index 2b426d0..e2ec582 100644
--- a/src/main/java/org/springblade/modules/permit/mapper/PermitMapper.xml
+++ b/src/main/java/org/springblade/modules/permit/mapper/PermitMapper.xml
@@ -23,6 +23,11 @@
<result column="permitime" property="permitime"/>
<result column="deptid" property="deptid"/>
<result column="ptype" property="ptype"/>
+ <result column="storage" property="storage"/>
+ <result column="cardid" property="cardid"/>
+ <result column="representativecell" property="representativecell"/>
+ <result column="contacts" property="contacts"/>
+ <result column="contactscell" property="contactscell"/>
</resultMap>
@@ -30,4 +35,8 @@
select * from sys_permit
</select>
+ <select id="selectIn" resultType="java.util.HashMap">
+ select * from sys_permit where storage=0 and cardid=#{cardid}
+ </select>
+
</mapper>
diff --git a/src/main/java/org/springblade/modules/permit/service/IPermitService.java b/src/main/java/org/springblade/modules/permit/service/IPermitService.java
index 060858a..8d10cbc 100644
--- a/src/main/java/org/springblade/modules/permit/service/IPermitService.java
+++ b/src/main/java/org/springblade/modules/permit/service/IPermitService.java
@@ -21,6 +21,8 @@
import org.springblade.modules.permit.entity.Permit;
import org.springblade.modules.permit.vo.PermitVO;
+import java.util.Map;
+
/**
* 服务类
*
@@ -37,5 +39,5 @@
* @return
*/
IPage<PermitVO> selectPermitPage(IPage<PermitVO> page, PermitVO permit);
-
+ Map selectIn(String cardid);
}
diff --git a/src/main/java/org/springblade/modules/permit/service/impl/PermitServiceImpl.java b/src/main/java/org/springblade/modules/permit/service/impl/PermitServiceImpl.java
index 87c2eec..b1d8105 100644
--- a/src/main/java/org/springblade/modules/permit/service/impl/PermitServiceImpl.java
+++ b/src/main/java/org/springblade/modules/permit/service/impl/PermitServiceImpl.java
@@ -24,6 +24,8 @@
import org.springblade.modules.permit.vo.PermitVO;
import org.springframework.stereotype.Service;
+import java.util.Map;
+
/**
* 服务实现类
*
@@ -38,4 +40,9 @@
return page.setRecords(baseMapper.selectPermitPage(page, permit));
}
+ @Override
+ public Map selectIn(String cardid) {
+ return baseMapper.selectIn(cardid);
+ }
+
}
diff --git a/src/main/java/org/springblade/modules/system/controller/UserController.java b/src/main/java/org/springblade/modules/system/controller/UserController.java
index ccde67f..cb1db20 100644
--- a/src/main/java/org/springblade/modules/system/controller/UserController.java
+++ b/src/main/java/org/springblade/modules/system/controller/UserController.java
@@ -366,4 +366,13 @@
return R.data(tree);
}
+ /**
+ * 自定义用户列表(只有保安员)
+ */
+ @GetMapping("/selectInr")
+ public R selectInr(String deptid) {
+ List<Map<Object, Object>> list = userService.selectInr(deptid);
+ return R.data(list);
+ }
+
}
diff --git a/src/main/java/org/springblade/modules/system/entity/User.java b/src/main/java/org/springblade/modules/system/entity/User.java
index fc623f8..1e64524 100644
--- a/src/main/java/org/springblade/modules/system/entity/User.java
+++ b/src/main/java/org/springblade/modules/system/entity/User.java
@@ -207,4 +207,8 @@
@TableField("is_apply")
private Integer isApply;
+ @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
+ @DateTimeFormat(pattern = "yyyy-MM-dd")
+ private Date birthtime;
+
}
diff --git a/src/main/java/org/springblade/modules/system/excel/UserExcel.java b/src/main/java/org/springblade/modules/system/excel/UserExcel.java
index f5f96ee..31a5970 100644
--- a/src/main/java/org/springblade/modules/system/excel/UserExcel.java
+++ b/src/main/java/org/springblade/modules/system/excel/UserExcel.java
@@ -42,6 +42,9 @@
@ExcelProperty("账户")
private String account;
+ @ExcelProperty("单位名称")
+ private String deptId;
+
@ColumnWidth(10)
@ExcelProperty("姓名")
private String realName;
@@ -56,6 +59,9 @@
@ExcelProperty("性别")
private String sex;
+
+ @ExcelProperty("出生日期")
+ private String birthtime;
@ExcelProperty("身份证")
private String cardid;
@@ -89,5 +95,8 @@
@ExcelProperty("保安员证编码")
private String securitynumber;
+ @ExcelProperty("在职状态")
+ private String status;
+
}
diff --git a/src/main/java/org/springblade/modules/system/mapper/UserMapper.java b/src/main/java/org/springblade/modules/system/mapper/UserMapper.java
index 4183020..e0fb999 100644
--- a/src/main/java/org/springblade/modules/system/mapper/UserMapper.java
+++ b/src/main/java/org/springblade/modules/system/mapper/UserMapper.java
@@ -94,4 +94,5 @@
@MapKey(value = "id")
@SqlParser(filter=true)
Map<Long, TreeNode> getSecurityApplyTree(@Param("user") UserVO user);
+ List<Map<Object,Object>> selectInr(String deptid);
}
diff --git a/src/main/java/org/springblade/modules/system/mapper/UserMapper.xml b/src/main/java/org/springblade/modules/system/mapper/UserMapper.xml
index ce83c57..8500882 100644
--- a/src/main/java/org/springblade/modules/system/mapper/UserMapper.xml
+++ b/src/main/java/org/springblade/modules/system/mapper/UserMapper.xml
@@ -43,6 +43,7 @@
<result column="my_picture" property="myPicture"/>
<result column="is_apply" property="isApply"/>
<result column="deptname" property="deptname"/>
+ <result column="birthtime" property="birthtime"/>
</resultMap>
<select id="selectUserPage" resultMap="userResultMap">
@@ -294,4 +295,12 @@
)
</select>
+
+ <select id="selectInr" resultType="java.util.HashMap">
+ SELECT real_name as realName,id FROM blade_user
+ WHERE role_id='1412226235153731586'
+ <if test="deptid!=null and deptid!='' and dept!='1123598813738675201'">
+ and dept_id=#{deptid}
+ </if>
+ </select>
</mapper>
diff --git a/src/main/java/org/springblade/modules/system/service/IUserService.java b/src/main/java/org/springblade/modules/system/service/IUserService.java
index e52968a..f7b43b1 100644
--- a/src/main/java/org/springblade/modules/system/service/IUserService.java
+++ b/src/main/java/org/springblade/modules/system/service/IUserService.java
@@ -31,6 +31,7 @@
import org.springblade.modules.system.vo.UserVO;
import java.util.List;
+import java.util.Map;
/**
* 服务类
@@ -241,4 +242,6 @@
* @return
*/
List<TreeNode> getSecurityApplyTree(UserVO user);
+
+ List<Map<Object,Object>> selectInr(String deptid);
}
diff --git a/src/main/java/org/springblade/modules/system/service/impl/UserServiceImpl.java b/src/main/java/org/springblade/modules/system/service/impl/UserServiceImpl.java
index ac466e9..99ac878 100644
--- a/src/main/java/org/springblade/modules/system/service/impl/UserServiceImpl.java
+++ b/src/main/java/org/springblade/modules/system/service/impl/UserServiceImpl.java
@@ -461,4 +461,9 @@
});
return tree;
}
+
+ @Override
+ public List<Map<Object, Object>> selectInr(String deptid) {
+ return baseMapper.selectInr(deptid);
+ }
}
diff --git a/src/main/java/org/springblade/modules/talk/controller/TalkController.java b/src/main/java/org/springblade/modules/talk/controller/TalkController.java
new file mode 100644
index 0000000..a633ca1
--- /dev/null
+++ b/src/main/java/org/springblade/modules/talk/controller/TalkController.java
@@ -0,0 +1,130 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.talk.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import lombok.AllArgsConstructor;
+import javax.validation.Valid;
+
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.modules.information.entity.Information;
+import org.springframework.web.bind.annotation.*;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.modules.talk.entity.Talk;
+import org.springblade.modules.talk.vo.TalkVO;
+import org.springblade.modules.talk.service.ITalkService;
+import org.springblade.core.boot.ctrl.BladeController;
+import springfox.documentation.annotations.ApiIgnore;
+
+import java.util.Map;
+
+/**
+ * 控制器
+ *
+ * @author BladeX
+ * @since 2021-08-10
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("blade-talk/talk")
+@Api(value = "", tags = "接口")
+public class TalkController extends BladeController {
+
+ private final ITalkService talkService;
+
+ /**
+ * 详情
+ */
+ @GetMapping("/detail")
+ @ApiOperationSupport(order = 1)
+ @ApiOperation(value = "详情", notes = "传入talk")
+ public R<Talk> detail(Talk talk) {
+ Talk detail = talkService.getOne(Condition.getQueryWrapper(talk));
+ return R.data(detail);
+ }
+
+ /**
+ * 分页
+ */
+ @GetMapping("/list")
+ @ApiOperationSupport(order = 2)
+ @ApiOperation(value = "分页", notes = "传入talk")
+ public R<IPage<Talk>> list(@ApiIgnore @RequestParam Map<String, Object> talk, Query query) {
+ IPage<Talk> pages = talkService.page(Condition.getPage(query), Condition.getQueryWrapper(talk, Talk.class));
+ return R.data(pages);
+ }
+
+ /**
+ * 自定义分页
+ */
+ @GetMapping("/page")
+ @ApiOperationSupport(order = 3)
+ @ApiOperation(value = "分页", notes = "传入talk")
+ public R<IPage<TalkVO>> page(TalkVO talk, Query query) {
+ IPage<TalkVO> pages = talkService.selectTalkPage(Condition.getPage(query), talk);
+ return R.data(pages);
+ }
+
+ /**
+ * 新增
+ */
+ @PostMapping("/save")
+ @ApiOperationSupport(order = 4)
+ @ApiOperation(value = "新增", notes = "传入talk")
+ public R save(@Valid @RequestBody Talk talk) {
+ return R.status(talkService.save(talk));
+ }
+
+ /**
+ * 修改
+ */
+ @PostMapping("/update")
+ @ApiOperationSupport(order = 5)
+ @ApiOperation(value = "修改", notes = "传入talk")
+ public R update(@Valid @RequestBody Talk talk) {
+ return R.status(talkService.updateById(talk));
+ }
+
+ /**
+ * 新增或修改
+ */
+ @PostMapping("/submit")
+ @ApiOperationSupport(order = 6)
+ @ApiOperation(value = "新增或修改", notes = "传入talk")
+ public R submit(@Valid @RequestBody Talk talk) {
+ return R.status(talkService.saveOrUpdate(talk));
+ }
+
+
+ /**
+ * 删除
+ */
+ @PostMapping("/remove")
+ @ApiOperationSupport(order = 8)
+ @ApiOperation(value = "删除", notes = "传入ids")
+ public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+ return R.status(talkService.removeByIds(Func.toLongList(ids)));
+ }
+
+
+}
diff --git a/src/main/java/org/springblade/modules/talk/dto/TalkDTO.java b/src/main/java/org/springblade/modules/talk/dto/TalkDTO.java
new file mode 100644
index 0000000..7b65fd8
--- /dev/null
+++ b/src/main/java/org/springblade/modules/talk/dto/TalkDTO.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.talk.dto;
+
+import org.springblade.modules.talk.entity.Talk;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2021-08-10
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class TalkDTO extends Talk {
+ private static final long serialVersionUID = 1L;
+
+}
diff --git a/src/main/java/org/springblade/modules/talk/entity/Talk.java b/src/main/java/org/springblade/modules/talk/entity/Talk.java
new file mode 100644
index 0000000..215946b
--- /dev/null
+++ b/src/main/java/org/springblade/modules/talk/entity/Talk.java
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.talk.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+import java.util.Date;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.springframework.format.annotation.DateTimeFormat;
+
+/**
+ * 实体类
+ *
+ * @author BladeX
+ * @since 2021-08-10
+ */
+@Data
+@TableName("sys_talk")
+@ApiModel(value = "Talk对象", description = "Talk对象")
+public class Talk implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ @TableId(value = "id", type = IdType.AUTO)
+ private Integer id;
+ /**
+ * 标题
+ */
+ @ApiModelProperty(value = "标题")
+ private String title;
+ /**
+ * 谈话对象
+ */
+ @ApiModelProperty(value = "谈话对象")
+ private String realName;
+ /**
+ * 谈话内容
+ */
+ @ApiModelProperty(value = "谈话内容")
+ private String talkcontent;
+ /**
+ * 谈话时间
+ */
+ @ApiModelProperty(value = "谈话时间")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ private Date talktime;
+ /**
+ * 结论
+ */
+ @ApiModelProperty(value = "结论")
+ private String conclusion;
+ /**
+ * 评价
+ */
+ @ApiModelProperty(value = "评价")
+ private String evaluate;
+ private String deptid;
+
+
+}
diff --git a/src/main/java/org/springblade/modules/talk/mapper/TalkMapper.java b/src/main/java/org/springblade/modules/talk/mapper/TalkMapper.java
new file mode 100644
index 0000000..e5ba86d
--- /dev/null
+++ b/src/main/java/org/springblade/modules/talk/mapper/TalkMapper.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.talk.mapper;
+
+import org.springblade.modules.talk.entity.Talk;
+import org.springblade.modules.talk.vo.TalkVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * Mapper 接口
+ *
+ * @author BladeX
+ * @since 2021-08-10
+ */
+public interface TalkMapper extends BaseMapper<Talk> {
+
+ /**
+ * 自定义分页
+ *
+ * @param page
+ * @param talk
+ * @return
+ */
+ List<TalkVO> selectTalkPage(IPage page, TalkVO talk);
+
+}
diff --git a/src/main/java/org/springblade/modules/talk/mapper/TalkMapper.xml b/src/main/java/org/springblade/modules/talk/mapper/TalkMapper.xml
new file mode 100644
index 0000000..c8da9c0
--- /dev/null
+++ b/src/main/java/org/springblade/modules/talk/mapper/TalkMapper.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.modules.talk.mapper.TalkMapper">
+
+ <!-- 通用查询映射结果 -->
+ <resultMap id="talkResultMap" type="org.springblade.modules.talk.entity.Talk">
+ <id column="id" property="id"/>
+ <result column="title" property="title"/>
+ <result column="real_name" property="realName"/>
+ <result column="talkcontent" property="talkcontent"/>
+ <result column="talktime" property="talktime"/>
+ <result column="conclusion" property="conclusion"/>
+ <result column="evaluate" property="evaluate"/>
+ <result column="deptid" property="deptid"/>
+ </resultMap>
+
+
+ <select id="selectTalkPage" resultMap="talkResultMap">
+ select * from sys_talk where 1=1
+ <if test="talk.deptid!=null and alk.deptid!='' and alk.deptid!='1123598813738675201'">
+ deptid=#{talk.deptid}
+ </if>
+ </select>
+
+</mapper>
diff --git a/src/main/java/org/springblade/modules/talk/service/ITalkService.java b/src/main/java/org/springblade/modules/talk/service/ITalkService.java
new file mode 100644
index 0000000..3b8fc4d
--- /dev/null
+++ b/src/main/java/org/springblade/modules/talk/service/ITalkService.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.talk.service;
+
+import org.springblade.modules.talk.entity.Talk;
+import org.springblade.modules.talk.vo.TalkVO;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 服务类
+ *
+ * @author BladeX
+ * @since 2021-08-10
+ */
+public interface ITalkService extends IService<Talk> {
+
+ /**
+ * 自定义分页
+ *
+ * @param page
+ * @param talk
+ * @return
+ */
+ IPage<TalkVO> selectTalkPage(IPage<TalkVO> page, TalkVO talk);
+
+}
diff --git a/src/main/java/org/springblade/modules/talk/service/impl/TalkServiceImpl.java b/src/main/java/org/springblade/modules/talk/service/impl/TalkServiceImpl.java
new file mode 100644
index 0000000..bfd0485
--- /dev/null
+++ b/src/main/java/org/springblade/modules/talk/service/impl/TalkServiceImpl.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.talk.service.impl;
+
+import org.springblade.modules.talk.entity.Talk;
+import org.springblade.modules.talk.vo.TalkVO;
+import org.springblade.modules.talk.mapper.TalkMapper;
+import org.springblade.modules.talk.service.ITalkService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 服务实现类
+ *
+ * @author BladeX
+ * @since 2021-08-10
+ */
+@Service
+public class TalkServiceImpl extends ServiceImpl<TalkMapper, Talk> implements ITalkService {
+
+ @Override
+ public IPage<TalkVO> selectTalkPage(IPage<TalkVO> page, TalkVO talk) {
+ return page.setRecords(baseMapper.selectTalkPage(page, talk));
+ }
+
+}
diff --git a/src/main/java/org/springblade/modules/talk/vo/TalkVO.java b/src/main/java/org/springblade/modules/talk/vo/TalkVO.java
new file mode 100644
index 0000000..18caa6f
--- /dev/null
+++ b/src/main/java/org/springblade/modules/talk/vo/TalkVO.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.talk.vo;
+
+import org.springblade.modules.talk.entity.Talk;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * 视图实体类
+ *
+ * @author BladeX
+ * @since 2021-08-10
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "TalkVO对象", description = "TalkVO对象")
+public class TalkVO extends Talk {
+ private static final long serialVersionUID = 1L;
+
+}
diff --git a/src/main/java/sql/talk.menu.mysql b/src/main/java/sql/talk.menu.mysql
new file mode 100644
index 0000000..425359b
--- /dev/null
+++ b/src/main/java/sql/talk.menu.mysql
@@ -0,0 +1,10 @@
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1424907304653926406', 1123598815738675201, 'talk', '心里咨询', 'menu', '/talk/talk', NULL, 1, 1, 0, 1, NULL, 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1424907304653926407', '1424907304653926406', 'talk_add', '新增', 'add', '/talk/talk/add', 'plus', 1, 2, 1, 1, NULL, 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1424907304653926408', '1424907304653926406', 'talk_edit', '修改', 'edit', '/talk/talk/edit', 'form', 2, 2, 2, 1, NULL, 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1424907304653926409', '1424907304653926406', 'talk_delete', '删除', 'delete', '/api/blade-talk/talk/remove', 'delete', 3, 2, 3, 1, NULL, 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1424907304653926410', '1424907304653926406', 'talk_view', '查看', 'view', '/talk/talk/view', 'file-text', 4, 2, 2, 1, NULL, 0);
--
Gitblit v1.9.3