提交 f80020ab authored 作者: 李秋林's avatar 李秋林

促销员查询当日活动上报信息

上级 d8664c5d
...@@ -39,8 +39,17 @@ public class TemporaryActivityQueryController { ...@@ -39,8 +39,17 @@ public class TemporaryActivityQueryController {
* 根据促销员id查询今日任务 * 根据促销员id查询今日任务
*/ */
@GetMapping("/today/{id}") @GetMapping("/today/{id}")
public TemporaryActivityReportedDto findtemporaryIdTodayActivityData(@PathVariable("id") @NotNull Long temporaryId) { public TemporaryActivityReportedDto findTemporaryTodayActivityData(@PathVariable("id") @NotNull Long temporaryId) {
TemporaryActivityReportedDto dto = temporaryActivityQueryService.findtemporaryIdTodayActivityData(temporaryId); TemporaryActivityReportedDto dto = temporaryActivityQueryService.findtemporaryIdTodayActivityData(temporaryId);
return dto; return dto;
} }
/**
* 根据任务id查询
*/
@GetMapping("/{id}")
public TemporaryActivityReportedDto findTemporaryActivityById(@PathVariable("id") @NotNull Long activityId){
TemporaryActivityReportedDto dto = temporaryActivityQueryService.findTemporaryActivityById(activityId);
return dto;
}
} }
...@@ -15,4 +15,6 @@ public interface TemporaryActivityReportedDao { ...@@ -15,4 +15,6 @@ public interface TemporaryActivityReportedDao {
List<TemporaryActivityReportedDto> findListByTemporaryId(Long temporaryId); List<TemporaryActivityReportedDto> findListByTemporaryId(Long temporaryId);
TemporaryActivityReportedDto findOneByCurrentDate(Long temporaryId); TemporaryActivityReportedDto findOneByCurrentDate(Long temporaryId);
TemporaryActivityReportedDto findTemporaryActivityById(Long activityId);
} }
...@@ -39,6 +39,8 @@ public class TemporaryActivityReportedDaoImpl implements TemporaryActivityReport ...@@ -39,6 +39,8 @@ public class TemporaryActivityReportedDaoImpl implements TemporaryActivityReport
TemporaryActivityReportedDO tDo = new TemporaryActivityReportedDO(); TemporaryActivityReportedDO tDo = new TemporaryActivityReportedDO();
BeanUtils.copyProperties(temActDto, tDo); BeanUtils.copyProperties(temActDto, tDo);
tDo.setApproveStatus(temActDto.getApproveStatus().name());
tDo.setCreateDate(DateUtil.today()); tDo.setCreateDate(DateUtil.today());
int tId = temporaryActivityReportedMapper.insert(tDo); int tId = temporaryActivityReportedMapper.insert(tDo);
...@@ -71,6 +73,12 @@ public class TemporaryActivityReportedDaoImpl implements TemporaryActivityReport ...@@ -71,6 +73,12 @@ public class TemporaryActivityReportedDaoImpl implements TemporaryActivityReport
return transitionDto(temDO); return transitionDto(temDO);
} }
@Override
public TemporaryActivityReportedDto findTemporaryActivityById(Long activityId) {
TemporaryActivityReportedDO temDO = temporaryActivityReportedMapper.selectById(activityId);
return transitionDto(temDO);
}
private LambdaQueryWrapper<TemporaryActivityReportedDO> buildQueryList(TemporaryActivityWrapper tw) { private LambdaQueryWrapper<TemporaryActivityReportedDO> buildQueryList(TemporaryActivityWrapper tw) {
LambdaQueryWrapper<TemporaryActivityReportedDO> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<TemporaryActivityReportedDO> queryWrapper = new LambdaQueryWrapper<>();
......
package com.wangxiaolu.promotion.pojo;
/**
* @author : liqiulin
* @date : 2024-04-19 13
* @describe : 分页配置,默认每页10条记录
*/
public class PageVo {
/**
* 当前页数,从0开始
*/
private Integer pageNum;
/**
* 每页条数
*/
private Integer pageSize;
/**
* 总条数
*/
private Integer totalRecord;
/**
* 总页数
*/
private Integer totalPage;
}
...@@ -21,7 +21,7 @@ public class WxTemporaryInfoDto { ...@@ -21,7 +21,7 @@ public class WxTemporaryInfoDto {
/** /**
* temporary_info表id * temporary_info表id
*/ */
private Integer id; Integer id;
/** /**
* openId * openId
*/ */
......
...@@ -20,4 +20,6 @@ public interface TemporaryActivityQueryService { ...@@ -20,4 +20,6 @@ public interface TemporaryActivityQueryService {
* 根据促销员id查询今日任务 * 根据促销员id查询今日任务
*/ */
TemporaryActivityReportedDto findtemporaryIdTodayActivityData(Long temporaryId); TemporaryActivityReportedDto findtemporaryIdTodayActivityData(Long temporaryId);
TemporaryActivityReportedDto findTemporaryActivityById(Long activityId);
} }
...@@ -28,6 +28,7 @@ public class TemporaryActivityCoreServiceImpl implements TemporaryActivityCoreSe ...@@ -28,6 +28,7 @@ public class TemporaryActivityCoreServiceImpl implements TemporaryActivityCoreSe
*/ */
@Override @Override
public long activityDataReportedSave(TemporaryActivityReportedDto temActDto) { public long activityDataReportedSave(TemporaryActivityReportedDto temActDto) {
temActDto.setApproveStatus(TemActApproveStatus.SUBMITTED);
return temporaryActivityReportedDao.activityDataSave(temActDto); return temporaryActivityReportedDao.activityDataSave(temActDto);
} }
} }
...@@ -39,4 +39,10 @@ public class TemporaryActivityQueryServiceImpl implements TemporaryActivityQuery ...@@ -39,4 +39,10 @@ public class TemporaryActivityQueryServiceImpl implements TemporaryActivityQuery
TemporaryActivityReportedDto dto = temporaryActivityReportedDao.findOneByCurrentDate(temporaryId); TemporaryActivityReportedDto dto = temporaryActivityReportedDao.findOneByCurrentDate(temporaryId);
return dto; return dto;
} }
@Override
public TemporaryActivityReportedDto findTemporaryActivityById(Long activityId) {
TemporaryActivityReportedDto dto = temporaryActivityReportedDao.findTemporaryActivityById(activityId);
return dto;
}
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论