mirror of
https://gitee.com/y_project/RuoYi-Cloud.git
synced 2026-01-26 11:51:55 +08:00
2024-09-16 半流程
This commit is contained in:
@@ -0,0 +1,138 @@
|
||||
package com.ruoyi.common.core.domain.http;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 渠道配置对象 channel
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-09-15
|
||||
*/
|
||||
public class Channel extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** */
|
||||
private Long id;
|
||||
|
||||
/** 渠道名称 */
|
||||
@Excel(name = "渠道名称")
|
||||
private String channelName;
|
||||
|
||||
/** 渠道签名 */
|
||||
@Excel(name = "渠道签名")
|
||||
private String channelSign;
|
||||
|
||||
/** 扣量比 */
|
||||
@Excel(name = "扣量比")
|
||||
private Long score;
|
||||
|
||||
/** 推广页名称 */
|
||||
@Excel(name = "推广页名称")
|
||||
private String htmlName;
|
||||
|
||||
/** 推广页地址 */
|
||||
@Excel(name = "推广页地址")
|
||||
private String htmlLocation;
|
||||
|
||||
/** 可访问IP */
|
||||
@Excel(name = "可访问IP")
|
||||
private String ips;
|
||||
|
||||
/** 开启关闭时段 */
|
||||
@Excel(name = "开启关闭时段")
|
||||
private String period;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setChannelName(String channelName)
|
||||
{
|
||||
this.channelName = channelName;
|
||||
}
|
||||
|
||||
public String getChannelName()
|
||||
{
|
||||
return channelName;
|
||||
}
|
||||
public void setChannelSign(String channelSign)
|
||||
{
|
||||
this.channelSign = channelSign;
|
||||
}
|
||||
|
||||
public String getChannelSign()
|
||||
{
|
||||
return channelSign;
|
||||
}
|
||||
public void setScore(Long score)
|
||||
{
|
||||
this.score = score;
|
||||
}
|
||||
|
||||
public Long getScore()
|
||||
{
|
||||
return score;
|
||||
}
|
||||
public void setHtmlName(String htmlName)
|
||||
{
|
||||
this.htmlName = htmlName;
|
||||
}
|
||||
|
||||
public String getHtmlName()
|
||||
{
|
||||
return htmlName;
|
||||
}
|
||||
public void setHtmlLocation(String htmlLocation)
|
||||
{
|
||||
this.htmlLocation = htmlLocation;
|
||||
}
|
||||
|
||||
public String getHtmlLocation()
|
||||
{
|
||||
return htmlLocation;
|
||||
}
|
||||
public void setIps(String ips)
|
||||
{
|
||||
this.ips = ips;
|
||||
}
|
||||
|
||||
public String getIps()
|
||||
{
|
||||
return ips;
|
||||
}
|
||||
public void setPeriod(String period)
|
||||
{
|
||||
this.period = period;
|
||||
}
|
||||
|
||||
public String getPeriod()
|
||||
{
|
||||
return period;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("channelName", getChannelName())
|
||||
.append("channelSign", getChannelSign())
|
||||
.append("score", getScore())
|
||||
.append("htmlName", getHtmlName())
|
||||
.append("htmlLocation", getHtmlLocation())
|
||||
.append("ips", getIps())
|
||||
.append("period", getPeriod())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -22,6 +22,10 @@ public class Customer extends BaseEntity
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
/**渠道ID**/
|
||||
@Excel(name = "渠道ID")
|
||||
private Long channelId;
|
||||
|
||||
/** 年龄 */
|
||||
@Excel(name = "年龄")
|
||||
private Integer age;
|
||||
|
||||
@@ -0,0 +1,203 @@
|
||||
package com.ruoyi.common.core.domain.http;
|
||||
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 商户对象 merchant
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-09-15
|
||||
*/
|
||||
@Data
|
||||
public class Merchant extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
/** 商户类型 1H5 2连登 3半流程 4全流程 */
|
||||
@Excel(name = "商户类型 1H5 2连登 3半流程 4全流程")
|
||||
private Long merchantType;
|
||||
|
||||
/** 商户名称 */
|
||||
@Excel(name = "商户名称")
|
||||
private String merchantName;
|
||||
|
||||
/** 商户描述 */
|
||||
@Excel(name = "商户描述")
|
||||
private String merchantDescribe;
|
||||
|
||||
/** 商户主体 */
|
||||
@Excel(name = "商户主体")
|
||||
private String merchantCompany;
|
||||
|
||||
/** logo文件地址 */
|
||||
@Excel(name = "logo文件地址")
|
||||
private String logo;
|
||||
|
||||
/** 是否上下架 */
|
||||
@Excel(name = "是否上下架")
|
||||
private Integer status;
|
||||
|
||||
/** 定量数 */
|
||||
@Excel(name = "定量数")
|
||||
private Integer limitNum;
|
||||
|
||||
/** 是否定量 0否 1是 */
|
||||
@Excel(name = "是否定量 0否 1是")
|
||||
private Integer limitType;
|
||||
|
||||
/** 渠道限制类型 0不限 1准入 2禁入 */
|
||||
@Excel(name = "渠道限制类型 0不限 1准入 2禁入")
|
||||
private Integer channelLimitType;
|
||||
|
||||
/** 渠道限制ID */
|
||||
@Excel(name = "渠道限制ID")
|
||||
private String channelLimit;
|
||||
|
||||
/** 渠道限制类型 0不限 1满足其一 2满足全部 */
|
||||
@Excel(name = "渠道限制类型 0不限 1满足其一 2满足全部")
|
||||
private Integer customerInfoFilterType;
|
||||
|
||||
/** 年龄限制开始 */
|
||||
@Excel(name = "年龄限制开始")
|
||||
private Integer ageLimitStart;
|
||||
|
||||
/** 年龄限制结束 */
|
||||
@Excel(name = "年龄限制结束")
|
||||
private Integer ageLimitEnd;
|
||||
|
||||
/** 手机号禁入号段英文逗号分隔 */
|
||||
@Excel(name = "手机号禁入号段英文逗号分隔")
|
||||
private String phoneLimit;
|
||||
|
||||
/** 无社保 */
|
||||
@Excel(name = "无社保")
|
||||
private Boolean socialSecurityNo;
|
||||
|
||||
/** 社保未满6个月 */
|
||||
@Excel(name = "社保未满6个月")
|
||||
private Boolean socialSecurityLow;
|
||||
|
||||
/** 社保6个月以上 */
|
||||
@Excel(name = "社保6个月以上")
|
||||
private Boolean socialSecurityHigh;
|
||||
|
||||
/** 无车 */
|
||||
@Excel(name = "无车")
|
||||
private Boolean carNo;
|
||||
|
||||
/** 有车 */
|
||||
@Excel(name = "有车")
|
||||
private Boolean carHave;
|
||||
|
||||
/** 保单缴纳不满一年 */
|
||||
@Excel(name = "保单缴纳不满一年")
|
||||
private Boolean guaranteeSlipLow;
|
||||
|
||||
/** 保单缴纳一年以上 */
|
||||
@Excel(name = "保单缴纳一年以上")
|
||||
private Boolean guaranteeSlipCentre;
|
||||
|
||||
/** 保单缴纳2年以上 */
|
||||
@Excel(name = "保单缴纳2年以上")
|
||||
private Boolean guaranteeSlipHigh;
|
||||
|
||||
/** 初中 */
|
||||
@Excel(name = "初中")
|
||||
private Boolean educationMiddle;
|
||||
|
||||
/** 高中 */
|
||||
@Excel(name = "高中")
|
||||
private Boolean educationHighSchool;
|
||||
|
||||
/** 中专 */
|
||||
@Excel(name = "中专")
|
||||
private Boolean educationPolytechnic;
|
||||
|
||||
/** 大专 */
|
||||
@Excel(name = "大专")
|
||||
private Boolean educationJuniorCollege;
|
||||
|
||||
/** 本科 */
|
||||
@Excel(name = "本科")
|
||||
private Boolean educationUndergraduateCourse;
|
||||
|
||||
/** 研究生及以上 */
|
||||
@Excel(name = "研究生及以上")
|
||||
private Boolean educationPostgraduate;
|
||||
|
||||
/** 公积金未满6个月 */
|
||||
@Excel(name = "公积金未满6个月")
|
||||
private Boolean accumulationFundLow;
|
||||
|
||||
/** 公积金满6个月以上 */
|
||||
@Excel(name = "公积金满6个月以上")
|
||||
private Boolean accumulationFundHigh;
|
||||
|
||||
/** 本地无房 */
|
||||
@Excel(name = "本地无房")
|
||||
private Boolean hourseNo;
|
||||
|
||||
/** 本地全款房 */
|
||||
@Excel(name = "本地全款房")
|
||||
private Boolean hourseFullPayment;
|
||||
|
||||
/** 本地按揭 */
|
||||
@Excel(name = "本地按揭")
|
||||
private Boolean hourseMortgaging;
|
||||
|
||||
/** 上班族 */
|
||||
@Excel(name = "上班族")
|
||||
private Boolean officeWorker;
|
||||
|
||||
/** 公务员 */
|
||||
@Excel(name = "公务员")
|
||||
private Boolean civilServant;
|
||||
|
||||
/** 私营业主 */
|
||||
@Excel(name = "私营业主")
|
||||
private Boolean privatePropertyOwners;
|
||||
|
||||
/** 个体户 */
|
||||
@Excel(name = "个体户")
|
||||
private Boolean selfEmployedPerson;
|
||||
|
||||
/** 其他职业 */
|
||||
@Excel(name = "其他职业")
|
||||
private Boolean otherOccupations;
|
||||
|
||||
/** 花呗5000以下 */
|
||||
@Excel(name = "花呗5000以下")
|
||||
private Boolean huaBeiLow;
|
||||
|
||||
/** 花呗5000-10000 */
|
||||
@Excel(name = "花呗5000-10000")
|
||||
private Boolean huaBeiMiddle;
|
||||
|
||||
/** 花呗10000以上 */
|
||||
@Excel(name = "花呗10000以上")
|
||||
private Boolean huaBeiHigh;
|
||||
|
||||
/** 白条5000以下 */
|
||||
@Excel(name = "白条5000以下")
|
||||
private Boolean baiTiaoLow;
|
||||
|
||||
/** 白条5000-10000 */
|
||||
@Excel(name = "白条5000-10000")
|
||||
private Boolean baiTiaoMiddle;
|
||||
|
||||
/** 白条10000以上 */
|
||||
@Excel(name = "白条10000以上")
|
||||
private Boolean baiTiaoHigh;
|
||||
|
||||
/** 芝麻分 */
|
||||
@Excel(name = "芝麻分")
|
||||
private Integer zhiMa;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,483 @@
|
||||
package com.ruoyi.common.core.utils;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.*;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.time.temporal.TemporalAdjusters;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @program: JieYiHua-Cloud
|
||||
* @description: 时间工具类
|
||||
* @author: LiYu
|
||||
* @create: 2021-08-04 15:45
|
||||
**/
|
||||
public class LocalDateTimeUtils {
|
||||
/**
|
||||
* 获取指定日期所属周的周一的日期
|
||||
*
|
||||
* @param localDate
|
||||
* @return
|
||||
*/
|
||||
public static LocalDateTime getMondayForThisWeek(LocalDate localDate) {
|
||||
LocalDateTime monday = LocalDateTime.of(localDate, LocalTime.MIN).with(DayOfWeek.MONDAY);
|
||||
return monday;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取指定日期所属周的周日的日期
|
||||
*
|
||||
* @param localDate
|
||||
* @return
|
||||
*/
|
||||
public static LocalDateTime getSundayForThisWeek(LocalDate localDate) {
|
||||
LocalDateTime sunday = LocalDateTime.of(localDate, LocalTime.MIN).with(DayOfWeek.SUNDAY);
|
||||
return sunday;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取指定日期所属周的下周一的日期
|
||||
*
|
||||
* @param localDate
|
||||
* @return
|
||||
*/
|
||||
public static LocalDateTime getMondayForNextWeek(LocalDate localDate) {
|
||||
LocalDateTime monday = LocalDateTime.of(localDate, LocalTime.MIN).plusWeeks(1).with(DayOfWeek.MONDAY);
|
||||
return monday;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取指定日期所属周的下周日的日期
|
||||
*
|
||||
* @param localDate
|
||||
* @return
|
||||
*/
|
||||
public static LocalDateTime getSundayForNextWeek(LocalDate localDate) {
|
||||
LocalDateTime sunday = LocalDateTime.of(localDate, LocalTime.MIN).plusWeeks(1).with(DayOfWeek.SUNDAY);
|
||||
return sunday;
|
||||
}
|
||||
|
||||
/**
|
||||
* 指定格式为"yyyy-MM-dd HH:mm:ss"的字符串时间转化为LocalDateTime类型
|
||||
*
|
||||
* @param dateStr
|
||||
* @return
|
||||
*/
|
||||
public static LocalDateTime getLocalDateTimeFromString(String dateStr) {
|
||||
LocalDateTime localDateTime = LocalDateTime.parse(dateStr, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
||||
return localDateTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 指定格式为"yyyy-MM-ddTHH:mm:ss"的字符串时间转化为LocalDateTime类型
|
||||
*
|
||||
* @param dateStr
|
||||
* @return
|
||||
*/
|
||||
public static LocalDateTime getLocalDateTimeFromString2(String dateStr) {
|
||||
LocalDateTime localDateTime = LocalDateTime.parse(dateStr, DateTimeFormatter.ofPattern("yyyy-MM-dd w hh:mm:ss"));
|
||||
return localDateTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* LocalDateTime类型转化为格式为"yyyy-MM-dd HH:mm:ss"的字符串时间类型
|
||||
*
|
||||
* @param localDateTime
|
||||
* @return
|
||||
*/
|
||||
public static String getStringFromLocalDateTime(LocalDateTime localDateTime) {
|
||||
String localDateTimeStr = localDateTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
||||
return localDateTimeStr;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* LocalDateTime类型转化为格式为"yyyy-MM-dd"的字符串时间类型
|
||||
*
|
||||
* @param localDateTime 时间
|
||||
* @return 结果
|
||||
*/
|
||||
public static String getStringFromLocalDateTime2(LocalDateTime localDateTime) {
|
||||
if (localDateTime == null) { return null; }
|
||||
return localDateTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
|
||||
}
|
||||
|
||||
/**
|
||||
* LocalDateTime类型转化为格式为"yyyy-MM-dd HH"的字符串时间类型
|
||||
*
|
||||
* @param localDateTime 时间
|
||||
* @return 结果
|
||||
*/
|
||||
public static String getStringFromLocalDateTime4(LocalDateTime localDateTime) {
|
||||
if (localDateTime == null) { return null; }
|
||||
return localDateTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH"));
|
||||
}
|
||||
|
||||
/**
|
||||
* LocalDateTime类型转化为格式为"yyyy-MM"的字符串时间类型
|
||||
*/
|
||||
public static String getStringFromLocalDateTime3(LocalDateTime localDateTime) {
|
||||
if (localDateTime == null) {
|
||||
return null;
|
||||
}
|
||||
return localDateTime.format(DateTimeFormatter.ofPattern("yyyy-MM"));
|
||||
}
|
||||
|
||||
/**
|
||||
* Date类型时间转化为LocalDateTime类型
|
||||
*
|
||||
* @param date
|
||||
* @return
|
||||
*/
|
||||
public static LocalDateTime getLocalDateTimeFromDate(Date date) {
|
||||
LocalDateTime localDateTime = date.toInstant().atOffset(ZoneOffset.of("+8")).toLocalDateTime();
|
||||
return localDateTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* LocalDateTime类型转化为Date类型时间
|
||||
*
|
||||
* @param localDateTime
|
||||
* @return
|
||||
*/
|
||||
public static Date getDateFromLocalDateTime(LocalDateTime localDateTime) {
|
||||
Date date = Date.from(localDateTime.toInstant(ZoneOffset.of("+8")));
|
||||
return date;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取指定时间的00:00:00
|
||||
*
|
||||
* @param localDateTime
|
||||
* @return
|
||||
*/
|
||||
public static LocalDateTime getLocalDateTimeForBegin(LocalDateTime localDateTime) {
|
||||
LocalDateTime begin = LocalDateTime.of(localDateTime.toLocalDate(), LocalTime.MIN);
|
||||
return begin;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取指定时间的23:59:59
|
||||
*
|
||||
* @param localDateTime
|
||||
* @return
|
||||
*/
|
||||
public static LocalDateTime getLocalDateTimeForEnd(LocalDateTime localDateTime) {
|
||||
LocalDateTime end = LocalDateTime.of(localDateTime.toLocalDate(), LocalTime.MAX);
|
||||
return end;
|
||||
}
|
||||
|
||||
/**
|
||||
* 时间戳(毫秒)转化为LocalDateTime格式
|
||||
*
|
||||
* @param timestamp
|
||||
* @return
|
||||
*/
|
||||
public static LocalDateTime getLocalDateTimeFromTimestamp(Long timestamp) {
|
||||
LocalDateTime localDateTime = LocalDateTime.ofEpochSecond(timestamp / 1000, 0, ZoneOffset.ofHours(8));
|
||||
return localDateTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* LocalDateTime格式转化为时间戳(毫秒)
|
||||
*
|
||||
* @param localDateTime
|
||||
* @return
|
||||
*/
|
||||
public static Long getTimestampFromLocalDateTime(LocalDateTime localDateTime) {
|
||||
Long timestamp = localDateTime.toInstant(ZoneOffset.of("+8")).toEpochMilli();
|
||||
return timestamp;
|
||||
}
|
||||
|
||||
/**
|
||||
* 时间戳(毫秒)转 yyyy-MM-dd HH:mm:ss
|
||||
* @param timestamp
|
||||
* @return
|
||||
*/
|
||||
public static String getStringFromTimestamp(Long timestamp) {
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
return dateFormat.format(timestamp);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取本月开始时间
|
||||
*
|
||||
* @return 开始时间
|
||||
*/
|
||||
public static LocalDateTime getFirstDayOfMonth() {
|
||||
return LocalDateTime.of(LocalDate.from(LocalDateTime.now().with(TemporalAdjusters.firstDayOfMonth())), LocalTime.MIN);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取月初
|
||||
*
|
||||
* @param localDateTime 时间
|
||||
* @return 数据
|
||||
*/
|
||||
public static LocalDateTime getTheBeginningOfTheMonth(LocalDateTime localDateTime) {
|
||||
return LocalDateTime.of(LocalDate.from(localDateTime.with(TemporalAdjusters.firstDayOfMonth())), LocalTime.MIN);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取本月结束时间
|
||||
*
|
||||
* @return 结束时间
|
||||
*/
|
||||
public static LocalDateTime getLastDay() {
|
||||
return LocalDateTime.of(LocalDate.from(LocalDateTime.now().with(TemporalAdjusters.lastDayOfMonth())), LocalTime.MAX);
|
||||
}
|
||||
|
||||
public static LocalDateTime getTheEndOfTheMonth(LocalDateTime localDateTime) {
|
||||
return LocalDateTime.of(LocalDate.from(localDateTime.with(TemporalAdjusters.lastDayOfMonth())), LocalTime.MAX);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取时间差 (秒)
|
||||
*
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @return 秒
|
||||
*/
|
||||
public static Long getTimeDifference(LocalDateTime startTime, LocalDateTime endTime) {
|
||||
Duration duration = Duration.between(startTime, endTime);
|
||||
return duration.toMinutes() * 60;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取两个时间差 (天数)
|
||||
*
|
||||
* @param localDateTime 时间
|
||||
* @return 天数
|
||||
*/
|
||||
public static Long timeDifferenceByDay(LocalDateTime localDateTime) {
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
Duration duration = Duration.between(localDateTime, now);
|
||||
return duration.toDays();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取两天时间间隔
|
||||
*
|
||||
* @param startingTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @return 结果
|
||||
*/
|
||||
public static Long twoDayInterval(LocalDateTime startingTime, LocalDateTime endTime) {
|
||||
Duration duration = Duration.between(startingTime, endTime);
|
||||
return duration.toDays();
|
||||
}
|
||||
|
||||
/**
|
||||
* 转白话
|
||||
*
|
||||
* @param localDateTime 时间
|
||||
* @return 字符串
|
||||
*/
|
||||
public static String toTheVernacular(LocalDateTime localDateTime) {
|
||||
return localDateTime.getYear() + "年" + localDateTime.getMonthValue() + "月" + localDateTime.getDayOfMonth() + "日";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取昨天
|
||||
*
|
||||
* @return 获取昨天
|
||||
*/
|
||||
public static LocalDateTime getYesterdaySDate() {
|
||||
return LocalDateTime.now().plusDays(1);
|
||||
}
|
||||
/**
|
||||
* 获取昨天
|
||||
*
|
||||
* @return 获取昨天
|
||||
*/
|
||||
public static LocalDateTime getMinusDays() {
|
||||
return LocalDateTime.now().minusDays(1);
|
||||
}
|
||||
/**
|
||||
* 获取明天
|
||||
*
|
||||
* @return 获取明天
|
||||
*/
|
||||
public static LocalDateTime getPlusDays() {
|
||||
return LocalDateTime.now().plusDays(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取今年开始时间
|
||||
*
|
||||
* @return 开始时间
|
||||
*/
|
||||
public static LocalDateTime startThisYear() {
|
||||
return LocalDateTime.of(LocalDate.from(LocalDateTime.now().with(TemporalAdjusters.firstDayOfYear())), LocalTime.MIN);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据日期获取 星期 (2019-05-06 ——> 星期一)
|
||||
*
|
||||
* @param datetime
|
||||
* @return
|
||||
*/
|
||||
public static int dateToWeek(LocalDateTime datetime) {
|
||||
//获取当前时间
|
||||
LocalDateTime currentDate = LocalDateTime.now();
|
||||
//获取当前周
|
||||
int week = currentDate.getDayOfWeek().getValue();
|
||||
System.out.println("获取当前周:" + week);
|
||||
return week;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println(twoDayInterval(LocalDateTime.now(),LocalDateTime.now()));
|
||||
System.out.println(getNowBeforeHourTime(-24L));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 获取今天开始时间
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public static LocalDateTime getTodayStartTime() {
|
||||
return getLocalDateTimeForBegin(LocalDateTime.now());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取今天结束时间
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public static LocalDateTime getTodayEndTime() {
|
||||
return getLocalDateTimeForEnd(LocalDateTime.now());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 相隔所有时间
|
||||
*
|
||||
* @param startingTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @return 结果
|
||||
*/
|
||||
public static List<String> allTimeApart(String startingTime, String endTime) {
|
||||
Long size = LocalDateTimeUtils.twoDayInterval(LocalDateTimeUtils.getLocalDateTimeFromString(startingTime), LocalDateTimeUtils.getLocalDateTimeFromString(endTime));
|
||||
List<String> list = new ArrayList<>(Math.toIntExact(size));
|
||||
LocalDateTime time = getLocalDateTimeFromString(endTime);
|
||||
for (int i = 0; i <= size; i++) {
|
||||
LocalDateTime localDateTime = time.minusDays(i);
|
||||
list.add(getStringFromLocalDateTime2(localDateTime));
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 判断当前用户登录时段是否在09:00-18:00
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
public static boolean setFirstLogTime(){
|
||||
SimpleDateFormat formatter = new SimpleDateFormat("HH:mm");//获取时,分
|
||||
//当前系统时间
|
||||
Date data = new Date();
|
||||
String dateString = formatter.format(data);
|
||||
String format = "HH:mm";
|
||||
try{
|
||||
Date nowTime = new SimpleDateFormat(format).parse(dateString);
|
||||
Date startTime = new SimpleDateFormat(format).parse("09:00");
|
||||
Date endTime = new SimpleDateFormat(format).parse("18:00");
|
||||
return isEffectiveDate(nowTime, startTime, endTime);
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断当前时间是否在[startTime, endTime]区间,注意时间格式要一致
|
||||
*
|
||||
* @param nowTime 当前时间
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @return
|
||||
*/
|
||||
public static boolean isEffectiveDate(Date nowTime, Date startTime, Date endTime) {
|
||||
if (nowTime.getTime() == startTime.getTime() || nowTime.getTime() == endTime.getTime()) {
|
||||
return true;
|
||||
}
|
||||
Calendar date = Calendar.getInstance();
|
||||
date.setTime(nowTime);
|
||||
Calendar begin = Calendar.getInstance();
|
||||
begin.setTime(startTime);
|
||||
Calendar end = Calendar.getInstance();
|
||||
end.setTime(endTime);
|
||||
if (date.after(begin) && date.before(end)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断当前日期是否大于某个日期
|
||||
* @param date yyyy-MM-dd
|
||||
* @return
|
||||
*/
|
||||
public static boolean afterDate(LocalDateTime date){
|
||||
//针对好享管家图片相反
|
||||
String times = "2022-08-23";
|
||||
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
//把String转为LocalDate
|
||||
LocalDate localTime=LocalDate.parse(times,dtf);
|
||||
//判断当前日期是否大于指定日期
|
||||
return date.toLocalDate().isAfter(localTime);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取当前时间指定偏移多长小时前的时间
|
||||
* @param hour 负向前偏移 正向后偏移
|
||||
* @return
|
||||
*/
|
||||
public static LocalDateTime getNowBeforeHourTime(Long hour){
|
||||
LocalDateTime localDateTime = LocalDateTime.now(ZoneId.systemDefault());
|
||||
return localDateTime.plusHours(hour);
|
||||
}
|
||||
|
||||
public static Long timeDifferenceByLocalDate(LocalDateTime localDateTime) {
|
||||
LocalDate toLocalDate = localDateTime.toLocalDate();
|
||||
LocalDate now = LocalDate.now();
|
||||
long until = toLocalDate.until(now, ChronoUnit.DAYS);
|
||||
return toLocalDate.until(now, ChronoUnit.DAYS);
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断时间是否是今天
|
||||
* @param localDateTime 时间
|
||||
* @return 结果
|
||||
*/
|
||||
public static boolean isToday(LocalDateTime localDateTime) {
|
||||
return localDateTime.toLocalDate().equals(LocalDate.now());
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断日期是否是指定天数内
|
||||
* @param localDateTime 时间
|
||||
* @param day 天数
|
||||
* @return 结果
|
||||
*/
|
||||
public static boolean isDay(LocalDateTime localDateTime,Long day) {
|
||||
return localDateTime.toLocalDate().equals(LocalDate.now().plusDays(day));
|
||||
}
|
||||
|
||||
public static long getTimeStamp(String dateTime){
|
||||
LocalDateTime time = LocalDateTimeUtils.getLocalDateTimeFromString(dateTime);
|
||||
return time.atZone(ZoneId.systemDefault()).toInstant().toEpochMilli();
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,456 @@
|
||||
package com.ruoyi.common.core.utils.match;
|
||||
|
||||
import com.ruoyi.common.core.domain.http.Customer;
|
||||
import com.ruoyi.common.core.domain.http.Merchant;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
@Slf4j
|
||||
public class MatchQualification {
|
||||
|
||||
|
||||
/**
|
||||
* 是否可以匹配上产品
|
||||
* @param customer 用户信息
|
||||
* @param merchant 产品前筛
|
||||
* openInfoFilter 开启资质筛选 0:不筛选, 1:满足1, 2:满足全部
|
||||
*
|
||||
* @return 结构
|
||||
*/
|
||||
public static Boolean doesItMatchProduct(Customer customer, Merchant merchant) {
|
||||
// if (Objects.isNull(merchant)){
|
||||
// return true;
|
||||
// }
|
||||
//
|
||||
// if (Objects.isNull(merchant.getCustomerInfoFilterType()) || merchant.getCustomerInfoFilterType() == 0){
|
||||
// return true;
|
||||
// }
|
||||
//
|
||||
// //满足1个
|
||||
// boolean openOne = merchant.getCustomerInfoFilterType() == 1;
|
||||
// //满足所有
|
||||
// boolean openAll = merchant.getCustomerInfoFilterType() == 2;
|
||||
// //结果
|
||||
// boolean result = false;
|
||||
//
|
||||
// String userInfo = customer.getId() + "-" + customer.getChannelId() + "-" + merchant.getId();
|
||||
//
|
||||
// //社保
|
||||
// if (merchant.getSocialSecurityHigh() || merchant.getSocialSecurityNo() ||merchant.getSocialSecurityLow()) {
|
||||
// if (openAll && Objects.isNull(customer.getSocialSecurity())){
|
||||
// log.info("资质匹配筛选, 配置[满足所有]-社保为空, 匹配不通过, 结束匹配, 用户id-渠道id-渠道名称-产品id:{}", userInfo);
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// Integer infoByCode = customer.getSocialSecurity();
|
||||
// if (Objects.nonNull(customer.getSocialSecurity())) {
|
||||
// if (merchant.getSocialSecurityNo()) {
|
||||
// if (customer.getSocialSecurity()==merchant.getSocialSecurityNo())) {
|
||||
// result = true;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if (merchant.getSocialSecurityLow()) {
|
||||
// if (customer.getSocialSecurity().equals(CustomerSocialSecurityType.GREAT_SOCIAL_SECURITY.getCode())) {
|
||||
// result = true;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// //条件为 满足一个即可, 恰巧现在就有满足的, 则返回true(通过)
|
||||
// if (openOne && result) {
|
||||
//// log.info("资质匹配筛选, 配置[满足其一]-社保:{}, 匹配通过, 结束匹配, 用户id-渠道id-渠道名称-产品id:{}", userDetailsDTO.getSocialSecurity() + "-" + infoByCode, userInfo);
|
||||
// return result;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// //条件为 满足全部, 恰巧现在这个不满足, 则返回false(不通过)
|
||||
// if (openAll && !result) {
|
||||
// log.info("资质匹配筛选, 配置[满足所有]-社保:{}, 匹配不通过, 结束匹配, 用户id-渠道id-渠道名称-产品id:{}", userDetailsDTO.getSocialSecurity() + "-" + infoByCode, userInfo);
|
||||
// return false;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// //公积金
|
||||
// if (productLimit.getSmallProvidentFund() || productLimit.getGreatProvidentFund()) {
|
||||
// if (openAll && Objects.isNull(userDetailsDTO.getProvidentFund())){
|
||||
// log.info("资质匹配筛选, 配置[满足所有]-公积金为空, 匹配不通过, 结束匹配, 用户id-渠道id-渠道名称-产品id:{}", userInfo);
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// //判断结果置默认
|
||||
// result = false;
|
||||
// String infoByCode = CustomerProvidentFundType.getInfoByCode(userDetailsDTO.getProvidentFund());
|
||||
// if (Objects.nonNull(userDetailsDTO.getProvidentFund())) {
|
||||
// if (productLimit.getSmallProvidentFund()) {
|
||||
// if (userDetailsDTO.getProvidentFund().equals(CustomerProvidentFundType.SMALL_PROVIDENT_FUND.getCode())) {
|
||||
// result = true;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if (productLimit.getGreatProvidentFund()) {
|
||||
// if (userDetailsDTO.getProvidentFund().equals(CustomerProvidentFundType.GREAT_PROVIDENT_FUND.getCode())) {
|
||||
// result = true;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// //条件为 满足一个即可, 恰巧现在就有满足的, 则返回true(通过)
|
||||
// if (openOne && result) {
|
||||
//// log.info("资质匹配筛选, 配置[满足其一]-公积金:{}, 匹配通过, 结束匹配, 用户id-渠道id-渠道名称-产品id:{}", userDetailsDTO.getProvidentFund() + "-" + infoByCode, userInfo);
|
||||
// return result;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// //条件为 满足全部, 恰巧现在这个不满足, 则返回false(不通过)
|
||||
// if (openAll && !result) {
|
||||
//// log.info("资质匹配筛选, 配置[满足所有]-公积金:{}, 匹配不通过, 结束匹配, 用户id-渠道id-渠道名称-产品id:{}", userDetailsDTO.getProvidentFund() + "-" + infoByCode, userInfo);
|
||||
// return false;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// //车产
|
||||
// if (productLimit.getHavaCar()) {
|
||||
// if (openAll && Objects.isNull(userDetailsDTO.getCarProduction())){
|
||||
// log.info("资质匹配筛选, 配置[满足所有]-车产为空, 匹配不通过, 结束匹配, 用户id-渠道id-渠道名称-产品id:{}", userInfo);
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// //判断结果置默认
|
||||
// result = false;
|
||||
// String infoByCode = CustomerCarProductionType.getInfoByCode(userDetailsDTO.getCarProduction());
|
||||
// if (Objects.nonNull(userDetailsDTO.getCarProduction())) {
|
||||
// if (userDetailsDTO.getCarProduction().equals(CustomerCarProductionType.HAVE_CAR.getCode())) {
|
||||
// result = true;
|
||||
// }
|
||||
//
|
||||
// //条件为 满足一个即可, 恰巧现在就有满足的, 则返回true(通过)
|
||||
// if (openOne && result) {
|
||||
// log.info("资质匹配筛选, 配置[满足其一]-车产:{}, 匹配通过, 结束匹配, 用户id-渠道id-渠道名称-产品id:{}", userDetailsDTO.getCarProduction() + "-" + infoByCode, userInfo);
|
||||
// return result;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// //条件为 满足全部, 恰巧现在这个不满足, 则返回false(不通过)
|
||||
// if (openAll && !result) {
|
||||
// log.info("资质匹配筛选, 配置[满足所有]-车产:{}, 匹配不通过, 结束匹配, 用户id-渠道id-渠道名称-产品id:{}", userDetailsDTO.getCarProduction() + "-" + infoByCode, userInfo);
|
||||
// return false;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// //房产
|
||||
// if (productLimit.getHaveMortgageRoom() || productLimit.getHaveFullRoom()) {
|
||||
// if (openAll && Objects.isNull(userDetailsDTO.getEstate())){
|
||||
// log.info("资质匹配筛选, 配置[满足所有]-房产为空, 匹配不通过, 结束匹配, 用户id-渠道id-渠道名称-产品id:{}", userInfo);
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// //判断结果置默认
|
||||
// result = false;
|
||||
// String infoByCode = CustomerEstateType.getInfoByCode(userDetailsDTO.getEstate());
|
||||
// if (Objects.nonNull(userDetailsDTO.getEstate())) {
|
||||
// if (productLimit.getHaveMortgageRoom()){
|
||||
// if (userDetailsDTO.getEstate().equals(CustomerEstateType.HAVE_PROPERTY.getCode())){
|
||||
// result = true;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if (productLimit.getHaveFullRoom()){
|
||||
// if (userDetailsDTO.getEstate().equals(CustomerEstateType.FULL_PAYMENT_FOR_HOUSING.getCode())){
|
||||
// result = true;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// //条件为 满足一个即可, 恰巧现在就有满足的, 则返回true(通过)
|
||||
// if (openOne && result) {
|
||||
//// log.info("资质匹配筛选, 配置[满足其一]-房产:{}, 匹配通过, 结束匹配, 用户id-渠道id-渠道名称-产品id:{}", userDetailsDTO.getEstate() + "-" + infoByCode, userInfo);
|
||||
// return result;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// //条件为 满足全部, 恰巧现在这个不满足, 则返回false(不通过)
|
||||
// if (openAll && !result) {
|
||||
// log.info("资质匹配筛选, 配置[满足所有]-房产:{}, 匹配不通过, 结束匹配, 用户id-渠道id-渠道名称-产品id:{}", userDetailsDTO.getEstate() + "-" + infoByCode, userInfo);
|
||||
// return false;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// //保单
|
||||
// if (productLimit.getPolicyLessThanOneYear() || productLimit.getPolicyPaymentForOneYear() || productLimit.getPolicyPaymentForTwoYear()) {
|
||||
// if (openAll && Objects.isNull(userDetailsDTO.getPersonalInsurance())){
|
||||
// log.info("资质匹配筛选, 配置[满足所有]-保单为空, 匹配不通过, 结束匹配, 用户id-渠道id-渠道名称-产品id:{}", userInfo);
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// //判断结果置默认
|
||||
// result = false;
|
||||
// String infoByCode = CustomerInsurancePolicyType.getInfoByCode(userDetailsDTO.getPersonalInsurance());
|
||||
// if (Objects.nonNull(userDetailsDTO.getPersonalInsurance())) {
|
||||
// if (productLimit.getPolicyLessThanOneYear()) {
|
||||
// if (userDetailsDTO.getPersonalInsurance().equals(CustomerInsurancePolicyType.POLICY_LESS_THAN_ONE_YEAR.getCode())) {
|
||||
// result = true;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if (productLimit.getPolicyPaymentForOneYear()) {
|
||||
// if (userDetailsDTO.getPersonalInsurance().equals(CustomerInsurancePolicyType.POLICY_PAYMENT_FOR_ONE_YEAR.getCode())) {
|
||||
// result = true;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if (productLimit.getPolicyPaymentForTwoYear()) {
|
||||
// if (userDetailsDTO.getPersonalInsurance().equals(CustomerInsurancePolicyType.POLICY_PAYMENT_FOR_TWO_YEAR.getCode())) {
|
||||
// result = true;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// //条件为 满足一个即可, 恰巧现在就有满足的, 则返回true(通过)
|
||||
// if (openOne && result) {
|
||||
// log.info("资质匹配筛选, 配置[满足其一]-保单:{}, 匹配通过, 结束匹配, 用户id-渠道id-渠道名称-产品id:{}", userDetailsDTO.getPersonalInsurance() + "-" + infoByCode, userInfo);
|
||||
// return result;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// //条件为 满足全部, 恰巧现在这个不满足, 则返回false(不通过)
|
||||
// if (openAll && !result) {
|
||||
// log.info("资质匹配筛选, 配置[满足所有]-保单:{}, 匹配不通过, 结束匹配, 用户id-渠道id-渠道名称-产品id:{}", userDetailsDTO.getPersonalInsurance() + "-" + infoByCode, userInfo);
|
||||
// return false;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// //芝麻分
|
||||
// if (Objects.nonNull(productLimit.getSesame())){
|
||||
// if (openAll && Objects.isNull(userDetailsDTO.getSesame())){
|
||||
// log.info("资质匹配筛选, 配置[满足所有]-芝麻分为空, 匹配不通过, 结束匹配, 用户id-渠道id-渠道名称-产品id:{}", userInfo);
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// //判断结果置默认
|
||||
// result = false;
|
||||
// if (Objects.nonNull(userDetailsDTO.getSesame())) {
|
||||
// if (userDetailsDTO.getSesame() >= productLimit.getSesame()){
|
||||
// result = true;
|
||||
// }
|
||||
//
|
||||
// //条件为 满足一个即可, 恰巧现在就有满足的, 则返回true(通过)
|
||||
// if (openOne && result) {
|
||||
// log.info("资质匹配筛选, 配置[满足其一]-芝麻分:{}, 匹配通过, 结束匹配, 用户id-渠道id-渠道名称-产品id:{}", userDetailsDTO.getSesame(), userInfo);
|
||||
// return result;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// //条件为 满足全部, 恰巧现在这个不满足, 则返回false(不通过)
|
||||
// if (openAll && !result) {
|
||||
// log.info("资质匹配筛选, 配置[满足所有]-芝麻分:{}, 匹配不通过, 结束匹配, 用户id-渠道id-渠道名称-产品id:{}", userDetailsDTO.getSesame(), userInfo);
|
||||
// return false;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// //职业
|
||||
// if (productLimit.getOfficeWorker() ||
|
||||
// productLimit.getCivilServant() ||
|
||||
// productLimit.getPrivateOwners() ||
|
||||
// productLimit.getSmallPrivateBusiness() ||
|
||||
// productLimit.getOtherOccupations()) {
|
||||
//
|
||||
// if (openAll && Objects.isNull(userDetailsDTO.getProfessionalIdentity())){
|
||||
// log.info("资质匹配筛选, 配置[满足所有]-职业为空, 匹配不通过, 结束匹配, 用户id-渠道id-渠道名称-产品id:{}", userInfo);
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// //判断结果置默认
|
||||
// result = false;
|
||||
// String infoByCode = CustomerProfessionalIdentityType.getInfoByCode(userDetailsDTO.getProfessionalIdentity());
|
||||
// if (Objects.nonNull(userDetailsDTO.getProfessionalIdentity())) {
|
||||
// if (productLimit.getOfficeWorker()){
|
||||
// if (userDetailsDTO.getProfessionalIdentity().equals(CustomerProfessionalIdentityType.OFFICE_WORKER.getCode())) {
|
||||
// result = true;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if (productLimit.getCivilServant()){
|
||||
// if (userDetailsDTO.getProfessionalIdentity().equals(CustomerProfessionalIdentityType.CIVIL_SERVANT.getCode())) {
|
||||
// result = true;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if (productLimit.getPrivateOwners()){
|
||||
// if (userDetailsDTO.getProfessionalIdentity().equals(CustomerProfessionalIdentityType.PRIVATE_OWNERS.getCode())) {
|
||||
// result = true;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if (productLimit.getSmallPrivateBusiness()){
|
||||
// if (userDetailsDTO.getProfessionalIdentity().equals(CustomerProfessionalIdentityType.SMALL_PRIVATE_BUSINESS.getCode())) {
|
||||
// result = true;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if (productLimit.getOtherOccupations()){
|
||||
// if (userDetailsDTO.getProfessionalIdentity().equals(CustomerProfessionalIdentityType.OTHER_OCCUPATIONS.getCode())) {
|
||||
// result = true;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// //条件为 满足一个即可, 恰巧现在就有满足的, 则返回true(通过)
|
||||
// if (openOne && result) {
|
||||
// log.info("资质匹配筛选, 配置[满足其一]-职业:{}, 匹配通过, 结束匹配, 用户id-渠道id-渠道名称-产品id:{}", userDetailsDTO.getProfessionalIdentity() + "-" + infoByCode, userInfo);
|
||||
// return result;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// //条件为 满足全部, 恰巧现在这个不满足, 则返回false(不通过)
|
||||
// if (openAll && !result) {
|
||||
// log.info("资质匹配筛选, 配置[满足所有]-职业:{}, 匹配不通过, 结束匹配, 用户id-渠道id-渠道名称-产品id:{}", userDetailsDTO.getProfessionalIdentity() + "-" + infoByCode, userInfo);
|
||||
// return false;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// //学历 字典映射 1: "初中及以下,2: "高中",3: "中专",4: "大专",5: "本科",6: "研究生及以上"
|
||||
// if (productLimit.getJuniorMiddleSchool() ||
|
||||
// productLimit.getSeniorMiddleSchool() ||
|
||||
// productLimit.getMiddleSchool() ||
|
||||
// productLimit.getCollege() ||
|
||||
// productLimit.getUndergraduate() ||
|
||||
// productLimit.getPostgraduate()) {
|
||||
//
|
||||
// if (openAll && Objects.isNull(userDetailsDTO.getEducation())){
|
||||
// log.info("资质匹配筛选, 配置[满足所有]-学历为空, 匹配不通过, 结束匹配, 用户id-渠道id-渠道名称-产品id:{}", userInfo);
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// //判断结果置默认
|
||||
// result = false;
|
||||
// String infoByCode = getEducationByCode(userDetailsDTO.getEducation());
|
||||
// if (Objects.nonNull(userDetailsDTO.getEducation())) {
|
||||
// if (productLimit.getJuniorMiddleSchool() && userDetailsDTO.getEducation() == 1) { //初中
|
||||
// result = true;
|
||||
// }
|
||||
//
|
||||
// if (productLimit.getSeniorMiddleSchool() && userDetailsDTO.getEducation() == 2) { //高中
|
||||
// result = true;
|
||||
// }
|
||||
//
|
||||
// if (productLimit.getMiddleSchool() && userDetailsDTO.getEducation() == 3) { //中专
|
||||
// result = true;
|
||||
// }
|
||||
//
|
||||
// if (productLimit.getCollege() && userDetailsDTO.getEducation() == 4) { //大专
|
||||
// result = true;
|
||||
// }
|
||||
//
|
||||
// if (productLimit.getUndergraduate() && userDetailsDTO.getEducation() == 5) { //本科
|
||||
// result = true;
|
||||
// }
|
||||
//
|
||||
// if (productLimit.getPostgraduate() && userDetailsDTO.getEducation() == 6) { //研究生
|
||||
// result = true;
|
||||
// }
|
||||
//
|
||||
// //条件为 满足一个即可, 恰巧现在就有满足的, 则返回true(通过)
|
||||
// if (openOne && result) {
|
||||
// log.info("资质匹配筛选, 配置[满足其一]-学历:{}, 匹配通过, 结束匹配, 用户id-渠道id-渠道名称-产品id:{}", userDetailsDTO.getEducation() + "-" + infoByCode, userInfo);
|
||||
// return result;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// //条件为 满足全部, 恰巧现在这个不满足, 则返回false(不通过)
|
||||
// if (openAll && !result) {
|
||||
// log.info("资质匹配筛选, 配置[满足所有]-学历:{}, 匹配不通过, 结束匹配, 用户id-渠道id-渠道名称-产品id:{}", userDetailsDTO.getEducation() + "-" + infoByCode, userInfo);
|
||||
// return false;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// //白条可用额度 字典映射 1: 无额度,2: 2000以下,3: 2000-10000,4: 大于10000
|
||||
// if (productLimit.getBaiTiaoLevelOne() ||
|
||||
// productLimit.getBaiTiaoLevelTwo() ||
|
||||
// productLimit.getBaiTiaoLevelThree()) {
|
||||
//
|
||||
// if (openAll && Objects.isNull(userDetailsDTO.getBaiTiaoQuota())){
|
||||
// log.info("资质匹配筛选, 配置[满足所有]-白条为空, 匹配不通过, 结束匹配, 用户id-渠道id-渠道名称-产品id:{}", userInfo);
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// //判断结果置默认
|
||||
// result = false;
|
||||
// String infoByCode = getBaiTiaoByCode(userDetailsDTO.getBaiTiaoQuota());
|
||||
// if (Objects.nonNull(userDetailsDTO.getBaiTiaoQuota())) {
|
||||
// if (productLimit.getBaiTiaoLevelOne() && userDetailsDTO.getBaiTiaoQuota() == 2) { //2000以下
|
||||
// result = true;
|
||||
// }
|
||||
//
|
||||
// if (productLimit.getBaiTiaoLevelTwo() && userDetailsDTO.getBaiTiaoQuota() == 3) { //2000-10000
|
||||
// result = true;
|
||||
// }
|
||||
//
|
||||
// if (productLimit.getBaiTiaoLevelThree() && userDetailsDTO.getBaiTiaoQuota() == 4) { //大于10000
|
||||
// result = true;
|
||||
// }
|
||||
//
|
||||
// //条件为 满足一个即可, 恰巧现在就有满足的, 则返回true(通过)
|
||||
// if (openOne && result) {
|
||||
// log.info("资质匹配筛选, 配置[满足其一]-白条:{}, 匹配通过, 结束匹配, 用户id-渠道id-渠道名称-产品id:{}", userDetailsDTO.getBaiTiaoQuota() + "-" + infoByCode, userInfo);
|
||||
// return result;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// //条件为 满足全部, 恰巧现在这个不满足, 则返回false(不通过)
|
||||
// if (openAll && !result) {
|
||||
// log.info("资质匹配筛选, 配置[满足所有]-白条:{}, 匹配不通过, 结束匹配, 用户id-渠道id-渠道名称-产品id:{}", userDetailsDTO.getBaiTiaoQuota() + "-" + infoByCode, userInfo);
|
||||
// return false;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// //花呗可用额度 字典映射 1: 无额度,2: 2000以下,3: 2000-10000,4: 大于10000
|
||||
// if (productLimit.getHuaBeiLevelOne() ||
|
||||
// productLimit.getHuaBeiLevelTwo() ||
|
||||
// productLimit.getHuaBeiLevelThree()) {
|
||||
//
|
||||
// if (openAll && Objects.isNull(userDetailsDTO.getHuaBeiQuota())){
|
||||
// log.info("资质匹配筛选, 配置[满足所有]-花呗为空, 匹配不通过, 结束匹配, 用户id-渠道id-渠道名称-产品id:{}", userInfo);
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// //判断结果置默认
|
||||
// result = false;
|
||||
// String infoByCode = getBaiTiaoByCode(userDetailsDTO.getHuaBeiQuota());
|
||||
// if (Objects.nonNull(userDetailsDTO.getHuaBeiQuota())) {
|
||||
// if (productLimit.getHuaBeiLevelOne() && userDetailsDTO.getHuaBeiQuota() == 2) { //2000以下
|
||||
// result = true;
|
||||
// }
|
||||
//
|
||||
// if (productLimit.getHuaBeiLevelTwo() && userDetailsDTO.getHuaBeiQuota() == 3) { //2000-10000
|
||||
// result = true;
|
||||
// }
|
||||
//
|
||||
// if (productLimit.getHuaBeiLevelThree() && userDetailsDTO.getHuaBeiQuota() == 4) { //大于10000
|
||||
// result = true;
|
||||
// }
|
||||
//
|
||||
// //条件为 满足一个即可, 恰巧现在就有满足的, 则返回true(通过)
|
||||
// if (openOne && result) {
|
||||
// log.info("资质匹配筛选, 配置[满足其一]-花呗:{}, 匹配通过, 结束匹配, 用户id-渠道id-渠道名称-产品id:{}", userDetailsDTO.getHuaBeiQuota() + "-" + infoByCode, userInfo);
|
||||
// return result;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// //条件为 满足全部, 恰巧现在这个不满足, 则返回false(不通过)
|
||||
// if (openAll && !result) {
|
||||
// log.info("资质匹配筛选, 配置[满足所有]-花呗:{}, 匹配不通过, 结束匹配, 用户id-渠道id-渠道名称-产品id:{}", userDetailsDTO.getHuaBeiQuota() + "-" + infoByCode, userInfo);
|
||||
// return false;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// //满足其一, 但结果为false, 则不通过
|
||||
// if (openOne && !result){
|
||||
//// log.info("资质匹配筛选, 配置[满足其一]-未匹配成功, 匹配不通过, 结束匹配, 用户id-渠道id-渠道名称-产品id:{}", userInfo);
|
||||
// return result;
|
||||
// }
|
||||
//
|
||||
// if (openAll && result){
|
||||
// log.info("资质匹配筛选, 配置[满足所有]-匹配成功, 匹配通过, 结束匹配, 用户id-渠道id-渠道名称-产品id:{}", userInfo);
|
||||
// return result;
|
||||
// }
|
||||
//
|
||||
// log.info("资质匹配筛选, 此行日志我觉得不会输出, 用户id-渠道id-渠道名称-产品id:{}", userInfo);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,6 +129,17 @@ public class BaseController
|
||||
return rows > 0 ? AjaxResult.success() : AjaxResult.error();
|
||||
}
|
||||
|
||||
/**
|
||||
* 响应返回结果
|
||||
*
|
||||
* @param rows 影响行数
|
||||
* @return 操作结果
|
||||
*/
|
||||
protected AjaxResult toAjax(Long rows)
|
||||
{
|
||||
return rows > 0 ? AjaxResult.success() : AjaxResult.error();
|
||||
}
|
||||
|
||||
/**
|
||||
* 响应返回结果
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user