Merge remote-tracking branch 'origin/es' into es_release_0.1
# Conflicts: # src/main/java/com/sqx/modules/app/entity/UserEntity.java # src/main/java/com/sqx/modules/app/entity/UserInfo.java # src/main/java/com/sqx/modules/app/entity/UserMoneyDetails.java # src/main/java/com/sqx/modules/app/service/impl/UserServiceImpl.java # src/main/java/com/sqx/modules/course/entity/CourseCollect.java # src/main/java/com/sqx/modules/course/entity/CourseUser.java # src/main/java/com/sqx/modules/discSpinning/entity/DiscSpinningRecord.java # src/main/java/com/sqx/modules/pay/controller/app/WuyouController.java # src/main/java/com/sqx/modules/pay/entity/CashOut.java # src/main/java/com/sqx/modules/pay/entity/PayDetails.java # src/main/java/com/sqx/modules/taskCenter/entity/TaskCenterRecord.java # src/main/java/com/sqx/modules/userSign/entity/UserSignRecord.java # src/main/resources/application-dev.yml # src/main/resources/application.yml
This commit is contained in:
commit
f27ca3228c
30
pom.xml
30
pom.xml
|
|
@ -245,6 +245,16 @@
|
|||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.elasticsearch.client</groupId>
|
||||
<artifactId>elasticsearch-rest-high-level-client</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.elasticsearch</groupId>
|
||||
<artifactId>elasticsearch</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
|
@ -497,11 +507,21 @@
|
|||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<!--<dependency>-->
|
||||
<!--<groupId>com.baidu.aip</groupId>-->
|
||||
<!-- <artifactId>java-sdk</artifactId>-->
|
||||
<!-- <version>4.11.3</version>-->
|
||||
<!--</dependency>-->
|
||||
<dependency>
|
||||
<groupId>org.elasticsearch.client</groupId>
|
||||
<artifactId>elasticsearch-rest-high-level-client</artifactId>
|
||||
<version>7.14.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.elasticsearch</groupId>
|
||||
<artifactId>elasticsearch</artifactId>
|
||||
<version>7.14.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.dromara.easy-es</groupId>
|
||||
<artifactId>easy-es-boot-starter</artifactId>
|
||||
<version>2.0.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
|
|
|||
|
|
@ -1,18 +1,17 @@
|
|||
package com.sqx;
|
||||
|
||||
import org.dromara.easyes.starter.register.EsMapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cache.annotation.EnableCaching;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author GYJ
|
||||
*/
|
||||
@EnableCaching
|
||||
@EnableScheduling
|
||||
@EsMapperScan("com.sqx.modules.es.mapper")
|
||||
@SpringBootApplication
|
||||
public class SqxApplication {
|
||||
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ public class ShiroConfig {
|
|||
shiroFilter.setFilters(filters);
|
||||
|
||||
Map<String, String> filterMap = new LinkedHashMap<>();
|
||||
filterMap.put("/es/**", "anon");
|
||||
filterMap.put("/uniCallBack/**", "anon");
|
||||
filterMap.put("/course/synCourse", "anon");
|
||||
filterMap.put("/app/**", "anon");
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ import java.math.BigDecimal;
|
|||
|
||||
/**
|
||||
* 用户
|
||||
*
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("用户")
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.*;
|
|||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@ import io.swagger.annotations.ApiModel;
|
|||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import org.dromara.easyes.annotation.IndexId;
|
||||
import org.dromara.easyes.annotation.IndexName;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
|
@ -18,6 +20,7 @@ import java.math.BigDecimal;
|
|||
@Data
|
||||
@AllArgsConstructor
|
||||
@TableName("user_money_details")
|
||||
@IndexName(value = "user_money_details", keepGlobalPrefix = true)
|
||||
@ApiModel("钱包详情")
|
||||
public class UserMoneyDetails implements Serializable {
|
||||
/**
|
||||
|
|
@ -26,6 +29,7 @@ public class UserMoneyDetails implements Serializable {
|
|||
@ApiModelProperty("钱包详情id")
|
||||
@TableId(type = IdType.ID_WORKER)
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@IndexId(type = org.dromara.easyes.annotation.rely.IdType.CUSTOMIZE)
|
||||
private Long id;
|
||||
/**
|
||||
* 用户id
|
||||
|
|
@ -121,14 +125,14 @@ public class UserMoneyDetails implements Serializable {
|
|||
* @param sysUserId 系统用户Id tb_sys_user的id
|
||||
* @param byUserId 对应用户Id
|
||||
* @param title 标题
|
||||
* @param classify 1 注册 (上级)2 充值 3 购买 4 提现 5 现金大转盘 6 分享达标 7 任务领取 8 平台操作 9 订单退款 10 渠道推广
|
||||
* @param classify 1 注册 (上级)2 充值 3 购买 4 提现 5 现金大转盘 6 分享达标 7 任务领取 8 平台操作 9 订单退款 10 渠道推广
|
||||
* @param type 类别(1充值2支出)
|
||||
* @param state 状态 1待支付 2已到账 3取消
|
||||
* @param money 金额
|
||||
* @param content 内容描述
|
||||
*/
|
||||
public UserMoneyDetails(Long userId, Long sysUserId, Long byUserId, String title, Integer classify, Integer type,
|
||||
Integer state, BigDecimal money, String content, Integer moneyType,Long sourceId) {
|
||||
Integer state, BigDecimal money, String content, Integer moneyType, Long sourceId) {
|
||||
this.userId = userId;
|
||||
this.sysUserId = sysUserId;
|
||||
this.byUserId = byUserId;
|
||||
|
|
|
|||
|
|
@ -3,8 +3,10 @@ package com.sqx.modules.app.service.impl;
|
|||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.thread.ThreadUtil;
|
||||
import cn.hutool.core.util.IdcardUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
|
@ -15,10 +17,7 @@ import com.aliyuncs.DefaultAcsClient;
|
|||
import com.aliyuncs.IAcsClient;
|
||||
import com.aliyuncs.http.MethodType;
|
||||
import com.aliyuncs.profile.DefaultProfile;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.getui.push.v2.sdk.ApiHelper;
|
||||
import com.getui.push.v2.sdk.GtApiConfiguration;
|
||||
|
|
@ -41,20 +40,13 @@ import com.sqx.common.utils.PageUtils;
|
|||
import com.sqx.common.utils.Result;
|
||||
import com.sqx.modules.app.dao.MsgDao;
|
||||
import com.sqx.modules.app.dao.UserDao;
|
||||
import com.sqx.modules.app.dao.UserVipDao;
|
||||
import com.sqx.modules.app.dto.AuthCertNoDTO;
|
||||
import com.sqx.modules.app.dto.AuthDTO;
|
||||
import com.sqx.modules.app.dto.AuthRespDTO;
|
||||
import com.sqx.modules.app.entity.*;
|
||||
import com.sqx.modules.app.mapper.TbUserBlacklistMapper;
|
||||
import com.sqx.modules.app.response.CourseOrderResponse;
|
||||
import com.sqx.modules.app.service.*;
|
||||
import com.sqx.modules.app.utils.JwtUtils;
|
||||
import com.sqx.modules.app.utils.UserConstantInterface;
|
||||
import com.sqx.modules.common.entity.CommonInfo;
|
||||
import com.sqx.modules.common.service.CommonInfoService;
|
||||
import com.sqx.modules.course.dao.CourseDao;
|
||||
import com.sqx.modules.course.entity.Course;
|
||||
import com.sqx.modules.discSpinning.service.DiscSpinningService;
|
||||
import com.sqx.modules.file.utils.Md5Utils;
|
||||
import com.sqx.modules.invite.service.InviteService;
|
||||
|
|
@ -86,9 +78,11 @@ import weixin.popular.util.JsonUtil;
|
|||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 用户
|
||||
|
|
@ -130,11 +124,13 @@ public class UserServiceImpl extends ServiceImpl<UserDao, UserEntity> implements
|
|||
private final UserInfoService userInfoService;
|
||||
private final UserVipDao userVipDao;
|
||||
private final InviteAchievementService inviteAchievementService;
|
||||
@Resource
|
||||
private CourseDao courseDao;
|
||||
@Resource
|
||||
private EsOrdersMapper esOrdersMapper;
|
||||
|
||||
|
||||
private ReentrantReadWriteLock reentrantReadWriteLock = new ReentrantReadWriteLock(true);
|
||||
@Autowired
|
||||
private CourseDao courseDao;
|
||||
|
||||
public UserServiceImpl(@Lazy AliService aliService, UserInfoService userInfoService, UserVipDao userVipDao, InviteAchievementService inviteAchievementService) {
|
||||
this.aliService = aliService;
|
||||
|
|
@ -1431,22 +1427,41 @@ public class UserServiceImpl extends ServiceImpl<UserDao, UserEntity> implements
|
|||
endTime = DateUtil.format(DateUtil.endOfYear(parse), "yyyy-MM-dd 23:59:59");
|
||||
}
|
||||
|
||||
PageHelper.startPage(page.intValue(), limit.intValue());
|
||||
List<CourseOrderResponse> courseList = courseDao.selectGroupCourseId(startTime, endTime);
|
||||
Set<Long> collect = courseList.stream().map(CourseOrderResponse::getCourseId).collect(Collectors.toSet());
|
||||
if (!collect.isEmpty()) {
|
||||
Map<Long, Course> courseMap = courseDao.selectList(new LambdaQueryWrapper<Course>().in(Course::getCourseId, collect).select(Course::getCourseId, Course::getTitle))
|
||||
.stream().collect(Collectors.toMap(Course::getCourseId, item -> item));
|
||||
courseList.forEach(item -> {
|
||||
Course course = courseMap.get(item.getCourseId());
|
||||
if (course != null) {
|
||||
item.setCoursename(course.getTitle());
|
||||
}
|
||||
});
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
// 改为从es库查询数据
|
||||
LambdaEsQueryWrapper<Orders> wrapper = new LambdaEsQueryWrapper<>();
|
||||
if (sysUserId != null) {
|
||||
wrapper.eq(Orders::getSysUserId, sysUserId);
|
||||
}
|
||||
PageInfo<CourseOrderResponse> pageInfo = new PageInfo<>(courseList);
|
||||
// List<Map<String, Object>> list = baseMapper.queryCourseOrder(type, startTime, endTime, sysUserId);
|
||||
// PageInfo<Map<String, Object>> pageInfo = new PageInfo<>(list);
|
||||
wrapper.ge(Orders::getCreateTime, startTime);
|
||||
wrapper.le(Orders::getCreateTime, endTime);
|
||||
wrapper.eq(Orders::getStatus, 1);
|
||||
wrapper.eq(Orders::getOrdersType, 1);
|
||||
List<Orders> orders = esOrdersMapper.selectList(wrapper);
|
||||
if(CollUtil.isEmpty(orders)){
|
||||
PageInfo<Map<String, Object>> pageInfo = new PageInfo<>(new ArrayList<>());
|
||||
return PageUtils.page(pageInfo, true);
|
||||
}
|
||||
Map<Long, List<Orders>> collect = orders.stream().collect(Collectors.groupingBy(Orders::getCourseId));
|
||||
List<Course> courses = courseDao.selectList(Wrappers.<Course>lambdaQuery().select(Course::getCourseId, Course::getTitle).in(Course::getCourseId, collect.keySet()));
|
||||
Map<Long, String> courseMap = courses.stream().collect(Collectors.toMap(Course::getCourseId, Course::getTitle));
|
||||
collect.forEach((k, v) -> {
|
||||
Long courseId = k;
|
||||
String courseName = courseMap.get(k);
|
||||
BigDecimal courseMoney = v.stream().map(Orders::getPayMoney).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
int courseNum = v.size();
|
||||
Map<String, Object> data = new ConcurrentHashMap();
|
||||
data.put("courseId", courseId);
|
||||
data.put("coursemoney", courseMoney);
|
||||
data.put("coursenum", courseNum);
|
||||
data.put("coursename", courseName);
|
||||
list.add(data);
|
||||
});
|
||||
List<List<Map<String, Object>>> split = CollUtil.split(list, limit.intValue());
|
||||
List<Map<String, Object>> splitList = split.get(page.intValue() - 1);
|
||||
// PageHelper.startPage(page.intValue(), limit.intValue());
|
||||
// List<Map<String, Object>> list = baseMapper.queryCourseOrder(type, startTime, endTime, sysUserId);
|
||||
PageInfo<Map<String, Object>> pageInfo = new PageInfo<>(splitList);
|
||||
|
||||
return PageUtils.page(pageInfo, true);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@ import java.math.BigDecimal;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @description course 短剧
|
||||
* @author fang
|
||||
* @description course 短剧
|
||||
* @date 2021-03-27
|
||||
*/
|
||||
@Data
|
||||
|
|
@ -140,7 +140,7 @@ public class Course implements Serializable {
|
|||
/**
|
||||
* 首页金刚区分类
|
||||
*/
|
||||
private Integer bannerId;
|
||||
private Integer bannerId;
|
||||
|
||||
/**
|
||||
* 是否收费 1是 2免费
|
||||
|
|
@ -154,7 +154,6 @@ public class Course implements Serializable {
|
|||
private List<CourseDetails> listsDetail;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 短剧分类 1短剧 2链接 3文档
|
||||
*/
|
||||
|
|
@ -231,12 +230,12 @@ public class Course implements Serializable {
|
|||
private Integer sort;
|
||||
|
||||
/**
|
||||
*平均单集时长,单位分钟
|
||||
* 平均单集时长,单位分钟
|
||||
*/
|
||||
private Integer duration;
|
||||
|
||||
/**
|
||||
*制作机构
|
||||
* 制作机构
|
||||
*/
|
||||
private String productionOrganisation;
|
||||
|
||||
|
|
@ -266,12 +265,12 @@ public class Course implements Serializable {
|
|||
private String costDistributionUri;
|
||||
|
||||
/**
|
||||
*承诺书
|
||||
* 承诺书
|
||||
*/
|
||||
private String assuranceUri;
|
||||
|
||||
/**
|
||||
*制作成本类型
|
||||
* 制作成本类型
|
||||
* - 10:30万以下
|
||||
* - 20:30~100万
|
||||
* - 30:100万以
|
||||
|
|
@ -294,7 +293,7 @@ public class Course implements Serializable {
|
|||
private String registrationNumber;
|
||||
|
||||
/**
|
||||
* 剧目资质证明文件,当qualification_type=1时必填。请提供网络剧片发行许可证或广电备案系统截图
|
||||
* 剧目资质证明文件,当qualification_type=1时必填。请提供网络剧片发行许可证或广电备案系统截图
|
||||
*/
|
||||
private String qualificationCertificateMaterialId;
|
||||
|
||||
|
|
@ -340,5 +339,6 @@ public class Course implements Serializable {
|
|||
private Integer weekView;
|
||||
private Integer weekPay;
|
||||
|
||||
public Course() {}
|
||||
public Course() {
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
|||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.dromara.easyes.annotation.IndexId;
|
||||
import org.dromara.easyes.annotation.IndexName;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
|
@ -16,6 +18,7 @@ import java.io.Serializable;
|
|||
@Data
|
||||
@Accessors(chain = true)
|
||||
@TableName("course_collect")
|
||||
@IndexName(value = "course_collect", keepGlobalPrefix = true)
|
||||
public class CourseCollect implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
|
@ -25,6 +28,7 @@ public class CourseCollect implements Serializable {
|
|||
* 收藏id
|
||||
*/
|
||||
@TableId(type = IdType.ID_WORKER)
|
||||
@IndexId(type= org.dromara.easyes.annotation.rely.IdType.CUSTOMIZE)
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long courseCollectId;
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.annotation.*;
|
|||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
import org.dromara.easyes.annotation.IndexId;
|
||||
import org.dromara.easyes.annotation.IndexName;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
|
@ -14,6 +16,7 @@ import java.io.Serializable;
|
|||
*/
|
||||
@Data
|
||||
@TableName("course_user")
|
||||
@IndexName(value = "course_user", keepGlobalPrefix = true)
|
||||
public class CourseUser implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
|
@ -23,6 +26,7 @@ public class CourseUser implements Serializable {
|
|||
* 我的短剧id
|
||||
*/
|
||||
@TableId(type = IdType.ID_WORKER)
|
||||
@IndexId(type= org.dromara.easyes.annotation.rely.IdType.CUSTOMIZE)
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long courseUserId;
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.extension.activerecord.Model;
|
|||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
import org.dromara.easyes.annotation.IndexId;
|
||||
import org.dromara.easyes.annotation.IndexName;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
|
@ -16,9 +18,11 @@ import java.math.BigDecimal;
|
|||
*/
|
||||
@Data
|
||||
@TableName("disc_spinning_record")
|
||||
@IndexName(value = "disc_spinning_record", keepGlobalPrefix = true)
|
||||
public class DiscSpinningRecord extends Model<DiscSpinningRecord> {
|
||||
//主键
|
||||
@TableId(type = IdType.ID_WORKER)
|
||||
@IndexId(type= org.dromara.easyes.annotation.rely.IdType.CUSTOMIZE)
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,35 @@
|
|||
package com.sqx.modules.es.controller;
|
||||
|
||||
import com.sqx.common.utils.Result;
|
||||
import com.sqx.modules.es.service.EsCoreService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 全量同步相关表数据到es
|
||||
*
|
||||
* @author tankaikai
|
||||
* @since 2025-01-02 20:33
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping(value = "/es/core")
|
||||
public class EsCoreController {
|
||||
@Autowired
|
||||
private EsCoreService esCoreService;
|
||||
|
||||
@ApiOperation("同步")
|
||||
@PostMapping("/sync")
|
||||
public Result sync(@ApiIgnore @RequestParam Map<String, Object> params) {
|
||||
esCoreService.sync();
|
||||
return Result.success();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
package com.sqx.modules.es.mapper;
|
||||
|
||||
import com.sqx.modules.pay.entity.CashOut;
|
||||
import org.dromara.easyes.core.kernel.BaseEsMapper;
|
||||
|
||||
/**
|
||||
* @author tankaikai
|
||||
* @since 2025-01-06 9:40
|
||||
*/
|
||||
public interface EsCashOutMapper extends BaseEsMapper<CashOut> {
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
package com.sqx.modules.es.mapper;
|
||||
|
||||
import com.sqx.modules.course.entity.CourseCollect;
|
||||
import org.dromara.easyes.core.kernel.BaseEsMapper;
|
||||
|
||||
/**
|
||||
* @author tankaikai
|
||||
* @since 2025-01-06 9:40
|
||||
*/
|
||||
public interface EsCourseCollectMapper extends BaseEsMapper<CourseCollect> {
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
package com.sqx.modules.es.mapper;
|
||||
|
||||
import com.sqx.modules.course.entity.CourseUser;
|
||||
import org.dromara.easyes.core.kernel.BaseEsMapper;
|
||||
|
||||
/**
|
||||
* @author tankaikai
|
||||
* @since 2025-01-06 9:40
|
||||
*/
|
||||
public interface EsCourseUserMapper extends BaseEsMapper<CourseUser> {
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
package com.sqx.modules.es.mapper;
|
||||
|
||||
import com.sqx.modules.discSpinning.entity.DiscSpinningRecord;
|
||||
import org.dromara.easyes.core.kernel.BaseEsMapper;
|
||||
|
||||
/**
|
||||
* @author tankaikai
|
||||
* @since 2025-01-06 9:40
|
||||
*/
|
||||
public interface EsDiscSpinningRecordMapper extends BaseEsMapper<DiscSpinningRecord> {
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
package com.sqx.modules.es.mapper;
|
||||
|
||||
import com.sqx.modules.orders.entity.Orders;
|
||||
import org.dromara.easyes.core.kernel.BaseEsMapper;
|
||||
|
||||
/**
|
||||
* @author tankaikai
|
||||
* @since 2025-01-02 20:24
|
||||
*/
|
||||
public interface EsOrdersMapper extends BaseEsMapper<Orders> {
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
package com.sqx.modules.es.mapper;
|
||||
|
||||
import com.sqx.modules.pay.entity.PayDetails;
|
||||
import org.dromara.easyes.core.kernel.BaseEsMapper;
|
||||
|
||||
/**
|
||||
* @author tankaikai
|
||||
* @since 2025-01-06 9:40
|
||||
*/
|
||||
public interface EsPayDetailsMapper extends BaseEsMapper<PayDetails> {
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
package com.sqx.modules.es.mapper;
|
||||
|
||||
import com.sqx.modules.taskCenter.entity.TaskCenterRecord;
|
||||
import org.dromara.easyes.core.kernel.BaseEsMapper;
|
||||
|
||||
/**
|
||||
* @author tankaikai
|
||||
* @since 2025-01-08 16:31
|
||||
*/
|
||||
public interface EsTaskCenterRecordMapper extends BaseEsMapper<TaskCenterRecord> {
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
package com.sqx.modules.es.mapper;
|
||||
|
||||
import com.sqx.modules.app.entity.UserMoneyDetails;
|
||||
import org.dromara.easyes.core.kernel.BaseEsMapper;
|
||||
|
||||
/**
|
||||
* @author tankaikai
|
||||
* @since 2025-01-02 20:24
|
||||
*/
|
||||
public interface EsUserMoneyDetailsMapper extends BaseEsMapper<UserMoneyDetails> {
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
package com.sqx.modules.es.service;
|
||||
|
||||
/**
|
||||
* @author tankaikai
|
||||
* @since 2025-01-02 20:27
|
||||
*/
|
||||
public interface EsCoreService {
|
||||
|
||||
void sync();
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.sqx.modules.es.service;
|
||||
|
||||
import com.sqx.modules.orders.entity.Orders;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author tankaikai
|
||||
* @since 2025-01-06 19:30
|
||||
*/
|
||||
public interface EsOrderService {
|
||||
Orders selectById(Serializable id);
|
||||
|
||||
Orders selectOrdersByCourseIdAndUserId(Long userId, Long courseId);
|
||||
|
||||
Orders selectOrderByOrdersNo(String ordersNo);
|
||||
|
||||
Orders selectOrderByTradeNo(String tradeNo);
|
||||
|
||||
Orders selectOrderByOrderIdAndUserId(String orderId, Long userId);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,207 @@
|
|||
package com.sqx.modules.es.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.sqx.modules.app.dao.UserMoneyDetailsDao;
|
||||
import com.sqx.modules.app.entity.UserMoneyDetails;
|
||||
import com.sqx.modules.course.dao.CourseCollectDao;
|
||||
import com.sqx.modules.course.dao.CourseUserDao;
|
||||
import com.sqx.modules.course.entity.CourseCollect;
|
||||
import com.sqx.modules.course.entity.CourseUser;
|
||||
import com.sqx.modules.discSpinning.dao.DiscSpinningRecordDao;
|
||||
import com.sqx.modules.discSpinning.entity.DiscSpinningRecord;
|
||||
import com.sqx.modules.es.mapper.*;
|
||||
import com.sqx.modules.es.service.EsCoreService;
|
||||
import com.sqx.modules.orders.dao.OrdersDao;
|
||||
import com.sqx.modules.orders.entity.Orders;
|
||||
import com.sqx.modules.pay.dao.CashOutDao;
|
||||
import com.sqx.modules.pay.dao.PayDetailsDao;
|
||||
import com.sqx.modules.pay.entity.CashOut;
|
||||
import com.sqx.modules.pay.entity.PayDetails;
|
||||
import com.sqx.modules.taskCenter.dao.TaskCenterRecordDao;
|
||||
import com.sqx.modules.taskCenter.entity.TaskCenterRecord;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
/**
|
||||
* @author tankaikai
|
||||
* @since 2025-01-02 20:27
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class EsCoreServiceImpl implements EsCoreService {
|
||||
|
||||
@Resource
|
||||
private OrdersDao ordersDao;
|
||||
@Resource
|
||||
private CashOutDao cashOutDao;
|
||||
@Resource
|
||||
private CourseCollectDao courseCollectDao;
|
||||
@Resource
|
||||
private CourseUserDao courseUserDao;
|
||||
@Resource
|
||||
private DiscSpinningRecordDao discSpinningRecordDao;
|
||||
@Resource
|
||||
private PayDetailsDao payDetailsDao;
|
||||
@Resource
|
||||
private UserMoneyDetailsDao userMoneyDetailsDao;
|
||||
@Resource
|
||||
private TaskCenterRecordDao taskCenterRecordDao;
|
||||
|
||||
@Resource
|
||||
private EsOrdersMapper esOrdersMapper;
|
||||
|
||||
@Resource
|
||||
private EsCashOutMapper esCashOutMapper;
|
||||
|
||||
@Resource
|
||||
private EsCourseCollectMapper esCourseCollectMapper;
|
||||
|
||||
@Resource
|
||||
private EsCourseUserMapper esCourseUserMapper;
|
||||
@Resource
|
||||
private EsDiscSpinningRecordMapper esDiscSpinningRecordMapper;
|
||||
@Resource
|
||||
private EsPayDetailsMapper esPayDetailsMapper;
|
||||
|
||||
@Resource
|
||||
private EsUserMoneyDetailsMapper esUserMoneyDetailsMapper;
|
||||
@Resource
|
||||
private EsTaskCenterRecordMapper esTaskCenterRecordMapper;
|
||||
|
||||
@Override
|
||||
public void sync() {
|
||||
List<String> list = new ArrayList<>();
|
||||
for (int i = 0; i < 10; i++) {
|
||||
list.add(i + "");
|
||||
}
|
||||
CompletableFuture<Void> future1 = CompletableFuture.runAsync(() -> {
|
||||
// 执行方法1的代码
|
||||
System.out.println("方法1正在执行...");
|
||||
syncUserMoneyDetails(list);
|
||||
});
|
||||
CompletableFuture<Void> future2 = CompletableFuture.runAsync(() -> {
|
||||
// 执行方法2的代码
|
||||
System.out.println("方法2正在执行...");
|
||||
syncOrders(list);
|
||||
});
|
||||
CompletableFuture<Void> future3 = CompletableFuture.runAsync(() -> {
|
||||
// 执行方法3的代码
|
||||
System.out.println("方法3正在执行...");
|
||||
syncPayDetails(list);
|
||||
});
|
||||
CompletableFuture<Void> future4 = CompletableFuture.runAsync(() -> {
|
||||
// 执行方法4的代码
|
||||
System.out.println("方法4正在执行...");
|
||||
syncDiscSpinningRecord(list);
|
||||
});
|
||||
CompletableFuture<Void> future5 = CompletableFuture.runAsync(() -> {
|
||||
// 执行方法6的代码
|
||||
System.out.println("方法5正在执行...");
|
||||
syncCashOut(list);
|
||||
});
|
||||
CompletableFuture<Void> future6 = CompletableFuture.runAsync(() -> {
|
||||
// 执行方法6的代码
|
||||
System.out.println("方法6正在执行...");
|
||||
syncCourseCollect(list);
|
||||
});
|
||||
CompletableFuture<Void> future7 = CompletableFuture.runAsync(() -> {
|
||||
// 执行方法7的代码
|
||||
System.out.println("方法7正在执行...");
|
||||
syncCourseUser(list);
|
||||
});
|
||||
CompletableFuture<Void> future8 = CompletableFuture.runAsync(() -> {
|
||||
// 执行方法8的代码
|
||||
System.out.println("方法8正在执行...");
|
||||
syncTaskCenterRecord(list);
|
||||
});
|
||||
// 等待多个任务完成
|
||||
CompletableFuture.allOf(future1, future2, future3, future4, future5, future6, future7).join();
|
||||
System.out.println("所有方法已并行执行完毕。");
|
||||
/*
|
||||
syncUserMoneyDetails(list);
|
||||
syncOrders(list);
|
||||
syncCourseCollect(list);
|
||||
syncPayDetails(list);
|
||||
syncDiscSpinningRecord(list);
|
||||
syncCashOut(list);
|
||||
syncCourseUser(list);
|
||||
syncTaskCenterRecord(list);
|
||||
|
||||
System.out.println("所有方法已并行执行完毕。");
|
||||
*/
|
||||
}
|
||||
|
||||
private void syncOrders(List<String> list) {
|
||||
list.parallelStream().forEach(i -> {
|
||||
System.out.println("同步订单数据:" + i);
|
||||
List<Orders> batchList = ordersDao.selectList(Wrappers.<Orders>lambdaQuery().likeLeft(Orders::getOrdersId, i));
|
||||
esOrdersMapper.insertBatch(batchList);
|
||||
});
|
||||
}
|
||||
|
||||
private void syncCashOut(List<String> list) {
|
||||
list.parallelStream().forEach(i -> {
|
||||
System.out.println("同步提现数据:" + i);
|
||||
List<CashOut> batchList = cashOutDao.selectList(Wrappers.<CashOut>lambdaQuery().likeLeft(CashOut::getId, i));
|
||||
if (CollUtil.isNotEmpty(batchList)) {
|
||||
esCashOutMapper.insertBatch(batchList);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private void syncCourseCollect(List<String> list) {
|
||||
list.parallelStream().forEach(i -> {
|
||||
System.out.println("同步短剧收藏数据:" + i);
|
||||
List<CourseCollect> batchList = courseCollectDao.selectList(Wrappers.<CourseCollect>lambdaQuery().likeLeft(CourseCollect::getCourseCollectId, i));
|
||||
esCourseCollectMapper.insertBatch(batchList);
|
||||
});
|
||||
}
|
||||
|
||||
private void syncCourseUser(List<String> list) {
|
||||
list.parallelStream().forEach(i -> {
|
||||
System.out.println("同步短剧用户数据:" + i);
|
||||
List<CourseUser> batchList = courseUserDao.selectList(Wrappers.<CourseUser>lambdaQuery().likeLeft(CourseUser::getCourseUserId, i));
|
||||
esCourseUserMapper.insertBatch(batchList);
|
||||
});
|
||||
}
|
||||
|
||||
private void syncTaskCenterRecord(List<String> list) {
|
||||
list.parallelStream().forEach(i -> {
|
||||
System.out.println("同步任务中心数据:" + i);
|
||||
List<TaskCenterRecord> batchList = taskCenterRecordDao.selectList(Wrappers.<TaskCenterRecord>lambdaQuery().likeLeft(TaskCenterRecord::getId, i));
|
||||
esTaskCenterRecordMapper.insertBatch(batchList);
|
||||
});
|
||||
}
|
||||
|
||||
private void syncDiscSpinningRecord(List<String> list) {
|
||||
list.parallelStream().forEach(i -> {
|
||||
System.out.println("同步抽奖记录数据:" + i);
|
||||
List<DiscSpinningRecord> batchList = discSpinningRecordDao.selectList(Wrappers.<DiscSpinningRecord>lambdaQuery().likeLeft(DiscSpinningRecord::getId, i));
|
||||
esDiscSpinningRecordMapper.insertBatch(batchList);
|
||||
});
|
||||
}
|
||||
|
||||
private void syncPayDetails(List<String> list) {
|
||||
list.parallelStream().forEach(i -> {
|
||||
System.out.println("同步支付详情数据:" + i);
|
||||
List<PayDetails> batchList = payDetailsDao.selectList(Wrappers.<PayDetails>lambdaQuery().likeLeft(PayDetails::getId, i));
|
||||
esPayDetailsMapper.insertBatch(batchList);
|
||||
});
|
||||
}
|
||||
|
||||
private void syncUserMoneyDetails(List<String> list) {
|
||||
list.parallelStream().forEach(i -> {
|
||||
System.out.println("同步用户资金明细数据:" + i);
|
||||
List<UserMoneyDetails> batchList = userMoneyDetailsDao.selectList(Wrappers.<UserMoneyDetails>lambdaQuery().likeLeft(UserMoneyDetails::getId, i));
|
||||
esUserMoneyDetailsMapper.insertBatch(batchList);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,89 @@
|
|||
package com.sqx.modules.es.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.sqx.modules.es.mapper.EsOrdersMapper;
|
||||
import com.sqx.modules.es.service.EsOrderService;
|
||||
import com.sqx.modules.orders.dao.OrdersDao;
|
||||
import com.sqx.modules.orders.entity.Orders;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.easyes.core.conditions.select.LambdaEsQueryWrapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author tankaikai
|
||||
* @since 2025-01-06 19:30
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class EsOrderServiceImpl implements EsOrderService {
|
||||
|
||||
@Resource
|
||||
private OrdersDao ordersDao;
|
||||
|
||||
@Resource
|
||||
private EsOrdersMapper esOrdersMapper;
|
||||
|
||||
@Override
|
||||
public Orders selectById(Serializable id) {
|
||||
Orders orders = esOrdersMapper.selectById(id);
|
||||
if (orders != null) {
|
||||
return orders;
|
||||
}
|
||||
return ordersDao.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Orders selectOrdersByCourseIdAndUserId(Long userId, Long courseId) {
|
||||
LambdaEsQueryWrapper<Orders> wrapper = new LambdaEsQueryWrapper<>();
|
||||
wrapper.eq(Orders::getUserId, userId);
|
||||
wrapper.eq(Orders::getCourseId, courseId);
|
||||
Orders orders = esOrdersMapper.selectOne(wrapper);
|
||||
if (orders != null) {
|
||||
return orders;
|
||||
}
|
||||
return ordersDao.selectOrdersByCourseIdAndUserId(userId, courseId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Orders selectOrderByOrdersNo(String ordersNo) {
|
||||
LambdaEsQueryWrapper<Orders> wrapper = new LambdaEsQueryWrapper<>();
|
||||
wrapper.eq(Orders::getOrdersNo, ordersNo);
|
||||
Orders orders = esOrdersMapper.selectOne(wrapper);
|
||||
if (orders != null) {
|
||||
return orders;
|
||||
}
|
||||
return ordersDao.selectOne(new QueryWrapper<Orders>().eq("orders_no", ordersNo));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Orders selectOrderByTradeNo(String tradeNo) {
|
||||
LambdaEsQueryWrapper<Orders> wrapper = new LambdaEsQueryWrapper<>();
|
||||
wrapper.eq(Orders::getTradeNo, tradeNo);
|
||||
Orders orders = esOrdersMapper.selectOne(wrapper);
|
||||
if (orders != null) {
|
||||
return orders;
|
||||
}
|
||||
return ordersDao.selectOne(new QueryWrapper<Orders>().eq("trade_no", tradeNo));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Orders selectOrderByOrderIdAndUserId(String orderId, Long userId) {
|
||||
LambdaEsQueryWrapper<Orders> wrapper = new LambdaEsQueryWrapper<>();
|
||||
wrapper.eq(Orders::getOrdersNo, orderId);
|
||||
wrapper.eq(Orders::getUserId, userId);
|
||||
wrapper.limit(1);
|
||||
Orders orders = esOrdersMapper.selectOne(wrapper);
|
||||
if (orders != null) {
|
||||
return orders;
|
||||
}
|
||||
QueryWrapper<Orders> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("orders_no", orderId).eq("user_id", userId);
|
||||
queryWrapper.last("limit 1");
|
||||
return ordersDao.selectOne(queryWrapper);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -44,5 +44,6 @@ public interface OrdersDao extends BaseMapper<Orders> {
|
|||
|
||||
|
||||
Integer countOrderNum(Long userId, String time);
|
||||
|
||||
BigDecimal sumPayByCourseId(Long courseId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
|||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.sqx.modules.course.entity.Course;
|
||||
import lombok.Data;
|
||||
import org.dromara.easyes.annotation.IndexId;
|
||||
import org.dromara.easyes.annotation.IndexName;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
|
@ -16,6 +18,7 @@ import java.math.BigDecimal;
|
|||
*/
|
||||
@Data
|
||||
@TableName("orders")
|
||||
@IndexName(value = "orders",keepGlobalPrefix = true)
|
||||
public class Orders implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
|
@ -25,6 +28,7 @@ public class Orders implements Serializable {
|
|||
*/
|
||||
@TableId(type = IdType.ID_WORKER)
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@IndexId(type= org.dromara.easyes.annotation.rely.IdType.CUSTOMIZE)
|
||||
private Long ordersId;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ import com.sqx.modules.course.entity.CourseDetails;
|
|||
import com.sqx.modules.course.entity.CourseUser;
|
||||
import com.sqx.modules.course.service.CourseDetailsService;
|
||||
import com.sqx.modules.course.service.CourseUserService;
|
||||
import com.sqx.modules.es.service.EsOrderService;
|
||||
import com.sqx.modules.invite.service.InviteMoneyService;
|
||||
import com.sqx.modules.invite.service.InviteService;
|
||||
import com.sqx.modules.orders.dao.OrdersDao;
|
||||
|
|
@ -44,6 +45,7 @@ import org.apache.commons.lang.StringUtils;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
|
|
@ -86,6 +88,8 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersDao, Orders> implements
|
|||
private DyService dyService;
|
||||
@Autowired
|
||||
private CourseDetailsDao courseDetailsDao;
|
||||
@Resource
|
||||
private EsOrderService esOrderService;
|
||||
|
||||
@Autowired
|
||||
private SysUserDao sysUserDao;
|
||||
|
|
@ -95,7 +99,7 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersDao, Orders> implements
|
|||
|
||||
@Override
|
||||
public Orders selectOrdersByCourseIdAndUserId(Long userId, Long courseId) {
|
||||
return baseMapper.selectOrdersByCourseIdAndUserId(userId, courseId);
|
||||
return esOrderService.selectOrdersByCourseIdAndUserId(userId,courseId);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -497,7 +501,7 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersDao, Orders> implements
|
|||
public Result payMoney(Long ordersId) {
|
||||
reentrantReadWriteLock.writeLock().lock();
|
||||
try {
|
||||
Orders orders = baseMapper.selectById(ordersId);
|
||||
Orders orders = esOrderService.selectById(ordersId);
|
||||
if (orders == null || !orders.getStatus().equals(0)) {
|
||||
return Result.error("订单错误,请刷新后重试!");
|
||||
}
|
||||
|
|
@ -582,7 +586,7 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersDao, Orders> implements
|
|||
|
||||
@Override
|
||||
public Result refundOrder(Long ordersId, String refundContent) {
|
||||
Orders bean = baseMapper.selectById(ordersId);
|
||||
Orders bean = esOrderService.selectById(ordersId);
|
||||
if (!bean.getStatus().equals(1)) {
|
||||
return Result.error("订单未支付或已退款!");
|
||||
}
|
||||
|
|
@ -714,17 +718,17 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersDao, Orders> implements
|
|||
|
||||
@Override
|
||||
public Orders selectOrderById(Long orderId) {
|
||||
return baseMapper.selectById(orderId);
|
||||
return esOrderService.selectById(orderId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Orders selectOrderByOrdersNo(String ordersNo) {
|
||||
return baseMapper.selectOne(new QueryWrapper<Orders>().eq("orders_no", ordersNo));
|
||||
return esOrderService.selectOrderByOrdersNo(ordersNo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Orders selectOrderByTradeNo(String tradeNo) {
|
||||
return baseMapper.selectOne(new QueryWrapper<Orders>().eq("trade_no", tradeNo));
|
||||
return esOrderService.selectOrderByTradeNo(tradeNo);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ import com.sqx.modules.app.service.UserMoneyService;
|
|||
import com.sqx.modules.app.service.UserService;
|
||||
import com.sqx.modules.common.entity.CommonInfo;
|
||||
import com.sqx.modules.common.service.CommonInfoService;
|
||||
import com.sqx.modules.es.service.EsOrderService;
|
||||
import com.sqx.modules.invite.service.InviteService;
|
||||
import com.sqx.modules.orders.dao.OrdersDao;
|
||||
import com.sqx.modules.orders.entity.Orders;
|
||||
|
|
@ -42,6 +43,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.math.BigDecimal;
|
||||
|
|
@ -78,6 +80,8 @@ public class AliPayController {
|
|||
private UserMoneyService userMoneyService;
|
||||
@Autowired
|
||||
private PayClassifyService payClassifyService;
|
||||
@Resource
|
||||
private EsOrderService esOrderService;
|
||||
|
||||
private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
|
||||
|
|
@ -193,7 +197,7 @@ public class AliPayController {
|
|||
String name = one3.getValue();
|
||||
String url = one.getValue() + "/sqx_fast/app/aliPay/notifyApp";
|
||||
log.info("回调地址:" + url);
|
||||
Orders orders = ordersDao.selectById(orderId);
|
||||
Orders orders = esOrderService.selectById(orderId);
|
||||
PayDetails payDetails = payDetailsDao.selectByOrderId(orders.getOrdersNo());
|
||||
if (payDetails == null) {
|
||||
payDetails = new PayDetails();
|
||||
|
|
|
|||
|
|
@ -7,9 +7,11 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.sqx.common.annotation.Debounce;
|
||||
import com.sqx.common.utils.Result;
|
||||
import com.sqx.modules.app.entity.UserMoneyDetails;
|
||||
import com.sqx.modules.app.service.UserMoneyDetailsService;
|
||||
import com.sqx.modules.app.service.UserMoneyService;
|
||||
import com.sqx.modules.app.service.UserService;
|
||||
import com.sqx.modules.es.service.EsOrderService;
|
||||
import com.sqx.modules.job.task.TempOrdersTask;
|
||||
import com.sqx.modules.orders.entity.Orders;
|
||||
import com.sqx.modules.orders.service.OrdersService;
|
||||
|
|
@ -29,6 +31,7 @@ import io.swagger.annotations.Api;
|
|||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
|
@ -61,6 +64,9 @@ public class WuyouController {
|
|||
@Resource
|
||||
private WuyouCallbackService wuyouCallbackService;
|
||||
|
||||
@Resource
|
||||
private EsOrderService esOrderService;
|
||||
|
||||
WuyouController(OrdersService ordersService, PayDetailsDao payDetailsDao, CashOutDao cashOutDao, UserMoneyService userMoneyService,
|
||||
UserMoneyDetailsService userMoneyDetailsService, TempOrdersTask ordersTask,
|
||||
WuyouPay wuyouPay, UserService userService, RedisService redisService) {
|
||||
|
|
@ -79,7 +85,7 @@ public class WuyouController {
|
|||
@ApiOperation("支付订单")
|
||||
@GetMapping("/payOrder/{orderId}")
|
||||
public Result payOrder(HttpServletRequest request, @PathVariable("orderId") Long orderId, @RequestParam(value = "payType", required = false) String payType) {
|
||||
Orders order = ordersService.getById(orderId);
|
||||
Orders order = esOrderService.selectById(orderId);
|
||||
if (order == null) {
|
||||
return Result.error("订单不存在");
|
||||
}
|
||||
|
|
@ -133,7 +139,7 @@ public class WuyouController {
|
|||
@ApiOperation("查询订单支付结果")
|
||||
@GetMapping("/queryOrder/{orderId}")
|
||||
public Result queryOrder(HttpServletRequest request, @PathVariable("orderId") Long orderId) {
|
||||
Orders order = ordersService.getById(orderId);
|
||||
Orders order = esOrderService.selectById(orderId);
|
||||
if (order == null) {
|
||||
return Result.error("订单不存在");
|
||||
}
|
||||
|
|
@ -235,10 +241,7 @@ public class WuyouController {
|
|||
return "success";
|
||||
}
|
||||
|
||||
QueryWrapper<Orders> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("orders_no", payDetails.getOrderId()).eq("user_id", payDetails.getUserId());
|
||||
queryWrapper.last("limit 1");
|
||||
Orders order = ordersService.getOne(queryWrapper);
|
||||
Orders order = esOrderService.selectOrderByOrderIdAndUserId(payDetails.getOrderId(), payDetails.getUserId());
|
||||
if (order == null) {
|
||||
log.error("无忧支付回调订单不存在, 参数: {}", JSONObject.toJSONString(notifyDto));
|
||||
return "订单不存在";
|
||||
|
|
|
|||
|
|
@ -7,17 +7,21 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
|||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
import org.dromara.easyes.annotation.IndexId;
|
||||
import org.dromara.easyes.annotation.IndexName;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 提现申请
|
||||
*
|
||||
* @author fang
|
||||
* @date 2020/7/8
|
||||
*/
|
||||
@Data
|
||||
@TableName("cash_out")
|
||||
@IndexName(value = "cash_out", keepGlobalPrefix = true)
|
||||
public class CashOut implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
|
@ -26,8 +30,9 @@ public class CashOut implements Serializable {
|
|||
* 申请提现id
|
||||
*/
|
||||
@TableId(type = IdType.ID_WORKER)
|
||||
@IndexId(type = org.dromara.easyes.annotation.rely.IdType.CUSTOMIZE)
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private long id;
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 申请时间
|
||||
|
|
@ -150,8 +155,4 @@ public class CashOut implements Serializable {
|
|||
private Long verifyCount;
|
||||
|
||||
private Integer withdrawType;
|
||||
|
||||
public void setZhifubao(String zhifubao) {
|
||||
this.zhifubao = zhifubao;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,16 +7,20 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
|||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
import org.dromara.easyes.annotation.IndexId;
|
||||
import org.dromara.easyes.annotation.IndexName;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 充值记录
|
||||
* 充值记录
|
||||
*
|
||||
* @author fang 2020-05-14
|
||||
*/
|
||||
@Data
|
||||
@TableName("pay_details")
|
||||
@IndexName(value = "pay_details", keepGlobalPrefix = true)
|
||||
public class PayDetails implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
|
@ -25,6 +29,7 @@ public class PayDetails implements Serializable {
|
|||
* 充值记录id
|
||||
*/
|
||||
@TableId(type = IdType.ID_WORKER)
|
||||
@IndexId(type = org.dromara.easyes.annotation.rely.IdType.CUSTOMIZE)
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import com.sqx.modules.app.service.UserService;
|
|||
import com.sqx.modules.common.entity.CommonInfo;
|
||||
import com.sqx.modules.common.service.CommonInfoService;
|
||||
import com.sqx.modules.course.service.CourseService;
|
||||
import com.sqx.modules.es.service.EsOrderService;
|
||||
import com.sqx.modules.invite.service.InviteService;
|
||||
import com.sqx.modules.orders.entity.Orders;
|
||||
import com.sqx.modules.orders.service.OrdersService;
|
||||
|
|
@ -30,6 +31,7 @@ import org.apache.commons.lang3.StringUtils;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
|
@ -65,6 +67,8 @@ public class KsServiceImpl implements KsService {
|
|||
private CourseService courseService;
|
||||
@Autowired
|
||||
private PayClassifyService payClassifyService;
|
||||
@Resource
|
||||
private EsOrderService esOrderService;
|
||||
|
||||
private SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");;
|
||||
|
||||
|
|
@ -184,7 +188,7 @@ public class KsServiceImpl implements KsService {
|
|||
String format = sdf.format(new Date());
|
||||
payDetailsDao.updateState(payDetails.getId(),1,format,"","");
|
||||
if(payDetails.getType()==1){
|
||||
Orders orders = ordersService.selectOrderByOrdersNo(payDetails.getOrderId());
|
||||
Orders orders = esOrderService.selectOrderByOrdersNo(payDetails.getOrderId());
|
||||
orders.setPayWay(8);
|
||||
orders.setStatus(1);
|
||||
orders.setPayTime(DateUtils.format(new Date()));
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@ import com.baomidou.mybatisplus.extension.activerecord.Model;
|
|||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.dromara.easyes.annotation.IndexId;
|
||||
import org.dromara.easyes.annotation.IndexName;
|
||||
|
||||
/**
|
||||
* 任务领取记录(TaskCenterRecord)表实体类
|
||||
|
|
@ -16,9 +18,12 @@ import lombok.Data;
|
|||
*/
|
||||
@Data
|
||||
@TableName("task_center_record")
|
||||
@IndexName(value = "task_center_record", keepGlobalPrefix = true)
|
||||
@ApiModel(value = "任务领取记录 实体类")
|
||||
public class TaskCenterRecord extends Model<TaskCenterRecord> {
|
||||
|
||||
@TableId(type = IdType.ID_WORKER)
|
||||
@IndexId(type= org.dromara.easyes.annotation.rely.IdType.CUSTOMIZE)
|
||||
@ApiModelProperty(value = "id",hidden = true)
|
||||
private Long id;
|
||||
@ApiModelProperty(value = "用户id",hidden = true)
|
||||
|
|
|
|||
|
|
@ -203,4 +203,3 @@ spring:
|
|||
slaveDataSourceNames:
|
||||
# - duanju-4
|
||||
- duanju-slave-4
|
||||
|
||||
|
|
|
|||
|
|
@ -171,3 +171,21 @@ sqx:
|
|||
header: token
|
||||
uni:
|
||||
adSecret: 122e4ff1edc66dcf8761f7f7ffc81e0f8773cbfafb58aed29c72fbd092c77315
|
||||
|
||||
easy-es:
|
||||
banner: false
|
||||
address: 47.122.74.162:9200
|
||||
username: elastic #es用户名,若无则删去此行配置
|
||||
password: rer8cpBAvEWs #es密码,若无则删去此行配置
|
||||
keep-alive-millis: 30000 # 心跳策略时间 单位:ms
|
||||
connect-timeout: 15000 # 连接超时时间 单位:ms
|
||||
socket-timeout: 600000 # 通信超时时间 单位:ms
|
||||
request-timeout: 15000 # 请求超时时间 单位:ms
|
||||
connection-request-timeout: 15000 # 连接请求超时时间 单位:ms
|
||||
global-config:
|
||||
process-index-mode: manual #索引处理模式,smoothly:平滑模式, not_smoothly:非平滑模式, manual:手动模式,,默认开启此模式
|
||||
print-dsl: true
|
||||
async-process-index-blocking: true # 异步处理索引是否阻塞主线程 默认阻塞 数据量过大时调整为非阻塞异步进行 项目启动更快
|
||||
db-config:
|
||||
map-underscore-to-camel-case: true # 是否开启下划线转驼峰 默认为false
|
||||
index-prefix: ${spring.profiles.active}_ # 索引前缀,可用于区分环境 默认为空 用法和MP的tablePrefix一样的作用和用法
|
||||
|
|
@ -328,5 +328,4 @@
|
|||
and course_id = #{courseId}
|
||||
group by course_id
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,61 @@
|
|||
package com.sqx.es;
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.json.JSONArray;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author tankaikai
|
||||
* @since 2025-01-08 13:33
|
||||
*/
|
||||
public class SyncDataToEsScriptGenTest {
|
||||
|
||||
public static void main(String[] args) {
|
||||
build("dev");
|
||||
}
|
||||
|
||||
private static void build(String env) {
|
||||
String absolutePath = FileUtil.getAbsolutePath("", SyncDataToEsScriptGenTest.class);
|
||||
String basePath = FileUtil.getParent(absolutePath, 5) + "/src/test/java/com/sqx/es";
|
||||
String configPath = basePath + "/" + env + "-config-data.json";
|
||||
String config = FileUtil.readUtf8String(configPath);
|
||||
System.out.println(config);
|
||||
String outPath = basePath + "/" + "out";
|
||||
FileUtil.del(outPath);
|
||||
FileUtil.mkdir(outPath);
|
||||
String templatePath = basePath + "/" + "template.yml";
|
||||
String template = FileUtil.readUtf8String(templatePath);
|
||||
JSONObject data = JSONUtil.parseObj(config);
|
||||
|
||||
JSONArray dbList = data.getJSONArray("dbList");
|
||||
JSONArray tableList = data.getJSONArray("tableList");
|
||||
Set<String> dbSet = dbList.stream().map(obj -> Convert.toStr(obj)).collect(Collectors.toSet());
|
||||
for (String dbName : dbSet) {
|
||||
for (int i = 0; i < tableList.size(); i++) {
|
||||
Map<String, String> params = new HashMap();
|
||||
params.put("env", data.getStr("env"));
|
||||
params.put("dbName", dbName);
|
||||
JSONObject table = tableList.getJSONObject(i);
|
||||
String tableName = table.getStr("tableName");
|
||||
params.put("tableName", tableName);
|
||||
params.put("mappingSql", table.getStr("mappingSql"));
|
||||
String content = StrUtil.format(template, params);
|
||||
String fileName = tableName + "@" + env + "." + dbName + ".yml";
|
||||
FileUtil.writeUtf8String(content, new File(outPath + "/" + fileName));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
StrUtil.format(template, config);
|
||||
//String template = fileReader.readString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
{
|
||||
"env": "dev",
|
||||
"dbList": [
|
||||
"duanju-0",
|
||||
"duanju-1",
|
||||
"duanju-2",
|
||||
"duanju-3",
|
||||
"duanju-4"
|
||||
],
|
||||
"tableList": [
|
||||
{
|
||||
"tableName": "user_money_details",
|
||||
"mappingSql": "select a.id as _id, a.user_id, a.sys_user_id, a.by_user_id, a.title, a.classify, a.type, a.state, a.money, a.content, a.money_type, a.create_time, a.source_id from user_money_details a"
|
||||
},
|
||||
{
|
||||
"tableName": "orders",
|
||||
"mappingSql": "select a.orders_id as _id, a.orders_no, a.trade_no, a.user_id, a.course_id, a.pay_money, a.pay_way, a.status, a.create_time, a.refund_content, a.orders_type, a.vip_name_type, a.course_details_id, a.course_details_ids, a.qd_money, a.sys_user_id, a.one_money, a.one_user_id, a.two_money, a.two_user_id, a.pay_time, a.pay_diamond, a.diamond from orders a"
|
||||
},
|
||||
{
|
||||
"tableName": "course_collect",
|
||||
"mappingSql": "select a.course_collect_id as _id, a.course_id, a.user_id, a.create_time, a.course_details_id, a.classify, a.update_time from course_collect a"
|
||||
},
|
||||
{
|
||||
"tableName": "pay_details",
|
||||
"mappingSql": "select a.id as _id, a.classify, a.trade_no, a.money, a.user_id, a.state, a.create_time, a.pay_time, a.type, a.remark, a.order_id, a.product_id, a.pay_diamond, a.diamond, a.third_order_no from pay_details a"
|
||||
},
|
||||
{
|
||||
"tableName": "disc_spinning_record",
|
||||
"mappingSql": "select a.id as _id, a.user_id, a.source_id, a.img_url, a.name, a.type, a.number, a.target, a.target_id, a.draw_day, a.create_time, a.source from disc_spinning_record a"
|
||||
},
|
||||
{
|
||||
"tableName": "cash_out",
|
||||
"mappingSql": "select a.id as _id, a.create_at, a.is_out, a.money, a.out_at, a.relation_id, a.user_id, a.zhifubao, a.zhifubao_name, a.order_number, a.state, a.refund, a.rate, a.sys_user_id, a.user_type, a.withdraw_type from cash_out a"
|
||||
},
|
||||
{
|
||||
"tableName": "course_user",
|
||||
"mappingSql": "select a.course_user_id as _id, a.course_id, a.order_id, a.user_id, a.create_time, a.update_time, a.course_details_id, a.classify from course_user a"
|
||||
},
|
||||
{
|
||||
"tableName": "task_center_record",
|
||||
"mappingSql": "select a.id as _id, a.user_id, a.task_id, a.source_id, a.name, a.type, a.target_id, a.number, a.create_time, a.update_time from task_center_record a"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
dataSourceKey: dev_duanju-0
|
||||
outerAdapterKey: esKey1
|
||||
destination: dev_sync_data_to_es
|
||||
groupId: g1
|
||||
esMapping:
|
||||
_index: dev_cash_out
|
||||
# _type: doc
|
||||
_id: _id
|
||||
upsert: true
|
||||
# pk: "orders_id"
|
||||
sql: "select a.id as _id, a.create_at, a.is_out, a.money, a.out_at, a.relation_id, a.user_id, a.zhifubao, a.zhifubao_name, a.order_number, a.state, a.refund, a.rate, a.sys_user_id, a.user_type, a.withdraw_type from cash_out a"
|
||||
# objFields:
|
||||
# _labels: array:;
|
||||
# _obj: object
|
||||
# etlCondition: "where 1=1"
|
||||
commitBatch: 3000
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
dataSourceKey: dev_duanju-1
|
||||
outerAdapterKey: esKey1
|
||||
destination: dev_sync_data_to_es
|
||||
groupId: g1
|
||||
esMapping:
|
||||
_index: dev_cash_out
|
||||
# _type: doc
|
||||
_id: _id
|
||||
upsert: true
|
||||
# pk: "orders_id"
|
||||
sql: "select a.id as _id, a.create_at, a.is_out, a.money, a.out_at, a.relation_id, a.user_id, a.zhifubao, a.zhifubao_name, a.order_number, a.state, a.refund, a.rate, a.sys_user_id, a.user_type, a.withdraw_type from cash_out a"
|
||||
# objFields:
|
||||
# _labels: array:;
|
||||
# _obj: object
|
||||
# etlCondition: "where 1=1"
|
||||
commitBatch: 3000
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
dataSourceKey: dev_duanju-2
|
||||
outerAdapterKey: esKey1
|
||||
destination: dev_sync_data_to_es
|
||||
groupId: g1
|
||||
esMapping:
|
||||
_index: dev_cash_out
|
||||
# _type: doc
|
||||
_id: _id
|
||||
upsert: true
|
||||
# pk: "orders_id"
|
||||
sql: "select a.id as _id, a.create_at, a.is_out, a.money, a.out_at, a.relation_id, a.user_id, a.zhifubao, a.zhifubao_name, a.order_number, a.state, a.refund, a.rate, a.sys_user_id, a.user_type, a.withdraw_type from cash_out a"
|
||||
# objFields:
|
||||
# _labels: array:;
|
||||
# _obj: object
|
||||
# etlCondition: "where 1=1"
|
||||
commitBatch: 3000
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
dataSourceKey: dev_duanju-3
|
||||
outerAdapterKey: esKey1
|
||||
destination: dev_sync_data_to_es
|
||||
groupId: g1
|
||||
esMapping:
|
||||
_index: dev_cash_out
|
||||
# _type: doc
|
||||
_id: _id
|
||||
upsert: true
|
||||
# pk: "orders_id"
|
||||
sql: "select a.id as _id, a.create_at, a.is_out, a.money, a.out_at, a.relation_id, a.user_id, a.zhifubao, a.zhifubao_name, a.order_number, a.state, a.refund, a.rate, a.sys_user_id, a.user_type, a.withdraw_type from cash_out a"
|
||||
# objFields:
|
||||
# _labels: array:;
|
||||
# _obj: object
|
||||
# etlCondition: "where 1=1"
|
||||
commitBatch: 3000
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
dataSourceKey: dev_duanju-4
|
||||
outerAdapterKey: esKey1
|
||||
destination: dev_sync_data_to_es
|
||||
groupId: g1
|
||||
esMapping:
|
||||
_index: dev_cash_out
|
||||
# _type: doc
|
||||
_id: _id
|
||||
upsert: true
|
||||
# pk: "orders_id"
|
||||
sql: "select a.id as _id, a.create_at, a.is_out, a.money, a.out_at, a.relation_id, a.user_id, a.zhifubao, a.zhifubao_name, a.order_number, a.state, a.refund, a.rate, a.sys_user_id, a.user_type, a.withdraw_type from cash_out a"
|
||||
# objFields:
|
||||
# _labels: array:;
|
||||
# _obj: object
|
||||
# etlCondition: "where 1=1"
|
||||
commitBatch: 3000
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
dataSourceKey: dev_duanju-0
|
||||
outerAdapterKey: esKey1
|
||||
destination: dev_sync_data_to_es
|
||||
groupId: g1
|
||||
esMapping:
|
||||
_index: dev_course_collect
|
||||
# _type: doc
|
||||
_id: _id
|
||||
upsert: true
|
||||
# pk: "orders_id"
|
||||
sql: "select a.course_collect_id as _id, a.course_id, a.user_id, a.create_time, a.course_details_id, a.classify, a.update_time from course_collect a"
|
||||
# objFields:
|
||||
# _labels: array:;
|
||||
# _obj: object
|
||||
# etlCondition: "where 1=1"
|
||||
commitBatch: 3000
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
dataSourceKey: dev_duanju-1
|
||||
outerAdapterKey: esKey1
|
||||
destination: dev_sync_data_to_es
|
||||
groupId: g1
|
||||
esMapping:
|
||||
_index: dev_course_collect
|
||||
# _type: doc
|
||||
_id: _id
|
||||
upsert: true
|
||||
# pk: "orders_id"
|
||||
sql: "select a.course_collect_id as _id, a.course_id, a.user_id, a.create_time, a.course_details_id, a.classify, a.update_time from course_collect a"
|
||||
# objFields:
|
||||
# _labels: array:;
|
||||
# _obj: object
|
||||
# etlCondition: "where 1=1"
|
||||
commitBatch: 3000
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
dataSourceKey: dev_duanju-2
|
||||
outerAdapterKey: esKey1
|
||||
destination: dev_sync_data_to_es
|
||||
groupId: g1
|
||||
esMapping:
|
||||
_index: dev_course_collect
|
||||
# _type: doc
|
||||
_id: _id
|
||||
upsert: true
|
||||
# pk: "orders_id"
|
||||
sql: "select a.course_collect_id as _id, a.course_id, a.user_id, a.create_time, a.course_details_id, a.classify, a.update_time from course_collect a"
|
||||
# objFields:
|
||||
# _labels: array:;
|
||||
# _obj: object
|
||||
# etlCondition: "where 1=1"
|
||||
commitBatch: 3000
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
dataSourceKey: dev_duanju-3
|
||||
outerAdapterKey: esKey1
|
||||
destination: dev_sync_data_to_es
|
||||
groupId: g1
|
||||
esMapping:
|
||||
_index: dev_course_collect
|
||||
# _type: doc
|
||||
_id: _id
|
||||
upsert: true
|
||||
# pk: "orders_id"
|
||||
sql: "select a.course_collect_id as _id, a.course_id, a.user_id, a.create_time, a.course_details_id, a.classify, a.update_time from course_collect a"
|
||||
# objFields:
|
||||
# _labels: array:;
|
||||
# _obj: object
|
||||
# etlCondition: "where 1=1"
|
||||
commitBatch: 3000
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
dataSourceKey: dev_duanju-4
|
||||
outerAdapterKey: esKey1
|
||||
destination: dev_sync_data_to_es
|
||||
groupId: g1
|
||||
esMapping:
|
||||
_index: dev_course_collect
|
||||
# _type: doc
|
||||
_id: _id
|
||||
upsert: true
|
||||
# pk: "orders_id"
|
||||
sql: "select a.course_collect_id as _id, a.course_id, a.user_id, a.create_time, a.course_details_id, a.classify, a.update_time from course_collect a"
|
||||
# objFields:
|
||||
# _labels: array:;
|
||||
# _obj: object
|
||||
# etlCondition: "where 1=1"
|
||||
commitBatch: 3000
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
dataSourceKey: dev_duanju-0
|
||||
outerAdapterKey: esKey1
|
||||
destination: dev_sync_data_to_es
|
||||
groupId: g1
|
||||
esMapping:
|
||||
_index: dev_course_user
|
||||
# _type: doc
|
||||
_id: _id
|
||||
upsert: true
|
||||
# pk: "orders_id"
|
||||
sql: "select a.course_user_id as _id, a.course_id, a.order_id, a.user_id, a.create_time, a.update_time, a.course_details_id, a.classify from course_user a"
|
||||
# objFields:
|
||||
# _labels: array:;
|
||||
# _obj: object
|
||||
# etlCondition: "where 1=1"
|
||||
commitBatch: 3000
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
dataSourceKey: dev_duanju-1
|
||||
outerAdapterKey: esKey1
|
||||
destination: dev_sync_data_to_es
|
||||
groupId: g1
|
||||
esMapping:
|
||||
_index: dev_course_user
|
||||
# _type: doc
|
||||
_id: _id
|
||||
upsert: true
|
||||
# pk: "orders_id"
|
||||
sql: "select a.course_user_id as _id, a.course_id, a.order_id, a.user_id, a.create_time, a.update_time, a.course_details_id, a.classify from course_user a"
|
||||
# objFields:
|
||||
# _labels: array:;
|
||||
# _obj: object
|
||||
# etlCondition: "where 1=1"
|
||||
commitBatch: 3000
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
dataSourceKey: dev_duanju-2
|
||||
outerAdapterKey: esKey1
|
||||
destination: dev_sync_data_to_es
|
||||
groupId: g1
|
||||
esMapping:
|
||||
_index: dev_course_user
|
||||
# _type: doc
|
||||
_id: _id
|
||||
upsert: true
|
||||
# pk: "orders_id"
|
||||
sql: "select a.course_user_id as _id, a.course_id, a.order_id, a.user_id, a.create_time, a.update_time, a.course_details_id, a.classify from course_user a"
|
||||
# objFields:
|
||||
# _labels: array:;
|
||||
# _obj: object
|
||||
# etlCondition: "where 1=1"
|
||||
commitBatch: 3000
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
dataSourceKey: dev_duanju-3
|
||||
outerAdapterKey: esKey1
|
||||
destination: dev_sync_data_to_es
|
||||
groupId: g1
|
||||
esMapping:
|
||||
_index: dev_course_user
|
||||
# _type: doc
|
||||
_id: _id
|
||||
upsert: true
|
||||
# pk: "orders_id"
|
||||
sql: "select a.course_user_id as _id, a.course_id, a.order_id, a.user_id, a.create_time, a.update_time, a.course_details_id, a.classify from course_user a"
|
||||
# objFields:
|
||||
# _labels: array:;
|
||||
# _obj: object
|
||||
# etlCondition: "where 1=1"
|
||||
commitBatch: 3000
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
dataSourceKey: dev_duanju-4
|
||||
outerAdapterKey: esKey1
|
||||
destination: dev_sync_data_to_es
|
||||
groupId: g1
|
||||
esMapping:
|
||||
_index: dev_course_user
|
||||
# _type: doc
|
||||
_id: _id
|
||||
upsert: true
|
||||
# pk: "orders_id"
|
||||
sql: "select a.course_user_id as _id, a.course_id, a.order_id, a.user_id, a.create_time, a.update_time, a.course_details_id, a.classify from course_user a"
|
||||
# objFields:
|
||||
# _labels: array:;
|
||||
# _obj: object
|
||||
# etlCondition: "where 1=1"
|
||||
commitBatch: 3000
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
dataSourceKey: dev_duanju-0
|
||||
outerAdapterKey: esKey1
|
||||
destination: dev_sync_data_to_es
|
||||
groupId: g1
|
||||
esMapping:
|
||||
_index: dev_disc_spinning_record
|
||||
# _type: doc
|
||||
_id: _id
|
||||
upsert: true
|
||||
# pk: "orders_id"
|
||||
sql: "select a.id as _id, a.user_id, a.source_id, a.img_url, a.name, a.type, a.number, a.target, a.target_id, a.draw_day, a.create_time, a.source from disc_spinning_record a"
|
||||
# objFields:
|
||||
# _labels: array:;
|
||||
# _obj: object
|
||||
# etlCondition: "where 1=1"
|
||||
commitBatch: 3000
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
dataSourceKey: dev_duanju-1
|
||||
outerAdapterKey: esKey1
|
||||
destination: dev_sync_data_to_es
|
||||
groupId: g1
|
||||
esMapping:
|
||||
_index: dev_disc_spinning_record
|
||||
# _type: doc
|
||||
_id: _id
|
||||
upsert: true
|
||||
# pk: "orders_id"
|
||||
sql: "select a.id as _id, a.user_id, a.source_id, a.img_url, a.name, a.type, a.number, a.target, a.target_id, a.draw_day, a.create_time, a.source from disc_spinning_record a"
|
||||
# objFields:
|
||||
# _labels: array:;
|
||||
# _obj: object
|
||||
# etlCondition: "where 1=1"
|
||||
commitBatch: 3000
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
dataSourceKey: dev_duanju-2
|
||||
outerAdapterKey: esKey1
|
||||
destination: dev_sync_data_to_es
|
||||
groupId: g1
|
||||
esMapping:
|
||||
_index: dev_disc_spinning_record
|
||||
# _type: doc
|
||||
_id: _id
|
||||
upsert: true
|
||||
# pk: "orders_id"
|
||||
sql: "select a.id as _id, a.user_id, a.source_id, a.img_url, a.name, a.type, a.number, a.target, a.target_id, a.draw_day, a.create_time, a.source from disc_spinning_record a"
|
||||
# objFields:
|
||||
# _labels: array:;
|
||||
# _obj: object
|
||||
# etlCondition: "where 1=1"
|
||||
commitBatch: 3000
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
dataSourceKey: dev_duanju-3
|
||||
outerAdapterKey: esKey1
|
||||
destination: dev_sync_data_to_es
|
||||
groupId: g1
|
||||
esMapping:
|
||||
_index: dev_disc_spinning_record
|
||||
# _type: doc
|
||||
_id: _id
|
||||
upsert: true
|
||||
# pk: "orders_id"
|
||||
sql: "select a.id as _id, a.user_id, a.source_id, a.img_url, a.name, a.type, a.number, a.target, a.target_id, a.draw_day, a.create_time, a.source from disc_spinning_record a"
|
||||
# objFields:
|
||||
# _labels: array:;
|
||||
# _obj: object
|
||||
# etlCondition: "where 1=1"
|
||||
commitBatch: 3000
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
dataSourceKey: dev_duanju-4
|
||||
outerAdapterKey: esKey1
|
||||
destination: dev_sync_data_to_es
|
||||
groupId: g1
|
||||
esMapping:
|
||||
_index: dev_disc_spinning_record
|
||||
# _type: doc
|
||||
_id: _id
|
||||
upsert: true
|
||||
# pk: "orders_id"
|
||||
sql: "select a.id as _id, a.user_id, a.source_id, a.img_url, a.name, a.type, a.number, a.target, a.target_id, a.draw_day, a.create_time, a.source from disc_spinning_record a"
|
||||
# objFields:
|
||||
# _labels: array:;
|
||||
# _obj: object
|
||||
# etlCondition: "where 1=1"
|
||||
commitBatch: 3000
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
dataSourceKey: dev_duanju-0
|
||||
outerAdapterKey: esKey1
|
||||
destination: dev_sync_data_to_es
|
||||
groupId: g1
|
||||
esMapping:
|
||||
_index: dev_orders
|
||||
# _type: doc
|
||||
_id: _id
|
||||
upsert: true
|
||||
# pk: "orders_id"
|
||||
sql: "select a.orders_id as _id, a.orders_no, a.trade_no, a.user_id, a.course_id, a.pay_money, a.pay_way, a.status, a.create_time, a.refund_content, a.orders_type, a.vip_name_type, a.course_details_id, a.course_details_ids, a.qd_money, a.sys_user_id, a.one_money, a.one_user_id, a.two_money, a.two_user_id, a.pay_time, a.pay_diamond, a.diamond from orders a"
|
||||
# objFields:
|
||||
# _labels: array:;
|
||||
# _obj: object
|
||||
# etlCondition: "where 1=1"
|
||||
commitBatch: 3000
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
dataSourceKey: dev_duanju-1
|
||||
outerAdapterKey: esKey1
|
||||
destination: dev_sync_data_to_es
|
||||
groupId: g1
|
||||
esMapping:
|
||||
_index: dev_orders
|
||||
# _type: doc
|
||||
_id: _id
|
||||
upsert: true
|
||||
# pk: "orders_id"
|
||||
sql: "select a.orders_id as _id, a.orders_no, a.trade_no, a.user_id, a.course_id, a.pay_money, a.pay_way, a.status, a.create_time, a.refund_content, a.orders_type, a.vip_name_type, a.course_details_id, a.course_details_ids, a.qd_money, a.sys_user_id, a.one_money, a.one_user_id, a.two_money, a.two_user_id, a.pay_time, a.pay_diamond, a.diamond from orders a"
|
||||
# objFields:
|
||||
# _labels: array:;
|
||||
# _obj: object
|
||||
# etlCondition: "where 1=1"
|
||||
commitBatch: 3000
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
dataSourceKey: dev_duanju-2
|
||||
outerAdapterKey: esKey1
|
||||
destination: dev_sync_data_to_es
|
||||
groupId: g1
|
||||
esMapping:
|
||||
_index: dev_orders
|
||||
# _type: doc
|
||||
_id: _id
|
||||
upsert: true
|
||||
# pk: "orders_id"
|
||||
sql: "select a.orders_id as _id, a.orders_no, a.trade_no, a.user_id, a.course_id, a.pay_money, a.pay_way, a.status, a.create_time, a.refund_content, a.orders_type, a.vip_name_type, a.course_details_id, a.course_details_ids, a.qd_money, a.sys_user_id, a.one_money, a.one_user_id, a.two_money, a.two_user_id, a.pay_time, a.pay_diamond, a.diamond from orders a"
|
||||
# objFields:
|
||||
# _labels: array:;
|
||||
# _obj: object
|
||||
# etlCondition: "where 1=1"
|
||||
commitBatch: 3000
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
dataSourceKey: dev_duanju-3
|
||||
outerAdapterKey: esKey1
|
||||
destination: dev_sync_data_to_es
|
||||
groupId: g1
|
||||
esMapping:
|
||||
_index: dev_orders
|
||||
# _type: doc
|
||||
_id: _id
|
||||
upsert: true
|
||||
# pk: "orders_id"
|
||||
sql: "select a.orders_id as _id, a.orders_no, a.trade_no, a.user_id, a.course_id, a.pay_money, a.pay_way, a.status, a.create_time, a.refund_content, a.orders_type, a.vip_name_type, a.course_details_id, a.course_details_ids, a.qd_money, a.sys_user_id, a.one_money, a.one_user_id, a.two_money, a.two_user_id, a.pay_time, a.pay_diamond, a.diamond from orders a"
|
||||
# objFields:
|
||||
# _labels: array:;
|
||||
# _obj: object
|
||||
# etlCondition: "where 1=1"
|
||||
commitBatch: 3000
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
dataSourceKey: dev_duanju-4
|
||||
outerAdapterKey: esKey1
|
||||
destination: dev_sync_data_to_es
|
||||
groupId: g1
|
||||
esMapping:
|
||||
_index: dev_orders
|
||||
# _type: doc
|
||||
_id: _id
|
||||
upsert: true
|
||||
# pk: "orders_id"
|
||||
sql: "select a.orders_id as _id, a.orders_no, a.trade_no, a.user_id, a.course_id, a.pay_money, a.pay_way, a.status, a.create_time, a.refund_content, a.orders_type, a.vip_name_type, a.course_details_id, a.course_details_ids, a.qd_money, a.sys_user_id, a.one_money, a.one_user_id, a.two_money, a.two_user_id, a.pay_time, a.pay_diamond, a.diamond from orders a"
|
||||
# objFields:
|
||||
# _labels: array:;
|
||||
# _obj: object
|
||||
# etlCondition: "where 1=1"
|
||||
commitBatch: 3000
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
dataSourceKey: dev_duanju-0
|
||||
outerAdapterKey: esKey1
|
||||
destination: dev_sync_data_to_es
|
||||
groupId: g1
|
||||
esMapping:
|
||||
_index: dev_pay_details
|
||||
# _type: doc
|
||||
_id: _id
|
||||
upsert: true
|
||||
# pk: "orders_id"
|
||||
sql: "select a.id as _id, a.classify, a.trade_no, a.money, a.user_id, a.state, a.create_time, a.pay_time, a.type, a.remark, a.order_id, a.product_id, a.pay_diamond, a.diamond, a.third_order_no from pay_details a"
|
||||
# objFields:
|
||||
# _labels: array:;
|
||||
# _obj: object
|
||||
# etlCondition: "where 1=1"
|
||||
commitBatch: 3000
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
dataSourceKey: dev_duanju-1
|
||||
outerAdapterKey: esKey1
|
||||
destination: dev_sync_data_to_es
|
||||
groupId: g1
|
||||
esMapping:
|
||||
_index: dev_pay_details
|
||||
# _type: doc
|
||||
_id: _id
|
||||
upsert: true
|
||||
# pk: "orders_id"
|
||||
sql: "select a.id as _id, a.classify, a.trade_no, a.money, a.user_id, a.state, a.create_time, a.pay_time, a.type, a.remark, a.order_id, a.product_id, a.pay_diamond, a.diamond, a.third_order_no from pay_details a"
|
||||
# objFields:
|
||||
# _labels: array:;
|
||||
# _obj: object
|
||||
# etlCondition: "where 1=1"
|
||||
commitBatch: 3000
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
dataSourceKey: dev_duanju-2
|
||||
outerAdapterKey: esKey1
|
||||
destination: dev_sync_data_to_es
|
||||
groupId: g1
|
||||
esMapping:
|
||||
_index: dev_pay_details
|
||||
# _type: doc
|
||||
_id: _id
|
||||
upsert: true
|
||||
# pk: "orders_id"
|
||||
sql: "select a.id as _id, a.classify, a.trade_no, a.money, a.user_id, a.state, a.create_time, a.pay_time, a.type, a.remark, a.order_id, a.product_id, a.pay_diamond, a.diamond, a.third_order_no from pay_details a"
|
||||
# objFields:
|
||||
# _labels: array:;
|
||||
# _obj: object
|
||||
# etlCondition: "where 1=1"
|
||||
commitBatch: 3000
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
dataSourceKey: dev_duanju-3
|
||||
outerAdapterKey: esKey1
|
||||
destination: dev_sync_data_to_es
|
||||
groupId: g1
|
||||
esMapping:
|
||||
_index: dev_pay_details
|
||||
# _type: doc
|
||||
_id: _id
|
||||
upsert: true
|
||||
# pk: "orders_id"
|
||||
sql: "select a.id as _id, a.classify, a.trade_no, a.money, a.user_id, a.state, a.create_time, a.pay_time, a.type, a.remark, a.order_id, a.product_id, a.pay_diamond, a.diamond, a.third_order_no from pay_details a"
|
||||
# objFields:
|
||||
# _labels: array:;
|
||||
# _obj: object
|
||||
# etlCondition: "where 1=1"
|
||||
commitBatch: 3000
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
dataSourceKey: dev_duanju-4
|
||||
outerAdapterKey: esKey1
|
||||
destination: dev_sync_data_to_es
|
||||
groupId: g1
|
||||
esMapping:
|
||||
_index: dev_pay_details
|
||||
# _type: doc
|
||||
_id: _id
|
||||
upsert: true
|
||||
# pk: "orders_id"
|
||||
sql: "select a.id as _id, a.classify, a.trade_no, a.money, a.user_id, a.state, a.create_time, a.pay_time, a.type, a.remark, a.order_id, a.product_id, a.pay_diamond, a.diamond, a.third_order_no from pay_details a"
|
||||
# objFields:
|
||||
# _labels: array:;
|
||||
# _obj: object
|
||||
# etlCondition: "where 1=1"
|
||||
commitBatch: 3000
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
dataSourceKey: dev_duanju-0
|
||||
outerAdapterKey: esKey1
|
||||
destination: dev_sync_data_to_es
|
||||
groupId: g1
|
||||
esMapping:
|
||||
_index: dev_task_center_record
|
||||
# _type: doc
|
||||
_id: _id
|
||||
upsert: true
|
||||
# pk: "orders_id"
|
||||
sql: "select a.id as _id, a.user_id, a.task_id, a.source_id, a.name, a.type, a.target_id, a.number, a.create_time, a.update_time from task_center_record a"
|
||||
# objFields:
|
||||
# _labels: array:;
|
||||
# _obj: object
|
||||
# etlCondition: "where 1=1"
|
||||
commitBatch: 3000
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
dataSourceKey: dev_duanju-1
|
||||
outerAdapterKey: esKey1
|
||||
destination: dev_sync_data_to_es
|
||||
groupId: g1
|
||||
esMapping:
|
||||
_index: dev_task_center_record
|
||||
# _type: doc
|
||||
_id: _id
|
||||
upsert: true
|
||||
# pk: "orders_id"
|
||||
sql: "select a.id as _id, a.user_id, a.task_id, a.source_id, a.name, a.type, a.target_id, a.number, a.create_time, a.update_time from task_center_record a"
|
||||
# objFields:
|
||||
# _labels: array:;
|
||||
# _obj: object
|
||||
# etlCondition: "where 1=1"
|
||||
commitBatch: 3000
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
dataSourceKey: dev_duanju-2
|
||||
outerAdapterKey: esKey1
|
||||
destination: dev_sync_data_to_es
|
||||
groupId: g1
|
||||
esMapping:
|
||||
_index: dev_task_center_record
|
||||
# _type: doc
|
||||
_id: _id
|
||||
upsert: true
|
||||
# pk: "orders_id"
|
||||
sql: "select a.id as _id, a.user_id, a.task_id, a.source_id, a.name, a.type, a.target_id, a.number, a.create_time, a.update_time from task_center_record a"
|
||||
# objFields:
|
||||
# _labels: array:;
|
||||
# _obj: object
|
||||
# etlCondition: "where 1=1"
|
||||
commitBatch: 3000
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
dataSourceKey: dev_duanju-3
|
||||
outerAdapterKey: esKey1
|
||||
destination: dev_sync_data_to_es
|
||||
groupId: g1
|
||||
esMapping:
|
||||
_index: dev_task_center_record
|
||||
# _type: doc
|
||||
_id: _id
|
||||
upsert: true
|
||||
# pk: "orders_id"
|
||||
sql: "select a.id as _id, a.user_id, a.task_id, a.source_id, a.name, a.type, a.target_id, a.number, a.create_time, a.update_time from task_center_record a"
|
||||
# objFields:
|
||||
# _labels: array:;
|
||||
# _obj: object
|
||||
# etlCondition: "where 1=1"
|
||||
commitBatch: 3000
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
dataSourceKey: dev_duanju-4
|
||||
outerAdapterKey: esKey1
|
||||
destination: dev_sync_data_to_es
|
||||
groupId: g1
|
||||
esMapping:
|
||||
_index: dev_task_center_record
|
||||
# _type: doc
|
||||
_id: _id
|
||||
upsert: true
|
||||
# pk: "orders_id"
|
||||
sql: "select a.id as _id, a.user_id, a.task_id, a.source_id, a.name, a.type, a.target_id, a.number, a.create_time, a.update_time from task_center_record a"
|
||||
# objFields:
|
||||
# _labels: array:;
|
||||
# _obj: object
|
||||
# etlCondition: "where 1=1"
|
||||
commitBatch: 3000
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
dataSourceKey: dev_duanju-0
|
||||
outerAdapterKey: esKey1
|
||||
destination: dev_sync_data_to_es
|
||||
groupId: g1
|
||||
esMapping:
|
||||
_index: dev_user_money_details
|
||||
# _type: doc
|
||||
_id: _id
|
||||
upsert: true
|
||||
# pk: "orders_id"
|
||||
sql: "select a.id as _id, a.user_id, a.sys_user_id, a.by_user_id, a.title, a.classify, a.type, a.state, a.money, a.content, a.money_type, a.create_time, a.source_id from user_money_details a"
|
||||
# objFields:
|
||||
# _labels: array:;
|
||||
# _obj: object
|
||||
# etlCondition: "where 1=1"
|
||||
commitBatch: 3000
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
dataSourceKey: dev_duanju-1
|
||||
outerAdapterKey: esKey1
|
||||
destination: dev_sync_data_to_es
|
||||
groupId: g1
|
||||
esMapping:
|
||||
_index: dev_user_money_details
|
||||
# _type: doc
|
||||
_id: _id
|
||||
upsert: true
|
||||
# pk: "orders_id"
|
||||
sql: "select a.id as _id, a.user_id, a.sys_user_id, a.by_user_id, a.title, a.classify, a.type, a.state, a.money, a.content, a.money_type, a.create_time, a.source_id from user_money_details a"
|
||||
# objFields:
|
||||
# _labels: array:;
|
||||
# _obj: object
|
||||
# etlCondition: "where 1=1"
|
||||
commitBatch: 3000
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
dataSourceKey: dev_duanju-2
|
||||
outerAdapterKey: esKey1
|
||||
destination: dev_sync_data_to_es
|
||||
groupId: g1
|
||||
esMapping:
|
||||
_index: dev_user_money_details
|
||||
# _type: doc
|
||||
_id: _id
|
||||
upsert: true
|
||||
# pk: "orders_id"
|
||||
sql: "select a.id as _id, a.user_id, a.sys_user_id, a.by_user_id, a.title, a.classify, a.type, a.state, a.money, a.content, a.money_type, a.create_time, a.source_id from user_money_details a"
|
||||
# objFields:
|
||||
# _labels: array:;
|
||||
# _obj: object
|
||||
# etlCondition: "where 1=1"
|
||||
commitBatch: 3000
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
dataSourceKey: dev_duanju-3
|
||||
outerAdapterKey: esKey1
|
||||
destination: dev_sync_data_to_es
|
||||
groupId: g1
|
||||
esMapping:
|
||||
_index: dev_user_money_details
|
||||
# _type: doc
|
||||
_id: _id
|
||||
upsert: true
|
||||
# pk: "orders_id"
|
||||
sql: "select a.id as _id, a.user_id, a.sys_user_id, a.by_user_id, a.title, a.classify, a.type, a.state, a.money, a.content, a.money_type, a.create_time, a.source_id from user_money_details a"
|
||||
# objFields:
|
||||
# _labels: array:;
|
||||
# _obj: object
|
||||
# etlCondition: "where 1=1"
|
||||
commitBatch: 3000
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
dataSourceKey: dev_duanju-4
|
||||
outerAdapterKey: esKey1
|
||||
destination: dev_sync_data_to_es
|
||||
groupId: g1
|
||||
esMapping:
|
||||
_index: dev_user_money_details
|
||||
# _type: doc
|
||||
_id: _id
|
||||
upsert: true
|
||||
# pk: "orders_id"
|
||||
sql: "select a.id as _id, a.user_id, a.sys_user_id, a.by_user_id, a.title, a.classify, a.type, a.state, a.money, a.content, a.money_type, a.create_time, a.source_id from user_money_details a"
|
||||
# objFields:
|
||||
# _labels: array:;
|
||||
# _obj: object
|
||||
# etlCondition: "where 1=1"
|
||||
commitBatch: 3000
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
{
|
||||
"env": "prod",
|
||||
"dbList": [
|
||||
"duanju-0",
|
||||
"duanju-1",
|
||||
"duanju-2",
|
||||
"duanju-3",
|
||||
"duanju-4"
|
||||
],
|
||||
"tableList": [
|
||||
{
|
||||
"tableName": "user_money_details",
|
||||
"mappingSql": "select a.id as _id, a.user_id, a.sys_user_id, a.by_user_id, a.title, a.classify, a.type, a.state, a.money, a.content, a.money_type, a.create_time, a.source_id from user_money_details a"
|
||||
},
|
||||
{
|
||||
"tableName": "orders",
|
||||
"mappingSql": "select a.orders_id as _id, a.orders_no, a.trade_no, a.user_id, a.course_id, a.pay_money, a.pay_way, a.status, a.create_time, a.refund_content, a.orders_type, a.vip_name_type, a.course_details_id, a.course_details_ids, a.qd_money, a.sys_user_id, a.one_money, a.one_user_id, a.two_money, a.two_user_id, a.pay_time, a.pay_diamond, a.diamond from orders a"
|
||||
},
|
||||
{
|
||||
"tableName": "course_collect",
|
||||
"mappingSql": "select a.course_collect_id as _id, a.course_id, a.user_id, a.create_time, a.course_details_id, a.classify, a.update_time from course_collect a"
|
||||
},
|
||||
{
|
||||
"tableName": "pay_details",
|
||||
"mappingSql": "select a.id as _id, a.classify, a.trade_no, a.money, a.user_id, a.state, a.create_time, a.pay_time, a.type, a.remark, a.order_id, a.product_id, a.pay_diamond, a.diamond, a.third_order_no from pay_details a"
|
||||
},
|
||||
{
|
||||
"tableName": "disc_spinning_record",
|
||||
"mappingSql": "select a.id as _id, a.user_id, a.source_id, a.img_url, a.name, a.type, a.number, a.target, a.target_id, a.draw_day, a.create_time, a.source from disc_spinning_record a"
|
||||
},
|
||||
{
|
||||
"tableName": "cash_out",
|
||||
"mappingSql": "select a.id as _id, a.create_at, a.is_out, a.money, a.out_at, a.relation_id, a.user_id, a.zhifubao, a.zhifubao_name, a.order_number, a.state, a.refund, a.rate, a.sys_user_id, a.user_type, a.withdraw_type from cash_out a"
|
||||
},
|
||||
{
|
||||
"tableName": "course_user",
|
||||
"mappingSql": "select a.course_user_id as _id, a.course_id, a.order_id, a.user_id, a.create_time, a.update_time, a.course_details_id, a.classify from course_user a"
|
||||
},
|
||||
{
|
||||
"tableName": "task_center_record",
|
||||
"mappingSql": "select a.id as _id, a.user_id, a.task_id, a.source_id, a.name, a.type, a.target_id, a.number, a.create_time, a.update_time from task_center_record a"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
dataSourceKey: {env}_{dbName}
|
||||
outerAdapterKey: esKey1
|
||||
destination: {env}_sync_data_to_es
|
||||
groupId: g1
|
||||
esMapping:
|
||||
_index: dev_{tableName}
|
||||
# _type: doc
|
||||
_id: _id
|
||||
upsert: true
|
||||
# pk: "orders_id"
|
||||
sql: "{mappingSql}"
|
||||
# objFields:
|
||||
# _labels: array:;
|
||||
# _obj: object
|
||||
# etlCondition: "where 1=1"
|
||||
commitBatch: 3000
|
||||
Loading…
Reference in New Issue