From d65ef814ba4cf59f40396293bf54b43ea20de798 Mon Sep 17 00:00:00 2001
From: liyj <1003249715@qq.com>
Date: Sat, 17 Aug 2024 15:37:39 +0800
Subject: [PATCH] 1、代码生成器报错修改 2、生成用户中心代码
---
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/controller/web/CtUnitWebController.java | 314 +
dyh-service/dyh-cust/src/main/java/cn/huge/module/buildcode/service/BuildCodeService.java | 52
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/domain/po/CtRoledata.java | 72
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/xml/CtUsepostMapper.xml | 157
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/bo/CtDeptBO.java | 17
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/po/CtUnit.java | 234 +
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtAccountService.java | 133
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/domain/bo/CRoleBO.java | 17
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/CtUserMapper.java | 64
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/dao/mapper/xml/CtRoledataMapper.xml | 148
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/controller/web/CRoleWebController.java | 184 +
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/CtUnitMapper.java | 64
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/xml/CtDeptMapper.xml | 184 +
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/domain/po/CRole.java | 78
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/domain/po/CtRolefun.java | 101
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/bo/CtUnitBO.java | 17
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/service/CtRoledataService.java | 133
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/po/CtUserole.java | 71
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/CtDeptMapper.java | 64
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/dao/mapper/CtRoledataMapper.java | 64
dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/dao/mapper/PaAccountMapper.java | 64
dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/domain/po/PaUser.java | 192 +
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtDeptService.java | 133
dyh-service/dyh-cust/src/main/java/cn/huge/module/buildcode/dao/mapper/xml/BuildCodeMapper.xml | 28
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/controller/web/CtUseroleWebController.java | 179 +
dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/domain/po/PaAccount.java | 102
dyh-service/dyh-cust/src/test/java/cn/huge/module/BuildCodeServiceTest.java | 34
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/po/CtDept.java | 108
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/po/CtAccount.java | 102
dyh-service/dyh-sync/src/main/java/cn/huge/module/buildcode/dao/mapper/xml/BuildCodeMapper.xml | 2
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/xml/CtUseroleMapper.xml | 145
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/bo/CtPostBO.java | 17
dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/controller/web/PaUserWebController.java | 279 +
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/dao/mapper/xml/CtRolefunMapper.xml | 175 +
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/controller/web/CtUsepostWebController.java | 189 +
dyh-service/dyh-utils/src/test/java/cn/huge/module/BuildCodeServiceTest.java | 29
dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/dao/mapper/xml/PaAccountMapper.xml | 178 +
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/controller/web/CtDeptWebController.java | 209 +
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/po/CtUsepost.java | 83
dyh-service/dyh-sync/src/test/java/cn/huge/module/BuildCodeServiceTest.java | 20
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/controller/web/CtUserWebController.java | 329 ++
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/domain/bo/CtRolefunBO.java | 17
dyh-service/dyh-utils/src/main/java/cn/huge/module/buildcode/service/BuildCodeService.java | 88
dyh-service/dyh-sync/src/main/java/cn/huge/module/buildcode/service/BuildCodeService.java | 86
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtUsepostService.java | 133
dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/domain/bo/PaUserBO.java | 17
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/domain/bo/CtRoledataBO.java | 17
dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/domain/bo/PaAccountBO.java | 17
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/bo/CtAccountBO.java | 17
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/dao/mapper/CtRolefunMapper.java | 64
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtPostService.java | 133
dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/dao/mapper/PaUserMapper.java | 64
dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/controller/web/PaAccountWebController.java | 204 +
dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/service/PaUserService.java | 133
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/controller/web/CtRolefunWebController.java | 204 +
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/xml/CtPostMapper.xml | 148
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/service/CRoleService.java | 133
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/CtAccountMapper.java | 64
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/bo/CtUseroleBO.java | 17
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/bo/CtUserBO.java | 17
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/dao/mapper/xml/CRoleMapper.xml | 154
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/controller/web/CtAccountWebController.java | 204 +
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/controller/web/CtPostWebController.java | 179 +
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/service/CtRolefunService.java | 133
dyh-service/dyh-utils/src/main/java/cn/huge/module/buildcode/dao/mapper/xml/BuildCodeMapper.xml | 27
dyh-service/dyh-base/src/main/resources/template/webController.ftl | 3
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/CtUsepostMapper.java | 64
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/po/CtUser.java | 252 +
dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/dao/mapper/xml/PaUserMapper.xml | 268 +
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/CtPostMapper.java | 64
dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/service/PaAccountService.java | 133
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/po/CtPost.java | 72
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtUseroleService.java | 133
dyh-service/dyh-base/src/main/resources/template/po.ftl | 6
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/xml/CtAccountMapper.xml | 178 +
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/CtUseroleMapper.java | 64
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/controller/web/CtRoledataWebController.java | 179 +
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtUserService.java | 133
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/xml/CtUnitMapper.xml | 310 +
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/xml/CtUserMapper.xml | 328 ++
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/bo/CtUsepostBO.java | 17
dyh-service/dyh-cust/src/main/java/cn/huge/module/buildcode/dao/mapper/BuildCodeMapper.java | 2
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtUnitService.java | 133
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/dao/mapper/CRoleMapper.java | 64
84 files changed, 9,282 insertions(+), 156 deletions(-)
diff --git a/dyh-service/dyh-base/src/main/resources/template/po.ftl b/dyh-service/dyh-base/src/main/resources/template/po.ftl
index 0b6039b..f05d0b1 100644
--- a/dyh-service/dyh-base/src/main/resources/template/po.ftl
+++ b/dyh-service/dyh-base/src/main/resources/template/po.ftl
@@ -28,7 +28,7 @@
* ${col.comments}
*/
@TableId(value = "id")
- private <#if (col.dataType=="number" && (col.dataScale)?? && col.dataScale gt 0)>Long<#else>${col.javaDataType}</#if> ${col.fieldName};
+ private ${col.javaDataType} ${col.fieldName};
</#if>
<#if (col.name!="id" && col.name!="delete_status")>
@@ -36,7 +36,7 @@
* ${col.comments}
*/
@TableField(value = "${col.name}")
- private <#if (col.dataType=="number" && (col.dataScale)?? && col.dataScale gt 0)>Long<#else>${col.javaDataType}</#if> ${col.fieldName};
+ private ${col.javaDataType} ${col.fieldName};
</#if>
<#if (col.name=="delete_status")>
@@ -45,7 +45,7 @@
*/
@TableLogic
@TableField(value = "delete_status")
- private <#if (col.dataType=="number" && (col.dataScale)?? && col.dataScale gt 0)>Long<#else>${col.javaDataType}</#if> ${col.fieldName};
+ private ${col.javaDataType} ${col.fieldName};
</#if>
</#list>
diff --git a/dyh-service/dyh-base/src/main/resources/template/webController.ftl b/dyh-service/dyh-base/src/main/resources/template/webController.ftl
index 67f08d1..7f6fcbe 100644
--- a/dyh-service/dyh-base/src/main/resources/template/webController.ftl
+++ b/dyh-service/dyh-base/src/main/resources/template/webController.ftl
@@ -1,6 +1,7 @@
package ${basePackage}.${packageName}.controller;
-import cn.huge.base.common.utils.ReturnUtils;
+import cn.huge.base.common.utils.ReturnFailUtils;
+import cn.huge.base.common.utils.ReturnSucUtils;
import ${basePackage}.${packageName}.domain.po.${className};
import ${basePackage}.${packageName}.service.${className}Service;
import com.google.common.collect.Maps;
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/buildcode/dao/mapper/BuildCodeMapper.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/buildcode/dao/mapper/BuildCodeMapper.java
index dc41e34..a217005 100644
--- a/dyh-service/dyh-cust/src/main/java/cn/huge/module/buildcode/dao/mapper/BuildCodeMapper.java
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/buildcode/dao/mapper/BuildCodeMapper.java
@@ -22,7 +22,7 @@
* @param tableName
* @return
*/
- List<UserTabColsBO> getTabInfo(@Param("tableName") String tableName);
+ List<UserTabColsBO> getTabInfo(@Param("tableSchema") String tableSchema, @Param("tableName") String tableName);
}
/**
* -------------------_ooOoo_-------------------
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/buildcode/dao/mapper/xml/BuildCodeMapper.xml b/dyh-service/dyh-cust/src/main/java/cn/huge/module/buildcode/dao/mapper/xml/BuildCodeMapper.xml
index 701c112..ad55d69 100644
--- a/dyh-service/dyh-cust/src/main/java/cn/huge/module/buildcode/dao/mapper/xml/BuildCodeMapper.xml
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/buildcode/dao/mapper/xml/BuildCodeMapper.xml
@@ -15,27 +15,19 @@
<result property="name" column="name"/>
<result property="comments" column="comments"/>
<result property="dataType" column="dataType"/>
+ <result property="dataScale" column="dataScale"/>
</resultMap>
<!--自定义查询-->
<select id="getTabInfo" parameterType="String" resultMap="reslutMap">
- SELECT
- t1.table_name AS "tableName",
- t2.comments AS "tableComments",
- t1.column_name AS "name",
- t1.data_type AS "dataType",
- c.comments AS "comments"
- FROM
- user_tab_columns t1
- JOIN
- user_tab_comments t2
- ON
- t1.table_name = t2.table_name
- LEFT JOIN
- user_col_comments c
- ON
- t1.table_name = c.table_name AND t1.column_name = c.column_name
- WHERE
- t1.table_name = #{tableName}
+ SELECT t1.table_name AS "tableName", t2.comments AS "tableComments", t1.column_name AS "name",
+ t1.data_type AS "dataType", t3.comments AS "comments", t1.data_default AS "dataScale"
+ FROM all_tab_columns t1
+ LEFT JOIN all_tab_comments t2 ON t1.table_name = t2.table_name
+ LEFT JOIN user_col_comments t3 ON t1.table_name = t3.table_name AND t1.column_name = t3.column_name
+ WHERE t1.table_name = #{tableName}
+ AND t1.OWNER = #{tableSchema}
+ AND t2.OWNER = #{tableSchema}
+ AND t3.OWNER = #{tableSchema}
</select>
</mapper>
\ No newline at end of file
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/buildcode/service/BuildCodeService.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/buildcode/service/BuildCodeService.java
index 6373839..c16edbd 100644
--- a/dyh-service/dyh-cust/src/main/java/cn/huge/module/buildcode/service/BuildCodeService.java
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/buildcode/service/BuildCodeService.java
@@ -68,7 +68,7 @@
* @param version 版本
* @return Map
*/
- private Map getTplData(String packagePath, String packageName, String className, String tableName, String author, String version) {
+ private Map getTplData(String packagePath, String packageName, String className, String tableSchema, String tableName, String author, String version) {
Map tplData = Maps.newHashMap();
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
tplData.put("packageName", packageName);
@@ -78,7 +78,7 @@
tplData.put("createTime", format.format(new Date()));
tplData.put("basePackage", packagePath);
tplData.put("basePackagePath", packagePath.replace(".", "/") + "/");
- List<UserTabColsBO> list = buildCodeMapper.getTabInfo(tableName);
+ List<UserTabColsBO> list = buildCodeMapper.getTabInfo(tableSchema, tableName);
if (!CollectionUtils.isEmpty(list)) {
UserTabColsBO vo = list.get(0);
tplData.put("tableName", vo.getTableName());
@@ -105,8 +105,8 @@
* @param author 作者
* @param version 版本
*/
- public void buildAll(String basePackage, String packageName, String className, String tableName, String author, String version) {
- Map tplData = this.getTplData(basePackage, packageName, className, tableName, author, version);
+ public void buildAll(String basePackage, String packageName, String className, String tableSchema, String tableName, String author, String version) {
+ Map tplData = this.getTplData(basePackage, packageName, className, tableSchema, tableName, author, version);
try {
// 必须
this.buildPo(tplData);
@@ -141,8 +141,8 @@
* @param author 作者
* @param version 版本
*/
- public void buildPo(String basePackage, String packageName, String className, String tableName, String author, String version) {
- Map tplData = this.getTplData(basePackage, packageName, className, tableName, author, version);
+ public void buildPo(String basePackage, String packageName, String className, String tableSchema, String tableName, String author, String version) {
+ Map tplData = this.getTplData(basePackage, packageName, className, tableSchema, tableName, author, version);
try {
this.buildPo(tplData);
} catch (TemplateNotFoundException e) {
@@ -167,8 +167,8 @@
* @param author 作者
* @param version 版本
*/
- public void buildBo(String basePackage, String packageName, String className, String tableName, String author, String version) {
- Map tplData = this.getTplData(basePackage, packageName, className, tableName, author, version);
+ public void buildBo(String basePackage, String packageName, String className, String tableSchema, String tableName, String author, String version) {
+ Map tplData = this.getTplData(basePackage, packageName, className, tableSchema, tableName, author, version);
try {
this.buildBo(tplData);
} catch (TemplateNotFoundException e) {
@@ -193,8 +193,8 @@
* @param author 作者
* @param version 版本
*/
- public void buildDaoMapper(String basePackage, String packageName, String className, String tableName, String author, String version) {
- Map tplData = this.getTplData(basePackage, packageName, className, tableName, author, version);
+ public void buildDaoMapper(String basePackage, String packageName, String className, String tableSchema, String tableName, String author, String version) {
+ Map tplData = this.getTplData(basePackage, packageName, className, tableSchema, tableName, author, version);
try {
this.buildDaoMapper(tplData);
} catch (TemplateNotFoundException e) {
@@ -219,8 +219,8 @@
* @param author 作者
* @param version 版本
*/
- public void buildDaoMapperXml(String basePackage, String packageName, String className, String tableName, String author, String version) {
- Map tplData = this.getTplData(basePackage, packageName, className, tableName, author, version);
+ public void buildDaoMapperXml(String basePackage, String packageName, String className, String tableSchema, String tableName, String author, String version) {
+ Map tplData = this.getTplData(basePackage, packageName, className, tableSchema, tableName, author, version);
try {
this.buildDaoMapperXml(tplData);
} catch (TemplateNotFoundException e) {
@@ -245,8 +245,8 @@
* @param author 作者
* @param version 版本
*/
- public void buildService(String basePackage, String packageName, String className, String tableName, String author, String version) {
- Map tplData = this.getTplData(basePackage, packageName, className, tableName, author, version);
+ public void buildService(String basePackage, String packageName, String className, String tableSchema, String tableName, String author, String version) {
+ Map tplData = this.getTplData(basePackage, packageName, className, tableSchema, tableName, author, version);
try {
this.buildService(tplData);
} catch (TemplateNotFoundException e) {
@@ -271,8 +271,8 @@
* @param author 作者
* @param version 版本
*/
- public void buildWebController(String basePackage, String packageName, String className, String tableName, String author, String version) {
- Map tplData = this.getTplData(basePackage, packageName, className, tableName, author, version);
+ public void buildWebController(String basePackage, String packageName, String className, String tableSchema, String tableName, String author, String version) {
+ Map tplData = this.getTplData(basePackage, packageName, className, tableSchema, tableName, author, version);
try {
this.buildWebController(tplData);
} catch (TemplateNotFoundException e) {
@@ -297,8 +297,8 @@
* @param author 作者
* @param version 版本
*/
- public void buildWechatController(String basePackage, String packageName, String className, String tableName, String author, String version) {
- Map tplData = this.getTplData(basePackage, packageName, className, tableName, author, version);
+ public void buildWechatController(String basePackage, String packageName, String className, String tableSchema, String tableName, String author, String version) {
+ Map tplData = this.getTplData(basePackage, packageName, className, tableSchema, tableName, author, version);
try {
this.buildWechatController(tplData);
} catch (TemplateNotFoundException e) {
@@ -323,8 +323,8 @@
* @param author 作者
* @param version 版本
*/
- public void buildControllerTest(String basePackage, String packageName, String className, String tableName, String author, String version) {
- Map tplData = this.getTplData(basePackage, packageName, className, tableName, author, version);
+ public void buildControllerTest(String basePackage, String packageName, String className, String tableSchema, String tableName, String author, String version) {
+ Map tplData = this.getTplData(basePackage, packageName, className, tableSchema, tableName, author, version);
try {
this.buildControllerTest(tplData);
@@ -350,8 +350,8 @@
* @param author 作者
* @param version 版本
*/
- public void buildServiceTest(String basePackage, String packageName, String className, String tableName, String author, String version) {
- Map tplData = this.getTplData(basePackage, packageName, className, tableName, author, version);
+ public void buildServiceTest(String basePackage, String packageName, String className, String tableSchema, String tableName, String author, String version) {
+ Map tplData = this.getTplData(basePackage, packageName, className, tableSchema, tableName, author, version);
try {
this.buildServiceTest(tplData);
} catch (TemplateNotFoundException e) {
@@ -376,8 +376,8 @@
* @param author 作者
* @param version 版本
*/
- public void buildJson(String basePackage, String packageName, String className, String tableName, String author, String version) {
- Map tplData = this.getTplData(basePackage, packageName, className, tableName, author, version);
+ public void buildJson(String basePackage, String packageName, String className, String tableSchema, String tableName, String author, String version) {
+ Map tplData = this.getTplData(basePackage, packageName, className, tableSchema, tableName, author, version);
try {
this.buildJson(tplData);
} catch (TemplateNotFoundException e) {
@@ -403,8 +403,8 @@
* @param author 作者
* @param version 版本
*/
- public void buildJsForm(String basePackage, String packageName, String className, String tableName, String author, String version) {
- Map tplData = this.getTplData(basePackage, packageName, className, tableName, author, version);
+ public void buildJsForm(String basePackage, String packageName, String className, String tableSchema, String tableName, String author, String version) {
+ Map tplData = this.getTplData(basePackage, packageName, className, tableSchema, tableName, author, version);
try {
this.buildJsForm(tplData);
} catch (TemplateNotFoundException e) {
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/controller/web/CRoleWebController.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/controller/web/CRoleWebController.java
new file mode 100644
index 0000000..6fd803c
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/controller/web/CRoleWebController.java
@@ -0,0 +1,184 @@
+package cn.huge.module.ctrole.controller;
+
+import cn.huge.base.common.utils.ReturnFailUtils;
+import cn.huge.base.common.utils.ReturnSucUtils;
+import cn.huge.module.ctrole.domain.po.CRole;
+import cn.huge.module.ctrole.service.CRoleService;
+import com.google.common.collect.Maps;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.data.domain.Sort;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.Map;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+/**
+ * @title: 角色表接口api
+ * @description: 角色表接口api
+ * @company: hugeinfo
+ * @author: liyj
+ * @time: 2024-08-17 15:30:57
+ * @version: 1.0.0
+ */
+@Slf4j
+@RestController
+@RequestMapping("/api/web/cRole")
+public class CRoleWebController {
+
+ @Autowired(required = false)
+ private HttpServletRequest request;
+
+ @Autowired
+ private CRoleService service;
+
+ /**
+ * 获取请求URL参数
+ * @return Map<String, Object>
+ */
+ private Map<String, Object> getParameter(){
+ Map<String, Object> terms = Maps.newHashMap();
+ // 角色编号
+ String id = request.getParameter("id");
+ if (StringUtils.isNotBlank(id)){
+ terms.put("id", id);
+ }
+ // 角色代码
+ String roleCode = request.getParameter("roleCode");
+ if (StringUtils.isNotBlank(roleCode)){
+ terms.put("roleCode", roleCode);
+ }
+ // 角色名称
+ String name = request.getParameter("name");
+ if (StringUtils.isNotBlank(name)){
+ terms.put("name", name);
+ }
+ // 组织编号
+ String unitId = request.getParameter("unitId");
+ if (StringUtils.isNotBlank(unitId)){
+ terms.put("unitId", unitId);
+ }
+ // 角色类型,1:自定义角色,2:基础角色
+ String roleType = request.getParameter("roleType");
+ if (StringUtils.isNotBlank(roleType)){
+ terms.put("roleType", roleType);
+ }
+ // 删除状态,0:已删除,1:未删除
+ String deleteStatus = request.getParameter("deleteStatus");
+ if (StringUtils.isNotBlank(deleteStatus)){
+ terms.put("deleteStatus", deleteStatus);
+ }
+ // 顾客编号
+ String custId = request.getParameter("custId");
+ if (StringUtils.isNotBlank(custId)){
+ terms.put("custId", custId);
+ }
+ // 创建时间区间
+ String createStart = request.getParameter("createStart");
+ String createEnd = request.getParameter("createEnd");
+ if(StringUtils.isNotBlank(createStart) && StringUtils.isNotBlank(createEnd)) {
+ terms.put("createStart", createStart);
+ terms.put("createEnd", createEnd);
+ }
+ // 更新时间区间
+ String updateStart = request.getParameter("updateStart");
+ String updateEnd = request.getParameter("updateEnd");
+ if(StringUtils.isNotBlank(updateStart) && StringUtils.isNotBlank(updateEnd)) {
+ terms.put("updateStart", updateStart);
+ terms.put("updateEnd", updateEnd);
+ }
+ return terms;
+ }
+
+ /**
+ * 条件查询多个
+ * @url {ctx}/api/web/cRole/listQuery
+ * @return Object
+ */
+ @GetMapping("/listQuery")
+ public Object listQuery() {
+ try {
+ Map<String, Object> terms = getParameter();
+ return ReturnSucUtils.getRepInfo(service.listTerms(terms));
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+ /**
+ * 条件分页查询
+ * @url {ctx}/api/web/cRole/pageQuery
+ * @param page 页码
+ * @param size 每页数量
+ * @return Object
+ */
+ @GetMapping("/pageQuery")
+ public Object pageQuery(@RequestParam(value = "page") int page, @RequestParam(value = "size") int size) {
+ try {
+ Map<String, Object> terms = getParameter();
+ Sort sort = Sort.by(Sort.Direction.DESC, "create_time");
+ PageRequest pageRequest = PageRequest.of(page-1, size, sort);
+ Page<CRole> cRolePage = service.pageQuery(pageRequest, terms);
+ return ReturnSucUtils.getRepInfo( "处理成功", cRolePage);
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+ /**
+ * 根据编号查询单个
+ * @url {ctx}/api/web/cRole/getById
+ * @param id 主键编号
+ * @return Object
+ */
+ @GetMapping("/getById")
+ public Object getById(@RequestParam(value = "id") String id) {
+ try {
+ return ReturnSucUtils.getRepInfo(service.getById(id));
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+ /**
+ * 根据主键单个/批量删除
+ * @url {ctx}/api/web/cRole/deleteByIds
+ * @param ids 主键编号
+ * @return Object
+ */
+ @GetMapping("/deleteByIds")
+ public Object deleteByIds(@RequestParam(value = "ids") String ids) {
+ try {
+ if (ids.indexOf(",") != -1) {
+ service.removeByIds(Stream.of(ids.split(",")).collect(Collectors.toList()));
+ }else{
+ service.removeById(ids);
+ }
+ return ReturnSucUtils.getRepInfo();
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+ /**
+ * 新增或更新对象
+ * @url {ctx}/api/web/cRole/saveCRole
+ * @param cRole 实体对象
+ * @return Object
+ */
+ @PostMapping("/saveCRole")
+ public Object saveCRole(@RequestBody CRole cRole) {
+ try {
+ service.saveCRole(cRole);
+ return ReturnSucUtils.getRepInfo();
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/controller/web/CtRoledataWebController.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/controller/web/CtRoledataWebController.java
new file mode 100644
index 0000000..3fd3cbb
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/controller/web/CtRoledataWebController.java
@@ -0,0 +1,179 @@
+package cn.huge.module.ctrole.controller;
+
+import cn.huge.base.common.utils.ReturnFailUtils;
+import cn.huge.base.common.utils.ReturnSucUtils;
+import cn.huge.module.ctrole.domain.po.CtRoledata;
+import cn.huge.module.ctrole.service.CtRoledataService;
+import com.google.common.collect.Maps;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.data.domain.Sort;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.Map;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+/**
+ * @title: 客户角色数据权限表接口api
+ * @description: 客户角色数据权限表接口api
+ * @company: hugeinfo
+ * @author: liyj
+ * @time: 2024-08-17 15:33:41
+ * @version: 1.0.0
+ */
+@Slf4j
+@RestController
+@RequestMapping("/api/web/ctRoledata")
+public class CtRoledataWebController {
+
+ @Autowired(required = false)
+ private HttpServletRequest request;
+
+ @Autowired
+ private CtRoledataService service;
+
+ /**
+ * 获取请求URL参数
+ * @return Map<String, Object>
+ */
+ private Map<String, Object> getParameter(){
+ Map<String, Object> terms = Maps.newHashMap();
+ // 角色数据权限编号
+ String id = request.getParameter("id");
+ if (StringUtils.isNotBlank(id)){
+ terms.put("id", id);
+ }
+ // 角色编号
+ String roleId = request.getParameter("roleId");
+ if (StringUtils.isNotBlank(roleId)){
+ terms.put("roleId", roleId);
+ }
+ // 数据权限类型,1:自己,2:本单位及下属单位,3:指定单个单位,4:指定单位及该下属单位
+ String dataType = request.getParameter("dataType");
+ if (StringUtils.isNotBlank(dataType)){
+ terms.put("dataType", dataType);
+ }
+ // 单位编号
+ String unitId = request.getParameter("unitId");
+ if (StringUtils.isNotBlank(unitId)){
+ terms.put("unitId", unitId);
+ }
+ // 删除状态,0:已删除,1:未删除
+ String deleteStatus = request.getParameter("deleteStatus");
+ if (StringUtils.isNotBlank(deleteStatus)){
+ terms.put("deleteStatus", deleteStatus);
+ }
+ // 顾客编号
+ String custId = request.getParameter("custId");
+ if (StringUtils.isNotBlank(custId)){
+ terms.put("custId", custId);
+ }
+ // 创建时间区间
+ String createStart = request.getParameter("createStart");
+ String createEnd = request.getParameter("createEnd");
+ if(StringUtils.isNotBlank(createStart) && StringUtils.isNotBlank(createEnd)) {
+ terms.put("createStart", createStart);
+ terms.put("createEnd", createEnd);
+ }
+ // 更新时间区间
+ String updateStart = request.getParameter("updateStart");
+ String updateEnd = request.getParameter("updateEnd");
+ if(StringUtils.isNotBlank(updateStart) && StringUtils.isNotBlank(updateEnd)) {
+ terms.put("updateStart", updateStart);
+ terms.put("updateEnd", updateEnd);
+ }
+ return terms;
+ }
+
+ /**
+ * 条件查询多个
+ * @url {ctx}/api/web/ctRoledata/listQuery
+ * @return Object
+ */
+ @GetMapping("/listQuery")
+ public Object listQuery() {
+ try {
+ Map<String, Object> terms = getParameter();
+ return ReturnSucUtils.getRepInfo(service.listTerms(terms));
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+ /**
+ * 条件分页查询
+ * @url {ctx}/api/web/ctRoledata/pageQuery
+ * @param page 页码
+ * @param size 每页数量
+ * @return Object
+ */
+ @GetMapping("/pageQuery")
+ public Object pageQuery(@RequestParam(value = "page") int page, @RequestParam(value = "size") int size) {
+ try {
+ Map<String, Object> terms = getParameter();
+ Sort sort = Sort.by(Sort.Direction.DESC, "create_time");
+ PageRequest pageRequest = PageRequest.of(page-1, size, sort);
+ Page<CtRoledata> ctRoledataPage = service.pageQuery(pageRequest, terms);
+ return ReturnSucUtils.getRepInfo( "处理成功", ctRoledataPage);
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+ /**
+ * 根据编号查询单个
+ * @url {ctx}/api/web/ctRoledata/getById
+ * @param id 主键编号
+ * @return Object
+ */
+ @GetMapping("/getById")
+ public Object getById(@RequestParam(value = "id") String id) {
+ try {
+ return ReturnSucUtils.getRepInfo(service.getById(id));
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+ /**
+ * 根据主键单个/批量删除
+ * @url {ctx}/api/web/ctRoledata/deleteByIds
+ * @param ids 主键编号
+ * @return Object
+ */
+ @GetMapping("/deleteByIds")
+ public Object deleteByIds(@RequestParam(value = "ids") String ids) {
+ try {
+ if (ids.indexOf(",") != -1) {
+ service.removeByIds(Stream.of(ids.split(",")).collect(Collectors.toList()));
+ }else{
+ service.removeById(ids);
+ }
+ return ReturnSucUtils.getRepInfo();
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+ /**
+ * 新增或更新对象
+ * @url {ctx}/api/web/ctRoledata/saveCtRoledata
+ * @param ctRoledata 实体对象
+ * @return Object
+ */
+ @PostMapping("/saveCtRoledata")
+ public Object saveCtRoledata(@RequestBody CtRoledata ctRoledata) {
+ try {
+ service.saveCtRoledata(ctRoledata);
+ return ReturnSucUtils.getRepInfo();
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/controller/web/CtRolefunWebController.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/controller/web/CtRolefunWebController.java
new file mode 100644
index 0000000..a62dbc0
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/controller/web/CtRolefunWebController.java
@@ -0,0 +1,204 @@
+package cn.huge.module.ctrole.controller;
+
+import cn.huge.base.common.utils.ReturnFailUtils;
+import cn.huge.base.common.utils.ReturnSucUtils;
+import cn.huge.module.ctrole.domain.po.CtRolefun;
+import cn.huge.module.ctrole.service.CtRolefunService;
+import com.google.common.collect.Maps;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.data.domain.Sort;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.Map;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+/**
+ * @title: 客户角色菜单权限表接口api
+ * @description: 客户角色菜单权限表接口api
+ * @company: hugeinfo
+ * @author: liyj
+ * @time: 2024-08-17 15:33:41
+ * @version: 1.0.0
+ */
+@Slf4j
+@RestController
+@RequestMapping("/api/web/ctRolefun")
+public class CtRolefunWebController {
+
+ @Autowired(required = false)
+ private HttpServletRequest request;
+
+ @Autowired
+ private CtRolefunService service;
+
+ /**
+ * 获取请求URL参数
+ * @return Map<String, Object>
+ */
+ private Map<String, Object> getParameter(){
+ Map<String, Object> terms = Maps.newHashMap();
+ // 角色权限编号
+ String id = request.getParameter("id");
+ if (StringUtils.isNotBlank(id)){
+ terms.put("id", id);
+ }
+ // 角色编号
+ String roleId = request.getParameter("roleId");
+ if (StringUtils.isNotBlank(roleId)){
+ terms.put("roleId", roleId);
+ }
+ // 权限编号
+ String powerId = request.getParameter("powerId");
+ if (StringUtils.isNotBlank(powerId)){
+ terms.put("powerId", powerId);
+ }
+ // 权限名称
+ String powerName = request.getParameter("powerName");
+ if (StringUtils.isNotBlank(powerName)){
+ terms.put("powerName", powerName);
+ }
+ // 权限标签
+ String powerTag = request.getParameter("powerTag");
+ if (StringUtils.isNotBlank(powerTag)){
+ terms.put("powerTag", powerTag);
+ }
+ // 权限url
+ String powerUrl = request.getParameter("powerUrl");
+ if (StringUtils.isNotBlank(powerUrl)){
+ terms.put("powerUrl", powerUrl);
+ }
+ // 权限图标
+ String powerIcon = request.getParameter("powerIcon");
+ if (StringUtils.isNotBlank(powerIcon)){
+ terms.put("powerIcon", powerIcon);
+ }
+ // 权限类型,0:应用,1:模块,2:菜单,3:功能
+ String powerType = request.getParameter("powerType");
+ if (StringUtils.isNotBlank(powerType)){
+ terms.put("powerType", powerType);
+ }
+ // 应用客户端,1:平台web端,2:平台人小程序
+ String appClient = request.getParameter("appClient");
+ if (StringUtils.isNotBlank(appClient)){
+ terms.put("appClient", appClient);
+ }
+ // 父级编号,根级默认为root
+ String parentId = request.getParameter("parentId");
+ if (StringUtils.isNotBlank(parentId)){
+ terms.put("parentId", parentId);
+ }
+ // 顾客编号
+ String custId = request.getParameter("custId");
+ if (StringUtils.isNotBlank(custId)){
+ terms.put("custId", custId);
+ }
+ // 创建时间区间
+ String createStart = request.getParameter("createStart");
+ String createEnd = request.getParameter("createEnd");
+ if(StringUtils.isNotBlank(createStart) && StringUtils.isNotBlank(createEnd)) {
+ terms.put("createStart", createStart);
+ terms.put("createEnd", createEnd);
+ }
+ // 更新时间区间
+ String updateStart = request.getParameter("updateStart");
+ String updateEnd = request.getParameter("updateEnd");
+ if(StringUtils.isNotBlank(updateStart) && StringUtils.isNotBlank(updateEnd)) {
+ terms.put("updateStart", updateStart);
+ terms.put("updateEnd", updateEnd);
+ }
+ return terms;
+ }
+
+ /**
+ * 条件查询多个
+ * @url {ctx}/api/web/ctRolefun/listQuery
+ * @return Object
+ */
+ @GetMapping("/listQuery")
+ public Object listQuery() {
+ try {
+ Map<String, Object> terms = getParameter();
+ return ReturnSucUtils.getRepInfo(service.listTerms(terms));
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+ /**
+ * 条件分页查询
+ * @url {ctx}/api/web/ctRolefun/pageQuery
+ * @param page 页码
+ * @param size 每页数量
+ * @return Object
+ */
+ @GetMapping("/pageQuery")
+ public Object pageQuery(@RequestParam(value = "page") int page, @RequestParam(value = "size") int size) {
+ try {
+ Map<String, Object> terms = getParameter();
+ Sort sort = Sort.by(Sort.Direction.DESC, "create_time");
+ PageRequest pageRequest = PageRequest.of(page-1, size, sort);
+ Page<CtRolefun> ctRolefunPage = service.pageQuery(pageRequest, terms);
+ return ReturnSucUtils.getRepInfo( "处理成功", ctRolefunPage);
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+ /**
+ * 根据编号查询单个
+ * @url {ctx}/api/web/ctRolefun/getById
+ * @param id 主键编号
+ * @return Object
+ */
+ @GetMapping("/getById")
+ public Object getById(@RequestParam(value = "id") String id) {
+ try {
+ return ReturnSucUtils.getRepInfo(service.getById(id));
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+ /**
+ * 根据主键单个/批量删除
+ * @url {ctx}/api/web/ctRolefun/deleteByIds
+ * @param ids 主键编号
+ * @return Object
+ */
+ @GetMapping("/deleteByIds")
+ public Object deleteByIds(@RequestParam(value = "ids") String ids) {
+ try {
+ if (ids.indexOf(",") != -1) {
+ service.removeByIds(Stream.of(ids.split(",")).collect(Collectors.toList()));
+ }else{
+ service.removeById(ids);
+ }
+ return ReturnSucUtils.getRepInfo();
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+ /**
+ * 新增或更新对象
+ * @url {ctx}/api/web/ctRolefun/saveCtRolefun
+ * @param ctRolefun 实体对象
+ * @return Object
+ */
+ @PostMapping("/saveCtRolefun")
+ public Object saveCtRolefun(@RequestBody CtRolefun ctRolefun) {
+ try {
+ service.saveCtRolefun(ctRolefun);
+ return ReturnSucUtils.getRepInfo();
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/dao/mapper/CRoleMapper.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/dao/mapper/CRoleMapper.java
new file mode 100644
index 0000000..03d8d0d
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/dao/mapper/CRoleMapper.java
@@ -0,0 +1,64 @@
+package cn.huge.module.ctrole.dao.mapper;
+
+import cn.huge.module.ctrole.domain.po.CRole;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+* @title: 角色表持久层业务处理
+* @Description 此处仅涉及复杂SQL操作,务必不要在此再次写单表的CRUD操作,因为mybatisPlus已经实现。
+* @company: hugeinfo
+* @author: liyj
+* @time: 2024-08-17 15:30:57
+* @version 1.0.0
+*/
+@Repository
+public interface CRoleMapper extends BaseMapper<CRole>{
+
+ /**
+ * 更新对象
+ * @param entity 对象
+ */
+ void updateCRole(@Param("entity") CRole entity);
+
+ /**
+ * 条件更新对象
+ * @param entity 对象
+ * @param terms 条件
+ */
+ void updateCRoleTerms(@Param("entity") CRole entity, @Param("terms") Map<String, Object> terms);
+
+ /**
+ * 根据编号物理删除
+ * @param id 查询条件集合
+ */
+ void deleteCRole(@Param("id") String id);
+
+ /**
+ * 按条件查询结果集
+ * @param terms 查询条件集合
+ * @return List<CRole>
+ */
+ List<CRole> listTerms(@Param("terms") Map<String, Object> terms);
+
+ /**
+ * 按条件查询实体总数
+ * @param terms 查询条件集合
+ * @return long
+ */
+ long countTerms(@Param("terms") Map<String, Object> terms);
+
+ /**
+ * 按条件查询实体分页结果集
+ * @param page 分页对象
+ * @param terms 查询条件集合
+ * @return List<CRole>
+ */
+ List<CRole> pageTerms(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms);
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/dao/mapper/CtRoledataMapper.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/dao/mapper/CtRoledataMapper.java
new file mode 100644
index 0000000..9441058
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/dao/mapper/CtRoledataMapper.java
@@ -0,0 +1,64 @@
+package cn.huge.module.ctrole.dao.mapper;
+
+import cn.huge.module.ctrole.domain.po.CtRoledata;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+* @title: 客户角色数据权限表持久层业务处理
+* @Description 此处仅涉及复杂SQL操作,务必不要在此再次写单表的CRUD操作,因为mybatisPlus已经实现。
+* @company: hugeinfo
+* @author: liyj
+* @time: 2024-08-17 15:33:41
+* @version 1.0.0
+*/
+@Repository
+public interface CtRoledataMapper extends BaseMapper<CtRoledata>{
+
+ /**
+ * 更新对象
+ * @param entity 对象
+ */
+ void updateCtRoledata(@Param("entity") CtRoledata entity);
+
+ /**
+ * 条件更新对象
+ * @param entity 对象
+ * @param terms 条件
+ */
+ void updateCtRoledataTerms(@Param("entity") CtRoledata entity, @Param("terms") Map<String, Object> terms);
+
+ /**
+ * 根据编号物理删除
+ * @param id 查询条件集合
+ */
+ void deleteCtRoledata(@Param("id") String id);
+
+ /**
+ * 按条件查询结果集
+ * @param terms 查询条件集合
+ * @return List<CtRoledata>
+ */
+ List<CtRoledata> listTerms(@Param("terms") Map<String, Object> terms);
+
+ /**
+ * 按条件查询实体总数
+ * @param terms 查询条件集合
+ * @return long
+ */
+ long countTerms(@Param("terms") Map<String, Object> terms);
+
+ /**
+ * 按条件查询实体分页结果集
+ * @param page 分页对象
+ * @param terms 查询条件集合
+ * @return List<CtRoledata>
+ */
+ List<CtRoledata> pageTerms(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms);
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/dao/mapper/CtRolefunMapper.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/dao/mapper/CtRolefunMapper.java
new file mode 100644
index 0000000..c96a95e
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/dao/mapper/CtRolefunMapper.java
@@ -0,0 +1,64 @@
+package cn.huge.module.ctrole.dao.mapper;
+
+import cn.huge.module.ctrole.domain.po.CtRolefun;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+* @title: 客户角色菜单权限表持久层业务处理
+* @Description 此处仅涉及复杂SQL操作,务必不要在此再次写单表的CRUD操作,因为mybatisPlus已经实现。
+* @company: hugeinfo
+* @author: liyj
+* @time: 2024-08-17 15:33:41
+* @version 1.0.0
+*/
+@Repository
+public interface CtRolefunMapper extends BaseMapper<CtRolefun>{
+
+ /**
+ * 更新对象
+ * @param entity 对象
+ */
+ void updateCtRolefun(@Param("entity") CtRolefun entity);
+
+ /**
+ * 条件更新对象
+ * @param entity 对象
+ * @param terms 条件
+ */
+ void updateCtRolefunTerms(@Param("entity") CtRolefun entity, @Param("terms") Map<String, Object> terms);
+
+ /**
+ * 根据编号物理删除
+ * @param id 查询条件集合
+ */
+ void deleteCtRolefun(@Param("id") String id);
+
+ /**
+ * 按条件查询结果集
+ * @param terms 查询条件集合
+ * @return List<CtRolefun>
+ */
+ List<CtRolefun> listTerms(@Param("terms") Map<String, Object> terms);
+
+ /**
+ * 按条件查询实体总数
+ * @param terms 查询条件集合
+ * @return long
+ */
+ long countTerms(@Param("terms") Map<String, Object> terms);
+
+ /**
+ * 按条件查询实体分页结果集
+ * @param page 分页对象
+ * @param terms 查询条件集合
+ * @return List<CtRolefun>
+ */
+ List<CtRolefun> pageTerms(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms);
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/dao/mapper/xml/CRoleMapper.xml b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/dao/mapper/xml/CRoleMapper.xml
new file mode 100644
index 0000000..3ebc546
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/dao/mapper/xml/CRoleMapper.xml
@@ -0,0 +1,154 @@
+<?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">
+<!--
+ * @title: 角色表
+ * @description: 自定义sql,请自行实现业务逻辑
+ * @company: hugeinfo
+ * @author: liyj
+ * @time:2024-08-17 15:30:57
+ * @version 1.0.0
+-->
+<mapper namespace="cn.huge.module.ctrole.dao.mapper.CRoleMapper">
+ <!-- 结果集 -->
+ <resultMap id="dataResult" type="cn.huge.module.ctrole.domain.po.CRole">
+ <result property="id" column="id"/>
+ <result property="roleCode" column="role_code"/>
+ <result property="name" column="name"/>
+ <result property="unitId" column="unit_id"/>
+ <result property="roleType" column="role_type"/>
+ <result property="deleteStatus" column="delete_status"/>
+ <result property="custId" column="cust_id"/>
+ <result property="createTime" column="create_time"/>
+ <result property="updateTime" column="update_time"/>
+ </resultMap>
+ <!-- 表 -->
+ <sql id='table-name'>dyh_ct_role</sql>
+ <!-- 字段 -->
+ <sql id="column-part">
+ id,
+ role_code,
+ name,
+ unit_id,
+ role_type,
+ delete_status,
+ cust_id,
+ create_time,
+ update_time
+ </sql>
+ <!-- 更新实体字段 -->
+ <sql id="set-part">
+ <if test="entity.roleCode != null">role_code = #{entity.roleCode},</if>
+ <if test="entity.name != null">name = #{entity.name},</if>
+ <if test="entity.unitId != null">unit_id = #{entity.unitId},</if>
+ <if test="entity.roleType != null">role_type = #{entity.roleType},</if>
+ <if test="entity.deleteStatus != null">delete_status = #{entity.deleteStatus},</if>
+ <if test="entity.custId != null">cust_id = #{entity.custId},</if>
+ <if test="entity.createTime != null">create_time = #{entity.createTime},</if>
+ <if test="entity.updateTime != null">update_time = #{entity.updateTime}</if>
+ </sql>
+ <!-- 条件 -->
+ <sql id="where-part">
+ <if test="terms != null">
+ <where>
+ <if test="terms.id != null and terms.id !=''">
+ and id = #{terms.id}
+ </if>
+ <if test="terms.roleCode != null and terms.roleCode !=''">
+ and role_code = #{terms.roleCode}
+ </if>
+ <if test="terms.name != null and terms.name !=''">
+ and name = #{terms.name}
+ </if>
+ <if test="terms.unitId != null and terms.unitId !=''">
+ and unit_id = #{terms.unitId}
+ </if>
+ <if test="terms.roleType != null and terms.roleType !=''">
+ and role_type = #{terms.roleType}
+ </if>
+ <if test="terms.deleteStatus = null and terms.deleteStatus =''">
+ and delete_status = '1'
+ </if>
+ <if test="terms.deleteStatus != null and terms.deleteStatus !=''">
+ and delete_status = #{terms.deleteStatus}
+ </if>
+ <if test="terms.custId != null and terms.custId !=''">
+ and cust_id = #{terms.custId}
+ </if>
+ <if test="terms.createTime != null and terms.createTime !=''">
+ and DATE_FORMAT(create_time,'%Y-%m-%d') = #{terms.createTime}
+ </if>
+ <if test="terms.createStart != null and terms.createStart !='' and terms.createEnd != null and terms.createEnd !=''">
+ and (DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.createStart}
+ and DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.createEnd})
+ </if>
+ <if test="terms.updateTime != null and terms.updateTime !=''">
+ and DATE_FORMAT(update_time,'%Y-%m-%d') = #{terms.updateTime}
+ </if>
+ <if test="terms.updateStart != null and terms.updateStart !='' and terms.updateEnd != null and terms.updateEnd !=''">
+ and (DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.updateStart}
+ and DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.updateEnd})
+ </if>
+ </where>
+ </if>
+ </sql>
+ <!-- 更新对象 -->
+ <update id="updateCRole">
+ update
+ <include refid="table-name"/>
+ <set>
+ <include refid="set-part"/>
+ </set>
+ <where>
+ id = #{entity.id}
+ </where>
+ </update>
+ <!-- 条件更新对象 -->
+ <update id="updateCRoleTerms">
+ update
+ <include refid="table-name"/>
+ <set>
+ <include refid="set-part"/>
+ </set>
+ <include refid="where-part"/>
+ </update>
+ <!-- 根据编号物理删除 -->
+ <delete id="deleteCRole">
+ delete from
+ <include refid="table-name" />
+ where id = #{id}
+ </delete>
+ <!-- 根据条件查询 -->
+ <select id="listTerms" resultMap="dataResult">
+ select
+ <include refid="column-part"/>
+ from
+ <include refid="table-name" />
+ <include refid="where-part"/>
+ </select>
+ <!-- 根据条件统计 -->
+ <select id="countTerms" resultType="java.lang.Long">
+ select
+ COUNT(1)
+ from
+ <include refid="table-name" />
+ <include refid="where-part"/>
+ </select>
+ <!-- 根据条件分页查询 -->
+ <select id="pageTerms" resultMap="dataResult">
+ SELECT
+ <include refid="column-part"/>
+ FROM
+ <include refid="table-name" />
+ <include refid="where-part"/>
+ <if test="page.sort != null">
+ <foreach collection="page.sort" item="s" index="index" separator="," open="order by ">
+ isnull(${s.property}), ${s.property} ${s.direction}
+ </foreach>
+ </if>
+ <if test="page.sort == null">
+ order by isnull(create_time), create_time desc
+ </if>
+ limit #{page.offset}, #{page.size}
+ </select>
+
+</mapper>
\ No newline at end of file
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/dao/mapper/xml/CtRoledataMapper.xml b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/dao/mapper/xml/CtRoledataMapper.xml
new file mode 100644
index 0000000..9d96934
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/dao/mapper/xml/CtRoledataMapper.xml
@@ -0,0 +1,148 @@
+<?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">
+<!--
+ * @title: 客户角色数据权限表
+ * @description: 自定义sql,请自行实现业务逻辑
+ * @company: hugeinfo
+ * @author: liyj
+ * @time:2024-08-17 15:33:41
+ * @version 1.0.0
+-->
+<mapper namespace="cn.huge.module.ctrole.dao.mapper.CtRoledataMapper">
+ <!-- 结果集 -->
+ <resultMap id="dataResult" type="cn.huge.module.ctrole.domain.po.CtRoledata">
+ <result property="id" column="id"/>
+ <result property="roleId" column="role_id"/>
+ <result property="dataType" column="data_type"/>
+ <result property="unitId" column="unit_id"/>
+ <result property="deleteStatus" column="delete_status"/>
+ <result property="custId" column="cust_id"/>
+ <result property="createTime" column="create_time"/>
+ <result property="updateTime" column="update_time"/>
+ </resultMap>
+ <!-- 表 -->
+ <sql id='table-name'>dyh_ct_roledata</sql>
+ <!-- 字段 -->
+ <sql id="column-part">
+ id,
+ role_id,
+ data_type,
+ unit_id,
+ delete_status,
+ cust_id,
+ create_time,
+ update_time
+ </sql>
+ <!-- 更新实体字段 -->
+ <sql id="set-part">
+ <if test="entity.roleId != null">role_id = #{entity.roleId},</if>
+ <if test="entity.dataType != null">data_type = #{entity.dataType},</if>
+ <if test="entity.unitId != null">unit_id = #{entity.unitId},</if>
+ <if test="entity.deleteStatus != null">delete_status = #{entity.deleteStatus},</if>
+ <if test="entity.custId != null">cust_id = #{entity.custId},</if>
+ <if test="entity.createTime != null">create_time = #{entity.createTime},</if>
+ <if test="entity.updateTime != null">update_time = #{entity.updateTime}</if>
+ </sql>
+ <!-- 条件 -->
+ <sql id="where-part">
+ <if test="terms != null">
+ <where>
+ <if test="terms.id != null and terms.id !=''">
+ and id = #{terms.id}
+ </if>
+ <if test="terms.roleId != null and terms.roleId !=''">
+ and role_id = #{terms.roleId}
+ </if>
+ <if test="terms.dataType != null and terms.dataType !=''">
+ and data_type = #{terms.dataType}
+ </if>
+ <if test="terms.unitId != null and terms.unitId !=''">
+ and unit_id = #{terms.unitId}
+ </if>
+ <if test="terms.deleteStatus = null and terms.deleteStatus =''">
+ and delete_status = '1'
+ </if>
+ <if test="terms.deleteStatus != null and terms.deleteStatus !=''">
+ and delete_status = #{terms.deleteStatus}
+ </if>
+ <if test="terms.custId != null and terms.custId !=''">
+ and cust_id = #{terms.custId}
+ </if>
+ <if test="terms.createTime != null and terms.createTime !=''">
+ and DATE_FORMAT(create_time,'%Y-%m-%d') = #{terms.createTime}
+ </if>
+ <if test="terms.createStart != null and terms.createStart !='' and terms.createEnd != null and terms.createEnd !=''">
+ and (DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.createStart}
+ and DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.createEnd})
+ </if>
+ <if test="terms.updateTime != null and terms.updateTime !=''">
+ and DATE_FORMAT(update_time,'%Y-%m-%d') = #{terms.updateTime}
+ </if>
+ <if test="terms.updateStart != null and terms.updateStart !='' and terms.updateEnd != null and terms.updateEnd !=''">
+ and (DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.updateStart}
+ and DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.updateEnd})
+ </if>
+ </where>
+ </if>
+ </sql>
+ <!-- 更新对象 -->
+ <update id="updateCtRoledata">
+ update
+ <include refid="table-name"/>
+ <set>
+ <include refid="set-part"/>
+ </set>
+ <where>
+ id = #{entity.id}
+ </where>
+ </update>
+ <!-- 条件更新对象 -->
+ <update id="updateCtRoledataTerms">
+ update
+ <include refid="table-name"/>
+ <set>
+ <include refid="set-part"/>
+ </set>
+ <include refid="where-part"/>
+ </update>
+ <!-- 根据编号物理删除 -->
+ <delete id="deleteCtRoledata">
+ delete from
+ <include refid="table-name" />
+ where id = #{id}
+ </delete>
+ <!-- 根据条件查询 -->
+ <select id="listTerms" resultMap="dataResult">
+ select
+ <include refid="column-part"/>
+ from
+ <include refid="table-name" />
+ <include refid="where-part"/>
+ </select>
+ <!-- 根据条件统计 -->
+ <select id="countTerms" resultType="java.lang.Long">
+ select
+ COUNT(1)
+ from
+ <include refid="table-name" />
+ <include refid="where-part"/>
+ </select>
+ <!-- 根据条件分页查询 -->
+ <select id="pageTerms" resultMap="dataResult">
+ SELECT
+ <include refid="column-part"/>
+ FROM
+ <include refid="table-name" />
+ <include refid="where-part"/>
+ <if test="page.sort != null">
+ <foreach collection="page.sort" item="s" index="index" separator="," open="order by ">
+ isnull(${s.property}), ${s.property} ${s.direction}
+ </foreach>
+ </if>
+ <if test="page.sort == null">
+ order by isnull(create_time), create_time desc
+ </if>
+ limit #{page.offset}, #{page.size}
+ </select>
+
+</mapper>
\ No newline at end of file
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/dao/mapper/xml/CtRolefunMapper.xml b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/dao/mapper/xml/CtRolefunMapper.xml
new file mode 100644
index 0000000..8419dd9
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/dao/mapper/xml/CtRolefunMapper.xml
@@ -0,0 +1,175 @@
+<?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">
+<!--
+ * @title: 客户角色菜单权限表
+ * @description: 自定义sql,请自行实现业务逻辑
+ * @company: hugeinfo
+ * @author: liyj
+ * @time:2024-08-17 15:33:41
+ * @version 1.0.0
+-->
+<mapper namespace="cn.huge.module.ctrole.dao.mapper.CtRolefunMapper">
+ <!-- 结果集 -->
+ <resultMap id="dataResult" type="cn.huge.module.ctrole.domain.po.CtRolefun">
+ <result property="id" column="id"/>
+ <result property="roleId" column="role_id"/>
+ <result property="powerId" column="power_id"/>
+ <result property="powerName" column="power_name"/>
+ <result property="powerTag" column="power_tag"/>
+ <result property="powerUrl" column="power_url"/>
+ <result property="powerIcon" column="power_icon"/>
+ <result property="powerType" column="power_type"/>
+ <result property="appClient" column="app_client"/>
+ <result property="parentId" column="parent_id"/>
+ <result property="custId" column="cust_id"/>
+ <result property="createTime" column="create_time"/>
+ <result property="updateTime" column="update_time"/>
+ </resultMap>
+ <!-- 表 -->
+ <sql id='table-name'>dyh_ct_rolefun</sql>
+ <!-- 字段 -->
+ <sql id="column-part">
+ id,
+ role_id,
+ power_id,
+ power_name,
+ power_tag,
+ power_url,
+ power_icon,
+ power_type,
+ app_client,
+ parent_id,
+ cust_id,
+ create_time,
+ update_time
+ </sql>
+ <!-- 更新实体字段 -->
+ <sql id="set-part">
+ <if test="entity.roleId != null">role_id = #{entity.roleId},</if>
+ <if test="entity.powerId != null">power_id = #{entity.powerId},</if>
+ <if test="entity.powerName != null">power_name = #{entity.powerName},</if>
+ <if test="entity.powerTag != null">power_tag = #{entity.powerTag},</if>
+ <if test="entity.powerUrl != null">power_url = #{entity.powerUrl},</if>
+ <if test="entity.powerIcon != null">power_icon = #{entity.powerIcon},</if>
+ <if test="entity.powerType != null">power_type = #{entity.powerType},</if>
+ <if test="entity.appClient != null">app_client = #{entity.appClient},</if>
+ <if test="entity.parentId != null">parent_id = #{entity.parentId},</if>
+ <if test="entity.custId != null">cust_id = #{entity.custId},</if>
+ <if test="entity.createTime != null">create_time = #{entity.createTime},</if>
+ <if test="entity.updateTime != null">update_time = #{entity.updateTime}</if>
+ </sql>
+ <!-- 条件 -->
+ <sql id="where-part">
+ <if test="terms != null">
+ <where>
+ <if test="terms.id != null and terms.id !=''">
+ and id = #{terms.id}
+ </if>
+ <if test="terms.roleId != null and terms.roleId !=''">
+ and role_id = #{terms.roleId}
+ </if>
+ <if test="terms.powerId != null and terms.powerId !=''">
+ and power_id = #{terms.powerId}
+ </if>
+ <if test="terms.powerName != null and terms.powerName !=''">
+ and power_name = #{terms.powerName}
+ </if>
+ <if test="terms.powerTag != null and terms.powerTag !=''">
+ and power_tag = #{terms.powerTag}
+ </if>
+ <if test="terms.powerUrl != null and terms.powerUrl !=''">
+ and power_url = #{terms.powerUrl}
+ </if>
+ <if test="terms.powerIcon != null and terms.powerIcon !=''">
+ and power_icon = #{terms.powerIcon}
+ </if>
+ <if test="terms.powerType != null and terms.powerType !=''">
+ and power_type = #{terms.powerType}
+ </if>
+ <if test="terms.appClient != null and terms.appClient !=''">
+ and app_client = #{terms.appClient}
+ </if>
+ <if test="terms.parentId != null and terms.parentId !=''">
+ and parent_id = #{terms.parentId}
+ </if>
+ <if test="terms.custId != null and terms.custId !=''">
+ and cust_id = #{terms.custId}
+ </if>
+ <if test="terms.createTime != null and terms.createTime !=''">
+ and DATE_FORMAT(create_time,'%Y-%m-%d') = #{terms.createTime}
+ </if>
+ <if test="terms.createStart != null and terms.createStart !='' and terms.createEnd != null and terms.createEnd !=''">
+ and (DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.createStart}
+ and DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.createEnd})
+ </if>
+ <if test="terms.updateTime != null and terms.updateTime !=''">
+ and DATE_FORMAT(update_time,'%Y-%m-%d') = #{terms.updateTime}
+ </if>
+ <if test="terms.updateStart != null and terms.updateStart !='' and terms.updateEnd != null and terms.updateEnd !=''">
+ and (DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.updateStart}
+ and DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.updateEnd})
+ </if>
+ </where>
+ </if>
+ </sql>
+ <!-- 更新对象 -->
+ <update id="updateCtRolefun">
+ update
+ <include refid="table-name"/>
+ <set>
+ <include refid="set-part"/>
+ </set>
+ <where>
+ id = #{entity.id}
+ </where>
+ </update>
+ <!-- 条件更新对象 -->
+ <update id="updateCtRolefunTerms">
+ update
+ <include refid="table-name"/>
+ <set>
+ <include refid="set-part"/>
+ </set>
+ <include refid="where-part"/>
+ </update>
+ <!-- 根据编号物理删除 -->
+ <delete id="deleteCtRolefun">
+ delete from
+ <include refid="table-name" />
+ where id = #{id}
+ </delete>
+ <!-- 根据条件查询 -->
+ <select id="listTerms" resultMap="dataResult">
+ select
+ <include refid="column-part"/>
+ from
+ <include refid="table-name" />
+ <include refid="where-part"/>
+ </select>
+ <!-- 根据条件统计 -->
+ <select id="countTerms" resultType="java.lang.Long">
+ select
+ COUNT(1)
+ from
+ <include refid="table-name" />
+ <include refid="where-part"/>
+ </select>
+ <!-- 根据条件分页查询 -->
+ <select id="pageTerms" resultMap="dataResult">
+ SELECT
+ <include refid="column-part"/>
+ FROM
+ <include refid="table-name" />
+ <include refid="where-part"/>
+ <if test="page.sort != null">
+ <foreach collection="page.sort" item="s" index="index" separator="," open="order by ">
+ isnull(${s.property}), ${s.property} ${s.direction}
+ </foreach>
+ </if>
+ <if test="page.sort == null">
+ order by isnull(create_time), create_time desc
+ </if>
+ limit #{page.offset}, #{page.size}
+ </select>
+
+</mapper>
\ No newline at end of file
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/domain/bo/CRoleBO.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/domain/bo/CRoleBO.java
new file mode 100644
index 0000000..a18a1d6
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/domain/bo/CRoleBO.java
@@ -0,0 +1,17 @@
+package cn.huge.module.ctrole.domain.bo;
+
+import cn.huge.module.ctrole.domain.po.CRole;
+
+/**
+ * @title: 角色表业务扩展类
+ * @description: 角色表业务扩展类
+ * @company: hugeinfo
+ * @author: liyj
+ * @time: 2024-08-17 15:30:57
+ * @version: 1.0.0
+ * @see cn.huge.module.ctrole.domain.po.CRole
+ */
+public class CRoleBO extends CRole {
+
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/domain/bo/CtRoledataBO.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/domain/bo/CtRoledataBO.java
new file mode 100644
index 0000000..d1a33eb
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/domain/bo/CtRoledataBO.java
@@ -0,0 +1,17 @@
+package cn.huge.module.ctrole.domain.bo;
+
+import cn.huge.module.ctrole.domain.po.CtRoledata;
+
+/**
+ * @title: 客户角色数据权限表业务扩展类
+ * @description: 客户角色数据权限表业务扩展类
+ * @company: hugeinfo
+ * @author: liyj
+ * @time: 2024-08-17 15:33:41
+ * @version: 1.0.0
+ * @see cn.huge.module.ctrole.domain.po.CtRoledata
+ */
+public class CtRoledataBO extends CtRoledata {
+
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/domain/bo/CtRolefunBO.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/domain/bo/CtRolefunBO.java
new file mode 100644
index 0000000..34df6a6
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/domain/bo/CtRolefunBO.java
@@ -0,0 +1,17 @@
+package cn.huge.module.ctrole.domain.bo;
+
+import cn.huge.module.ctrole.domain.po.CtRolefun;
+
+/**
+ * @title: 客户角色菜单权限表业务扩展类
+ * @description: 客户角色菜单权限表业务扩展类
+ * @company: hugeinfo
+ * @author: liyj
+ * @time: 2024-08-17 15:33:41
+ * @version: 1.0.0
+ * @see cn.huge.module.ctrole.domain.po.CtRolefun
+ */
+public class CtRolefunBO extends CtRolefun {
+
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/domain/po/CRole.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/domain/po/CRole.java
new file mode 100644
index 0000000..7e692a0
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/domain/po/CRole.java
@@ -0,0 +1,78 @@
+package cn.huge.module.ctrole.domain.po;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * @title: 角色表数据库对应关系类
+ * @description: PO中的属性与数据表是一一对应关系,如需根据业务处理不同,请使用BO对象。
+ * @company:hugeinfo
+ * @author: liyj
+ * @time: 2024-08-17 15:30:57
+ * @version 1.0.0
+ */
+@TableName(value = "dyh_ct_role")
+@Data
+public class CRole {
+
+ /**
+ * 角色编号
+ */
+ @TableId(value = "id")
+ private String id;
+
+ /**
+ * 角色代码
+ */
+ @TableField(value = "role_code")
+ private String roleCode;
+
+ /**
+ * 角色名称
+ */
+ @TableField(value = "name")
+ private String name;
+
+ /**
+ * 组织编号
+ */
+ @TableField(value = "unit_id")
+ private String unitId;
+
+ /**
+ * 角色类型,1:自定义角色,2:基础角色
+ */
+ @TableField(value = "role_type")
+ private Integer roleType;
+
+ /**
+ * 删除状态,0:已删除,1:未删除
+ */
+ @TableLogic
+ @TableField(value = "delete_status")
+ private Integer deleteStatus;
+
+ /**
+ * 顾客编号
+ */
+ @TableField(value = "cust_id")
+ private String custId;
+
+ /**
+ * 创建时间
+ */
+ @TableField(value = "create_time")
+ private Date createTime;
+
+ /**
+ * 更新时间
+ */
+ @TableField(value = "update_time")
+ private Date updateTime;
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/domain/po/CtRoledata.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/domain/po/CtRoledata.java
new file mode 100644
index 0000000..6304f1f
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/domain/po/CtRoledata.java
@@ -0,0 +1,72 @@
+package cn.huge.module.ctrole.domain.po;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * @title: 客户角色数据权限表数据库对应关系类
+ * @description: PO中的属性与数据表是一一对应关系,如需根据业务处理不同,请使用BO对象。
+ * @company:hugeinfo
+ * @author: liyj
+ * @time: 2024-08-17 15:33:41
+ * @version 1.0.0
+ */
+@TableName(value = "dyh_ct_roledata")
+@Data
+public class CtRoledata {
+
+ /**
+ * 角色数据权限编号
+ */
+ @TableId(value = "id")
+ private String id;
+
+ /**
+ * 角色编号
+ */
+ @TableField(value = "role_id")
+ private String roleId;
+
+ /**
+ * 数据权限类型,1:自己,2:本单位及下属单位,3:指定单个单位,4:指定单位及该下属单位
+ */
+ @TableField(value = "data_type")
+ private Integer dataType;
+
+ /**
+ * 单位编号
+ */
+ @TableField(value = "unit_id")
+ private String unitId;
+
+ /**
+ * 删除状态,0:已删除,1:未删除
+ */
+ @TableLogic
+ @TableField(value = "delete_status")
+ private Integer deleteStatus;
+
+ /**
+ * 顾客编号
+ */
+ @TableField(value = "cust_id")
+ private String custId;
+
+ /**
+ * 创建时间
+ */
+ @TableField(value = "create_time")
+ private Date createTime;
+
+ /**
+ * 更新时间
+ */
+ @TableField(value = "update_time")
+ private Date updateTime;
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/domain/po/CtRolefun.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/domain/po/CtRolefun.java
new file mode 100644
index 0000000..a8918df
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/domain/po/CtRolefun.java
@@ -0,0 +1,101 @@
+package cn.huge.module.ctrole.domain.po;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * @title: 客户角色菜单权限表数据库对应关系类
+ * @description: PO中的属性与数据表是一一对应关系,如需根据业务处理不同,请使用BO对象。
+ * @company:hugeinfo
+ * @author: liyj
+ * @time: 2024-08-17 15:33:41
+ * @version 1.0.0
+ */
+@TableName(value = "dyh_ct_rolefun")
+@Data
+public class CtRolefun {
+
+ /**
+ * 角色权限编号
+ */
+ @TableId(value = "id")
+ private String id;
+
+ /**
+ * 角色编号
+ */
+ @TableField(value = "role_id")
+ private String roleId;
+
+ /**
+ * 权限编号
+ */
+ @TableField(value = "power_id")
+ private String powerId;
+
+ /**
+ * 权限名称
+ */
+ @TableField(value = "power_name")
+ private String powerName;
+
+ /**
+ * 权限标签
+ */
+ @TableField(value = "power_tag")
+ private String powerTag;
+
+ /**
+ * 权限url
+ */
+ @TableField(value = "power_url")
+ private String powerUrl;
+
+ /**
+ * 权限图标
+ */
+ @TableField(value = "power_icon")
+ private String powerIcon;
+
+ /**
+ * 权限类型,0:应用,1:模块,2:菜单,3:功能
+ */
+ @TableField(value = "power_type")
+ private Integer powerType;
+
+ /**
+ * 应用客户端,1:平台web端,2:平台人小程序
+ */
+ @TableField(value = "app_client")
+ private Integer appClient;
+
+ /**
+ * 父级编号,根级默认为root
+ */
+ @TableField(value = "parent_id")
+ private String parentId;
+
+ /**
+ * 顾客编号
+ */
+ @TableField(value = "cust_id")
+ private String custId;
+
+ /**
+ * 创建时间
+ */
+ @TableField(value = "create_time")
+ private Date createTime;
+
+ /**
+ * 更新时间
+ */
+ @TableField(value = "update_time")
+ private Date updateTime;
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/service/CRoleService.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/service/CRoleService.java
new file mode 100644
index 0000000..7275c97
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/service/CRoleService.java
@@ -0,0 +1,133 @@
+package cn.huge.module.ctrole.service;
+
+import cn.huge.base.common.exception.ServiceException;
+import cn.huge.base.common.utils.DateUtils;
+import cn.huge.base.common.utils.IdUtils;
+import cn.huge.module.client.api.impl.UtilsClientImpl;
+import cn.huge.module.ctrole.dao.mapper.CRoleMapper;
+import cn.huge.module.ctrole.domain.po.CRole;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.PageImpl;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.PostConstruct;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @title: 角色表业务逻辑处理
+ * @Description 角色表业务逻辑处理
+ * @company hugeinfo
+ * @author liyj
+ * @Time 2024-08-17 15:30:57
+ * @version 1.0.0
+ */
+@Slf4j
+@Service
+@Transactional(rollbackFor = Exception.class)
+public class CRoleService extends ServiceImpl<CRoleMapper, CRole>{
+
+ @Autowired
+ private CRoleMapper mapper;
+
+ @Autowired
+ private UtilsClientImpl utilsClient;
+
+ /**
+ * 更新对象
+ * @param entity 对象
+ */
+ public void updateCRole(CRole entity){
+ try{
+ mapper.updateCRole(entity);
+ }catch (Exception e){
+ log.error("[CRoleService.updateCRole]调用失败,异常信息:"+e, e);
+ throw new ServiceException("CRoleService.updateCRole", e);
+ }
+ }
+
+ /**
+ * 条件更新对象
+ * @param entity 对象
+ * @param terms 条件
+ */
+ public void updateCRoleTerms(CRole entity, Map<String, Object> terms){
+ try{
+ mapper.updateCRoleTerms(entity, terms);
+ }catch (Exception e){
+ log.error("[CRoleService.updateCRoleTerms]调用失败,异常信息:"+e, e);
+ throw new ServiceException("CRoleService.updateCRoleTerms", e);
+ }
+ }
+
+ /**
+ * 根据编号物理删除
+ * @param id 查询条件集合
+ */
+ public void deleteCRole(String id){
+ try{
+ mapper.deleteCRole(id);
+ }catch (Exception e){
+ log.error("[CRoleService.deleteCRole]调用失败,异常信息:"+e, e);
+ throw new ServiceException("CRoleService.deleteCRole", e);
+ }
+ }
+
+ /**
+ * 按条件查询
+ * @param terms 条件
+ * @return List
+ */
+ public List<CRole> listTerms(Map<String, Object> terms){
+ return mapper.listTerms(terms);
+ }
+
+ /**
+ * 按条件统计
+ * @param terms 条件
+ * @return long
+ */
+ public long countTerms(Map<String, Object> terms){
+ return mapper.countTerms(terms);
+ }
+
+ /**
+ * 按条件分页查询
+ * @param page 分页对象
+ * @param terms 条件
+ * @return Page
+ */
+ public Page<CRole> pageQuery(PageRequest page, Map<String, Object> terms){
+ long total = mapper.countTerms(terms);
+ List<CRole> content = mapper.pageTerms(page, terms);
+ return new PageImpl<CRole>(content, page, total);
+ }
+
+ /**
+ * 新增或更新对象
+ * @param cRole 实体对象
+ */
+ public void saveCRole(CRole cRole){
+ try{
+ Date nowDate = DateUtils.getMowDate();
+ // 判断是否新增
+ if (IdUtils.checkNewId(cRole.getId())){
+ cRole.setId(utilsClient.getNewTimeId());
+ cRole.setCreateTime(nowDate);
+ }
+ cRole.setUpdateTime(nowDate);
+ this.saveOrUpdate(cRole);
+ }catch (Exception e){
+ log.error("[CRoleService.saveCRole]调用失败,异常信息:"+e, e);
+ throw new ServiceException("CRoleService.saveCRole", e);
+ }
+ }
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/service/CtRoledataService.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/service/CtRoledataService.java
new file mode 100644
index 0000000..f8ed414
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/service/CtRoledataService.java
@@ -0,0 +1,133 @@
+package cn.huge.module.ctrole.service;
+
+import cn.huge.base.common.exception.ServiceException;
+import cn.huge.base.common.utils.DateUtils;
+import cn.huge.base.common.utils.IdUtils;
+import cn.huge.module.client.api.impl.UtilsClientImpl;
+import cn.huge.module.ctrole.dao.mapper.CtRoledataMapper;
+import cn.huge.module.ctrole.domain.po.CtRoledata;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.PageImpl;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.PostConstruct;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @title: 客户角色数据权限表业务逻辑处理
+ * @Description 客户角色数据权限表业务逻辑处理
+ * @company hugeinfo
+ * @author liyj
+ * @Time 2024-08-17 15:33:41
+ * @version 1.0.0
+ */
+@Slf4j
+@Service
+@Transactional(rollbackFor = Exception.class)
+public class CtRoledataService extends ServiceImpl<CtRoledataMapper, CtRoledata>{
+
+ @Autowired
+ private CtRoledataMapper mapper;
+
+ @Autowired
+ private UtilsClientImpl utilsClient;
+
+ /**
+ * 更新对象
+ * @param entity 对象
+ */
+ public void updateCtRoledata(CtRoledata entity){
+ try{
+ mapper.updateCtRoledata(entity);
+ }catch (Exception e){
+ log.error("[CtRoledataService.updateCtRoledata]调用失败,异常信息:"+e, e);
+ throw new ServiceException("CtRoledataService.updateCtRoledata", e);
+ }
+ }
+
+ /**
+ * 条件更新对象
+ * @param entity 对象
+ * @param terms 条件
+ */
+ public void updateCtRoledataTerms(CtRoledata entity, Map<String, Object> terms){
+ try{
+ mapper.updateCtRoledataTerms(entity, terms);
+ }catch (Exception e){
+ log.error("[CtRoledataService.updateCtRoledataTerms]调用失败,异常信息:"+e, e);
+ throw new ServiceException("CtRoledataService.updateCtRoledataTerms", e);
+ }
+ }
+
+ /**
+ * 根据编号物理删除
+ * @param id 查询条件集合
+ */
+ public void deleteCtRoledata(String id){
+ try{
+ mapper.deleteCtRoledata(id);
+ }catch (Exception e){
+ log.error("[CtRoledataService.deleteCtRoledata]调用失败,异常信息:"+e, e);
+ throw new ServiceException("CtRoledataService.deleteCtRoledata", e);
+ }
+ }
+
+ /**
+ * 按条件查询
+ * @param terms 条件
+ * @return List
+ */
+ public List<CtRoledata> listTerms(Map<String, Object> terms){
+ return mapper.listTerms(terms);
+ }
+
+ /**
+ * 按条件统计
+ * @param terms 条件
+ * @return long
+ */
+ public long countTerms(Map<String, Object> terms){
+ return mapper.countTerms(terms);
+ }
+
+ /**
+ * 按条件分页查询
+ * @param page 分页对象
+ * @param terms 条件
+ * @return Page
+ */
+ public Page<CtRoledata> pageQuery(PageRequest page, Map<String, Object> terms){
+ long total = mapper.countTerms(terms);
+ List<CtRoledata> content = mapper.pageTerms(page, terms);
+ return new PageImpl<CtRoledata>(content, page, total);
+ }
+
+ /**
+ * 新增或更新对象
+ * @param ctRoledata 实体对象
+ */
+ public void saveCtRoledata(CtRoledata ctRoledata){
+ try{
+ Date nowDate = DateUtils.getMowDate();
+ // 判断是否新增
+ if (IdUtils.checkNewId(ctRoledata.getId())){
+ ctRoledata.setId(utilsClient.getNewTimeId());
+ ctRoledata.setCreateTime(nowDate);
+ }
+ ctRoledata.setUpdateTime(nowDate);
+ this.saveOrUpdate(ctRoledata);
+ }catch (Exception e){
+ log.error("[CtRoledataService.saveCtRoledata]调用失败,异常信息:"+e, e);
+ throw new ServiceException("CtRoledataService.saveCtRoledata", e);
+ }
+ }
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/service/CtRolefunService.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/service/CtRolefunService.java
new file mode 100644
index 0000000..23fcfbe
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctrole/service/CtRolefunService.java
@@ -0,0 +1,133 @@
+package cn.huge.module.ctrole.service;
+
+import cn.huge.base.common.exception.ServiceException;
+import cn.huge.base.common.utils.DateUtils;
+import cn.huge.base.common.utils.IdUtils;
+import cn.huge.module.client.api.impl.UtilsClientImpl;
+import cn.huge.module.ctrole.dao.mapper.CtRolefunMapper;
+import cn.huge.module.ctrole.domain.po.CtRolefun;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.PageImpl;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.PostConstruct;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @title: 客户角色菜单权限表业务逻辑处理
+ * @Description 客户角色菜单权限表业务逻辑处理
+ * @company hugeinfo
+ * @author liyj
+ * @Time 2024-08-17 15:33:41
+ * @version 1.0.0
+ */
+@Slf4j
+@Service
+@Transactional(rollbackFor = Exception.class)
+public class CtRolefunService extends ServiceImpl<CtRolefunMapper, CtRolefun>{
+
+ @Autowired
+ private CtRolefunMapper mapper;
+
+ @Autowired
+ private UtilsClientImpl utilsClient;
+
+ /**
+ * 更新对象
+ * @param entity 对象
+ */
+ public void updateCtRolefun(CtRolefun entity){
+ try{
+ mapper.updateCtRolefun(entity);
+ }catch (Exception e){
+ log.error("[CtRolefunService.updateCtRolefun]调用失败,异常信息:"+e, e);
+ throw new ServiceException("CtRolefunService.updateCtRolefun", e);
+ }
+ }
+
+ /**
+ * 条件更新对象
+ * @param entity 对象
+ * @param terms 条件
+ */
+ public void updateCtRolefunTerms(CtRolefun entity, Map<String, Object> terms){
+ try{
+ mapper.updateCtRolefunTerms(entity, terms);
+ }catch (Exception e){
+ log.error("[CtRolefunService.updateCtRolefunTerms]调用失败,异常信息:"+e, e);
+ throw new ServiceException("CtRolefunService.updateCtRolefunTerms", e);
+ }
+ }
+
+ /**
+ * 根据编号物理删除
+ * @param id 查询条件集合
+ */
+ public void deleteCtRolefun(String id){
+ try{
+ mapper.deleteCtRolefun(id);
+ }catch (Exception e){
+ log.error("[CtRolefunService.deleteCtRolefun]调用失败,异常信息:"+e, e);
+ throw new ServiceException("CtRolefunService.deleteCtRolefun", e);
+ }
+ }
+
+ /**
+ * 按条件查询
+ * @param terms 条件
+ * @return List
+ */
+ public List<CtRolefun> listTerms(Map<String, Object> terms){
+ return mapper.listTerms(terms);
+ }
+
+ /**
+ * 按条件统计
+ * @param terms 条件
+ * @return long
+ */
+ public long countTerms(Map<String, Object> terms){
+ return mapper.countTerms(terms);
+ }
+
+ /**
+ * 按条件分页查询
+ * @param page 分页对象
+ * @param terms 条件
+ * @return Page
+ */
+ public Page<CtRolefun> pageQuery(PageRequest page, Map<String, Object> terms){
+ long total = mapper.countTerms(terms);
+ List<CtRolefun> content = mapper.pageTerms(page, terms);
+ return new PageImpl<CtRolefun>(content, page, total);
+ }
+
+ /**
+ * 新增或更新对象
+ * @param ctRolefun 实体对象
+ */
+ public void saveCtRolefun(CtRolefun ctRolefun){
+ try{
+ Date nowDate = DateUtils.getMowDate();
+ // 判断是否新增
+ if (IdUtils.checkNewId(ctRolefun.getId())){
+ ctRolefun.setId(utilsClient.getNewTimeId());
+ ctRolefun.setCreateTime(nowDate);
+ }
+ ctRolefun.setUpdateTime(nowDate);
+ this.saveOrUpdate(ctRolefun);
+ }catch (Exception e){
+ log.error("[CtRolefunService.saveCtRolefun]调用失败,异常信息:"+e, e);
+ throw new ServiceException("CtRolefunService.saveCtRolefun", e);
+ }
+ }
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/controller/web/CtAccountWebController.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/controller/web/CtAccountWebController.java
new file mode 100644
index 0000000..e483601
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/controller/web/CtAccountWebController.java
@@ -0,0 +1,204 @@
+package cn.huge.module.ctuser.controller;
+
+import cn.huge.base.common.utils.ReturnFailUtils;
+import cn.huge.base.common.utils.ReturnSucUtils;
+import cn.huge.module.ctuser.domain.po.CtAccount;
+import cn.huge.module.ctuser.service.CtAccountService;
+import com.google.common.collect.Maps;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.data.domain.Sort;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.Map;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+/**
+ * @title: 客户用户账号表接口api
+ * @description: 客户用户账号表接口api
+ * @company: hugeinfo
+ * @author: liyj
+ * @time: 2024-08-17 15:30:56
+ * @version: 1.0.0
+ */
+@Slf4j
+@RestController
+@RequestMapping("/api/web/ctAccount")
+public class CtAccountWebController {
+
+ @Autowired(required = false)
+ private HttpServletRequest request;
+
+ @Autowired
+ private CtAccountService service;
+
+ /**
+ * 获取请求URL参数
+ * @return Map<String, Object>
+ */
+ private Map<String, Object> getParameter(){
+ Map<String, Object> terms = Maps.newHashMap();
+ // 账号编号
+ String id = request.getParameter("id");
+ if (StringUtils.isNotBlank(id)){
+ terms.put("id", id);
+ }
+ // 用户编号
+ String userId = request.getParameter("userId");
+ if (StringUtils.isNotBlank(userId)){
+ terms.put("userId", userId);
+ }
+ // 帐号类型,1:平台web端,2:平台小程序
+ String accType = request.getParameter("accType");
+ if (StringUtils.isNotBlank(accType)){
+ terms.put("accType", accType);
+ }
+ // 身份唯一标识(存储唯一标识,比如账号、邮箱、手机号、第三方获取的唯一标识等)
+ String acc = request.getParameter("acc");
+ if (StringUtils.isNotBlank(acc)){
+ terms.put("acc", acc);
+ }
+ // 授权凭证(比如密码 第三方登录的token等)
+ String cipher = request.getParameter("cipher");
+ if (StringUtils.isNotBlank(cipher)){
+ terms.put("cipher", cipher);
+ }
+ // 授权凭证明文
+ String cipherOpen = request.getParameter("cipherOpen");
+ if (StringUtils.isNotBlank(cipherOpen)){
+ terms.put("cipherOpen", cipherOpen);
+ }
+ // 密码最新更新时间
+ String cipherTime = request.getParameter("cipherTime");
+ if (StringUtils.isNotBlank(cipherTime)){
+ terms.put("cipherTime", cipherTime);
+ }
+ // 最新登录时间
+ String loginTime = request.getParameter("loginTime");
+ if (StringUtils.isNotBlank(loginTime)){
+ terms.put("loginTime", loginTime);
+ }
+ // 限制登录时间(密码错误次数超过限制,默认30分钟)
+ String limitTime = request.getParameter("limitTime");
+ if (StringUtils.isNotBlank(limitTime)){
+ terms.put("limitTime", limitTime);
+ }
+ // 删除状态,0:已删除,1:未删除
+ String deleteStatus = request.getParameter("deleteStatus");
+ if (StringUtils.isNotBlank(deleteStatus)){
+ terms.put("deleteStatus", deleteStatus);
+ }
+ // 顾客编号
+ String custId = request.getParameter("custId");
+ if (StringUtils.isNotBlank(custId)){
+ terms.put("custId", custId);
+ }
+ // 创建时间区间
+ String createStart = request.getParameter("createStart");
+ String createEnd = request.getParameter("createEnd");
+ if(StringUtils.isNotBlank(createStart) && StringUtils.isNotBlank(createEnd)) {
+ terms.put("createStart", createStart);
+ terms.put("createEnd", createEnd);
+ }
+ // 更新时间区间
+ String updateStart = request.getParameter("updateStart");
+ String updateEnd = request.getParameter("updateEnd");
+ if(StringUtils.isNotBlank(updateStart) && StringUtils.isNotBlank(updateEnd)) {
+ terms.put("updateStart", updateStart);
+ terms.put("updateEnd", updateEnd);
+ }
+ return terms;
+ }
+
+ /**
+ * 条件查询多个
+ * @url {ctx}/api/web/ctAccount/listQuery
+ * @return Object
+ */
+ @GetMapping("/listQuery")
+ public Object listQuery() {
+ try {
+ Map<String, Object> terms = getParameter();
+ return ReturnSucUtils.getRepInfo(service.listTerms(terms));
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+ /**
+ * 条件分页查询
+ * @url {ctx}/api/web/ctAccount/pageQuery
+ * @param page 页码
+ * @param size 每页数量
+ * @return Object
+ */
+ @GetMapping("/pageQuery")
+ public Object pageQuery(@RequestParam(value = "page") int page, @RequestParam(value = "size") int size) {
+ try {
+ Map<String, Object> terms = getParameter();
+ Sort sort = Sort.by(Sort.Direction.DESC, "create_time");
+ PageRequest pageRequest = PageRequest.of(page-1, size, sort);
+ Page<CtAccount> ctAccountPage = service.pageQuery(pageRequest, terms);
+ return ReturnSucUtils.getRepInfo( "处理成功", ctAccountPage);
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+ /**
+ * 根据编号查询单个
+ * @url {ctx}/api/web/ctAccount/getById
+ * @param id 主键编号
+ * @return Object
+ */
+ @GetMapping("/getById")
+ public Object getById(@RequestParam(value = "id") String id) {
+ try {
+ return ReturnSucUtils.getRepInfo(service.getById(id));
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+ /**
+ * 根据主键单个/批量删除
+ * @url {ctx}/api/web/ctAccount/deleteByIds
+ * @param ids 主键编号
+ * @return Object
+ */
+ @GetMapping("/deleteByIds")
+ public Object deleteByIds(@RequestParam(value = "ids") String ids) {
+ try {
+ if (ids.indexOf(",") != -1) {
+ service.removeByIds(Stream.of(ids.split(",")).collect(Collectors.toList()));
+ }else{
+ service.removeById(ids);
+ }
+ return ReturnSucUtils.getRepInfo();
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+ /**
+ * 新增或更新对象
+ * @url {ctx}/api/web/ctAccount/saveCtAccount
+ * @param ctAccount 实体对象
+ * @return Object
+ */
+ @PostMapping("/saveCtAccount")
+ public Object saveCtAccount(@RequestBody CtAccount ctAccount) {
+ try {
+ service.saveCtAccount(ctAccount);
+ return ReturnSucUtils.getRepInfo();
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/controller/web/CtDeptWebController.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/controller/web/CtDeptWebController.java
new file mode 100644
index 0000000..0eb6025
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/controller/web/CtDeptWebController.java
@@ -0,0 +1,209 @@
+package cn.huge.module.ctuser.controller;
+
+import cn.huge.base.common.utils.ReturnFailUtils;
+import cn.huge.base.common.utils.ReturnSucUtils;
+import cn.huge.module.ctuser.domain.po.CtDept;
+import cn.huge.module.ctuser.service.CtDeptService;
+import com.google.common.collect.Maps;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.data.domain.Sort;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.Map;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+/**
+ * @title: 客户部门表接口api
+ * @description: 客户部门表接口api
+ * @company: hugeinfo
+ * @author: liyj
+ * @time: 2024-08-17 15:30:57
+ * @version: 1.0.0
+ */
+@Slf4j
+@RestController
+@RequestMapping("/api/web/ctDept")
+public class CtDeptWebController {
+
+ @Autowired(required = false)
+ private HttpServletRequest request;
+
+ @Autowired
+ private CtDeptService service;
+
+ /**
+ * 获取请求URL参数
+ * @return Map<String, Object>
+ */
+ private Map<String, Object> getParameter(){
+ Map<String, Object> terms = Maps.newHashMap();
+ // 部门编号
+ String id = request.getParameter("id");
+ if (StringUtils.isNotBlank(id)){
+ terms.put("id", id);
+ }
+ // 层级
+ String level = request.getParameter("level");
+ if (StringUtils.isNotBlank(level)){
+ terms.put("level", level);
+ }
+ // 父级部门,根级默认root
+ String parentId = request.getParameter("parentId");
+ if (StringUtils.isNotBlank(parentId)){
+ terms.put("parentId", parentId);
+ }
+ // 部门名称
+ String name = request.getParameter("name");
+ if (StringUtils.isNotBlank(name)){
+ terms.put("name", name);
+ }
+ // 描述
+ String des = request.getParameter("des");
+ if (StringUtils.isNotBlank(des)){
+ terms.put("des", des);
+ }
+ // 组织编号
+ String unitId = request.getParameter("unitId");
+ if (StringUtils.isNotBlank(unitId)){
+ terms.put("unitId", unitId);
+ }
+ // 调解专长,多个用,隔开
+ String goodField = request.getParameter("goodField");
+ if (StringUtils.isNotBlank(goodField)){
+ terms.put("goodField", goodField);
+ }
+ // 调解专长名称,多个用,隔开
+ String goodFieldName = request.getParameter("goodFieldName");
+ if (StringUtils.isNotBlank(goodFieldName)){
+ terms.put("goodFieldName", goodFieldName);
+ }
+ // 调解范围,多个用,隔开
+ String canField = request.getParameter("canField");
+ if (StringUtils.isNotBlank(canField)){
+ terms.put("canField", canField);
+ }
+ // 调解范围名称,多个用,隔开
+ String canFieldName = request.getParameter("canFieldName");
+ if (StringUtils.isNotBlank(canFieldName)){
+ terms.put("canFieldName", canFieldName);
+ }
+ // 删除状态,0:已删除,1:未删除
+ String deleteStatus = request.getParameter("deleteStatus");
+ if (StringUtils.isNotBlank(deleteStatus)){
+ terms.put("deleteStatus", deleteStatus);
+ }
+ // 所属客户编号
+ String custId = request.getParameter("custId");
+ if (StringUtils.isNotBlank(custId)){
+ terms.put("custId", custId);
+ }
+ // 创建时间区间
+ String createStart = request.getParameter("createStart");
+ String createEnd = request.getParameter("createEnd");
+ if(StringUtils.isNotBlank(createStart) && StringUtils.isNotBlank(createEnd)) {
+ terms.put("createStart", createStart);
+ terms.put("createEnd", createEnd);
+ }
+ // 更新时间区间
+ String updateStart = request.getParameter("updateStart");
+ String updateEnd = request.getParameter("updateEnd");
+ if(StringUtils.isNotBlank(updateStart) && StringUtils.isNotBlank(updateEnd)) {
+ terms.put("updateStart", updateStart);
+ terms.put("updateEnd", updateEnd);
+ }
+ return terms;
+ }
+
+ /**
+ * 条件查询多个
+ * @url {ctx}/api/web/ctDept/listQuery
+ * @return Object
+ */
+ @GetMapping("/listQuery")
+ public Object listQuery() {
+ try {
+ Map<String, Object> terms = getParameter();
+ return ReturnSucUtils.getRepInfo(service.listTerms(terms));
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+ /**
+ * 条件分页查询
+ * @url {ctx}/api/web/ctDept/pageQuery
+ * @param page 页码
+ * @param size 每页数量
+ * @return Object
+ */
+ @GetMapping("/pageQuery")
+ public Object pageQuery(@RequestParam(value = "page") int page, @RequestParam(value = "size") int size) {
+ try {
+ Map<String, Object> terms = getParameter();
+ Sort sort = Sort.by(Sort.Direction.DESC, "create_time");
+ PageRequest pageRequest = PageRequest.of(page-1, size, sort);
+ Page<CtDept> ctDeptPage = service.pageQuery(pageRequest, terms);
+ return ReturnSucUtils.getRepInfo( "处理成功", ctDeptPage);
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+ /**
+ * 根据编号查询单个
+ * @url {ctx}/api/web/ctDept/getById
+ * @param id 主键编号
+ * @return Object
+ */
+ @GetMapping("/getById")
+ public Object getById(@RequestParam(value = "id") String id) {
+ try {
+ return ReturnSucUtils.getRepInfo(service.getById(id));
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+ /**
+ * 根据主键单个/批量删除
+ * @url {ctx}/api/web/ctDept/deleteByIds
+ * @param ids 主键编号
+ * @return Object
+ */
+ @GetMapping("/deleteByIds")
+ public Object deleteByIds(@RequestParam(value = "ids") String ids) {
+ try {
+ if (ids.indexOf(",") != -1) {
+ service.removeByIds(Stream.of(ids.split(",")).collect(Collectors.toList()));
+ }else{
+ service.removeById(ids);
+ }
+ return ReturnSucUtils.getRepInfo();
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+ /**
+ * 新增或更新对象
+ * @url {ctx}/api/web/ctDept/saveCtDept
+ * @param ctDept 实体对象
+ * @return Object
+ */
+ @PostMapping("/saveCtDept")
+ public Object saveCtDept(@RequestBody CtDept ctDept) {
+ try {
+ service.saveCtDept(ctDept);
+ return ReturnSucUtils.getRepInfo();
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/controller/web/CtPostWebController.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/controller/web/CtPostWebController.java
new file mode 100644
index 0000000..4b3e29c
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/controller/web/CtPostWebController.java
@@ -0,0 +1,179 @@
+package cn.huge.module.ctuser.controller;
+
+import cn.huge.base.common.utils.ReturnFailUtils;
+import cn.huge.base.common.utils.ReturnSucUtils;
+import cn.huge.module.ctuser.domain.po.CtPost;
+import cn.huge.module.ctuser.service.CtPostService;
+import com.google.common.collect.Maps;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.data.domain.Sort;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.Map;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+/**
+ * @title: 客户岗位表接口api
+ * @description: 客户岗位表接口api
+ * @company: hugeinfo
+ * @author: liyj
+ * @time: 2024-08-17 15:30:57
+ * @version: 1.0.0
+ */
+@Slf4j
+@RestController
+@RequestMapping("/api/web/ctPost")
+public class CtPostWebController {
+
+ @Autowired(required = false)
+ private HttpServletRequest request;
+
+ @Autowired
+ private CtPostService service;
+
+ /**
+ * 获取请求URL参数
+ * @return Map<String, Object>
+ */
+ private Map<String, Object> getParameter(){
+ Map<String, Object> terms = Maps.newHashMap();
+ // 编号
+ String id = request.getParameter("id");
+ if (StringUtils.isNotBlank(id)){
+ terms.put("id", id);
+ }
+ // 岗位名称
+ String name = request.getParameter("name");
+ if (StringUtils.isNotBlank(name)){
+ terms.put("name", name);
+ }
+ // 描述
+ String des = request.getParameter("des");
+ if (StringUtils.isNotBlank(des)){
+ terms.put("des", des);
+ }
+ // 单位编号
+ String unitId = request.getParameter("unitId");
+ if (StringUtils.isNotBlank(unitId)){
+ terms.put("unitId", unitId);
+ }
+ // 删除状态,0:已删除,1:未删除
+ String deleteStatus = request.getParameter("deleteStatus");
+ if (StringUtils.isNotBlank(deleteStatus)){
+ terms.put("deleteStatus", deleteStatus);
+ }
+ // 所属客户编号
+ String custId = request.getParameter("custId");
+ if (StringUtils.isNotBlank(custId)){
+ terms.put("custId", custId);
+ }
+ // 创建时间区间
+ String createStart = request.getParameter("createStart");
+ String createEnd = request.getParameter("createEnd");
+ if(StringUtils.isNotBlank(createStart) && StringUtils.isNotBlank(createEnd)) {
+ terms.put("createStart", createStart);
+ terms.put("createEnd", createEnd);
+ }
+ // 更新时间区间
+ String updateStart = request.getParameter("updateStart");
+ String updateEnd = request.getParameter("updateEnd");
+ if(StringUtils.isNotBlank(updateStart) && StringUtils.isNotBlank(updateEnd)) {
+ terms.put("updateStart", updateStart);
+ terms.put("updateEnd", updateEnd);
+ }
+ return terms;
+ }
+
+ /**
+ * 条件查询多个
+ * @url {ctx}/api/web/ctPost/listQuery
+ * @return Object
+ */
+ @GetMapping("/listQuery")
+ public Object listQuery() {
+ try {
+ Map<String, Object> terms = getParameter();
+ return ReturnSucUtils.getRepInfo(service.listTerms(terms));
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+ /**
+ * 条件分页查询
+ * @url {ctx}/api/web/ctPost/pageQuery
+ * @param page 页码
+ * @param size 每页数量
+ * @return Object
+ */
+ @GetMapping("/pageQuery")
+ public Object pageQuery(@RequestParam(value = "page") int page, @RequestParam(value = "size") int size) {
+ try {
+ Map<String, Object> terms = getParameter();
+ Sort sort = Sort.by(Sort.Direction.DESC, "create_time");
+ PageRequest pageRequest = PageRequest.of(page-1, size, sort);
+ Page<CtPost> ctPostPage = service.pageQuery(pageRequest, terms);
+ return ReturnSucUtils.getRepInfo( "处理成功", ctPostPage);
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+ /**
+ * 根据编号查询单个
+ * @url {ctx}/api/web/ctPost/getById
+ * @param id 主键编号
+ * @return Object
+ */
+ @GetMapping("/getById")
+ public Object getById(@RequestParam(value = "id") String id) {
+ try {
+ return ReturnSucUtils.getRepInfo(service.getById(id));
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+ /**
+ * 根据主键单个/批量删除
+ * @url {ctx}/api/web/ctPost/deleteByIds
+ * @param ids 主键编号
+ * @return Object
+ */
+ @GetMapping("/deleteByIds")
+ public Object deleteByIds(@RequestParam(value = "ids") String ids) {
+ try {
+ if (ids.indexOf(",") != -1) {
+ service.removeByIds(Stream.of(ids.split(",")).collect(Collectors.toList()));
+ }else{
+ service.removeById(ids);
+ }
+ return ReturnSucUtils.getRepInfo();
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+ /**
+ * 新增或更新对象
+ * @url {ctx}/api/web/ctPost/saveCtPost
+ * @param ctPost 实体对象
+ * @return Object
+ */
+ @PostMapping("/saveCtPost")
+ public Object saveCtPost(@RequestBody CtPost ctPost) {
+ try {
+ service.saveCtPost(ctPost);
+ return ReturnSucUtils.getRepInfo();
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/controller/web/CtUnitWebController.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/controller/web/CtUnitWebController.java
new file mode 100644
index 0000000..edab2ef
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/controller/web/CtUnitWebController.java
@@ -0,0 +1,314 @@
+package cn.huge.module.ctuser.controller;
+
+import cn.huge.base.common.utils.ReturnFailUtils;
+import cn.huge.base.common.utils.ReturnSucUtils;
+import cn.huge.module.ctuser.domain.po.CtUnit;
+import cn.huge.module.ctuser.service.CtUnitService;
+import com.google.common.collect.Maps;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.data.domain.Sort;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.Map;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+/**
+ * @title: 客户组织信息表接口api
+ * @description: 客户组织信息表接口api
+ * @company: hugeinfo
+ * @author: liyj
+ * @time: 2024-08-17 15:30:57
+ * @version: 1.0.0
+ */
+@Slf4j
+@RestController
+@RequestMapping("/api/web/ctUnit")
+public class CtUnitWebController {
+
+ @Autowired(required = false)
+ private HttpServletRequest request;
+
+ @Autowired
+ private CtUnitService service;
+
+ /**
+ * 获取请求URL参数
+ * @return Map<String, Object>
+ */
+ private Map<String, Object> getParameter(){
+ Map<String, Object> terms = Maps.newHashMap();
+ // 组织编号
+ String id = request.getParameter("id");
+ if (StringUtils.isNotBlank(id)){
+ terms.put("id", id);
+ }
+ // 层级
+ String level = request.getParameter("level");
+ if (StringUtils.isNotBlank(level)){
+ terms.put("level", level);
+ }
+ // 父级组织,根级为root
+ String parentId = request.getParameter("parentId");
+ if (StringUtils.isNotBlank(parentId)){
+ terms.put("parentId", parentId);
+ }
+ // 组织级别,1:市级,2:区级,3:镇街级,4:村居级
+ String unitGrade = request.getParameter("unitGrade");
+ if (StringUtils.isNotBlank(unitGrade)){
+ terms.put("unitGrade", unitGrade);
+ }
+ // 组织名称
+ String unitName = request.getParameter("unitName");
+ if (StringUtils.isNotBlank(unitName)){
+ terms.put("unitName", unitName);
+ }
+ // 组织类型,0:政法委,1:综治中心,2:直属部门,3:法院,4:行专业调委会,5:企事业调委会,6:演示测试,9:其他
+ String unitType = request.getParameter("unitType");
+ if (StringUtils.isNotBlank(unitType)){
+ terms.put("unitType", unitType);
+ }
+ // 组织机构代码
+ String unitCode = request.getParameter("unitCode");
+ if (StringUtils.isNotBlank(unitCode)){
+ terms.put("unitCode", unitCode);
+ }
+ // 描述
+ String unitDes = request.getParameter("unitDes");
+ if (StringUtils.isNotBlank(unitDes)){
+ terms.put("unitDes", unitDes);
+ }
+ // 单位负责人姓名
+ String dutyName = request.getParameter("dutyName");
+ if (StringUtils.isNotBlank(dutyName)){
+ terms.put("dutyName", dutyName);
+ }
+ // 单位负责人手机号码
+ String dutyMobile = request.getParameter("dutyMobile");
+ if (StringUtils.isNotBlank(dutyMobile)){
+ terms.put("dutyMobile", dutyMobile);
+ }
+ // 单位负责人身份证
+ String dutyIdcard = request.getParameter("dutyIdcard");
+ if (StringUtils.isNotBlank(dutyIdcard)){
+ terms.put("dutyIdcard", dutyIdcard);
+ }
+ // 加入方式,1:系统创建,2:自主申请
+ String joinWay = request.getParameter("joinWay");
+ if (StringUtils.isNotBlank(joinWay)){
+ terms.put("joinWay", joinWay);
+ }
+ // 组织地址省
+ String prov = request.getParameter("prov");
+ if (StringUtils.isNotBlank(prov)){
+ terms.put("prov", prov);
+ }
+ // 组织地址省名称
+ String provName = request.getParameter("provName");
+ if (StringUtils.isNotBlank(provName)){
+ terms.put("provName", provName);
+ }
+ // 组织地址市
+ String city = request.getParameter("city");
+ if (StringUtils.isNotBlank(city)){
+ terms.put("city", city);
+ }
+ // 组织地址市名称
+ String cityName = request.getParameter("cityName");
+ if (StringUtils.isNotBlank(cityName)){
+ terms.put("cityName", cityName);
+ }
+ // 组织地址区
+ String area = request.getParameter("area");
+ if (StringUtils.isNotBlank(area)){
+ terms.put("area", area);
+ }
+ // 组织地址区名称
+ String areaName = request.getParameter("areaName");
+ if (StringUtils.isNotBlank(areaName)){
+ terms.put("areaName", areaName);
+ }
+ // 组织地址街道
+ String road = request.getParameter("road");
+ if (StringUtils.isNotBlank(road)){
+ terms.put("road", road);
+ }
+ // 组织地址街道名称
+ String roadName = request.getParameter("roadName");
+ if (StringUtils.isNotBlank(roadName)){
+ terms.put("roadName", roadName);
+ }
+ // 组织地址社区
+ String village = request.getParameter("village");
+ if (StringUtils.isNotBlank(village)){
+ terms.put("village", village);
+ }
+ // 组织地址社区名称
+ String villageName = request.getParameter("villageName");
+ if (StringUtils.isNotBlank(villageName)){
+ terms.put("villageName", villageName);
+ }
+ // 组织详细地址
+ String addr = request.getParameter("addr");
+ if (StringUtils.isNotBlank(addr)){
+ terms.put("addr", addr);
+ }
+ // 组织经度
+ String lng = request.getParameter("lng");
+ if (StringUtils.isNotBlank(lng)){
+ terms.put("lng", lng);
+ }
+ // 组织纬度
+ String lat = request.getParameter("lat");
+ if (StringUtils.isNotBlank(lat)){
+ terms.put("lat", lat);
+ }
+ // 调解专长,多个用,隔开
+ String goodField = request.getParameter("goodField");
+ if (StringUtils.isNotBlank(goodField)){
+ terms.put("goodField", goodField);
+ }
+ // 调解专长名称,多个用,隔开
+ String goodFieldName = request.getParameter("goodFieldName");
+ if (StringUtils.isNotBlank(goodFieldName)){
+ terms.put("goodFieldName", goodFieldName);
+ }
+ // 调解范围,多个用,隔开
+ String canField = request.getParameter("canField");
+ if (StringUtils.isNotBlank(canField)){
+ terms.put("canField", canField);
+ }
+ // 调解范围名称,多个用,隔开
+ String canFieldName = request.getParameter("canFieldName");
+ if (StringUtils.isNotBlank(canFieldName)){
+ terms.put("canFieldName", canFieldName);
+ }
+ // 是否可以找他调(小程序),0:否,1:是
+ String findStatus = request.getParameter("findStatus");
+ if (StringUtils.isNotBlank(findStatus)){
+ terms.put("findStatus", findStatus);
+ }
+ // 是否参与自动调度,0:否,1:是
+ String dispStatus = request.getParameter("dispStatus");
+ if (StringUtils.isNotBlank(dispStatus)){
+ terms.put("dispStatus", dispStatus);
+ }
+ // 删除状态,0:已删除,1:未删除
+ String deleteStatus = request.getParameter("deleteStatus");
+ if (StringUtils.isNotBlank(deleteStatus)){
+ terms.put("deleteStatus", deleteStatus);
+ }
+ // 所属客户编号
+ String custId = request.getParameter("custId");
+ if (StringUtils.isNotBlank(custId)){
+ terms.put("custId", custId);
+ }
+ // 创建时间区间
+ String createStart = request.getParameter("createStart");
+ String createEnd = request.getParameter("createEnd");
+ if(StringUtils.isNotBlank(createStart) && StringUtils.isNotBlank(createEnd)) {
+ terms.put("createStart", createStart);
+ terms.put("createEnd", createEnd);
+ }
+ // 更新时间区间
+ String updateStart = request.getParameter("updateStart");
+ String updateEnd = request.getParameter("updateEnd");
+ if(StringUtils.isNotBlank(updateStart) && StringUtils.isNotBlank(updateEnd)) {
+ terms.put("updateStart", updateStart);
+ terms.put("updateEnd", updateEnd);
+ }
+ return terms;
+ }
+
+ /**
+ * 条件查询多个
+ * @url {ctx}/api/web/ctUnit/listQuery
+ * @return Object
+ */
+ @GetMapping("/listQuery")
+ public Object listQuery() {
+ try {
+ Map<String, Object> terms = getParameter();
+ return ReturnSucUtils.getRepInfo(service.listTerms(terms));
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+ /**
+ * 条件分页查询
+ * @url {ctx}/api/web/ctUnit/pageQuery
+ * @param page 页码
+ * @param size 每页数量
+ * @return Object
+ */
+ @GetMapping("/pageQuery")
+ public Object pageQuery(@RequestParam(value = "page") int page, @RequestParam(value = "size") int size) {
+ try {
+ Map<String, Object> terms = getParameter();
+ Sort sort = Sort.by(Sort.Direction.DESC, "create_time");
+ PageRequest pageRequest = PageRequest.of(page-1, size, sort);
+ Page<CtUnit> ctUnitPage = service.pageQuery(pageRequest, terms);
+ return ReturnSucUtils.getRepInfo( "处理成功", ctUnitPage);
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+ /**
+ * 根据编号查询单个
+ * @url {ctx}/api/web/ctUnit/getById
+ * @param id 主键编号
+ * @return Object
+ */
+ @GetMapping("/getById")
+ public Object getById(@RequestParam(value = "id") String id) {
+ try {
+ return ReturnSucUtils.getRepInfo(service.getById(id));
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+ /**
+ * 根据主键单个/批量删除
+ * @url {ctx}/api/web/ctUnit/deleteByIds
+ * @param ids 主键编号
+ * @return Object
+ */
+ @GetMapping("/deleteByIds")
+ public Object deleteByIds(@RequestParam(value = "ids") String ids) {
+ try {
+ if (ids.indexOf(",") != -1) {
+ service.removeByIds(Stream.of(ids.split(",")).collect(Collectors.toList()));
+ }else{
+ service.removeById(ids);
+ }
+ return ReturnSucUtils.getRepInfo();
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+ /**
+ * 新增或更新对象
+ * @url {ctx}/api/web/ctUnit/saveCtUnit
+ * @param ctUnit 实体对象
+ * @return Object
+ */
+ @PostMapping("/saveCtUnit")
+ public Object saveCtUnit(@RequestBody CtUnit ctUnit) {
+ try {
+ service.saveCtUnit(ctUnit);
+ return ReturnSucUtils.getRepInfo();
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/controller/web/CtUsepostWebController.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/controller/web/CtUsepostWebController.java
new file mode 100644
index 0000000..e78c010
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/controller/web/CtUsepostWebController.java
@@ -0,0 +1,189 @@
+package cn.huge.module.ctuser.controller;
+
+import cn.huge.base.common.utils.ReturnFailUtils;
+import cn.huge.base.common.utils.ReturnSucUtils;
+import cn.huge.module.ctuser.domain.po.CtUsepost;
+import cn.huge.module.ctuser.service.CtUsepostService;
+import com.google.common.collect.Maps;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.data.domain.Sort;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.Map;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+/**
+ * @title: 客户用户配岗表接口api
+ * @description: 客户用户配岗表接口api
+ * @company: hugeinfo
+ * @author: liyj
+ * @time: 2024-08-17 15:30:57
+ * @version: 1.0.0
+ */
+@Slf4j
+@RestController
+@RequestMapping("/api/web/ctUsepost")
+public class CtUsepostWebController {
+
+ @Autowired(required = false)
+ private HttpServletRequest request;
+
+ @Autowired
+ private CtUsepostService service;
+
+ /**
+ * 获取请求URL参数
+ * @return Map<String, Object>
+ */
+ private Map<String, Object> getParameter(){
+ Map<String, Object> terms = Maps.newHashMap();
+ // 配岗编号
+ String id = request.getParameter("id");
+ if (StringUtils.isNotBlank(id)){
+ terms.put("id", id);
+ }
+ // 用户编号
+ String userId = request.getParameter("userId");
+ if (StringUtils.isNotBlank(userId)){
+ terms.put("userId", userId);
+ }
+ // 岗位编号
+ String postId = request.getParameter("postId");
+ if (StringUtils.isNotBlank(postId)){
+ terms.put("postId", postId);
+ }
+ // 岗位名称
+ String postName = request.getParameter("postName");
+ if (StringUtils.isNotBlank(postName)){
+ terms.put("postName", postName);
+ }
+ // 组织编号
+ String unitId = request.getParameter("unitId");
+ if (StringUtils.isNotBlank(unitId)){
+ terms.put("unitId", unitId);
+ }
+ // 部门编号
+ String deptId = request.getParameter("deptId");
+ if (StringUtils.isNotBlank(deptId)){
+ terms.put("deptId", deptId);
+ }
+ // 配岗类型,1:主岗,2:兼岗
+ String matchType = request.getParameter("matchType");
+ if (StringUtils.isNotBlank(matchType)){
+ terms.put("matchType", matchType);
+ }
+ // 所属客户编号
+ String custId = request.getParameter("custId");
+ if (StringUtils.isNotBlank(custId)){
+ terms.put("custId", custId);
+ }
+ // 创建时间区间
+ String createStart = request.getParameter("createStart");
+ String createEnd = request.getParameter("createEnd");
+ if(StringUtils.isNotBlank(createStart) && StringUtils.isNotBlank(createEnd)) {
+ terms.put("createStart", createStart);
+ terms.put("createEnd", createEnd);
+ }
+ // 更新时间区间
+ String updateStart = request.getParameter("updateStart");
+ String updateEnd = request.getParameter("updateEnd");
+ if(StringUtils.isNotBlank(updateStart) && StringUtils.isNotBlank(updateEnd)) {
+ terms.put("updateStart", updateStart);
+ terms.put("updateEnd", updateEnd);
+ }
+ return terms;
+ }
+
+ /**
+ * 条件查询多个
+ * @url {ctx}/api/web/ctUsepost/listQuery
+ * @return Object
+ */
+ @GetMapping("/listQuery")
+ public Object listQuery() {
+ try {
+ Map<String, Object> terms = getParameter();
+ return ReturnSucUtils.getRepInfo(service.listTerms(terms));
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+ /**
+ * 条件分页查询
+ * @url {ctx}/api/web/ctUsepost/pageQuery
+ * @param page 页码
+ * @param size 每页数量
+ * @return Object
+ */
+ @GetMapping("/pageQuery")
+ public Object pageQuery(@RequestParam(value = "page") int page, @RequestParam(value = "size") int size) {
+ try {
+ Map<String, Object> terms = getParameter();
+ Sort sort = Sort.by(Sort.Direction.DESC, "create_time");
+ PageRequest pageRequest = PageRequest.of(page-1, size, sort);
+ Page<CtUsepost> ctUsepostPage = service.pageQuery(pageRequest, terms);
+ return ReturnSucUtils.getRepInfo( "处理成功", ctUsepostPage);
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+ /**
+ * 根据编号查询单个
+ * @url {ctx}/api/web/ctUsepost/getById
+ * @param id 主键编号
+ * @return Object
+ */
+ @GetMapping("/getById")
+ public Object getById(@RequestParam(value = "id") String id) {
+ try {
+ return ReturnSucUtils.getRepInfo(service.getById(id));
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+ /**
+ * 根据主键单个/批量删除
+ * @url {ctx}/api/web/ctUsepost/deleteByIds
+ * @param ids 主键编号
+ * @return Object
+ */
+ @GetMapping("/deleteByIds")
+ public Object deleteByIds(@RequestParam(value = "ids") String ids) {
+ try {
+ if (ids.indexOf(",") != -1) {
+ service.removeByIds(Stream.of(ids.split(",")).collect(Collectors.toList()));
+ }else{
+ service.removeById(ids);
+ }
+ return ReturnSucUtils.getRepInfo();
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+ /**
+ * 新增或更新对象
+ * @url {ctx}/api/web/ctUsepost/saveCtUsepost
+ * @param ctUsepost 实体对象
+ * @return Object
+ */
+ @PostMapping("/saveCtUsepost")
+ public Object saveCtUsepost(@RequestBody CtUsepost ctUsepost) {
+ try {
+ service.saveCtUsepost(ctUsepost);
+ return ReturnSucUtils.getRepInfo();
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/controller/web/CtUserWebController.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/controller/web/CtUserWebController.java
new file mode 100644
index 0000000..730926e
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/controller/web/CtUserWebController.java
@@ -0,0 +1,329 @@
+package cn.huge.module.ctuser.controller;
+
+import cn.huge.base.common.utils.ReturnFailUtils;
+import cn.huge.base.common.utils.ReturnSucUtils;
+import cn.huge.module.ctuser.domain.po.CtUser;
+import cn.huge.module.ctuser.service.CtUserService;
+import com.google.common.collect.Maps;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.data.domain.Sort;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.Map;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+/**
+ * @title: 客户用户表接口api
+ * @description: 客户用户表接口api
+ * @company: hugeinfo
+ * @author: liyj
+ * @time: 2024-08-17 15:30:57
+ * @version: 1.0.0
+ */
+@Slf4j
+@RestController
+@RequestMapping("/api/web/ctUser")
+public class CtUserWebController {
+
+ @Autowired(required = false)
+ private HttpServletRequest request;
+
+ @Autowired
+ private CtUserService service;
+
+ /**
+ * 获取请求URL参数
+ * @return Map<String, Object>
+ */
+ private Map<String, Object> getParameter(){
+ Map<String, Object> terms = Maps.newHashMap();
+ // 客户用户编号
+ String id = request.getParameter("id");
+ if (StringUtils.isNotBlank(id)){
+ terms.put("id", id);
+ }
+ // 姓名
+ String trueName = request.getParameter("trueName");
+ if (StringUtils.isNotBlank(trueName)){
+ terms.put("trueName", trueName);
+ }
+ // 性别
+ String sex = request.getParameter("sex");
+ if (StringUtils.isNotBlank(sex)){
+ terms.put("sex", sex);
+ }
+ // 性别名称
+ String sexName = request.getParameter("sexName");
+ if (StringUtils.isNotBlank(sexName)){
+ terms.put("sexName", sexName);
+ }
+ // 手机号码
+ String mobile = request.getParameter("mobile");
+ if (StringUtils.isNotBlank(mobile)){
+ terms.put("mobile", mobile);
+ }
+ // 身份证号
+ String idcard = request.getParameter("idcard");
+ if (StringUtils.isNotBlank(idcard)){
+ terms.put("idcard", idcard);
+ }
+ // 电子邮箱
+ String email = request.getParameter("email");
+ if (StringUtils.isNotBlank(email)){
+ terms.put("email", email);
+ }
+ // 微信号
+ String wechat = request.getParameter("wechat");
+ if (StringUtils.isNotBlank(wechat)){
+ terms.put("wechat", wechat);
+ }
+ // QQ号
+ String qq = request.getParameter("qq");
+ if (StringUtils.isNotBlank(qq)){
+ terms.put("qq", qq);
+ }
+ // 现居地省
+ String prov = request.getParameter("prov");
+ if (StringUtils.isNotBlank(prov)){
+ terms.put("prov", prov);
+ }
+ // 现居地省名称
+ String provName = request.getParameter("provName");
+ if (StringUtils.isNotBlank(provName)){
+ terms.put("provName", provName);
+ }
+ // 现居地市
+ String city = request.getParameter("city");
+ if (StringUtils.isNotBlank(city)){
+ terms.put("city", city);
+ }
+ // 现居地市名称
+ String cityName = request.getParameter("cityName");
+ if (StringUtils.isNotBlank(cityName)){
+ terms.put("cityName", cityName);
+ }
+ // 现居地区
+ String area = request.getParameter("area");
+ if (StringUtils.isNotBlank(area)){
+ terms.put("area", area);
+ }
+ // 现居地区名称
+ String areaName = request.getParameter("areaName");
+ if (StringUtils.isNotBlank(areaName)){
+ terms.put("areaName", areaName);
+ }
+ // 现居地街道
+ String road = request.getParameter("road");
+ if (StringUtils.isNotBlank(road)){
+ terms.put("road", road);
+ }
+ // 现居地街道名称
+ String roadName = request.getParameter("roadName");
+ if (StringUtils.isNotBlank(roadName)){
+ terms.put("roadName", roadName);
+ }
+ // 现居地社区
+ String village = request.getParameter("village");
+ if (StringUtils.isNotBlank(village)){
+ terms.put("village", village);
+ }
+ // 现居地社区名称
+ String villageName = request.getParameter("villageName");
+ if (StringUtils.isNotBlank(villageName)){
+ terms.put("villageName", villageName);
+ }
+ // 现居地详细地址
+ String addr = request.getParameter("addr");
+ if (StringUtils.isNotBlank(addr)){
+ terms.put("addr", addr);
+ }
+ // 头像
+ String avatar = request.getParameter("avatar");
+ if (StringUtils.isNotBlank(avatar)){
+ terms.put("avatar", avatar);
+ }
+ // 组织编号
+ String unitId = request.getParameter("unitId");
+ if (StringUtils.isNotBlank(unitId)){
+ terms.put("unitId", unitId);
+ }
+ // 组织名称
+ String unitName = request.getParameter("unitName");
+ if (StringUtils.isNotBlank(unitName)){
+ terms.put("unitName", unitName);
+ }
+ // 部门编号
+ String deptId = request.getParameter("deptId");
+ if (StringUtils.isNotBlank(deptId)){
+ terms.put("deptId", deptId);
+ }
+ // 部门名称
+ String deptName = request.getParameter("deptName");
+ if (StringUtils.isNotBlank(deptName)){
+ terms.put("deptName", deptName);
+ }
+ // 加入方式,1:系统创建(默认),2:自主申请
+ String joinWay = request.getParameter("joinWay");
+ if (StringUtils.isNotBlank(joinWay)){
+ terms.put("joinWay", joinWay);
+ }
+ // 实名认证状态,0:未认证,1:已认证
+ String realStatus = request.getParameter("realStatus");
+ if (StringUtils.isNotBlank(realStatus)){
+ terms.put("realStatus", realStatus);
+ }
+ // 用户状态,1:有效(默认),2:停用,99:离职
+ String status = request.getParameter("status");
+ if (StringUtils.isNotBlank(status)){
+ terms.put("status", status);
+ }
+ // 调解专长,多个用,隔开
+ String goodField = request.getParameter("goodField");
+ if (StringUtils.isNotBlank(goodField)){
+ terms.put("goodField", goodField);
+ }
+ // 调解专长名称,多个用,隔开
+ String goodFieldName = request.getParameter("goodFieldName");
+ if (StringUtils.isNotBlank(goodFieldName)){
+ terms.put("goodFieldName", goodFieldName);
+ }
+ // 调解范围,多个用,隔开
+ String canField = request.getParameter("canField");
+ if (StringUtils.isNotBlank(canField)){
+ terms.put("canField", canField);
+ }
+ // 调解范围名称,多个用,隔开
+ String canFieldName = request.getParameter("canFieldName");
+ if (StringUtils.isNotBlank(canFieldName)){
+ terms.put("canFieldName", canFieldName);
+ }
+ // 是否可以找他调(小程序),0:否,1:是
+ String findStatus = request.getParameter("findStatus");
+ if (StringUtils.isNotBlank(findStatus)){
+ terms.put("findStatus", findStatus);
+ }
+ // 是否参与自动调度,0:否,1:是
+ String dispStatus = request.getParameter("dispStatus");
+ if (StringUtils.isNotBlank(dispStatus)){
+ terms.put("dispStatus", dispStatus);
+ }
+ // 删除状态,0:已删除(默认),1:未删除
+ String deleteStatus = request.getParameter("deleteStatus");
+ if (StringUtils.isNotBlank(deleteStatus)){
+ terms.put("deleteStatus", deleteStatus);
+ }
+ // 所属客户编号
+ String custId = request.getParameter("custId");
+ if (StringUtils.isNotBlank(custId)){
+ terms.put("custId", custId);
+ }
+ // 创建时间区间
+ String createStart = request.getParameter("createStart");
+ String createEnd = request.getParameter("createEnd");
+ if(StringUtils.isNotBlank(createStart) && StringUtils.isNotBlank(createEnd)) {
+ terms.put("createStart", createStart);
+ terms.put("createEnd", createEnd);
+ }
+ // 更新时间区间
+ String updateStart = request.getParameter("updateStart");
+ String updateEnd = request.getParameter("updateEnd");
+ if(StringUtils.isNotBlank(updateStart) && StringUtils.isNotBlank(updateEnd)) {
+ terms.put("updateStart", updateStart);
+ terms.put("updateEnd", updateEnd);
+ }
+ return terms;
+ }
+
+ /**
+ * 条件查询多个
+ * @url {ctx}/api/web/ctUser/listQuery
+ * @return Object
+ */
+ @GetMapping("/listQuery")
+ public Object listQuery() {
+ try {
+ Map<String, Object> terms = getParameter();
+ return ReturnSucUtils.getRepInfo(service.listTerms(terms));
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+ /**
+ * 条件分页查询
+ * @url {ctx}/api/web/ctUser/pageQuery
+ * @param page 页码
+ * @param size 每页数量
+ * @return Object
+ */
+ @GetMapping("/pageQuery")
+ public Object pageQuery(@RequestParam(value = "page") int page, @RequestParam(value = "size") int size) {
+ try {
+ Map<String, Object> terms = getParameter();
+ Sort sort = Sort.by(Sort.Direction.DESC, "create_time");
+ PageRequest pageRequest = PageRequest.of(page-1, size, sort);
+ Page<CtUser> ctUserPage = service.pageQuery(pageRequest, terms);
+ return ReturnSucUtils.getRepInfo( "处理成功", ctUserPage);
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+ /**
+ * 根据编号查询单个
+ * @url {ctx}/api/web/ctUser/getById
+ * @param id 主键编号
+ * @return Object
+ */
+ @GetMapping("/getById")
+ public Object getById(@RequestParam(value = "id") String id) {
+ try {
+ return ReturnSucUtils.getRepInfo(service.getById(id));
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+ /**
+ * 根据主键单个/批量删除
+ * @url {ctx}/api/web/ctUser/deleteByIds
+ * @param ids 主键编号
+ * @return Object
+ */
+ @GetMapping("/deleteByIds")
+ public Object deleteByIds(@RequestParam(value = "ids") String ids) {
+ try {
+ if (ids.indexOf(",") != -1) {
+ service.removeByIds(Stream.of(ids.split(",")).collect(Collectors.toList()));
+ }else{
+ service.removeById(ids);
+ }
+ return ReturnSucUtils.getRepInfo();
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+ /**
+ * 新增或更新对象
+ * @url {ctx}/api/web/ctUser/saveCtUser
+ * @param ctUser 实体对象
+ * @return Object
+ */
+ @PostMapping("/saveCtUser")
+ public Object saveCtUser(@RequestBody CtUser ctUser) {
+ try {
+ service.saveCtUser(ctUser);
+ return ReturnSucUtils.getRepInfo();
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/controller/web/CtUseroleWebController.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/controller/web/CtUseroleWebController.java
new file mode 100644
index 0000000..73f2116
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/controller/web/CtUseroleWebController.java
@@ -0,0 +1,179 @@
+package cn.huge.module.ctuser.controller;
+
+import cn.huge.base.common.utils.ReturnFailUtils;
+import cn.huge.base.common.utils.ReturnSucUtils;
+import cn.huge.module.ctuser.domain.po.CtUserole;
+import cn.huge.module.ctuser.service.CtUseroleService;
+import com.google.common.collect.Maps;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.data.domain.Sort;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.Map;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+/**
+ * @title: 客户用户角色表接口api
+ * @description: 客户用户角色表接口api
+ * @company: hugeinfo
+ * @author: liyj
+ * @time: 2024-08-17 15:30:57
+ * @version: 1.0.0
+ */
+@Slf4j
+@RestController
+@RequestMapping("/api/web/ctUserole")
+public class CtUseroleWebController {
+
+ @Autowired(required = false)
+ private HttpServletRequest request;
+
+ @Autowired
+ private CtUseroleService service;
+
+ /**
+ * 获取请求URL参数
+ * @return Map<String, Object>
+ */
+ private Map<String, Object> getParameter(){
+ Map<String, Object> terms = Maps.newHashMap();
+ // 用户角色编号
+ String id = request.getParameter("id");
+ if (StringUtils.isNotBlank(id)){
+ terms.put("id", id);
+ }
+ // 用户编号
+ String userId = request.getParameter("userId");
+ if (StringUtils.isNotBlank(userId)){
+ terms.put("userId", userId);
+ }
+ // 角色编号
+ String roleId = request.getParameter("roleId");
+ if (StringUtils.isNotBlank(roleId)){
+ terms.put("roleId", roleId);
+ }
+ // 角色代码
+ String roleCode = request.getParameter("roleCode");
+ if (StringUtils.isNotBlank(roleCode)){
+ terms.put("roleCode", roleCode);
+ }
+ // 角色名称
+ String roleName = request.getParameter("roleName");
+ if (StringUtils.isNotBlank(roleName)){
+ terms.put("roleName", roleName);
+ }
+ // 顾客编号
+ String custId = request.getParameter("custId");
+ if (StringUtils.isNotBlank(custId)){
+ terms.put("custId", custId);
+ }
+ // 创建时间区间
+ String createStart = request.getParameter("createStart");
+ String createEnd = request.getParameter("createEnd");
+ if(StringUtils.isNotBlank(createStart) && StringUtils.isNotBlank(createEnd)) {
+ terms.put("createStart", createStart);
+ terms.put("createEnd", createEnd);
+ }
+ // 更新时间区间
+ String updateStart = request.getParameter("updateStart");
+ String updateEnd = request.getParameter("updateEnd");
+ if(StringUtils.isNotBlank(updateStart) && StringUtils.isNotBlank(updateEnd)) {
+ terms.put("updateStart", updateStart);
+ terms.put("updateEnd", updateEnd);
+ }
+ return terms;
+ }
+
+ /**
+ * 条件查询多个
+ * @url {ctx}/api/web/ctUserole/listQuery
+ * @return Object
+ */
+ @GetMapping("/listQuery")
+ public Object listQuery() {
+ try {
+ Map<String, Object> terms = getParameter();
+ return ReturnSucUtils.getRepInfo(service.listTerms(terms));
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+ /**
+ * 条件分页查询
+ * @url {ctx}/api/web/ctUserole/pageQuery
+ * @param page 页码
+ * @param size 每页数量
+ * @return Object
+ */
+ @GetMapping("/pageQuery")
+ public Object pageQuery(@RequestParam(value = "page") int page, @RequestParam(value = "size") int size) {
+ try {
+ Map<String, Object> terms = getParameter();
+ Sort sort = Sort.by(Sort.Direction.DESC, "create_time");
+ PageRequest pageRequest = PageRequest.of(page-1, size, sort);
+ Page<CtUserole> ctUserolePage = service.pageQuery(pageRequest, terms);
+ return ReturnSucUtils.getRepInfo( "处理成功", ctUserolePage);
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+ /**
+ * 根据编号查询单个
+ * @url {ctx}/api/web/ctUserole/getById
+ * @param id 主键编号
+ * @return Object
+ */
+ @GetMapping("/getById")
+ public Object getById(@RequestParam(value = "id") String id) {
+ try {
+ return ReturnSucUtils.getRepInfo(service.getById(id));
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+ /**
+ * 根据主键单个/批量删除
+ * @url {ctx}/api/web/ctUserole/deleteByIds
+ * @param ids 主键编号
+ * @return Object
+ */
+ @GetMapping("/deleteByIds")
+ public Object deleteByIds(@RequestParam(value = "ids") String ids) {
+ try {
+ if (ids.indexOf(",") != -1) {
+ service.removeByIds(Stream.of(ids.split(",")).collect(Collectors.toList()));
+ }else{
+ service.removeById(ids);
+ }
+ return ReturnSucUtils.getRepInfo();
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+ /**
+ * 新增或更新对象
+ * @url {ctx}/api/web/ctUserole/saveCtUserole
+ * @param ctUserole 实体对象
+ * @return Object
+ */
+ @PostMapping("/saveCtUserole")
+ public Object saveCtUserole(@RequestBody CtUserole ctUserole) {
+ try {
+ service.saveCtUserole(ctUserole);
+ return ReturnSucUtils.getRepInfo();
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/CtAccountMapper.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/CtAccountMapper.java
new file mode 100644
index 0000000..1019962
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/CtAccountMapper.java
@@ -0,0 +1,64 @@
+package cn.huge.module.ctuser.dao.mapper;
+
+import cn.huge.module.ctuser.domain.po.CtAccount;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+* @title: 客户用户账号表持久层业务处理
+* @Description 此处仅涉及复杂SQL操作,务必不要在此再次写单表的CRUD操作,因为mybatisPlus已经实现。
+* @company: hugeinfo
+* @author: liyj
+* @time: 2024-08-17 15:30:56
+* @version 1.0.0
+*/
+@Repository
+public interface CtAccountMapper extends BaseMapper<CtAccount>{
+
+ /**
+ * 更新对象
+ * @param entity 对象
+ */
+ void updateCtAccount(@Param("entity") CtAccount entity);
+
+ /**
+ * 条件更新对象
+ * @param entity 对象
+ * @param terms 条件
+ */
+ void updateCtAccountTerms(@Param("entity") CtAccount entity, @Param("terms") Map<String, Object> terms);
+
+ /**
+ * 根据编号物理删除
+ * @param id 查询条件集合
+ */
+ void deleteCtAccount(@Param("id") String id);
+
+ /**
+ * 按条件查询结果集
+ * @param terms 查询条件集合
+ * @return List<CtAccount>
+ */
+ List<CtAccount> listTerms(@Param("terms") Map<String, Object> terms);
+
+ /**
+ * 按条件查询实体总数
+ * @param terms 查询条件集合
+ * @return long
+ */
+ long countTerms(@Param("terms") Map<String, Object> terms);
+
+ /**
+ * 按条件查询实体分页结果集
+ * @param page 分页对象
+ * @param terms 查询条件集合
+ * @return List<CtAccount>
+ */
+ List<CtAccount> pageTerms(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms);
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/CtDeptMapper.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/CtDeptMapper.java
new file mode 100644
index 0000000..35a2080
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/CtDeptMapper.java
@@ -0,0 +1,64 @@
+package cn.huge.module.ctuser.dao.mapper;
+
+import cn.huge.module.ctuser.domain.po.CtDept;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+* @title: 客户部门表持久层业务处理
+* @Description 此处仅涉及复杂SQL操作,务必不要在此再次写单表的CRUD操作,因为mybatisPlus已经实现。
+* @company: hugeinfo
+* @author: liyj
+* @time: 2024-08-17 15:30:57
+* @version 1.0.0
+*/
+@Repository
+public interface CtDeptMapper extends BaseMapper<CtDept>{
+
+ /**
+ * 更新对象
+ * @param entity 对象
+ */
+ void updateCtDept(@Param("entity") CtDept entity);
+
+ /**
+ * 条件更新对象
+ * @param entity 对象
+ * @param terms 条件
+ */
+ void updateCtDeptTerms(@Param("entity") CtDept entity, @Param("terms") Map<String, Object> terms);
+
+ /**
+ * 根据编号物理删除
+ * @param id 查询条件集合
+ */
+ void deleteCtDept(@Param("id") String id);
+
+ /**
+ * 按条件查询结果集
+ * @param terms 查询条件集合
+ * @return List<CtDept>
+ */
+ List<CtDept> listTerms(@Param("terms") Map<String, Object> terms);
+
+ /**
+ * 按条件查询实体总数
+ * @param terms 查询条件集合
+ * @return long
+ */
+ long countTerms(@Param("terms") Map<String, Object> terms);
+
+ /**
+ * 按条件查询实体分页结果集
+ * @param page 分页对象
+ * @param terms 查询条件集合
+ * @return List<CtDept>
+ */
+ List<CtDept> pageTerms(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms);
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/CtPostMapper.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/CtPostMapper.java
new file mode 100644
index 0000000..4863e8b
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/CtPostMapper.java
@@ -0,0 +1,64 @@
+package cn.huge.module.ctuser.dao.mapper;
+
+import cn.huge.module.ctuser.domain.po.CtPost;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+* @title: 客户岗位表持久层业务处理
+* @Description 此处仅涉及复杂SQL操作,务必不要在此再次写单表的CRUD操作,因为mybatisPlus已经实现。
+* @company: hugeinfo
+* @author: liyj
+* @time: 2024-08-17 15:30:57
+* @version 1.0.0
+*/
+@Repository
+public interface CtPostMapper extends BaseMapper<CtPost>{
+
+ /**
+ * 更新对象
+ * @param entity 对象
+ */
+ void updateCtPost(@Param("entity") CtPost entity);
+
+ /**
+ * 条件更新对象
+ * @param entity 对象
+ * @param terms 条件
+ */
+ void updateCtPostTerms(@Param("entity") CtPost entity, @Param("terms") Map<String, Object> terms);
+
+ /**
+ * 根据编号物理删除
+ * @param id 查询条件集合
+ */
+ void deleteCtPost(@Param("id") String id);
+
+ /**
+ * 按条件查询结果集
+ * @param terms 查询条件集合
+ * @return List<CtPost>
+ */
+ List<CtPost> listTerms(@Param("terms") Map<String, Object> terms);
+
+ /**
+ * 按条件查询实体总数
+ * @param terms 查询条件集合
+ * @return long
+ */
+ long countTerms(@Param("terms") Map<String, Object> terms);
+
+ /**
+ * 按条件查询实体分页结果集
+ * @param page 分页对象
+ * @param terms 查询条件集合
+ * @return List<CtPost>
+ */
+ List<CtPost> pageTerms(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms);
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/CtUnitMapper.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/CtUnitMapper.java
new file mode 100644
index 0000000..c4fa7f2
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/CtUnitMapper.java
@@ -0,0 +1,64 @@
+package cn.huge.module.ctuser.dao.mapper;
+
+import cn.huge.module.ctuser.domain.po.CtUnit;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+* @title: 客户组织信息表持久层业务处理
+* @Description 此处仅涉及复杂SQL操作,务必不要在此再次写单表的CRUD操作,因为mybatisPlus已经实现。
+* @company: hugeinfo
+* @author: liyj
+* @time: 2024-08-17 15:30:57
+* @version 1.0.0
+*/
+@Repository
+public interface CtUnitMapper extends BaseMapper<CtUnit>{
+
+ /**
+ * 更新对象
+ * @param entity 对象
+ */
+ void updateCtUnit(@Param("entity") CtUnit entity);
+
+ /**
+ * 条件更新对象
+ * @param entity 对象
+ * @param terms 条件
+ */
+ void updateCtUnitTerms(@Param("entity") CtUnit entity, @Param("terms") Map<String, Object> terms);
+
+ /**
+ * 根据编号物理删除
+ * @param id 查询条件集合
+ */
+ void deleteCtUnit(@Param("id") String id);
+
+ /**
+ * 按条件查询结果集
+ * @param terms 查询条件集合
+ * @return List<CtUnit>
+ */
+ List<CtUnit> listTerms(@Param("terms") Map<String, Object> terms);
+
+ /**
+ * 按条件查询实体总数
+ * @param terms 查询条件集合
+ * @return long
+ */
+ long countTerms(@Param("terms") Map<String, Object> terms);
+
+ /**
+ * 按条件查询实体分页结果集
+ * @param page 分页对象
+ * @param terms 查询条件集合
+ * @return List<CtUnit>
+ */
+ List<CtUnit> pageTerms(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms);
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/CtUsepostMapper.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/CtUsepostMapper.java
new file mode 100644
index 0000000..aec5ddb
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/CtUsepostMapper.java
@@ -0,0 +1,64 @@
+package cn.huge.module.ctuser.dao.mapper;
+
+import cn.huge.module.ctuser.domain.po.CtUsepost;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+* @title: 客户用户配岗表持久层业务处理
+* @Description 此处仅涉及复杂SQL操作,务必不要在此再次写单表的CRUD操作,因为mybatisPlus已经实现。
+* @company: hugeinfo
+* @author: liyj
+* @time: 2024-08-17 15:30:57
+* @version 1.0.0
+*/
+@Repository
+public interface CtUsepostMapper extends BaseMapper<CtUsepost>{
+
+ /**
+ * 更新对象
+ * @param entity 对象
+ */
+ void updateCtUsepost(@Param("entity") CtUsepost entity);
+
+ /**
+ * 条件更新对象
+ * @param entity 对象
+ * @param terms 条件
+ */
+ void updateCtUsepostTerms(@Param("entity") CtUsepost entity, @Param("terms") Map<String, Object> terms);
+
+ /**
+ * 根据编号物理删除
+ * @param id 查询条件集合
+ */
+ void deleteCtUsepost(@Param("id") String id);
+
+ /**
+ * 按条件查询结果集
+ * @param terms 查询条件集合
+ * @return List<CtUsepost>
+ */
+ List<CtUsepost> listTerms(@Param("terms") Map<String, Object> terms);
+
+ /**
+ * 按条件查询实体总数
+ * @param terms 查询条件集合
+ * @return long
+ */
+ long countTerms(@Param("terms") Map<String, Object> terms);
+
+ /**
+ * 按条件查询实体分页结果集
+ * @param page 分页对象
+ * @param terms 查询条件集合
+ * @return List<CtUsepost>
+ */
+ List<CtUsepost> pageTerms(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms);
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/CtUserMapper.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/CtUserMapper.java
new file mode 100644
index 0000000..798702a
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/CtUserMapper.java
@@ -0,0 +1,64 @@
+package cn.huge.module.ctuser.dao.mapper;
+
+import cn.huge.module.ctuser.domain.po.CtUser;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+* @title: 客户用户表持久层业务处理
+* @Description 此处仅涉及复杂SQL操作,务必不要在此再次写单表的CRUD操作,因为mybatisPlus已经实现。
+* @company: hugeinfo
+* @author: liyj
+* @time: 2024-08-17 15:30:57
+* @version 1.0.0
+*/
+@Repository
+public interface CtUserMapper extends BaseMapper<CtUser>{
+
+ /**
+ * 更新对象
+ * @param entity 对象
+ */
+ void updateCtUser(@Param("entity") CtUser entity);
+
+ /**
+ * 条件更新对象
+ * @param entity 对象
+ * @param terms 条件
+ */
+ void updateCtUserTerms(@Param("entity") CtUser entity, @Param("terms") Map<String, Object> terms);
+
+ /**
+ * 根据编号物理删除
+ * @param id 查询条件集合
+ */
+ void deleteCtUser(@Param("id") String id);
+
+ /**
+ * 按条件查询结果集
+ * @param terms 查询条件集合
+ * @return List<CtUser>
+ */
+ List<CtUser> listTerms(@Param("terms") Map<String, Object> terms);
+
+ /**
+ * 按条件查询实体总数
+ * @param terms 查询条件集合
+ * @return long
+ */
+ long countTerms(@Param("terms") Map<String, Object> terms);
+
+ /**
+ * 按条件查询实体分页结果集
+ * @param page 分页对象
+ * @param terms 查询条件集合
+ * @return List<CtUser>
+ */
+ List<CtUser> pageTerms(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms);
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/CtUseroleMapper.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/CtUseroleMapper.java
new file mode 100644
index 0000000..0c95871
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/CtUseroleMapper.java
@@ -0,0 +1,64 @@
+package cn.huge.module.ctuser.dao.mapper;
+
+import cn.huge.module.ctuser.domain.po.CtUserole;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+* @title: 客户用户角色表持久层业务处理
+* @Description 此处仅涉及复杂SQL操作,务必不要在此再次写单表的CRUD操作,因为mybatisPlus已经实现。
+* @company: hugeinfo
+* @author: liyj
+* @time: 2024-08-17 15:30:57
+* @version 1.0.0
+*/
+@Repository
+public interface CtUseroleMapper extends BaseMapper<CtUserole>{
+
+ /**
+ * 更新对象
+ * @param entity 对象
+ */
+ void updateCtUserole(@Param("entity") CtUserole entity);
+
+ /**
+ * 条件更新对象
+ * @param entity 对象
+ * @param terms 条件
+ */
+ void updateCtUseroleTerms(@Param("entity") CtUserole entity, @Param("terms") Map<String, Object> terms);
+
+ /**
+ * 根据编号物理删除
+ * @param id 查询条件集合
+ */
+ void deleteCtUserole(@Param("id") String id);
+
+ /**
+ * 按条件查询结果集
+ * @param terms 查询条件集合
+ * @return List<CtUserole>
+ */
+ List<CtUserole> listTerms(@Param("terms") Map<String, Object> terms);
+
+ /**
+ * 按条件查询实体总数
+ * @param terms 查询条件集合
+ * @return long
+ */
+ long countTerms(@Param("terms") Map<String, Object> terms);
+
+ /**
+ * 按条件查询实体分页结果集
+ * @param page 分页对象
+ * @param terms 查询条件集合
+ * @return List<CtUserole>
+ */
+ List<CtUserole> pageTerms(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms);
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/xml/CtAccountMapper.xml b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/xml/CtAccountMapper.xml
new file mode 100644
index 0000000..2fddfe3
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/xml/CtAccountMapper.xml
@@ -0,0 +1,178 @@
+<?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">
+<!--
+ * @title: 客户用户账号表
+ * @description: 自定义sql,请自行实现业务逻辑
+ * @company: hugeinfo
+ * @author: liyj
+ * @time:2024-08-17 15:30:56
+ * @version 1.0.0
+-->
+<mapper namespace="cn.huge.module.ctuser.dao.mapper.CtAccountMapper">
+ <!-- 结果集 -->
+ <resultMap id="dataResult" type="cn.huge.module.ctuser.domain.po.CtAccount">
+ <result property="id" column="id"/>
+ <result property="userId" column="user_id"/>
+ <result property="accType" column="acc_type"/>
+ <result property="acc" column="acc"/>
+ <result property="cipher" column="cipher"/>
+ <result property="cipherOpen" column="cipher_open"/>
+ <result property="cipherTime" column="cipher_time"/>
+ <result property="loginTime" column="login_time"/>
+ <result property="limitTime" column="limit_time"/>
+ <result property="deleteStatus" column="delete_status"/>
+ <result property="custId" column="cust_id"/>
+ <result property="createTime" column="create_time"/>
+ <result property="updateTime" column="update_time"/>
+ </resultMap>
+ <!-- 表 -->
+ <sql id='table-name'>dyh_ct_account</sql>
+ <!-- 字段 -->
+ <sql id="column-part">
+ id,
+ user_id,
+ acc_type,
+ acc,
+ cipher,
+ cipher_open,
+ cipher_time,
+ login_time,
+ limit_time,
+ delete_status,
+ cust_id,
+ create_time,
+ update_time
+ </sql>
+ <!-- 更新实体字段 -->
+ <sql id="set-part">
+ <if test="entity.userId != null">user_id = #{entity.userId},</if>
+ <if test="entity.accType != null">acc_type = #{entity.accType},</if>
+ <if test="entity.acc != null">acc = #{entity.acc},</if>
+ <if test="entity.cipher != null">cipher = #{entity.cipher},</if>
+ <if test="entity.cipherOpen != null">cipher_open = #{entity.cipherOpen},</if>
+ <if test="entity.cipherTime != null">cipher_time = #{entity.cipherTime},</if>
+ <if test="entity.loginTime != null">login_time = #{entity.loginTime},</if>
+ <if test="entity.limitTime != null">limit_time = #{entity.limitTime},</if>
+ <if test="entity.deleteStatus != null">delete_status = #{entity.deleteStatus},</if>
+ <if test="entity.custId != null">cust_id = #{entity.custId},</if>
+ <if test="entity.createTime != null">create_time = #{entity.createTime},</if>
+ <if test="entity.updateTime != null">update_time = #{entity.updateTime}</if>
+ </sql>
+ <!-- 条件 -->
+ <sql id="where-part">
+ <if test="terms != null">
+ <where>
+ <if test="terms.id != null and terms.id !=''">
+ and id = #{terms.id}
+ </if>
+ <if test="terms.userId != null and terms.userId !=''">
+ and user_id = #{terms.userId}
+ </if>
+ <if test="terms.accType != null and terms.accType !=''">
+ and acc_type = #{terms.accType}
+ </if>
+ <if test="terms.acc != null and terms.acc !=''">
+ and acc = #{terms.acc}
+ </if>
+ <if test="terms.cipher != null and terms.cipher !=''">
+ and cipher = #{terms.cipher}
+ </if>
+ <if test="terms.cipherOpen != null and terms.cipherOpen !=''">
+ and cipher_open = #{terms.cipherOpen}
+ </if>
+ <if test="terms.cipherTime != null and terms.cipherTime !=''">
+ and cipher_time = #{terms.cipherTime}
+ </if>
+ <if test="terms.loginTime != null and terms.loginTime !=''">
+ and login_time = #{terms.loginTime}
+ </if>
+ <if test="terms.limitTime != null and terms.limitTime !=''">
+ and limit_time = #{terms.limitTime}
+ </if>
+ <if test="terms.deleteStatus = null and terms.deleteStatus =''">
+ and delete_status = '1'
+ </if>
+ <if test="terms.deleteStatus != null and terms.deleteStatus !=''">
+ and delete_status = #{terms.deleteStatus}
+ </if>
+ <if test="terms.custId != null and terms.custId !=''">
+ and cust_id = #{terms.custId}
+ </if>
+ <if test="terms.createTime != null and terms.createTime !=''">
+ and DATE_FORMAT(create_time,'%Y-%m-%d') = #{terms.createTime}
+ </if>
+ <if test="terms.createStart != null and terms.createStart !='' and terms.createEnd != null and terms.createEnd !=''">
+ and (DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.createStart}
+ and DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.createEnd})
+ </if>
+ <if test="terms.updateTime != null and terms.updateTime !=''">
+ and DATE_FORMAT(update_time,'%Y-%m-%d') = #{terms.updateTime}
+ </if>
+ <if test="terms.updateStart != null and terms.updateStart !='' and terms.updateEnd != null and terms.updateEnd !=''">
+ and (DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.updateStart}
+ and DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.updateEnd})
+ </if>
+ </where>
+ </if>
+ </sql>
+ <!-- 更新对象 -->
+ <update id="updateCtAccount">
+ update
+ <include refid="table-name"/>
+ <set>
+ <include refid="set-part"/>
+ </set>
+ <where>
+ id = #{entity.id}
+ </where>
+ </update>
+ <!-- 条件更新对象 -->
+ <update id="updateCtAccountTerms">
+ update
+ <include refid="table-name"/>
+ <set>
+ <include refid="set-part"/>
+ </set>
+ <include refid="where-part"/>
+ </update>
+ <!-- 根据编号物理删除 -->
+ <delete id="deleteCtAccount">
+ delete from
+ <include refid="table-name" />
+ where id = #{id}
+ </delete>
+ <!-- 根据条件查询 -->
+ <select id="listTerms" resultMap="dataResult">
+ select
+ <include refid="column-part"/>
+ from
+ <include refid="table-name" />
+ <include refid="where-part"/>
+ </select>
+ <!-- 根据条件统计 -->
+ <select id="countTerms" resultType="java.lang.Long">
+ select
+ COUNT(1)
+ from
+ <include refid="table-name" />
+ <include refid="where-part"/>
+ </select>
+ <!-- 根据条件分页查询 -->
+ <select id="pageTerms" resultMap="dataResult">
+ SELECT
+ <include refid="column-part"/>
+ FROM
+ <include refid="table-name" />
+ <include refid="where-part"/>
+ <if test="page.sort != null">
+ <foreach collection="page.sort" item="s" index="index" separator="," open="order by ">
+ isnull(${s.property}), ${s.property} ${s.direction}
+ </foreach>
+ </if>
+ <if test="page.sort == null">
+ order by isnull(create_time), create_time desc
+ </if>
+ limit #{page.offset}, #{page.size}
+ </select>
+
+</mapper>
\ No newline at end of file
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/xml/CtDeptMapper.xml b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/xml/CtDeptMapper.xml
new file mode 100644
index 0000000..1ec581e
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/xml/CtDeptMapper.xml
@@ -0,0 +1,184 @@
+<?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">
+<!--
+ * @title: 客户部门表
+ * @description: 自定义sql,请自行实现业务逻辑
+ * @company: hugeinfo
+ * @author: liyj
+ * @time:2024-08-17 15:30:57
+ * @version 1.0.0
+-->
+<mapper namespace="cn.huge.module.ctuser.dao.mapper.CtDeptMapper">
+ <!-- 结果集 -->
+ <resultMap id="dataResult" type="cn.huge.module.ctuser.domain.po.CtDept">
+ <result property="id" column="id"/>
+ <result property="level" column="level"/>
+ <result property="parentId" column="parent_id"/>
+ <result property="name" column="name"/>
+ <result property="des" column="des"/>
+ <result property="unitId" column="unit_id"/>
+ <result property="goodField" column="good_field"/>
+ <result property="goodFieldName" column="good_field_name"/>
+ <result property="canField" column="can_field"/>
+ <result property="canFieldName" column="can_field_name"/>
+ <result property="deleteStatus" column="delete_status"/>
+ <result property="custId" column="cust_id"/>
+ <result property="createTime" column="create_time"/>
+ <result property="updateTime" column="update_time"/>
+ </resultMap>
+ <!-- 表 -->
+ <sql id='table-name'>dyh_ct_dept</sql>
+ <!-- 字段 -->
+ <sql id="column-part">
+ id,
+ level,
+ parent_id,
+ name,
+ des,
+ unit_id,
+ good_field,
+ good_field_name,
+ can_field,
+ can_field_name,
+ delete_status,
+ cust_id,
+ create_time,
+ update_time
+ </sql>
+ <!-- 更新实体字段 -->
+ <sql id="set-part">
+ <if test="entity.level != null">level = #{entity.level},</if>
+ <if test="entity.parentId != null">parent_id = #{entity.parentId},</if>
+ <if test="entity.name != null">name = #{entity.name},</if>
+ <if test="entity.des != null">des = #{entity.des},</if>
+ <if test="entity.unitId != null">unit_id = #{entity.unitId},</if>
+ <if test="entity.goodField != null">good_field = #{entity.goodField},</if>
+ <if test="entity.goodFieldName != null">good_field_name = #{entity.goodFieldName},</if>
+ <if test="entity.canField != null">can_field = #{entity.canField},</if>
+ <if test="entity.canFieldName != null">can_field_name = #{entity.canFieldName},</if>
+ <if test="entity.deleteStatus != null">delete_status = #{entity.deleteStatus},</if>
+ <if test="entity.custId != null">cust_id = #{entity.custId},</if>
+ <if test="entity.createTime != null">create_time = #{entity.createTime},</if>
+ <if test="entity.updateTime != null">update_time = #{entity.updateTime}</if>
+ </sql>
+ <!-- 条件 -->
+ <sql id="where-part">
+ <if test="terms != null">
+ <where>
+ <if test="terms.id != null and terms.id !=''">
+ and id = #{terms.id}
+ </if>
+ <if test="terms.level != null and terms.level !=''">
+ and level = #{terms.level}
+ </if>
+ <if test="terms.parentId != null and terms.parentId !=''">
+ and parent_id = #{terms.parentId}
+ </if>
+ <if test="terms.name != null and terms.name !=''">
+ and name = #{terms.name}
+ </if>
+ <if test="terms.des != null and terms.des !=''">
+ and des = #{terms.des}
+ </if>
+ <if test="terms.unitId != null and terms.unitId !=''">
+ and unit_id = #{terms.unitId}
+ </if>
+ <if test="terms.goodField != null and terms.goodField !=''">
+ and good_field = #{terms.goodField}
+ </if>
+ <if test="terms.goodFieldName != null and terms.goodFieldName !=''">
+ and good_field_name = #{terms.goodFieldName}
+ </if>
+ <if test="terms.canField != null and terms.canField !=''">
+ and can_field = #{terms.canField}
+ </if>
+ <if test="terms.canFieldName != null and terms.canFieldName !=''">
+ and can_field_name = #{terms.canFieldName}
+ </if>
+ <if test="terms.deleteStatus = null and terms.deleteStatus =''">
+ and delete_status = '1'
+ </if>
+ <if test="terms.deleteStatus != null and terms.deleteStatus !=''">
+ and delete_status = #{terms.deleteStatus}
+ </if>
+ <if test="terms.custId != null and terms.custId !=''">
+ and cust_id = #{terms.custId}
+ </if>
+ <if test="terms.createTime != null and terms.createTime !=''">
+ and DATE_FORMAT(create_time,'%Y-%m-%d') = #{terms.createTime}
+ </if>
+ <if test="terms.createStart != null and terms.createStart !='' and terms.createEnd != null and terms.createEnd !=''">
+ and (DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.createStart}
+ and DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.createEnd})
+ </if>
+ <if test="terms.updateTime != null and terms.updateTime !=''">
+ and DATE_FORMAT(update_time,'%Y-%m-%d') = #{terms.updateTime}
+ </if>
+ <if test="terms.updateStart != null and terms.updateStart !='' and terms.updateEnd != null and terms.updateEnd !=''">
+ and (DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.updateStart}
+ and DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.updateEnd})
+ </if>
+ </where>
+ </if>
+ </sql>
+ <!-- 更新对象 -->
+ <update id="updateCtDept">
+ update
+ <include refid="table-name"/>
+ <set>
+ <include refid="set-part"/>
+ </set>
+ <where>
+ id = #{entity.id}
+ </where>
+ </update>
+ <!-- 条件更新对象 -->
+ <update id="updateCtDeptTerms">
+ update
+ <include refid="table-name"/>
+ <set>
+ <include refid="set-part"/>
+ </set>
+ <include refid="where-part"/>
+ </update>
+ <!-- 根据编号物理删除 -->
+ <delete id="deleteCtDept">
+ delete from
+ <include refid="table-name" />
+ where id = #{id}
+ </delete>
+ <!-- 根据条件查询 -->
+ <select id="listTerms" resultMap="dataResult">
+ select
+ <include refid="column-part"/>
+ from
+ <include refid="table-name" />
+ <include refid="where-part"/>
+ </select>
+ <!-- 根据条件统计 -->
+ <select id="countTerms" resultType="java.lang.Long">
+ select
+ COUNT(1)
+ from
+ <include refid="table-name" />
+ <include refid="where-part"/>
+ </select>
+ <!-- 根据条件分页查询 -->
+ <select id="pageTerms" resultMap="dataResult">
+ SELECT
+ <include refid="column-part"/>
+ FROM
+ <include refid="table-name" />
+ <include refid="where-part"/>
+ <if test="page.sort != null">
+ <foreach collection="page.sort" item="s" index="index" separator="," open="order by ">
+ isnull(${s.property}), ${s.property} ${s.direction}
+ </foreach>
+ </if>
+ <if test="page.sort == null">
+ order by isnull(create_time), create_time desc
+ </if>
+ limit #{page.offset}, #{page.size}
+ </select>
+
+</mapper>
\ No newline at end of file
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/xml/CtPostMapper.xml b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/xml/CtPostMapper.xml
new file mode 100644
index 0000000..51a77f8
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/xml/CtPostMapper.xml
@@ -0,0 +1,148 @@
+<?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">
+<!--
+ * @title: 客户岗位表
+ * @description: 自定义sql,请自行实现业务逻辑
+ * @company: hugeinfo
+ * @author: liyj
+ * @time:2024-08-17 15:30:57
+ * @version 1.0.0
+-->
+<mapper namespace="cn.huge.module.ctuser.dao.mapper.CtPostMapper">
+ <!-- 结果集 -->
+ <resultMap id="dataResult" type="cn.huge.module.ctuser.domain.po.CtPost">
+ <result property="id" column="id"/>
+ <result property="name" column="name"/>
+ <result property="des" column="des"/>
+ <result property="unitId" column="unit_id"/>
+ <result property="deleteStatus" column="delete_status"/>
+ <result property="custId" column="cust_id"/>
+ <result property="createTime" column="create_time"/>
+ <result property="updateTime" column="update_time"/>
+ </resultMap>
+ <!-- 表 -->
+ <sql id='table-name'>dyh_ct_post</sql>
+ <!-- 字段 -->
+ <sql id="column-part">
+ id,
+ name,
+ des,
+ unit_id,
+ delete_status,
+ cust_id,
+ create_time,
+ update_time
+ </sql>
+ <!-- 更新实体字段 -->
+ <sql id="set-part">
+ <if test="entity.name != null">name = #{entity.name},</if>
+ <if test="entity.des != null">des = #{entity.des},</if>
+ <if test="entity.unitId != null">unit_id = #{entity.unitId},</if>
+ <if test="entity.deleteStatus != null">delete_status = #{entity.deleteStatus},</if>
+ <if test="entity.custId != null">cust_id = #{entity.custId},</if>
+ <if test="entity.createTime != null">create_time = #{entity.createTime},</if>
+ <if test="entity.updateTime != null">update_time = #{entity.updateTime}</if>
+ </sql>
+ <!-- 条件 -->
+ <sql id="where-part">
+ <if test="terms != null">
+ <where>
+ <if test="terms.id != null and terms.id !=''">
+ and id = #{terms.id}
+ </if>
+ <if test="terms.name != null and terms.name !=''">
+ and name = #{terms.name}
+ </if>
+ <if test="terms.des != null and terms.des !=''">
+ and des = #{terms.des}
+ </if>
+ <if test="terms.unitId != null and terms.unitId !=''">
+ and unit_id = #{terms.unitId}
+ </if>
+ <if test="terms.deleteStatus = null and terms.deleteStatus =''">
+ and delete_status = '1'
+ </if>
+ <if test="terms.deleteStatus != null and terms.deleteStatus !=''">
+ and delete_status = #{terms.deleteStatus}
+ </if>
+ <if test="terms.custId != null and terms.custId !=''">
+ and cust_id = #{terms.custId}
+ </if>
+ <if test="terms.createTime != null and terms.createTime !=''">
+ and DATE_FORMAT(create_time,'%Y-%m-%d') = #{terms.createTime}
+ </if>
+ <if test="terms.createStart != null and terms.createStart !='' and terms.createEnd != null and terms.createEnd !=''">
+ and (DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.createStart}
+ and DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.createEnd})
+ </if>
+ <if test="terms.updateTime != null and terms.updateTime !=''">
+ and DATE_FORMAT(update_time,'%Y-%m-%d') = #{terms.updateTime}
+ </if>
+ <if test="terms.updateStart != null and terms.updateStart !='' and terms.updateEnd != null and terms.updateEnd !=''">
+ and (DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.updateStart}
+ and DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.updateEnd})
+ </if>
+ </where>
+ </if>
+ </sql>
+ <!-- 更新对象 -->
+ <update id="updateCtPost">
+ update
+ <include refid="table-name"/>
+ <set>
+ <include refid="set-part"/>
+ </set>
+ <where>
+ id = #{entity.id}
+ </where>
+ </update>
+ <!-- 条件更新对象 -->
+ <update id="updateCtPostTerms">
+ update
+ <include refid="table-name"/>
+ <set>
+ <include refid="set-part"/>
+ </set>
+ <include refid="where-part"/>
+ </update>
+ <!-- 根据编号物理删除 -->
+ <delete id="deleteCtPost">
+ delete from
+ <include refid="table-name" />
+ where id = #{id}
+ </delete>
+ <!-- 根据条件查询 -->
+ <select id="listTerms" resultMap="dataResult">
+ select
+ <include refid="column-part"/>
+ from
+ <include refid="table-name" />
+ <include refid="where-part"/>
+ </select>
+ <!-- 根据条件统计 -->
+ <select id="countTerms" resultType="java.lang.Long">
+ select
+ COUNT(1)
+ from
+ <include refid="table-name" />
+ <include refid="where-part"/>
+ </select>
+ <!-- 根据条件分页查询 -->
+ <select id="pageTerms" resultMap="dataResult">
+ SELECT
+ <include refid="column-part"/>
+ FROM
+ <include refid="table-name" />
+ <include refid="where-part"/>
+ <if test="page.sort != null">
+ <foreach collection="page.sort" item="s" index="index" separator="," open="order by ">
+ isnull(${s.property}), ${s.property} ${s.direction}
+ </foreach>
+ </if>
+ <if test="page.sort == null">
+ order by isnull(create_time), create_time desc
+ </if>
+ limit #{page.offset}, #{page.size}
+ </select>
+
+</mapper>
\ No newline at end of file
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/xml/CtUnitMapper.xml b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/xml/CtUnitMapper.xml
new file mode 100644
index 0000000..e1b5686
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/xml/CtUnitMapper.xml
@@ -0,0 +1,310 @@
+<?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">
+<!--
+ * @title: 客户组织信息表
+ * @description: 自定义sql,请自行实现业务逻辑
+ * @company: hugeinfo
+ * @author: liyj
+ * @time:2024-08-17 15:30:57
+ * @version 1.0.0
+-->
+<mapper namespace="cn.huge.module.ctuser.dao.mapper.CtUnitMapper">
+ <!-- 结果集 -->
+ <resultMap id="dataResult" type="cn.huge.module.ctuser.domain.po.CtUnit">
+ <result property="id" column="id"/>
+ <result property="level" column="level"/>
+ <result property="parentId" column="parent_id"/>
+ <result property="unitGrade" column="unit_grade"/>
+ <result property="unitName" column="unit_name"/>
+ <result property="unitType" column="unit_type"/>
+ <result property="unitCode" column="unit_code"/>
+ <result property="unitDes" column="unit_des"/>
+ <result property="dutyName" column="duty_name"/>
+ <result property="dutyMobile" column="duty_mobile"/>
+ <result property="dutyIdcard" column="duty_idcard"/>
+ <result property="joinWay" column="join_way"/>
+ <result property="prov" column="prov"/>
+ <result property="provName" column="prov_name"/>
+ <result property="city" column="city"/>
+ <result property="cityName" column="city_name"/>
+ <result property="area" column="area"/>
+ <result property="areaName" column="area_name"/>
+ <result property="road" column="road"/>
+ <result property="roadName" column="road_name"/>
+ <result property="village" column="village"/>
+ <result property="villageName" column="village_name"/>
+ <result property="addr" column="addr"/>
+ <result property="lng" column="lng"/>
+ <result property="lat" column="lat"/>
+ <result property="goodField" column="good_field"/>
+ <result property="goodFieldName" column="good_field_name"/>
+ <result property="canField" column="can_field"/>
+ <result property="canFieldName" column="can_field_name"/>
+ <result property="findStatus" column="find_status"/>
+ <result property="dispStatus" column="disp_status"/>
+ <result property="deleteStatus" column="delete_status"/>
+ <result property="custId" column="cust_id"/>
+ <result property="createTime" column="create_time"/>
+ <result property="updateTime" column="update_time"/>
+ </resultMap>
+ <!-- 表 -->
+ <sql id='table-name'>dyh_ct_unit</sql>
+ <!-- 字段 -->
+ <sql id="column-part">
+ id,
+ level,
+ parent_id,
+ unit_grade,
+ unit_name,
+ unit_type,
+ unit_code,
+ unit_des,
+ duty_name,
+ duty_mobile,
+ duty_idcard,
+ join_way,
+ prov,
+ prov_name,
+ city,
+ city_name,
+ area,
+ area_name,
+ road,
+ road_name,
+ village,
+ village_name,
+ addr,
+ lng,
+ lat,
+ good_field,
+ good_field_name,
+ can_field,
+ can_field_name,
+ find_status,
+ disp_status,
+ delete_status,
+ cust_id,
+ create_time,
+ update_time
+ </sql>
+ <!-- 更新实体字段 -->
+ <sql id="set-part">
+ <if test="entity.level != null">level = #{entity.level},</if>
+ <if test="entity.parentId != null">parent_id = #{entity.parentId},</if>
+ <if test="entity.unitGrade != null">unit_grade = #{entity.unitGrade},</if>
+ <if test="entity.unitName != null">unit_name = #{entity.unitName},</if>
+ <if test="entity.unitType != null">unit_type = #{entity.unitType},</if>
+ <if test="entity.unitCode != null">unit_code = #{entity.unitCode},</if>
+ <if test="entity.unitDes != null">unit_des = #{entity.unitDes},</if>
+ <if test="entity.dutyName != null">duty_name = #{entity.dutyName},</if>
+ <if test="entity.dutyMobile != null">duty_mobile = #{entity.dutyMobile},</if>
+ <if test="entity.dutyIdcard != null">duty_idcard = #{entity.dutyIdcard},</if>
+ <if test="entity.joinWay != null">join_way = #{entity.joinWay},</if>
+ <if test="entity.prov != null">prov = #{entity.prov},</if>
+ <if test="entity.provName != null">prov_name = #{entity.provName},</if>
+ <if test="entity.city != null">city = #{entity.city},</if>
+ <if test="entity.cityName != null">city_name = #{entity.cityName},</if>
+ <if test="entity.area != null">area = #{entity.area},</if>
+ <if test="entity.areaName != null">area_name = #{entity.areaName},</if>
+ <if test="entity.road != null">road = #{entity.road},</if>
+ <if test="entity.roadName != null">road_name = #{entity.roadName},</if>
+ <if test="entity.village != null">village = #{entity.village},</if>
+ <if test="entity.villageName != null">village_name = #{entity.villageName},</if>
+ <if test="entity.addr != null">addr = #{entity.addr},</if>
+ <if test="entity.lng != null">lng = #{entity.lng},</if>
+ <if test="entity.lat != null">lat = #{entity.lat},</if>
+ <if test="entity.goodField != null">good_field = #{entity.goodField},</if>
+ <if test="entity.goodFieldName != null">good_field_name = #{entity.goodFieldName},</if>
+ <if test="entity.canField != null">can_field = #{entity.canField},</if>
+ <if test="entity.canFieldName != null">can_field_name = #{entity.canFieldName},</if>
+ <if test="entity.findStatus != null">find_status = #{entity.findStatus},</if>
+ <if test="entity.dispStatus != null">disp_status = #{entity.dispStatus},</if>
+ <if test="entity.deleteStatus != null">delete_status = #{entity.deleteStatus},</if>
+ <if test="entity.custId != null">cust_id = #{entity.custId},</if>
+ <if test="entity.createTime != null">create_time = #{entity.createTime},</if>
+ <if test="entity.updateTime != null">update_time = #{entity.updateTime}</if>
+ </sql>
+ <!-- 条件 -->
+ <sql id="where-part">
+ <if test="terms != null">
+ <where>
+ <if test="terms.id != null and terms.id !=''">
+ and id = #{terms.id}
+ </if>
+ <if test="terms.level != null and terms.level !=''">
+ and level = #{terms.level}
+ </if>
+ <if test="terms.parentId != null and terms.parentId !=''">
+ and parent_id = #{terms.parentId}
+ </if>
+ <if test="terms.unitGrade != null and terms.unitGrade !=''">
+ and unit_grade = #{terms.unitGrade}
+ </if>
+ <if test="terms.unitName != null and terms.unitName !=''">
+ and unit_name = #{terms.unitName}
+ </if>
+ <if test="terms.unitType != null and terms.unitType !=''">
+ and unit_type = #{terms.unitType}
+ </if>
+ <if test="terms.unitCode != null and terms.unitCode !=''">
+ and unit_code = #{terms.unitCode}
+ </if>
+ <if test="terms.unitDes != null and terms.unitDes !=''">
+ and unit_des = #{terms.unitDes}
+ </if>
+ <if test="terms.dutyName != null and terms.dutyName !=''">
+ and duty_name = #{terms.dutyName}
+ </if>
+ <if test="terms.dutyMobile != null and terms.dutyMobile !=''">
+ and duty_mobile = #{terms.dutyMobile}
+ </if>
+ <if test="terms.dutyIdcard != null and terms.dutyIdcard !=''">
+ and duty_idcard = #{terms.dutyIdcard}
+ </if>
+ <if test="terms.joinWay != null and terms.joinWay !=''">
+ and join_way = #{terms.joinWay}
+ </if>
+ <if test="terms.prov != null and terms.prov !=''">
+ and prov = #{terms.prov}
+ </if>
+ <if test="terms.provName != null and terms.provName !=''">
+ and prov_name = #{terms.provName}
+ </if>
+ <if test="terms.city != null and terms.city !=''">
+ and city = #{terms.city}
+ </if>
+ <if test="terms.cityName != null and terms.cityName !=''">
+ and city_name = #{terms.cityName}
+ </if>
+ <if test="terms.area != null and terms.area !=''">
+ and area = #{terms.area}
+ </if>
+ <if test="terms.areaName != null and terms.areaName !=''">
+ and area_name = #{terms.areaName}
+ </if>
+ <if test="terms.road != null and terms.road !=''">
+ and road = #{terms.road}
+ </if>
+ <if test="terms.roadName != null and terms.roadName !=''">
+ and road_name = #{terms.roadName}
+ </if>
+ <if test="terms.village != null and terms.village !=''">
+ and village = #{terms.village}
+ </if>
+ <if test="terms.villageName != null and terms.villageName !=''">
+ and village_name = #{terms.villageName}
+ </if>
+ <if test="terms.addr != null and terms.addr !=''">
+ and addr = #{terms.addr}
+ </if>
+ <if test="terms.lng != null and terms.lng !=''">
+ and lng = #{terms.lng}
+ </if>
+ <if test="terms.lat != null and terms.lat !=''">
+ and lat = #{terms.lat}
+ </if>
+ <if test="terms.goodField != null and terms.goodField !=''">
+ and good_field = #{terms.goodField}
+ </if>
+ <if test="terms.goodFieldName != null and terms.goodFieldName !=''">
+ and good_field_name = #{terms.goodFieldName}
+ </if>
+ <if test="terms.canField != null and terms.canField !=''">
+ and can_field = #{terms.canField}
+ </if>
+ <if test="terms.canFieldName != null and terms.canFieldName !=''">
+ and can_field_name = #{terms.canFieldName}
+ </if>
+ <if test="terms.findStatus != null and terms.findStatus !=''">
+ and find_status = #{terms.findStatus}
+ </if>
+ <if test="terms.dispStatus != null and terms.dispStatus !=''">
+ and disp_status = #{terms.dispStatus}
+ </if>
+ <if test="terms.deleteStatus = null and terms.deleteStatus =''">
+ and delete_status = '1'
+ </if>
+ <if test="terms.deleteStatus != null and terms.deleteStatus !=''">
+ and delete_status = #{terms.deleteStatus}
+ </if>
+ <if test="terms.custId != null and terms.custId !=''">
+ and cust_id = #{terms.custId}
+ </if>
+ <if test="terms.createTime != null and terms.createTime !=''">
+ and DATE_FORMAT(create_time,'%Y-%m-%d') = #{terms.createTime}
+ </if>
+ <if test="terms.createStart != null and terms.createStart !='' and terms.createEnd != null and terms.createEnd !=''">
+ and (DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.createStart}
+ and DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.createEnd})
+ </if>
+ <if test="terms.updateTime != null and terms.updateTime !=''">
+ and DATE_FORMAT(update_time,'%Y-%m-%d') = #{terms.updateTime}
+ </if>
+ <if test="terms.updateStart != null and terms.updateStart !='' and terms.updateEnd != null and terms.updateEnd !=''">
+ and (DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.updateStart}
+ and DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.updateEnd})
+ </if>
+ </where>
+ </if>
+ </sql>
+ <!-- 更新对象 -->
+ <update id="updateCtUnit">
+ update
+ <include refid="table-name"/>
+ <set>
+ <include refid="set-part"/>
+ </set>
+ <where>
+ id = #{entity.id}
+ </where>
+ </update>
+ <!-- 条件更新对象 -->
+ <update id="updateCtUnitTerms">
+ update
+ <include refid="table-name"/>
+ <set>
+ <include refid="set-part"/>
+ </set>
+ <include refid="where-part"/>
+ </update>
+ <!-- 根据编号物理删除 -->
+ <delete id="deleteCtUnit">
+ delete from
+ <include refid="table-name" />
+ where id = #{id}
+ </delete>
+ <!-- 根据条件查询 -->
+ <select id="listTerms" resultMap="dataResult">
+ select
+ <include refid="column-part"/>
+ from
+ <include refid="table-name" />
+ <include refid="where-part"/>
+ </select>
+ <!-- 根据条件统计 -->
+ <select id="countTerms" resultType="java.lang.Long">
+ select
+ COUNT(1)
+ from
+ <include refid="table-name" />
+ <include refid="where-part"/>
+ </select>
+ <!-- 根据条件分页查询 -->
+ <select id="pageTerms" resultMap="dataResult">
+ SELECT
+ <include refid="column-part"/>
+ FROM
+ <include refid="table-name" />
+ <include refid="where-part"/>
+ <if test="page.sort != null">
+ <foreach collection="page.sort" item="s" index="index" separator="," open="order by ">
+ isnull(${s.property}), ${s.property} ${s.direction}
+ </foreach>
+ </if>
+ <if test="page.sort == null">
+ order by isnull(create_time), create_time desc
+ </if>
+ limit #{page.offset}, #{page.size}
+ </select>
+
+</mapper>
\ No newline at end of file
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/xml/CtUsepostMapper.xml b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/xml/CtUsepostMapper.xml
new file mode 100644
index 0000000..a99b8da
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/xml/CtUsepostMapper.xml
@@ -0,0 +1,157 @@
+<?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">
+<!--
+ * @title: 客户用户配岗表
+ * @description: 自定义sql,请自行实现业务逻辑
+ * @company: hugeinfo
+ * @author: liyj
+ * @time:2024-08-17 15:30:57
+ * @version 1.0.0
+-->
+<mapper namespace="cn.huge.module.ctuser.dao.mapper.CtUsepostMapper">
+ <!-- 结果集 -->
+ <resultMap id="dataResult" type="cn.huge.module.ctuser.domain.po.CtUsepost">
+ <result property="id" column="id"/>
+ <result property="userId" column="user_id"/>
+ <result property="postId" column="post_id"/>
+ <result property="postName" column="post_name"/>
+ <result property="unitId" column="unit_id"/>
+ <result property="deptId" column="dept_id"/>
+ <result property="matchType" column="match_type"/>
+ <result property="custId" column="cust_id"/>
+ <result property="createTime" column="create_time"/>
+ <result property="updateTime" column="update_time"/>
+ </resultMap>
+ <!-- 表 -->
+ <sql id='table-name'>dyh_ct_usepost</sql>
+ <!-- 字段 -->
+ <sql id="column-part">
+ id,
+ user_id,
+ post_id,
+ post_name,
+ unit_id,
+ dept_id,
+ match_type,
+ cust_id,
+ create_time,
+ update_time
+ </sql>
+ <!-- 更新实体字段 -->
+ <sql id="set-part">
+ <if test="entity.userId != null">user_id = #{entity.userId},</if>
+ <if test="entity.postId != null">post_id = #{entity.postId},</if>
+ <if test="entity.postName != null">post_name = #{entity.postName},</if>
+ <if test="entity.unitId != null">unit_id = #{entity.unitId},</if>
+ <if test="entity.deptId != null">dept_id = #{entity.deptId},</if>
+ <if test="entity.matchType != null">match_type = #{entity.matchType},</if>
+ <if test="entity.custId != null">cust_id = #{entity.custId},</if>
+ <if test="entity.createTime != null">create_time = #{entity.createTime},</if>
+ <if test="entity.updateTime != null">update_time = #{entity.updateTime}</if>
+ </sql>
+ <!-- 条件 -->
+ <sql id="where-part">
+ <if test="terms != null">
+ <where>
+ <if test="terms.id != null and terms.id !=''">
+ and id = #{terms.id}
+ </if>
+ <if test="terms.userId != null and terms.userId !=''">
+ and user_id = #{terms.userId}
+ </if>
+ <if test="terms.postId != null and terms.postId !=''">
+ and post_id = #{terms.postId}
+ </if>
+ <if test="terms.postName != null and terms.postName !=''">
+ and post_name = #{terms.postName}
+ </if>
+ <if test="terms.unitId != null and terms.unitId !=''">
+ and unit_id = #{terms.unitId}
+ </if>
+ <if test="terms.deptId != null and terms.deptId !=''">
+ and dept_id = #{terms.deptId}
+ </if>
+ <if test="terms.matchType != null and terms.matchType !=''">
+ and match_type = #{terms.matchType}
+ </if>
+ <if test="terms.custId != null and terms.custId !=''">
+ and cust_id = #{terms.custId}
+ </if>
+ <if test="terms.createTime != null and terms.createTime !=''">
+ and DATE_FORMAT(create_time,'%Y-%m-%d') = #{terms.createTime}
+ </if>
+ <if test="terms.createStart != null and terms.createStart !='' and terms.createEnd != null and terms.createEnd !=''">
+ and (DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.createStart}
+ and DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.createEnd})
+ </if>
+ <if test="terms.updateTime != null and terms.updateTime !=''">
+ and DATE_FORMAT(update_time,'%Y-%m-%d') = #{terms.updateTime}
+ </if>
+ <if test="terms.updateStart != null and terms.updateStart !='' and terms.updateEnd != null and terms.updateEnd !=''">
+ and (DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.updateStart}
+ and DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.updateEnd})
+ </if>
+ </where>
+ </if>
+ </sql>
+ <!-- 更新对象 -->
+ <update id="updateCtUsepost">
+ update
+ <include refid="table-name"/>
+ <set>
+ <include refid="set-part"/>
+ </set>
+ <where>
+ id = #{entity.id}
+ </where>
+ </update>
+ <!-- 条件更新对象 -->
+ <update id="updateCtUsepostTerms">
+ update
+ <include refid="table-name"/>
+ <set>
+ <include refid="set-part"/>
+ </set>
+ <include refid="where-part"/>
+ </update>
+ <!-- 根据编号物理删除 -->
+ <delete id="deleteCtUsepost">
+ delete from
+ <include refid="table-name" />
+ where id = #{id}
+ </delete>
+ <!-- 根据条件查询 -->
+ <select id="listTerms" resultMap="dataResult">
+ select
+ <include refid="column-part"/>
+ from
+ <include refid="table-name" />
+ <include refid="where-part"/>
+ </select>
+ <!-- 根据条件统计 -->
+ <select id="countTerms" resultType="java.lang.Long">
+ select
+ COUNT(1)
+ from
+ <include refid="table-name" />
+ <include refid="where-part"/>
+ </select>
+ <!-- 根据条件分页查询 -->
+ <select id="pageTerms" resultMap="dataResult">
+ SELECT
+ <include refid="column-part"/>
+ FROM
+ <include refid="table-name" />
+ <include refid="where-part"/>
+ <if test="page.sort != null">
+ <foreach collection="page.sort" item="s" index="index" separator="," open="order by ">
+ isnull(${s.property}), ${s.property} ${s.direction}
+ </foreach>
+ </if>
+ <if test="page.sort == null">
+ order by isnull(create_time), create_time desc
+ </if>
+ limit #{page.offset}, #{page.size}
+ </select>
+
+</mapper>
\ No newline at end of file
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/xml/CtUserMapper.xml b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/xml/CtUserMapper.xml
new file mode 100644
index 0000000..5bf0e64
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/xml/CtUserMapper.xml
@@ -0,0 +1,328 @@
+<?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">
+<!--
+ * @title: 客户用户表
+ * @description: 自定义sql,请自行实现业务逻辑
+ * @company: hugeinfo
+ * @author: liyj
+ * @time:2024-08-17 15:30:57
+ * @version 1.0.0
+-->
+<mapper namespace="cn.huge.module.ctuser.dao.mapper.CtUserMapper">
+ <!-- 结果集 -->
+ <resultMap id="dataResult" type="cn.huge.module.ctuser.domain.po.CtUser">
+ <result property="id" column="id"/>
+ <result property="trueName" column="true_name"/>
+ <result property="sex" column="sex"/>
+ <result property="sexName" column="sex_name"/>
+ <result property="mobile" column="mobile"/>
+ <result property="idcard" column="idcard"/>
+ <result property="email" column="email"/>
+ <result property="wechat" column="wechat"/>
+ <result property="qq" column="qq"/>
+ <result property="prov" column="prov"/>
+ <result property="provName" column="prov_name"/>
+ <result property="city" column="city"/>
+ <result property="cityName" column="city_name"/>
+ <result property="area" column="area"/>
+ <result property="areaName" column="area_name"/>
+ <result property="road" column="road"/>
+ <result property="roadName" column="road_name"/>
+ <result property="village" column="village"/>
+ <result property="villageName" column="village_name"/>
+ <result property="addr" column="addr"/>
+ <result property="avatar" column="avatar"/>
+ <result property="unitId" column="unit_id"/>
+ <result property="unitName" column="unit_name"/>
+ <result property="deptId" column="dept_id"/>
+ <result property="deptName" column="dept_name"/>
+ <result property="joinWay" column="join_way"/>
+ <result property="realStatus" column="real_status"/>
+ <result property="status" column="status"/>
+ <result property="goodField" column="good_field"/>
+ <result property="goodFieldName" column="good_field_name"/>
+ <result property="canField" column="can_field"/>
+ <result property="canFieldName" column="can_field_name"/>
+ <result property="findStatus" column="find_status"/>
+ <result property="dispStatus" column="disp_status"/>
+ <result property="deleteStatus" column="delete_status"/>
+ <result property="custId" column="cust_id"/>
+ <result property="createTime" column="create_time"/>
+ <result property="updateTime" column="update_time"/>
+ </resultMap>
+ <!-- 表 -->
+ <sql id='table-name'>dyh_ct_user</sql>
+ <!-- 字段 -->
+ <sql id="column-part">
+ id,
+ true_name,
+ sex,
+ sex_name,
+ mobile,
+ idcard,
+ email,
+ wechat,
+ qq,
+ prov,
+ prov_name,
+ city,
+ city_name,
+ area,
+ area_name,
+ road,
+ road_name,
+ village,
+ village_name,
+ addr,
+ avatar,
+ unit_id,
+ unit_name,
+ dept_id,
+ dept_name,
+ join_way,
+ real_status,
+ status,
+ good_field,
+ good_field_name,
+ can_field,
+ can_field_name,
+ find_status,
+ disp_status,
+ delete_status,
+ cust_id,
+ create_time,
+ update_time
+ </sql>
+ <!-- 更新实体字段 -->
+ <sql id="set-part">
+ <if test="entity.trueName != null">true_name = #{entity.trueName},</if>
+ <if test="entity.sex != null">sex = #{entity.sex},</if>
+ <if test="entity.sexName != null">sex_name = #{entity.sexName},</if>
+ <if test="entity.mobile != null">mobile = #{entity.mobile},</if>
+ <if test="entity.idcard != null">idcard = #{entity.idcard},</if>
+ <if test="entity.email != null">email = #{entity.email},</if>
+ <if test="entity.wechat != null">wechat = #{entity.wechat},</if>
+ <if test="entity.qq != null">qq = #{entity.qq},</if>
+ <if test="entity.prov != null">prov = #{entity.prov},</if>
+ <if test="entity.provName != null">prov_name = #{entity.provName},</if>
+ <if test="entity.city != null">city = #{entity.city},</if>
+ <if test="entity.cityName != null">city_name = #{entity.cityName},</if>
+ <if test="entity.area != null">area = #{entity.area},</if>
+ <if test="entity.areaName != null">area_name = #{entity.areaName},</if>
+ <if test="entity.road != null">road = #{entity.road},</if>
+ <if test="entity.roadName != null">road_name = #{entity.roadName},</if>
+ <if test="entity.village != null">village = #{entity.village},</if>
+ <if test="entity.villageName != null">village_name = #{entity.villageName},</if>
+ <if test="entity.addr != null">addr = #{entity.addr},</if>
+ <if test="entity.avatar != null">avatar = #{entity.avatar},</if>
+ <if test="entity.unitId != null">unit_id = #{entity.unitId},</if>
+ <if test="entity.unitName != null">unit_name = #{entity.unitName},</if>
+ <if test="entity.deptId != null">dept_id = #{entity.deptId},</if>
+ <if test="entity.deptName != null">dept_name = #{entity.deptName},</if>
+ <if test="entity.joinWay != null">join_way = #{entity.joinWay},</if>
+ <if test="entity.realStatus != null">real_status = #{entity.realStatus},</if>
+ <if test="entity.status != null">status = #{entity.status},</if>
+ <if test="entity.goodField != null">good_field = #{entity.goodField},</if>
+ <if test="entity.goodFieldName != null">good_field_name = #{entity.goodFieldName},</if>
+ <if test="entity.canField != null">can_field = #{entity.canField},</if>
+ <if test="entity.canFieldName != null">can_field_name = #{entity.canFieldName},</if>
+ <if test="entity.findStatus != null">find_status = #{entity.findStatus},</if>
+ <if test="entity.dispStatus != null">disp_status = #{entity.dispStatus},</if>
+ <if test="entity.deleteStatus != null">delete_status = #{entity.deleteStatus},</if>
+ <if test="entity.custId != null">cust_id = #{entity.custId},</if>
+ <if test="entity.createTime != null">create_time = #{entity.createTime},</if>
+ <if test="entity.updateTime != null">update_time = #{entity.updateTime}</if>
+ </sql>
+ <!-- 条件 -->
+ <sql id="where-part">
+ <if test="terms != null">
+ <where>
+ <if test="terms.id != null and terms.id !=''">
+ and id = #{terms.id}
+ </if>
+ <if test="terms.trueName != null and terms.trueName !=''">
+ and true_name = #{terms.trueName}
+ </if>
+ <if test="terms.sex != null and terms.sex !=''">
+ and sex = #{terms.sex}
+ </if>
+ <if test="terms.sexName != null and terms.sexName !=''">
+ and sex_name = #{terms.sexName}
+ </if>
+ <if test="terms.mobile != null and terms.mobile !=''">
+ and mobile = #{terms.mobile}
+ </if>
+ <if test="terms.idcard != null and terms.idcard !=''">
+ and idcard = #{terms.idcard}
+ </if>
+ <if test="terms.email != null and terms.email !=''">
+ and email = #{terms.email}
+ </if>
+ <if test="terms.wechat != null and terms.wechat !=''">
+ and wechat = #{terms.wechat}
+ </if>
+ <if test="terms.qq != null and terms.qq !=''">
+ and qq = #{terms.qq}
+ </if>
+ <if test="terms.prov != null and terms.prov !=''">
+ and prov = #{terms.prov}
+ </if>
+ <if test="terms.provName != null and terms.provName !=''">
+ and prov_name = #{terms.provName}
+ </if>
+ <if test="terms.city != null and terms.city !=''">
+ and city = #{terms.city}
+ </if>
+ <if test="terms.cityName != null and terms.cityName !=''">
+ and city_name = #{terms.cityName}
+ </if>
+ <if test="terms.area != null and terms.area !=''">
+ and area = #{terms.area}
+ </if>
+ <if test="terms.areaName != null and terms.areaName !=''">
+ and area_name = #{terms.areaName}
+ </if>
+ <if test="terms.road != null and terms.road !=''">
+ and road = #{terms.road}
+ </if>
+ <if test="terms.roadName != null and terms.roadName !=''">
+ and road_name = #{terms.roadName}
+ </if>
+ <if test="terms.village != null and terms.village !=''">
+ and village = #{terms.village}
+ </if>
+ <if test="terms.villageName != null and terms.villageName !=''">
+ and village_name = #{terms.villageName}
+ </if>
+ <if test="terms.addr != null and terms.addr !=''">
+ and addr = #{terms.addr}
+ </if>
+ <if test="terms.avatar != null and terms.avatar !=''">
+ and avatar = #{terms.avatar}
+ </if>
+ <if test="terms.unitId != null and terms.unitId !=''">
+ and unit_id = #{terms.unitId}
+ </if>
+ <if test="terms.unitName != null and terms.unitName !=''">
+ and unit_name = #{terms.unitName}
+ </if>
+ <if test="terms.deptId != null and terms.deptId !=''">
+ and dept_id = #{terms.deptId}
+ </if>
+ <if test="terms.deptName != null and terms.deptName !=''">
+ and dept_name = #{terms.deptName}
+ </if>
+ <if test="terms.joinWay != null and terms.joinWay !=''">
+ and join_way = #{terms.joinWay}
+ </if>
+ <if test="terms.realStatus != null and terms.realStatus !=''">
+ and real_status = #{terms.realStatus}
+ </if>
+ <if test="terms.status != null and terms.status !=''">
+ and status = #{terms.status}
+ </if>
+ <if test="terms.goodField != null and terms.goodField !=''">
+ and good_field = #{terms.goodField}
+ </if>
+ <if test="terms.goodFieldName != null and terms.goodFieldName !=''">
+ and good_field_name = #{terms.goodFieldName}
+ </if>
+ <if test="terms.canField != null and terms.canField !=''">
+ and can_field = #{terms.canField}
+ </if>
+ <if test="terms.canFieldName != null and terms.canFieldName !=''">
+ and can_field_name = #{terms.canFieldName}
+ </if>
+ <if test="terms.findStatus != null and terms.findStatus !=''">
+ and find_status = #{terms.findStatus}
+ </if>
+ <if test="terms.dispStatus != null and terms.dispStatus !=''">
+ and disp_status = #{terms.dispStatus}
+ </if>
+ <if test="terms.deleteStatus = null and terms.deleteStatus =''">
+ and delete_status = '1'
+ </if>
+ <if test="terms.deleteStatus != null and terms.deleteStatus !=''">
+ and delete_status = #{terms.deleteStatus}
+ </if>
+ <if test="terms.custId != null and terms.custId !=''">
+ and cust_id = #{terms.custId}
+ </if>
+ <if test="terms.createTime != null and terms.createTime !=''">
+ and DATE_FORMAT(create_time,'%Y-%m-%d') = #{terms.createTime}
+ </if>
+ <if test="terms.createStart != null and terms.createStart !='' and terms.createEnd != null and terms.createEnd !=''">
+ and (DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.createStart}
+ and DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.createEnd})
+ </if>
+ <if test="terms.updateTime != null and terms.updateTime !=''">
+ and DATE_FORMAT(update_time,'%Y-%m-%d') = #{terms.updateTime}
+ </if>
+ <if test="terms.updateStart != null and terms.updateStart !='' and terms.updateEnd != null and terms.updateEnd !=''">
+ and (DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.updateStart}
+ and DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.updateEnd})
+ </if>
+ </where>
+ </if>
+ </sql>
+ <!-- 更新对象 -->
+ <update id="updateCtUser">
+ update
+ <include refid="table-name"/>
+ <set>
+ <include refid="set-part"/>
+ </set>
+ <where>
+ id = #{entity.id}
+ </where>
+ </update>
+ <!-- 条件更新对象 -->
+ <update id="updateCtUserTerms">
+ update
+ <include refid="table-name"/>
+ <set>
+ <include refid="set-part"/>
+ </set>
+ <include refid="where-part"/>
+ </update>
+ <!-- 根据编号物理删除 -->
+ <delete id="deleteCtUser">
+ delete from
+ <include refid="table-name" />
+ where id = #{id}
+ </delete>
+ <!-- 根据条件查询 -->
+ <select id="listTerms" resultMap="dataResult">
+ select
+ <include refid="column-part"/>
+ from
+ <include refid="table-name" />
+ <include refid="where-part"/>
+ </select>
+ <!-- 根据条件统计 -->
+ <select id="countTerms" resultType="java.lang.Long">
+ select
+ COUNT(1)
+ from
+ <include refid="table-name" />
+ <include refid="where-part"/>
+ </select>
+ <!-- 根据条件分页查询 -->
+ <select id="pageTerms" resultMap="dataResult">
+ SELECT
+ <include refid="column-part"/>
+ FROM
+ <include refid="table-name" />
+ <include refid="where-part"/>
+ <if test="page.sort != null">
+ <foreach collection="page.sort" item="s" index="index" separator="," open="order by ">
+ isnull(${s.property}), ${s.property} ${s.direction}
+ </foreach>
+ </if>
+ <if test="page.sort == null">
+ order by isnull(create_time), create_time desc
+ </if>
+ limit #{page.offset}, #{page.size}
+ </select>
+
+</mapper>
\ No newline at end of file
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/xml/CtUseroleMapper.xml b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/xml/CtUseroleMapper.xml
new file mode 100644
index 0000000..162c278
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/dao/mapper/xml/CtUseroleMapper.xml
@@ -0,0 +1,145 @@
+<?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">
+<!--
+ * @title: 客户用户角色表
+ * @description: 自定义sql,请自行实现业务逻辑
+ * @company: hugeinfo
+ * @author: liyj
+ * @time:2024-08-17 15:30:57
+ * @version 1.0.0
+-->
+<mapper namespace="cn.huge.module.ctuser.dao.mapper.CtUseroleMapper">
+ <!-- 结果集 -->
+ <resultMap id="dataResult" type="cn.huge.module.ctuser.domain.po.CtUserole">
+ <result property="id" column="id"/>
+ <result property="userId" column="user_id"/>
+ <result property="roleId" column="role_id"/>
+ <result property="roleCode" column="role_code"/>
+ <result property="roleName" column="role_name"/>
+ <result property="custId" column="cust_id"/>
+ <result property="createTime" column="create_time"/>
+ <result property="updateTime" column="update_time"/>
+ </resultMap>
+ <!-- 表 -->
+ <sql id='table-name'>dyh_ct_userole</sql>
+ <!-- 字段 -->
+ <sql id="column-part">
+ id,
+ user_id,
+ role_id,
+ role_code,
+ role_name,
+ cust_id,
+ create_time,
+ update_time
+ </sql>
+ <!-- 更新实体字段 -->
+ <sql id="set-part">
+ <if test="entity.userId != null">user_id = #{entity.userId},</if>
+ <if test="entity.roleId != null">role_id = #{entity.roleId},</if>
+ <if test="entity.roleCode != null">role_code = #{entity.roleCode},</if>
+ <if test="entity.roleName != null">role_name = #{entity.roleName},</if>
+ <if test="entity.custId != null">cust_id = #{entity.custId},</if>
+ <if test="entity.createTime != null">create_time = #{entity.createTime},</if>
+ <if test="entity.updateTime != null">update_time = #{entity.updateTime}</if>
+ </sql>
+ <!-- 条件 -->
+ <sql id="where-part">
+ <if test="terms != null">
+ <where>
+ <if test="terms.id != null and terms.id !=''">
+ and id = #{terms.id}
+ </if>
+ <if test="terms.userId != null and terms.userId !=''">
+ and user_id = #{terms.userId}
+ </if>
+ <if test="terms.roleId != null and terms.roleId !=''">
+ and role_id = #{terms.roleId}
+ </if>
+ <if test="terms.roleCode != null and terms.roleCode !=''">
+ and role_code = #{terms.roleCode}
+ </if>
+ <if test="terms.roleName != null and terms.roleName !=''">
+ and role_name = #{terms.roleName}
+ </if>
+ <if test="terms.custId != null and terms.custId !=''">
+ and cust_id = #{terms.custId}
+ </if>
+ <if test="terms.createTime != null and terms.createTime !=''">
+ and DATE_FORMAT(create_time,'%Y-%m-%d') = #{terms.createTime}
+ </if>
+ <if test="terms.createStart != null and terms.createStart !='' and terms.createEnd != null and terms.createEnd !=''">
+ and (DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.createStart}
+ and DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.createEnd})
+ </if>
+ <if test="terms.updateTime != null and terms.updateTime !=''">
+ and DATE_FORMAT(update_time,'%Y-%m-%d') = #{terms.updateTime}
+ </if>
+ <if test="terms.updateStart != null and terms.updateStart !='' and terms.updateEnd != null and terms.updateEnd !=''">
+ and (DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.updateStart}
+ and DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.updateEnd})
+ </if>
+ </where>
+ </if>
+ </sql>
+ <!-- 更新对象 -->
+ <update id="updateCtUserole">
+ update
+ <include refid="table-name"/>
+ <set>
+ <include refid="set-part"/>
+ </set>
+ <where>
+ id = #{entity.id}
+ </where>
+ </update>
+ <!-- 条件更新对象 -->
+ <update id="updateCtUseroleTerms">
+ update
+ <include refid="table-name"/>
+ <set>
+ <include refid="set-part"/>
+ </set>
+ <include refid="where-part"/>
+ </update>
+ <!-- 根据编号物理删除 -->
+ <delete id="deleteCtUserole">
+ delete from
+ <include refid="table-name" />
+ where id = #{id}
+ </delete>
+ <!-- 根据条件查询 -->
+ <select id="listTerms" resultMap="dataResult">
+ select
+ <include refid="column-part"/>
+ from
+ <include refid="table-name" />
+ <include refid="where-part"/>
+ </select>
+ <!-- 根据条件统计 -->
+ <select id="countTerms" resultType="java.lang.Long">
+ select
+ COUNT(1)
+ from
+ <include refid="table-name" />
+ <include refid="where-part"/>
+ </select>
+ <!-- 根据条件分页查询 -->
+ <select id="pageTerms" resultMap="dataResult">
+ SELECT
+ <include refid="column-part"/>
+ FROM
+ <include refid="table-name" />
+ <include refid="where-part"/>
+ <if test="page.sort != null">
+ <foreach collection="page.sort" item="s" index="index" separator="," open="order by ">
+ isnull(${s.property}), ${s.property} ${s.direction}
+ </foreach>
+ </if>
+ <if test="page.sort == null">
+ order by isnull(create_time), create_time desc
+ </if>
+ limit #{page.offset}, #{page.size}
+ </select>
+
+</mapper>
\ No newline at end of file
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/bo/CtAccountBO.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/bo/CtAccountBO.java
new file mode 100644
index 0000000..f2d56f6
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/bo/CtAccountBO.java
@@ -0,0 +1,17 @@
+package cn.huge.module.ctuser.domain.bo;
+
+import cn.huge.module.ctuser.domain.po.CtAccount;
+
+/**
+ * @title: 客户用户账号表业务扩展类
+ * @description: 客户用户账号表业务扩展类
+ * @company: hugeinfo
+ * @author: liyj
+ * @time: 2024-08-17 15:30:56
+ * @version: 1.0.0
+ * @see cn.huge.module.ctuser.domain.po.CtAccount
+ */
+public class CtAccountBO extends CtAccount {
+
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/bo/CtDeptBO.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/bo/CtDeptBO.java
new file mode 100644
index 0000000..69e6bbd
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/bo/CtDeptBO.java
@@ -0,0 +1,17 @@
+package cn.huge.module.ctuser.domain.bo;
+
+import cn.huge.module.ctuser.domain.po.CtDept;
+
+/**
+ * @title: 客户部门表业务扩展类
+ * @description: 客户部门表业务扩展类
+ * @company: hugeinfo
+ * @author: liyj
+ * @time: 2024-08-17 15:30:57
+ * @version: 1.0.0
+ * @see cn.huge.module.ctuser.domain.po.CtDept
+ */
+public class CtDeptBO extends CtDept {
+
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/bo/CtPostBO.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/bo/CtPostBO.java
new file mode 100644
index 0000000..d31a085
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/bo/CtPostBO.java
@@ -0,0 +1,17 @@
+package cn.huge.module.ctuser.domain.bo;
+
+import cn.huge.module.ctuser.domain.po.CtPost;
+
+/**
+ * @title: 客户岗位表业务扩展类
+ * @description: 客户岗位表业务扩展类
+ * @company: hugeinfo
+ * @author: liyj
+ * @time: 2024-08-17 15:30:57
+ * @version: 1.0.0
+ * @see cn.huge.module.ctuser.domain.po.CtPost
+ */
+public class CtPostBO extends CtPost {
+
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/bo/CtUnitBO.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/bo/CtUnitBO.java
new file mode 100644
index 0000000..8bb7a20
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/bo/CtUnitBO.java
@@ -0,0 +1,17 @@
+package cn.huge.module.ctuser.domain.bo;
+
+import cn.huge.module.ctuser.domain.po.CtUnit;
+
+/**
+ * @title: 客户组织信息表业务扩展类
+ * @description: 客户组织信息表业务扩展类
+ * @company: hugeinfo
+ * @author: liyj
+ * @time: 2024-08-17 15:30:57
+ * @version: 1.0.0
+ * @see cn.huge.module.ctuser.domain.po.CtUnit
+ */
+public class CtUnitBO extends CtUnit {
+
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/bo/CtUsepostBO.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/bo/CtUsepostBO.java
new file mode 100644
index 0000000..bd948db
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/bo/CtUsepostBO.java
@@ -0,0 +1,17 @@
+package cn.huge.module.ctuser.domain.bo;
+
+import cn.huge.module.ctuser.domain.po.CtUsepost;
+
+/**
+ * @title: 客户用户配岗表业务扩展类
+ * @description: 客户用户配岗表业务扩展类
+ * @company: hugeinfo
+ * @author: liyj
+ * @time: 2024-08-17 15:30:57
+ * @version: 1.0.0
+ * @see cn.huge.module.ctuser.domain.po.CtUsepost
+ */
+public class CtUsepostBO extends CtUsepost {
+
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/bo/CtUserBO.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/bo/CtUserBO.java
new file mode 100644
index 0000000..16ed3d4
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/bo/CtUserBO.java
@@ -0,0 +1,17 @@
+package cn.huge.module.ctuser.domain.bo;
+
+import cn.huge.module.ctuser.domain.po.CtUser;
+
+/**
+ * @title: 客户用户表业务扩展类
+ * @description: 客户用户表业务扩展类
+ * @company: hugeinfo
+ * @author: liyj
+ * @time: 2024-08-17 15:30:57
+ * @version: 1.0.0
+ * @see cn.huge.module.ctuser.domain.po.CtUser
+ */
+public class CtUserBO extends CtUser {
+
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/bo/CtUseroleBO.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/bo/CtUseroleBO.java
new file mode 100644
index 0000000..087b0af
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/bo/CtUseroleBO.java
@@ -0,0 +1,17 @@
+package cn.huge.module.ctuser.domain.bo;
+
+import cn.huge.module.ctuser.domain.po.CtUserole;
+
+/**
+ * @title: 客户用户角色表业务扩展类
+ * @description: 客户用户角色表业务扩展类
+ * @company: hugeinfo
+ * @author: liyj
+ * @time: 2024-08-17 15:30:57
+ * @version: 1.0.0
+ * @see cn.huge.module.ctuser.domain.po.CtUserole
+ */
+public class CtUseroleBO extends CtUserole {
+
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/po/CtAccount.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/po/CtAccount.java
new file mode 100644
index 0000000..7498e64
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/po/CtAccount.java
@@ -0,0 +1,102 @@
+package cn.huge.module.ctuser.domain.po;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * @title: 客户用户账号表数据库对应关系类
+ * @description: PO中的属性与数据表是一一对应关系,如需根据业务处理不同,请使用BO对象。
+ * @company:hugeinfo
+ * @author: liyj
+ * @time: 2024-08-17 15:30:56
+ * @version 1.0.0
+ */
+@TableName(value = "dyh_ct_account")
+@Data
+public class CtAccount {
+
+ /**
+ * 账号编号
+ */
+ @TableId(value = "id")
+ private String id;
+
+ /**
+ * 用户编号
+ */
+ @TableField(value = "user_id")
+ private String userId;
+
+ /**
+ * 帐号类型,1:平台web端,2:平台小程序
+ */
+ @TableField(value = "acc_type")
+ private Integer accType;
+
+ /**
+ * 身份唯一标识(存储唯一标识,比如账号、邮箱、手机号、第三方获取的唯一标识等)
+ */
+ @TableField(value = "acc")
+ private String acc;
+
+ /**
+ * 授权凭证(比如密码 第三方登录的token等)
+ */
+ @TableField(value = "cipher")
+ private String cipher;
+
+ /**
+ * 授权凭证明文
+ */
+ @TableField(value = "cipher_open")
+ private String cipherOpen;
+
+ /**
+ * 密码最新更新时间
+ */
+ @TableField(value = "cipher_time")
+ private Date cipherTime;
+
+ /**
+ * 最新登录时间
+ */
+ @TableField(value = "login_time")
+ private Date loginTime;
+
+ /**
+ * 限制登录时间(密码错误次数超过限制,默认30分钟)
+ */
+ @TableField(value = "limit_time")
+ private Date limitTime;
+
+ /**
+ * 删除状态,0:已删除,1:未删除
+ */
+ @TableLogic
+ @TableField(value = "delete_status")
+ private Integer deleteStatus;
+
+ /**
+ * 顾客编号
+ */
+ @TableField(value = "cust_id")
+ private String custId;
+
+ /**
+ * 创建时间
+ */
+ @TableField(value = "create_time")
+ private Date createTime;
+
+ /**
+ * 更新时间
+ */
+ @TableField(value = "update_time")
+ private Date updateTime;
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/po/CtDept.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/po/CtDept.java
new file mode 100644
index 0000000..03479f5
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/po/CtDept.java
@@ -0,0 +1,108 @@
+package cn.huge.module.ctuser.domain.po;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * @title: 客户部门表数据库对应关系类
+ * @description: PO中的属性与数据表是一一对应关系,如需根据业务处理不同,请使用BO对象。
+ * @company:hugeinfo
+ * @author: liyj
+ * @time: 2024-08-17 15:30:57
+ * @version 1.0.0
+ */
+@TableName(value = "dyh_ct_dept")
+@Data
+public class CtDept {
+
+ /**
+ * 部门编号
+ */
+ @TableId(value = "id")
+ private String id;
+
+ /**
+ * 层级
+ */
+ @TableField(value = "level")
+ private Integer level;
+
+ /**
+ * 父级部门,根级默认root
+ */
+ @TableField(value = "parent_id")
+ private String parentId;
+
+ /**
+ * 部门名称
+ */
+ @TableField(value = "name")
+ private String name;
+
+ /**
+ * 描述
+ */
+ @TableField(value = "des")
+ private String des;
+
+ /**
+ * 组织编号
+ */
+ @TableField(value = "unit_id")
+ private String unitId;
+
+ /**
+ * 调解专长,多个用,隔开
+ */
+ @TableField(value = "good_field")
+ private String goodField;
+
+ /**
+ * 调解专长名称,多个用,隔开
+ */
+ @TableField(value = "good_field_name")
+ private String goodFieldName;
+
+ /**
+ * 调解范围,多个用,隔开
+ */
+ @TableField(value = "can_field")
+ private String canField;
+
+ /**
+ * 调解范围名称,多个用,隔开
+ */
+ @TableField(value = "can_field_name")
+ private String canFieldName;
+
+ /**
+ * 删除状态,0:已删除,1:未删除
+ */
+ @TableLogic
+ @TableField(value = "delete_status")
+ private Integer deleteStatus;
+
+ /**
+ * 所属客户编号
+ */
+ @TableField(value = "cust_id")
+ private String custId;
+
+ /**
+ * 创建时间
+ */
+ @TableField(value = "create_time")
+ private Date createTime;
+
+ /**
+ * 更新时间
+ */
+ @TableField(value = "update_time")
+ private Date updateTime;
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/po/CtPost.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/po/CtPost.java
new file mode 100644
index 0000000..14a8c7d
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/po/CtPost.java
@@ -0,0 +1,72 @@
+package cn.huge.module.ctuser.domain.po;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * @title: 客户岗位表数据库对应关系类
+ * @description: PO中的属性与数据表是一一对应关系,如需根据业务处理不同,请使用BO对象。
+ * @company:hugeinfo
+ * @author: liyj
+ * @time: 2024-08-17 15:30:57
+ * @version 1.0.0
+ */
+@TableName(value = "dyh_ct_post")
+@Data
+public class CtPost {
+
+ /**
+ * 编号
+ */
+ @TableId(value = "id")
+ private String id;
+
+ /**
+ * 岗位名称
+ */
+ @TableField(value = "name")
+ private String name;
+
+ /**
+ * 描述
+ */
+ @TableField(value = "des")
+ private String des;
+
+ /**
+ * 单位编号
+ */
+ @TableField(value = "unit_id")
+ private String unitId;
+
+ /**
+ * 删除状态,0:已删除,1:未删除
+ */
+ @TableLogic
+ @TableField(value = "delete_status")
+ private Integer deleteStatus;
+
+ /**
+ * 所属客户编号
+ */
+ @TableField(value = "cust_id")
+ private String custId;
+
+ /**
+ * 创建时间
+ */
+ @TableField(value = "create_time")
+ private Date createTime;
+
+ /**
+ * 更新时间
+ */
+ @TableField(value = "update_time")
+ private Date updateTime;
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/po/CtUnit.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/po/CtUnit.java
new file mode 100644
index 0000000..cec1cd6
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/po/CtUnit.java
@@ -0,0 +1,234 @@
+package cn.huge.module.ctuser.domain.po;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * @title: 客户组织信息表数据库对应关系类
+ * @description: PO中的属性与数据表是一一对应关系,如需根据业务处理不同,请使用BO对象。
+ * @company:hugeinfo
+ * @author: liyj
+ * @time: 2024-08-17 15:30:57
+ * @version 1.0.0
+ */
+@TableName(value = "dyh_ct_unit")
+@Data
+public class CtUnit {
+
+ /**
+ * 组织编号
+ */
+ @TableId(value = "id")
+ private String id;
+
+ /**
+ * 层级
+ */
+ @TableField(value = "level")
+ private Integer level;
+
+ /**
+ * 父级组织,根级为root
+ */
+ @TableField(value = "parent_id")
+ private String parentId;
+
+ /**
+ * 组织级别,1:市级,2:区级,3:镇街级,4:村居级
+ */
+ @TableField(value = "unit_grade")
+ private Integer unitGrade;
+
+ /**
+ * 组织名称
+ */
+ @TableField(value = "unit_name")
+ private String unitName;
+
+ /**
+ * 组织类型,0:政法委,1:综治中心,2:直属部门,3:法院,4:行专业调委会,5:企事业调委会,6:演示测试,9:其他
+ */
+ @TableField(value = "unit_type")
+ private Integer unitType;
+
+ /**
+ * 组织机构代码
+ */
+ @TableField(value = "unit_code")
+ private String unitCode;
+
+ /**
+ * 描述
+ */
+ @TableField(value = "unit_des")
+ private String unitDes;
+
+ /**
+ * 单位负责人姓名
+ */
+ @TableField(value = "duty_name")
+ private String dutyName;
+
+ /**
+ * 单位负责人手机号码
+ */
+ @TableField(value = "duty_mobile")
+ private String dutyMobile;
+
+ /**
+ * 单位负责人身份证
+ */
+ @TableField(value = "duty_idcard")
+ private String dutyIdcard;
+
+ /**
+ * 加入方式,1:系统创建,2:自主申请
+ */
+ @TableField(value = "join_way")
+ private Integer joinWay;
+
+ /**
+ * 组织地址省
+ */
+ @TableField(value = "prov")
+ private String prov;
+
+ /**
+ * 组织地址省名称
+ */
+ @TableField(value = "prov_name")
+ private String provName;
+
+ /**
+ * 组织地址市
+ */
+ @TableField(value = "city")
+ private String city;
+
+ /**
+ * 组织地址市名称
+ */
+ @TableField(value = "city_name")
+ private String cityName;
+
+ /**
+ * 组织地址区
+ */
+ @TableField(value = "area")
+ private String area;
+
+ /**
+ * 组织地址区名称
+ */
+ @TableField(value = "area_name")
+ private String areaName;
+
+ /**
+ * 组织地址街道
+ */
+ @TableField(value = "road")
+ private String road;
+
+ /**
+ * 组织地址街道名称
+ */
+ @TableField(value = "road_name")
+ private String roadName;
+
+ /**
+ * 组织地址社区
+ */
+ @TableField(value = "village")
+ private String village;
+
+ /**
+ * 组织地址社区名称
+ */
+ @TableField(value = "village_name")
+ private String villageName;
+
+ /**
+ * 组织详细地址
+ */
+ @TableField(value = "addr")
+ private String addr;
+
+ /**
+ * 组织经度
+ */
+ @TableField(value = "lng")
+ private String lng;
+
+ /**
+ * 组织纬度
+ */
+ @TableField(value = "lat")
+ private String lat;
+
+ /**
+ * 调解专长,多个用,隔开
+ */
+ @TableField(value = "good_field")
+ private String goodField;
+
+ /**
+ * 调解专长名称,多个用,隔开
+ */
+ @TableField(value = "good_field_name")
+ private String goodFieldName;
+
+ /**
+ * 调解范围,多个用,隔开
+ */
+ @TableField(value = "can_field")
+ private String canField;
+
+ /**
+ * 调解范围名称,多个用,隔开
+ */
+ @TableField(value = "can_field_name")
+ private String canFieldName;
+
+ /**
+ * 是否可以找他调(小程序),0:否,1:是
+ */
+ @TableField(value = "find_status")
+ private Integer findStatus;
+
+ /**
+ * 是否参与自动调度,0:否,1:是
+ */
+ @TableField(value = "disp_status")
+ private Integer dispStatus;
+
+ /**
+ * 删除状态,0:已删除,1:未删除
+ */
+ @TableLogic
+ @TableField(value = "delete_status")
+ private Integer deleteStatus;
+
+ /**
+ * 所属客户编号
+ */
+ @TableField(value = "cust_id")
+ private String custId;
+
+ /**
+ * 创建时间
+ */
+ @TableField(value = "create_time")
+ private Date createTime;
+
+ /**
+ * 更新时间
+ */
+ @TableField(value = "update_time")
+ private Date updateTime;
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/po/CtUsepost.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/po/CtUsepost.java
new file mode 100644
index 0000000..b166e46
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/po/CtUsepost.java
@@ -0,0 +1,83 @@
+package cn.huge.module.ctuser.domain.po;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * @title: 客户用户配岗表数据库对应关系类
+ * @description: PO中的属性与数据表是一一对应关系,如需根据业务处理不同,请使用BO对象。
+ * @company:hugeinfo
+ * @author: liyj
+ * @time: 2024-08-17 15:30:57
+ * @version 1.0.0
+ */
+@TableName(value = "dyh_ct_usepost")
+@Data
+public class CtUsepost {
+
+ /**
+ * 配岗编号
+ */
+ @TableId(value = "id")
+ private String id;
+
+ /**
+ * 用户编号
+ */
+ @TableField(value = "user_id")
+ private String userId;
+
+ /**
+ * 岗位编号
+ */
+ @TableField(value = "post_id")
+ private String postId;
+
+ /**
+ * 岗位名称
+ */
+ @TableField(value = "post_name")
+ private String postName;
+
+ /**
+ * 组织编号
+ */
+ @TableField(value = "unit_id")
+ private String unitId;
+
+ /**
+ * 部门编号
+ */
+ @TableField(value = "dept_id")
+ private String deptId;
+
+ /**
+ * 配岗类型,1:主岗,2:兼岗
+ */
+ @TableField(value = "match_type")
+ private Integer matchType;
+
+ /**
+ * 所属客户编号
+ */
+ @TableField(value = "cust_id")
+ private String custId;
+
+ /**
+ * 创建时间
+ */
+ @TableField(value = "create_time")
+ private Date createTime;
+
+ /**
+ * 更新时间
+ */
+ @TableField(value = "update_time")
+ private Date updateTime;
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/po/CtUser.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/po/CtUser.java
new file mode 100644
index 0000000..842f047
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/po/CtUser.java
@@ -0,0 +1,252 @@
+package cn.huge.module.ctuser.domain.po;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * @title: 客户用户表数据库对应关系类
+ * @description: PO中的属性与数据表是一一对应关系,如需根据业务处理不同,请使用BO对象。
+ * @company:hugeinfo
+ * @author: liyj
+ * @time: 2024-08-17 15:30:57
+ * @version 1.0.0
+ */
+@TableName(value = "dyh_ct_user")
+@Data
+public class CtUser {
+
+ /**
+ * 客户用户编号
+ */
+ @TableId(value = "id")
+ private String id;
+
+ /**
+ * 姓名
+ */
+ @TableField(value = "true_name")
+ private String trueName;
+
+ /**
+ * 性别
+ */
+ @TableField(value = "sex")
+ private String sex;
+
+ /**
+ * 性别名称
+ */
+ @TableField(value = "sex_name")
+ private String sexName;
+
+ /**
+ * 手机号码
+ */
+ @TableField(value = "mobile")
+ private String mobile;
+
+ /**
+ * 身份证号
+ */
+ @TableField(value = "idcard")
+ private String idcard;
+
+ /**
+ * 电子邮箱
+ */
+ @TableField(value = "email")
+ private String email;
+
+ /**
+ * 微信号
+ */
+ @TableField(value = "wechat")
+ private String wechat;
+
+ /**
+ * QQ号
+ */
+ @TableField(value = "qq")
+ private String qq;
+
+ /**
+ * 现居地省
+ */
+ @TableField(value = "prov")
+ private String prov;
+
+ /**
+ * 现居地省名称
+ */
+ @TableField(value = "prov_name")
+ private String provName;
+
+ /**
+ * 现居地市
+ */
+ @TableField(value = "city")
+ private String city;
+
+ /**
+ * 现居地市名称
+ */
+ @TableField(value = "city_name")
+ private String cityName;
+
+ /**
+ * 现居地区
+ */
+ @TableField(value = "area")
+ private String area;
+
+ /**
+ * 现居地区名称
+ */
+ @TableField(value = "area_name")
+ private String areaName;
+
+ /**
+ * 现居地街道
+ */
+ @TableField(value = "road")
+ private String road;
+
+ /**
+ * 现居地街道名称
+ */
+ @TableField(value = "road_name")
+ private String roadName;
+
+ /**
+ * 现居地社区
+ */
+ @TableField(value = "village")
+ private String village;
+
+ /**
+ * 现居地社区名称
+ */
+ @TableField(value = "village_name")
+ private String villageName;
+
+ /**
+ * 现居地详细地址
+ */
+ @TableField(value = "addr")
+ private String addr;
+
+ /**
+ * 头像
+ */
+ @TableField(value = "avatar")
+ private String avatar;
+
+ /**
+ * 组织编号
+ */
+ @TableField(value = "unit_id")
+ private String unitId;
+
+ /**
+ * 组织名称
+ */
+ @TableField(value = "unit_name")
+ private String unitName;
+
+ /**
+ * 部门编号
+ */
+ @TableField(value = "dept_id")
+ private String deptId;
+
+ /**
+ * 部门名称
+ */
+ @TableField(value = "dept_name")
+ private String deptName;
+
+ /**
+ * 加入方式,1:系统创建(默认),2:自主申请
+ */
+ @TableField(value = "join_way")
+ private Integer joinWay;
+
+ /**
+ * 实名认证状态,0:未认证,1:已认证
+ */
+ @TableField(value = "real_status")
+ private Integer realStatus;
+
+ /**
+ * 用户状态,1:有效(默认),2:停用,99:离职
+ */
+ @TableField(value = "status")
+ private Integer status;
+
+ /**
+ * 调解专长,多个用,隔开
+ */
+ @TableField(value = "good_field")
+ private String goodField;
+
+ /**
+ * 调解专长名称,多个用,隔开
+ */
+ @TableField(value = "good_field_name")
+ private String goodFieldName;
+
+ /**
+ * 调解范围,多个用,隔开
+ */
+ @TableField(value = "can_field")
+ private String canField;
+
+ /**
+ * 调解范围名称,多个用,隔开
+ */
+ @TableField(value = "can_field_name")
+ private String canFieldName;
+
+ /**
+ * 是否可以找他调(小程序),0:否,1:是
+ */
+ @TableField(value = "find_status")
+ private Integer findStatus;
+
+ /**
+ * 是否参与自动调度,0:否,1:是
+ */
+ @TableField(value = "disp_status")
+ private Integer dispStatus;
+
+ /**
+ * 删除状态,0:已删除(默认),1:未删除
+ */
+ @TableLogic
+ @TableField(value = "delete_status")
+ private Integer deleteStatus;
+
+ /**
+ * 所属客户编号
+ */
+ @TableField(value = "cust_id")
+ private String custId;
+
+ /**
+ * 创建时间
+ */
+ @TableField(value = "create_time")
+ private Date createTime;
+
+ /**
+ * 更新时间
+ */
+ @TableField(value = "update_time")
+ private Date updateTime;
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/po/CtUserole.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/po/CtUserole.java
new file mode 100644
index 0000000..9888ef9
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/domain/po/CtUserole.java
@@ -0,0 +1,71 @@
+package cn.huge.module.ctuser.domain.po;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * @title: 客户用户角色表数据库对应关系类
+ * @description: PO中的属性与数据表是一一对应关系,如需根据业务处理不同,请使用BO对象。
+ * @company:hugeinfo
+ * @author: liyj
+ * @time: 2024-08-17 15:30:57
+ * @version 1.0.0
+ */
+@TableName(value = "dyh_ct_userole")
+@Data
+public class CtUserole {
+
+ /**
+ * 用户角色编号
+ */
+ @TableId(value = "id")
+ private String id;
+
+ /**
+ * 用户编号
+ */
+ @TableField(value = "user_id")
+ private String userId;
+
+ /**
+ * 角色编号
+ */
+ @TableField(value = "role_id")
+ private String roleId;
+
+ /**
+ * 角色代码
+ */
+ @TableField(value = "role_code")
+ private String roleCode;
+
+ /**
+ * 角色名称
+ */
+ @TableField(value = "role_name")
+ private String roleName;
+
+ /**
+ * 顾客编号
+ */
+ @TableField(value = "cust_id")
+ private String custId;
+
+ /**
+ * 创建时间
+ */
+ @TableField(value = "create_time")
+ private Date createTime;
+
+ /**
+ * 更新时间
+ */
+ @TableField(value = "update_time")
+ private Date updateTime;
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtAccountService.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtAccountService.java
new file mode 100644
index 0000000..edd2bca
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtAccountService.java
@@ -0,0 +1,133 @@
+package cn.huge.module.ctuser.service;
+
+import cn.huge.base.common.exception.ServiceException;
+import cn.huge.base.common.utils.DateUtils;
+import cn.huge.base.common.utils.IdUtils;
+import cn.huge.module.client.api.impl.UtilsClientImpl;
+import cn.huge.module.ctuser.dao.mapper.CtAccountMapper;
+import cn.huge.module.ctuser.domain.po.CtAccount;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.PageImpl;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.PostConstruct;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @title: 客户用户账号表业务逻辑处理
+ * @Description 客户用户账号表业务逻辑处理
+ * @company hugeinfo
+ * @author liyj
+ * @Time 2024-08-17 15:30:56
+ * @version 1.0.0
+ */
+@Slf4j
+@Service
+@Transactional(rollbackFor = Exception.class)
+public class CtAccountService extends ServiceImpl<CtAccountMapper, CtAccount>{
+
+ @Autowired
+ private CtAccountMapper mapper;
+
+ @Autowired
+ private UtilsClientImpl utilsClient;
+
+ /**
+ * 更新对象
+ * @param entity 对象
+ */
+ public void updateCtAccount(CtAccount entity){
+ try{
+ mapper.updateCtAccount(entity);
+ }catch (Exception e){
+ log.error("[CtAccountService.updateCtAccount]调用失败,异常信息:"+e, e);
+ throw new ServiceException("CtAccountService.updateCtAccount", e);
+ }
+ }
+
+ /**
+ * 条件更新对象
+ * @param entity 对象
+ * @param terms 条件
+ */
+ public void updateCtAccountTerms(CtAccount entity, Map<String, Object> terms){
+ try{
+ mapper.updateCtAccountTerms(entity, terms);
+ }catch (Exception e){
+ log.error("[CtAccountService.updateCtAccountTerms]调用失败,异常信息:"+e, e);
+ throw new ServiceException("CtAccountService.updateCtAccountTerms", e);
+ }
+ }
+
+ /**
+ * 根据编号物理删除
+ * @param id 查询条件集合
+ */
+ public void deleteCtAccount(String id){
+ try{
+ mapper.deleteCtAccount(id);
+ }catch (Exception e){
+ log.error("[CtAccountService.deleteCtAccount]调用失败,异常信息:"+e, e);
+ throw new ServiceException("CtAccountService.deleteCtAccount", e);
+ }
+ }
+
+ /**
+ * 按条件查询
+ * @param terms 条件
+ * @return List
+ */
+ public List<CtAccount> listTerms(Map<String, Object> terms){
+ return mapper.listTerms(terms);
+ }
+
+ /**
+ * 按条件统计
+ * @param terms 条件
+ * @return long
+ */
+ public long countTerms(Map<String, Object> terms){
+ return mapper.countTerms(terms);
+ }
+
+ /**
+ * 按条件分页查询
+ * @param page 分页对象
+ * @param terms 条件
+ * @return Page
+ */
+ public Page<CtAccount> pageQuery(PageRequest page, Map<String, Object> terms){
+ long total = mapper.countTerms(terms);
+ List<CtAccount> content = mapper.pageTerms(page, terms);
+ return new PageImpl<CtAccount>(content, page, total);
+ }
+
+ /**
+ * 新增或更新对象
+ * @param ctAccount 实体对象
+ */
+ public void saveCtAccount(CtAccount ctAccount){
+ try{
+ Date nowDate = DateUtils.getMowDate();
+ // 判断是否新增
+ if (IdUtils.checkNewId(ctAccount.getId())){
+ ctAccount.setId(utilsClient.getNewTimeId());
+ ctAccount.setCreateTime(nowDate);
+ }
+ ctAccount.setUpdateTime(nowDate);
+ this.saveOrUpdate(ctAccount);
+ }catch (Exception e){
+ log.error("[CtAccountService.saveCtAccount]调用失败,异常信息:"+e, e);
+ throw new ServiceException("CtAccountService.saveCtAccount", e);
+ }
+ }
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtDeptService.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtDeptService.java
new file mode 100644
index 0000000..5cf56f2
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtDeptService.java
@@ -0,0 +1,133 @@
+package cn.huge.module.ctuser.service;
+
+import cn.huge.base.common.exception.ServiceException;
+import cn.huge.base.common.utils.DateUtils;
+import cn.huge.base.common.utils.IdUtils;
+import cn.huge.module.client.api.impl.UtilsClientImpl;
+import cn.huge.module.ctuser.dao.mapper.CtDeptMapper;
+import cn.huge.module.ctuser.domain.po.CtDept;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.PageImpl;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.PostConstruct;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @title: 客户部门表业务逻辑处理
+ * @Description 客户部门表业务逻辑处理
+ * @company hugeinfo
+ * @author liyj
+ * @Time 2024-08-17 15:30:57
+ * @version 1.0.0
+ */
+@Slf4j
+@Service
+@Transactional(rollbackFor = Exception.class)
+public class CtDeptService extends ServiceImpl<CtDeptMapper, CtDept>{
+
+ @Autowired
+ private CtDeptMapper mapper;
+
+ @Autowired
+ private UtilsClientImpl utilsClient;
+
+ /**
+ * 更新对象
+ * @param entity 对象
+ */
+ public void updateCtDept(CtDept entity){
+ try{
+ mapper.updateCtDept(entity);
+ }catch (Exception e){
+ log.error("[CtDeptService.updateCtDept]调用失败,异常信息:"+e, e);
+ throw new ServiceException("CtDeptService.updateCtDept", e);
+ }
+ }
+
+ /**
+ * 条件更新对象
+ * @param entity 对象
+ * @param terms 条件
+ */
+ public void updateCtDeptTerms(CtDept entity, Map<String, Object> terms){
+ try{
+ mapper.updateCtDeptTerms(entity, terms);
+ }catch (Exception e){
+ log.error("[CtDeptService.updateCtDeptTerms]调用失败,异常信息:"+e, e);
+ throw new ServiceException("CtDeptService.updateCtDeptTerms", e);
+ }
+ }
+
+ /**
+ * 根据编号物理删除
+ * @param id 查询条件集合
+ */
+ public void deleteCtDept(String id){
+ try{
+ mapper.deleteCtDept(id);
+ }catch (Exception e){
+ log.error("[CtDeptService.deleteCtDept]调用失败,异常信息:"+e, e);
+ throw new ServiceException("CtDeptService.deleteCtDept", e);
+ }
+ }
+
+ /**
+ * 按条件查询
+ * @param terms 条件
+ * @return List
+ */
+ public List<CtDept> listTerms(Map<String, Object> terms){
+ return mapper.listTerms(terms);
+ }
+
+ /**
+ * 按条件统计
+ * @param terms 条件
+ * @return long
+ */
+ public long countTerms(Map<String, Object> terms){
+ return mapper.countTerms(terms);
+ }
+
+ /**
+ * 按条件分页查询
+ * @param page 分页对象
+ * @param terms 条件
+ * @return Page
+ */
+ public Page<CtDept> pageQuery(PageRequest page, Map<String, Object> terms){
+ long total = mapper.countTerms(terms);
+ List<CtDept> content = mapper.pageTerms(page, terms);
+ return new PageImpl<CtDept>(content, page, total);
+ }
+
+ /**
+ * 新增或更新对象
+ * @param ctDept 实体对象
+ */
+ public void saveCtDept(CtDept ctDept){
+ try{
+ Date nowDate = DateUtils.getMowDate();
+ // 判断是否新增
+ if (IdUtils.checkNewId(ctDept.getId())){
+ ctDept.setId(utilsClient.getNewTimeId());
+ ctDept.setCreateTime(nowDate);
+ }
+ ctDept.setUpdateTime(nowDate);
+ this.saveOrUpdate(ctDept);
+ }catch (Exception e){
+ log.error("[CtDeptService.saveCtDept]调用失败,异常信息:"+e, e);
+ throw new ServiceException("CtDeptService.saveCtDept", e);
+ }
+ }
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtPostService.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtPostService.java
new file mode 100644
index 0000000..9dacb4a
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtPostService.java
@@ -0,0 +1,133 @@
+package cn.huge.module.ctuser.service;
+
+import cn.huge.base.common.exception.ServiceException;
+import cn.huge.base.common.utils.DateUtils;
+import cn.huge.base.common.utils.IdUtils;
+import cn.huge.module.client.api.impl.UtilsClientImpl;
+import cn.huge.module.ctuser.dao.mapper.CtPostMapper;
+import cn.huge.module.ctuser.domain.po.CtPost;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.PageImpl;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.PostConstruct;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @title: 客户岗位表业务逻辑处理
+ * @Description 客户岗位表业务逻辑处理
+ * @company hugeinfo
+ * @author liyj
+ * @Time 2024-08-17 15:30:57
+ * @version 1.0.0
+ */
+@Slf4j
+@Service
+@Transactional(rollbackFor = Exception.class)
+public class CtPostService extends ServiceImpl<CtPostMapper, CtPost>{
+
+ @Autowired
+ private CtPostMapper mapper;
+
+ @Autowired
+ private UtilsClientImpl utilsClient;
+
+ /**
+ * 更新对象
+ * @param entity 对象
+ */
+ public void updateCtPost(CtPost entity){
+ try{
+ mapper.updateCtPost(entity);
+ }catch (Exception e){
+ log.error("[CtPostService.updateCtPost]调用失败,异常信息:"+e, e);
+ throw new ServiceException("CtPostService.updateCtPost", e);
+ }
+ }
+
+ /**
+ * 条件更新对象
+ * @param entity 对象
+ * @param terms 条件
+ */
+ public void updateCtPostTerms(CtPost entity, Map<String, Object> terms){
+ try{
+ mapper.updateCtPostTerms(entity, terms);
+ }catch (Exception e){
+ log.error("[CtPostService.updateCtPostTerms]调用失败,异常信息:"+e, e);
+ throw new ServiceException("CtPostService.updateCtPostTerms", e);
+ }
+ }
+
+ /**
+ * 根据编号物理删除
+ * @param id 查询条件集合
+ */
+ public void deleteCtPost(String id){
+ try{
+ mapper.deleteCtPost(id);
+ }catch (Exception e){
+ log.error("[CtPostService.deleteCtPost]调用失败,异常信息:"+e, e);
+ throw new ServiceException("CtPostService.deleteCtPost", e);
+ }
+ }
+
+ /**
+ * 按条件查询
+ * @param terms 条件
+ * @return List
+ */
+ public List<CtPost> listTerms(Map<String, Object> terms){
+ return mapper.listTerms(terms);
+ }
+
+ /**
+ * 按条件统计
+ * @param terms 条件
+ * @return long
+ */
+ public long countTerms(Map<String, Object> terms){
+ return mapper.countTerms(terms);
+ }
+
+ /**
+ * 按条件分页查询
+ * @param page 分页对象
+ * @param terms 条件
+ * @return Page
+ */
+ public Page<CtPost> pageQuery(PageRequest page, Map<String, Object> terms){
+ long total = mapper.countTerms(terms);
+ List<CtPost> content = mapper.pageTerms(page, terms);
+ return new PageImpl<CtPost>(content, page, total);
+ }
+
+ /**
+ * 新增或更新对象
+ * @param ctPost 实体对象
+ */
+ public void saveCtPost(CtPost ctPost){
+ try{
+ Date nowDate = DateUtils.getMowDate();
+ // 判断是否新增
+ if (IdUtils.checkNewId(ctPost.getId())){
+ ctPost.setId(utilsClient.getNewTimeId());
+ ctPost.setCreateTime(nowDate);
+ }
+ ctPost.setUpdateTime(nowDate);
+ this.saveOrUpdate(ctPost);
+ }catch (Exception e){
+ log.error("[CtPostService.saveCtPost]调用失败,异常信息:"+e, e);
+ throw new ServiceException("CtPostService.saveCtPost", e);
+ }
+ }
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtUnitService.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtUnitService.java
new file mode 100644
index 0000000..6b35afe
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtUnitService.java
@@ -0,0 +1,133 @@
+package cn.huge.module.ctuser.service;
+
+import cn.huge.base.common.exception.ServiceException;
+import cn.huge.base.common.utils.DateUtils;
+import cn.huge.base.common.utils.IdUtils;
+import cn.huge.module.client.api.impl.UtilsClientImpl;
+import cn.huge.module.ctuser.dao.mapper.CtUnitMapper;
+import cn.huge.module.ctuser.domain.po.CtUnit;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.PageImpl;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.PostConstruct;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @title: 客户组织信息表业务逻辑处理
+ * @Description 客户组织信息表业务逻辑处理
+ * @company hugeinfo
+ * @author liyj
+ * @Time 2024-08-17 15:30:57
+ * @version 1.0.0
+ */
+@Slf4j
+@Service
+@Transactional(rollbackFor = Exception.class)
+public class CtUnitService extends ServiceImpl<CtUnitMapper, CtUnit>{
+
+ @Autowired
+ private CtUnitMapper mapper;
+
+ @Autowired
+ private UtilsClientImpl utilsClient;
+
+ /**
+ * 更新对象
+ * @param entity 对象
+ */
+ public void updateCtUnit(CtUnit entity){
+ try{
+ mapper.updateCtUnit(entity);
+ }catch (Exception e){
+ log.error("[CtUnitService.updateCtUnit]调用失败,异常信息:"+e, e);
+ throw new ServiceException("CtUnitService.updateCtUnit", e);
+ }
+ }
+
+ /**
+ * 条件更新对象
+ * @param entity 对象
+ * @param terms 条件
+ */
+ public void updateCtUnitTerms(CtUnit entity, Map<String, Object> terms){
+ try{
+ mapper.updateCtUnitTerms(entity, terms);
+ }catch (Exception e){
+ log.error("[CtUnitService.updateCtUnitTerms]调用失败,异常信息:"+e, e);
+ throw new ServiceException("CtUnitService.updateCtUnitTerms", e);
+ }
+ }
+
+ /**
+ * 根据编号物理删除
+ * @param id 查询条件集合
+ */
+ public void deleteCtUnit(String id){
+ try{
+ mapper.deleteCtUnit(id);
+ }catch (Exception e){
+ log.error("[CtUnitService.deleteCtUnit]调用失败,异常信息:"+e, e);
+ throw new ServiceException("CtUnitService.deleteCtUnit", e);
+ }
+ }
+
+ /**
+ * 按条件查询
+ * @param terms 条件
+ * @return List
+ */
+ public List<CtUnit> listTerms(Map<String, Object> terms){
+ return mapper.listTerms(terms);
+ }
+
+ /**
+ * 按条件统计
+ * @param terms 条件
+ * @return long
+ */
+ public long countTerms(Map<String, Object> terms){
+ return mapper.countTerms(terms);
+ }
+
+ /**
+ * 按条件分页查询
+ * @param page 分页对象
+ * @param terms 条件
+ * @return Page
+ */
+ public Page<CtUnit> pageQuery(PageRequest page, Map<String, Object> terms){
+ long total = mapper.countTerms(terms);
+ List<CtUnit> content = mapper.pageTerms(page, terms);
+ return new PageImpl<CtUnit>(content, page, total);
+ }
+
+ /**
+ * 新增或更新对象
+ * @param ctUnit 实体对象
+ */
+ public void saveCtUnit(CtUnit ctUnit){
+ try{
+ Date nowDate = DateUtils.getMowDate();
+ // 判断是否新增
+ if (IdUtils.checkNewId(ctUnit.getId())){
+ ctUnit.setId(utilsClient.getNewTimeId());
+ ctUnit.setCreateTime(nowDate);
+ }
+ ctUnit.setUpdateTime(nowDate);
+ this.saveOrUpdate(ctUnit);
+ }catch (Exception e){
+ log.error("[CtUnitService.saveCtUnit]调用失败,异常信息:"+e, e);
+ throw new ServiceException("CtUnitService.saveCtUnit", e);
+ }
+ }
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtUsepostService.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtUsepostService.java
new file mode 100644
index 0000000..157f6f8
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtUsepostService.java
@@ -0,0 +1,133 @@
+package cn.huge.module.ctuser.service;
+
+import cn.huge.base.common.exception.ServiceException;
+import cn.huge.base.common.utils.DateUtils;
+import cn.huge.base.common.utils.IdUtils;
+import cn.huge.module.client.api.impl.UtilsClientImpl;
+import cn.huge.module.ctuser.dao.mapper.CtUsepostMapper;
+import cn.huge.module.ctuser.domain.po.CtUsepost;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.PageImpl;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.PostConstruct;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @title: 客户用户配岗表业务逻辑处理
+ * @Description 客户用户配岗表业务逻辑处理
+ * @company hugeinfo
+ * @author liyj
+ * @Time 2024-08-17 15:30:57
+ * @version 1.0.0
+ */
+@Slf4j
+@Service
+@Transactional(rollbackFor = Exception.class)
+public class CtUsepostService extends ServiceImpl<CtUsepostMapper, CtUsepost>{
+
+ @Autowired
+ private CtUsepostMapper mapper;
+
+ @Autowired
+ private UtilsClientImpl utilsClient;
+
+ /**
+ * 更新对象
+ * @param entity 对象
+ */
+ public void updateCtUsepost(CtUsepost entity){
+ try{
+ mapper.updateCtUsepost(entity);
+ }catch (Exception e){
+ log.error("[CtUsepostService.updateCtUsepost]调用失败,异常信息:"+e, e);
+ throw new ServiceException("CtUsepostService.updateCtUsepost", e);
+ }
+ }
+
+ /**
+ * 条件更新对象
+ * @param entity 对象
+ * @param terms 条件
+ */
+ public void updateCtUsepostTerms(CtUsepost entity, Map<String, Object> terms){
+ try{
+ mapper.updateCtUsepostTerms(entity, terms);
+ }catch (Exception e){
+ log.error("[CtUsepostService.updateCtUsepostTerms]调用失败,异常信息:"+e, e);
+ throw new ServiceException("CtUsepostService.updateCtUsepostTerms", e);
+ }
+ }
+
+ /**
+ * 根据编号物理删除
+ * @param id 查询条件集合
+ */
+ public void deleteCtUsepost(String id){
+ try{
+ mapper.deleteCtUsepost(id);
+ }catch (Exception e){
+ log.error("[CtUsepostService.deleteCtUsepost]调用失败,异常信息:"+e, e);
+ throw new ServiceException("CtUsepostService.deleteCtUsepost", e);
+ }
+ }
+
+ /**
+ * 按条件查询
+ * @param terms 条件
+ * @return List
+ */
+ public List<CtUsepost> listTerms(Map<String, Object> terms){
+ return mapper.listTerms(terms);
+ }
+
+ /**
+ * 按条件统计
+ * @param terms 条件
+ * @return long
+ */
+ public long countTerms(Map<String, Object> terms){
+ return mapper.countTerms(terms);
+ }
+
+ /**
+ * 按条件分页查询
+ * @param page 分页对象
+ * @param terms 条件
+ * @return Page
+ */
+ public Page<CtUsepost> pageQuery(PageRequest page, Map<String, Object> terms){
+ long total = mapper.countTerms(terms);
+ List<CtUsepost> content = mapper.pageTerms(page, terms);
+ return new PageImpl<CtUsepost>(content, page, total);
+ }
+
+ /**
+ * 新增或更新对象
+ * @param ctUsepost 实体对象
+ */
+ public void saveCtUsepost(CtUsepost ctUsepost){
+ try{
+ Date nowDate = DateUtils.getMowDate();
+ // 判断是否新增
+ if (IdUtils.checkNewId(ctUsepost.getId())){
+ ctUsepost.setId(utilsClient.getNewTimeId());
+ ctUsepost.setCreateTime(nowDate);
+ }
+ ctUsepost.setUpdateTime(nowDate);
+ this.saveOrUpdate(ctUsepost);
+ }catch (Exception e){
+ log.error("[CtUsepostService.saveCtUsepost]调用失败,异常信息:"+e, e);
+ throw new ServiceException("CtUsepostService.saveCtUsepost", e);
+ }
+ }
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtUserService.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtUserService.java
new file mode 100644
index 0000000..7bbf41b
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtUserService.java
@@ -0,0 +1,133 @@
+package cn.huge.module.ctuser.service;
+
+import cn.huge.base.common.exception.ServiceException;
+import cn.huge.base.common.utils.DateUtils;
+import cn.huge.base.common.utils.IdUtils;
+import cn.huge.module.client.api.impl.UtilsClientImpl;
+import cn.huge.module.ctuser.dao.mapper.CtUserMapper;
+import cn.huge.module.ctuser.domain.po.CtUser;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.PageImpl;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.PostConstruct;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @title: 客户用户表业务逻辑处理
+ * @Description 客户用户表业务逻辑处理
+ * @company hugeinfo
+ * @author liyj
+ * @Time 2024-08-17 15:30:57
+ * @version 1.0.0
+ */
+@Slf4j
+@Service
+@Transactional(rollbackFor = Exception.class)
+public class CtUserService extends ServiceImpl<CtUserMapper, CtUser>{
+
+ @Autowired
+ private CtUserMapper mapper;
+
+ @Autowired
+ private UtilsClientImpl utilsClient;
+
+ /**
+ * 更新对象
+ * @param entity 对象
+ */
+ public void updateCtUser(CtUser entity){
+ try{
+ mapper.updateCtUser(entity);
+ }catch (Exception e){
+ log.error("[CtUserService.updateCtUser]调用失败,异常信息:"+e, e);
+ throw new ServiceException("CtUserService.updateCtUser", e);
+ }
+ }
+
+ /**
+ * 条件更新对象
+ * @param entity 对象
+ * @param terms 条件
+ */
+ public void updateCtUserTerms(CtUser entity, Map<String, Object> terms){
+ try{
+ mapper.updateCtUserTerms(entity, terms);
+ }catch (Exception e){
+ log.error("[CtUserService.updateCtUserTerms]调用失败,异常信息:"+e, e);
+ throw new ServiceException("CtUserService.updateCtUserTerms", e);
+ }
+ }
+
+ /**
+ * 根据编号物理删除
+ * @param id 查询条件集合
+ */
+ public void deleteCtUser(String id){
+ try{
+ mapper.deleteCtUser(id);
+ }catch (Exception e){
+ log.error("[CtUserService.deleteCtUser]调用失败,异常信息:"+e, e);
+ throw new ServiceException("CtUserService.deleteCtUser", e);
+ }
+ }
+
+ /**
+ * 按条件查询
+ * @param terms 条件
+ * @return List
+ */
+ public List<CtUser> listTerms(Map<String, Object> terms){
+ return mapper.listTerms(terms);
+ }
+
+ /**
+ * 按条件统计
+ * @param terms 条件
+ * @return long
+ */
+ public long countTerms(Map<String, Object> terms){
+ return mapper.countTerms(terms);
+ }
+
+ /**
+ * 按条件分页查询
+ * @param page 分页对象
+ * @param terms 条件
+ * @return Page
+ */
+ public Page<CtUser> pageQuery(PageRequest page, Map<String, Object> terms){
+ long total = mapper.countTerms(terms);
+ List<CtUser> content = mapper.pageTerms(page, terms);
+ return new PageImpl<CtUser>(content, page, total);
+ }
+
+ /**
+ * 新增或更新对象
+ * @param ctUser 实体对象
+ */
+ public void saveCtUser(CtUser ctUser){
+ try{
+ Date nowDate = DateUtils.getMowDate();
+ // 判断是否新增
+ if (IdUtils.checkNewId(ctUser.getId())){
+ ctUser.setId(utilsClient.getNewTimeId());
+ ctUser.setCreateTime(nowDate);
+ }
+ ctUser.setUpdateTime(nowDate);
+ this.saveOrUpdate(ctUser);
+ }catch (Exception e){
+ log.error("[CtUserService.saveCtUser]调用失败,异常信息:"+e, e);
+ throw new ServiceException("CtUserService.saveCtUser", e);
+ }
+ }
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtUseroleService.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtUseroleService.java
new file mode 100644
index 0000000..9abd698
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtUseroleService.java
@@ -0,0 +1,133 @@
+package cn.huge.module.ctuser.service;
+
+import cn.huge.base.common.exception.ServiceException;
+import cn.huge.base.common.utils.DateUtils;
+import cn.huge.base.common.utils.IdUtils;
+import cn.huge.module.client.api.impl.UtilsClientImpl;
+import cn.huge.module.ctuser.dao.mapper.CtUseroleMapper;
+import cn.huge.module.ctuser.domain.po.CtUserole;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.PageImpl;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.PostConstruct;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @title: 客户用户角色表业务逻辑处理
+ * @Description 客户用户角色表业务逻辑处理
+ * @company hugeinfo
+ * @author liyj
+ * @Time 2024-08-17 15:30:57
+ * @version 1.0.0
+ */
+@Slf4j
+@Service
+@Transactional(rollbackFor = Exception.class)
+public class CtUseroleService extends ServiceImpl<CtUseroleMapper, CtUserole>{
+
+ @Autowired
+ private CtUseroleMapper mapper;
+
+ @Autowired
+ private UtilsClientImpl utilsClient;
+
+ /**
+ * 更新对象
+ * @param entity 对象
+ */
+ public void updateCtUserole(CtUserole entity){
+ try{
+ mapper.updateCtUserole(entity);
+ }catch (Exception e){
+ log.error("[CtUseroleService.updateCtUserole]调用失败,异常信息:"+e, e);
+ throw new ServiceException("CtUseroleService.updateCtUserole", e);
+ }
+ }
+
+ /**
+ * 条件更新对象
+ * @param entity 对象
+ * @param terms 条件
+ */
+ public void updateCtUseroleTerms(CtUserole entity, Map<String, Object> terms){
+ try{
+ mapper.updateCtUseroleTerms(entity, terms);
+ }catch (Exception e){
+ log.error("[CtUseroleService.updateCtUseroleTerms]调用失败,异常信息:"+e, e);
+ throw new ServiceException("CtUseroleService.updateCtUseroleTerms", e);
+ }
+ }
+
+ /**
+ * 根据编号物理删除
+ * @param id 查询条件集合
+ */
+ public void deleteCtUserole(String id){
+ try{
+ mapper.deleteCtUserole(id);
+ }catch (Exception e){
+ log.error("[CtUseroleService.deleteCtUserole]调用失败,异常信息:"+e, e);
+ throw new ServiceException("CtUseroleService.deleteCtUserole", e);
+ }
+ }
+
+ /**
+ * 按条件查询
+ * @param terms 条件
+ * @return List
+ */
+ public List<CtUserole> listTerms(Map<String, Object> terms){
+ return mapper.listTerms(terms);
+ }
+
+ /**
+ * 按条件统计
+ * @param terms 条件
+ * @return long
+ */
+ public long countTerms(Map<String, Object> terms){
+ return mapper.countTerms(terms);
+ }
+
+ /**
+ * 按条件分页查询
+ * @param page 分页对象
+ * @param terms 条件
+ * @return Page
+ */
+ public Page<CtUserole> pageQuery(PageRequest page, Map<String, Object> terms){
+ long total = mapper.countTerms(terms);
+ List<CtUserole> content = mapper.pageTerms(page, terms);
+ return new PageImpl<CtUserole>(content, page, total);
+ }
+
+ /**
+ * 新增或更新对象
+ * @param ctUserole 实体对象
+ */
+ public void saveCtUserole(CtUserole ctUserole){
+ try{
+ Date nowDate = DateUtils.getMowDate();
+ // 判断是否新增
+ if (IdUtils.checkNewId(ctUserole.getId())){
+ ctUserole.setId(utilsClient.getNewTimeId());
+ ctUserole.setCreateTime(nowDate);
+ }
+ ctUserole.setUpdateTime(nowDate);
+ this.saveOrUpdate(ctUserole);
+ }catch (Exception e){
+ log.error("[CtUseroleService.saveCtUserole]调用失败,异常信息:"+e, e);
+ throw new ServiceException("CtUseroleService.saveCtUserole", e);
+ }
+ }
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/controller/web/PaAccountWebController.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/controller/web/PaAccountWebController.java
new file mode 100644
index 0000000..c469ead
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/controller/web/PaAccountWebController.java
@@ -0,0 +1,204 @@
+package cn.huge.module.pauser.controller;
+
+import cn.huge.base.common.utils.ReturnFailUtils;
+import cn.huge.base.common.utils.ReturnSucUtils;
+import cn.huge.module.pauser.domain.po.PaAccount;
+import cn.huge.module.pauser.service.PaAccountService;
+import com.google.common.collect.Maps;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.data.domain.Sort;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.Map;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+/**
+ * @title: 公众用户账号表接口api
+ * @description: 公众用户账号表接口api
+ * @company: hugeinfo
+ * @author: liyj
+ * @time: 2024-08-17 15:33:41
+ * @version: 1.0.0
+ */
+@Slf4j
+@RestController
+@RequestMapping("/api/web/paAccount")
+public class PaAccountWebController {
+
+ @Autowired(required = false)
+ private HttpServletRequest request;
+
+ @Autowired
+ private PaAccountService service;
+
+ /**
+ * 获取请求URL参数
+ * @return Map<String, Object>
+ */
+ private Map<String, Object> getParameter(){
+ Map<String, Object> terms = Maps.newHashMap();
+ // 账号编号
+ String id = request.getParameter("id");
+ if (StringUtils.isNotBlank(id)){
+ terms.put("id", id);
+ }
+ // 当事人编号
+ String userId = request.getParameter("userId");
+ if (StringUtils.isNotBlank(userId)){
+ terms.put("userId", userId);
+ }
+ // 帐号类型,1:平台web端,2:平台小程序
+ String accType = request.getParameter("accType");
+ if (StringUtils.isNotBlank(accType)){
+ terms.put("accType", accType);
+ }
+ // 身份唯一标识(存储唯一标识,比如账号、邮箱、手机号、第三方获取的唯一标识等)
+ String acc = request.getParameter("acc");
+ if (StringUtils.isNotBlank(acc)){
+ terms.put("acc", acc);
+ }
+ // 授权凭证(比如密码 、第三方登录的token、授权账号等)
+ String cipher = request.getParameter("cipher");
+ if (StringUtils.isNotBlank(cipher)){
+ terms.put("cipher", cipher);
+ }
+ // 授权凭证明文
+ String cipherOpen = request.getParameter("cipherOpen");
+ if (StringUtils.isNotBlank(cipherOpen)){
+ terms.put("cipherOpen", cipherOpen);
+ }
+ // 密码最新更新时间
+ String cipherTime = request.getParameter("cipherTime");
+ if (StringUtils.isNotBlank(cipherTime)){
+ terms.put("cipherTime", cipherTime);
+ }
+ // 最新登录时间
+ String loginTime = request.getParameter("loginTime");
+ if (StringUtils.isNotBlank(loginTime)){
+ terms.put("loginTime", loginTime);
+ }
+ // 限制登录时间(密码错误次数超过限制,默认30分钟)
+ String limitTime = request.getParameter("limitTime");
+ if (StringUtils.isNotBlank(limitTime)){
+ terms.put("limitTime", limitTime);
+ }
+ // 删除状态,0:已删除,1:未删除
+ String deleteStatus = request.getParameter("deleteStatus");
+ if (StringUtils.isNotBlank(deleteStatus)){
+ terms.put("deleteStatus", deleteStatus);
+ }
+ // 客户编号
+ String custId = request.getParameter("custId");
+ if (StringUtils.isNotBlank(custId)){
+ terms.put("custId", custId);
+ }
+ // 创建时间区间
+ String createStart = request.getParameter("createStart");
+ String createEnd = request.getParameter("createEnd");
+ if(StringUtils.isNotBlank(createStart) && StringUtils.isNotBlank(createEnd)) {
+ terms.put("createStart", createStart);
+ terms.put("createEnd", createEnd);
+ }
+ // 更新时间区间
+ String updateStart = request.getParameter("updateStart");
+ String updateEnd = request.getParameter("updateEnd");
+ if(StringUtils.isNotBlank(updateStart) && StringUtils.isNotBlank(updateEnd)) {
+ terms.put("updateStart", updateStart);
+ terms.put("updateEnd", updateEnd);
+ }
+ return terms;
+ }
+
+ /**
+ * 条件查询多个
+ * @url {ctx}/api/web/paAccount/listQuery
+ * @return Object
+ */
+ @GetMapping("/listQuery")
+ public Object listQuery() {
+ try {
+ Map<String, Object> terms = getParameter();
+ return ReturnSucUtils.getRepInfo(service.listTerms(terms));
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+ /**
+ * 条件分页查询
+ * @url {ctx}/api/web/paAccount/pageQuery
+ * @param page 页码
+ * @param size 每页数量
+ * @return Object
+ */
+ @GetMapping("/pageQuery")
+ public Object pageQuery(@RequestParam(value = "page") int page, @RequestParam(value = "size") int size) {
+ try {
+ Map<String, Object> terms = getParameter();
+ Sort sort = Sort.by(Sort.Direction.DESC, "create_time");
+ PageRequest pageRequest = PageRequest.of(page-1, size, sort);
+ Page<PaAccount> paAccountPage = service.pageQuery(pageRequest, terms);
+ return ReturnSucUtils.getRepInfo( "处理成功", paAccountPage);
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+ /**
+ * 根据编号查询单个
+ * @url {ctx}/api/web/paAccount/getById
+ * @param id 主键编号
+ * @return Object
+ */
+ @GetMapping("/getById")
+ public Object getById(@RequestParam(value = "id") String id) {
+ try {
+ return ReturnSucUtils.getRepInfo(service.getById(id));
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+ /**
+ * 根据主键单个/批量删除
+ * @url {ctx}/api/web/paAccount/deleteByIds
+ * @param ids 主键编号
+ * @return Object
+ */
+ @GetMapping("/deleteByIds")
+ public Object deleteByIds(@RequestParam(value = "ids") String ids) {
+ try {
+ if (ids.indexOf(",") != -1) {
+ service.removeByIds(Stream.of(ids.split(",")).collect(Collectors.toList()));
+ }else{
+ service.removeById(ids);
+ }
+ return ReturnSucUtils.getRepInfo();
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+ /**
+ * 新增或更新对象
+ * @url {ctx}/api/web/paAccount/savePaAccount
+ * @param paAccount 实体对象
+ * @return Object
+ */
+ @PostMapping("/savePaAccount")
+ public Object savePaAccount(@RequestBody PaAccount paAccount) {
+ try {
+ service.savePaAccount(paAccount);
+ return ReturnSucUtils.getRepInfo();
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/controller/web/PaUserWebController.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/controller/web/PaUserWebController.java
new file mode 100644
index 0000000..ead1690
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/controller/web/PaUserWebController.java
@@ -0,0 +1,279 @@
+package cn.huge.module.pauser.controller;
+
+import cn.huge.base.common.utils.ReturnFailUtils;
+import cn.huge.base.common.utils.ReturnSucUtils;
+import cn.huge.module.pauser.domain.po.PaUser;
+import cn.huge.module.pauser.service.PaUserService;
+import com.google.common.collect.Maps;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.data.domain.Sort;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.Map;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+/**
+ * @title: 公众用户表接口api
+ * @description: 公众用户表接口api
+ * @company: hugeinfo
+ * @author: liyj
+ * @time: 2024-08-17 15:33:42
+ * @version: 1.0.0
+ */
+@Slf4j
+@RestController
+@RequestMapping("/api/web/paUser")
+public class PaUserWebController {
+
+ @Autowired(required = false)
+ private HttpServletRequest request;
+
+ @Autowired
+ private PaUserService service;
+
+ /**
+ * 获取请求URL参数
+ * @return Map<String, Object>
+ */
+ private Map<String, Object> getParameter(){
+ Map<String, Object> terms = Maps.newHashMap();
+ // 当事人编号
+ String id = request.getParameter("id");
+ if (StringUtils.isNotBlank(id)){
+ terms.put("id", id);
+ }
+ // 姓名
+ String trueName = request.getParameter("trueName");
+ if (StringUtils.isNotBlank(trueName)){
+ terms.put("trueName", trueName);
+ }
+ // 性别
+ String sex = request.getParameter("sex");
+ if (StringUtils.isNotBlank(sex)){
+ terms.put("sex", sex);
+ }
+ // 性别名称
+ String sexName = request.getParameter("sexName");
+ if (StringUtils.isNotBlank(sexName)){
+ terms.put("sexName", sexName);
+ }
+ // 手机号码
+ String mobile = request.getParameter("mobile");
+ if (StringUtils.isNotBlank(mobile)){
+ terms.put("mobile", mobile);
+ }
+ // 身份证号码
+ String idcard = request.getParameter("idcard");
+ if (StringUtils.isNotBlank(idcard)){
+ terms.put("idcard", idcard);
+ }
+ // 电子邮箱
+ String email = request.getParameter("email");
+ if (StringUtils.isNotBlank(email)){
+ terms.put("email", email);
+ }
+ // 微信号
+ String wechat = request.getParameter("wechat");
+ if (StringUtils.isNotBlank(wechat)){
+ terms.put("wechat", wechat);
+ }
+ // QQ号
+ String qq = request.getParameter("qq");
+ if (StringUtils.isNotBlank(qq)){
+ terms.put("qq", qq);
+ }
+ // 现居地省
+ String prov = request.getParameter("prov");
+ if (StringUtils.isNotBlank(prov)){
+ terms.put("prov", prov);
+ }
+ // 现居地省名称
+ String provName = request.getParameter("provName");
+ if (StringUtils.isNotBlank(provName)){
+ terms.put("provName", provName);
+ }
+ // 现居地市
+ String city = request.getParameter("city");
+ if (StringUtils.isNotBlank(city)){
+ terms.put("city", city);
+ }
+ // 现居地市名称
+ String cityName = request.getParameter("cityName");
+ if (StringUtils.isNotBlank(cityName)){
+ terms.put("cityName", cityName);
+ }
+ // 现居地区
+ String area = request.getParameter("area");
+ if (StringUtils.isNotBlank(area)){
+ terms.put("area", area);
+ }
+ // 现居地区名称
+ String areaName = request.getParameter("areaName");
+ if (StringUtils.isNotBlank(areaName)){
+ terms.put("areaName", areaName);
+ }
+ // 现居地街道
+ String road = request.getParameter("road");
+ if (StringUtils.isNotBlank(road)){
+ terms.put("road", road);
+ }
+ // 现居地街道名称
+ String roadName = request.getParameter("roadName");
+ if (StringUtils.isNotBlank(roadName)){
+ terms.put("roadName", roadName);
+ }
+ // 现居地社区
+ String village = request.getParameter("village");
+ if (StringUtils.isNotBlank(village)){
+ terms.put("village", village);
+ }
+ // 现居地社区名称
+ String villageName = request.getParameter("villageName");
+ if (StringUtils.isNotBlank(villageName)){
+ terms.put("villageName", villageName);
+ }
+ // 现居地详细地址
+ String addr = request.getParameter("addr");
+ if (StringUtils.isNotBlank(addr)){
+ terms.put("addr", addr);
+ }
+ // 头像
+ String avatar = request.getParameter("avatar");
+ if (StringUtils.isNotBlank(avatar)){
+ terms.put("avatar", avatar);
+ }
+ // 实名认证状态,0:未认证,1:已认证
+ String realStatus = request.getParameter("realStatus");
+ if (StringUtils.isNotBlank(realStatus)){
+ terms.put("realStatus", realStatus);
+ }
+ // 用户状态,0:停用,1:启用
+ String status = request.getParameter("status");
+ if (StringUtils.isNotBlank(status)){
+ terms.put("status", status);
+ }
+ // 关注纠纷类型,多个用,隔开
+ String followCaseType = request.getParameter("followCaseType");
+ if (StringUtils.isNotBlank(followCaseType)){
+ terms.put("followCaseType", followCaseType);
+ }
+ // 删除状态,0:已删除,1:未删除
+ String deleteStatus = request.getParameter("deleteStatus");
+ if (StringUtils.isNotBlank(deleteStatus)){
+ terms.put("deleteStatus", deleteStatus);
+ }
+ // 客户编号
+ String custId = request.getParameter("custId");
+ if (StringUtils.isNotBlank(custId)){
+ terms.put("custId", custId);
+ }
+ // 创建时间区间
+ String createStart = request.getParameter("createStart");
+ String createEnd = request.getParameter("createEnd");
+ if(StringUtils.isNotBlank(createStart) && StringUtils.isNotBlank(createEnd)) {
+ terms.put("createStart", createStart);
+ terms.put("createEnd", createEnd);
+ }
+ // 更新时间区间
+ String updateStart = request.getParameter("updateStart");
+ String updateEnd = request.getParameter("updateEnd");
+ if(StringUtils.isNotBlank(updateStart) && StringUtils.isNotBlank(updateEnd)) {
+ terms.put("updateStart", updateStart);
+ terms.put("updateEnd", updateEnd);
+ }
+ return terms;
+ }
+
+ /**
+ * 条件查询多个
+ * @url {ctx}/api/web/paUser/listQuery
+ * @return Object
+ */
+ @GetMapping("/listQuery")
+ public Object listQuery() {
+ try {
+ Map<String, Object> terms = getParameter();
+ return ReturnSucUtils.getRepInfo(service.listTerms(terms));
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+ /**
+ * 条件分页查询
+ * @url {ctx}/api/web/paUser/pageQuery
+ * @param page 页码
+ * @param size 每页数量
+ * @return Object
+ */
+ @GetMapping("/pageQuery")
+ public Object pageQuery(@RequestParam(value = "page") int page, @RequestParam(value = "size") int size) {
+ try {
+ Map<String, Object> terms = getParameter();
+ Sort sort = Sort.by(Sort.Direction.DESC, "create_time");
+ PageRequest pageRequest = PageRequest.of(page-1, size, sort);
+ Page<PaUser> paUserPage = service.pageQuery(pageRequest, terms);
+ return ReturnSucUtils.getRepInfo( "处理成功", paUserPage);
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+ /**
+ * 根据编号查询单个
+ * @url {ctx}/api/web/paUser/getById
+ * @param id 主键编号
+ * @return Object
+ */
+ @GetMapping("/getById")
+ public Object getById(@RequestParam(value = "id") String id) {
+ try {
+ return ReturnSucUtils.getRepInfo(service.getById(id));
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+ /**
+ * 根据主键单个/批量删除
+ * @url {ctx}/api/web/paUser/deleteByIds
+ * @param ids 主键编号
+ * @return Object
+ */
+ @GetMapping("/deleteByIds")
+ public Object deleteByIds(@RequestParam(value = "ids") String ids) {
+ try {
+ if (ids.indexOf(",") != -1) {
+ service.removeByIds(Stream.of(ids.split(",")).collect(Collectors.toList()));
+ }else{
+ service.removeById(ids);
+ }
+ return ReturnSucUtils.getRepInfo();
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+ /**
+ * 新增或更新对象
+ * @url {ctx}/api/web/paUser/savePaUser
+ * @param paUser 实体对象
+ * @return Object
+ */
+ @PostMapping("/savePaUser")
+ public Object savePaUser(@RequestBody PaUser paUser) {
+ try {
+ service.savePaUser(paUser);
+ return ReturnSucUtils.getRepInfo();
+ } catch (Exception e) {
+ return ReturnFailUtils.getRepInfo();
+ }
+ }
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/dao/mapper/PaAccountMapper.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/dao/mapper/PaAccountMapper.java
new file mode 100644
index 0000000..98abde9
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/dao/mapper/PaAccountMapper.java
@@ -0,0 +1,64 @@
+package cn.huge.module.pauser.dao.mapper;
+
+import cn.huge.module.pauser.domain.po.PaAccount;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+* @title: 公众用户账号表持久层业务处理
+* @Description 此处仅涉及复杂SQL操作,务必不要在此再次写单表的CRUD操作,因为mybatisPlus已经实现。
+* @company: hugeinfo
+* @author: liyj
+* @time: 2024-08-17 15:33:41
+* @version 1.0.0
+*/
+@Repository
+public interface PaAccountMapper extends BaseMapper<PaAccount>{
+
+ /**
+ * 更新对象
+ * @param entity 对象
+ */
+ void updatePaAccount(@Param("entity") PaAccount entity);
+
+ /**
+ * 条件更新对象
+ * @param entity 对象
+ * @param terms 条件
+ */
+ void updatePaAccountTerms(@Param("entity") PaAccount entity, @Param("terms") Map<String, Object> terms);
+
+ /**
+ * 根据编号物理删除
+ * @param id 查询条件集合
+ */
+ void deletePaAccount(@Param("id") String id);
+
+ /**
+ * 按条件查询结果集
+ * @param terms 查询条件集合
+ * @return List<PaAccount>
+ */
+ List<PaAccount> listTerms(@Param("terms") Map<String, Object> terms);
+
+ /**
+ * 按条件查询实体总数
+ * @param terms 查询条件集合
+ * @return long
+ */
+ long countTerms(@Param("terms") Map<String, Object> terms);
+
+ /**
+ * 按条件查询实体分页结果集
+ * @param page 分页对象
+ * @param terms 查询条件集合
+ * @return List<PaAccount>
+ */
+ List<PaAccount> pageTerms(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms);
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/dao/mapper/PaUserMapper.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/dao/mapper/PaUserMapper.java
new file mode 100644
index 0000000..0521120
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/dao/mapper/PaUserMapper.java
@@ -0,0 +1,64 @@
+package cn.huge.module.pauser.dao.mapper;
+
+import cn.huge.module.pauser.domain.po.PaUser;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+* @title: 公众用户表持久层业务处理
+* @Description 此处仅涉及复杂SQL操作,务必不要在此再次写单表的CRUD操作,因为mybatisPlus已经实现。
+* @company: hugeinfo
+* @author: liyj
+* @time: 2024-08-17 15:33:42
+* @version 1.0.0
+*/
+@Repository
+public interface PaUserMapper extends BaseMapper<PaUser>{
+
+ /**
+ * 更新对象
+ * @param entity 对象
+ */
+ void updatePaUser(@Param("entity") PaUser entity);
+
+ /**
+ * 条件更新对象
+ * @param entity 对象
+ * @param terms 条件
+ */
+ void updatePaUserTerms(@Param("entity") PaUser entity, @Param("terms") Map<String, Object> terms);
+
+ /**
+ * 根据编号物理删除
+ * @param id 查询条件集合
+ */
+ void deletePaUser(@Param("id") String id);
+
+ /**
+ * 按条件查询结果集
+ * @param terms 查询条件集合
+ * @return List<PaUser>
+ */
+ List<PaUser> listTerms(@Param("terms") Map<String, Object> terms);
+
+ /**
+ * 按条件查询实体总数
+ * @param terms 查询条件集合
+ * @return long
+ */
+ long countTerms(@Param("terms") Map<String, Object> terms);
+
+ /**
+ * 按条件查询实体分页结果集
+ * @param page 分页对象
+ * @param terms 查询条件集合
+ * @return List<PaUser>
+ */
+ List<PaUser> pageTerms(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms);
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/dao/mapper/xml/PaAccountMapper.xml b/dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/dao/mapper/xml/PaAccountMapper.xml
new file mode 100644
index 0000000..cb2ce84
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/dao/mapper/xml/PaAccountMapper.xml
@@ -0,0 +1,178 @@
+<?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">
+<!--
+ * @title: 公众用户账号表
+ * @description: 自定义sql,请自行实现业务逻辑
+ * @company: hugeinfo
+ * @author: liyj
+ * @time:2024-08-17 15:33:41
+ * @version 1.0.0
+-->
+<mapper namespace="cn.huge.module.pauser.dao.mapper.PaAccountMapper">
+ <!-- 结果集 -->
+ <resultMap id="dataResult" type="cn.huge.module.pauser.domain.po.PaAccount">
+ <result property="id" column="id"/>
+ <result property="userId" column="user_id"/>
+ <result property="accType" column="acc_type"/>
+ <result property="acc" column="acc"/>
+ <result property="cipher" column="cipher"/>
+ <result property="cipherOpen" column="cipher_open"/>
+ <result property="cipherTime" column="cipher_time"/>
+ <result property="loginTime" column="login_time"/>
+ <result property="limitTime" column="limit_time"/>
+ <result property="deleteStatus" column="delete_status"/>
+ <result property="custId" column="cust_id"/>
+ <result property="createTime" column="create_time"/>
+ <result property="updateTime" column="update_time"/>
+ </resultMap>
+ <!-- 表 -->
+ <sql id='table-name'>dyh_pa_account</sql>
+ <!-- 字段 -->
+ <sql id="column-part">
+ id,
+ user_id,
+ acc_type,
+ acc,
+ cipher,
+ cipher_open,
+ cipher_time,
+ login_time,
+ limit_time,
+ delete_status,
+ cust_id,
+ create_time,
+ update_time
+ </sql>
+ <!-- 更新实体字段 -->
+ <sql id="set-part">
+ <if test="entity.userId != null">user_id = #{entity.userId},</if>
+ <if test="entity.accType != null">acc_type = #{entity.accType},</if>
+ <if test="entity.acc != null">acc = #{entity.acc},</if>
+ <if test="entity.cipher != null">cipher = #{entity.cipher},</if>
+ <if test="entity.cipherOpen != null">cipher_open = #{entity.cipherOpen},</if>
+ <if test="entity.cipherTime != null">cipher_time = #{entity.cipherTime},</if>
+ <if test="entity.loginTime != null">login_time = #{entity.loginTime},</if>
+ <if test="entity.limitTime != null">limit_time = #{entity.limitTime},</if>
+ <if test="entity.deleteStatus != null">delete_status = #{entity.deleteStatus},</if>
+ <if test="entity.custId != null">cust_id = #{entity.custId},</if>
+ <if test="entity.createTime != null">create_time = #{entity.createTime},</if>
+ <if test="entity.updateTime != null">update_time = #{entity.updateTime}</if>
+ </sql>
+ <!-- 条件 -->
+ <sql id="where-part">
+ <if test="terms != null">
+ <where>
+ <if test="terms.id != null and terms.id !=''">
+ and id = #{terms.id}
+ </if>
+ <if test="terms.userId != null and terms.userId !=''">
+ and user_id = #{terms.userId}
+ </if>
+ <if test="terms.accType != null and terms.accType !=''">
+ and acc_type = #{terms.accType}
+ </if>
+ <if test="terms.acc != null and terms.acc !=''">
+ and acc = #{terms.acc}
+ </if>
+ <if test="terms.cipher != null and terms.cipher !=''">
+ and cipher = #{terms.cipher}
+ </if>
+ <if test="terms.cipherOpen != null and terms.cipherOpen !=''">
+ and cipher_open = #{terms.cipherOpen}
+ </if>
+ <if test="terms.cipherTime != null and terms.cipherTime !=''">
+ and cipher_time = #{terms.cipherTime}
+ </if>
+ <if test="terms.loginTime != null and terms.loginTime !=''">
+ and login_time = #{terms.loginTime}
+ </if>
+ <if test="terms.limitTime != null and terms.limitTime !=''">
+ and limit_time = #{terms.limitTime}
+ </if>
+ <if test="terms.deleteStatus = null and terms.deleteStatus =''">
+ and delete_status = '1'
+ </if>
+ <if test="terms.deleteStatus != null and terms.deleteStatus !=''">
+ and delete_status = #{terms.deleteStatus}
+ </if>
+ <if test="terms.custId != null and terms.custId !=''">
+ and cust_id = #{terms.custId}
+ </if>
+ <if test="terms.createTime != null and terms.createTime !=''">
+ and DATE_FORMAT(create_time,'%Y-%m-%d') = #{terms.createTime}
+ </if>
+ <if test="terms.createStart != null and terms.createStart !='' and terms.createEnd != null and terms.createEnd !=''">
+ and (DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.createStart}
+ and DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.createEnd})
+ </if>
+ <if test="terms.updateTime != null and terms.updateTime !=''">
+ and DATE_FORMAT(update_time,'%Y-%m-%d') = #{terms.updateTime}
+ </if>
+ <if test="terms.updateStart != null and terms.updateStart !='' and terms.updateEnd != null and terms.updateEnd !=''">
+ and (DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.updateStart}
+ and DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.updateEnd})
+ </if>
+ </where>
+ </if>
+ </sql>
+ <!-- 更新对象 -->
+ <update id="updatePaAccount">
+ update
+ <include refid="table-name"/>
+ <set>
+ <include refid="set-part"/>
+ </set>
+ <where>
+ id = #{entity.id}
+ </where>
+ </update>
+ <!-- 条件更新对象 -->
+ <update id="updatePaAccountTerms">
+ update
+ <include refid="table-name"/>
+ <set>
+ <include refid="set-part"/>
+ </set>
+ <include refid="where-part"/>
+ </update>
+ <!-- 根据编号物理删除 -->
+ <delete id="deletePaAccount">
+ delete from
+ <include refid="table-name" />
+ where id = #{id}
+ </delete>
+ <!-- 根据条件查询 -->
+ <select id="listTerms" resultMap="dataResult">
+ select
+ <include refid="column-part"/>
+ from
+ <include refid="table-name" />
+ <include refid="where-part"/>
+ </select>
+ <!-- 根据条件统计 -->
+ <select id="countTerms" resultType="java.lang.Long">
+ select
+ COUNT(1)
+ from
+ <include refid="table-name" />
+ <include refid="where-part"/>
+ </select>
+ <!-- 根据条件分页查询 -->
+ <select id="pageTerms" resultMap="dataResult">
+ SELECT
+ <include refid="column-part"/>
+ FROM
+ <include refid="table-name" />
+ <include refid="where-part"/>
+ <if test="page.sort != null">
+ <foreach collection="page.sort" item="s" index="index" separator="," open="order by ">
+ isnull(${s.property}), ${s.property} ${s.direction}
+ </foreach>
+ </if>
+ <if test="page.sort == null">
+ order by isnull(create_time), create_time desc
+ </if>
+ limit #{page.offset}, #{page.size}
+ </select>
+
+</mapper>
\ No newline at end of file
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/dao/mapper/xml/PaUserMapper.xml b/dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/dao/mapper/xml/PaUserMapper.xml
new file mode 100644
index 0000000..d8ed868
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/dao/mapper/xml/PaUserMapper.xml
@@ -0,0 +1,268 @@
+<?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">
+<!--
+ * @title: 公众用户表
+ * @description: 自定义sql,请自行实现业务逻辑
+ * @company: hugeinfo
+ * @author: liyj
+ * @time:2024-08-17 15:33:42
+ * @version 1.0.0
+-->
+<mapper namespace="cn.huge.module.pauser.dao.mapper.PaUserMapper">
+ <!-- 结果集 -->
+ <resultMap id="dataResult" type="cn.huge.module.pauser.domain.po.PaUser">
+ <result property="id" column="id"/>
+ <result property="trueName" column="true_name"/>
+ <result property="sex" column="sex"/>
+ <result property="sexName" column="sex_name"/>
+ <result property="mobile" column="mobile"/>
+ <result property="idcard" column="idcard"/>
+ <result property="email" column="email"/>
+ <result property="wechat" column="wechat"/>
+ <result property="qq" column="qq"/>
+ <result property="prov" column="prov"/>
+ <result property="provName" column="prov_name"/>
+ <result property="city" column="city"/>
+ <result property="cityName" column="city_name"/>
+ <result property="area" column="area"/>
+ <result property="areaName" column="area_name"/>
+ <result property="road" column="road"/>
+ <result property="roadName" column="road_name"/>
+ <result property="village" column="village"/>
+ <result property="villageName" column="village_name"/>
+ <result property="addr" column="addr"/>
+ <result property="avatar" column="avatar"/>
+ <result property="realStatus" column="real_status"/>
+ <result property="status" column="status"/>
+ <result property="followCaseType" column="follow_case_type"/>
+ <result property="deleteStatus" column="delete_status"/>
+ <result property="custId" column="cust_id"/>
+ <result property="createTime" column="create_time"/>
+ <result property="updateTime" column="update_time"/>
+ </resultMap>
+ <!-- 表 -->
+ <sql id='table-name'>dyh_pa_user</sql>
+ <!-- 字段 -->
+ <sql id="column-part">
+ id,
+ true_name,
+ sex,
+ sex_name,
+ mobile,
+ idcard,
+ email,
+ wechat,
+ qq,
+ prov,
+ prov_name,
+ city,
+ city_name,
+ area,
+ area_name,
+ road,
+ road_name,
+ village,
+ village_name,
+ addr,
+ avatar,
+ real_status,
+ status,
+ follow_case_type,
+ delete_status,
+ cust_id,
+ create_time,
+ update_time
+ </sql>
+ <!-- 更新实体字段 -->
+ <sql id="set-part">
+ <if test="entity.trueName != null">true_name = #{entity.trueName},</if>
+ <if test="entity.sex != null">sex = #{entity.sex},</if>
+ <if test="entity.sexName != null">sex_name = #{entity.sexName},</if>
+ <if test="entity.mobile != null">mobile = #{entity.mobile},</if>
+ <if test="entity.idcard != null">idcard = #{entity.idcard},</if>
+ <if test="entity.email != null">email = #{entity.email},</if>
+ <if test="entity.wechat != null">wechat = #{entity.wechat},</if>
+ <if test="entity.qq != null">qq = #{entity.qq},</if>
+ <if test="entity.prov != null">prov = #{entity.prov},</if>
+ <if test="entity.provName != null">prov_name = #{entity.provName},</if>
+ <if test="entity.city != null">city = #{entity.city},</if>
+ <if test="entity.cityName != null">city_name = #{entity.cityName},</if>
+ <if test="entity.area != null">area = #{entity.area},</if>
+ <if test="entity.areaName != null">area_name = #{entity.areaName},</if>
+ <if test="entity.road != null">road = #{entity.road},</if>
+ <if test="entity.roadName != null">road_name = #{entity.roadName},</if>
+ <if test="entity.village != null">village = #{entity.village},</if>
+ <if test="entity.villageName != null">village_name = #{entity.villageName},</if>
+ <if test="entity.addr != null">addr = #{entity.addr},</if>
+ <if test="entity.avatar != null">avatar = #{entity.avatar},</if>
+ <if test="entity.realStatus != null">real_status = #{entity.realStatus},</if>
+ <if test="entity.status != null">status = #{entity.status},</if>
+ <if test="entity.followCaseType != null">follow_case_type = #{entity.followCaseType},</if>
+ <if test="entity.deleteStatus != null">delete_status = #{entity.deleteStatus},</if>
+ <if test="entity.custId != null">cust_id = #{entity.custId},</if>
+ <if test="entity.createTime != null">create_time = #{entity.createTime},</if>
+ <if test="entity.updateTime != null">update_time = #{entity.updateTime}</if>
+ </sql>
+ <!-- 条件 -->
+ <sql id="where-part">
+ <if test="terms != null">
+ <where>
+ <if test="terms.id != null and terms.id !=''">
+ and id = #{terms.id}
+ </if>
+ <if test="terms.trueName != null and terms.trueName !=''">
+ and true_name = #{terms.trueName}
+ </if>
+ <if test="terms.sex != null and terms.sex !=''">
+ and sex = #{terms.sex}
+ </if>
+ <if test="terms.sexName != null and terms.sexName !=''">
+ and sex_name = #{terms.sexName}
+ </if>
+ <if test="terms.mobile != null and terms.mobile !=''">
+ and mobile = #{terms.mobile}
+ </if>
+ <if test="terms.idcard != null and terms.idcard !=''">
+ and idcard = #{terms.idcard}
+ </if>
+ <if test="terms.email != null and terms.email !=''">
+ and email = #{terms.email}
+ </if>
+ <if test="terms.wechat != null and terms.wechat !=''">
+ and wechat = #{terms.wechat}
+ </if>
+ <if test="terms.qq != null and terms.qq !=''">
+ and qq = #{terms.qq}
+ </if>
+ <if test="terms.prov != null and terms.prov !=''">
+ and prov = #{terms.prov}
+ </if>
+ <if test="terms.provName != null and terms.provName !=''">
+ and prov_name = #{terms.provName}
+ </if>
+ <if test="terms.city != null and terms.city !=''">
+ and city = #{terms.city}
+ </if>
+ <if test="terms.cityName != null and terms.cityName !=''">
+ and city_name = #{terms.cityName}
+ </if>
+ <if test="terms.area != null and terms.area !=''">
+ and area = #{terms.area}
+ </if>
+ <if test="terms.areaName != null and terms.areaName !=''">
+ and area_name = #{terms.areaName}
+ </if>
+ <if test="terms.road != null and terms.road !=''">
+ and road = #{terms.road}
+ </if>
+ <if test="terms.roadName != null and terms.roadName !=''">
+ and road_name = #{terms.roadName}
+ </if>
+ <if test="terms.village != null and terms.village !=''">
+ and village = #{terms.village}
+ </if>
+ <if test="terms.villageName != null and terms.villageName !=''">
+ and village_name = #{terms.villageName}
+ </if>
+ <if test="terms.addr != null and terms.addr !=''">
+ and addr = #{terms.addr}
+ </if>
+ <if test="terms.avatar != null and terms.avatar !=''">
+ and avatar = #{terms.avatar}
+ </if>
+ <if test="terms.realStatus != null and terms.realStatus !=''">
+ and real_status = #{terms.realStatus}
+ </if>
+ <if test="terms.status != null and terms.status !=''">
+ and status = #{terms.status}
+ </if>
+ <if test="terms.followCaseType != null and terms.followCaseType !=''">
+ and follow_case_type = #{terms.followCaseType}
+ </if>
+ <if test="terms.deleteStatus = null and terms.deleteStatus =''">
+ and delete_status = '1'
+ </if>
+ <if test="terms.deleteStatus != null and terms.deleteStatus !=''">
+ and delete_status = #{terms.deleteStatus}
+ </if>
+ <if test="terms.custId != null and terms.custId !=''">
+ and cust_id = #{terms.custId}
+ </if>
+ <if test="terms.createTime != null and terms.createTime !=''">
+ and DATE_FORMAT(create_time,'%Y-%m-%d') = #{terms.createTime}
+ </if>
+ <if test="terms.createStart != null and terms.createStart !='' and terms.createEnd != null and terms.createEnd !=''">
+ and (DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.createStart}
+ and DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.createEnd})
+ </if>
+ <if test="terms.updateTime != null and terms.updateTime !=''">
+ and DATE_FORMAT(update_time,'%Y-%m-%d') = #{terms.updateTime}
+ </if>
+ <if test="terms.updateStart != null and terms.updateStart !='' and terms.updateEnd != null and terms.updateEnd !=''">
+ and (DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.updateStart}
+ and DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.updateEnd})
+ </if>
+ </where>
+ </if>
+ </sql>
+ <!-- 更新对象 -->
+ <update id="updatePaUser">
+ update
+ <include refid="table-name"/>
+ <set>
+ <include refid="set-part"/>
+ </set>
+ <where>
+ id = #{entity.id}
+ </where>
+ </update>
+ <!-- 条件更新对象 -->
+ <update id="updatePaUserTerms">
+ update
+ <include refid="table-name"/>
+ <set>
+ <include refid="set-part"/>
+ </set>
+ <include refid="where-part"/>
+ </update>
+ <!-- 根据编号物理删除 -->
+ <delete id="deletePaUser">
+ delete from
+ <include refid="table-name" />
+ where id = #{id}
+ </delete>
+ <!-- 根据条件查询 -->
+ <select id="listTerms" resultMap="dataResult">
+ select
+ <include refid="column-part"/>
+ from
+ <include refid="table-name" />
+ <include refid="where-part"/>
+ </select>
+ <!-- 根据条件统计 -->
+ <select id="countTerms" resultType="java.lang.Long">
+ select
+ COUNT(1)
+ from
+ <include refid="table-name" />
+ <include refid="where-part"/>
+ </select>
+ <!-- 根据条件分页查询 -->
+ <select id="pageTerms" resultMap="dataResult">
+ SELECT
+ <include refid="column-part"/>
+ FROM
+ <include refid="table-name" />
+ <include refid="where-part"/>
+ <if test="page.sort != null">
+ <foreach collection="page.sort" item="s" index="index" separator="," open="order by ">
+ isnull(${s.property}), ${s.property} ${s.direction}
+ </foreach>
+ </if>
+ <if test="page.sort == null">
+ order by isnull(create_time), create_time desc
+ </if>
+ limit #{page.offset}, #{page.size}
+ </select>
+
+</mapper>
\ No newline at end of file
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/domain/bo/PaAccountBO.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/domain/bo/PaAccountBO.java
new file mode 100644
index 0000000..6c813e8
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/domain/bo/PaAccountBO.java
@@ -0,0 +1,17 @@
+package cn.huge.module.pauser.domain.bo;
+
+import cn.huge.module.pauser.domain.po.PaAccount;
+
+/**
+ * @title: 公众用户账号表业务扩展类
+ * @description: 公众用户账号表业务扩展类
+ * @company: hugeinfo
+ * @author: liyj
+ * @time: 2024-08-17 15:33:41
+ * @version: 1.0.0
+ * @see cn.huge.module.pauser.domain.po.PaAccount
+ */
+public class PaAccountBO extends PaAccount {
+
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/domain/bo/PaUserBO.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/domain/bo/PaUserBO.java
new file mode 100644
index 0000000..78397f5
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/domain/bo/PaUserBO.java
@@ -0,0 +1,17 @@
+package cn.huge.module.pauser.domain.bo;
+
+import cn.huge.module.pauser.domain.po.PaUser;
+
+/**
+ * @title: 公众用户表业务扩展类
+ * @description: 公众用户表业务扩展类
+ * @company: hugeinfo
+ * @author: liyj
+ * @time: 2024-08-17 15:33:42
+ * @version: 1.0.0
+ * @see cn.huge.module.pauser.domain.po.PaUser
+ */
+public class PaUserBO extends PaUser {
+
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/domain/po/PaAccount.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/domain/po/PaAccount.java
new file mode 100644
index 0000000..ef4b9a5
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/domain/po/PaAccount.java
@@ -0,0 +1,102 @@
+package cn.huge.module.pauser.domain.po;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * @title: 公众用户账号表数据库对应关系类
+ * @description: PO中的属性与数据表是一一对应关系,如需根据业务处理不同,请使用BO对象。
+ * @company:hugeinfo
+ * @author: liyj
+ * @time: 2024-08-17 15:33:41
+ * @version 1.0.0
+ */
+@TableName(value = "dyh_pa_account")
+@Data
+public class PaAccount {
+
+ /**
+ * 账号编号
+ */
+ @TableId(value = "id")
+ private String id;
+
+ /**
+ * 当事人编号
+ */
+ @TableField(value = "user_id")
+ private String userId;
+
+ /**
+ * 帐号类型,1:平台web端,2:平台小程序
+ */
+ @TableField(value = "acc_type")
+ private Integer accType;
+
+ /**
+ * 身份唯一标识(存储唯一标识,比如账号、邮箱、手机号、第三方获取的唯一标识等)
+ */
+ @TableField(value = "acc")
+ private String acc;
+
+ /**
+ * 授权凭证(比如密码 、第三方登录的token、授权账号等)
+ */
+ @TableField(value = "cipher")
+ private String cipher;
+
+ /**
+ * 授权凭证明文
+ */
+ @TableField(value = "cipher_open")
+ private String cipherOpen;
+
+ /**
+ * 密码最新更新时间
+ */
+ @TableField(value = "cipher_time")
+ private Date cipherTime;
+
+ /**
+ * 最新登录时间
+ */
+ @TableField(value = "login_time")
+ private Date loginTime;
+
+ /**
+ * 限制登录时间(密码错误次数超过限制,默认30分钟)
+ */
+ @TableField(value = "limit_time")
+ private Date limitTime;
+
+ /**
+ * 删除状态,0:已删除,1:未删除
+ */
+ @TableLogic
+ @TableField(value = "delete_status")
+ private Integer deleteStatus;
+
+ /**
+ * 客户编号
+ */
+ @TableField(value = "cust_id")
+ private String custId;
+
+ /**
+ * 创建时间
+ */
+ @TableField(value = "create_time")
+ private Date createTime;
+
+ /**
+ * 更新时间
+ */
+ @TableField(value = "update_time")
+ private Date updateTime;
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/domain/po/PaUser.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/domain/po/PaUser.java
new file mode 100644
index 0000000..5034981
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/domain/po/PaUser.java
@@ -0,0 +1,192 @@
+package cn.huge.module.pauser.domain.po;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * @title: 公众用户表数据库对应关系类
+ * @description: PO中的属性与数据表是一一对应关系,如需根据业务处理不同,请使用BO对象。
+ * @company:hugeinfo
+ * @author: liyj
+ * @time: 2024-08-17 15:33:42
+ * @version 1.0.0
+ */
+@TableName(value = "dyh_pa_user")
+@Data
+public class PaUser {
+
+ /**
+ * 当事人编号
+ */
+ @TableId(value = "id")
+ private String id;
+
+ /**
+ * 姓名
+ */
+ @TableField(value = "true_name")
+ private String trueName;
+
+ /**
+ * 性别
+ */
+ @TableField(value = "sex")
+ private String sex;
+
+ /**
+ * 性别名称
+ */
+ @TableField(value = "sex_name")
+ private String sexName;
+
+ /**
+ * 手机号码
+ */
+ @TableField(value = "mobile")
+ private String mobile;
+
+ /**
+ * 身份证号码
+ */
+ @TableField(value = "idcard")
+ private String idcard;
+
+ /**
+ * 电子邮箱
+ */
+ @TableField(value = "email")
+ private String email;
+
+ /**
+ * 微信号
+ */
+ @TableField(value = "wechat")
+ private String wechat;
+
+ /**
+ * QQ号
+ */
+ @TableField(value = "qq")
+ private String qq;
+
+ /**
+ * 现居地省
+ */
+ @TableField(value = "prov")
+ private String prov;
+
+ /**
+ * 现居地省名称
+ */
+ @TableField(value = "prov_name")
+ private String provName;
+
+ /**
+ * 现居地市
+ */
+ @TableField(value = "city")
+ private String city;
+
+ /**
+ * 现居地市名称
+ */
+ @TableField(value = "city_name")
+ private String cityName;
+
+ /**
+ * 现居地区
+ */
+ @TableField(value = "area")
+ private String area;
+
+ /**
+ * 现居地区名称
+ */
+ @TableField(value = "area_name")
+ private String areaName;
+
+ /**
+ * 现居地街道
+ */
+ @TableField(value = "road")
+ private String road;
+
+ /**
+ * 现居地街道名称
+ */
+ @TableField(value = "road_name")
+ private String roadName;
+
+ /**
+ * 现居地社区
+ */
+ @TableField(value = "village")
+ private String village;
+
+ /**
+ * 现居地社区名称
+ */
+ @TableField(value = "village_name")
+ private String villageName;
+
+ /**
+ * 现居地详细地址
+ */
+ @TableField(value = "addr")
+ private String addr;
+
+ /**
+ * 头像
+ */
+ @TableField(value = "avatar")
+ private String avatar;
+
+ /**
+ * 实名认证状态,0:未认证,1:已认证
+ */
+ @TableField(value = "real_status")
+ private Integer realStatus;
+
+ /**
+ * 用户状态,0:停用,1:启用
+ */
+ @TableField(value = "status")
+ private Integer status;
+
+ /**
+ * 关注纠纷类型,多个用,隔开
+ */
+ @TableField(value = "follow_case_type")
+ private String followCaseType;
+
+ /**
+ * 删除状态,0:已删除,1:未删除
+ */
+ @TableLogic
+ @TableField(value = "delete_status")
+ private Integer deleteStatus;
+
+ /**
+ * 客户编号
+ */
+ @TableField(value = "cust_id")
+ private String custId;
+
+ /**
+ * 创建时间
+ */
+ @TableField(value = "create_time")
+ private Date createTime;
+
+ /**
+ * 更新时间
+ */
+ @TableField(value = "update_time")
+ private Date updateTime;
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/service/PaAccountService.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/service/PaAccountService.java
new file mode 100644
index 0000000..5b0940e
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/service/PaAccountService.java
@@ -0,0 +1,133 @@
+package cn.huge.module.pauser.service;
+
+import cn.huge.base.common.exception.ServiceException;
+import cn.huge.base.common.utils.DateUtils;
+import cn.huge.base.common.utils.IdUtils;
+import cn.huge.module.client.api.impl.UtilsClientImpl;
+import cn.huge.module.pauser.dao.mapper.PaAccountMapper;
+import cn.huge.module.pauser.domain.po.PaAccount;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.PageImpl;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.PostConstruct;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @title: 公众用户账号表业务逻辑处理
+ * @Description 公众用户账号表业务逻辑处理
+ * @company hugeinfo
+ * @author liyj
+ * @Time 2024-08-17 15:33:41
+ * @version 1.0.0
+ */
+@Slf4j
+@Service
+@Transactional(rollbackFor = Exception.class)
+public class PaAccountService extends ServiceImpl<PaAccountMapper, PaAccount>{
+
+ @Autowired
+ private PaAccountMapper mapper;
+
+ @Autowired
+ private UtilsClientImpl utilsClient;
+
+ /**
+ * 更新对象
+ * @param entity 对象
+ */
+ public void updatePaAccount(PaAccount entity){
+ try{
+ mapper.updatePaAccount(entity);
+ }catch (Exception e){
+ log.error("[PaAccountService.updatePaAccount]调用失败,异常信息:"+e, e);
+ throw new ServiceException("PaAccountService.updatePaAccount", e);
+ }
+ }
+
+ /**
+ * 条件更新对象
+ * @param entity 对象
+ * @param terms 条件
+ */
+ public void updatePaAccountTerms(PaAccount entity, Map<String, Object> terms){
+ try{
+ mapper.updatePaAccountTerms(entity, terms);
+ }catch (Exception e){
+ log.error("[PaAccountService.updatePaAccountTerms]调用失败,异常信息:"+e, e);
+ throw new ServiceException("PaAccountService.updatePaAccountTerms", e);
+ }
+ }
+
+ /**
+ * 根据编号物理删除
+ * @param id 查询条件集合
+ */
+ public void deletePaAccount(String id){
+ try{
+ mapper.deletePaAccount(id);
+ }catch (Exception e){
+ log.error("[PaAccountService.deletePaAccount]调用失败,异常信息:"+e, e);
+ throw new ServiceException("PaAccountService.deletePaAccount", e);
+ }
+ }
+
+ /**
+ * 按条件查询
+ * @param terms 条件
+ * @return List
+ */
+ public List<PaAccount> listTerms(Map<String, Object> terms){
+ return mapper.listTerms(terms);
+ }
+
+ /**
+ * 按条件统计
+ * @param terms 条件
+ * @return long
+ */
+ public long countTerms(Map<String, Object> terms){
+ return mapper.countTerms(terms);
+ }
+
+ /**
+ * 按条件分页查询
+ * @param page 分页对象
+ * @param terms 条件
+ * @return Page
+ */
+ public Page<PaAccount> pageQuery(PageRequest page, Map<String, Object> terms){
+ long total = mapper.countTerms(terms);
+ List<PaAccount> content = mapper.pageTerms(page, terms);
+ return new PageImpl<PaAccount>(content, page, total);
+ }
+
+ /**
+ * 新增或更新对象
+ * @param paAccount 实体对象
+ */
+ public void savePaAccount(PaAccount paAccount){
+ try{
+ Date nowDate = DateUtils.getMowDate();
+ // 判断是否新增
+ if (IdUtils.checkNewId(paAccount.getId())){
+ paAccount.setId(utilsClient.getNewTimeId());
+ paAccount.setCreateTime(nowDate);
+ }
+ paAccount.setUpdateTime(nowDate);
+ this.saveOrUpdate(paAccount);
+ }catch (Exception e){
+ log.error("[PaAccountService.savePaAccount]调用失败,异常信息:"+e, e);
+ throw new ServiceException("PaAccountService.savePaAccount", e);
+ }
+ }
+
+}
diff --git a/dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/service/PaUserService.java b/dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/service/PaUserService.java
new file mode 100644
index 0000000..054c1b8
--- /dev/null
+++ b/dyh-service/dyh-cust/src/main/java/cn/huge/module/pauser/service/PaUserService.java
@@ -0,0 +1,133 @@
+package cn.huge.module.pauser.service;
+
+import cn.huge.base.common.exception.ServiceException;
+import cn.huge.base.common.utils.DateUtils;
+import cn.huge.base.common.utils.IdUtils;
+import cn.huge.module.client.api.impl.UtilsClientImpl;
+import cn.huge.module.pauser.dao.mapper.PaUserMapper;
+import cn.huge.module.pauser.domain.po.PaUser;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.PageImpl;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.PostConstruct;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @title: 公众用户表业务逻辑处理
+ * @Description 公众用户表业务逻辑处理
+ * @company hugeinfo
+ * @author liyj
+ * @Time 2024-08-17 15:33:42
+ * @version 1.0.0
+ */
+@Slf4j
+@Service
+@Transactional(rollbackFor = Exception.class)
+public class PaUserService extends ServiceImpl<PaUserMapper, PaUser>{
+
+ @Autowired
+ private PaUserMapper mapper;
+
+ @Autowired
+ private UtilsClientImpl utilsClient;
+
+ /**
+ * 更新对象
+ * @param entity 对象
+ */
+ public void updatePaUser(PaUser entity){
+ try{
+ mapper.updatePaUser(entity);
+ }catch (Exception e){
+ log.error("[PaUserService.updatePaUser]调用失败,异常信息:"+e, e);
+ throw new ServiceException("PaUserService.updatePaUser", e);
+ }
+ }
+
+ /**
+ * 条件更新对象
+ * @param entity 对象
+ * @param terms 条件
+ */
+ public void updatePaUserTerms(PaUser entity, Map<String, Object> terms){
+ try{
+ mapper.updatePaUserTerms(entity, terms);
+ }catch (Exception e){
+ log.error("[PaUserService.updatePaUserTerms]调用失败,异常信息:"+e, e);
+ throw new ServiceException("PaUserService.updatePaUserTerms", e);
+ }
+ }
+
+ /**
+ * 根据编号物理删除
+ * @param id 查询条件集合
+ */
+ public void deletePaUser(String id){
+ try{
+ mapper.deletePaUser(id);
+ }catch (Exception e){
+ log.error("[PaUserService.deletePaUser]调用失败,异常信息:"+e, e);
+ throw new ServiceException("PaUserService.deletePaUser", e);
+ }
+ }
+
+ /**
+ * 按条件查询
+ * @param terms 条件
+ * @return List
+ */
+ public List<PaUser> listTerms(Map<String, Object> terms){
+ return mapper.listTerms(terms);
+ }
+
+ /**
+ * 按条件统计
+ * @param terms 条件
+ * @return long
+ */
+ public long countTerms(Map<String, Object> terms){
+ return mapper.countTerms(terms);
+ }
+
+ /**
+ * 按条件分页查询
+ * @param page 分页对象
+ * @param terms 条件
+ * @return Page
+ */
+ public Page<PaUser> pageQuery(PageRequest page, Map<String, Object> terms){
+ long total = mapper.countTerms(terms);
+ List<PaUser> content = mapper.pageTerms(page, terms);
+ return new PageImpl<PaUser>(content, page, total);
+ }
+
+ /**
+ * 新增或更新对象
+ * @param paUser 实体对象
+ */
+ public void savePaUser(PaUser paUser){
+ try{
+ Date nowDate = DateUtils.getMowDate();
+ // 判断是否新增
+ if (IdUtils.checkNewId(paUser.getId())){
+ paUser.setId(utilsClient.getNewTimeId());
+ paUser.setCreateTime(nowDate);
+ }
+ paUser.setUpdateTime(nowDate);
+ this.saveOrUpdate(paUser);
+ }catch (Exception e){
+ log.error("[PaUserService.savePaUser]调用失败,异常信息:"+e, e);
+ throw new ServiceException("PaUserService.savePaUser", e);
+ }
+ }
+
+}
diff --git a/dyh-service/dyh-cust/src/test/java/cn/huge/module/BuildCodeServiceTest.java b/dyh-service/dyh-cust/src/test/java/cn/huge/module/BuildCodeServiceTest.java
index a4c2c01..5e60de0 100644
--- a/dyh-service/dyh-cust/src/test/java/cn/huge/module/BuildCodeServiceTest.java
+++ b/dyh-service/dyh-cust/src/test/java/cn/huge/module/BuildCodeServiceTest.java
@@ -14,26 +14,14 @@
private String basePackage = "cn.huge.module";
private String packageName = "ctuser";
private String className = "CtUnit";
+ private String tableSchema = "gzdyh_dev";
private String tableName = "dyh_ct_unit";
private String author = "liyj";
private String version = "1.0.0";
@Test
public void buildAllTest() {
- service.buildAll(basePackage, "ctuser", "CtAccount", "dyh_ct_account", author, version);
- service.buildAll(basePackage, "ctuser", "CtDept", "dyh_ct_dept", author, version);
- service.buildAll(basePackage, "ctuser", "CtPost", "dyh_ct_post", author, version);
- service.buildAll(basePackage, "ctuser", "CtUnit", "dyh_ct_unit", author, version);
- service.buildAll(basePackage, "ctuser", "CtUsepost", "dyh_ct_usepost", author, version);
- service.buildAll(basePackage, "ctuser", "CtUser", "dyh_ct_user", author, version);
- service.buildAll(basePackage, "ctuser", "CtUserole", "dyh_ct_userole", author, version);
-
- service.buildAll(basePackage, "ctrole", "CRole", "dyh_ct_role", author, version);
- service.buildAll(basePackage, "ctrole", "CtRoledata", "dyh_ct_roledata", author, version);
- service.buildAll(basePackage, "ctrole", "CtRolefun", "dyh_ct_rolefun", author, version);
-
- service.buildAll(basePackage, "pauser", "PaAccount", "dyh_pa_account", author, version);
- service.buildAll(basePackage, "pauser", "PaUser", "dyh_pa_user", author, version);
+ service.buildAll(basePackage, packageName, className, tableSchema, tableName, author, version);
}
@@ -43,48 +31,48 @@
*/
@Test
public void buildPoTest() {
- service.buildPo(basePackage, packageName, className, tableName, author, version);
+ service.buildPo(basePackage, packageName, className, tableSchema, tableName, author, version);
}
@Test
public void buildBoTest() {
- service.buildBo(basePackage, packageName, className, tableName, author, version);
+ service.buildBo(basePackage, packageName, className, tableSchema, tableName, author, version);
}
@Test
public void buildServiceTest() {
- service.buildService(basePackage, packageName, className, tableName, author, version);
+ service.buildService(basePackage, packageName, className, tableSchema, tableName, author, version);
}
@Test
public void buildWebControllerTest() {
- service.buildWebController(basePackage, packageName, className, tableName, author, version);
+ service.buildWebController(basePackage, packageName, className, tableSchema, tableName, author, version);
}
@Test
public void buildWechatControllerTest() {
- service.buildWechatController(basePackage, packageName, className, tableName, author, version);
+ service.buildWechatController(basePackage, packageName, className, tableSchema, tableName, author, version);
}
@Test
public void buildJsonTest() {
- service.buildJson(basePackage, packageName, className, tableName, author, version);
+ service.buildJson(basePackage, packageName, className, tableSchema, tableName, author, version);
}
@Test
public void buildJsFormTest() {
- service.buildJsForm(basePackage, packageName, className, tableName, author, version);
+ service.buildJsForm(basePackage, packageName, className, tableSchema, tableName, author, version);
}
@Test
public void buildServiceTestTest() {
- service.buildServiceTest(basePackage, packageName, className, tableName, author, version);
+ service.buildServiceTest(basePackage, packageName, className, tableSchema, tableName, author, version);
}
@Test
public void buildControllerTestTest() {
- service.buildControllerTest(basePackage, packageName, className, tableName, author, version);
+ service.buildControllerTest(basePackage, packageName, className, tableSchema, tableName, author, version);
}
diff --git a/dyh-service/dyh-sync/src/main/java/cn/huge/module/buildcode/dao/mapper/xml/BuildCodeMapper.xml b/dyh-service/dyh-sync/src/main/java/cn/huge/module/buildcode/dao/mapper/xml/BuildCodeMapper.xml
index 0b120a8..ff7175e 100644
--- a/dyh-service/dyh-sync/src/main/java/cn/huge/module/buildcode/dao/mapper/xml/BuildCodeMapper.xml
+++ b/dyh-service/dyh-sync/src/main/java/cn/huge/module/buildcode/dao/mapper/xml/BuildCodeMapper.xml
@@ -17,7 +17,7 @@
<result property="dataType" column="dataType"/>
<result property="dataScale" column="dataScale"/>
</resultMap>
- <!--自定义查询-->
+ <!--自定义查询-mysql-->
<select id="getTabInfo" parameterType="String" resultMap="reslutMap">
select t2.table_name as 'tableName',
t2.table_comment as 'tableComments',
diff --git a/dyh-service/dyh-sync/src/main/java/cn/huge/module/buildcode/service/BuildCodeService.java b/dyh-service/dyh-sync/src/main/java/cn/huge/module/buildcode/service/BuildCodeService.java
index 2906ec2..c16edbd 100644
--- a/dyh-service/dyh-sync/src/main/java/cn/huge/module/buildcode/service/BuildCodeService.java
+++ b/dyh-service/dyh-sync/src/main/java/cn/huge/module/buildcode/service/BuildCodeService.java
@@ -63,7 +63,6 @@
* @param packagePath 包路径
* @param packageName 包名
* @param className 类名
- * @param tableSchema 数据库
* @param tableName 表名
* @param author 作者
* @param version 版本
@@ -102,7 +101,6 @@
* @param basePackage 包路径
* @param packageName 包名
* @param className 类名
- * @param tableSchema 数据库
* @param tableName 表名
* @param author 作者
* @param version 版本
@@ -110,12 +108,15 @@
public void buildAll(String basePackage, String packageName, String className, String tableSchema, String tableName, String author, String version) {
Map tplData = this.getTplData(basePackage, packageName, className, tableSchema, tableName, author, version);
try {
+ // 必须
this.buildPo(tplData);
this.buildBo(tplData);
this.buildDaoMapper(tplData);
this.buildDaoMapperXml(tplData);
this.buildService(tplData);
- this.buildController(tplData);
+ this.buildWebController(tplData);
+ // 可选
+// this.buildWechatController(tplData);
// this.buildJson(tplData);
// this.buildJsForm(tplData);
} catch (TemplateNotFoundException e) {
@@ -136,7 +137,6 @@
* @param basePackage 包路径
* @param packageName 包名
* @param className 类名
- * @param tableSchema 数据库
* @param tableName 表名
* @param author 作者
* @param version 版本
@@ -163,7 +163,6 @@
* @param basePackage 包路径
* @param packageName 包名
* @param className 类名
- * @param tableSchema 数据库
* @param tableName 表名
* @param author 作者
* @param version 版本
@@ -190,7 +189,6 @@
* @param basePackage 包路径
* @param packageName 包名
* @param className 类名
- * @param tableSchema 数据库
* @param tableName 表名
* @param author 作者
* @param version 版本
@@ -217,7 +215,6 @@
* @param basePackage 包路径
* @param packageName 包名
* @param className 类名
- * @param tableSchema 数据库
* @param tableName 表名
* @param author 作者
* @param version 版本
@@ -244,7 +241,6 @@
* @param basePackage 包路径
* @param packageName 包名
* @param className 类名
- * @param tableSchema 数据库
* @param tableName 表名
* @param author 作者
* @param version 版本
@@ -267,19 +263,44 @@
}
/**
- * 生成Controller层的代码
+ * 生成webController层的代码
* @param basePackage 包路径
* @param packageName 包名
* @param className 类名
- * @param tableSchema 数据库
* @param tableName 表名
* @param author 作者
* @param version 版本
*/
- public void buildController(String basePackage, String packageName, String className, String tableSchema, String tableName, String author, String version) {
+ public void buildWebController(String basePackage, String packageName, String className, String tableSchema, String tableName, String author, String version) {
Map tplData = this.getTplData(basePackage, packageName, className, tableSchema, tableName, author, version);
try {
- this.buildController(tplData);
+ this.buildWebController(tplData);
+ } catch (TemplateNotFoundException e) {
+ log.error("TemplateNotFoundException");
+ } catch (TemplateException e) {
+ log.error("TemplateException");
+ } catch (MalformedTemplateNameException e) {
+ log.error("MalformedTemplateNameException");
+ } catch (ParseException e) {
+ log.error("ParseException");
+ } catch (IOException e) {
+ log.error("IOException");
+ }
+ }
+
+ /**
+ * 生成wechatController层的代码
+ * @param basePackage 包路径
+ * @param packageName 包名
+ * @param className 类名
+ * @param tableName 表名
+ * @param author 作者
+ * @param version 版本
+ */
+ public void buildWechatController(String basePackage, String packageName, String className, String tableSchema, String tableName, String author, String version) {
+ Map tplData = this.getTplData(basePackage, packageName, className, tableSchema, tableName, author, version);
+ try {
+ this.buildWechatController(tplData);
} catch (TemplateNotFoundException e) {
log.error("TemplateNotFoundException");
} catch (TemplateException e) {
@@ -298,7 +319,6 @@
* @param basePackage 包路径
* @param packageName 包名
* @param className 类名
- * @param tableSchema 数据库
* @param tableName 表名
* @param author 作者
* @param version 版本
@@ -326,7 +346,6 @@
* @param basePackage 包路径
* @param packageName 包名
* @param className 类名
- * @param tableSchema 数据库
* @param tableName 表名
* @param author 作者
* @param version 版本
@@ -353,7 +372,6 @@
* @param basePackage 包路径
* @param packageName 包名
* @param className 类名
- * @param tableSchema 数据库
* @param tableName 表名
* @param author 作者
* @param version 版本
@@ -380,7 +398,7 @@
* @param basePackage 包路径
* @param packageName 包名
* @param className 类名
- * @param tableSchema 数据库
+
* @param tableName 表名
* @param author 作者
* @param version 版本
@@ -511,11 +529,11 @@
}
/**
- * 创建控制层
+ * 创建web控制层
*
* @param tplData
*/
- private void buildController(Map tplData) throws TemplateException, IOException {
+ private void buildWebController(Map tplData) throws TemplateException, IOException {
tplData.put("packagePath", ((String) tplData.get("packageName")).toLowerCase());
String className = (String) tplData.get("className");
if (Character.isLowerCase(className.charAt(0))){
@@ -527,11 +545,37 @@
tplData.put("lowerName", lowerName);
}
- Template template = cfg.getTemplate("controller.ftl");
+ Template template = cfg.getTemplate("webController.ftl");
StringBuffer path = new StringBuffer(ROOT_MAIN_PATH)
.append(tplData.get("basePackagePath"))
- .append(tplData.get("packageName")).append("/controller/")
- .append(tplData.get("className")).append("Controller")
+ .append(tplData.get("packageName")).append("/controller/web/")
+ .append(tplData.get("className")).append("WebController")
+ .append(".java");
+ this.buildFile(template, tplData, path.toString());
+ }
+
+ /**
+ * 创建wechat控制层
+ *
+ * @param tplData
+ */
+ private void buildWechatController(Map tplData) throws TemplateException, IOException {
+ tplData.put("packagePath", ((String) tplData.get("packageName")).toLowerCase());
+ String className = (String) tplData.get("className");
+ if (Character.isLowerCase(className.charAt(0))){
+ tplData.put("classPath", className);
+ tplData.put("lowerName", className);
+ }else{
+ String lowerName = (new StringBuilder()).append(Character.toLowerCase(className.charAt(0))).append(className.substring(1)).toString();
+ tplData.put("classPath", lowerName);
+ tplData.put("lowerName", lowerName);
+ }
+
+ Template template = cfg.getTemplate("wechatController.ftl");
+ StringBuffer path = new StringBuffer(ROOT_MAIN_PATH)
+ .append(tplData.get("basePackagePath"))
+ .append(tplData.get("packageName")).append("/controller/wechat/")
+ .append(tplData.get("className")).append("WechatController")
.append(".java");
this.buildFile(template, tplData, path.toString());
}
diff --git a/dyh-service/dyh-sync/src/test/java/cn/huge/module/BuildCodeServiceTest.java b/dyh-service/dyh-sync/src/test/java/cn/huge/module/BuildCodeServiceTest.java
index 530471d..c7516a6 100644
--- a/dyh-service/dyh-sync/src/test/java/cn/huge/module/BuildCodeServiceTest.java
+++ b/dyh-service/dyh-sync/src/test/java/cn/huge/module/BuildCodeServiceTest.java
@@ -11,16 +11,16 @@
private BuildCodeService service;
private String basePackage = "cn.huge.module";
- private String packageName = "cases";
- private String className = "FileInfo";
- private String tableSchema = "huge-dyh2.0_v100_dev";
- private String tableName = "dyh_file_info";
+ private String packageName = "";
+ private String className = "";
+ private String tableSchema = "gzdyh_dev";
+ private String tableName = "";
private String author = "liyj";
private String version = "1.0.0";
@Test
public void buildAllTest() {
- service.buildAll(basePackage, packageName, "CaseInfo", tableSchema, "dyh_case_info", author, version);
+ service.buildAll(basePackage, packageName, className, tableSchema, tableName, author, version);
}
/********************************************************
@@ -43,13 +43,19 @@
}
@Test
- public void buildControllerTest() {
- service.buildController(basePackage, packageName, className, tableSchema, tableName, author, version);
+ public void buildWebControllerTest() {
+ service.buildWebController(basePackage, packageName, className, tableSchema, tableName, author, version);
+ }
+
+ @Test
+ public void buildWechatControllerTest() {
+ service.buildWechatController(basePackage, packageName, className, tableSchema, tableName, author, version);
}
@Test
public void buildJsonTest() {
service.buildJson(basePackage, packageName, className, tableSchema, tableName, author, version);
+
}
@Test
diff --git a/dyh-service/dyh-utils/src/main/java/cn/huge/module/buildcode/dao/mapper/xml/BuildCodeMapper.xml b/dyh-service/dyh-utils/src/main/java/cn/huge/module/buildcode/dao/mapper/xml/BuildCodeMapper.xml
index 11b38fb..1f10b6e 100644
--- a/dyh-service/dyh-utils/src/main/java/cn/huge/module/buildcode/dao/mapper/xml/BuildCodeMapper.xml
+++ b/dyh-service/dyh-utils/src/main/java/cn/huge/module/buildcode/dao/mapper/xml/BuildCodeMapper.xml
@@ -19,24 +19,15 @@
</resultMap>
<!--自定义查询-->
<select id="getTabInfo" parameterType="String" resultMap="reslutMap">
- SELECT
- t1.table_name AS "tableName",
- t2.comments AS "tableComments",
- t1.column_name AS "name",
- t1.data_type AS "dataType",
- c.comments AS "comments"
- FROM
- user_tab_columns t1
- JOIN
- user_tab_comments t2
- ON
- t1.table_name = t2.table_name
- LEFT JOIN
- user_col_comments c
- ON
- t1.table_name = c.table_name AND t1.column_name = c.column_name
- WHERE
- t1.table_name = #{tableName}
+ SELECT t1.table_name AS "tableName", t2.comments AS "tableComments", t1.column_name AS "name",
+ t1.data_type AS "dataType", t3.comments AS "comments", t1.data_default AS "dataScale"
+ FROM all_tab_columns t1
+ LEFT JOIN all_tab_comments t2 ON t1.table_name = t2.table_name
+ LEFT JOIN user_col_comments t3 ON t1.table_name = t3.table_name AND t1.column_name = t3.column_name
+ WHERE t1.table_name = #{tableName}
+ AND t1.OWNER = #{tableSchema}
+ AND t2.OWNER = #{tableSchema}
+ AND t3.OWNER = #{tableSchema}
</select>
</mapper>
\ No newline at end of file
diff --git a/dyh-service/dyh-utils/src/main/java/cn/huge/module/buildcode/service/BuildCodeService.java b/dyh-service/dyh-utils/src/main/java/cn/huge/module/buildcode/service/BuildCodeService.java
index 88619cd..c16edbd 100644
--- a/dyh-service/dyh-utils/src/main/java/cn/huge/module/buildcode/service/BuildCodeService.java
+++ b/dyh-service/dyh-utils/src/main/java/cn/huge/module/buildcode/service/BuildCodeService.java
@@ -63,7 +63,6 @@
* @param packagePath 包路径
* @param packageName 包名
* @param className 类名
- * @param tableSchema 数据库
* @param tableName 表名
* @param author 作者
* @param version 版本
@@ -102,7 +101,6 @@
* @param basePackage 包路径
* @param packageName 包名
* @param className 类名
- * @param tableSchema 数据库
* @param tableName 表名
* @param author 作者
* @param version 版本
@@ -110,13 +108,16 @@
public void buildAll(String basePackage, String packageName, String className, String tableSchema, String tableName, String author, String version) {
Map tplData = this.getTplData(basePackage, packageName, className, tableSchema, tableName, author, version);
try {
+ // 必须
this.buildPo(tplData);
this.buildBo(tplData);
this.buildDaoMapper(tplData);
this.buildDaoMapperXml(tplData);
this.buildService(tplData);
- this.buildController(tplData);
- this.buildJson(tplData);
+ this.buildWebController(tplData);
+ // 可选
+// this.buildWechatController(tplData);
+// this.buildJson(tplData);
// this.buildJsForm(tplData);
} catch (TemplateNotFoundException e) {
log.error("TemplateNotFoundException");
@@ -136,7 +137,6 @@
* @param basePackage 包路径
* @param packageName 包名
* @param className 类名
- * @param tableSchema 数据库
* @param tableName 表名
* @param author 作者
* @param version 版本
@@ -163,7 +163,6 @@
* @param basePackage 包路径
* @param packageName 包名
* @param className 类名
- * @param tableSchema 数据库
* @param tableName 表名
* @param author 作者
* @param version 版本
@@ -190,7 +189,6 @@
* @param basePackage 包路径
* @param packageName 包名
* @param className 类名
- * @param tableSchema 数据库
* @param tableName 表名
* @param author 作者
* @param version 版本
@@ -217,7 +215,6 @@
* @param basePackage 包路径
* @param packageName 包名
* @param className 类名
- * @param tableSchema 数据库
* @param tableName 表名
* @param author 作者
* @param version 版本
@@ -244,7 +241,6 @@
* @param basePackage 包路径
* @param packageName 包名
* @param className 类名
- * @param tableSchema 数据库
* @param tableName 表名
* @param author 作者
* @param version 版本
@@ -267,19 +263,44 @@
}
/**
- * 生成Controller层的代码
+ * 生成webController层的代码
* @param basePackage 包路径
* @param packageName 包名
* @param className 类名
- * @param tableSchema 数据库
* @param tableName 表名
* @param author 作者
* @param version 版本
*/
- public void buildController(String basePackage, String packageName, String className, String tableSchema, String tableName, String author, String version) {
+ public void buildWebController(String basePackage, String packageName, String className, String tableSchema, String tableName, String author, String version) {
Map tplData = this.getTplData(basePackage, packageName, className, tableSchema, tableName, author, version);
try {
- this.buildController(tplData);
+ this.buildWebController(tplData);
+ } catch (TemplateNotFoundException e) {
+ log.error("TemplateNotFoundException");
+ } catch (TemplateException e) {
+ log.error("TemplateException");
+ } catch (MalformedTemplateNameException e) {
+ log.error("MalformedTemplateNameException");
+ } catch (ParseException e) {
+ log.error("ParseException");
+ } catch (IOException e) {
+ log.error("IOException");
+ }
+ }
+
+ /**
+ * 生成wechatController层的代码
+ * @param basePackage 包路径
+ * @param packageName 包名
+ * @param className 类名
+ * @param tableName 表名
+ * @param author 作者
+ * @param version 版本
+ */
+ public void buildWechatController(String basePackage, String packageName, String className, String tableSchema, String tableName, String author, String version) {
+ Map tplData = this.getTplData(basePackage, packageName, className, tableSchema, tableName, author, version);
+ try {
+ this.buildWechatController(tplData);
} catch (TemplateNotFoundException e) {
log.error("TemplateNotFoundException");
} catch (TemplateException e) {
@@ -298,7 +319,6 @@
* @param basePackage 包路径
* @param packageName 包名
* @param className 类名
- * @param tableSchema 数据库
* @param tableName 表名
* @param author 作者
* @param version 版本
@@ -326,7 +346,6 @@
* @param basePackage 包路径
* @param packageName 包名
* @param className 类名
- * @param tableSchema 数据库
* @param tableName 表名
* @param author 作者
* @param version 版本
@@ -353,7 +372,6 @@
* @param basePackage 包路径
* @param packageName 包名
* @param className 类名
- * @param tableSchema 数据库
* @param tableName 表名
* @param author 作者
* @param version 版本
@@ -380,7 +398,7 @@
* @param basePackage 包路径
* @param packageName 包名
* @param className 类名
- * @param tableSchema 数据库
+
* @param tableName 表名
* @param author 作者
* @param version 版本
@@ -511,11 +529,11 @@
}
/**
- * 创建控制层
+ * 创建web控制层
*
* @param tplData
*/
- private void buildController(Map tplData) throws TemplateException, IOException {
+ private void buildWebController(Map tplData) throws TemplateException, IOException {
tplData.put("packagePath", ((String) tplData.get("packageName")).toLowerCase());
String className = (String) tplData.get("className");
if (Character.isLowerCase(className.charAt(0))){
@@ -527,11 +545,37 @@
tplData.put("lowerName", lowerName);
}
- Template template = cfg.getTemplate("controller.ftl");
+ Template template = cfg.getTemplate("webController.ftl");
StringBuffer path = new StringBuffer(ROOT_MAIN_PATH)
.append(tplData.get("basePackagePath"))
- .append(tplData.get("packageName")).append("/controller/")
- .append(tplData.get("className")).append("Controller")
+ .append(tplData.get("packageName")).append("/controller/web/")
+ .append(tplData.get("className")).append("WebController")
+ .append(".java");
+ this.buildFile(template, tplData, path.toString());
+ }
+
+ /**
+ * 创建wechat控制层
+ *
+ * @param tplData
+ */
+ private void buildWechatController(Map tplData) throws TemplateException, IOException {
+ tplData.put("packagePath", ((String) tplData.get("packageName")).toLowerCase());
+ String className = (String) tplData.get("className");
+ if (Character.isLowerCase(className.charAt(0))){
+ tplData.put("classPath", className);
+ tplData.put("lowerName", className);
+ }else{
+ String lowerName = (new StringBuilder()).append(Character.toLowerCase(className.charAt(0))).append(className.substring(1)).toString();
+ tplData.put("classPath", lowerName);
+ tplData.put("lowerName", lowerName);
+ }
+
+ Template template = cfg.getTemplate("wechatController.ftl");
+ StringBuffer path = new StringBuffer(ROOT_MAIN_PATH)
+ .append(tplData.get("basePackagePath"))
+ .append(tplData.get("packageName")).append("/controller/wechat/")
+ .append(tplData.get("className")).append("WechatController")
.append(".java");
this.buildFile(template, tplData, path.toString());
}
diff --git a/dyh-service/dyh-utils/src/test/java/cn/huge/module/BuildCodeServiceTest.java b/dyh-service/dyh-utils/src/test/java/cn/huge/module/BuildCodeServiceTest.java
index 3ba0d2d..c7516a6 100644
--- a/dyh-service/dyh-utils/src/test/java/cn/huge/module/BuildCodeServiceTest.java
+++ b/dyh-service/dyh-utils/src/test/java/cn/huge/module/BuildCodeServiceTest.java
@@ -11,17 +11,16 @@
private BuildCodeService service;
private String basePackage = "cn.huge.module";
- private String packageName = "hot";
- private String className = "FileInfo";
- private String tableSchema = "huge-dyh2.0_v100_dev";
- private String tableName = "dyh_file_info";
+ private String packageName = "";
+ private String className = "";
+ private String tableSchema = "gzdyh_dev";
+ private String tableName = "";
private String author = "liyj";
private String version = "1.0.0";
@Test
public void buildAllTest() {
- service.buildAll(basePackage, packageName, "HotVideo", tableSchema, "dyh_hot_video", author, version);
- service.buildAll(basePackage, packageName, "HotNews", tableSchema, "dyh_hot_news", author, version);
+ service.buildAll(basePackage, packageName, className, tableSchema, tableName, author, version);
}
/********************************************************
@@ -30,13 +29,7 @@
*/
@Test
public void buildPoTest() {
- service.buildPo(basePackage, packageName, "FlowNodeDef", tableSchema, "dyh_flow_node_def", author, version);
- service.buildJson(basePackage, packageName, "FlowNodeDef", tableSchema, "dyh_flow_node_def", author, version);
- service.buildDaoMapperXml(basePackage, packageName, "FlowNodeDef", tableSchema, "dyh_flow_node_def", author, version);
-
- service.buildPo(basePackage, packageName, "FlowNode", tableSchema, "dyh_flow_node", author, version);
- service.buildJson(basePackage, packageName, "FlowNode", tableSchema, "dyh_flow_node", author, version);
- service.buildDaoMapperXml(basePackage, packageName, "FlowNode", tableSchema, "dyh_flow_node", author, version);
+ service.buildPo(basePackage, packageName, className, tableSchema, tableName, author, version);
}
@Test
@@ -50,13 +43,19 @@
}
@Test
- public void buildControllerTest() {
- service.buildController(basePackage, packageName, className, tableSchema, tableName, author, version);
+ public void buildWebControllerTest() {
+ service.buildWebController(basePackage, packageName, className, tableSchema, tableName, author, version);
+ }
+
+ @Test
+ public void buildWechatControllerTest() {
+ service.buildWechatController(basePackage, packageName, className, tableSchema, tableName, author, version);
}
@Test
public void buildJsonTest() {
service.buildJson(basePackage, packageName, className, tableSchema, tableName, author, version);
+
}
@Test
--
Gitblit v1.8.0