From 849d852c16db8fdf0ae2920db660f879381e6a38 Mon Sep 17 00:00:00 2001
From: tangzy <tangzy123456>
Date: Wed, 01 Sep 2021 16:08:35 +0800
Subject: [PATCH] 1.注册

---
 src/main/java/org/springblade/modules/system/service/IRoleService.java         |    2 
 src/main/java/org/springblade/modules/system/controller/DeptController.java    |   10 
 src/main/java/org/springblade/modules/system/controller/RoleController.java    |    7 
 src/main/java/org/springblade/modules/system/service/impl/DeptServiceImpl.java |    5 
 src/main/java/org/springblade/common/constant/FtpConstant.java                 |   26 +-
 src/main/java/org/springblade/modules/zc/controller/ZcController.java          |  158 ++++++++++++++
 src/main/java/org/springblade/modules/zc/service/impl/ZcServiceImpl.java       |   52 ++++
 src/main/java/org/springblade/modules/system/service/impl/RoleServiceImpl.java |    5 
 src/main/java/org/springblade/modules/system/mapper/DeptMapper.java            |    2 
 src/main/java/org/springblade/modules/system/mapper/RoleMapper.xml             |   19 +
 src/main/java/org/springblade/modules/zc/entity/Zc.java                        |   84 +++++++
 src/main/java/org/springblade/modules/zc/vo/ZcVO.java                          |   36 +++
 src/main/java/org/springblade/modules/system/mapper/DeptMapper.xml             |   31 ++
 src/main/java/org/springblade/modules/system/mapper/RoleMapper.java            |    3 
 src/main/java/org/springblade/modules/zc/dto/ZcDTO.java                        |   34 +++
 src/main/java/org/springblade/modules/zc/mapper/ZcMapper.java                  |   46 ++++
 src/main/java/org/springblade/modules/zc/mapper/ZcMapper.xml                   |   34 +++
 src/main/java/org/springblade/modules/system/service/IDeptService.java         |    2 
 src/main/java/org/springblade/modules/FTP/OutJson.java                         |    4 
 src/main/java/org/springblade/modules/zc/service/IZcService.java               |   42 +++
 20 files changed, 573 insertions(+), 29 deletions(-)

diff --git a/src/main/java/org/springblade/common/constant/FtpConstant.java b/src/main/java/org/springblade/common/constant/FtpConstant.java
index ece23ae..ef8dc8f 100644
--- a/src/main/java/org/springblade/common/constant/FtpConstant.java
+++ b/src/main/java/org/springblade/common/constant/FtpConstant.java
@@ -8,22 +8,22 @@
 	/**
 	 * sql connect
 	 */
-	//String sql_connect_dev = "jdbc:mysql://223.82.109.183:2083/zhbaw?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true";
+	String sql_connect_dev = "jdbc:mysql://223.82.109.183:2083/zhbaw?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true";
 
 	/**
 	 * sql connect
 	 */
-	String sql_connect_dev = "jdbc:mysql://localhost:2083/zhbaw?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true";
+	//String sql_connect_dev = "jdbc:mysql://localhost:2083/zhbaw?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true";
 
 	/**
 	 * ftp服务器IP地址
 	 */
-	//String ftpHost_dev = "192.168.0.105";
+	String ftpHost_dev = "192.168.0.108";
 
 	/**
 	 * ftp服务器IP地址
 	 */
-	String ftpHost_dev = "172.19.1.30";
+	//String ftpHost_dev = "172.19.1.30";
 
 	/**
 	 * ftp服务器端口
@@ -33,28 +33,30 @@
 	/**
 	 * ftp服务器用户名
 	 */
-	String ftpUserName = "yly";
+	//String ftpUserName = "yly";
+	String ftpUserName = "anonymous";
 
 	/**
 	 * ftp服务器密码
 	 */
-	String ftpPassword = "Yly@123";
+	//String ftpPassword = "Yly@123";
+	String ftpPassword = "";
 
 
 	/**
 	 * ftp服务器路径
 	 */
-	String ftpPath = "yly/anbao/";
-	//String ftpPath = "anbao/";
+	//String ftpPath = "yly/anbao/";
+	String ftpPath = "anbao/";
 
 	/**
 	 * 本地路径
 	 */
-	String localPath = "/home/zhongsong/anbao/";
-	//String localPath = "D:\\anbao\\";
+	//String localPath = "/home/zhongsong/anbao/";
+	String localPath = "D:\\anbao\\";
 
 
 	//minio内网ip
-	String ip = "http://47.49.21.216:9000";
-	//String ip = "http://223.82.109.183:2081";
+	//String ip = "http://47.49.21.216:9000";
+	String ip = "http://223.82.109.183:2081";
 }
diff --git a/src/main/java/org/springblade/modules/FTP/OutJson.java b/src/main/java/org/springblade/modules/FTP/OutJson.java
index 175dabf..e88c7ec 100644
--- a/src/main/java/org/springblade/modules/FTP/OutJson.java
+++ b/src/main/java/org/springblade/modules/FTP/OutJson.java
@@ -152,8 +152,8 @@
 	 * @return
 	 */
 	public static String TestJson(String fileName){
-		//File file = new File("D:\\anbao\\"+fileName);
-		File file = new File("/home/zhongsong/anbao/"+fileName);
+		File file = new File("D:\\anbao\\"+fileName);
+		//File file = new File("/home/zhongsong/anbao/"+fileName);
 		StringBuilder localStrBulider = new StringBuilder();
 		if(file.isFile() && file.exists()) {
 			try {
diff --git a/src/main/java/org/springblade/modules/system/controller/DeptController.java b/src/main/java/org/springblade/modules/system/controller/DeptController.java
index 28154fd..5350a6d 100644
--- a/src/main/java/org/springblade/modules/system/controller/DeptController.java
+++ b/src/main/java/org/springblade/modules/system/controller/DeptController.java
@@ -25,6 +25,7 @@
 import org.springblade.core.boot.ctrl.BladeController;
 import org.springblade.core.cache.utils.CacheUtil;
 import org.springblade.core.launch.constant.AppConstant;
+import org.springblade.core.log.annotation.ApiLog;
 import org.springblade.core.mp.support.Condition;
 import org.springblade.core.secure.BladeUser;
 import org.springblade.core.tenant.annotation.NonDS;
@@ -228,8 +229,11 @@
 		return R.status(deptService.removeDept(ids));
 	}
 
-	@GetMapping("/selectIn")
-	public R selectIn() {
-		return R.data(deptService.selectIn());
+	@ApiLog("Blog详情")
+	@GetMapping("/selectInfo")
+	public R<List<DeptVO>> selectInfo() {
+		List<DeptVO> tree =deptService.selectInfo();
+		return R.data(tree);
 	}
+
 }
diff --git a/src/main/java/org/springblade/modules/system/controller/RoleController.java b/src/main/java/org/springblade/modules/system/controller/RoleController.java
index 62d2c5d..0c6fcca 100644
--- a/src/main/java/org/springblade/modules/system/controller/RoleController.java
+++ b/src/main/java/org/springblade/modules/system/controller/RoleController.java
@@ -160,4 +160,11 @@
 		return R.status(temp);
 	}
 
+
+	@GetMapping("/selectRole")
+	public R selectRole() {
+		return R.data(roleService.selectRole());
+	}
+
+
 }
diff --git a/src/main/java/org/springblade/modules/system/mapper/DeptMapper.java b/src/main/java/org/springblade/modules/system/mapper/DeptMapper.java
index da5b886..b47f7bc 100644
--- a/src/main/java/org/springblade/modules/system/mapper/DeptMapper.java
+++ b/src/main/java/org/springblade/modules/system/mapper/DeptMapper.java
@@ -139,4 +139,6 @@
 	Map<Long, TreeNodes> lazyTreeUsersPublicSecuritys(@Param("type") Integer type,
 													  @Param("deptId") Long deptId,
 													  @Param("jurisdiction")String jurisdiction);
+
+	List<DeptVO>  selectInfo();
 }
diff --git a/src/main/java/org/springblade/modules/system/mapper/DeptMapper.xml b/src/main/java/org/springblade/modules/system/mapper/DeptMapper.xml
index 595df0f..5e4442e 100644
--- a/src/main/java/org/springblade/modules/system/mapper/DeptMapper.xml
+++ b/src/main/java/org/springblade/modules/system/mapper/DeptMapper.xml
@@ -129,7 +129,6 @@
         and dept_category = 1
         AND dept.is_deleted = 0
         and dept.id !=1420222961377357825
-        and dept.id !=1432625856013971457
         and dept.parent_id!=1420222961377357825
         <if test="param1!=null and param1!='' and param1!='1123598813738675201'">
             and si.jurisdiction = #{param1}
@@ -574,5 +573,33 @@
     <insert id="add" parameterType="org.springblade.modules.system.entity.Dept" useGeneratedKeys="true" keyProperty="id">
         insert into blade_dept(tenant_id, parent_id,ancestors,dept_category,dept_name) values(#{tenantId}, #{parentId}, #{ancestors}, #{deptCategory}, #{deptName})
     </insert>
-
+    <select id="selectInfo" resultType="java.util.HashMap">
+        SELECT
+            DISTINCT
+            dept.id,
+            dept.parent_id,
+            dept.dept_name AS title,
+            dept.id AS "value",
+            dept.id AS "key",
+            (
+                SELECT
+                    CASE WHEN count(1) > 0 THEN 1 ELSE 0 END
+                FROM
+                    blade_dept
+                WHERE
+                    parent_id = dept.id and is_deleted = 0
+            ) AS "has_children"
+        FROM
+            blade_dept dept
+                left join
+            sys_information si
+            on
+                si.departmentid = dept.id
+        WHERE
+            1=1
+          and dept_category = 1
+          AND dept.is_deleted = 0
+          and dept.id !=1420222961377357825
+        and dept.parent_id!=1420222961377357825
+    </select>
 </mapper>
diff --git a/src/main/java/org/springblade/modules/system/mapper/RoleMapper.java b/src/main/java/org/springblade/modules/system/mapper/RoleMapper.java
index ae1aefa..7f21ee2 100644
--- a/src/main/java/org/springblade/modules/system/mapper/RoleMapper.java
+++ b/src/main/java/org/springblade/modules/system/mapper/RoleMapper.java
@@ -19,6 +19,7 @@
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.springblade.modules.system.entity.Role;
+import org.springblade.modules.system.vo.DeptVO;
 import org.springblade.modules.system.vo.RoleVO;
 
 import java.util.List;
@@ -64,5 +65,5 @@
 	 * @return
 	 */
 	List<String> getRoleAliases(Long[] ids);
-
+	List selectRole();
 }
diff --git a/src/main/java/org/springblade/modules/system/mapper/RoleMapper.xml b/src/main/java/org/springblade/modules/system/mapper/RoleMapper.xml
index 295c3fe..b3cae52 100644
--- a/src/main/java/org/springblade/modules/system/mapper/RoleMapper.xml
+++ b/src/main/java/org/springblade/modules/system/mapper/RoleMapper.xml
@@ -21,7 +21,9 @@
     </resultMap>
 
     <select id="selectRolePage" resultMap="roleResultMap">
-        select * from blade_role where is_deleted = 0
+        select *
+        from blade_role
+        where is_deleted = 0
     </select>
 
     <select id="tree" resultMap="treeNodeResultMap">
@@ -65,13 +67,14 @@
 
 
     <select id="Info" resultType="java.lang.String">
-        SELECT
-        role_alias as rolename
-        FROM
-        blade_role
-        WHERE
-        id=#{id}
-        and is_deleted = 0
+        SELECT role_alias as rolename
+        FROM blade_role
+        WHERE id = #{id}
+          and is_deleted = 0
+    </select>
+
+    <select id="selectRole" resultType="java.util.HashMap">
+        SELECT id,role_name AS title FROM blade_role WHERE is_deleted = 0 AND id != 1123598816738675201
     </select>
 
 </mapper>
diff --git a/src/main/java/org/springblade/modules/system/service/IDeptService.java b/src/main/java/org/springblade/modules/system/service/IDeptService.java
index 1005ce1..8569e11 100644
--- a/src/main/java/org/springblade/modules/system/service/IDeptService.java
+++ b/src/main/java/org/springblade/modules/system/service/IDeptService.java
@@ -157,4 +157,6 @@
 	 * @return
 	 */
 	List<TreeNodes> lazyTreeUsers(Integer type,Long deptId);
+
+	List<DeptVO> selectInfo();
 }
diff --git a/src/main/java/org/springblade/modules/system/service/IRoleService.java b/src/main/java/org/springblade/modules/system/service/IRoleService.java
index 2665cfb..15f39c2 100644
--- a/src/main/java/org/springblade/modules/system/service/IRoleService.java
+++ b/src/main/java/org/springblade/modules/system/service/IRoleService.java
@@ -100,6 +100,6 @@
 	 * @return
 	 */
 	List<RoleVO> search(String roleName, Long parentId);
-
+	List selectRole();
 
 }
diff --git a/src/main/java/org/springblade/modules/system/service/impl/DeptServiceImpl.java b/src/main/java/org/springblade/modules/system/service/impl/DeptServiceImpl.java
index 3292850..07225c1 100644
--- a/src/main/java/org/springblade/modules/system/service/impl/DeptServiceImpl.java
+++ b/src/main/java/org/springblade/modules/system/service/impl/DeptServiceImpl.java
@@ -293,4 +293,9 @@
 		});
 		return tree;
 	}
+
+	@Override
+	public List<DeptVO> selectInfo() {
+		return baseMapper.selectInfo();
+	}
 }
diff --git a/src/main/java/org/springblade/modules/system/service/impl/RoleServiceImpl.java b/src/main/java/org/springblade/modules/system/service/impl/RoleServiceImpl.java
index f4a408b..847aafb 100644
--- a/src/main/java/org/springblade/modules/system/service/impl/RoleServiceImpl.java
+++ b/src/main/java/org/springblade/modules/system/service/impl/RoleServiceImpl.java
@@ -219,4 +219,9 @@
 		return RoleWrapper.build().listNodeVO(roleList);
 	}
 
+	@Override
+	public List selectRole() {
+		return baseMapper.selectRole();
+	}
+
 }
diff --git a/src/main/java/org/springblade/modules/zc/controller/ZcController.java b/src/main/java/org/springblade/modules/zc/controller/ZcController.java
new file mode 100644
index 0000000..c3d1e88
--- /dev/null
+++ b/src/main/java/org/springblade/modules/zc/controller/ZcController.java
@@ -0,0 +1,158 @@
+/*
+ *      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.zc.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.AllArgsConstructor;
+import org.springblade.core.boot.ctrl.BladeController;
+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.DigestUtil;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.modules.system.entity.User;
+import org.springblade.modules.system.service.IUserService;
+import org.springblade.modules.zc.entity.Zc;
+import org.springblade.modules.zc.service.IZcService;
+import org.springblade.modules.zc.vo.ZcVO;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+/**
+ *  控制器
+ *
+ * @author BladeX
+ * @since 2020-09-08
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/zc")
+@Api(value = "", tags = "接口")
+public class ZcController extends BladeController {
+
+	private final IZcService zcService;
+
+	private IUserService iUserService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入zc")
+	public R<Zc> detail(Zc zc) {
+		Zc detail = zcService.getOne(Condition.getQueryWrapper(zc));
+		return R.data(detail);
+	}
+
+	/**
+	 * 分页
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入zc")
+	public R<IPage<Zc>> list(Zc zc, Query query) {
+		IPage<Zc> pages = zcService.page(Condition.getPage(query), Condition.getQueryWrapper(zc));
+		return R.data(pages);
+	}
+
+	/**
+	 * 自定义分页
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入zc")
+	public R<IPage<ZcVO>> page(ZcVO zc, Query query) {
+		IPage<ZcVO> pages = zcService.selectZcPage(Condition.getPage(query), zc);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入zc")
+	public R save(@Valid @RequestBody Zc zc) {
+		return R.status(zcService.save(zc));
+	}
+
+	/**
+	 * 修改
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入zc")
+	public R update(@Valid @RequestBody Zc zc) {
+		return R.status(zcService.updateById(zc));
+	}
+
+	/**
+	 * 新增或修改
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入zc")
+	public R submit(@Valid @RequestBody Zc zc) {
+		String type = zc.getType();
+		if (type.equals("1")){
+			User user = new User();
+			user.setAccount(zc.getUsername());
+			user.setPassword(DigestUtil.encrypt(zc.getPassword()));
+			user.setRealName(zc.getSname());
+			user.setSex(Integer.valueOf(zc.getSex()));
+			user.setPhone(zc.getPhone());
+			user.setDeptId(zc.getDeptid());
+			user.setRoleId(zc.getParentId());
+			iUserService.saveOrUpdate(user);
+		}
+		return R.status(zcService.saveOrUpdate(zc));
+	}
+
+
+	/**
+	 * 删除
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(zcService.removeByIds(Func.toLongList(ids)));
+	}
+
+	/**
+	 * 新增
+	 */
+	@PostMapping("/inster")
+	@ApiOperation(value = "新增", notes = "传入zc")
+	public R inster(@Valid @RequestBody Zc zc) {
+		//当前时间
+		SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+		String times = df.format(new Date());
+		zc.setZctime(times);
+		zcService.inster(zc);
+		return R.success("新增成功");
+	}
+
+}
diff --git a/src/main/java/org/springblade/modules/zc/dto/ZcDTO.java b/src/main/java/org/springblade/modules/zc/dto/ZcDTO.java
new file mode 100644
index 0000000..6a3162e
--- /dev/null
+++ b/src/main/java/org/springblade/modules/zc/dto/ZcDTO.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.zc.dto;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.modules.zc.entity.Zc;
+
+/**
+ * 数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2020-09-08
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ZcDTO extends Zc {
+	private static final long serialVersionUID = 1L;
+
+}
diff --git a/src/main/java/org/springblade/modules/zc/entity/Zc.java b/src/main/java/org/springblade/modules/zc/entity/Zc.java
new file mode 100644
index 0000000..691679f
--- /dev/null
+++ b/src/main/java/org/springblade/modules/zc/entity/Zc.java
@@ -0,0 +1,84 @@
+/*
+ *      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.zc.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 实体类
+ *
+ * @author BladeX
+ * @since 2020-09-08
+ */
+@Data
+@TableName("act_zc")
+@ApiModel(value = "Zc对象", description = "Zc对象")
+public class Zc implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	@TableId(value = "id", type = IdType.AUTO)
+	private Integer id;
+	/**
+	* 账号
+	*/
+		@ApiModelProperty(value = "账号")
+		private String username;
+	/**
+	* 密码
+	*/
+		@ApiModelProperty(value = "密码")
+		private String password;
+	/**
+	* 姓名
+	*/
+		@ApiModelProperty(value = "姓名")
+		private String sname;
+	/**
+	* 性别
+	*/
+		@ApiModelProperty(value = "性别")
+		private String sex;
+	/**
+	* 手机号码
+	*/
+		@ApiModelProperty(value = "手机号码")
+		private String phone;
+
+	/**
+	 * 注册时间
+	 */
+	@ApiModelProperty(value = "注册时间")
+	private String zctime;
+
+	/**
+	 * 审核状态
+	 */
+	@ApiModelProperty(value = "审核状态")
+	private String type;
+	private String deptid;
+	private String parentId;
+
+
+}
diff --git a/src/main/java/org/springblade/modules/zc/mapper/ZcMapper.java b/src/main/java/org/springblade/modules/zc/mapper/ZcMapper.java
new file mode 100644
index 0000000..e6a7a70
--- /dev/null
+++ b/src/main/java/org/springblade/modules/zc/mapper/ZcMapper.java
@@ -0,0 +1,46 @@
+/*
+ *      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.zc.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.modules.zc.entity.Zc;
+import org.springblade.modules.zc.vo.ZcVO;
+
+import java.util.List;
+
+/**
+ *  Mapper 接口
+ *
+ * @author BladeX
+ * @since 2020-09-08
+ */
+public interface ZcMapper extends BaseMapper<Zc> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param zc
+	 * @return
+	 */
+	List<ZcVO> selectZcPage(IPage page, ZcVO zc);
+
+	void inster(Zc zc);
+	String selectType(String username);
+
+}
diff --git a/src/main/java/org/springblade/modules/zc/mapper/ZcMapper.xml b/src/main/java/org/springblade/modules/zc/mapper/ZcMapper.xml
new file mode 100644
index 0000000..ee58312
--- /dev/null
+++ b/src/main/java/org/springblade/modules/zc/mapper/ZcMapper.xml
@@ -0,0 +1,34 @@
+<?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.zc.mapper.ZcMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="zcResultMap" type="org.springblade.modules.zc.entity.Zc">
+        <id column="id" property="id"/>
+        <result column="username" property="username"/>
+        <result column="password" property="password"/>
+        <result column="sname" property="sname"/>
+        <result column="sex" property="sex"/>
+        <result column="phone" property="phone"/>
+        <result column="zctime" property="zctime"/>
+        <result column="type" property="type"/>
+        <result column="deptid" property="deptid"/>
+        <result column="parentId" property="parentId"/>
+    </resultMap>
+
+
+    <select id="selectZcPage" resultMap="zcResultMap">
+        select * from act_zc where is_deleted = 0
+    </select>
+
+
+    <!--注册新增-->
+   <insert id="inster">
+       insert  into act_zc(username,password,sname,sex,phone,zctime,deptid) values(#{username},#{password},#{sname},#{sex},#{phone},#{zctime},#{deptid})
+   </insert>
+
+    <select id="selectType" resultType="String">
+        select type from act_zc where username=#{param1}
+    </select>
+
+</mapper>
diff --git a/src/main/java/org/springblade/modules/zc/service/IZcService.java b/src/main/java/org/springblade/modules/zc/service/IZcService.java
new file mode 100644
index 0000000..5ff1c58
--- /dev/null
+++ b/src/main/java/org/springblade/modules/zc/service/IZcService.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.zc.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.springblade.modules.zc.entity.Zc;
+import org.springblade.modules.zc.vo.ZcVO;
+
+/**
+ *  服务类
+ *
+ * @author BladeX
+ * @since 2020-09-08
+ */
+public interface IZcService extends IService<Zc> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param zc
+	 * @return
+	 */
+	IPage<ZcVO> selectZcPage(IPage<ZcVO> page, ZcVO zc);
+	void inster(Zc zc);
+	String selectType(String username);
+}
diff --git a/src/main/java/org/springblade/modules/zc/service/impl/ZcServiceImpl.java b/src/main/java/org/springblade/modules/zc/service/impl/ZcServiceImpl.java
new file mode 100644
index 0000000..8d5e7c8
--- /dev/null
+++ b/src/main/java/org/springblade/modules/zc/service/impl/ZcServiceImpl.java
@@ -0,0 +1,52 @@
+/*
+ *      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.zc.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springblade.modules.zc.entity.Zc;
+import org.springblade.modules.zc.mapper.ZcMapper;
+import org.springblade.modules.zc.service.IZcService;
+import org.springblade.modules.zc.vo.ZcVO;
+import org.springframework.stereotype.Service;
+
+/**
+ *  服务实现类
+ *
+ * @author BladeX
+ * @since 2020-09-08
+ */
+@Service
+
+public class ZcServiceImpl extends ServiceImpl<ZcMapper, Zc> implements IZcService {
+
+	@Override
+	public IPage<ZcVO> selectZcPage(IPage<ZcVO> page, ZcVO zc) {
+		return page.setRecords(baseMapper.selectZcPage(page, zc));
+	}
+
+	@Override
+	public void inster(Zc zc) {
+   baseMapper.inster(zc);
+	}
+
+	@Override
+	public String selectType(String username) {
+		return baseMapper.selectType(username);
+	}
+
+}
diff --git a/src/main/java/org/springblade/modules/zc/vo/ZcVO.java b/src/main/java/org/springblade/modules/zc/vo/ZcVO.java
new file mode 100644
index 0000000..38d8924
--- /dev/null
+++ b/src/main/java/org/springblade/modules/zc/vo/ZcVO.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.zc.vo;
+
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.modules.zc.entity.Zc;
+
+/**
+ * 视图实体类
+ *
+ * @author BladeX
+ * @since 2020-09-08
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "ZcVO对象", description = "ZcVO对象")
+public class ZcVO extends Zc {
+	private static final long serialVersionUID = 1L;
+
+}

--
Gitblit v1.9.3