Commit c8f17197 authored by 赵啸非's avatar 赵啸非

添加用户反馈问答表

parent af2344fb
package com.mortals.xhx.module.feedback.dao;
import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.feedback.model.FeedbackStaffEntity;
import java.util.List;
/**
* 员工反馈问卷Dao
* 员工反馈问卷 DAO接口
*
* @author zxfei
* @date 2023-07-06
*/
public interface FeedbackStaffDao extends ICRUDDao<FeedbackStaffEntity,Long>{
}
package com.mortals.xhx.module.feedback.dao.ibatis;
import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.feedback.dao.FeedbackStaffDao;
import com.mortals.xhx.module.feedback.model.FeedbackStaffEntity;
import java.util.Date;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List;
/**
* 员工反馈问卷DaoImpl DAO接口
*
* @author zxfei
* @date 2023-07-06
*/
@Repository("feedbackStaffDao")
public class FeedbackStaffDaoImpl extends BaseCRUDDaoMybatis<FeedbackStaffEntity,Long> implements FeedbackStaffDao {
}
package com.mortals.xhx.module.feedback.model;
import java.util.List;
import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.feedback.model.vo.FeedbackStaffVo;
import lombok.Data;
/**
* 员工反馈问卷实体对象
*
* @author zxfei
* @date 2023-07-06
*/
@Data
public class FeedbackStaffEntity extends FeedbackStaffVo {
private static final long serialVersionUID = 1L;
/**
* 反馈问卷id号
*/
private Long feedbackId;
/**
* 用户id
*/
private Long staffId;
/**
* 备注
*/
private String remark;
@Override
public int hashCode() {
return this.getId().hashCode();
}
@Override
public boolean equals(Object obj) {
if (obj == null) return false;
if (obj instanceof FeedbackStaffEntity) {
FeedbackStaffEntity tmp = (FeedbackStaffEntity) obj;
if (this.getId() == tmp.getId()) {
return true;
}
}
return false;
}
public void initAttrValue(){
this.feedbackId = 0L;
this.staffId = 0L;
this.remark = "";
}
}
\ No newline at end of file
package com.mortals.xhx.module.feedback.model.vo;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.feedback.model.FeedbackStaffEntity;
import java.util.ArrayList;
import java.util.List;
import lombok.Data;
import com.mortals.framework.annotation.Excel;
import java.math.BigDecimal;
import java.util.Date;
/**
* 员工反馈问卷视图对象
*
* @author zxfei
* @date 2023-07-06
*/
@Data
public class FeedbackStaffVo extends BaseEntityLong {
}
\ No newline at end of file
package com.mortals.xhx.module.feedback.service;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.feedback.model.FeedbackStaffEntity;
import com.mortals.xhx.module.feedback.dao.FeedbackStaffDao;
/**
* FeedbackStaffService
*
* 员工反馈问卷 service接口
*
* @author zxfei
* @date 2023-07-06
*/
public interface FeedbackStaffService extends ICRUDService<FeedbackStaffEntity,Long>{
FeedbackStaffDao getDao();
}
\ No newline at end of file
package com.mortals.xhx.module.feedback.service.impl;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.xhx.module.feedback.dao.FeedbackStaffDao;
import com.mortals.xhx.module.feedback.model.FeedbackStaffEntity;
import com.mortals.xhx.module.feedback.service.FeedbackStaffService;
import lombok.extern.slf4j.Slf4j;
/**
* FeedbackStaffService
* 员工反馈问卷 service实现
*
* @author zxfei
* @date 2023-07-06
*/
@Service("feedbackStaffService")
@Slf4j
public class FeedbackStaffServiceImpl extends AbstractCRUDServiceImpl<FeedbackStaffDao, FeedbackStaffEntity, Long> implements FeedbackStaffService {
}
\ No newline at end of file
package com.mortals.xhx.module.feedback.web;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import com.mortals.framework.model.Context;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.module.feedback.model.FeedbackStaffEntity;
import com.mortals.xhx.module.feedback.service.FeedbackStaffService;
import org.apache.commons.lang3.ArrayUtils;
import com.mortals.framework.util.StringUtils;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import com.alibaba.fastjson.JSONObject;
import java.util.Arrays;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import static com.mortals.framework.ap.SysConstains.*;
/**
*
* 员工反馈问卷
*
* @author zxfei
* @date 2023-07-06
*/
@RestController
@RequestMapping("feedback/staff")
public class FeedbackStaffController extends BaseCRUDJsonBodyMappingController<FeedbackStaffService,FeedbackStaffEntity,Long> {
@Autowired
private ParamService paramService;
public FeedbackStaffController(){
super.setModuleDesc( "员工反馈问卷");
}
@Override
protected void init(Map<String, Object> model, Context context) {
super.init(model, context);
}
}
\ No newline at end of file
###登录
POST {{baseUrl}}/login/login
Content-Type: application/json
{
"loginName":"admin",
"password":"admin",
"securityCode":"8888"
}
> {%
client.global.set("SmsSet_id", JSON.parse(response.body).data.id);
client.global.set("authToken", JSON.parse(response.body).data.token);
%}
###员工反馈问卷列表
POST {{baseUrl}}/feedback/staff/list
Content-Type: application/json
{
"page":1,
"size":10
}
###员工反馈问卷更新与保存
POST {{baseUrl}}/feedback/staff/save
Authorization: {{authToken}}
Content-Type: application/json
{
"feedbackId":0,
"staffId":0,
"remark":"9ibjqk",
}
> {%
client.global.set("FeedbackStaff_id", JSON.parse(response.body).data.id);
%}
###员工反馈问卷查看
GET {{baseUrl}}/feedback/staff/info?id={{FeedbackStaff_id}}
Accept: application/json
###员工反馈问卷编辑
GET {{baseUrl}}/feedback/staff/edit?id={{FeedbackStaff_id}}
Accept: application/json
###员工反馈问卷删除
GET {{baseUrl}}/feedback/staff/delete?id={{FeedbackStaff_id}}
Authorization: {{authToken}}
Accept: application/json
...@@ -251,3 +251,28 @@ INSERT INTO `mortals_xhx_resource` VALUES (null, '绩效问题回答选项-菜 ...@@ -251,3 +251,28 @@ INSERT INTO `mortals_xhx_resource` VALUES (null, '绩效问题回答选项-菜
-- ---------------------------- -- ----------------------------
INSERT INTO `mortals_xhx_resource` VALUES (null, '员工绩效统计-菜单管理-查看', '/staff/perform/summary/list,/staff/perform/summary/view,/staff/perform/summary/info,/staff/perform/summary/export,/staff/perform/summary/exportExcel,/staff/perform/summary/downloadTemplate,/staff/perform/summary/download', 3, 0, NULL, NULL, NULL, 0); INSERT INTO `mortals_xhx_resource` VALUES (null, '员工绩效统计-菜单管理-查看', '/staff/perform/summary/list,/staff/perform/summary/view,/staff/perform/summary/info,/staff/perform/summary/export,/staff/perform/summary/exportExcel,/staff/perform/summary/downloadTemplate,/staff/perform/summary/download', 3, 0, NULL, NULL, NULL, 0);
INSERT INTO `mortals_xhx_resource` VALUES (null, '员工绩效统计-菜单管理-维护', '/staff/perform/summary/add,/staff/perform/summary/edit,/staff/perform/summary/delete,/staff/perform/summary/logicDelete,/staff/perform/summary/save,/staff/perform/summary/importData', 3, 0, NULL, NULL, NULL, 0); INSERT INTO `mortals_xhx_resource` VALUES (null, '员工绩效统计-菜单管理-维护', '/staff/perform/summary/add,/staff/perform/summary/edit,/staff/perform/summary/delete,/staff/perform/summary/logicDelete,/staff/perform/summary/save,/staff/perform/summary/importData', 3, 0, NULL, NULL, NULL, 0);
-- ----------------------------
-- 员工反馈问卷表
-- ----------------------------
DROP TABLE IF EXISTS `mortals_xhx_feedback_staff`;
CREATE TABLE mortals_xhx_feedback_staff(
`id` bigint(20) AUTO_INCREMENT COMMENT '序号,主键,自增长',
`feedbackId` bigint(20) DEFAULT '0' COMMENT '反馈问卷id号',
`staffId` bigint(20) DEFAULT '0' COMMENT '用户id',
`remark` varchar(255) COMMENT '备注',
`createUserId` bigint(20) COMMENT '创建用户',
`createTime` datetime COMMENT '创建时间',
`updateUserId` bigint(20) COMMENT '更新用户',
`updateTime` datetime COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='员工反馈问卷';
-- ----------------------------
-- 员工反馈问卷资源路径 SQL
-- ----------------------------
INSERT INTO `mortals_xhx_resource` VALUES (null, '员工反馈问卷-菜单管理-查看', '/feedback/staff/list,/feedback/staff/view,/feedback/staff/info,/feedback/staff/export,/feedback/staff/exportExcel,/feedback/staff/downloadTemplate,/feedback/staff/download', 3, 0, NULL, NULL, NULL, 0);
INSERT INTO `mortals_xhx_resource` VALUES (null, '员工反馈问卷-菜单管理-维护', '/feedback/staff/add,/feedback/staff/edit,/feedback/staff/delete,/feedback/staff/logicDelete,/feedback/staff/save,/feedback/staff/importData', 3, 0, NULL, NULL, NULL, 0);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment