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

促销员上报数据添加各类鸡爪销量

上级 89e44201
package com.wangxiaolu.promotion.controller.activity.temporary;
import com.alibaba.fastjson.JSONObject;
import com.wangxiaolu.promotion.enums.activity.ClockType;
import com.wangxiaolu.promotion.exception.ParamException;
import com.wangxiaolu.promotion.pojo.activity.temporary.dto.TemporaryActivityReportedDto;
......@@ -74,6 +75,8 @@ public class TemporaryActivityCoreController {
TemporaryActivityReportedDto temActDto = new TemporaryActivityReportedDto();
BeanUtils.copyProperties(activityVo, temActDto);
temActDto.setId(activityVo.getActivityReportedId());
// 有ID则修改,无ID则新建
if (Objects.nonNull(activityVo.getActivityReportedId())) {
tempActivityCoreService.activityDataReportedUpdate(temActDto);
return activityVo.getActivityReportedId();
......
......@@ -56,8 +56,11 @@ public class TemporaryActivityReportedDaoImpl implements TemporaryActivityReport
*/
@Override
public void findListByTemporaryId(Integer temporaryId, PageInfo pageInfo) {
TemporaryActivityWrapper taw = new TemporaryActivityWrapper()
.setTemporaryId(temporaryId);
TemporaryActivityWrapper taw = JSONObject.parseObject(JSONObject.toJSONString(pageInfo.getQueryParams()), TemporaryActivityWrapper.class);
taw = Objects.isNull(taw) ? new TemporaryActivityWrapper() : taw;
taw.setTemporaryId(temporaryId);
LambdaQueryWrapper<TemporaryActivityReportedDO> temQw = buildQueryList(taw);
Page<TemporaryActivityReportedDO> page = new Page<>(pageInfo.getPageNum(), pageInfo.getPageSize());
......@@ -88,7 +91,7 @@ public class TemporaryActivityReportedDaoImpl implements TemporaryActivityReport
@Override
public void updateById(TemporaryActivityReportedDto temActDto) {
TemporaryActivityReportedDO rDo = new TemporaryActivityReportedDO();
BeanUtils.copyProperties(temActDto,rDo);
BeanUtils.copyProperties(temActDto, rDo);
rDo.setModifyTime(new Date());
temporaryActivityReportedMapper.updateById(rDo);
}
......@@ -102,6 +105,9 @@ public class TemporaryActivityReportedDaoImpl implements TemporaryActivityReport
if (!StringUtils.isEmpty(tw.getCreateDate())) {
queryWrapper.eq(TemporaryActivityReportedDO::getCreateDate, tw.getCreateDate());
}
if (!StringUtils.isEmpty(tw.getApproveStatus())){
queryWrapper.eq(TemporaryActivityReportedDO::getApproveStatus, tw.getApproveStatus());
}
// 默认创建日期倒序排列
queryWrapper.orderByDesc(TemporaryActivityReportedDO::getCreateDate);
......
......@@ -68,6 +68,15 @@ public class TemporaryActivityReportedDO implements Serializable {
*/
private Date approveTime;
private Integer sellXiangA;
private Integer sellXiangB;
private Integer sellXiangC;
private Integer sellXiangD;
private Integer sellDaiA;
private Integer sellDaiB;
private Integer sellDaiC;
private Integer sellDaiD;
/**
* 创建时间
*/
......
......@@ -18,11 +18,16 @@ public class TemporaryActivityWrapper {
/**
* temporaryId
*/
Integer temporaryId;
private Integer temporaryId;
/**
* 创建时间YYYY-MM-DD
*/
String createDate;
private String createDate;
/**
* 审批状态(审批中、审批通过、退回……)
* 关联enum类 TemActApproveStatus
*/
private String approveStatus;
}
......@@ -10,6 +10,7 @@ import org.springframework.util.CollectionUtils;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* @author : liqiulin
......@@ -40,7 +41,9 @@ public class PageInfo<T> implements Serializable {
*/
private int totalPage;
List<T> records;
private List<T> records;
private Map<String,Object> queryParams;
/**
*
......
......@@ -90,6 +90,15 @@ public class TemporaryActivityReportedDto {
List<String> tgcjPhotoUrls;
List<String> tgcjChangePhotoUrls;
private Integer sellXiangA;
private Integer sellXiangB;
private Integer sellXiangC;
private Integer sellXiangD;
private Integer sellDaiA;
private Integer sellDaiB;
private Integer sellDaiC;
private Integer sellDaiD;
/**
* 创建时间
*/
......
......@@ -46,19 +46,29 @@ public class TemporaryActivityDataVo {
/**
* 推广试吃照片
*/
List<String> tgscPhotoUrls;
List<String> tgscChangePhotoUrls;
private List<String> tgscPhotoUrls;
private List<String> tgscChangePhotoUrls;
/**
* 推广互动照片
*/
List<String> tghdPhotoUrls;
List<String> tghdChangePhotoUrls;
private List<String> tghdPhotoUrls;
private List<String> tghdChangePhotoUrls;
/**
* 推广成交照片
*/
List<String> tgcjPhotoUrls;
List<String> tgcjChangePhotoUrls;
private List<String> tgcjPhotoUrls;
private List<String> tgcjChangePhotoUrls;
private Integer ax;
private Integer sellXiangA;
private Integer sellXiangB;
private Integer sellXiangC;
private Integer sellXiangD;
private Integer sellDaiA;
private Integer sellDaiB;
private Integer sellDaiC;
private Integer sellDaiD;
}
\ No newline at end of file
......@@ -18,13 +18,13 @@ public interface TemporaryActivityCoreService {
long activityDataReportedSave(TemporaryActivityReportedDto temActDto);
/**
* 促销员当日打卡信息保存
* 活动上报数据修改
*/
void clockInTodayActivity(TemporaryClockDto dto, Integer clockType);
void activityDataReportedUpdate(TemporaryActivityReportedDto temActDto);
/**
* 活动上报数据修改
* 促销员当日打卡信息保存
*/
void activityDataReportedUpdate(TemporaryActivityReportedDto temActDto);
void clockInTodayActivity(TemporaryClockDto dto, Integer clockType);
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论