Commit aa408647 authored by licc's avatar licc

测试定时任务 2

parent b6f153c9
package cn.wisenergy.service.app; package cn.wisenergy.service.app;
import cn.wisenergy.common.utils.R; import cn.wisenergy.common.utils.R;
import cn.wisenergy.model.app.OrderInfo;
import java.util.List;
/** /**
*@ Description: 月定时任务接口定义 *@ Description: 月定时任务接口定义
...@@ -13,11 +10,6 @@ import java.util.List; ...@@ -13,11 +10,6 @@ import java.util.List;
*/ */
public interface MonthTaskService { public interface MonthTaskService {
/**
* 订单返佣-月任务
* @return true or false
*/
R<Boolean> orderRebate();
/** /**
* 收益和业绩统计(月度肥料)-月任务 * 收益和业绩统计(月度肥料)-月任务
......
...@@ -70,8 +70,8 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, AccountInfo> ...@@ -70,8 +70,8 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, AccountInfo>
@XxlJob(value = "orderRebateDayTask") @XxlJob(value = "orderRebateDayTask")
@Override @Override
public R<Boolean> orderRebate() { public R<Boolean> orderRebate() {
log.info("测试执行定时任务,三分钟执行一次"); log.info("订单返佣接口定时-日任务");
//获取返佣订单 // //获取返佣订单
List<OrderInfo> list = orderMapper.getListBySuccessTime(new Date()); List<OrderInfo> list = orderMapper.getListBySuccessTime(new Date());
log.info("shop-mall[]AccountServiceImpl[]orderRebate[]input.param.list:{}", list.size()); log.info("shop-mall[]AccountServiceImpl[]orderRebate[]input.param.list:{}", list.size());
if (CollectionUtils.isEmpty(list)) { if (CollectionUtils.isEmpty(list)) {
...@@ -114,9 +114,11 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, AccountInfo> ...@@ -114,9 +114,11 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, AccountInfo>
return R.ok(accountInfo); return R.ok(accountInfo);
} }
@XxlJob(value = "monthManureDayTask")
@Override @Override
public R<Boolean> performanceCount() { public R<Boolean> performanceCount() {
//获取本月订单 //获取本月订单
log.info("月度肥料定时-日任务");
List<OrderInfo> list = orderMapper.getByCreateTime(new Date()); List<OrderInfo> list = orderMapper.getByCreateTime(new Date());
log.info("shop-mall[]AccountServiceImpl[]performanceCount[]input.param.list:{}", list.size()); log.info("shop-mall[]AccountServiceImpl[]performanceCount[]input.param.list:{}", list.size());
if (CollectionUtils.isEmpty(list)) { if (CollectionUtils.isEmpty(list)) {
...@@ -211,6 +213,7 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, AccountInfo> ...@@ -211,6 +213,7 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, AccountInfo>
return list; return list;
} }
@XxlJob(value = "growthAwardDayTask")
@Override @Override
public R<Boolean> progressPrizeCount() { public R<Boolean> progressPrizeCount() {
log.info("shop-mall[]AccountServiceImpl[]performanceCount[]input.method"); log.info("shop-mall[]AccountServiceImpl[]performanceCount[]input.method");
......
...@@ -19,7 +19,7 @@ import java.util.List; ...@@ -19,7 +19,7 @@ import java.util.List;
/** /**
* @author 86187 * @author 86187
*/ */
@Api(tags = "账户管") @Api(tags = "账户管")
@RestController @RestController
@RequestMapping("/account") @RequestMapping("/account")
@Slf4j @Slf4j
......
...@@ -2,6 +2,7 @@ package cn.wisenergy.web.admin.controller.app; ...@@ -2,6 +2,7 @@ package cn.wisenergy.web.admin.controller.app;
import cn.wisenergy.service.app.AccountService; import cn.wisenergy.service.app.AccountService;
import cn.wisenergy.service.app.MonthTaskService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
...@@ -20,11 +21,11 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -20,11 +21,11 @@ import org.springframework.web.bind.annotation.RestController;
@Slf4j @Slf4j
public class LastAccountController { public class LastAccountController {
@Autowired @Autowired
private AccountService accountService; private MonthTaskService monthTaskService;
// @ApiOperation(value = "复制表-结构和数据", notes = "复制表-结构和数据", httpMethod = "PUT") @ApiOperation(value = "复制表-结构和数据", notes = "复制表-结构和数据", httpMethod = "PUT")
// @PutMapping("/add") @PutMapping("/add")
// public void copyTable(){ public void copyTable() {
// accountService.mirrorImage(); monthTaskService.mirrorImage();
// } }
} }
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