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

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

数据迁移

parent eafe89d2
......@@ -38,4 +38,11 @@ public interface KylinOrderTicketsMapper extends BaseMapper<KylinOrderTickets> {
List<OrderIdsDao> getOrderUserIdByTimesId(@Param("ticketId") String ticketId);
List<OrderExpressExportListDao> selectExpressList(@Param("performanceId") String performanceId);
/**
* 根据用户id获取 演出订单维度 完成没任务次数
* @param uid
* @return
*/
List<Integer> getOrderScore(@Param("uid") String uid);
}
......@@ -280,7 +280,8 @@
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_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
<if test="userId!=''">
AND user_id = #{userId}
......@@ -313,7 +314,8 @@
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
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
-- 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
......@@ -339,7 +341,9 @@
${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="mailno != ''">AND oe.mailno LIKE concat('%', #{mailno}, '%')</if>
......@@ -392,4 +396,13 @@
AND e.transfer_status in (0, 3)
AND p.performances_id = #{performanceId};
</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>
......@@ -56,6 +56,12 @@
<version>1.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.liquidnet</groupId>
<artifactId>liquidnet-service-stone-api</artifactId>
<version>1.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
......
......@@ -7,6 +7,7 @@ import io.swagger.annotations.ApiOperation;
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;
......@@ -17,38 +18,12 @@ public class DataController {
@Autowired
private DataImpl data;
// @PostMapping("performance")
// @ApiOperation("演出数据迁移")
// public ResponseDto<Boolean> performance() {
// Boolean result = data.performance();
// 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);
// }
@PostMapping("initScore")
@ApiOperation("积分数据迁移")
public ResponseDto<Boolean> initScore(@RequestParam("page") int page, @RequestParam("size") int size) {
Boolean result = data.initScore(page,size);
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> {
}
......@@ -37,13 +37,15 @@ public class StoneScoreUserServiceImpl implements IStoneScoreUserService {
StoneMongoUtils mongoUtils;
@Autowired
QueueUtils queueUtils;
@Autowired
InnerUtils innerUtils;
@Override
public StoneScoreListDto stoneUserInfo() {
try {
String uid = CurrentUtil.getCurrentUid();
StoneScoreListDto vo = StoneScoreListDto.getNew();
AdamUserInfoSimpleVo userVo = InnerUtils.getUserInfo();
AdamUserInfoSimpleVo userVo = innerUtils.getUserInfo();
StoneUserVo userTaskVo = redisUtils.getUserData(uid);
if (userTaskVo == null) {
userTaskVo = StoneUserVo.getNew();
......
......@@ -17,13 +17,13 @@ import org.springframework.util.MultiValueMap;
@Component
public class InnerUtils {
@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();
header.add("Accept", "application/json;charset=UTF-8");
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>>() {
});
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