记得上下班打卡 | git大法好,push需谨慎

Commit 01b5f405 authored by 胡佳晨's avatar 胡佳晨

数据迁移

parent eafe89d2
...@@ -38,4 +38,11 @@ public interface KylinOrderTicketsMapper extends BaseMapper<KylinOrderTickets> { ...@@ -38,4 +38,11 @@ public interface KylinOrderTicketsMapper extends BaseMapper<KylinOrderTickets> {
List<OrderIdsDao> getOrderUserIdByTimesId(@Param("ticketId") String ticketId); List<OrderIdsDao> getOrderUserIdByTimesId(@Param("ticketId") String ticketId);
List<OrderExpressExportListDao> selectExpressList(@Param("performanceId") String performanceId); List<OrderExpressExportListDao> selectExpressList(@Param("performanceId") String performanceId);
/**
* 根据用户id获取 演出订单维度 完成没任务次数
* @param uid
* @return
*/
List<Integer> getOrderScore(@Param("uid") String uid);
} }
...@@ -280,7 +280,8 @@ ...@@ -280,7 +280,8 @@
FROM kylin_order_tickets AS ot FROM kylin_order_tickets AS ot
inner JOIN kylin_order_ticket_status AS ots ON ots.order_id = ot.order_tickets_id inner JOIN kylin_order_ticket_status AS ots ON ots.order_id = ot.order_tickets_id
inner JOIN kylin_order_ticket_relations AS otr ON otr.order_id = ot.order_tickets_id inner JOIN kylin_order_ticket_relations AS otr ON otr.order_id = ot.order_tickets_id
WHERE status = 0 AND ot.coupon_type !='exchange' AND NOW() > DATE_SUB(ot.created_at, INTERVAL -(pay_countdown_minute + 1) MINUTE)) as s WHERE status = 0 AND ot.coupon_type !='exchange' AND NOW() > DATE_SUB(ot.created_at, INTERVAL
-(pay_countdown_minute + 1) MINUTE)) as s
left JOIN kylin_order_coupons AS oc ON oc.order_id = s.order_tickets_id left JOIN kylin_order_coupons AS oc ON oc.order_id = s.order_tickets_id
<if test="userId!=''"> <if test="userId!=''">
AND user_id = #{userId} AND user_id = #{userId}
...@@ -313,7 +314,8 @@ ...@@ -313,7 +314,8 @@
INNER JOIN kylin_order_ticket_status kots ON kot.order_tickets_id = kots.order_id INNER JOIN kylin_order_ticket_status kots ON kot.order_tickets_id = kots.order_id
INNER JOIN kylin_order_ticket_relations kotr ON kot.order_tickets_id = kotr.order_id INNER JOIN kylin_order_ticket_relations kotr ON kot.order_tickets_id = kotr.order_id
LEFT JOIN (SELECT * FROM kylin_order_express WHERE express_status NOT IN (1, 3) AND send_type = 1) AS oe ON oe.order_tickets_id = LEFT JOIN (SELECT * FROM kylin_order_express WHERE express_status NOT IN (1, 3) AND send_type = 1) AS oe ON
oe.order_tickets_id =
kot.order_tickets_id kot.order_tickets_id
-- LEFT JOIN (SELECT * FROM kylin_order_express_route ORDER BY mid DESC LIMIT 1) AS oer ON oe.order_express_id = -- LEFT JOIN (SELECT * FROM kylin_order_express_route ORDER BY mid DESC LIMIT 1) AS oer ON oe.order_express_id =
-- oer.order_express_id -- oer.order_express_id
...@@ -339,7 +341,9 @@ ...@@ -339,7 +341,9 @@
${expressStatus} ${expressStatus}
</if> </if>
<if test="expressStatus == 1">AND (oe.express_status IS NULL OR oe.express_status = ${expressStatus})</if> <if test="expressStatus == 1">AND (oe.express_status IS NULL OR oe.express_status = ${expressStatus})</if>
<if test="expressStatus == 70">AND (oe.express_status > 3 AND oe.express_status != 80 AND oe.express_status != 8000)</if> <if test="expressStatus == 70">AND (oe.express_status > 3 AND oe.express_status != 80 AND oe.express_status
!= 8000)
</if>
<if test="expressStatus == 80">AND (oe.express_status = 80 OR oe.express_status = 8000)</if> <if test="expressStatus == 80">AND (oe.express_status = 80 OR oe.express_status = 8000)</if>
<if test="mailno != ''">AND oe.mailno LIKE concat('%', #{mailno}, '%')</if> <if test="mailno != ''">AND oe.mailno LIKE concat('%', #{mailno}, '%')</if>
...@@ -392,4 +396,13 @@ ...@@ -392,4 +396,13 @@
AND e.transfer_status in (0, 3) AND e.transfer_status in (0, 3)
AND p.performances_id = #{performanceId}; AND p.performances_id = #{performanceId};
</select> </select>
<select id="getOrderScore" resultType="Integer">
select count(kot.user_id),kot.user_id,DATE_FORMAT(kot.created_at,'%Y-%m-%d') from kylin_order_tickets kot
inner join kylin_order_ticket_relations as kotr on kotr.order_id = kot.order_tickets_id
inner join kylin_order_ticket_status as kots on kots.order_id = kot.order_tickets_id
inner join kylin_order_ticket_entities as kote on kote.order_id = kot.order_tickets_id
where kots.status in (1) and kot.user_id = #{uid} group by DATE_FORMAT(kot.created_at,'%Y-%m-%d');
</select>
</mapper> </mapper>
...@@ -56,6 +56,12 @@ ...@@ -56,6 +56,12 @@
<version>1.0-SNAPSHOT</version> <version>1.0-SNAPSHOT</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<dependency>
<groupId>com.liquidnet</groupId>
<artifactId>liquidnet-service-stone-api</artifactId>
<version>1.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency> <dependency>
......
...@@ -7,6 +7,7 @@ import io.swagger.annotations.ApiOperation; ...@@ -7,6 +7,7 @@ import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
...@@ -17,38 +18,12 @@ public class DataController { ...@@ -17,38 +18,12 @@ public class DataController {
@Autowired @Autowired
private DataImpl data; private DataImpl data;
// @PostMapping("performance")
// @ApiOperation("演出数据迁移")
// public ResponseDto<Boolean> performance() { @PostMapping("initScore")
// Boolean result = data.performance(); @ApiOperation("积分数据迁移")
// return ResponseDto.success(result); public ResponseDto<Boolean> initScore(@RequestParam("page") int page, @RequestParam("size") int size) {
// } Boolean result = data.initScore(page,size);
// return ResponseDto.success(result);
// @PostMapping("order") }
// @ApiOperation("订单数据迁移")
// public ResponseDto<Boolean> order(String month) {
// Boolean result = data.order(month);
// return ResponseDto.success(result);
// }
//
// @PostMapping("roadShow")
// @ApiOperation("巡演数据迁移")
// public ResponseDto<Boolean> roadShow() {
// Boolean result = data.roadShow();
// return ResponseDto.success(result);
// }
//
// @PostMapping("childAccount")
// @ApiOperation("验票子账号数据迁移")
// public ResponseDto<Boolean> childAccount() {
// Boolean result = data.childAccount();
// return ResponseDto.success(result);
// }
//
// @PostMapping("SurplusRedis")
// @ApiOperation("redis库存迁移")
// public ResponseDto<Boolean> SurplusRedis() {
// Boolean result = data.SurplusRedis();
// return ResponseDto.success(result);
// }
} }
package com.liquidnet.service.platform.service.impl.kylin;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.liquidnet.service.adam.entity.AdamUser;
import com.liquidnet.service.adam.mapper.AdamUserMapper;
import org.springframework.stereotype.Service;
@Service
public class DMTUserService extends ServiceImpl<AdamUserMapper, AdamUser> {
}
package com.liquidnet.service.platform.service.impl.kylin; package com.liquidnet.service.platform.service.impl.kylin;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.PropertyAccessor; import com.fasterxml.jackson.annotation.PropertyAccessor;
...@@ -7,9 +8,11 @@ import com.fasterxml.jackson.databind.ObjectMapper; ...@@ -7,9 +8,11 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature; import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import com.liquidnet.common.cache.redis.util.RedisUtil; import com.liquidnet.common.cache.redis.util.RedisUtil;
import com.liquidnet.commons.lang.util.DateUtil; import com.liquidnet.commons.lang.util.*;
import com.liquidnet.commons.lang.util.IDGenerator; import com.liquidnet.service.adam.constant.AdamRedisConst;
import com.liquidnet.commons.lang.util.StringUtil; import com.liquidnet.service.adam.dto.vo.AdamUserInfoVo;
import com.liquidnet.service.adam.entity.AdamUser;
import com.liquidnet.service.adam.mapper.AdamUserMapper;
import com.liquidnet.service.kylin.constant.KylinRedisConst; import com.liquidnet.service.kylin.constant.KylinRedisConst;
import com.liquidnet.service.kylin.dto.param.CheckPerformanceRelationParam; import com.liquidnet.service.kylin.dto.param.CheckPerformanceRelationParam;
import com.liquidnet.service.kylin.dto.param.PerformancePartnerVo; import com.liquidnet.service.kylin.dto.param.PerformancePartnerVo;
...@@ -23,10 +26,18 @@ import com.liquidnet.service.kylin.entity.*; ...@@ -23,10 +26,18 @@ import com.liquidnet.service.kylin.entity.*;
import com.liquidnet.service.kylin.mapper.*; import com.liquidnet.service.kylin.mapper.*;
import com.liquidnet.service.platform.utils.DataUtils; import com.liquidnet.service.platform.utils.DataUtils;
import com.liquidnet.service.platform.utils.PerformanceVoTask; import com.liquidnet.service.platform.utils.PerformanceVoTask;
import com.liquidnet.service.stone.constant.StoneConstant;
import com.liquidnet.service.stone.entity.StoneScoreLogs;
import com.liquidnet.service.stone.entity.StoneScoreUser;
import com.liquidnet.service.stone.mapper.StoneScoreLogsMapper;
import com.liquidnet.service.stone.mapper.StoneScoreUserMapper;
import com.liquidnet.service.stone.vo.StoneUserVo;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.mongodb.core.MongoTemplate; import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.DigestUtils; import org.springframework.util.DigestUtils;
import org.springframework.util.MultiValueMap;
import redis.clients.jedis.Jedis; import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool; import redis.clients.jedis.JedisPool;
...@@ -35,948 +46,117 @@ import java.sql.Connection; ...@@ -35,948 +46,117 @@ import java.sql.Connection;
import java.sql.DriverManager; import java.sql.DriverManager;
import java.sql.PreparedStatement; import java.sql.PreparedStatement;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
@Service @Service
public class DataImpl { public class DataImpl {
@Value("${liquidnet.service.stone.url}")
private String stoneUrl;
@Autowired @Autowired
private MongoTemplate mongoTemplate; private MongoTemplate mongoTemplate;
@Autowired @Autowired
private KylinPerformancesMapper performancesMapper; private RedisUtil redisUtil;
@Autowired private static final List<String> defaultBackgroundList = Arrays.asList("https://img.zhengzai.tv/other/2021/07/27/150eeb0e20af4fc88e8a1ec57c46c362.png", "https://img.zhengzai.tv/files/2021/01/13/5ffeab3584b7d.png", "http://pic.zhengzai.tv/default/background.png", "http://img.zhengzai.tv/album/20171027/1509106243302.png");
private KylinPerformanceStatusMapper performanceStatusMapper;
@Autowired
private KylinPerformanceRelationsMapper performanceRelationsMapper;
@Autowired
private KylinTicketTimesMapper ticketTimesMapper;
@Autowired
private KylinTicketTimeRelationMapper ticketTimeRelationMapper;
@Autowired
private KylinTicketsMapper ticketsMapper;
@Autowired
private KylinTicketStatusMapper ticketStatusMapper;
@Autowired
private KylinTicketRelationsMapper ticketRelationsMapper;
@Autowired
private PerformanceVoTask performanceVoTask;
@Autowired @Autowired
private DMCheckOrderTimeImpl dmCheckOrderTime; AdamUserMapper userMapper;
@Autowired @Autowired
private DMOrderTicketStatusImpl dmOrderTicketStatus; KylinOrderTicketsMapper orderTicketsMapper;
@Autowired @Autowired
private DMOrderTicketRelationsImpl dmOrderTicketRelations; StoneScoreUserMapper stoneScoreUserMapper;
@Autowired @Autowired
private DMOrderTicketEntitiesServiceImpl dmOrderTicketEntitiesService; StoneScoreLogsMapper stoneScoreLogsMapper;
@Autowired
private DMRoadShowsServiceImpl dmRoadShowsService;
@Autowired public boolean initScore(int page, int size) {
private DMCheckUserServiceImpl dmCheckUserService;
@Autowired
private DMCheckUserPerformanceServiceImpl dmCheckUserPerformanceService;
@Autowired
private DataUtils dataUtils;
@Autowired
private RedisUtil redisUtil;
public boolean performance() {
try { try {
String driverClassName = "com.mysql.cj.jdbc.Driver"; //启动驱动 //查询全部用户
String url = "jdbc:mysql://pc-2ze6z2hxkug559q79.mysql.polardb.rds.aliyuncs.com:3306/mall"; //设置连接路径 List<AdamUser> adamUserList = userMapper.selectList(Wrappers.lambdaQuery(AdamUser.class).eq(AdamUser::getState, 1)
String username = "readonly"; //数据库用户名 .select(AdamUser::getUid).last("limit " + ((page - 1) * size) + "," + ((page) * size)));
String password = "ZWDsf8Fy"; //数据库连接密码 List<String> uidList = adamUserList.stream().map(AdamUser::getUid).collect(Collectors.toList());
Connection con = null; //连接 for (String uid : uidList) {
PreparedStatement pstmt = null; //使用预编译语句 //获取用户相关信息
ResultSet rs = null; //获取的结果集 AdamUserInfoVo userInfoVo = (AdamUserInfoVo) redisUtil.get(AdamRedisConst.INFO_USER.concat(uid));
//演出实体类 if (userInfoVo == null) {
KylinPerformances performances = new KylinPerformances(); System.out.println("REDIS KEY = " + AdamRedisConst.INFO_USER.concat(uid));
KylinPerformanceRelations performanceRelations = new KylinPerformanceRelations(); continue;
KylinPerformanceStatus performanceStatus = new KylinPerformanceStatus();
//场次实体类
KylinTicketTimes ticketTimes = new KylinTicketTimes();
KylinTicketTimeRelation ticketTimeRelation = new KylinTicketTimeRelation();
//票实体类
KylinTickets tickets = new KylinTickets();
KylinTicketRelations ticketRelations = new KylinTicketRelations();
KylinTicketStatus ticketStatus = new KylinTicketStatus();
// 第三方Vo
PerformancePartnerVo performancePartnerVo = new PerformancePartnerVo();
KylinTicketTimesPartnerVo ticketTimesPartnerVo = new KylinTicketTimesPartnerVo();
KylinTicketPartnerVo ticketPartnerVo = new KylinTicketPartnerVo();
int count = 2000;
int page = 0;
try {
Class.forName(driverClassName); //执行驱动
con = DriverManager.getConnection(url, username, password); //获取连接
String sqlAllCount = "select count(0) as 'allCount' from performances where status >= 3 and created_at > '2021-01-01 00:00:01'"; //设置的预编译语句格式
pstmt = con.prepareStatement(sqlAllCount);
ResultSet allCount = pstmt.executeQuery();
ArrayList<String> performanceIds = new ArrayList<>();
int allCountResult = 0;//共多少条
int rowCount = 0;//当前多少条
boolean isBreak = false;//是否终端循环
while (allCount.next()) {
allCountResult = allCount.getInt("allCount");
}
do {
String sql = "select * from performances where status >= 3 and created_at > '2021-01-01 00:00:01' limit " + count * page + " ," + count; //设置的预编译语句格式
pstmt = con.prepareStatement(sql);
ResultSet resultData = pstmt.executeQuery();
int performanceId = 0;
//演出数据
while (resultData.next()) {
performanceId = resultData.getInt("id");
// performances.setPerformancesId(IDGenerator.nextSnowId().toString());
performances.setPerformancesId(resultData.getInt("id") + "");
performanceIds.add(performances.getPerformancesId());
performances.setTitle(resultData.getString("title"));
performances.setType(resultData.getInt("type") == 1 ? 101 : 102);
if (resultData.getInt("road_show_id") > 0) {
performances.setType(103);
}
performances.setImgPoster(resultData.getString("img_poster"));
performances.setApprovalUrl(resultData.getString("approval_url"));
performances.setNotice(resultData.getString("notice"));
performances.setSponsorId(resultData.getString("sponsor_id"));
performances.setSponsorType(resultData.getString("sponsor_type"));
performances.setSponsor(resultData.getString("sponsor"));
performances.setContacts(resultData.getString("contacts"));
performances.setMobile(resultData.getString("mobile"));
performances.setDescribes(resultData.getString("describe"));
performances.setDetails(resultData.getString("detail"));
performances.setCityId(Integer.parseInt(resultData.getString("city_id")));
performances.setCityName((String) redisUtil.getDB15RedisHGet(KylinRedisConst.FIELDS + ":" + resultData.getInt("field_id"), "city_name"));
performances.setNoticeImage("[{\"id\":1,\"sort\":1,\"message\":\"因演出票品非普通商品,其背后承载的文化服务具有时效性、稀缺性等特征,故不适用7天无理由退货政策。因“不可抗力”导致的演出取消或延期除外。\",\"title\":\"门票退换\",\"type\":\"image\",\"imgUrl\":\"http://img-zhengzai-tv.oss-cn-hangzhou.aliyuncs.com/partner/2019/01/21/5c45722882a13.png\"},{\"id\":7,\"sort\":2,\"message\":\"凭订单二维码或手机号兑票入场,二维码或手机号请勿泄露,以免影响入场。个人原因导致的信息泄露,主办方/平台方不承担任何责任。\",\"title\":\"电子票\",\"type\":\"image\",\"imgUrl\":\"http://img-zhengzai-tv.oss-cn-hangzhou.aliyuncs.com/partner/2019/01/21/5c456d9482fb9.png\"},{\"id\":3,\"sort\":3,\"message\":\"本场演出不设座位,均为站席观演。\",\"title\":\"仅设站席\",\"type\":\"image\",\"imgUrl\":\"http://img-zhengzai-tv.oss-cn-hangzhou.aliyuncs.com/partner/2019/01/21/5c456e93db0b9.png\"},{\"id\":12,\"sort\":4,\"message\":\"每场现场票数量由场地方决定,具体请到现场询问。\",\"title\":\"现场票\",\"type\":\"image\",\"imgUrl\":\"http://img-zhengzai-tv.oss-cn-hangzhou.aliyuncs.com/partner/2019/06/17/5d07647eaa55f.png\"}]");
performances.setTimeStart(DateUtil.Formatter.yyyyMMddHHmmssS.parse(resultData.getTimestamp("time_start").toString()));
performances.setTimeEnd(DateUtil.Formatter.yyyyMMddHHmmssS.parse(resultData.getTimestamp("time_end").toString()));
if (null != resultData.getString("audit_submit_time")) {
performances.setAuditTime(DateUtil.Formatter.yyyyMMddHHmmss.parse(resultData.getString("audit_submit_time")));
}
performances.setRejectTxt(resultData.getString("reject_text"));
performances.setSort(resultData.getInt("sort"));
performances.setComment("");
performances.setCreatedAt(DateUtil.Formatter.yyyyMMddHHmmssS.parse(resultData.getTimestamp("created_at").toString()));
if (null != resultData.getTimestamp("updated_at")) {
performances.setUpdatedAt(DateUtil.Formatter.yyyyMMddHHmmssS.parse(resultData.getTimestamp("updated_at").toString()));
}
//Status
performanceStatus.setPerformanceStatusId(IDGenerator.nextSnowId().toString());
performanceStatus.setPerformanceId(performances.getPerformancesId());
performanceStatus.setIsShow(resultData.getInt("show"));
performanceStatus.setStatus(resultData.getInt("status"));
performanceStatus.setStatusSell(1);
performanceStatus.setIsDistribution(0);
performanceStatus.setSyncAgent(0);
performanceStatus.setSyncDamai(0);
performanceStatus.setAuditStatus(1);
performanceStatus.setIsTrueName(resultData.getString("need_id_card").equals("yes") ? 1 : 0);
performanceStatus.setLimitCount(resultData.getInt("num_limit_mobile"));
performanceStatus.setLimitCountMember(1);
performanceStatus.setIsRecommend(resultData.getInt("is_recommend"));
performanceStatus.setCreatedAt(performances.getCreatedAt());
performanceStatus.setUpdatedAt(performances.getUpdatedAt());
//Relation
performanceRelations.setPerformanceRelationsId(IDGenerator.nextSnowId().toString());
performanceRelations.setPerformanceId(performances.getPerformancesId());
performanceRelations.setCopyId(resultData.getInt("copy_id") + "");
performanceRelations.setMerchantId(resultData.getInt("merchant_id") + "");
performanceRelations.setFieldId(resultData.getInt("field_id") + "");
performanceRelations.setRoadShowId(resultData.getInt("road_show_id") + "");
performanceRelations.setProjectId("");
performanceRelations.setVideoId("");
performanceRelations.setCreatedAt(performances.getCreatedAt());
performanceRelations.setUpdatedAt(performances.getUpdatedAt());
performancesMapper.insert(performances);
performanceStatusMapper.insert(performanceStatus);
performanceRelationsMapper.insert(performanceRelations);
performancePartnerVo.setPerformancesId(performances.getPerformancesId());
performancePartnerVo.setImgPoster(performances.getImgPoster());
performancePartnerVo.setTitle(performances.getTitle());
performancePartnerVo.setType(performances.getType());
performancePartnerVo.setTimeStart(DateUtil.Formatter.yyyyMMddHHmmss.format(performances.getTimeStart()));
performancePartnerVo.setTimeEnd(DateUtil.Formatter.yyyyMMddHHmmss.format(performances.getTimeEnd()));
performancePartnerVo.setFieldId(performanceRelations.getFieldId());
performancePartnerVo.setFieldName((String) redisUtil.getDB15RedisHGet(KylinRedisConst.FIELDS + ":" + performanceRelations.getFieldId(), "name"));
performancePartnerVo.setNotice(performances.getNotice());
performancePartnerVo.setSponsorId(performances.getSponsorId());
performancePartnerVo.setSponsorType(performances.getSponsorType());
performancePartnerVo.setSponsor(performances.getSponsor());
performancePartnerVo.setContacts(performances.getContacts());
performancePartnerVo.setMobile(performances.getMobile());
performancePartnerVo.setDetails(performances.getDetails());
performancePartnerVo.setApprovalUrl(performances.getApprovalUrl());
performancePartnerVo.setPayCountdownMinute(5);
performancePartnerVo.setNoticeIds(new ArrayList<String>() {{
add("1");
add("3");
add("7");
add("12");
}});
performancePartnerVo.setNoticeImage(performances.getNoticeImage());
performancePartnerVo.setIsTrueName(performanceStatus.getIsTrueName());
performancePartnerVo.setLimitCount(performanceStatus.getLimitCount());
performancePartnerVo.setIsSubmit(1);
performancePartnerVo.setStatus(performanceStatus.getStatus());
performancePartnerVo.setMerchantId(performanceRelations.getMerchantId());
performancePartnerVo.setDescribes(performances.getDescribes());
performancePartnerVo.setStatusSell(performanceStatus.getStatusSell());
performancePartnerVo.setRoadShowId(performanceRelations.getRoadShowId());
performancePartnerVo.setRejectTxt(performances.getRejectTxt());
performancePartnerVo.setAuditStatus(1);
performancePartnerVo.setIsShow(performanceStatus.getIsShow());
performancePartnerVo.setProjectId(performances.getProvinceId());
// performancePartnerVo.setNoticeIds();
performancePartnerVo.setCreatedAt(DateUtil.Formatter.yyyyMMddHHmmss.format(performances.getCreatedAt()));
performancePartnerVo.setUpdatedAt(DateUtil.Formatter.yyyyMMddHHmmss.format(performances.getUpdatedAt()));
performancePartnerVo.setIsCreateSave(0);
mongoTemplate.insert(performancePartnerVo, PerformancePartnerVo.class.getSimpleName());
//场次相关
String timesSql = "select type,use_start,use_end,created_at from tickets where performance_id = " + performanceId + " GROUP BY use_start,use_end"; //设置的预编译语句格式
pstmt = con.prepareStatement(timesSql);
ResultSet timesData = pstmt.executeQuery();
HashMap<String, String> timeMap = new HashMap<>();
while (timesData.next()) {
String title = "";
String useStart = DateUtil.Formatter.yyyyMMddHHmmssS.parse(timesData.getTimestamp("use_start").toString()).format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm"));
;
String useEnd = DateUtil.Formatter.yyyyMMddHHmmssS.parse(timesData.getTimestamp("use_end").toString()).format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm"));
;
if (timesData.getInt("type") == 1) {
title = useStart;
} else {
title = useStart + "-" + useEnd;
}
//times
ticketTimes.setTicketTimesId(IDGenerator.nextSnowId().toString());
ticketTimes.setTitle(title);
ticketTimes.setType(timesData.getInt("type"));
ticketTimes.setStatus(1);
ticketTimes.setUseStart(DateUtil.Formatter.yyyyMMddHHmmssS.parse(timesData.getTimestamp("use_start").toString()));
ticketTimes.setUseEnd(DateUtil.Formatter.yyyyMMddHHmmssS.parse(timesData.getTimestamp("use_end").toString()));
ticketTimes.setComment("");
if (null != timesData.getTimestamp("created_at")) {
ticketTimes.setCreatedAt(DateUtil.Formatter.yyyyMMddHHmmssS.parse(timesData.getTimestamp("created_at").toString()));
}
ticketTimes.setUpdatedAt(null);
//Relation
ticketTimeRelation.setTicketTimeRelationId(IDGenerator.nextSnowId().toString());
ticketTimeRelation.setTimesId(ticketTimes.getTicketTimesId());
ticketTimeRelation.setPerformanceId(performanceId + "");
ticketTimeRelation.setCreatedAt(ticketTimes.getCreatedAt());
timeMap.put(title, ticketTimes.getTicketTimesId());
ticketTimesMapper.insert(ticketTimes);
ticketTimeRelationMapper.insert(ticketTimeRelation);
ticketTimesPartnerVo.setTicketTimesId(ticketTimes.getTicketTimesId());
ticketTimesPartnerVo.setPerformancesId(ticketTimeRelation.getPerformanceId());
ticketTimesPartnerVo.setType(ticketTimes.getType());
ticketTimesPartnerVo.setTitle(ticketTimes.getTitle());
ticketTimesPartnerVo.setStatus(ticketTimes.getStatus());
ticketTimesPartnerVo.setUseEnd(DateUtil.Formatter.yyyyMMddHHmmss.format(ticketTimes.getUseEnd()));
ticketTimesPartnerVo.setUseStart(DateUtil.Formatter.yyyyMMddHHmmss.format(ticketTimes.getUseStart()));
ticketTimesPartnerVo.setCreatedAt(DateUtil.Formatter.yyyyMMddHHmmss.format(ticketTimes.getCreatedAt()));
mongoTemplate.insert(ticketTimesPartnerVo, KylinTicketTimesPartnerVo.class.getSimpleName());
}
//票sql
String ticketSql = "select * from tickets where performance_id = " + performanceId; //设置的预编译语句格式
pstmt = con.prepareStatement(ticketSql);
ResultSet ticketData = pstmt.executeQuery();
while (ticketData.next()) {
//会员sql
String memberSql = "select status from performance_members where performance_id = " + performanceId; //设置的预编译语句格式
pstmt = con.prepareStatement(memberSql);
int isMember = 0;
ResultSet memberData = pstmt.executeQuery();
while (memberData.next()) {
isMember = memberData.getInt("status") == 1 ? 1 : 0;
}
String title = "";
String useStart = DateUtil.Formatter.yyyyMMddHHmmssS.parse(ticketData.getTimestamp("use_start").toString()).format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm"));
String useEnd = DateUtil.Formatter.yyyyMMddHHmmssS.parse(ticketData.getTimestamp("use_end").toString()).format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm"));
if (ticketData.getInt("type") == 1) {
title = useStart;
} else {
title = useStart + "-" + useEnd;
}
//Ticket
// tickets.setPerformancesId(IDGenerator.nextSnowId().toString());
tickets.setTicketsId(ticketData.getInt("id") + "");
tickets.setTitle(ticketData.getString("title"));
tickets.setType(ticketData.getInt("type"));
tickets.setPrice(ticketData.getBigDecimal("price"));
tickets.setPriceExpress(ticketData.getBigDecimal("price_express"));
tickets.setPriceDiscountMember(new BigDecimal("0.00"));
tickets.setPriceDiscount(new BigDecimal("0.00"));
tickets.setDescribes(ticketData.getString("describe"));
tickets.setDescribeExpress(ticketData.getString("describe_express"));
tickets.setDescribeElectronic(ticketData.getString("describe_electronic"));
tickets.setAdvanceMinuteMember(5);
tickets.setTimeStart(DateUtil.Formatter.yyyyMMddHHmmssS.parse(ticketData.getTimestamp("time_start").toString()));
tickets.setTimeEnd(DateUtil.Formatter.yyyyMMddHHmmssS.parse(ticketData.getTimestamp("time_end").toString()));
if (null != ticketData.getTimestamp("time_end_express")) {
tickets.setTimeEndExpress(DateUtil.Formatter.yyyyMMddHHmmssS.parse(ticketData.getTimestamp("time_end_express").toString()));
}
tickets.setUseStart(DateUtil.Formatter.yyyyMMddHHmmssS.parse(ticketData.getTimestamp("use_start").toString()));
tickets.setUseEnd(DateUtil.Formatter.yyyyMMddHHmmssS.parse(ticketData.getTimestamp("use_end").toString()));
tickets.setPayCountdownMinute(5);
tickets.setSaleRemindMinute(60);
tickets.setComment("");
if (null != ticketData.getTimestamp("created_at")) {
tickets.setCreatedAt(DateUtil.Formatter.yyyyMMddHHmmssS.parse(ticketData.getTimestamp("created_at").toString()));
}
if (null != ticketData.getTimestamp("updated_at")) {
tickets.setUpdatedAt(DateUtil.Formatter.yyyyMMddHHmmssS.parse(ticketData.getTimestamp("updated_at").toString()));
}
//Status
ticketStatus.setTicketStatusId(IDGenerator.nextSnowId().toString());
ticketStatus.setTicketId(tickets.getTicketsId());
ticketStatus.setIsStudent(ticketData.getString("student").equals("yes") ? 1 : 0);
ticketStatus.setIsElectronic(ticketData.getInt("is_electronic"));
ticketStatus.setIsExpress(ticketData.getInt("is_express"));
ticketStatus.setStatus(ticketData.getInt("status"));
ticketStatus.setCounts(1);
ticketStatus.setStatusExchange(7);
if (!performancePartnerVo.getType().equals(101)) {
ticketStatus.setIsShowCode(1);
} else {
ticketStatus.setIsShowCode(0);
}
ticketStatus.setQrCodeShowTime(tickets.getCreatedAt());
ticketStatus.setIsLackRegister(ticketData.getInt("is_lack_register"));
ticketStatus.setTotalGeneral(ticketData.getInt("total_general"));
ticketStatus.setTotalExchange(ticketData.getInt("total_exchange"));
ticketStatus.setSurplusGeneral(ticketData.getInt("surplus_general"));
ticketStatus.setSurplusExchange(ticketData.getInt("surplus_exchange"));
ticketStatus.setExpressType(ticketData.getInt("express_type"));
ticketStatus.setIsTrueName(ticketData.getString("need_id_card").equals("yes") ? 1 : 0);
ticketStatus.setLimitCount(ticketData.getInt("num_limit_mobile"));
ticketStatus.setMemberLimitCount(1);
ticketStatus.setIsTransfer(0);
ticketStatus.setIsExclusive(ticketData.getInt("is_exclusive"));
ticketStatus.setIsMember(isMember);
ticketStatus.setIsAgent(0);
ticketStatus.setSyncDamai(0);
ticketStatus.setCreatedAt(tickets.getCreatedAt());
if (null != ticketData.getTimestamp("updated_at")) {
ticketStatus.setUpdatedAt(tickets.getUpdatedAt());
}
//Relation
ticketRelations.setTicketRelationsId(IDGenerator.nextSnowId().toString());
ticketRelations.setTicketId(tickets.getTicketsId());
ticketRelations.setTimesId(timeMap.get(title));
ticketRelations.setCreatedAt(tickets.getCreatedAt());
if (null != ticketData.getTimestamp("updated_at")) {
ticketRelations.setUpdatedAt(tickets.getUpdatedAt());
}
ticketsMapper.insert(tickets);
ticketStatusMapper.insert(ticketStatus);
ticketRelationsMapper.insert(ticketRelations);
dataUtils.setSurplusGeneral(tickets.getTicketsId(), ticketStatus.getSurplusGeneral());
dataUtils.setSurplusExchange(tickets.getTicketsId(), ticketStatus.getSurplusExchange());
//Vo
ticketPartnerVo.setTicketsId(tickets.getTicketsId());
ticketPartnerVo.setTitle(tickets.getTitle());
ticketPartnerVo.setIsStudent(ticketStatus.getIsStudent());
ticketPartnerVo.setIsElectronic(ticketStatus.getIsElectronic());
ticketPartnerVo.setIsExpress(ticketStatus.getIsExpress());
ticketPartnerVo.setType(tickets.getType());
ticketPartnerVo.setPrice(tickets.getPrice());
ticketPartnerVo.setTimeEndExpress(DateUtil.Formatter.yyyyMMddHHmmss.format(tickets.getTimeEndExpress()));
ticketPartnerVo.setTotalGeneral(ticketStatus.getTotalGeneral());
ticketPartnerVo.setTotalExchange(ticketStatus.getTotalExchange());
ticketPartnerVo.setLimitCount(ticketStatus.getLimitCount());
ticketPartnerVo.setCounts(1);
ticketPartnerVo.setTimeStart(DateUtil.Formatter.yyyyMMddHHmmss.format(tickets.getTimeStart()));
ticketPartnerVo.setTimeEnd(DateUtil.Formatter.yyyyMMddHHmmss.format(tickets.getTimeEnd()));
ticketPartnerVo.setUseStart(DateUtil.Formatter.yyyyMMddHHmmss.format(tickets.getUseStart()));
ticketPartnerVo.setUseEnd(DateUtil.Formatter.yyyyMMddHHmmss.format(tickets.getUseEnd()));
ticketPartnerVo.setDescribes(tickets.getDescribes());
ticketPartnerVo.setDescribeExpress(tickets.getDescribeExpress());
ticketPartnerVo.setDescribeElectronic(tickets.getDescribeElectronic());
ticketPartnerVo.setStatus(ticketStatus.getStatus());
ticketPartnerVo.setIsShowCode(ticketStatus.getIsShowCode());
ticketPartnerVo.setQrCodeShowTime(DateUtil.Formatter.yyyyMMddHHmmss.format(ticketStatus.getQrCodeShowTime()));
ticketPartnerVo.setTimesId(ticketRelations.getTimesId());
ticketPartnerVo.setIsLackRegister(ticketStatus.getIsLackRegister());
ticketPartnerVo.setSurplusGeneral(ticketStatus.getSurplusGeneral());
ticketPartnerVo.setSurplusExchange(ticketStatus.getSurplusExchange());
ticketPartnerVo.setExpressType(ticketStatus.getExpressType());
ticketPartnerVo.setIsTransfer(ticketStatus.getIsTransfer());
ticketPartnerVo.setIsMember(ticketStatus.getIsMember());
ticketPartnerVo.setIsExclusive(ticketStatus.getIsExclusive());
ticketPartnerVo.setCreatedAt(DateUtil.Formatter.yyyyMMddHHmmss.format(tickets.getCreatedAt()));
ticketPartnerVo.setUpdatedAt(DateUtil.Formatter.yyyyMMddHHmmss.format(tickets.getUpdatedAt()));
mongoTemplate.insert(ticketPartnerVo, KylinTicketPartnerVo.class.getSimpleName());
}
}
for (int i = 0; i < performanceIds.size(); i++) {
performanceVoTask.performanceVoStatus(performanceIds.get(i));
}
resultData.last();
rowCount += resultData.getRow();
if (allCountResult > rowCount) {
isBreak = true;
page += 1;
} else {
isBreak = false;
}
} while (isBreak);
return true;
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException(e);
} finally {
//关闭资源,倒关
try {
if (rs != null) rs.close();
if (pstmt != null) pstmt.close();
if (con != null) con.close(); //必须要关
} catch (Exception e) {
}
}
} catch (Exception e) {
return false;
}
}
public boolean order(String month) {
String driverClassName = "com.mysql.cj.jdbc.Driver"; //启动驱动
String url = "jdbc:mysql://pc-2ze6z2hxkug559q79.mysql.polardb.rds.aliyuncs.com:3306/mall"; //设置连接路径
// String url = "jdbc:mysql://zhengzai.mysql.polardb.rds.aliyuncs.com:3306/mall";
String username = "readonly"; //数据库用户名
String password = "ZWDsf8Fy"; //数据库连接密码
Connection con = null; //连接
PreparedStatement pstmt = null; //使用预编译语句
ResultSet rs = null; //获取的结果集
try {
int count = 3000;
int page = 0;
Class.forName(driverClassName); //执行驱动
con = DriverManager.getConnection(url, username, password); //获取连接
String sqlAllCount = "select count(0) as 'allCount' from order_tickets where performance_id > 5721 and status != 2 and status != -1 and created_at like '2020-" + month + "%'"; //设置的预编译语句格式
// String sqlAllCount = "select count(0) as 'allCount' from order_tickets where performance_id = "+month + " and status != 2 and status !=-1"; //设置的预编译语句格式
pstmt = con.prepareStatement(sqlAllCount);
ResultSet allCount = pstmt.executeQuery();
int allCountResult = 0;//共多少条
int rowCount = 0;//当前多少条
boolean isBreak = false;//是否终端循环
while (allCount.next()) {
allCountResult = allCount.getInt("allCount");
}
allCount.close();
pstmt.close();
do {
ArrayList<KylinOrderTickets> orderList = new ArrayList();
ArrayList<KylinOrderTicketStatus> orderStatusList = new ArrayList();
ArrayList<KylinOrderTicketRelations> orderRelationList = new ArrayList();
ArrayList<KylinOrderTicketEntities> orderEntitiesList = new ArrayList();
ArrayList<KylinOrderTicketVo> orderListVo = new ArrayList();
ArrayList<KylinOrderTicketEntitiesVo> orderEntitiesListVo = new ArrayList();
//订单
String sql = "select * from order_tickets where performance_id > 5721 and status != 2 and status != -1 and created_at like '2021-" + month + "%' limit " + count * page + " ," + count; //设置的预编译语句格式
// String sql = "select * from order_tickets where performance_id = "+month +" and status != 2 limit " + count * page + " ," + count;
pstmt = con.prepareStatement(sql);
ResultSet orderData = pstmt.executeQuery();
while (orderData.next()) {
KylinOrderTickets orderTickets = new KylinOrderTickets();
KylinOrderTicketStatus orderTicketStatus = new KylinOrderTicketStatus();
KylinOrderTicketRelations orderTicketRelations = new KylinOrderTicketRelations();
KylinOrderTicketVo orderTicketVo = new KylinOrderTicketVo();
ArrayList<KylinOrderTicketEntitiesVo> entitiesVosList = new ArrayList<>();
String ticketSql = "select student,use_end,use_start,title,type from tickets where id = " + orderData.getInt("ticket_id"); //设置的预编译语句格式
pstmt = con.prepareStatement(ticketSql);
ResultSet ticketData = pstmt.executeQuery();
int isStudent = 0;
String useEnd = "";
String useStart = "";
String ticketTitle = "";
int ticketType = 0;
while (ticketData.next()) {
isStudent = ticketData.getString("student").equals("yes") ? 1 : 0;
ticketTitle = ticketData.getString("title");
ticketType = ticketData.getInt("type");
useEnd = DateUtil.Formatter.yyyyMMddHHmmss.format(DateUtil.Formatter.yyyyMMddHHmmssS.parse(ticketData.getTimestamp("use_end").toString()));
useStart = DateUtil.Formatter.yyyyMMddHHmmss.format(DateUtil.Formatter.yyyyMMddHHmmssS.parse(ticketData.getTimestamp("use_start").toString()));
}
//退款
String refundSql = "select refund_table_id,sum(refund_number) as 'refund_number',sum(refund_price) as 'refund_price' from order_refunds where refund_table = 'order_ticket_entities' and order_id = " + orderData.getInt("id") + " and refund_status = 4 group by refund_table_id"; //设置的预编译语句格式
pstmt = con.prepareStatement(refundSql);
int refundNumber = 0;
BigDecimal refundPrice = new BigDecimal("0.00");
ResultSet refundData = pstmt.executeQuery();
while (refundData.next()) {
refundNumber += refundData.getInt("refund_number");
refundPrice = refundPrice.add(refundData.getBigDecimal("refund_price"));
}
//演出
String performancedSql = "select time_start,img_poster,need_id_card,notice from performances where id =" + orderData.getInt("performance_id");
pstmt = con.prepareStatement(performancedSql);
ResultSet performanceData = pstmt.executeQuery();
String performanceTimeStart = "";
String performanceImg = "";
int isTrueName = 0;
String notice = "";
while (performanceData.next()) {
performanceTimeStart = DateUtil.Formatter.yyyyMMddHHmmss.format(DateUtil.Formatter.yyyyMMddHHmmssS.parse(performanceData.getTimestamp("time_start").toString()));
performanceImg = performanceData.getString("img_poster");
isTrueName = performanceData.getString("need_id_card").equals("yes") ? 1 : 0;
notice = performanceData.getString("notice");
}
orderTickets.setOrderTicketsId(orderData.getInt("id") + "");
orderTickets.setUserId(orderData.getInt("user_id") + "");
orderTickets.setUserName(orderData.getString("user_name"));
orderTickets.setUserMobile(orderData.getString("user_mobile"));
orderTickets.setPerformanceTitle(orderData.getString("performance_title"));
orderTickets.setOrderCode(orderData.getString("order_code"));
orderTickets.setPayCode(orderData.getString("pay_code"));
orderTickets.setQrCode(orderData.getString("qr_code"));
orderTickets.setOrderType(orderData.getString("order_type"));
orderTickets.setOrderSource(orderData.getString("order_type"));
orderTickets.setOrderVersion(orderData.getString("order_version"));
orderTickets.setNumber(orderData.getInt("number"));
orderTickets.setPrice(orderData.getBigDecimal("price"));
orderTickets.setPriceMember(orderData.getBigDecimal("price_member"));
orderTickets.setPriceTotal(orderData.getBigDecimal("price_total"));
orderTickets.setPriceVoucher(orderData.getBigDecimal("price_voucher"));
orderTickets.setPriceActual(orderData.getBigDecimal("price_actual"));
orderTickets.setPriceExpress(orderData.getBigDecimal("price_express"));
orderTickets.setPaymentId(orderData.getString("in_pay_code"));
orderTickets.setPriceRefund(refundPrice);
orderTickets.setRefundNumber(refundNumber);
orderTickets.setPayType(orderData.getString("pay_type"));
orderTickets.setPaymentType(orderData.getString("payment_type"));
orderTickets.setTimePay(orderData.getString("time_pay"));
orderTickets.setExpressContacts(orderData.getString("express_contacts"));
orderTickets.setExpressAddress(orderData.getString("express_address"));
orderTickets.setExpressPhone(orderData.getString("express_phone"));
orderTickets.setCouponType(orderData.getString("coupon_type"));
orderTickets.setGetTicketType(orderData.getString("get_ticket_type"));
orderTickets.setGetTicketDescribe(orderData.getString("get_ticket_describe"));
orderTickets.setPayCountdownMinute(orderData.getInt("pay_countdown_minute"));
orderTickets.setComment("");
orderTickets.setCreatedAt(DateUtil.Formatter.yyyyMMddHHmmssS.parse(orderData.getTimestamp("created_at").toString()));
if (null != orderData.getTimestamp("updated_at")) {
orderTickets.setUpdatedAt(DateUtil.Formatter.yyyyMMddHHmmssS.parse(orderData.getTimestamp("updated_at").toString()));
}
orderTicketStatus.setOrderTicketStatusId(IDGenerator.nextSnowId().toString());
orderTicketStatus.setOrderId(orderTickets.getOrderTicketsId());
orderTicketStatus.setExpressType(orderData.getInt("express_type"));
orderTicketStatus.setIsStudent(isStudent);
orderTicketStatus.setTransferStatus(orderData.getInt("transfer_status"));
orderTicketStatus.setStatus(orderData.getInt("status"));
orderTicketStatus.setPayStatus(orderData.getInt("pay_status"));
orderTicketStatus.setCreatedAt(orderTickets.getCreatedAt());
orderTicketStatus.setUpdatedAt(orderTickets.getUpdatedAt());
orderTicketRelations.setOrderTicketRelationsId(IDGenerator.nextSnowId().toString());
orderTicketRelations.setOrderId(orderTickets.getOrderTicketsId());
orderTicketRelations.setTransferId(orderData.getInt("transfer_id") + "");
orderTicketRelations.setLiveId(orderData.getInt("live_id") + "");
orderTicketRelations.setPerformanceId(orderData.getString("performance_id"));
orderTicketRelations.setTimeId("");
orderTicketRelations.setTicketId(orderData.getString("ticket_id"));
orderTicketRelations.setAgentId(orderData.getString("proxy_id"));
orderTicketRelations.setIsMember(orderData.getInt("is_member"));
orderTicketRelations.setCreatedAt(orderTickets.getCreatedAt());
orderTicketRelations.setUpdatedAt(orderTickets.getUpdatedAt());
orderList.add(orderTickets);
orderStatusList.add(orderTicketStatus);
orderRelationList.add(orderTicketRelations);
// orderTicketsMapper.insert(orderTickets);
// orderTicketStatusMapper.insert(orderTicketStatus);
// orderTicketRelationsMapper.insert(orderTicketRelations);
//vo
orderTicketVo.setMid(0);
orderTicketVo.setOrderTicketsId(orderTickets.getOrderTicketsId());
orderTicketVo.setUserId(orderTickets.getUserId());
orderTicketVo.setUserName(orderTickets.getUserName());
orderTicketVo.setUserMobile(orderTickets.getUserMobile());
orderTicketVo.setPerformanceTitle(orderTickets.getPerformanceTitle());
orderTicketVo.setTicketTitle(ticketTitle);
orderTicketVo.setTimeStart(performanceTimeStart);
orderTicketVo.setUseStart(useStart);
orderTicketVo.setPerformanceImg(performanceImg);
orderTicketVo.setOrderCode(orderTickets.getOrderCode());
orderTicketVo.setPayCode(orderTickets.getPayCode());
orderTicketVo.setQrCode(orderTickets.getQrCode());
orderTicketVo.setOrderType(orderTickets.getOrderType());
orderTicketVo.setOrderVersion(orderTickets.getOrderVersion());
orderTicketVo.setNumber(orderTickets.getNumber());
orderTicketVo.setPrice(orderTickets.getPrice());
orderTicketVo.setPriceMember(orderTickets.getPriceMember());
orderTicketVo.setPriceTotal(orderTickets.getPriceTotal());
orderTicketVo.setPriceVoucher(orderTickets.getPriceVoucher());
orderTicketVo.setPriceActual(orderTickets.getPriceActual());
orderTicketVo.setPriceExpress(orderTickets.getPriceExpress());
orderTicketVo.setPriceRefund(orderTickets.getPriceRefund());
orderTicketVo.setRefundNumber(orderTickets.getRefundNumber());
orderTicketVo.setPayType(orderTickets.getPayType());
orderTicketVo.setPaymentType(orderTickets.getPaymentType());
orderTicketVo.setTimePay(orderTickets.getTimePay());
orderTicketVo.setExpressContacts(orderTickets.getExpressContacts());
orderTicketVo.setExpressAddress(orderTickets.getExpressAddress());
orderTicketVo.setExpressPhone(orderTickets.getExpressPhone());
orderTicketVo.setCouponType(orderTickets.getCouponType());
orderTicketVo.setGetTicketType(orderTickets.getGetTicketType());
orderTicketVo.setGetTicketDescribe(orderTickets.getGetTicketDescribe());
orderTicketVo.setPayCountdownMinute(orderTickets.getPayCountdownMinute());
orderTicketVo.setExpressType(orderTicketStatus.getExpressType());
orderTicketVo.setIsStudent(orderTicketStatus.getIsStudent());
orderTicketVo.setTransferStatus(orderTicketStatus.getTransferStatus());
orderTicketVo.setStatus(orderTicketStatus.getStatus());
orderTicketVo.setPayStatus(orderTicketStatus.getPayStatus());
orderTicketVo.setTransferId(orderTicketRelations.getTransferId());
orderTicketVo.setLiveId(orderTicketRelations.getLiveId());
orderTicketVo.setPerformanceId(orderTicketRelations.getPerformanceId());
orderTicketVo.setTimeId(orderTicketRelations.getTimeId());
orderTicketVo.setTicketId(orderTicketRelations.getTicketId());
orderTicketVo.setAgentId(orderTicketRelations.getAgentId());
orderTicketVo.setIsMember(orderTicketRelations.getIsMember());
orderTicketVo.setCreatedAt(DateUtil.Formatter.yyyyMMddHHmmss.format(orderTickets.getCreatedAt()));
orderTicketVo.setUpdatedAt(DateUtil.Formatter.yyyyMMddHHmmss.format(orderTickets.getUpdatedAt()));
orderTicketVo.setChangeDate(orderTickets.getUpdatedAt() == null ? orderTickets.getUpdatedAt() : orderTickets.getCreatedAt());
orderTicketVo.setIsTrueName(isTrueName);
orderTicketVo.setOverdueAt(orderTickets.getCreatedAt().plusMinutes(orderTickets.getPayCountdownMinute()).plusSeconds(15).format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
orderTicketVo.setNoticeImage("[{\"id\":1,\"sort\":1,\"message\":\"因演出票品非普通商品,其背后承载的文化服务具有时效性、稀缺性等特征,故不适用7天无理由退货政策。因“不可抗力”导致的演出取消或延期除外。\",\"title\":\"门票退换\",\"type\":\"image\",\"imgUrl\":\"http://img-zhengzai-tv.oss-cn-hangzhou.aliyuncs.com/partner/2019/01/21/5c45722882a13.png\"},{\"id\":7,\"sort\":2,\"message\":\"凭订单二维码或手机号兑票入场,二维码或手机号请勿泄露,以免影响入场。个人原因导致的信息泄露,主办方/平台方不承担任何责任。\",\"title\":\"电子票\",\"type\":\"image\",\"imgUrl\":\"http://img-zhengzai-tv.oss-cn-hangzhou.aliyuncs.com/partner/2019/01/21/5c456d9482fb9.png\"},{\"id\":3,\"sort\":3,\"message\":\"本场演出不设座位,均为站席观演。\",\"title\":\"仅设站席\",\"type\":\"image\",\"imgUrl\":\"http://img-zhengzai-tv.oss-cn-hangzhou.aliyuncs.com/partner/2019/01/21/5c456e93db0b9.png\"},{\"id\":12,\"sort\":4,\"message\":\"每场现场票数量由场地方决定,具体请到现场询问。\",\"title\":\"现场票\",\"type\":\"image\",\"imgUrl\":\"http://img-zhengzai-tv.oss-cn-hangzhou.aliyuncs.com/partner/2019/06/17/5d07647eaa55f.png\"}]");
orderTicketVo.setNotice(notice);
orderTicketVo.setTicketType(ticketType);
orderTicketVo.setFieldName((String) redisUtil.getDB15RedisHGet(KylinRedisConst.FIELDS + ":" + orderTicketRelations.getPerformanceId(), "name"));
//入场人
String enterSql = "select * from order_ticket_entities where order_id = " + orderTickets.getOrderTicketsId(); //设置的预编译语句格式
pstmt = con.prepareStatement(enterSql);
ResultSet enterData = pstmt.executeQuery();
while (enterData.next()) {
KylinOrderTicketEntitiesVo entitiesVo = new KylinOrderTicketEntitiesVo();
KylinOrderTicketEntities orderTicketEntities = new KylinOrderTicketEntities();
orderTicketEntities.setOrderTicketEntitiesId(enterData.getInt("id") + "");
orderTicketEntities.setOrderId(orderTickets.getOrderTicketsId());
orderTicketEntities.setTicketId(enterData.getInt("ticket_id") + "");
orderTicketEntities.setUserId(enterData.getInt("user_id") + "");
orderTicketEntities.setPerformanceId(enterData.getInt("performance_id") + "");
orderTicketEntities.setTimeId("");
orderTicketEntities.setEnterType(Integer.parseInt(enterData.getString("enter_type")));
orderTicketEntities.setEnterName(enterData.getString("enter_name"));
orderTicketEntities.setEnterMobile(enterData.getString("enter_mobile"));
orderTicketEntities.setEnterIdCode(enterData.getString("enter_idcode"));
orderTicketEntities.setStatus(enterData.getInt("status"));
orderTicketEntities.setSysDamai(0);
orderTicketEntities.setCheckClient("");
int isPayment = 0;
switch (enterData.getString("is_payment")) {
case "yes":
isPayment = 1;
break;
case "no":
isPayment = 0;
break;
case "refunding":
isPayment = 2;
break;
case "refunded":
isPayment = 3;
break;
}
orderTicketEntities.setIsPayment(isPayment);
orderTicketEntities.setRefundPrice(isPayment == 3 ? orderTickets.getPrice() : new BigDecimal("0.00"));
orderTicketEntities.setComment("");
orderTicketEntities.setCreatedAt(DateUtil.Formatter.yyyyMMddHHmmssS.parse(orderData.getTimestamp("created_at").toString()));
if (null != orderData.getTimestamp("updated_at")) {
orderTicketEntities.setUpdatedAt(DateUtil.Formatter.yyyyMMddHHmmssS.parse(orderData.getTimestamp("updated_at").toString()));
}
orderEntitiesList.add(orderTicketEntities);
// orderTicketEntitiesMapper.insert(orderTicketEntities);
//vo
entitiesVo.setMid(0);
entitiesVo.setOrderTicketEntitiesId(orderTicketEntities.getOrderTicketEntitiesId());
entitiesVo.setOrderId(orderTicketEntities.getOrderId());
entitiesVo.setTicketId(orderTicketEntities.getTicketId());
entitiesVo.setUserId(orderTicketEntities.getUserId());
entitiesVo.setPerformanceId(orderTicketEntities.getPerformanceId());
entitiesVo.setTimeId(orderTicketEntities.getTimeId());
entitiesVo.setEnterType(orderTicketEntities.getEnterType());
entitiesVo.setEnterName(orderTicketEntities.getEnterName());
entitiesVo.setEnterMobile(orderTicketEntities.getEnterMobile());
entitiesVo.setEnterIdCode(orderTicketEntities.getEnterIdCode());
entitiesVo.setStatus(orderTicketEntities.getStatus());
entitiesVo.setSysDamai(orderTicketEntities.getSysDamai());
entitiesVo.setCheckClient(orderTicketEntities.getCheckClient());
entitiesVo.setIsPayment(orderTicketEntities.getIsPayment());
entitiesVo.setPerformanceTitle(orderTickets.getPerformanceTitle());
entitiesVo.setTicketTitle(ticketTitle);
entitiesVo.setUseStart(useStart);
entitiesVo.setUseEnd(useEnd);
entitiesVo.setCreatedAt(DateUtil.Formatter.yyyyMMddHHmmss.format(orderTicketEntities.getCreatedAt()));
entitiesVo.setUpdatedAt(DateUtil.Formatter.yyyyMMddHHmmss.format(orderTicketEntities.getUpdatedAt()));
// entitiesVo.setTicketsmId(0);
// entitiesVo.setTimemId(0);
entitiesVo.setChangeDate(orderTicketEntities.getUpdatedAt() == null ? orderTicketEntities.getUpdatedAt() : orderTicketEntities.getCreatedAt());
// mongoTemplate.insert(entitiesVo, KylinOrderTicketEntitiesVo.class.getSimpleName());
entitiesVosList.add(entitiesVo);
orderEntitiesListVo.add(entitiesVo);
}
orderTicketVo.setEntitiesVoList(entitiesVosList);
orderListVo.add(orderTicketVo);
// mongoTemplate.insert(orderTicketVo, KylinOrderTicketVo.class.getSimpleName());
} }
int score = 0;
dmCheckOrderTime.saveBatch(orderList); //创建 用户积分数据
dmOrderTicketStatus.saveBatch(orderStatusList); int isExists = stoneScoreUserMapper.selectCount(Wrappers.lambdaQuery(StoneScoreUser.class).eq(StoneScoreUser::getUid, uid));
dmOrderTicketRelations.saveBatch(orderRelationList); if (isExists <= 0) {
dmOrderTicketEntitiesService.saveBatch(orderEntitiesList); StoneScoreUser data = new StoneScoreUser();
data.setStatus(1);
mongoTemplate.insert(orderListVo, KylinOrderTicketVo.class.getSimpleName()); data.setScoreId(IDGenerator.nextTimeId2());
mongoTemplate.insert(orderEntitiesListVo, KylinOrderTicketEntitiesVo.class.getSimpleName()); data.setUid(uid);
data.setCreatedAt(LocalDateTime.now());
orderData.last(); stoneScoreUserMapper.insert(data);
rowCount += orderData.getRow();
if (allCountResult > rowCount) { StoneUserVo userTaskVo = StoneUserVo.getNew();
isBreak = true; userTaskVo.getTask();
page += 1; userTaskVo.setUid(uid);
} else { userTaskVo.setStatus(1);
isBreak = false; userCreate(userTaskVo);
} }
//获取演出每日任务积分
} while (isBreak); int performanceCount = orderTicketsMapper.getOrderScore(uid).size();
score += performanceCount * 5;
return true; //获取商品每日任务积分
} catch (Exception e) { //获取 关注摩登天空服务号
e.printStackTrace(); //获取用户相关信息
throw new RuntimeException(e); if (null != userInfoVo.getSex()) {
} finally { //获取 完善个人信息
//关闭资源,倒关 MultiValueMap<String, String> params = CollectionUtil.linkedMultiValueMapStringString();
try { params.add("uid", uid);
if (rs != null) rs.close(); params.add("taskId", 5 + "");
if (pstmt != null) pstmt.close(); HttpUtil.post(stoneUrl + "/user/inner/doTask", params);
if (con != null) con.close(); //必须要关
} catch (Exception e) {
}
}
}
public boolean roadShow() {
String driverClassName = "com.mysql.cj.jdbc.Driver"; //启动驱动
String url = "jdbc:mysql://pc-2ze6z2hxkug559q79.mysql.polardb.rds.aliyuncs.com:3306/mall"; //设置连接路径
String username = "readonly"; //数据库用户名
String password = "ZWDsf8Fy"; //数据库连接密码
Connection con = null; //连接
PreparedStatement pstmt = null; //使用预编译语句
ResultSet rs = null; //获取的结果集
try {
ArrayList<KylinRoadShows> roadShowsList = new ArrayList();
Class.forName(driverClassName); //执行驱动
con = DriverManager.getConnection(url, username, password); //获取连接
String sql = "select rs.id,rs.title,rs.img_poster,rs.created_at,rs.updated_at,count(p.id) as 'count' from road_shows as rs left join performances as p on p.road_show_id = rs.id where p.id > 5721 group by rs.id,rs.title having count>0";
pstmt = con.prepareStatement(sql);
ResultSet resultData = pstmt.executeQuery();
//演出数据
while (resultData.next()) {
KylinRoadShows roadShows = new KylinRoadShows();
roadShows.setRoadShowsId(resultData.getInt("id") + "");
roadShows.setTitle(resultData.getString("title"));
roadShows.setImgPoster(resultData.getString("img_poster"));
roadShows.setStatus(1);
roadShows.setComment("");
roadShows.setCreatedAt(DateUtil.Formatter.yyyyMMddHHmmssS.parse(resultData.getTimestamp("created_at").toString()));
if (null != resultData.getTimestamp("updated_at")) {
roadShows.setUpdatedAt(DateUtil.Formatter.yyyyMMddHHmmssS.parse(resultData.getTimestamp("updated_at").toString()));
} }
roadShowsList.add(roadShows); if (StringUtils.isNotBlank(userInfoVo.getBackground()) && !defaultBackgroundList.contains(userInfoVo.getBackground())) {
} //获取 完善个人照片
dmRoadShowsService.saveBatch(roadShowsList); MultiValueMap<String, String> params = CollectionUtil.linkedMultiValueMapStringString();
params.add("uid", uid);
return true; params.add("taskId", 6 + "");
} catch (Exception e) { HttpUtil.post(stoneUrl + "/user/inner/doTask", params);
e.printStackTrace();
throw new RuntimeException(e);
} finally {
//关闭资源,倒关
try {
if (rs != null) rs.close();
if (pstmt != null) pstmt.close();
if (con != null) con.close(); //必须要关
} catch (Exception e) {
}
}
}
public boolean childAccount() {
String driverClassName = "com.mysql.cj.jdbc.Driver"; //启动驱动
String url = "jdbc:mysql://pc-2ze6z2hxkug559q79.mysql.polardb.rds.aliyuncs.com:3306/mall"; //设置连接路径
String username = "readonly"; //数据库用户名
String password = "ZWDsf8Fy"; //数据库连接密码
Connection con = null; //连接
PreparedStatement pstmt = null; //使用预编译语句
ResultSet rs = null; //获取的结果集
try {
ArrayList<KylinCheckUser> checkUserList = new ArrayList();
ArrayList<KylinCheckUserVo> checkUserVoArrayList = new ArrayList();
Class.forName(driverClassName); //执行驱动
con = DriverManager.getConnection(url, username, password); //获取连接
String sql = "select m.id,name,mobile,father_id,m.created_at,m.updated_at from merchants as m left join merchant_relation as mr on m.id = mr.child_id where is_own = 'no' and mobile not like '%&%' group by mobile";
pstmt = con.prepareStatement(sql);
ResultSet resultData = pstmt.executeQuery();
//演出数据
while (resultData.next()) {
KylinCheckUser checkUser = new KylinCheckUser();
checkUser.setCheckUserId(resultData.getInt("id") + "");
checkUser.setMerchantId(resultData.getInt("father_id") + "");
checkUser.setMobile(resultData.getString("mobile"));
checkUser.setName(resultData.getString("name"));
checkUser.setPwd(StringUtil.right(checkUser.getMobile(), 8));
checkUser.setStatus(1);
if (null != resultData.getTimestamp("created_at")) {
checkUser.setCreatedAt(DateUtil.Formatter.yyyyMMddHHmmssS.parse(resultData.getTimestamp("created_at").toString()));
} }
if (null != resultData.getTimestamp("updated_at")) { if (userInfoVo.getIsComplete() == 11) {
checkUser.setUpdatedAt(DateUtil.Formatter.yyyyMMddHHmmssS.parse(resultData.getTimestamp("updated_at").toString())); //获取 首次体验在场
MultiValueMap<String, String> params = CollectionUtil.linkedMultiValueMapStringString();
params.add("uid", uid);
params.add("taskId", 8 + "");
HttpUtil.post(stoneUrl + "/user/inner/doTask", params);
} }
//生成用户积分日志
KylinCheckUserVo checkUserVo = new KylinCheckUserVo(); int isLog = stoneScoreLogsMapper.selectCount(Wrappers.lambdaQuery(StoneScoreLogs.class).eq(StoneScoreLogs::getUid, uid).eq(StoneScoreLogs::getContent, "历史积分"));
checkUserVo.setCheckUserId(checkUser.getCheckUserId()); if (isLog <= 0) {
checkUserVo.setMerchantId(checkUser.getMerchantId()); MultiValueMap<String, String> params = CollectionUtil.linkedMultiValueMapStringString();
checkUserVo.setMobile(checkUser.getMobile()); params.add("uid", uid);
checkUserVo.setName(checkUser.getName()); params.add("score", score + "");
checkUserVo.setPwd(DigestUtils.md5DigestAsHex(StringUtil.right(checkUser.getMobile(), 8).getBytes())); params.add("content", "历史积分");
checkUserVo.setStatus("1"); HttpUtil.post(stoneUrl + "/user/logs/in2111", params);
checkUserList.add(checkUser);
checkUserVoArrayList.add(checkUserVo);
//关系
ArrayList<KylinCheckUserPerformances> checkUserPerformancesArrayList = new ArrayList();
List<CheckPerformanceRelationParam> voList = new ArrayList();
KylinCheckUserPerformanceVo checkUserPerformanceVo = new KylinCheckUserPerformanceVo();
checkUserPerformanceVo.setCheckUserId(checkUser.getCheckUserId());
String relationSql = "select * from performance_visit_children where performance_id > 5721 and merchant_id = " + checkUser.getCheckUserId(); //设置的预编译语句格式
pstmt = con.prepareStatement(relationSql);
ResultSet relationData = pstmt.executeQuery();
while (relationData.next()) {
KylinCheckUserPerformances checkUserPerformances = new KylinCheckUserPerformances();
checkUserPerformances.setCheckUserId(relationData.getInt("merchant_id") + "");
checkUserPerformances.setPerformanceId(relationData.getInt("performance_id") + "");
checkUserPerformances.setCheckUserPerformanceId(relationData.getInt("id") + "");
checkUserPerformances.setStatus(1);
checkUserPerformances.setCreatedAt(DateUtil.Formatter.yyyyMMddHHmmssS.parse(relationData.getTimestamp("created_at").toString()));
checkUserPerformances.setCanDownTime(checkUserPerformances.getCreatedAt());
if (null != relationData.getTimestamp("updated_at")) {
checkUserPerformances.setUpdatedAt(DateUtil.Formatter.yyyyMMddHHmmssS.parse(relationData.getTimestamp("updated_at").toString()));
}
checkUserPerformancesArrayList.add(checkUserPerformances);
CheckPerformanceRelationParam voData = new CheckPerformanceRelationParam();
voData.setPerformanceId(checkUserPerformances.getPerformanceId());
voData.setCanDownTime(DateUtil.Formatter.yyyyMMddHHmmss.format(checkUserPerformances.getCreatedAt()));
voList.add(voData);
} }
checkUserPerformanceVo.setRelationParams(voList);
dmCheckUserPerformanceService.saveBatch(checkUserPerformancesArrayList);
mongoTemplate.insert(checkUserPerformanceVo, KylinCheckUserPerformanceVo.class.getSimpleName());
} }
dmCheckUserService.saveBatch(checkUserList);
mongoTemplate.insert(checkUserVoArrayList, KylinCheckUserVo.class.getSimpleName());
return true;
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
throw new RuntimeException(e); return false;
} finally {
//关闭资源,倒关
try {
if (rs != null) rs.close();
if (pstmt != null) pstmt.close();
if (con != null) con.close(); //必须要关
} catch (Exception e) {
}
} }
return true;
} }
// // redis 库存迁移 /**
// private static final JedisPool jedisPool; * 创建 用户积分
// private static final ObjectMapper toObjMapper; *
// * @param data
// static { * @return
//// DefaultJedisClientConfig.Builder builder = DefaultJedisClientConfig.builder().password("NBs$%6hW").database(15); */
//// jedis = new Jedis(new HostAndPort("zhengzai.redis.rds.aliyuncs.com", 6380), builder.build()); public Object userCreate(StoneUserVo data) {
// return mongoTemplate.insert(data, StoneUserVo.class.getSimpleName());
// jedisPool = new JedisPool("zhengzai.redis.rds.aliyuncs.com", 6380); }
//
// toObjMapper = new ObjectMapper();
// toObjMapper.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
// toObjMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
// toObjMapper.registerModule(new JavaTimeModule());
// toObjMapper.activateDefaultTyping(toObjMapper.getPolymorphicTypeValidator(), ObjectMapper.DefaultTyping.NON_FINAL);
// }
// public boolean SurplusRedis() {
// Jedis jedis = null;
// try {
// jedis = jedisPool.getResource();
// jedis.auth("NBs$%6hW");
// jedis.select(15);
//
// List<KylinTicketStatus> ticketStatus = ticketStatusMapper.selectList(Wrappers.lambdaQuery(KylinTicketStatus.class));
// for (KylinTicketStatus item : ticketStatus) {
// String ticketId = item.getTicketId();
// try {
// dataUtils.setSurplusGeneral(ticketId, toObjMapper.readValue(jedis.get(KylinRedisConst.PERFORMANCES_INVENTORY + ticketId + ":" + KylinRedisConst.SURPLUS_GENERAL), Integer.class));
// dataUtils.setSurplusExchange(ticketId, toObjMapper.readValue(jedis.get(KylinRedisConst.PERFORMANCES_INVENTORY + ticketId + ":" + KylinRedisConst.SURPLUS_EXCHANGE), Integer.class));
// } catch (Exception e) {
// e.printStackTrace();
// }
// }
// return true;
// } catch (Exception e) {
// e.printStackTrace();
// return false;
// } finally {
// if (jedis != null) {
// jedis.close();
// }
// }
// }
} }
...@@ -37,13 +37,15 @@ public class StoneScoreUserServiceImpl implements IStoneScoreUserService { ...@@ -37,13 +37,15 @@ public class StoneScoreUserServiceImpl implements IStoneScoreUserService {
StoneMongoUtils mongoUtils; StoneMongoUtils mongoUtils;
@Autowired @Autowired
QueueUtils queueUtils; QueueUtils queueUtils;
@Autowired
InnerUtils innerUtils;
@Override @Override
public StoneScoreListDto stoneUserInfo() { public StoneScoreListDto stoneUserInfo() {
try { try {
String uid = CurrentUtil.getCurrentUid(); String uid = CurrentUtil.getCurrentUid();
StoneScoreListDto vo = StoneScoreListDto.getNew(); StoneScoreListDto vo = StoneScoreListDto.getNew();
AdamUserInfoSimpleVo userVo = InnerUtils.getUserInfo(); AdamUserInfoSimpleVo userVo = innerUtils.getUserInfo();
StoneUserVo userTaskVo = redisUtils.getUserData(uid); StoneUserVo userTaskVo = redisUtils.getUserData(uid);
if (userTaskVo == null) { if (userTaskVo == null) {
userTaskVo = StoneUserVo.getNew(); userTaskVo = StoneUserVo.getNew();
......
...@@ -17,13 +17,13 @@ import org.springframework.util.MultiValueMap; ...@@ -17,13 +17,13 @@ import org.springframework.util.MultiValueMap;
@Component @Component
public class InnerUtils { public class InnerUtils {
@Value("${liquidnet.service.adam.url}") @Value("${liquidnet.service.adam.url}")
private static String adamUrl; private String adamUrl;
public static AdamUserInfoSimpleVo getUserInfo() throws Exception { public AdamUserInfoSimpleVo getUserInfo() throws Exception {
MultiValueMap<String, String> header = CollectionUtil.linkedMultiValueMapStringString(); MultiValueMap<String, String> header = CollectionUtil.linkedMultiValueMapStringString();
header.add("Accept", "application/json;charset=UTF-8"); header.add("Accept", "application/json;charset=UTF-8");
header.add("Authorization", "Bearer " + CurrentUtil.getToken()); header.add("Authorization", "Bearer " + CurrentUtil.getToken());
String resultData = HttpUtil.post("http://devadam.zhengzai.tv" + "/adam/user/gif/mobile", null, header); String resultData = HttpUtil.post(adamUrl + "/adam/user/gif/mobile", null, header);
ResponseDto<AdamUserInfoSimpleVo> innerReturnVo = JsonUtils.fromJson(resultData, new TypeReference<ResponseDto<AdamUserInfoSimpleVo>>() { ResponseDto<AdamUserInfoSimpleVo> innerReturnVo = JsonUtils.fromJson(resultData, new TypeReference<ResponseDto<AdamUserInfoSimpleVo>>() {
}); });
return innerReturnVo.getData(); return innerReturnVo.getData();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment