Commit 56b4b430 authored by 吴泽佳's avatar 吴泽佳

定时任务 初始提交

parent 101e917d
......@@ -17,21 +17,41 @@
<java.version>1.8</java.version>
</properties>
<dependencies>
<!-- <dependency>-->
<!-- <groupId>com.github.pagehelper</groupId>-->
<!-- <artifactId>pagehelper</artifactId>-->
<!-- <version>5.2.0</version>-->
<!-- </dependency>-->
<dependency>
<groupId>com.github.binarywang</groupId>
<artifactId>weixin-java-cp</artifactId>
<version>4.0.9.B</version>
</dependency>
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper</artifactId>
<version>5.2.0</version>
<artifactId>pagehelper-spring-boot-starter</artifactId>
<version>1.2.7</version>
</dependency>
<dependency>
<groupId>p6spy</groupId>
<artifactId>p6spy</artifactId>
<version>3.9.1</version>
<groupId>com.fengwenyi</groupId>
<artifactId>api-result</artifactId>
<version>2.3.1</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>p6spy</groupId>-->
<!-- <artifactId>p6spy</artifactId>-->
<!-- <version>3.9.1</version>-->
<!-- </dependency>-->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.4.2</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
<version>3.3.5</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
......@@ -51,11 +71,11 @@
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>
<!-- <dependency>-->
<!-- <groupId>com.h2database</groupId>-->
<!-- <artifactId>h2</artifactId>-->
<!-- <scope>runtime</scope>-->
<!-- </dependency>-->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
......@@ -76,23 +96,64 @@
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- 数据库连接 -->
<!-- 实现对数据库连接池的自动化配置 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency> <!-- 使用 MySQL -->
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<!-- mybatis -->
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>2.1.4</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.4.1</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.9.2</version>
</dependency>
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>swagger-bootstrap-ui</artifactId>
<version>1.9.6</version>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>5.5.6</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
<!-- <plugins>-->
<!-- <plugin>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-maven-plugin</artifactId>-->
<!-- <configuration>-->
<!-- <excludes>-->
<!-- <exclude>-->
<!-- <groupId>org.projectlombok</groupId>-->
<!-- <artifactId>lombok</artifactId>-->
<!-- </exclude>-->
<!-- </excludes>-->
<!-- </configuration>-->
<!-- </plugin>-->
<!-- </plugins>-->
</build>
</project>
package com.tanpu.feo.feojob;
import com.baomidou.dynamic.datasource.annotation.DS;
import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.core.env.Environment;
import org.springframework.scheduling.annotation.EnableScheduling;
import javax.sql.DataSource;
import java.sql.Connection;
import java.sql.SQLException;
@SpringBootApplication
@MapperScan("com.tanpu.feo.feojob")
public class FeoJobApplication {
@MapperScan(basePackages = "com.tanpu.feo.**.mapper")
@Slf4j
@EnableScheduling //开启定时任务
public class FeoJobApplication implements CommandLineRunner {
@Autowired
private DataSource dataSource;
@Autowired
private Environment env;
public static void main(String[] args) {
SpringApplication.run(FeoJobApplication.class, args);
}
@Override
public void run(String... args) {
try (Connection conn = dataSource.getConnection()) {
String SERVER_PORT = env.getProperty("server.port");
String SYSTEM_NAME = env.getProperty("server.servlet.context-path");
// 这里,可以做点什么
// log.info("[run][获得连接:{}]", conn);
log.info("\n--------------------------------------------------------------------------------------------------------------------\n\t" +
"数据库链接:{}\n\t" +
"Application '{}' is running! Access URLs:\n\t" +
"Local: \t\t\thttp://127.0.0.1:{}\n\t" +
"Swagger url: \thttp://localhost:{}{}/doc.html\n--------------------------------------------------------------------------------------------------------------------",
conn,
SYSTEM_NAME,
SERVER_PORT,
SERVER_PORT,
SYSTEM_NAME);
} catch (SQLException e) {
throw new RuntimeException(e);
}
}
}
package com.tanpu.feo.feojob.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import io.swagger.annotations.Api;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
@Configuration
@EnableSwagger2
@ComponentScan(basePackages = "com.tanpu.feo.feojob") // 配置扫描的基础包
public class SwaggerConfig {
// 在构建文档的时候 只显示添加了@Api注解的类
@Bean // 作为bean纳入spring容器
public Docket api() {
return new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).select().paths(PathSelectors.any())
.apis(RequestHandlerSelectors.withClassAnnotation(Api.class)).build();
}
private ApiInfo apiInfo() {
return new ApiInfoBuilder().title("API接口文档").description("API接口文档,及相关接口的说明").version("1.0.0").build();
}
}
package com.tanpu.feo.feojob.constant;
/**
* 部门信息表Constant 数据库表字段对应的实体类属性名常量类,
* 在编写自定义impl层tk.mybatis方法需要指定属性名时使用
* @author zejia zj wu 2021年05月18日
* @version 1.0
*/
public class DepartmentConstant{
/** 唯一主键 */
public static final String ID = "id";
/** 部门id */
public static final String DEPARTMENT_ID = "departmentId";
/** 部门name */
public static final String DEPARTMENT_NAME = "departmentName";
/** 部门类型 */
public static final String TYPE = "type";
/** 上级部门id,为空表示上级就是机构 */
public static final String PARENT_DEPART_ID = "parentDepartId";
/** 机构id */
public static final String ORG_ID = "orgId";
/** 0未删除,1删除 */
public static final String DELETE_TAG = "deleteTag";
/** 部门层级,从1开始,0表示机构 */
public static final String LEVEL = "level";
/** 创建时间 */
public static final String CREATE_TIME = "createTime";
/** 修改时间 */
public static final String UPDATE_TIME = "updateTime";
/** 修改人 */
public static final String UPDATE_BY = "updateBy";
/** 创建人 */
public static final String CREATE_BY = "createBy";
/** 人数 */
public static final String MEMBERS = "members";
private DepartmentConstant() {}
}
package com.tanpu.feo.feojob.constant;
/**
* 部门员工关系表Constant 数据库表字段对应的实体类属性名常量类,
* 在编写自定义impl层tk.mybatis方法需要指定属性名时使用
* @author zejia zj wu 2021年05月18日
* @version 1.0
*/
public class DepartmentEmployeeConstant{
/** 唯一主键 */
public static final String ID = "id";
/** 员工id */
public static final String EMPLOYEE_ID = "employeeId";
/** 部门id */
public static final String DEPARTMENT_ID = "departmentId";
/** 类型, d负责人, s普通职员 */
public static final String TYPE = "type";
/** 机构id */
public static final String ORG_ID = "orgId";
/** 0未删除,1删除 */
public static final String DELETE_TAG = "deleteTag";
/** 创建时间 */
public static final String CREATE_TIME = "createTime";
/** 修改时间 */
public static final String UPDATE_TIME = "updateTime";
/** 修改人 */
public static final String UPDATE_BY = "updateBy";
/** 创建人 */
public static final String CREATE_BY = "createBy";
private DepartmentEmployeeConstant() {}
}
package com.tanpu.feo.feojob.constant;
/**
* 员工信息表Constant 数据库表字段对应的实体类属性名常量类,
* 在编写自定义impl层tk.mybatis方法需要指定属性名时使用
* @author zejia zj wu 2021年05月18日
* @version 1.0
*/
public class EmployeeConstant{
/** 唯一主键 */
public static final String ID = "id";
/** 员工id */
public static final String EMPLOYEE_ID = "employeeId";
/** 员工姓名 */
public static final String NAME = "name";
/** 员工类型 */
public static final String TYPE = "type";
/** 机构id */
public static final String ORG_ID = "orgId";
/** 员工手机号 */
public static final String PHONE = "phone";
/** 员工邮箱 */
public static final String MAIL = "mail";
/** 职工层级 */
public static final String LEVEL = "level";
/** 员工绑定的微信 */
public static final String BOUND_WECHAT = "boundWechat";
/** 员工状态 */
public static final String STATUS = "status";
/** 0未删除,1删除 */
public static final String DELETE_TAG = "deleteTag";
/** 创建时间 */
public static final String CREATE_TIME = "createTime";
/** 修改时间 */
public static final String UPDATE_TIME = "updateTime";
/** 修改人 */
public static final String UPDATE_BY = "updateBy";
/** 创建人 */
public static final String CREATE_BY = "createBy";
/** 员工工号 */
public static final String NUMBER = "number";
private EmployeeConstant() {}
}
package com.tanpu.feo.feojob.constant;
/**
* 员工角色关系表Constant 数据库表字段对应的实体类属性名常量类,
* 在编写自定义impl层tk.mybatis方法需要指定属性名时使用
* @author zejia zj wu 2021年05月18日
* @version 1.0
*/
public class EmployeeRoleConstant{
/** 唯一主键 */
public static final String ID = "id";
/** 员工id */
public static final String EMPLOYEE_ID = "employeeId";
/** 角色id */
public static final String ROLE_ID = "roleId";
/** 描述 */
public static final String DESCRIPTION = "description";
/** 机构id */
public static final String ORG_ID = "orgId";
/** 0未删除,1删除 */
public static final String DELETE_TAG = "deleteTag";
/** 创建时间 */
public static final String CREATE_TIME = "createTime";
/** 修改时间 */
public static final String UPDATE_TIME = "updateTime";
/** 修改人 */
public static final String UPDATE_BY = "updateBy";
/** 创建人 */
public static final String CREATE_BY = "createBy";
private EmployeeRoleConstant() {}
}
package com.tanpu.feo.feojob.constant;
/**
* Constant 数据库表字段对应的实体类属性名常量类,
* 在编写自定义impl层tk.mybatis方法需要指定属性名时使用
* @author zejia zj wu 2021年05月19日
* @version 1.0
*/
public class IfaAssetsConstant{
/** */
public static final String ID = "id";
/** 理财师id */
public static final String IFA_ID = "ifaId";
/** 持仓总市值 */
public static final String TOTAL_MARKET = "totalMarket";
/** 成交总市值 */
public static final String TRADE_TOTAL_MARKET = "tradeTotalMarket";
/** 总客户数 */
public static final String CUSTOMER_NUMBER = "customerNumber";
/** 成交客户数 */
public static final String TRADE_CUSTOMER_NUMBER = "tradeCustomerNumber";
/** 非成交客户数 */
public static final String NON_TRADE_CUSTOMER_NUMBER = "nonTradeCustomerNumber";
/** 男客户数 */
public static final String MALE_CUSTOMER_NUMBER = "maleCustomerNumber";
/** 女客户数 */
public static final String FEMALE_CUSTOMER_NUMBER = "femaleCustomerNumber";
/** 未定义性别客户数 */
public static final String NO_VALUESEX_CUSTOMER_NUMBER = "noValuesexCustomerNumber";
/** 持仓盈亏 */
public static final String HOLD_PROFIT = "holdProfit";
/** 持仓盈亏率 */
public static final String HOLD_PROFIT_RATIO = "holdProfitRatio";
/** 累计收益、累计盈亏 */
public static final String CUM_PROFIT = "cumProfit";
/** 成交1 总的 2 */
public static final String TYPE = "type";
/** 持仓市值分布 json */
public static final String MARKET_DISTRIBUTION = "marketDistribution";
/** 风险偏好分布 json */
public static final String RISK_DISTRIBUTION = "riskDistribution";
/** ifa 业绩走势 */
public static final String ASSETS_TREND = "assetsTrend";
/** 客户人数走势 */
public static final String CUSTOMER_TREND = "customerTrend";
/** 创建时间 */
public static final String CREATE_TIME = "createTime";
/** 更新时间 */
public static final String UPDATE_TIME = "updateTime";
/** 正常0 删除1 */
public static final String DELETE_TAG = "deleteTag";
/** 成交收益 */
public static final String TRADE_PROFIT = "tradeProfit";
/** 成交成本 */
public static final String TRADE_COST = "tradeCost";
/** 成交累积收益 */
public static final String TRADE_CUM_PROFIT = "tradeCumProfit";
/** 成交收益率 */
public static final String TRADE_PROFIT_RATIO = "tradeProfitRatio";
private IfaAssetsConstant() {}
}
package com.tanpu.feo.feojob.constant;
/**
* Constant 数据库表字段对应的实体类属性名常量类,
* 在编写自定义impl层tk.mybatis方法需要指定属性名时使用
* @author zejia zj wu 2021年05月18日
* @version 1.0
*/
public class OrgConstant{
/** 主键 */
public static final String ID = "id";
/** 机构唯一识别码 */
public static final String ORG_CODE = "orgCode";
/** 机构名称 */
public static final String ORG_NAME = "orgName";
/** 自动通过认证 */
public static final String AUTOMATIC_PROCESSING = "automaticProcessing";
/** 是否购买了精选:0:否 1:是 */
public static final String ISBUY_SELECTION = "isbuySelection";
/** 是否购买了今日聚焦 0:否 1:是 */
public static final String ISBUY_TODAYFOCUS = "isbuyTodayfocus";
/** 推送标签 */
public static final String AR_PUSH_LABELS = "arPushLabels";
/** 功能码 */
public static final String FUN_CODES = "funCodes";
/** 个人主页定制 */
public static final String HOMEPAGE_CUSTOM = "homepageCustom";
/** 获客内容设置 */
public static final String CONTENT_SET = "contentSet";
/** 名片模板 */
public static final String CARD_TEMPLATE = "cardTemplate";
/** 合格投资者认证开关 */
public static final String ACCREDITED_INVESTOR_SWITCH = "accreditedInvestorSwitch";
/** 朋友圈助手开关 */
public static final String FRIEND_TOOLS_SWITCH = "friendToolsSwitch";
/** 机构主体类别 */
public static final String TAG_CATEGORY_ID = "tagCategoryId";
/** 阿里云短信签名 */
public static final String ALIYUN_SIGN_NAME = "aliyunSignName";
/** 阿里云消息模版ID */
public static final String ALIYUN_TEMPCODE = "aliyunTempcode";
/** 阿里云AccessKeyId */
public static final String ALIYUN_ACCESS_KEY_ID = "aliyunAccessKeyId";
/** 阿里云AccessKeySecret */
public static final String ALIYUN_ACCESS_KEY_SECRET = "aliyunAccessKeySecret";
/** appId标识 */
public static final String APP_ID = "appId";
/** AppKey */
public static final String APP_KEY = "appKey";
/** SecretKey */
public static final String SECRET_KEY = "secretKey";
/** 服务到期时间 */
public static final String TIME_VALIDITY = "timeValidity";
/** 创建时间 */
public static final String CREATE_TIME = "createTime";
/** 创建人 */
public static final String CREATE_BY = "createBy";
/** 修改时间 */
public static final String UPDATE_TIME = "updateTime";
/** 修改人 */
public static final String UPDATE_BY = "updateBy";
/** 删除标识 */
public static final String DELETE_TAG = "deleteTag";
/** */
public static final String IS_CHECK_SUBJECT = "isCheckSubject";
/** */
public static final String APP_TYPE = "appType";
/** */
public static final String AGENT_ID = "agentId";
private OrgConstant() {}
}
package com.tanpu.feo.feojob.constant;
/**
* 机构扩展信息表Constant 数据库表字段对应的实体类属性名常量类,
* 在编写自定义impl层tk.mybatis方法需要指定属性名时使用
* @author zejia zj wu 2021年05月18日
* @version 1.0
*/
public class OrgExtConstant{
/** 唯一主键 */
public static final String ID = "id";
/** 机构id */
public static final String ORG_ID = "orgId";
/** 0未删除,1删除 */
public static final String DELETE_TAG = "deleteTag";
/** 组织架构管理模式, 1从企业微信同步,2自定义 */
public static final String MODEL = "model";
/** 企业微信认证相关key */
public static final String JSON_WXCP_KEY = "jsonWxcpKey";
/** 企业微信同步 数据MD5 */
public static final String MD5_WXCP_DATA = "md5WxcpData";
/** 创建时间 */
public static final String CREATE_TIME = "createTime";
/** 修改时间 */
public static final String UPDATE_TIME = "updateTime";
/** 修改人 */
public static final String UPDATE_BY = "updateBy";
/** 创建人 */
public static final String CREATE_BY = "createBy";
private OrgExtConstant() {}
}
package com.tanpu.feo.feojob.constant;
/**
* 角色信息表Constant 数据库表字段对应的实体类属性名常量类,
* 在编写自定义impl层tk.mybatis方法需要指定属性名时使用
* @author zejia zj wu 2021年05月19日
* @version 1.0
*/
public class RoleConstant{
/** 唯一主键 */
public static final String ID = "id";
/** 角色id */
public static final String ROLE_ID = "roleId";
/** 角色描述 */
public static final String DESCRIPTION = "description";
/** 角色类型, m管理员,t团队长,i理财师 */
public static final String TYPE = "type";
/** 0未删除,1删除 */
public static final String DELETE_TAG = "deleteTag";
/** 创建时间 */
public static final String CREATE_TIME = "createTime";
/** 修改时间 */
public static final String UPDATE_TIME = "updateTime";
/** 修改人 */
public static final String UPDATE_BY = "updateBy";
/** 创建人 */
public static final String CREATE_BY = "createBy";
private RoleConstant() {}
}
package com.tanpu.feo.feojob.constant;
/**
* Constant 数据库表字段对应的实体类属性名常量类,
* 在编写自定义impl层tk.mybatis方法需要指定属性名时使用
* @author zejia zj wu 2021年05月18日
* @version 1.0
*/
public class UserInfoConstant{
/** 唯一主键 */
public static final String ID = "id";
/** 微信openId */
public static final String UI_OPENID = "uiOpenid";
/** unionId */
public static final String UI_UNIONID = "uiUnionid";
/** 手机号 */
public static final String UI_TELPHONE = "uiTelphone";
/** 登录密码 */
public static final String UI_PWD = "uiPwd";
/** 昵称 */
public static final String UI_NICKNAME = "uiNickname";
/** 头像 */
public static final String UI_HEADIMG = "uiHeadimg";
/** 姓名 */
public static final String UI_USERNAME = "uiUsername";
/** 性别 0:男 1:女 */
public static final String UI_SEX = "uiSex";
/** 生日 */
public static final String UI_BIRTHDAY = "uiBirthday";
/** 个人介绍 */
public static final String UI_INTRODUCTION = "uiIntroduction";
/** 名片样式 0:小名片 1:大名片 */
public static final String UI_TYPE_MP = "uiTypeMp";
/** 名片头像 */
public static final String UI_HEADIMG_MP = "uiHeadimgMp";
/** 名片姓名 */
public static final String UI_USERNAME_MP = "uiUsernameMp";
/** 名片电话 */
public static final String UI_TELPHONE_MP = "uiTelphoneMp";
/** 手机 */
public static final String UI_MOBILEPHONE_MP = "uiMobilephoneMp";
/** 名片公司名称 */
public static final String UI_COMPANY_MP = "uiCompanyMp";
/** 名片公司地址 */
public static final String UI_COMPANY_ADDRESS_MP = "uiCompanyAddressMp";
/** 名片职位 */
public static final String UI_POSITION_MP = "uiPositionMp";
/** 行业 */
public static final String UI_INDUSTRY_MP = "uiIndustryMp";
/** 名片邮箱 */
public static final String UI_EMAIL_MP = "uiEmailMp";
/** 名片个人介绍 */
public static final String UI_INTRODUCTION_MP = "uiIntroductionMp";
/** 微信个人二维码名片 */
public static final String UI_WECHAT_QRCODE = "uiWechatQrcode";
/** 小程序二维码 */
public static final String UI_WECHAT_XCX_QRCODE = "uiWechatXcxQrcode";
/** 类型 0:app注册 1:平台添加 */
public static final String UI_TYPE = "uiType";
/** 用户身份 0:普通用户 1:种子用户 2:超级用户 */
public static final String UI_SHENFEN = "uiShenfen";
/** 认证状态 0:未认证 1:已认证 */
public static final String UI_RZSTATUS = "uiRzstatus";
/** 机构Id */
public static final String ORG_ID = "orgId";
/** 团队Id */
public static final String TEAM_ID = "teamId";
/** 加入团队时间 */
public static final String JOIN_TIME = "joinTime";
/** 员工工号 */
public static final String STAFF_NO = "staffNo";
/** 合格投资者认证状态 */
public static final String INVESTOR_CERTIFIED_STATUS = "investorCertifiedStatus";
/** 合格投资者认证时间 */
public static final String INVESTOR_CERTIFIED_TIME = "investorCertifiedTime";
/** 对外合作权限 */
public static final String TO_PARTNER = "toPartner";
/** 等级 */
public static final String UI_GRADE = "uiGrade";
/** 内容审核 */
public static final String CONTENT_REVIEW = "contentReview";
/** 所获荣誉 */
public static final String UI_HONOR = "uiHonor";
/** 海报扫码关注公众号引流人 */
public static final String UI_HB_USERID = "uiHbUserid";
/** */
public static final String STAFF_REGION = "staffRegion";
/** */
public static final String BRANCH_NAME = "branchName";
/** */
public static final String SUB_BRANCH_NAME = "subBranchName";
/** */
public static final String BRANCH_NETWORK_NAME = "branchNetworkName";
/** */
public static final String UI_GRADE_NAME = "uiGradeName";
/** */
public static final String UI_TARGET_GRADE_NAME = "uiTargetGradeName";
/** */
public static final String UI_SOURCE = "uiSource";
/** 创建时间 */
public static final String CREATETIME = "createtime";
/** 创建人 */
public static final String CREATEBY = "createby";
/** 修改时间 */
public static final String UPDATETIME = "updatetime";
/** 修改人 */
public static final String UPDATEBY = "updateby";
/** 删除标识 */
public static final String DELETETAG = "deletetag";
/** 前端角色 */
public static final String FRONT_ROLES = "frontRoles";
/** 名片检查 */
public static final String UI_CHECK_STATUS = "uiCheckStatus";
/** */
public static final String CITY = "city";
/** */
public static final String PROVINCE = "province";
/** */
public static final String COUNTRY = "country";
/** */
public static final String UI_INVITER = "uiInviter";
/** */
public static final String UI_INVITER_PHONE = "uiInviterPhone";
/** */
public static final String UI_AGE = "uiAge";
/** */
public static final String UI_REGION = "uiRegion";
/** */
public static final String UI_WECAHT = "uiWecaht";
/** */
public static final String UI_INVITER_TIME = "uiInviterTime";
/** 微信unionId */
public static final String UNIONID = "unionid";
/** 0游客,1注册用户,2理财师 */
public static final String LEVEL = "level";
/** 年龄 */
public static final String AGE = "age";
/** 区县 */
public static final String DISTRICT = "district";
/** 详细地址 */
public static final String ADDRESS = "address";
/** 学历:0: 未知,1:专科,2:本科,3:211本科,4:硕士及以上 */
public static final String EDUCATION = "education";
/** 微信号 */
public static final String WECHAT = "wechat";
/** 高净值客户数(0:无,1:10人一下,2:10-30人,3:30-50人,4:50以上) */
public static final String HIGH_WORTH_CUSTOMER_NUM = "highWorthCustomerNum";
/** 高净值客户资产配置:(0:无,1:100万一下,2:100-200万,3:200-400万,4:400-600万,5:600万以上) */
public static final String CUSTOMER_ASSET = "customerAsset";
/** 自身是否是理财师 */
public static final String FINANCIAL_PLANNER = "financialPlanner";
/** 会员到期时间 */
public static final String VIP_END_TIME = "vipEndTime";
/** */
public static final String UI_REGISTER_TIME = "uiRegisterTime";
/** 权限集 以英文;分割(S1-基础营) */
public static final String UI_AUTH = "uiAuth";
/** */
public static final String UI_CHANNEL = "uiChannel";
/** 审核时间 */
public static final String REVIEW_TIME = "reviewTime";
/** 苹果授权用户id */
public static final String UI_APPLE_USERID = "uiAppleUserid";
/** 理财师编号 */
public static final String IFA_NO = "ifaNo";
/** 真实姓名,禁用于运营维护 */
public static final String REALNAME = "realname";
private UserInfoConstant() {}
}
package com.tanpu.feo.feojob.controller;
import com.tanpu.feo.feojob.dto.DepartmentDTO;
import com.tanpu.feo.feojob.service.DepartmentService;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 部门信息表 Controller
*
* @author zejia zj wu 2021年05月18日
* @version 1.0
*/
@RestController
@Api(tags = "部门信息表")
@RequestMapping(value = "v1/department")
@Slf4j
public class DepartmentController {
@Autowired
private DepartmentService departmentService;
}
package com.tanpu.feo.feojob.controller;
import com.fengwenyi.api.result.ResultTemplate;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.tanpu.feo.feojob.dto.DepartmentEmployeeDTO;
import com.tanpu.feo.feojob.service.DepartmentEmployeeService;
import com.tanpu.feo.feojob.web.dto.PageHelperDTO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 部门员工关系表 Controller
*
* @author zejia zj wu 2021年05月18日
* @version 1.0
*/
@RestController
@Api(tags = "部门员工关系表")
@RequestMapping(value = "v1/departmentEmployee")
@Slf4j
public class DepartmentEmployeeController {
@Autowired
private DepartmentEmployeeService departmentEmployeeService;
/**
* 按主键查询部门员工关系表
*
* @return
* @updateRecord - 初次创建
* @version 1.0 (2021年05月18日)
* @author zejia zj wu
*/
@RequestMapping(value = "/select/{id}", method = RequestMethod.GET)
@ApiOperation(value = "按主键查询部门员工关系表")
public ResultTemplate<DepartmentEmployeeDTO> selectDepartmentEmployeeById(@PathVariable String id) {
return ResultTemplate.success(departmentEmployeeService.selectById(id));
}
/**
* 根据条件分页查询全部部门员工关系表
*
* @return
* @updateRecord - 初次创建
* @version 1.0 (2021年05月18日)
* @author zejia zj wu
*/
@RequestMapping(value = "/pageList", method = RequestMethod.POST)
@ApiOperation(value = "根据条件分页查询全部部门员工关系表")
public ResultTemplate<PageHelperDTO<DepartmentEmployeeDTO>> pageList(@RequestBody @Validated DepartmentEmployeeDTO departmentEmployeeDTO) throws IllegalAccessException {
Page<DepartmentEmployeeDTO> page = PageHelper.startPage(departmentEmployeeDTO.getPageNum(), departmentEmployeeDTO.getPageSize());
List<DepartmentEmployeeDTO> departmentEmployeeDtoList = departmentEmployeeService.selectListByObject(departmentEmployeeDTO);
return ResultTemplate.success(new PageHelperDTO<>(page, departmentEmployeeDtoList));
}
}
package com.tanpu.feo.feojob.controller;
import com.tanpu.feo.feojob.dto.EmployeeDTO;
import com.tanpu.feo.feojob.service.EmployeeService;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 员工信息表 Controller
*
* @author zejia zj wu 2021年05月18日
* @version 1.0
*/
@RestController
@Api(tags = "员工信息表")
@RequestMapping(value = "v1/employee")
@Slf4j
public class EmployeeController {
@Autowired
private EmployeeService employeeService;
}
package com.tanpu.feo.feojob.controller;
import com.tanpu.feo.feojob.dto.EmployeeRoleDTO;
import com.tanpu.feo.feojob.service.EmployeeRoleService;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 员工角色关系表 Controller
*
* @author zejia zj wu 2021年05月18日
* @version 1.0
*/
@RestController
@Api(tags = "员工角色关系表")
@RequestMapping(value = "v1/employeeRole")
@Slf4j
public class EmployeeRoleController {
@Autowired
private EmployeeRoleService employeeRoleService;
}
package com.tanpu.feo.feojob.controller;
import com.tanpu.feo.feojob.service.IfaAssetsService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* Controller
*
* @author zejia zj wu 2021年05月19日
* @version 1.0
*/
@RestController
@Api(tags = "")
@RequestMapping(value = "v1/ifaAssets")
@Slf4j
public class IfaAssetsController {
@Autowired
private IfaAssetsService ifaAssetsService;
}
package com.tanpu.feo.feojob.controller;
import com.tanpu.feo.feojob.service.OrgService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* Controller
*
* @author zejia zj wu 2021年05月18日
* @version 1.0
*/
@RestController
@Api(tags = "")
@RequestMapping(value = "v1/org")
@Slf4j
public class OrgController {
@Autowired
private OrgService orgService;
}
package com.tanpu.feo.feojob.controller;
import com.tanpu.feo.feojob.service.OrgExtService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 机构扩展信息表 Controller
*
* @author zejia zj wu 2021年05月18日
* @version 1.0
*/
@RestController
@Api(tags = "机构扩展信息表")
@RequestMapping(value = "v1/orgExt")
@Slf4j
public class OrgExtController {
@Autowired
private OrgExtService orgExtService;
}
package com.tanpu.feo.feojob.controller;
import com.fengwenyi.api.result.ResultTemplate;
import com.tanpu.feo.feojob.jobs.OrgSyncByWxcpJob;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
@RestController
@Api(tags = "机构信息同步任务")
@RequestMapping(value = "v1/orgSyncByWxcp")
@Slf4j
public class OrgSyncByWxcpController {
@Autowired
private OrgSyncByWxcpJob orgSyncByWxcpJob;
@RequestMapping(value = "/execute", method = RequestMethod.GET)
@ApiOperation(value = "手动执行机构同步任务")
public ResultTemplate<String> selectDepartmentEmployeeById() {
orgSyncByWxcpJob.orgSyncByWxcp("N");
return ResultTemplate.success("执行完成");
}
}
package com.tanpu.feo.feojob.controller;
import com.tanpu.feo.feojob.service.RoleService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 角色信息表 Controller
*
* @author zejia zj wu 2021年05月19日
* @version 1.0
*/
@RestController
@Api(tags = "角色信息表")
@RequestMapping(value = "v1/role")
@Slf4j
public class RoleController {
@Autowired
private RoleService roleService;
}
package com.tanpu.feo.feojob.controller;
import com.tanpu.feo.feojob.service.UserInfoService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* Controller
*
* @author zejia zj wu 2021年05月18日
* @version 1.0
*/
@RestController
@Api(tags = "")
@RequestMapping(value = "v1/userInfo")
@Slf4j
public class UserInfoController {
@Autowired
private UserInfoService userInfoService;
}
package com.tanpu.feo.feojob.dto;
import com.tanpu.feo.feojob.web.dto.PageHelperDTO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.Builder;
import java.util.Date;
import io.swagger.annotations.ApiModelProperty;
/**
* 部门信息表DTO
*
* @author zejia zj wu 2021年05月18日
* @version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class DepartmentDTO extends PageHelperDTO {
private static final long serialVersionUID = 1L;
/** 部门id */
@ApiModelProperty(value = "部门id")
private String departmentId;
/** 部门name */
@ApiModelProperty(value = "部门name")
private String departmentName;
/** 部门类型 */
@ApiModelProperty(value = "部门类型")
private String type;
/** 上级部门id,为空表示上级就是机构 */
@ApiModelProperty(value = "上级部门id,为空表示上级就是机构")
private String parentDepartId;
/** 机构id */
@ApiModelProperty(value = "机构id")
private String orgId;
/** 部门层级,从1开始,0表示机构 */
@ApiModelProperty(value = "部门层级,从1开始,0表示机构")
private Integer level;
/** 人数 */
@ApiModelProperty(value = "人数")
private Integer members;
}
package com.tanpu.feo.feojob.dto;
//import com.caixiaoquan.faTools.web.dto.PageHelperDTO;
import com.tanpu.feo.feojob.web.dto.PageHelperDTO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.Builder;
import java.util.Date;
import io.swagger.annotations.ApiModelProperty;
/**
* 部门员工关系表DTO
*
* @author zejia zj wu 2021年05月18日
* @version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class DepartmentEmployeeDTO extends PageHelperDTO {
private static final long serialVersionUID = 1L;
/** 员工id */
@ApiModelProperty(value = "员工id")
private String employeeId;
/** 部门id */
@ApiModelProperty(value = "部门id")
private String departmentId;
/** 类型, d负责人, s普通职员 */
@ApiModelProperty(value = "类型, d负责人, s普通职员")
private String type;
/** 机构id */
@ApiModelProperty(value = "机构id")
private String orgId;
}
package com.tanpu.feo.feojob.dto;
import com.tanpu.feo.feojob.web.dto.PageHelperDTO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.Builder;
import java.util.Date;
import io.swagger.annotations.ApiModelProperty;
/**
* 员工信息表DTO
*
* @author zejia zj wu 2021年05月18日
* @version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class EmployeeDTO extends PageHelperDTO {
private static final long serialVersionUID = 1L;
/** 员工id */
@ApiModelProperty(value = "员工id")
private String employeeId;
/** 员工姓名 */
@ApiModelProperty(value = "员工姓名")
private String name;
/** 员工类型 */
@ApiModelProperty(value = "员工类型")
private String type;
/** 机构id */
@ApiModelProperty(value = "机构id")
private String orgId;
/** 员工手机号 */
@ApiModelProperty(value = "员工手机号")
private String phone;
/** 员工邮箱 */
@ApiModelProperty(value = "员工邮箱")
private String mail;
/** 职工层级 */
@ApiModelProperty(value = "职工层级")
private Integer level;
/** 员工绑定的微信 */
@ApiModelProperty(value = "员工绑定的微信")
private String boundWechat;
/** 员工状态 */
@ApiModelProperty(value = "员工状态")
private String status;
/** 员工工号 */
@ApiModelProperty(value = "员工工号")
private String number;
}
package com.tanpu.feo.feojob.dto;
import com.tanpu.feo.feojob.web.dto.PageHelperDTO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.Builder;
import java.util.Date;
import io.swagger.annotations.ApiModelProperty;
/**
* 员工角色关系表DTO
*
* @author zejia zj wu 2021年05月18日
* @version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class EmployeeRoleDTO extends PageHelperDTO {
private static final long serialVersionUID = 1L;
/** 员工id */
@ApiModelProperty(value = "员工id")
private String employeeId;
/** 角色id */
@ApiModelProperty(value = "角色id")
private String roleId;
/** 描述 */
@ApiModelProperty(value = "描述")
private String description;
/** 机构id */
@ApiModelProperty(value = "机构id")
private String orgId;
}
package com.tanpu.feo.feojob.dto;
import com.tanpu.feo.feojob.web.dto.PageHelperDTO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.Builder;
import java.math.BigDecimal;
import java.util.Date;
import io.swagger.annotations.ApiModelProperty;
/**
* DTO
*
* @author zejia zj wu 2021年05月19日
* @version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class IfaAssetsDTO extends PageHelperDTO {
private static final long serialVersionUID = 1L;
/** 理财师id */
@ApiModelProperty(value = "理财师id")
private String ifaId;
/** 持仓总市值 */
@ApiModelProperty(value = "持仓总市值")
private BigDecimal totalMarket;
/** 成交总市值 */
@ApiModelProperty(value = "成交总市值")
private BigDecimal tradeTotalMarket;
/** 总客户数 */
@ApiModelProperty(value = "总客户数")
private Integer customerNumber;
/** 成交客户数 */
@ApiModelProperty(value = "成交客户数")
private Integer tradeCustomerNumber;
/** 非成交客户数 */
@ApiModelProperty(value = "非成交客户数")
private Integer nonTradeCustomerNumber;
/** 男客户数 */
@ApiModelProperty(value = "男客户数")
private Integer maleCustomerNumber;
/** 女客户数 */
@ApiModelProperty(value = "女客户数")
private Integer femaleCustomerNumber;
/** 未定义性别客户数 */
@ApiModelProperty(value = "未定义性别客户数")
private Integer noValuesexCustomerNumber;
/** 持仓盈亏 */
@ApiModelProperty(value = "持仓盈亏")
private BigDecimal holdProfit;
/** 持仓盈亏率 */
@ApiModelProperty(value = "持仓盈亏率")
private BigDecimal holdProfitRatio;
/** 累计收益、累计盈亏 */
@ApiModelProperty(value = "累计收益、累计盈亏")
private BigDecimal cumProfit;
/** 成交1 总的 2 */
@ApiModelProperty(value = "成交1 总的 2")
private Integer type;
/** 持仓市值分布 json */
@ApiModelProperty(value = "持仓市值分布 json")
private String marketDistribution;
/** 风险偏好分布 json */
@ApiModelProperty(value = "风险偏好分布 json")
private String riskDistribution;
/** ifa 业绩走势 */
@ApiModelProperty(value = " ifa 业绩走势")
private String assetsTrend;
/** 客户人数走势 */
@ApiModelProperty(value = "客户人数走势")
private String customerTrend;
/** 成交收益 */
@ApiModelProperty(value = "成交收益")
private BigDecimal tradeProfit;
/** 成交成本 */
@ApiModelProperty(value = "成交成本")
private BigDecimal tradeCost;
/** 成交累积收益 */
@ApiModelProperty(value = "成交累积收益")
private BigDecimal tradeCumProfit;
/** 成交收益率 */
@ApiModelProperty(value = "成交收益率")
private BigDecimal tradeProfitRatio;
}
package com.tanpu.feo.feojob.dto;
import com.tanpu.feo.feojob.web.dto.PageHelperDTO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.Builder;
import java.util.Date;
import io.swagger.annotations.ApiModelProperty;
/**
* DTO
*
* @author zejia zj wu 2021年05月18日
* @version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class OrgDTO extends PageHelperDTO {
private static final long serialVersionUID = 1L;
/** 机构唯一识别码 */
@ApiModelProperty(value = "机构唯一识别码")
private String orgCode;
/** 机构名称 */
@ApiModelProperty(value = "机构名称")
private String orgName;
/** 自动通过认证 */
@ApiModelProperty(value = "自动通过认证")
private Integer automaticProcessing;
/** 是否购买了精选:0:否 1:是 */
@ApiModelProperty(value = "是否购买了精选:0:否 1:是")
private String isbuySelection;
/** 是否购买了今日聚焦 0:否 1:是 */
@ApiModelProperty(value = "是否购买了今日聚焦 0:否 1:是")
private String isbuyTodayfocus;
/** 推送标签 */
@ApiModelProperty(value = "推送标签")
private String arPushLabels;
/** 功能码 */
@ApiModelProperty(value = "功能码")
private String funCodes;
/** 个人主页定制 */
@ApiModelProperty(value = "个人主页定制")
private String homepageCustom;
/** 获客内容设置 */
@ApiModelProperty(value = "获客内容设置")
private String contentSet;
/** 名片模板 */
@ApiModelProperty(value = "名片模板")
private Integer cardTemplate;
/** 合格投资者认证开关 */
@ApiModelProperty(value = "合格投资者认证开关")
private Integer accreditedInvestorSwitch;
/** 朋友圈助手开关 */
@ApiModelProperty(value = "朋友圈助手开关")
private Integer friendToolsSwitch;
/** 机构主体类别 */
@ApiModelProperty(value = "机构主体类别")
private String tagCategoryId;
/** 阿里云短信签名 */
@ApiModelProperty(value = "阿里云短信签名")
private String aliyunSignName;
/** 阿里云消息模版ID */
@ApiModelProperty(value = "阿里云消息模版ID")
private String aliyunTempcode;
/** 阿里云AccessKeyId */
@ApiModelProperty(value = "阿里云AccessKeyId")
private String aliyunAccessKeyId;
/** 阿里云AccessKeySecret */
@ApiModelProperty(value = "阿里云AccessKeySecret")
private String aliyunAccessKeySecret;
/** appId标识 */
@ApiModelProperty(value = "appId标识")
private String appId;
/** AppKey */
@ApiModelProperty(value = "AppKey")
private String appKey;
/** SecretKey */
@ApiModelProperty(value = "SecretKey")
private String secretKey;
/** 服务到期时间 */
@ApiModelProperty(value = "服务到期时间")
private Date timeValidity;
/** */
@ApiModelProperty(value = "")
private Integer isCheckSubject;
/** */
@ApiModelProperty(value = "")
private Integer appType;
/** */
@ApiModelProperty(value = "")
private String agentId;
}
package com.tanpu.feo.feojob.dto;
import com.tanpu.feo.feojob.web.dto.PageHelperDTO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.Builder;
import java.util.Date;
import io.swagger.annotations.ApiModelProperty;
/**
* 机构扩展信息表DTO
*
* @author zejia zj wu 2021年05月18日
* @version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class OrgExtDTO extends PageHelperDTO {
private static final long serialVersionUID = 1L;
/** 机构id */
@ApiModelProperty(value = "机构id")
private String orgId;
/** 0未删除,1删除 */
/** 组织架构管理模式, 1从企业微信同步,2自定义 */
@ApiModelProperty(value = "组织架构管理模式, 1从企业微信同步,2自定义")
private String model;
/** 企业微信认证相关key */
@ApiModelProperty(value = "企业微信认证相关key")
private String jsonWxcpKey;
/** 企业微信同步 数据MD5 */
@ApiModelProperty(value = "企业微信同步 数据MD5")
private String md5WxcpData;
}
package com.tanpu.feo.feojob.dto;
import com.tanpu.feo.feojob.web.dto.PageHelperDTO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.Builder;
import java.util.Date;
import io.swagger.annotations.ApiModelProperty;
/**
* 角色信息表DTO
*
* @author zejia zj wu 2021年05月19日
* @version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class RoleDTO extends PageHelperDTO {
private static final long serialVersionUID = 1L;
/** 角色id */
@ApiModelProperty(value = "角色id")
private String roleId;
/** 角色描述 */
@ApiModelProperty(value = "角色描述")
private String description;
/** 角色类型, m管理员,t团队长,i理财师 */
@ApiModelProperty(value = "角色类型, m管理员,t团队长,i理财师")
private String type;
}
package com.tanpu.feo.feojob.dto;
import com.tanpu.feo.feojob.web.dto.PageHelperDTO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.Builder;
import java.util.Date;
import io.swagger.annotations.ApiModelProperty;
/**
* DTO
*
* @author zejia zj wu 2021年05月18日
* @version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class UserInfoDTO extends PageHelperDTO {
private static final long serialVersionUID = 1L;
/** 微信openId */
@ApiModelProperty(value = "微信openId")
private String uiOpenid;
/** unionId */
@ApiModelProperty(value = "unionId")
private String uiUnionid;
/** 手机号 */
@ApiModelProperty(value = "手机号")
private String uiTelphone;
/** 登录密码 */
@ApiModelProperty(value = "登录密码")
private String uiPwd;
/** 昵称 */
@ApiModelProperty(value = "昵称")
private String uiNickname;
/** 头像 */
@ApiModelProperty(value = "头像")
private String uiHeadimg;
/** 姓名 */
@ApiModelProperty(value = "姓名")
private String uiUsername;
/** 性别 0:男 1:女 */
@ApiModelProperty(value = "性别 0:男 1:女")
private String uiSex;
/** 生日 */
@ApiModelProperty(value = "生日")
private Date uiBirthday;
/** 个人介绍 */
@ApiModelProperty(value = "个人介绍")
private String uiIntroduction;
/** 名片样式 0:小名片 1:大名片 */
@ApiModelProperty(value = "名片样式 0:小名片 1:大名片")
private String uiTypeMp;
/** 名片头像 */
@ApiModelProperty(value = "名片头像")
private String uiHeadimgMp;
/** 名片姓名 */
@ApiModelProperty(value = "名片姓名")
private String uiUsernameMp;
/** 名片电话 */
@ApiModelProperty(value = "名片电话")
private String uiTelphoneMp;
/** 手机 */
@ApiModelProperty(value = "手机")
private String uiMobilephoneMp;
/** 名片公司名称 */
@ApiModelProperty(value = "名片公司名称")
private String uiCompanyMp;
/** 名片公司地址 */
@ApiModelProperty(value = "名片公司地址")
private String uiCompanyAddressMp;
/** 名片职位 */
@ApiModelProperty(value = "名片职位")
private String uiPositionMp;
/** 行业 */
@ApiModelProperty(value = "行业")
private String uiIndustryMp;
/** 名片邮箱 */
@ApiModelProperty(value = "名片邮箱")
private String uiEmailMp;
/** 名片个人介绍 */
@ApiModelProperty(value = "名片个人介绍")
private String uiIntroductionMp;
/** 微信个人二维码名片 */
@ApiModelProperty(value = "微信个人二维码名片")
private String uiWechatQrcode;
/** 小程序二维码 */
@ApiModelProperty(value = "小程序二维码")
private String uiWechatXcxQrcode;
/** 类型 0:app注册 1:平台添加 */
@ApiModelProperty(value = "类型 0:app注册 1:平台添加")
private String uiType;
/** 用户身份 0:普通用户 1:种子用户 2:超级用户 */
@ApiModelProperty(value = "用户身份 0:普通用户 1:种子用户 2:超级用户")
private String uiShenfen;
/** 认证状态 0:未认证 1:已认证 */
@ApiModelProperty(value = "认证状态 0:未认证 1:已认证")
private Integer uiRzstatus;
/** 机构Id */
@ApiModelProperty(value = "机构Id")
private String orgId;
/** 团队Id */
@ApiModelProperty(value = "团队Id")
private String teamId;
/** 加入团队时间 */
@ApiModelProperty(value = "加入团队时间")
private Date joinTime;
/** 员工工号 */
@ApiModelProperty(value = "员工工号")
private String staffNo;
/** 合格投资者认证状态 */
@ApiModelProperty(value = "合格投资者认证状态")
private Integer investorCertifiedStatus;
/** 合格投资者认证时间 */
@ApiModelProperty(value = "合格投资者认证时间")
private Date investorCertifiedTime;
/** 对外合作权限 */
@ApiModelProperty(value = "对外合作权限")
private String toPartner;
/** 等级 */
@ApiModelProperty(value = "等级")
private String uiGrade;
/** 内容审核 */
@ApiModelProperty(value = "内容审核")
private Integer contentReview;
/** 所获荣誉 */
@ApiModelProperty(value = "所获荣誉")
private String uiHonor;
/** 海报扫码关注公众号引流人 */
@ApiModelProperty(value = "海报扫码关注公众号引流人")
private String uiHbUserid;
/** */
@ApiModelProperty(value = "")
private String staffRegion;
/** */
@ApiModelProperty(value = "")
private String branchName;
/** */
@ApiModelProperty(value = "")
private String subBranchName;
/** */
@ApiModelProperty(value = "")
private String branchNetworkName;
/** */
@ApiModelProperty(value = "")
private String uiGradeName;
/** */
@ApiModelProperty(value = "")
private String uiTargetGradeName;
/** */
@ApiModelProperty(value = "")
private String uiSource;
/** 删除标识 */
@ApiModelProperty(value = "删除标识")
private String deletetag;
/** 前端角色 */
@ApiModelProperty(value = "前端角色")
private String frontRoles;
/** 名片检查 */
@ApiModelProperty(value = "名片检查")
private Integer uiCheckStatus;
/** */
@ApiModelProperty(value = "")
private String city;
/** */
@ApiModelProperty(value = "")
private String province;
/** */
@ApiModelProperty(value = "")
private String country;
/** */
@ApiModelProperty(value = "")
private String uiInviter;
/** */
@ApiModelProperty(value = "")
private String uiInviterPhone;
/** */
@ApiModelProperty(value = "")
private Integer uiAge;
/** */
@ApiModelProperty(value = "")
private String uiRegion;
/** */
@ApiModelProperty(value = "")
private String uiWecaht;
/** */
@ApiModelProperty(value = "")
private Date uiInviterTime;
/** 微信unionId */
@ApiModelProperty(value = "微信unionId")
private String unionid;
/** 0游客,1注册用户,2理财师 */
@ApiModelProperty(value = "0游客,1注册用户,2理财师")
private Integer level;
/** 年龄 */
@ApiModelProperty(value = "年龄")
private Integer age;
/** 区县 */
@ApiModelProperty(value = "区县")
private String district;
/** 详细地址 */
@ApiModelProperty(value = "详细地址")
private String address;
/** 学历:0: 未知,1:专科,2:本科,3:211本科,4:硕士及以上 */
@ApiModelProperty(value = "学历:0: 未知,1:专科,2:本科,3:211本科,4:硕士及以上")
private Integer education;
/** 微信号 */
@ApiModelProperty(value = "微信号")
private String wechat;
/** 高净值客户数(0:无,1:10人一下,2:10-30人,3:30-50人,4:50以上) */
@ApiModelProperty(value = "高净值客户数(0:无,1:10人一下,2:10-30人,3:30-50人,4:50以上)")
private Integer highWorthCustomerNum;
/** 高净值客户资产配置:(0:无,1:100万一下,2:100-200万,3:200-400万,4:400-600万,5:600万以上) */
@ApiModelProperty(value = "高净值客户资产配置:(0:无,1:100万一下,2:100-200万,3:200-400万,4:400-600万,5:600万以上)")
private Integer customerAsset;
/** 自身是否是理财师 */
@ApiModelProperty(value = "自身是否是理财师")
private Integer financialPlanner;
/** 会员到期时间 */
@ApiModelProperty(value = "会员到期时间")
private Date vipEndTime;
/** */
@ApiModelProperty(value = "")
private Date uiRegisterTime;
/** 权限集 以英文;分割(S1-基础营) */
@ApiModelProperty(value = "权限集 以英文;分割(S1-基础营)")
private String uiAuth;
/** */
@ApiModelProperty(value = "")
private String uiChannel;
/** 审核时间 */
@ApiModelProperty(value = "审核时间")
private Date reviewTime;
/** 苹果授权用户id */
@ApiModelProperty(value = "苹果授权用户id")
private String uiAppleUserid;
/** 理财师编号 */
@ApiModelProperty(value = "理财师编号")
private String ifaNo;
/** 真实姓名,禁用于运营维护 */
@ApiModelProperty(value = "真实姓名,禁用于运营维护")
private String realname;
}
package com.tanpu.feo.feojob.entity;
import java.util.Date;
import com.tanpu.feo.feojob.web.entity.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 部门信息表Entity
*
* @author zejia zj wu 2021年05月18日
* @version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Department extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 部门id */
private String departmentId;
/** 部门name */
private String departmentName;
/** 部门类型 */
private String type;
/** 上级部门id,为空表示上级就是机构 */
private String parentDepartId;
/** 机构id */
private String orgId;
/** 部门层级,从1开始,0表示机构 */
private Integer level;
/** 人数 */
private Integer members;
/** id 构造器*/
public Department(String id) {
super.setId(id);
}
}
package com.tanpu.feo.feojob.entity;
import java.util.Date;
import com.tanpu.feo.feojob.web.entity.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 部门员工关系表Entity
*
* @author zejia zj wu 2021年05月18日
* @version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class DepartmentEmployee extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 员工id */
private String employeeId;
/** 部门id */
private String departmentId;
/** 类型, d负责人, s普通职员 */
private String type;
/** 机构id */
private String orgId;
/** id 构造器*/
public DepartmentEmployee(String id) {
super.setId(id);
}
}
package com.tanpu.feo.feojob.entity;
import java.util.Date;
import com.tanpu.feo.feojob.web.entity.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 员工信息表Entity
*
* @author zejia zj wu 2021年05月18日
* @version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Employee extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 员工id */
private String employeeId;
/** 员工姓名 */
private String name;
/** 员工类型 */
private String type;
/** 机构id */
private String orgId;
/** 员工手机号 */
private String phone;
/** 员工邮箱 */
private String mail;
/** 职工层级 */
private Integer level;
/** 员工绑定的微信 */
private String boundWechat;
/** 员工状态 */
private String status;
/** 员工工号 */
private String number;
/** id 构造器*/
public Employee(String id) {
super.setId(id);
}
}
package com.tanpu.feo.feojob.entity;
import com.tanpu.feo.feojob.web.entity.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 员工角色关系表Entity
*
* @author zejia zj wu 2021年05月18日
* @version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class EmployeeRole extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 员工id */
private String employeeId;
/** 角色id */
private String roleId;
/** 描述 */
private String description;
/** 机构id */
private String orgId;
/** id 构造器*/
public EmployeeRole(String id) {
super.setId(id);
}
}
package com.tanpu.feo.feojob.entity;
import java.math.BigDecimal;
import java.util.Date;
import com.tanpu.feo.feojob.web.entity.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* Entity
*
* @author zejia zj wu 2021年05月19日
* @version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class IfaAssets extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 理财师id */
private String ifaId;
/** 持仓总市值 */
private BigDecimal totalMarket;
/** 成交总市值 */
private BigDecimal tradeTotalMarket;
/** 总客户数 */
private Integer customerNumber;
/** 成交客户数 */
private Integer tradeCustomerNumber;
/** 非成交客户数 */
private Integer nonTradeCustomerNumber;
/** 男客户数 */
private Integer maleCustomerNumber;
/** 女客户数 */
private Integer femaleCustomerNumber;
/** 未定义性别客户数 */
private Integer noValuesexCustomerNumber;
/** 持仓盈亏 */
private BigDecimal holdProfit;
/** 持仓盈亏率 */
private BigDecimal holdProfitRatio;
/** 累计收益、累计盈亏 */
private BigDecimal cumProfit;
/** 成交1 总的 2 */
private Integer type;
/** 持仓市值分布 json */
private String marketDistribution;
/** 风险偏好分布 json */
private String riskDistribution;
/** ifa 业绩走势 */
private String assetsTrend;
/** 客户人数走势 */
private String customerTrend;
/** 成交收益 */
private BigDecimal tradeProfit;
/** 成交成本 */
private BigDecimal tradeCost;
/** 成交累积收益 */
private BigDecimal tradeCumProfit;
/** 成交收益率 */
private BigDecimal tradeProfitRatio;
/** id 构造器*/
public IfaAssets(String id) {
super.setId(id);
}
}
package com.tanpu.feo.feojob.entity;
import java.util.Date;
import com.tanpu.feo.feojob.web.entity.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* Entity
*
* @author zejia zj wu 2021年05月18日
* @version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Org extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 机构唯一识别码 */
private String orgCode;
/** 机构名称 */
private String orgName;
/** 自动通过认证 */
private Integer automaticProcessing;
/** 是否购买了精选:0:否 1:是 */
private String isbuySelection;
/** 是否购买了今日聚焦 0:否 1:是 */
private String isbuyTodayfocus;
/** 推送标签 */
private String arPushLabels;
/** 功能码 */
private String funCodes;
/** 个人主页定制 */
private String homepageCustom;
/** 获客内容设置 */
private String contentSet;
/** 名片模板 */
private Integer cardTemplate;
/** 合格投资者认证开关 */
private Integer accreditedInvestorSwitch;
/** 朋友圈助手开关 */
private Integer friendToolsSwitch;
/** 机构主体类别 */
private String tagCategoryId;
/** 阿里云短信签名 */
private String aliyunSignName;
/** 阿里云消息模版ID */
private String aliyunTempcode;
/** 阿里云AccessKeyId */
private String aliyunAccessKeyId;
/** 阿里云AccessKeySecret */
private String aliyunAccessKeySecret;
/** appId标识 */
private String appId;
/** AppKey */
private String appKey;
/** SecretKey */
private String secretKey;
/** 服务到期时间 */
private Date timeValidity;
/** */
private Integer isCheckSubject;
/** */
private Integer appType;
/** */
private String agentId;
/** id 构造器*/
public Org(String id) {
super.setId(id);
}
}
package com.tanpu.feo.feojob.entity;
import java.util.Date;
import com.tanpu.feo.feojob.web.entity.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 机构扩展信息表Entity
*
* @author zejia zj wu 2021年05月18日
* @version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class OrgExt extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 机构id */
private String orgId;
/** 组织架构管理模式, 1从企业微信同步,2自定义 */
private String model;
/** 企业微信认证相关key */
private String jsonWxcpKey;
/** 企业微信同步 数据MD5 */
private String md5WxcpData;
/** id 构造器*/
public OrgExt(String id) {
super.setId(id);
}
}
package com.tanpu.feo.feojob.entity;
import java.util.Date;
import com.tanpu.feo.feojob.web.entity.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 角色信息表Entity
*
* @author zejia zj wu 2021年05月19日
* @version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Role extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 角色id */
private String roleId;
/** 角色描述 */
private String description;
/** 角色类型, m管理员,t团队长,i理财师 */
private String type;
/** id 构造器*/
public Role(String id) {
super.setId(id);
}
}
package com.tanpu.feo.feojob.entity;
import java.io.Serializable;
import java.util.Date;
import com.tanpu.feo.feojob.web.entity.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* Entity
*
* @author zejia zj wu 2021年05月18日
* @version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserInfo implements Serializable {
private static final long serialVersionUID = 1L;
/** ID */
private String id;
/** 微信openId */
private String uiOpenid;
/** unionId */
private String uiUnionid;
/** 手机号 */
private String uiTelphone;
/** 登录密码 */
private String uiPwd;
/** 昵称 */
private String uiNickname;
/** 头像 */
private String uiHeadimg;
/** 姓名 */
private String uiUsername;
/** 性别 0:男 1:女 */
private String uiSex;
/** 生日 */
private Date uiBirthday;
/** 个人介绍 */
private String uiIntroduction;
/** 名片样式 0:小名片 1:大名片 */
private String uiTypeMp;
/** 名片头像 */
private String uiHeadimgMp;
/** 名片姓名 */
private String uiUsernameMp;
/** 名片电话 */
private String uiTelphoneMp;
/** 手机 */
private String uiMobilephoneMp;
/** 名片公司名称 */
private String uiCompanyMp;
/** 名片公司地址 */
private String uiCompanyAddressMp;
/** 名片职位 */
private String uiPositionMp;
/** 行业 */
private String uiIndustryMp;
/** 名片邮箱 */
private String uiEmailMp;
/** 名片个人介绍 */
private String uiIntroductionMp;
/** 微信个人二维码名片 */
private String uiWechatQrcode;
/** 小程序二维码 */
private String uiWechatXcxQrcode;
/** 类型 0:app注册 1:平台添加 */
private String uiType;
/** 用户身份 0:普通用户 1:种子用户 2:超级用户 */
private String uiShenfen;
/** 认证状态 0:未认证 1:已认证 */
private Integer uiRzstatus;
/** 机构Id */
private String orgId;
/** 团队Id */
private String teamId;
/** 加入团队时间 */
private Date joinTime;
/** 员工工号 */
private String staffNo;
/** 合格投资者认证状态 */
private Integer investorCertifiedStatus;
/** 合格投资者认证时间 */
private Date investorCertifiedTime;
/** 对外合作权限 */
private String toPartner;
/** 等级 */
private String uiGrade;
/** 内容审核 */
private Integer contentReview;
/** 所获荣誉 */
private String uiHonor;
/** 海报扫码关注公众号引流人 */
private String uiHbUserid;
/** */
private String staffRegion;
/** */
private String branchName;
/** */
private String subBranchName;
/** */
private String branchNetworkName;
/** */
private String uiGradeName;
/** */
private String uiTargetGradeName;
/** */
private String uiSource;
/** 创建时间 */
private Date createtime;
/** 创建人 */
private String createby;
/** 修改时间 */
private Date updatetime;
/** 修改人 */
private String updateby;
/** 删除标识 */
private String deletetag;
/** 前端角色 */
private String frontRoles;
/** 名片检查 */
private Integer uiCheckStatus;
/** */
private String city;
/** */
private String province;
/** */
private String country;
/** */
private String uiInviter;
/** */
private String uiInviterPhone;
/** */
private Integer uiAge;
/** */
private String uiRegion;
/** */
private String uiWecaht;
/** */
private Date uiInviterTime;
/** 微信unionId */
private String unionid;
/** 0游客,1注册用户,2理财师 */
private Integer level;
/** 年龄 */
private Integer age;
/** 区县 */
private String district;
/** 详细地址 */
private String address;
/** 学历:0: 未知,1:专科,2:本科,3:211本科,4:硕士及以上 */
private Integer education;
/** 微信号 */
private String wechat;
/** 高净值客户数(0:无,1:10人一下,2:10-30人,3:30-50人,4:50以上) */
private Integer highWorthCustomerNum;
/** 高净值客户资产配置:(0:无,1:100万一下,2:100-200万,3:200-400万,4:400-600万,5:600万以上) */
private Integer customerAsset;
/** 自身是否是理财师 */
private Integer financialPlanner;
/** 会员到期时间 */
private Date vipEndTime;
/** */
private Date uiRegisterTime;
/** 权限集 以英文;分割(S1-基础营) */
private String uiAuth;
/** */
private String uiChannel;
/** 审核时间 */
private Date reviewTime;
/** 苹果授权用户id */
private String uiAppleUserid;
/** 理财师编号 */
private String ifaNo;
/** 真实姓名,禁用于运营维护 */
private String realname;
/** id 构造器*/
public UserInfo(String id) {
this.setId(id);
}
}
This diff is collapsed.
package com.tanpu.feo.feojob.jobs.dto;
import lombok.Data;
import java.util.List;
/**
* 处理数据DTO
*/
@Data
public class WorkDataDto<T> {
private List<T> insertList;
private List<T> deleteList;
private List<T> updateList;
}
package com.tanpu.feo.feojob.jobs.dto;
import lombok.Data;
import me.chanjar.weixin.cp.bean.WxCpUser;
import java.io.Serializable;
import java.util.List;
@Data
public class WxCpDepartDto implements Serializable {
private static final long serialVersionUID = -5028321625140879571L;
private Long id;
private String name;
private String enName;
private Long parentId;
private Long order;
private Integer members; // 部门人数
private List<WxCpUser> wxCpUserList;
}
package com.tanpu.feo.feojob.jobs.service;
import com.tanpu.feo.feojob.entity.*;
import com.tanpu.feo.feojob.jobs.dto.WorkDataDto;
import com.tanpu.feo.feojob.mapper.*;
import com.tanpu.feo.feojob.service.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@Service
@Slf4j
public class OrgSyncByWxcpService {
@Resource
private UserInfoMapper userInfoMapper;
@Resource
private DepartmentMapper departmentMapper;
@Resource
private DepartmentEmployeeMapper departmentEmployeeMapper;
@Resource
private EmployeeMapper employeeMapper;
@Resource
private EmployeeRoleMapper employeeRoleMapper;
@Transactional
public List<IfaAssets> execute(WorkDataDto<UserInfo> workUserInfo, WorkDataDto<Employee> workEmployee, WorkDataDto<Department> workDepartment,
WorkDataDto<DepartmentEmployee> workDepartmentEmployee, WorkDataDto<EmployeeRole> workEmployeeRole) {
ArrayList<IfaAssets> assetsArrayList = new ArrayList<>();
Date now = new Date();
// 1
List<UserInfo> workUserInfoInsertList = workUserInfo.getInsertList();
for (UserInfo userInfo : workUserInfoInsertList) {
userInfo.setCreateby("SYS");
userInfo.setCreatetime(now);
userInfo.setUpdateby("SYS");
userInfo.setUpdatetime(now);
userInfo.setDeletetag("0");
userInfoMapper.insert(userInfo);
}
List<UserInfo> workUserInfoUpdateList = workUserInfo.getUpdateList();
for (UserInfo userInfo : workUserInfoUpdateList) {
userInfo.setUpdateby("SYS");
userInfo.setUpdatetime(now);
userInfo.setDeletetag("0");
userInfoMapper.updateById(userInfo);
}
List<UserInfo> workUserInfoDeleteList = workUserInfo.getDeleteList();
for (UserInfo userInfo : workUserInfoUpdateList) {
userInfo.setUpdateby("SYS");
userInfo.setUpdatetime(now);
userInfo.setDeletetag("1");
userInfoMapper.updateById(userInfo);
}
//2
List<Employee> workEmployeeInsertList = workEmployee.getInsertList();
for (Employee employee : workEmployeeInsertList) {
employee.setCreateBy("SYS");
employee.setCreateTime(now);
employee.setUpdateBy("SYS");
employee.setUpdateTime(now);
employee.setDeleteTag("0");
employeeMapper.insert(employee);
IfaAssets ifaAssets = new IfaAssets();
ifaAssets.setIfaId(employee.getEmployeeId());
ifaAssets.setId(employee.getEmployeeId());
ifaAssets.setCreateTime(now);
ifaAssets.setCreateBy("SYS");
ifaAssets.setUpdateTime(now);
ifaAssets.setUpdateBy("SYS");
ifaAssets.setDeleteTag("0");
assetsArrayList.add(ifaAssets);
// ifaAssetsService.insertIfaAssets(ifaAssets);
}
List<Employee> workEmployeeDeleteList = workEmployee.getDeleteList();
for (Employee employee : workEmployeeDeleteList) {
employee.setUpdateBy("SYS");
employee.setUpdateTime(now);
employee.setDeleteTag("1");
employeeMapper.deleteById(employee);
}
List<Employee> workEmployeeUpdateList = workEmployee.getUpdateList();
for (Employee employee : workEmployeeUpdateList) {
employee.setUpdateBy("SYS");
employee.setUpdateTime(now);
employee.setDeleteTag("0");
employeeMapper.deleteById(employee);
}
//3
List<Department> workDepartmentInsertList = workDepartment.getInsertList();
for (Department department : workDepartmentInsertList) {
department.setCreateBy("SYS");
department.setCreateTime(now);
department.setUpdateBy("SYS");
department.setUpdateTime(now);
department.setDeleteTag("0");
departmentMapper.insert(department);
}
List<Department> workDepartmentDeleteList = workDepartment.getDeleteList();
for (Department department : workDepartmentDeleteList) {
department.setUpdateBy("SYS");
department.setUpdateTime(now);
department.setDeleteTag("1");
departmentMapper.deleteById(department);
}
List<Department> workDepartmentUpdateList = workDepartment.getUpdateList();
for (Department department : workDepartmentUpdateList) {
department.setUpdateBy("SYS");
department.setUpdateTime(now);
department.setDeleteTag("0");
departmentMapper.deleteById(department);
}
//4
List<DepartmentEmployee> workDepartmentEmployeeInsertList = workDepartmentEmployee.getInsertList();
for (DepartmentEmployee departmentEmployee : workDepartmentEmployeeInsertList) {
departmentEmployee.setCreateBy("SYS");
departmentEmployee.setCreateTime(now);
departmentEmployee.setUpdateBy("SYS");
departmentEmployee.setUpdateTime(now);
departmentEmployee.setDeleteTag("0");
departmentEmployeeMapper.insert(departmentEmployee);
}
List<DepartmentEmployee> workDepartmentEmployeeDeleteList = workDepartmentEmployee.getDeleteList();
for (DepartmentEmployee departmentEmployee : workDepartmentEmployeeDeleteList) {
departmentEmployee.setUpdateBy("SYS");
departmentEmployee.setUpdateTime(now);
departmentEmployee.setDeleteTag("1");
departmentEmployeeMapper.deleteById(departmentEmployee);
}
List<DepartmentEmployee> workDepartmentEmployeeUpdateList = workDepartmentEmployee.getUpdateList();
for (DepartmentEmployee departmentEmployee : workDepartmentEmployeeUpdateList) {
departmentEmployee.setUpdateBy("SYS");
departmentEmployee.setUpdateTime(now);
departmentEmployee.setDeleteTag("0");
departmentEmployeeMapper.deleteById(departmentEmployee);
}
//5
List<EmployeeRole> workEmployeeRoleInsertList = workEmployeeRole.getInsertList();
for (EmployeeRole employeeRole : workEmployeeRoleInsertList) {
employeeRole.setCreateBy("SYS");
employeeRole.setCreateTime(now);
employeeRole.setUpdateBy("SYS");
employeeRole.setUpdateTime(now);
employeeRole.setDeleteTag("0");
employeeRoleMapper.insert(employeeRole);
}
List<EmployeeRole> workEmployeeRoleDeleteList = workEmployeeRole.getDeleteList();
for (EmployeeRole employeeRole : workEmployeeRoleDeleteList) {
employeeRole.setUpdateBy("SYS");
employeeRole.setUpdateTime(now);
employeeRole.setDeleteTag("1");
employeeRoleMapper.deleteById(employeeRole);
}
List<EmployeeRole> workEmployeeRoleUpdateList = workEmployeeRole.getUpdateList();
for (EmployeeRole employeeRole : workEmployeeRoleUpdateList) {
employeeRole.setUpdateBy("SYS");
employeeRole.setUpdateTime(now);
employeeRole.setDeleteTag("0");
employeeRoleMapper.deleteById(employeeRole);
}
return assetsArrayList;
}
}
package com.tanpu.feo.feojob.dao;
package com.tanpu.feo.feojob.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tanpu.feo.feojob.entity.DemoEntity;
......
package com.tanpu.feo.feojob.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
//import com.caixiaoquan.faTools.feojob.entity.DepartmentEmployee;
import com.tanpu.feo.feojob.entity.DepartmentEmployee;
import org.springframework.stereotype.Repository;
/**
* 部门员工关系表Mapper
*
* @author zejia zj wu 2021年05月18日
* @version 1.0
*/
@Repository
public interface DepartmentEmployeeMapper extends BaseMapper<DepartmentEmployee> {
/*************************************************************
* Add code here if method of BaseService did not satify you
*************************************************************/
}
package com.tanpu.feo.feojob.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tanpu.feo.feojob.entity.Department;
import org.springframework.stereotype.Repository;
/**
* 部门信息表Mapper
*
* @author zejia zj wu 2021年05月18日
* @version 1.0
*/
@Repository
public interface DepartmentMapper extends BaseMapper<Department> {
/*************************************************************
* Add code here if method of BaseService did not satify you
*************************************************************/
}
package com.tanpu.feo.feojob.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tanpu.feo.feojob.entity.Employee;
import org.springframework.stereotype.Repository;
/**
* 员工信息表Mapper
*
* @author zejia zj wu 2021年05月18日
* @version 1.0
*/
@Repository
public interface EmployeeMapper extends BaseMapper<Employee> {
/*************************************************************
* Add code here if method of BaseService did not satify you
*************************************************************/
}
package com.tanpu.feo.feojob.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tanpu.feo.feojob.entity.EmployeeRole;
import org.springframework.stereotype.Repository;
/**
* 员工角色关系表Mapper
*
* @author zejia zj wu 2021年05月18日
* @version 1.0
*/
@Repository
public interface EmployeeRoleMapper extends BaseMapper<EmployeeRole> {
/*************************************************************
* Add code here if method of BaseService did not satify you
*************************************************************/
}
package com.tanpu.feo.feojob.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tanpu.feo.feojob.entity.IfaAssets;
import org.springframework.stereotype.Repository;
/**
* Mapper
*
* @author zejia zj wu 2021年05月19日
* @version 1.0
*/
@Repository
public interface IfaAssetsMapper extends BaseMapper<IfaAssets> {
/*************************************************************
* Add code here if method of BaseService did not satify you
*************************************************************/
}
package com.tanpu.feo.feojob.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tanpu.feo.feojob.entity.OrgExt;
import org.springframework.stereotype.Repository;
/**
* 机构扩展信息表Mapper
*
* @author zejia zj wu 2021年05月18日
* @version 1.0
*/
@Repository
public interface OrgExtMapper extends BaseMapper<OrgExt> {
/*************************************************************
* Add code here if method of BaseService did not satify you
*************************************************************/
}
package com.tanpu.feo.feojob.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tanpu.feo.feojob.entity.Org;
import org.springframework.stereotype.Repository;
/**
* Mapper
*
* @author zejia zj wu 2021年05月18日
* @version 1.0
*/
@Repository
public interface OrgMapper extends BaseMapper<Org> {
/*************************************************************
* Add code here if method of BaseService did not satify you
*************************************************************/
}
package com.tanpu.feo.feojob.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tanpu.feo.feojob.entity.Role;
import org.springframework.stereotype.Repository;
/**
* 角色信息表Mapper
*
* @author zejia zj wu 2021年05月19日
* @version 1.0
*/
@Repository
public interface RoleMapper extends BaseMapper<Role> {
/*************************************************************
* Add code here if method of BaseService did not satify you
*************************************************************/
}
package com.tanpu.feo.feojob.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tanpu.feo.feojob.entity.UserInfo;
import org.springframework.stereotype.Repository;
/**
* Mapper
*
* @author zejia zj wu 2021年05月18日
* @version 1.0
*/
@Repository
public interface UserInfoMapper extends BaseMapper<UserInfo> {
/*************************************************************
* Add code here if method of BaseService did not satify you
*************************************************************/
}
package com.tanpu.feo.feojob.service;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.tanpu.feo.feojob.dao.DemoMapper;
import com.tanpu.feo.feojob.mapper.DemoMapper;
import com.tanpu.feo.feojob.entity.DemoEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......
package com.tanpu.feo.feojob.service;
import com.tanpu.feo.feojob.dto.DepartmentEmployeeDTO;
import com.tanpu.feo.feojob.entity.DepartmentEmployee;
import java.util.List;
/**
* 部门员工关系表Service
*
* @author zejia zj wu 2021年05月18日
* @version 1.0
**/
public interface DepartmentEmployeeService {
DepartmentEmployeeDTO selectById(String id);
List<DepartmentEmployeeDTO> selectListByObject(DepartmentEmployeeDTO departmentEmployeeDTO);
List<DepartmentEmployee> findInfoByOrgId(String orgId);
}
package com.tanpu.feo.feojob.service;
import com.tanpu.feo.feojob.entity.Department;
import com.tanpu.feo.feojob.dto.DepartmentDTO;
import java.util.List;
/**
* 部门信息表Service
*
* @author zejia zj wu 2021年05月18日
* @version 1.0
**/
public interface DepartmentService {
List<Department> findDepartmentByOrgId(String orgId);
}
package com.tanpu.feo.feojob.service;
import com.tanpu.feo.feojob.entity.EmployeeRole;
import java.util.List;
/**
* 员工角色关系表Service
*
* @author zejia zj wu 2021年05月18日
* @version 1.0
**/
public interface EmployeeRoleService {
List<EmployeeRole> findInfoByOrgId(String orgId);
List<String> findInfoByOrgIdAndAdmin(String orgId,String m);
}
package com.tanpu.feo.feojob.service;
import com.tanpu.feo.feojob.entity.Employee;
import com.tanpu.feo.feojob.dto.EmployeeDTO;
import java.util.List;
/**
* 员工信息表Service
*
* @author zejia zj wu 2021年05月18日
* @version 1.0
**/
public interface EmployeeService {
List<Employee> getEmployeeSListByOrgId(String orgId);
}
package com.tanpu.feo.feojob.service;
import com.tanpu.feo.feojob.entity.IfaAssets;
/**
* Service
*
* @author zejia zj wu 2021年05月19日
* @version 1.0
**/
public interface IfaAssetsService {
IfaAssets findById(String s);
void insertIfaAssets(IfaAssets ifaAssets);
}
package com.tanpu.feo.feojob.service;
import com.tanpu.feo.feojob.entity.OrgExt;
import java.util.List;
/**
* 机构扩展信息表Service
*
* @author zejia zj wu 2021年05月18日
* @version 1.0
**/
public interface OrgExtService {
/**
* @Description: 查找需要 进行 同步的机构
* @Param:
* @return:
* @Author: zejia zj wu
* @Date: 2021/5/18
*/
List<OrgExt> findOrgExtByAyto();
/**
* @Description: 根据ID 修改数据
* @Param:
* @return:
* @Author: zejia zj wu
* @Date: 2021/5/19
*/
void updataById(OrgExt orgExt);
}
package com.tanpu.feo.feojob.service;
import com.tanpu.feo.feojob.entity.Org;
/**
* Service
*
* @author zejia zj wu 2021年05月18日
* @version 1.0
**/
public interface OrgService {
/**
* @Description: 根据orgId 查找单条org
* @Param:
* @return:
* @Author: zejia zj wu
* @Date: 2021/5/18
*/
Org findById(String orgId);
}
package com.tanpu.feo.feojob.service;
import java.util.Map;
/**
* 角色信息表Service
*
* @author zejia zj wu 2021年05月19日
* @version 1.0
**/
public interface RoleService {
Map<String, String> findInfoNoAdmin();
}
package com.tanpu.feo.feojob.service;
import com.tanpu.feo.feojob.entity.UserInfo;
import com.tanpu.feo.feojob.dto.UserInfoDTO;
import java.util.List;
/**
* Service
*
* @author zejia zj wu 2021年05月18日
* @version 1.0
**/
public interface UserInfoService {
/**
* @Description: 根据 公司ID 获取用户信息
* @Param:
* @return:
* @Author: zejia zj wu
* @Date: 2021/5/18
*/
List<UserInfo> getUserInfoListByOrgId(String orgId);
}
package com.tanpu.feo.feojob.service.impl;
import java.util.ArrayList;
import java.util.List;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.tanpu.feo.feojob.dto.DepartmentEmployeeDTO;
import com.tanpu.feo.feojob.entity.Department;
import com.tanpu.feo.feojob.entity.DepartmentEmployee;
import com.tanpu.feo.feojob.mapper.DepartmentEmployeeMapper;
import com.tanpu.feo.feojob.service.DepartmentEmployeeService;
import com.tanpu.feo.feojob.web.entity.BaseEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import lombok.extern.slf4j.Slf4j;
import cn.hutool.core.bean.BeanUtil;
/**
* 部门员工关系表ServiceImp
*
* @author zejia zj wu 2021年05月18日
* @version 1.0
*/
@Service("departmentEmployeeService")
@Slf4j
public class DepartmentEmployeeServiceImpl implements DepartmentEmployeeService {
@Autowired
private DepartmentEmployeeMapper departmentEmployeeMapper;
@Override
public DepartmentEmployeeDTO selectById(String id) {
DepartmentEmployee departmentEmployee = departmentEmployeeMapper.selectById(id);
return BeanUtil.toBean(departmentEmployee, DepartmentEmployeeDTO.class);
}
@Override
public List<DepartmentEmployeeDTO> selectListByObject(DepartmentEmployeeDTO departmentEmployeeDTO) {
DepartmentEmployee departmentEmployee = BeanUtil.toBean(departmentEmployeeDTO, DepartmentEmployee.class);
QueryWrapper queryWrapper = new QueryWrapper<>(departmentEmployee);
List<DepartmentEmployee> departmentEmployeeList = departmentEmployeeMapper.selectList(queryWrapper);
List<DepartmentEmployeeDTO> departmentEmployeeDtoList = new ArrayList<>();
departmentEmployeeList.forEach(departmentEmployeeEntity -> {
departmentEmployeeDtoList.add(BeanUtil.toBean(departmentEmployeeEntity, DepartmentEmployeeDTO.class));
});
return departmentEmployeeDtoList;
}
@Override
public List<DepartmentEmployee> findInfoByOrgId(String orgId) {
QueryWrapper<DepartmentEmployee> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("org_id",orgId)
.eq("delete_tag","0");
List<DepartmentEmployee> departmentEmployeeList = departmentEmployeeMapper.selectList(queryWrapper);
return departmentEmployeeList;
}
}
package com.tanpu.feo.feojob.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.tanpu.feo.feojob.entity.Department;
import com.tanpu.feo.feojob.mapper.DepartmentMapper;
import com.tanpu.feo.feojob.service.DepartmentService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 部门信息表ServiceImp
*
* @author zejia zj wu 2021年05月18日
* @version 1.0
*/
@Service("departmentService")
@Slf4j
public class DepartmentServiceImpl implements DepartmentService {
@Autowired
private DepartmentMapper departmentMapper;
@Override
public List<Department> findDepartmentByOrgId(String orgId) {
QueryWrapper<Department> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("org_id",orgId)
.eq("delete_tag","0");
List<Department> departmentList = departmentMapper.selectList(queryWrapper);
return departmentList;
}
}
package com.tanpu.feo.feojob.service.impl;
import java.util.ArrayList;
import java.util.List;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.tanpu.feo.feojob.entity.EmployeeRole;
import com.tanpu.feo.feojob.mapper.EmployeeRoleMapper;
import com.tanpu.feo.feojob.service.EmployeeRoleService;
import lombok.extern.slf4j.Slf4j;
/**
* 员工角色关系表ServiceImp
*
* @author zejia zj wu 2021年05月18日
* @version 1.0
*/
@Service("employeeRoleService")
@Slf4j
public class EmployeeRoleServiceImpl implements EmployeeRoleService {
@Autowired
private EmployeeRoleMapper employeeRoleMapper;
@Override
public List<EmployeeRole> findInfoByOrgId(String orgId) {
QueryWrapper<EmployeeRole> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("org_id",orgId)
.eq("delete_tag","0");
List<EmployeeRole> employeeRoleList = employeeRoleMapper.selectList(queryWrapper);
return employeeRoleList;
}
@Override
public List<String> findInfoByOrgIdAndAdmin(String orgId, String m) {
QueryWrapper<EmployeeRole> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("org_id",orgId)
.eq("delete_tag","0")
.eq("role_id", m);
List<EmployeeRole> employeeRoleList = employeeRoleMapper.selectList(queryWrapper);
ArrayList<String> list = new ArrayList<>();
for (EmployeeRole employeeRole : employeeRoleList) {
list.add(employeeRole.getEmployeeId());
}
return list;
}
}
package com.tanpu.feo.feojob.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.tanpu.feo.feojob.entity.Employee;
import com.tanpu.feo.feojob.mapper.EmployeeMapper;
import com.tanpu.feo.feojob.service.EmployeeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 员工信息表ServiceImp
*
* @author zejia zj wu 2021年05月18日
* @version 1.0
*/
@Service("employeeService")
@Slf4j
public class EmployeeServiceImpl implements EmployeeService {
@Autowired
private EmployeeMapper employeeMapper;
@Override
public List<Employee> getEmployeeSListByOrgId(String orgId) {
QueryWrapper<Employee> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("org_id", orgId)
.eq("delete_tag", "0");
List<Employee> userInfoList = employeeMapper.selectList(queryWrapper);
return userInfoList;
}
}
package com.tanpu.feo.feojob.service.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.tanpu.feo.feojob.entity.IfaAssets;
import com.tanpu.feo.feojob.mapper.IfaAssetsMapper;
import com.tanpu.feo.feojob.service.IfaAssetsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* ServiceImp
*
* @author zejia zj wu 2021年05月19日
* @version 1.0
*/
@Service("ifaAssetsService")
@Slf4j
@DS("feo_diagnose")
public class IfaAssetsServiceImpl implements IfaAssetsService {
@Autowired
private IfaAssetsMapper ifaAssetsMapper;
@Override
public IfaAssets findById(String s) {
return ifaAssetsMapper.selectById(s);
}
@Override
@DS("feo_diagnose")
public void insertIfaAssets(IfaAssets ifaAssets) {
ifaAssetsMapper.insert(ifaAssets);
}
}
package com.tanpu.feo.feojob.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.tanpu.feo.feojob.entity.OrgExt;
import com.tanpu.feo.feojob.mapper.OrgExtMapper;
import com.tanpu.feo.feojob.service.OrgExtService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
import java.util.List;
/**
* 机构扩展信息表ServiceImp
*
* @author zejia zj wu 2021年05月18日
* @version 1.0
*/
@Service("orgExtService")
@Slf4j
public class OrgExtServiceImpl implements OrgExtService {
@Autowired
private OrgExtMapper orgExtMapper;
@Override
public List<OrgExt> findOrgExtByAyto() {
QueryWrapper<OrgExt> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("model","1")
.eq("delete_tag","0");
List<OrgExt> orgExtList = orgExtMapper.selectList(queryWrapper);
return orgExtList;
}
@Override
@Transactional
public void updataById(OrgExt orgExt) {
orgExt.setUpdateBy("SYS");
orgExt.setUpdateTime(new Date());
orgExtMapper.updateById(orgExt);
}
}
package com.tanpu.feo.feojob.service.impl;
import com.tanpu.feo.feojob.entity.Org;
import com.tanpu.feo.feojob.mapper.OrgMapper;
import com.tanpu.feo.feojob.service.OrgService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* ServiceImp
*
* @author zejia zj wu 2021年05月18日
* @version 1.0
*/
@Service("orgService")
@Slf4j
public class OrgServiceImpl implements OrgService {
@Autowired
private OrgMapper orgMapper;
@Override
public Org findById(String orgId) {
Org org = orgMapper.selectById(orgId);
return org;
}
}
package com.tanpu.feo.feojob.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.tanpu.feo.feojob.entity.Role;
import com.tanpu.feo.feojob.mapper.RoleMapper;
import com.tanpu.feo.feojob.service.RoleService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 角色信息表ServiceImp
*
* @author zejia zj wu 2021年05月19日
* @version 1.0
*/
@Service("roleService")
@Slf4j
public class RoleServiceImpl implements RoleService {
@Autowired
private RoleMapper roleMapper;
@Override
public Map<String, String> findInfoNoAdmin() {
QueryWrapper<Role> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("delete_tag", "0");
List<Role> roles = roleMapper.selectList(queryWrapper);
HashMap<String, String> map = new HashMap<>();
for (Role role : roles) {
map.put(role.getType(), role.getRoleId());
}
return map;
}
}
package com.tanpu.feo.feojob.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.tanpu.feo.feojob.entity.UserInfo;
import com.tanpu.feo.feojob.mapper.UserInfoMapper;
import com.tanpu.feo.feojob.service.UserInfoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* ServiceImp
*
* @author zejia zj wu 2021年05月18日
* @version 1.0
*/
@Service("userInfoService")
@Slf4j
public class UserInfoServiceImpl implements UserInfoService {
@Autowired
private UserInfoMapper userInfoMapper;
@Override
public List<UserInfo> getUserInfoListByOrgId(String orgId) {
QueryWrapper<UserInfo> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("org_id", orgId)
.eq("deletetag", "0");
List<UserInfo> userInfoList = userInfoMapper.selectList(queryWrapper);
return userInfoList;
}
}
package com.tanpu.feo.feojob.web.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
/**
* @Description - 提取了表设计规范中的基础属性的DTO基类,所有DTO都必须继承此类
*
* @author zejia zj wu 20210518
* @version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class BaseDTO implements Serializable {
private static final long serialVersionUID = 3600175640283504815L;
/** 主键 */
@ApiModelProperty(value = "主键" ,hidden = true)
private String id;
/** 创建人 */
@ApiModelProperty(value = "创建人",hidden = true)
private String createBy;
/** 创建时间 */
@ApiModelProperty(value = "创建时间",hidden = true)
private Date createTime;
/** 修改人 */
@ApiModelProperty(value = "修改人",hidden = true)
private String updateBy;
/** 修改时间 */
@ApiModelProperty(value = "修改时间",hidden = true)
private Date updateTime;
// /** 是否生效 1:生效,0:失效 */
// @ApiModelProperty(value = "是否生效 1:生效,0:失效",hidden = true)
// private String isValid;
/** 是否删除 1:删除,0:未删除 */
@ApiModelProperty(value = "是否删除 1:删除,0:未删除",hidden = true)
private String deleteTag;
/** 查询模式:默认:精确匹配;like:左右模糊;leftLike:%左模糊;rightLike :右模糊%*/
@ApiModelProperty(value = "查询模式:like:左右模糊;leftLike:%左模糊;rightLike :右模糊%",hidden = true)
private String searchType;
}
package com.tanpu.feo.feojob.web.dto;
import com.github.pagehelper.Page;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
import java.util.Map;
/**
*
* @author zejia zj wu 20210518
* @param <T>
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PageHelperDTO<T> extends BaseDTO {
/**
*
*/
private static final long serialVersionUID = 1L;
/**页数(前端请求传入)*/
@ApiModelProperty(value = "页数(前端请求传入)")
private Integer pageNum;
/**每页数量(前端请求传入)*/
@ApiModelProperty(value = "每页数量(前端请求传入)")
private Integer pageSize;
/**扩展说明*/
@ApiModelProperty(value = "扩展说明",hidden = true)
private Map<String, Object> extdJson;
/**总记录数(后端响应传出)*/
@ApiModelProperty(value = "总记录数(后端响应传出)",hidden = true)
private Long totalAmount;
/**查询列表(后端响应传出)*/
@ApiModelProperty(value = "查询列表(后端响应传出)",hidden = true)
private List<T> resultList;
public PageHelperDTO(Page<T> page, List<T> resultList){
this.totalAmount = page.getTotal();
this.resultList = resultList;
}
}
package com.tanpu.feo.feojob.web.entity;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* @Description - 提取了表设计规范中的基础属性的Entity基类,所有entity都必须继承此类
* @author wht 2018-07-08
* @version 1.0
**/
@Data
public class BaseEntity implements Serializable {
private static final long serialVersionUID = -6097968643931862242L;
/** ID */
private String id;
/** 是否删除 */
private String deleteTag;
/** 是否生效 */
// private String isValid;
/** 修改人 */
private String updateBy;
/** 修改时间 */
private Date updateTime;
/** 创建时间 */
private Date createTime;
/** 创建人 */
private String createBy;
/** 查询模式:默认:精确匹配;like:左右模糊;leftLike:%左模糊;rightLike :右模糊%*/
// private String searchType;
}
server:
port: 8091
servlet:
context-path: /feo-jobs
spring:
datasource:
dynamic:
# primary: master #设置默认的数据源或者数据源组,默认值即为master
strict: false #严格匹配数据源,默认false. true未匹配到指定数据源时抛异常,false使用默认数据源
datasource:
master:
url: jdbc:mysql://rm-uf6r22t3d798q4kmkao.mysql.rds.aliyuncs.com:3306/tamp_feo_user?useUnicode=true&characterEncoding=utf-8&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull
username: tamp_admin
password: '@imeng123'
driver-class-name: com.mysql.cj.jdbc.Driver
feo_diagnose:
url: jdbc:mysql://rm-uf6r22t3d798q4kmkao.mysql.rds.aliyuncs.com:3306/tamp_feo_diagnose_app?useUnicode=true&characterEncoding=utf-8&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull
username: tamp_admin
password: '@imeng123'
driver-class-name: com.mysql.cj.jdbc.Driver
hikari: # HikariCP 自定义配置,对应 HikariConfig 配置属性类
minimum-idle: 10 # 池中维护的最小空闲连接数,默认为 10 个。
maximum-pool-size: 10 # 池中最大连接数,包括闲置和使用中的连接,默认为 10 个
connection-timeout: 20000 # 客户端等待连接池连接的最大毫秒数
idle-timeout: 300000 # 允许连接在连接池中空闲的最长时间(以毫秒为单位
max-lifetime: 1200000 #池中连接关闭后的最长生命周期(以毫秒为单位)
jackson:
time-zone: GMT+8
date-format: yyyy-MM-dd HH:mm:ss
resources:
static-locations: classpath:/static/,classpath:/views/
application:
name: feo-jobs
# url: jdbc:mysql://rm-uf6r22t3d798q4kmkao.mysql.rds.aliyuncs.com:3306/tamp_feo_diagnose_app?useUnicode=true&characterEncoding=utf-8&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull
# username: tamp_admin
# password: '@imeng123'
DELETE
FROM demo;
INSERT INTO demo (name, age)
VALUES ('Jone', 18),
('Jack', 21),
('Jack', 20),
('Jack', 19),
('Ted', 30),
('Billie', 18);
-- noinspection SqlNoDataSourceInspectionForFile
DROP TABLE IF EXISTS demo;
CREATE TABLE demo
(
id BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
name VARCHAR(30) NOT NULL DEFAULT '' COMMENT '姓名',
age INTEGER(11) NOT NULL DEFAULT 0 COMMENT '年龄',
PRIMARY KEY (id)
);
<?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">
<!--注册操作对应Entity的Mapper类-->
<mapper namespace="com.caixiaoquan.faTools.feojob.mapper.DepartmentEmployeeMapper">
<!-- Entity类的ResultMap -->
<resultMap type="com.tanpu.feo.feojob.entity.DepartmentEmployee" id="departmentEmployeeResultMap">
<result property="id" column="id"/>
<result property="employeeId" column="employee_id"/>
<result property="departmentId" column="department_id"/>
<result property="type" column="type"/>
<result property="orgId" column="org_id"/>
<result property="deleteTag" column="delete_tag"/>
<result property="createTime" column="create_time"/>
<result property="updateTime" column="update_time"/>
<result property="updateBy" column="update_by"/>
<result property="createBy" column="create_by"/>
</resultMap>
<!--高频sql子语句,全部列的sql段-->
<sql id="departmentEmployeeColSql">
id,
employee_id,
department_id,
type,
org_id,
delete_tag,
create_time,
update_time,
update_by,
create_by
</sql>
<!--Add your code here-->
</mapper>
\ No newline at end of file
<?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">
<!--注册操作对应Entity的Mapper类-->
<mapper namespace="com.tanpu.feo.feojob.mapper.DepartmentMapper">
<!-- Entity类的ResultMap -->
<resultMap type="com.tanpu.feo.feojob.entity.Department" id="departmentResultMap">
<result property="id" column="id"/>
<result property="departmentId" column="department_id"/>
<result property="departmentName" column="department_name"/>
<result property="type" column="type"/>
<result property="parentDepartId" column="parent_depart_id"/>
<result property="orgId" column="org_id"/>
<result property="deleteTag" column="delete_tag"/>
<result property="level" column="level"/>
<result property="createTime" column="create_time"/>
<result property="updateTime" column="update_time"/>
<result property="updateBy" column="update_by"/>
<result property="createBy" column="create_by"/>
<result property="members" column="members"/>
</resultMap>
<!--高频sql子语句,全部列的sql段-->
<sql id="departmentColSql">
id,
department_id,
department_name,
type,
parent_depart_id,
org_id,
delete_tag,
level,
create_time,
update_time,
update_by,
create_by,
members
</sql>
<!--Add your code here-->
</mapper>
\ No newline at end of file
<?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">
<!--注册操作对应Entity的Mapper类-->
<mapper namespace="com.tanpu.feo.feojob.mapper.EmployeeMapper">
<!-- Entity类的ResultMap -->
<resultMap type="com.tanpu.feo.feojob.entity.Employee" id="employeeResultMap">
<result property="id" column="id"/>
<result property="employeeId" column="employee_id"/>
<result property="name" column="name"/>
<result property="type" column="type"/>
<result property="orgId" column="org_id"/>
<result property="phone" column="phone"/>
<result property="mail" column="mail"/>
<result property="level" column="level"/>
<result property="boundWechat" column="bound_wechat"/>
<result property="status" column="status"/>
<result property="deleteTag" column="delete_tag"/>
<result property="createTime" column="create_time"/>
<result property="updateTime" column="update_time"/>
<result property="updateBy" column="update_by"/>
<result property="createBy" column="create_by"/>
<result property="number" column="number"/>
</resultMap>
<!--高频sql子语句,全部列的sql段-->
<sql id="employeeColSql">
id,
employee_id,
name,
type,
org_id,
phone,
mail,
level,
bound_wechat,
status,
delete_tag,
create_time,
update_time,
update_by,
create_by,
number
</sql>
<!--Add your code here-->
</mapper>
\ No newline at end of file
<?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">
<!--注册操作对应Entity的Mapper类-->
<mapper namespace="com.tanpu.feo.feojob.mapper.EmployeeRoleMapper">
<!-- Entity类的ResultMap -->
<resultMap type="com.tanpu.feo.feojob.entity.EmployeeRole" id="employeeRoleResultMap">
<result property="id" column="id"/>
<result property="employeeId" column="employee_id"/>
<result property="roleId" column="role_id"/>
<result property="description" column="description"/>
<result property="orgId" column="org_id"/>
<result property="deleteTag" column="delete_tag"/>
<result property="createTime" column="create_time"/>
<result property="updateTime" column="update_time"/>
<result property="updateBy" column="update_by"/>
<result property="createBy" column="create_by"/>
</resultMap>
<!--高频sql子语句,全部列的sql段-->
<sql id="employeeRoleColSql">
id,
employee_id,
role_id,
description,
org_id,
delete_tag,
create_time,
update_time,
update_by,
create_by
</sql>
<!--Add your code here-->
</mapper>
\ No newline at end of file
<?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">
<!--注册操作对应Entity的Mapper类-->
<mapper namespace="com.tanpu.feo.feojob.mapper.IfaAssetsMapper">
<!-- Entity类的ResultMap -->
<resultMap type="com.tanpu.feo.feojob.entity.IfaAssets" id="ifaAssetsResultMap">
<result property="id" column="id"/>
<result property="ifaId" column="ifa_id"/>
<result property="totalMarket" column="total_market"/>
<result property="tradeTotalMarket" column="trade_total_market"/>
<result property="customerNumber" column="customer_number"/>
<result property="tradeCustomerNumber" column="trade_customer_number"/>
<result property="nonTradeCustomerNumber" column="non_trade_customer_number"/>
<result property="maleCustomerNumber" column="male_customer_number"/>
<result property="femaleCustomerNumber" column="female_customer_number"/>
<result property="noValuesexCustomerNumber" column="no_valueSex_customer_number"/>
<result property="holdProfit" column="hold_profit"/>
<result property="holdProfitRatio" column="hold_profit_ratio"/>
<result property="cumProfit" column="cum_profit"/>
<result property="type" column="type"/>
<result property="marketDistribution" column="market_distribution"/>
<result property="riskDistribution" column="risk_distribution"/>
<result property="assetsTrend" column="assets_trend"/>
<result property="customerTrend" column="customer_trend"/>
<result property="createTime" column="create_time"/>
<result property="updateTime" column="update_time"/>
<result property="deleteTag" column="delete_tag"/>
<result property="tradeProfit" column="trade_profit"/>
<result property="tradeCost" column="trade_cost"/>
<result property="tradeCumProfit" column="trade_cum_profit"/>
<result property="tradeProfitRatio" column="trade_profit_ratio"/>
</resultMap>
<!--高频sql子语句,全部列的sql段-->
<sql id="ifaAssetsColSql">
id,
ifa_id,
total_market,
trade_total_market,
customer_number,
trade_customer_number,
non_trade_customer_number,
male_customer_number,
female_customer_number,
no_valueSex_customer_number,
hold_profit,
hold_profit_ratio,
cum_profit,
type,
market_distribution,
risk_distribution,
assets_trend,
customer_trend,
create_time,
update_time,
delete_tag,
trade_profit,
trade_cost,
trade_cum_profit,
trade_profit_ratio
</sql>
<!--Add your code here-->
</mapper>
\ No newline at end of file
<?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">
<!--注册操作对应Entity的Mapper类-->
<mapper namespace="com.tanpu.feo.feojob.mapper.OrgExtMapper">
<!-- Entity类的ResultMap -->
<resultMap type="com.tanpu.feo.feojob.entity.OrgExt" id="orgExtResultMap">
<result property="id" column="id"/>
<result property="orgId" column="org_id"/>
<result property="deleteTag" column="delete_tag"/>
<result property="model" column="model"/>
<result property="jsonWxcpKey" column="json_wxcp_key"/>
<result property="md5WxcpData" column="md5_wxcp_data"/>
<result property="createTime" column="create_time"/>
<result property="updateTime" column="update_time"/>
<result property="updateBy" column="update_by"/>
<result property="createBy" column="create_by"/>
</resultMap>
<!--高频sql子语句,全部列的sql段-->
<sql id="orgExtColSql">
id,
org_id,
delete_tag,
model,
json_wxcp_key,
md5_wxcp_data,
create_time,
update_time,
update_by,
create_by
</sql>
<!--Add your code here-->
</mapper>
\ No newline at end of file
<?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">
<!--注册操作对应Entity的Mapper类-->
<mapper namespace="com.tanpu.feo.feojob.mapper.OrgMapper">
<!-- Entity类的ResultMap -->
<resultMap type="com.tanpu.feo.feojob.entity.Org" id="orgResultMap">
<result property="id" column="id"/>
<result property="orgCode" column="org_code"/>
<result property="orgName" column="org_name"/>
<result property="automaticProcessing" column="automatic_processing"/>
<result property="isbuySelection" column="isbuy_selection"/>
<result property="isbuyTodayfocus" column="isbuy_todayfocus"/>
<result property="arPushLabels" column="ar_push_labels"/>
<result property="funCodes" column="fun_codes"/>
<result property="homepageCustom" column="homepage_custom"/>
<result property="contentSet" column="content_set"/>
<result property="cardTemplate" column="card_template"/>
<result property="accreditedInvestorSwitch" column="accredited_investor_switch"/>
<result property="friendToolsSwitch" column="friend_tools_switch"/>
<result property="tagCategoryId" column="tag_category_id"/>
<result property="aliyunSignName" column="aliyun_sign_name"/>
<result property="aliyunTempcode" column="aliyun_tempcode"/>
<result property="aliyunAccessKeyId" column="aliyun_access_key_id"/>
<result property="aliyunAccessKeySecret" column="aliyun_access_key_secret"/>
<result property="appId" column="app_id"/>
<result property="appKey" column="app_key"/>
<result property="secretKey" column="secret_key"/>
<result property="timeValidity" column="time_validity"/>
<result property="createTime" column="create_time"/>
<result property="createBy" column="create_by"/>
<result property="updateTime" column="update_time"/>
<result property="updateBy" column="update_by"/>
<result property="deleteTag" column="delete_tag"/>
<result property="isCheckSubject" column="is_check_subject"/>
<result property="appType" column="app_type"/>
<result property="agentId" column="agent_id"/>
</resultMap>
<!--高频sql子语句,全部列的sql段-->
<sql id="orgColSql">
id,
org_code,
org_name,
automatic_processing,
isbuy_selection,
isbuy_todayfocus,
ar_push_labels,
fun_codes,
homepage_custom,
content_set,
card_template,
accredited_investor_switch,
friend_tools_switch,
tag_category_id,
aliyun_sign_name,
aliyun_tempcode,
aliyun_access_key_id,
aliyun_access_key_secret,
app_id,
app_key,
secret_key,
time_validity,
create_time,
create_by,
update_time,
update_by,
delete_tag,
is_check_subject,
app_type,
agent_id
</sql>
<!--Add your code here-->
</mapper>
\ No newline at end of file
<?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">
<!--注册操作对应Entity的Mapper类-->
<mapper namespace="com.tanpu.feo.feojob.mapper.RoleMapper">
<!-- Entity类的ResultMap -->
<resultMap type="com.tanpu.feo.feojob.entity.Role" id="roleResultMap">
<result property="id" column="id"/>
<result property="roleId" column="role_id"/>
<result property="description" column="description"/>
<result property="type" column="type"/>
<result property="deleteTag" column="delete_tag"/>
<result property="createTime" column="create_time"/>
<result property="updateTime" column="update_time"/>
<result property="updateBy" column="update_by"/>
<result property="createBy" column="create_by"/>
</resultMap>
<!--高频sql子语句,全部列的sql段-->
<sql id="roleColSql">
id,
role_id,
description,
type,
delete_tag,
create_time,
update_time,
update_by,
create_by
</sql>
<!--Add your code here-->
</mapper>
\ No newline at end of file
<?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">
<!--注册操作对应Entity的Mapper类-->
<mapper namespace="com.tanpu.feo.feojob.mapper.UserInfoMapper">
<!-- Entity类的ResultMap -->
<resultMap type="com.tanpu.feo.feojob.entity.UserInfo" id="userInfoResultMap">
<result property="id" column="id"/>
<result property="uiOpenid" column="ui_openid"/>
<result property="uiUnionid" column="ui_unionId"/>
<result property="uiTelphone" column="ui_telphone"/>
<result property="uiPwd" column="ui_pwd"/>
<result property="uiNickname" column="ui_nickname"/>
<result property="uiHeadimg" column="ui_headimg"/>
<result property="uiUsername" column="ui_username"/>
<result property="uiSex" column="ui_sex"/>
<result property="uiBirthday" column="ui_birthday"/>
<result property="uiIntroduction" column="ui_introduction"/>
<result property="uiTypeMp" column="ui_type_mp"/>
<result property="uiHeadimgMp" column="ui_headimg_mp"/>
<result property="uiUsernameMp" column="ui_username_mp"/>
<result property="uiTelphoneMp" column="ui_telphone_mp"/>
<result property="uiMobilephoneMp" column="ui_mobilephone_mp"/>
<result property="uiCompanyMp" column="ui_company_mp"/>
<result property="uiCompanyAddressMp" column="ui_company_address_mp"/>
<result property="uiPositionMp" column="ui_position_mp"/>
<result property="uiIndustryMp" column="ui_industry_mp"/>
<result property="uiEmailMp" column="ui_email_mp"/>
<result property="uiIntroductionMp" column="ui_introduction_mp"/>
<result property="uiWechatQrcode" column="ui_wechat_qrcode"/>
<result property="uiWechatXcxQrcode" column="ui_wechat_xcx_qrcode"/>
<result property="uiType" column="ui_type"/>
<result property="uiShenfen" column="ui_shenfen"/>
<result property="uiRzstatus" column="ui_rzstatus"/>
<result property="orgId" column="org_id"/>
<result property="teamId" column="team_id"/>
<result property="joinTime" column="join_time"/>
<result property="staffNo" column="staff_no"/>
<result property="investorCertifiedStatus" column="investor_certified_status"/>
<result property="investorCertifiedTime" column="investor_certified_time"/>
<result property="toPartner" column="to_partner"/>
<result property="uiGrade" column="ui_grade"/>
<result property="contentReview" column="content_review"/>
<result property="uiHonor" column="ui_honor"/>
<result property="uiHbUserid" column="ui_hb_userid"/>
<result property="staffRegion" column="staff_region"/>
<result property="branchName" column="branch_name"/>
<result property="subBranchName" column="sub_branch_name"/>
<result property="branchNetworkName" column="branch_network_name"/>
<result property="uiGradeName" column="ui_grade_name"/>
<result property="uiTargetGradeName" column="ui_target_grade_name"/>
<result property="uiSource" column="ui_source"/>
<result property="createtime" column="createtime"/>
<result property="createby" column="createby"/>
<result property="updatetime" column="updatetime"/>
<result property="updateby" column="updateby"/>
<result property="deletetag" column="deletetag"/>
<result property="frontRoles" column="front_roles"/>
<result property="uiCheckStatus" column="ui_check_status"/>
<result property="city" column="city"/>
<result property="province" column="province"/>
<result property="country" column="country"/>
<result property="uiInviter" column="ui_inviter"/>
<result property="uiInviterPhone" column="ui_inviter_phone"/>
<result property="uiAge" column="ui_age"/>
<result property="uiRegion" column="ui_region"/>
<result property="uiWecaht" column="ui_wecaht"/>
<result property="uiInviterTime" column="ui_inviter_time"/>
<result property="unionid" column="unionid"/>
<result property="level" column="level"/>
<result property="age" column="age"/>
<result property="district" column="district"/>
<result property="address" column="address"/>
<result property="education" column="education"/>
<result property="wechat" column="wechat"/>
<result property="highWorthCustomerNum" column="high_worth_customer_num"/>
<result property="customerAsset" column="customer_asset"/>
<result property="financialPlanner" column="financial_planner"/>
<result property="vipEndTime" column="vip_end_time"/>
<result property="uiRegisterTime" column="ui_register_time"/>
<result property="uiAuth" column="ui_auth"/>
<result property="uiChannel" column="ui_channel"/>
<result property="reviewTime" column="review_time"/>
<result property="uiAppleUserid" column="ui_apple_userid"/>
<result property="ifaNo" column="ifa_no"/>
<result property="realname" column="realname"/>
</resultMap>
<!--高频sql子语句,全部列的sql段-->
<sql id="userInfoColSql">
id,
ui_openid,
ui_unionId,
ui_telphone,
ui_pwd,
ui_nickname,
ui_headimg,
ui_username,
ui_sex,
ui_birthday,
ui_introduction,
ui_type_mp,
ui_headimg_mp,
ui_username_mp,
ui_telphone_mp,
ui_mobilephone_mp,
ui_company_mp,
ui_company_address_mp,
ui_position_mp,
ui_industry_mp,
ui_email_mp,
ui_introduction_mp,
ui_wechat_qrcode,
ui_wechat_xcx_qrcode,
ui_type,
ui_shenfen,
ui_rzstatus,
org_id,
team_id,
join_time,
staff_no,
investor_certified_status,
investor_certified_time,
to_partner,
ui_grade,
content_review,
ui_honor,
ui_hb_userid,
staff_region,
branch_name,
sub_branch_name,
branch_network_name,
ui_grade_name,
ui_target_grade_name,
ui_source,
createtime,
createby,
updatetime,
updateby,
deletetag,
front_roles,
ui_check_status,
city,
province,
country,
ui_inviter,
ui_inviter_phone,
ui_age,
ui_region,
ui_wecaht,
ui_inviter_time,
unionid,
level,
age,
district,
address,
education,
wechat,
high_worth_customer_num,
customer_asset,
financial_planner,
vip_end_time,
ui_register_time,
ui_auth,
ui_channel,
review_time,
ui_apple_userid,
ifa_no,
realname
</sql>
<!--Add your code here-->
</mapper>
\ No newline at end of file
package com.tanpu.feo.feojob;
import cn.hutool.json.JSONUtil;
import com.tanpu.feo.feojob.entity.IfaAssets;
import com.tanpu.feo.feojob.entity.OrgExt;
import com.tanpu.feo.feojob.service.IfaAssetsService;
import com.tanpu.feo.feojob.service.OrgExtService;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import java.util.List;
@SpringBootTest
class FeoJobApplicationTests {
@Autowired
private OrgExtService orgExtService;
@Autowired
private IfaAssetsService ifaAssetsService;
@Test
void contextLoads() {
List<OrgExt> orgExtByAyto = orgExtService.findOrgExtByAyto();
System.out.println(JSONUtil.toJsonStr(orgExtByAyto));
IfaAssets ifaAssets = ifaAssetsService.findById("10");
System.out.println(ifaAssets);
}
}
......@@ -3,6 +3,7 @@ package com.tanpu.feo.feojob.dao;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tanpu.feo.feojob.entity.DemoEntity;
import com.tanpu.feo.feojob.mapper.DemoMapper;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
......
# DataSource Config
spring:
datasource:
driver-class-name: org.h2.Driver
schema: classpath:db/schema-h2.sql
data: classpath:db/data-h2.sql
url: jdbc:h2:mem:test
username: root
password: test
# Logger Config
logging:
level:
com.tanpu.feo.feojob: debug
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment