汇总1
parent
efb8a51579
commit
537b038c00
|
@ -3,11 +3,9 @@ package com.ruoyi.mybasic.service.Impl;
|
|||
import com.ruoyi.mybasic.api.domain.Purse;
|
||||
import com.ruoyi.mybasic.api.domain.UserMoneyLogs;
|
||||
import com.ruoyi.mybasic.common.domain.request.RequestInvitationRecord;
|
||||
import com.ruoyi.mybasic.common.domain.response.PurseResponse;
|
||||
import com.ruoyi.mybasic.mapper.InvitationMapper;
|
||||
import com.ruoyi.mybasic.service.InvitationService;
|
||||
import com.ruoyi.mybasic.service.PurseServiceTwo;
|
||||
import lombok.Data;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
@ -82,7 +80,6 @@ public class InvitationServiceImpl implements InvitationService {
|
|||
PurseMoneyLogsTwo.setAmountIncome(300);
|
||||
PurseMoneyLogsTwo.setCreateTime(new Date());
|
||||
invitationMapper.insertUserMoneyLogs(PurseMoneyLogsTwo);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -133,12 +130,5 @@ public class InvitationServiceImpl implements InvitationService {
|
|||
if (i < 0){
|
||||
throw new RuntimeException("订单未生效!");
|
||||
}
|
||||
// 清空redis中的钱包余额数据
|
||||
// redisService.deleteObject(userId + SysUserPurse.PURSE_NAME);
|
||||
// //再次查询钱包修改后的信息
|
||||
// PurseResponse NewpurseResponse = purseServiceTwo.purseObject(Long.valueOf(userId));
|
||||
// Integer balanceFee = NewpurseResponse.getBalanceFee();
|
||||
// //将查到新用户的余额存储到Redis中
|
||||
// redisService.setCacheObject(userId + SysUserPurse.PURSE_NAME,balanceFee);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,47 +0,0 @@
|
|||
//package com.ruoyi.mybasic.timer;
|
||||
//
|
||||
//import com.ruoyi.common.redis.service.RedisService;
|
||||
//import com.ruoyi.common.security.utils.SecurityUtils;
|
||||
//import com.ruoyi.mybasic.common.domain.response.PurseResponse;
|
||||
//import com.ruoyi.mybasic.service.PurseServiceTwo;
|
||||
//import org.springframework.beans.factory.annotation.Autowired;
|
||||
//import org.springframework.scheduling.annotation.Scheduled;
|
||||
//import org.springframework.stereotype.Component;
|
||||
//
|
||||
///**
|
||||
// * 钱包余额定时器
|
||||
// * @author Lou_Zs
|
||||
// */
|
||||
//@Component
|
||||
//public class SysUserPurse {
|
||||
//
|
||||
// @Autowired
|
||||
// private PurseServiceTwo purseServiceTwo;
|
||||
// @Autowired
|
||||
// private RedisService redisService;
|
||||
//
|
||||
// //常量
|
||||
// public final static String PURSE_NAME = "PURSE";
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * 定时器每五分钟执行
|
||||
// */
|
||||
// @Scheduled(cron = "0 0/5 * * * ?")
|
||||
// public void userPurse(){
|
||||
// System.out.println("~~~~~~定时器开始扫描钱包余额~~~~~~");
|
||||
// //获取用户的编号
|
||||
// Long userId = SecurityUtils.getUserId();
|
||||
//
|
||||
// //根据用户编号查询用户钱包
|
||||
// PurseResponse purseResponse = purseServiceTwo.purseObject(userId);
|
||||
//
|
||||
// if (null == purseResponse){
|
||||
// throw new RuntimeException("查无此用户!");
|
||||
// }
|
||||
// //钱包余额
|
||||
// Integer balanceFee = purseResponse.getBalanceFee();
|
||||
// //将余额存入redis
|
||||
// redisService.setCacheObject(userId + PURSE_NAME,balanceFee);
|
||||
// }
|
||||
//}
|
|
@ -1,12 +1,12 @@
|
|||
# Tomcat
|
||||
server:
|
||||
port: 9090
|
||||
port: 9001
|
||||
|
||||
# Spring
|
||||
spring:
|
||||
application:
|
||||
# 应用名称
|
||||
name: health-mybasicTwo
|
||||
name: health-mybasic
|
||||
profiles:
|
||||
# 环境配置
|
||||
active: dev
|
||||
|
|
|
@ -2,29 +2,6 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.mybasic.mapper.InvitationMapper">
|
||||
|
||||
|
||||
<select id="show" resultType="com.ruoyi.mybasic.common.domain.request.InvitationRecordRequest">
|
||||
|
||||
</select>
|
||||
<select id="Inviteramount" resultType="com.ruoyi.mybasic.common.domain.request.PurseRequest">
|
||||
SELECT
|
||||
ir.inviter_id AS 邀请人,
|
||||
ir.invitee_id AS 被邀请人
|
||||
FROM
|
||||
invitation_record ir
|
||||
LEFT JOIN t_user USER ON ir.inviter_id = USER.id
|
||||
</select>
|
||||
<select id="Inviteeamount" resultType="com.ruoyi.mybasic.common.domain.request.PurseRequest">
|
||||
SELECT
|
||||
ir.inviter_id AS 邀请人,
|
||||
ir.invitee_id AS 被邀请人
|
||||
FROM
|
||||
invitation_record ir
|
||||
LEFT JOIN t_user USER ON ir.inviter_id = USER.id
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<!-- 新增邀请记录-->
|
||||
<insert id="insertInvitationRecord">
|
||||
INSERT INTO invitation_record
|
||||
|
|
Loading…
Reference in New Issue