无关风月
2024-11-11 79857a556aa0a983eee05730b0566a62e0be73c0
代码提交
5个文件已修改
44 ■■■■ 已修改文件
xinquan-modules/xinquan-order/src/main/java/com/xinquan/order/controller/client/ClientOrderController.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xinquan-modules/xinquan-user/src/main/java/com/xinquan/user/XinQuanUserApplication.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xinquan-modules/xinquan-user/src/main/java/com/xinquan/user/controller/client/ClientAppUserTreeController.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xinquan-modules/xinquan-user/src/main/java/com/xinquan/user/controller/client/ClientAppUserWithdrawController.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xinquan-modules/xinquan-user/src/main/java/com/xinquan/user/utils/TaskUtil.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xinquan-modules/xinquan-order/src/main/java/com/xinquan/order/controller/client/ClientOrderController.java
@@ -873,12 +873,13 @@
                            }
                            break;
                        case 4:
                            remoteAppUserService.addBalance(one.getAppUserId(),one.getRealPayAmount());
                            System.err.println("进入充值");
                            remoteAppUserService.addBalance(one.getAppUserId(),one.getTotalAmount());
                            AppUserWalletRecord appUserWalletRecord = new AppUserWalletRecord();
                            appUserWalletRecord.setAppUserId(one.getAppUserId());
                            appUserWalletRecord.setChangeType(1);
                            appUserWalletRecord.setReason("充值");
                            appUserWalletRecord.setAmount(one.getRealPayAmount());
                            appUserWalletRecord.setAmount(one.getTotalAmount());
                            appUserWalletRecord.setChildAppUserId(one.getAppUserId());
                            appUserWalletRecord.setOrderId(one.getId());
                            remoteAppUserService.addBalanceRecord(appUserWalletRecord);
xinquan-modules/xinquan-user/src/main/java/com/xinquan/user/XinQuanUserApplication.java
@@ -11,6 +11,7 @@
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.core.env.Environment;
import org.springframework.scheduling.annotation.EnableScheduling;
/**
 * @author mitao
@@ -22,6 +23,7 @@
@EnableCustomSwagger2
@EnableRyFeignClients
@SpringBootApplication
@EnableScheduling//开启定时任务
public class XinQuanUserApplication {
    public static void main(String[] args) throws UnknownHostException {
xinquan-modules/xinquan-user/src/main/java/com/xinquan/user/controller/client/ClientAppUserTreeController.java
@@ -130,7 +130,10 @@
                    .between(AppUserViewingHistory::getCreateTime, startOfDay, endOfDay).list();
            int temp = 0;
            for (AppUserViewingHistory appUserViewingHistory : list) {
                temp += appUserViewingHistory.getTimeLook();
                if (appUserViewingHistory.getTimeLook()!=null){
                    temp += appUserViewingHistory.getTimeLook();
                }
            }
            AppUserTree one = appUserTreeService.lambdaQuery().eq(AppUserTree::getAppUserId, userId)
                    .eq(AppUserTree::getSowAgain, 2).one();
xinquan-modules/xinquan-user/src/main/java/com/xinquan/user/controller/client/ClientAppUserWithdrawController.java
@@ -301,14 +301,14 @@
        Long userId = loginUser.getUserid();
        appUserWithdraw.setAppUserId(userId);
        Boolean flag = redisService.hasKey(CacheConstants.ADD_CARD_PHONE_CODE_PREFIX + appUserWithdraw.getCellPhone());
        if(!flag){
            return R.fail("验证码已失效,请重新获取");
        }
        String code = redisService.getCacheObject(CacheConstants.ADD_CARD_PHONE_CODE_PREFIX + appUserWithdraw.getCellPhone());
        if (!appUserWithdraw.getCode().equals(code)) {
            return R.fail("验证码不正确");
        }
//        Boolean flag = redisService.hasKey(CacheConstants.ADD_CARD_PHONE_CODE_PREFIX + appUserWithdraw.getCellPhone());
//        if(!flag){
//            return R.fail("验证码已失效,请重新获取");
//        }
//        String code = redisService.getCacheObject(CacheConstants.ADD_CARD_PHONE_CODE_PREFIX + appUserWithdraw.getCellPhone());
//        if (!appUserWithdraw.getCode().equals(code)) {
//            return R.fail("验证码不正确");
//        }
        appUserBankService.save(appUserWithdraw);
        return R.ok();
    }
xinquan-modules/xinquan-user/src/main/java/com/xinquan/user/utils/TaskUtil.java
@@ -10,6 +10,7 @@
import com.xinquan.user.service.AppUserService;
import com.xinquan.user.service.AppUserTreeService;
import com.xinquan.user.service.NoticeRecordService;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
@@ -34,9 +35,6 @@
    private AppUserTreeService appUserTreeService;
    @Resource
    private NoticeRecordService noticeRecordService;
    /**
     * 每天凌晨12点执行的定时任务
@@ -44,6 +42,7 @@
    @Scheduled(cron = "0 0 0 * * ?")
    public void taskLastDay() {
        try {
            System.err.println("每天晚上凌晨执行的任务");
            LocalDateTime now = LocalDateTime.now();
            List<AppUserTree> list1 = appUserTreeService.lambdaQuery().eq(AppUserTree::getSowAgain, 2)
                    .list();
@@ -78,16 +77,10 @@
        }
    }
    public static void main(String[] args) {
        LocalDate localDate = LocalDateTime.now().toLocalDate();
        System.err.println(localDate);
    }
    // 每天早上7点执行的定时任务
    @Scheduled(cron = "0 0 7 * * ?")
    public void taskSivenDay() {
        try {
            System.err.println("每天晚上早上7点执行的任务");
            LocalDateTime now = LocalDateTime.now();
            List<AppUser> list = appUserService.lambdaQuery().ne(AppUser::getUserStatus, 3).list();
            for (AppUser appUser : list) {
@@ -121,9 +114,11 @@
            e.printStackTrace();
        }
    }
    // 每天晚上9点执行的定时任务
    @Scheduled(cron = "0 0 21 * * ?")
    public void taskNineDay() {
        try {
            System.err.println("执行每天晚上9点的定时任务");
            LocalDateTime now = LocalDateTime.now();
            List<AppUser> list = appUserService.lambdaQuery().ne(AppUser::getUserStatus, 3).list();
            for (AppUser appUser : list) {
@@ -155,7 +150,6 @@
                    noticeRecord.setContent("你今天还未签到,及时签到可获得能量值奖励,快去签到吧!");
                    noticeRecordService.save(noticeRecord);
                }
            }
        } catch (Exception e) {
            e.printStackTrace();