insert 企业管理员表
This commit is contained in:
@@ -55,3 +55,38 @@ alter table tb_certificate_payment
|
||||
add column member_payment_amount decimal(12, 2) null comment '会员缴费金额',
|
||||
add column certificate_payment_amount decimal(12, 2) null comment '证书缴费金额',
|
||||
add column other_payment_amount decimal(12, 2) null comment '其他缴费金额';
|
||||
|
||||
-- 企业管理员管理表的增加
|
||||
CREATE TABLE `pay_manager_management`
|
||||
(
|
||||
`id` varchar(32) NOT NULL COMMENT '主键',
|
||||
`company_id` varchar(32) DEFAULT NULL COMMENT '企业id',
|
||||
`company_name` varchar(55) DEFAULT NULL COMMENT '企业名称(未审核状态下会多出5位,因此修改成55长度)',
|
||||
`name` varchar(50) DEFAULT NULL COMMENT '姓名',
|
||||
`gender` tinyint(1) DEFAULT NULL COMMENT '性别(1:男,2:女)',
|
||||
`post` varchar(50) DEFAULT NULL COMMENT '职务',
|
||||
`phone` varchar(200) DEFAULT NULL COMMENT '手机号',
|
||||
`email` varchar(200) DEFAULT NULL COMMENT '邮箱',
|
||||
`email_password` varchar(255) DEFAULT NULL COMMENT '邮箱授权码',
|
||||
`contact_address` varchar(50) DEFAULT NULL COMMENT '通讯地址',
|
||||
`postal_code` varchar(6) DEFAULT NULL COMMENT '邮政编码',
|
||||
`password` varchar(255) DEFAULT NULL COMMENT '密码',
|
||||
`salt` varchar(255) DEFAULT NULL COMMENT '盐值',
|
||||
`open_id` varchar(255) DEFAULT NULL COMMENT '微信openId',
|
||||
`remarks` varchar(200) DEFAULT NULL COMMENT '备注',
|
||||
`create_by` varchar(32) DEFAULT NULL COMMENT '创建人',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`update_by` varchar(32) DEFAULT NULL COMMENT '更新人',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
`del_flag` tinyint(1) DEFAULT NULL COMMENT '删除状态 0:通过 1:未通过(会员系统审核状态)',
|
||||
`username` varchar(50) DEFAULT NULL COMMENT '用户名用于会员系统使用',
|
||||
`role_code` tinyint(1) DEFAULT NULL COMMENT '企业角色1:普通企业、2:会员企业',
|
||||
`member_nature` tinyint(1) DEFAULT NULL COMMENT '会员性质字段',
|
||||
`member_id` varchar(32) DEFAULT NULL COMMENT '会员企业id',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
UNIQUE KEY `contacts_phone_index` (`phone`) USING BTREE COMMENT '手机号唯一',
|
||||
UNIQUE KEY `contacts_company_and_name_index` (`company_id`, `name`) USING BTREE COMMENT '企业与姓名唯一',
|
||||
KEY `contacts_company_name_index` (`company_name`) USING BTREE,
|
||||
KEY `contacts_name_index` (`name`) USING BTREE
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4 COMMENT ='企业管理员管理';
|
||||
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
package com.jero.company.controller;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @Description: 企业端管理员登录
|
||||
* @author: Kuang Kaixing
|
||||
* @date: 2022/07/26 10:37
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/companyManager")
|
||||
@Api(tags = "企业端管理员登录")
|
||||
@Slf4j
|
||||
public class CompanyManagerLoginController {
|
||||
|
||||
}
|
||||
+140
@@ -0,0 +1,140 @@
|
||||
package com.jero.company.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.company.entity.PayManagerManagement;
|
||||
import com.jero.company.service.IPayManagerManagementService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 企业管理员管理
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-07-26
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="企业管理员管理")
|
||||
@RestController
|
||||
@RequestMapping("/com.jero.payment/payManagerManagement")
|
||||
@Slf4j
|
||||
public class PayManagerManagementController extends JeroController<PayManagerManagement, IPayManagerManagementService> {
|
||||
@Resource
|
||||
private IPayManagerManagementService payManagerManagementService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*/
|
||||
@ApiOperation(value="企业管理员管理-分页列表查询", notes="企业管理员管理-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<?> queryPageList(PayManagerManagement payManagerManagement,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<PayManagerManagement> queryWrapper = QueryGenerator.initQueryWrapper(payManagerManagement, req.getParameterMap());
|
||||
Page<PayManagerManagement> page = new Page<>(pageNo, pageSize);
|
||||
IPage<PayManagerManagement> pageList = payManagerManagementService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*/
|
||||
@ApiOperation(value="企业管理员管理-列表查询", notes="企业管理员管理-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<PayManagerManagement>> queryList() {
|
||||
List<PayManagerManagement> list = payManagerManagementService.queryList();
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
@AutoLog(value = "企业管理员管理-添加")
|
||||
@ApiOperation(value="企业管理员管理-添加", notes="企业管理员管理-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<?> add(@Validated @RequestBody PayManagerManagement payManagerManagement) {
|
||||
payManagerManagementService.add(payManagerManagement);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
@AutoLog(value = "企业管理员管理-编辑")
|
||||
@ApiOperation(value="企业管理员管理-编辑", notes="企业管理员管理-编辑")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<?> edit(@Validated @RequestBody PayManagerManagement payManagerManagement) {
|
||||
payManagerManagementService.editById(payManagerManagement);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*/
|
||||
@AutoLog(value = "企业管理员管理-通过id删除")
|
||||
@ApiOperation(value="企业管理员管理-通过id删除", notes="企业管理员管理-通过id删除")
|
||||
@GetMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id") String id) {
|
||||
payManagerManagementService.deleteById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
@AutoLog(value = "企业管理员管理-批量删除")
|
||||
@ApiOperation(value="企业管理员管理-批量删除", notes="企业管理员管理-批量删除")
|
||||
@GetMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids") String ids) {
|
||||
this.payManagerManagementService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*/
|
||||
@AutoLog(value = "企业管理员管理-通过id查询")
|
||||
@ApiOperation(value="企业管理员管理-通过id查询", notes="企业管理员管理-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id") String id) {
|
||||
PayManagerManagement payManagerManagement = payManagerManagementService.queryById(id);
|
||||
if(payManagerManagement==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(payManagerManagement);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*/
|
||||
@ApiOperation(value="企业管理员管理-导出excel")
|
||||
@GetMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, PayManagerManagement payManagerManagement) {
|
||||
return super.exportXls(request, payManagerManagement, PayManagerManagement.class, "企业管理员管理");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*/
|
||||
@ApiOperation(value="企业管理员管理-通过excel导入数据")
|
||||
@PostMapping(value = "/importExcel")
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, PayManagerManagement.class);
|
||||
}
|
||||
|
||||
}
|
||||
+154
@@ -0,0 +1,154 @@
|
||||
package com.jero.company.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import com.jero.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: 企业管理员管理
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-07-26
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("pay_manager_management")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="pay_manager_management对象", description="企业管理员管理")
|
||||
public class PayManagerManagement implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private String id;
|
||||
|
||||
/**企业id*/
|
||||
@Excel(name = "企业id", width = 15)
|
||||
@ApiModelProperty(value = "企业id")
|
||||
private String companyId;
|
||||
|
||||
/**企业名称(未审核状态下会多出5位,因此修改成55长度)*/
|
||||
@Excel(name = "企业名称(未审核状态下会多出5位,因此修改成55长度)", width = 15)
|
||||
@ApiModelProperty(value = "企业名称(未审核状态下会多出5位,因此修改成55长度)")
|
||||
private String companyName;
|
||||
|
||||
/**姓名*/
|
||||
@Excel(name = "姓名", width = 15)
|
||||
@ApiModelProperty(value = "姓名")
|
||||
private String name;
|
||||
|
||||
/**性别(1:男,2:女)*/
|
||||
@Excel(name = "性别(1:男,2:女)", width = 15)
|
||||
@ApiModelProperty(value = "性别(1:男,2:女)")
|
||||
private Integer gender;
|
||||
|
||||
/**职务*/
|
||||
@Excel(name = "职务", width = 15)
|
||||
@ApiModelProperty(value = "职务")
|
||||
private String post;
|
||||
|
||||
/**手机号*/
|
||||
@Excel(name = "手机号", width = 15)
|
||||
@ApiModelProperty(value = "手机号")
|
||||
private String phone;
|
||||
|
||||
/**邮箱*/
|
||||
@Excel(name = "邮箱", width = 15)
|
||||
@ApiModelProperty(value = "邮箱")
|
||||
private String email;
|
||||
|
||||
/**邮箱授权码*/
|
||||
@Excel(name = "邮箱授权码", width = 15)
|
||||
@ApiModelProperty(value = "邮箱授权码")
|
||||
private String emailPassword;
|
||||
|
||||
/**通讯地址*/
|
||||
@Excel(name = "通讯地址", width = 15)
|
||||
@ApiModelProperty(value = "通讯地址")
|
||||
private String contactAddress;
|
||||
|
||||
/**邮政编码*/
|
||||
@Excel(name = "邮政编码", width = 15)
|
||||
@ApiModelProperty(value = "邮政编码")
|
||||
private String postalCode;
|
||||
|
||||
/**密码*/
|
||||
@Excel(name = "密码", width = 15)
|
||||
@ApiModelProperty(value = "密码")
|
||||
private String password;
|
||||
|
||||
/**盐值*/
|
||||
@Excel(name = "盐值", width = 15)
|
||||
@ApiModelProperty(value = "盐值")
|
||||
private String salt;
|
||||
|
||||
/**微信openId*/
|
||||
@Excel(name = "微信openId", width = 15)
|
||||
@ApiModelProperty(value = "微信openId")
|
||||
private String openId;
|
||||
|
||||
/**备注*/
|
||||
@Excel(name = "备注", width = 15)
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remarks;
|
||||
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createBy;
|
||||
|
||||
/**创建时间*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updateBy;
|
||||
|
||||
/**更新时间*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
/**删除状态 0:通过 1:未通过(会员系统审核状态)*/
|
||||
@Excel(name = "删除状态 0:通过 1:未通过(会员系统审核状态)", width = 15)
|
||||
@ApiModelProperty(value = "删除状态 0:通过 1:未通过(会员系统审核状态)")
|
||||
private Integer delFlag;
|
||||
|
||||
/**用户名用于会员系统使用*/
|
||||
@Excel(name = "用户名用于会员系统使用", width = 15)
|
||||
@ApiModelProperty(value = "用户名用于会员系统使用")
|
||||
private String username;
|
||||
|
||||
/**企业角色1:普通企业、2:会员企业*/
|
||||
@Excel(name = "企业角色1:普通企业、2:会员企业", width = 15)
|
||||
@ApiModelProperty(value = "企业角色1:普通企业、2:会员企业")
|
||||
private Integer roleCode;
|
||||
|
||||
/**会员性质字段*/
|
||||
@Excel(name = "会员性质字段", width = 15)
|
||||
@ApiModelProperty(value = "会员性质字段")
|
||||
private Integer memberNature;
|
||||
|
||||
/**会员企业id*/
|
||||
@Excel(name = "会员企业id", width = 15)
|
||||
@ApiModelProperty(value = "会员企业id")
|
||||
private String memberId;
|
||||
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package com.jero.company.mapper;
|
||||
|
||||
import com.jero.company.entity.PayManagerManagement;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 企业管理员管理
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-07-26
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface PayManagerManagementMapper extends BaseMapper<PayManagerManagement> {
|
||||
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
<?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="com.jero.company.mapper.PayManagerManagementMapper">
|
||||
<resultMap id="PayManagerManagementResultMap" type="com.jero.company.entity.PayManagerManagement">
|
||||
<id column="id" property="id" />
|
||||
<result column="company_id" property="companyId" />
|
||||
<result column="company_name" property="companyName" />
|
||||
<result column="name" property="name" />
|
||||
<result column="gender" property="gender" />
|
||||
<result column="post" property="post" />
|
||||
<result column="phone" property="phone" />
|
||||
<result column="email" property="email" />
|
||||
<result column="email_password" property="emailPassword" />
|
||||
<result column="contact_address" property="contactAddress" />
|
||||
<result column="postal_code" property="postalCode" />
|
||||
<result column="password" property="password" />
|
||||
<result column="salt" property="salt" />
|
||||
<result column="open_id" property="openId" />
|
||||
<result column="remarks" property="remarks" />
|
||||
<result column="create_by" property="createBy" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="update_by" property="updateBy" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="del_flag" property="delFlag" />
|
||||
<result column="username" property="username" />
|
||||
<result column="role_code" property="roleCode" />
|
||||
<result column="member_nature" property="memberNature" />
|
||||
<result column="member_id" property="memberId" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
package com.jero.company.service;
|
||||
|
||||
import com.jero.company.entity.PayManagerManagement;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 企业管理员管理
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-07-26
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IPayManagerManagementService extends IService<PayManagerManagement> {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
void add(PayManagerManagement payManagerManagement);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*/
|
||||
void editById(PayManagerManagement payManagerManagement);
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*/
|
||||
void deleteById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
void deleteByIds(List<String> ids);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*/
|
||||
PayManagerManagement queryById(String id);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*/
|
||||
List<PayManagerManagement> queryList();
|
||||
}
|
||||
+84
@@ -0,0 +1,84 @@
|
||||
package com.jero.company.service.impl;
|
||||
|
||||
import com.jero.company.entity.PayManagerManagement;
|
||||
import com.jero.company.mapper.PayManagerManagementMapper;
|
||||
import com.jero.company.service.IPayManagerManagementService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 企业管理员管理
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-07-26
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class PayManagerManagementServiceImpl extends ServiceImpl<PayManagerManagementMapper, PayManagerManagement> implements IPayManagerManagementService {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param payManagerManagement
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void add(PayManagerManagement payManagerManagement) {
|
||||
save(payManagerManagement);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param payManagerManagement
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void editById(PayManagerManagement payManagerManagement) {
|
||||
saveOrUpdate(payManagerManagement);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public PayManagerManagement queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<PayManagerManagement> queryList() {
|
||||
return list();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user