|
@@ -112,16 +112,13 @@ public class MkActivitiesScoreServiceImpl implements MkActivitiesScoreService {
|
|
|
builder.put("sku", "商品SKU");
|
|
|
builder.put("prodBarcode", "商品条码");
|
|
|
builder.put("reject", "是否参与");
|
|
|
- builder.put("deadlineStr", "截止日期");
|
|
|
|
|
|
R r = ValidatorUtil.isEmpty(builder.build(), valideDate);
|
|
|
if (Integer.valueOf(r.get("code").toString()) != 0) {
|
|
|
throw new RRException(r.get("msg").toString());
|
|
|
}
|
|
|
|
|
|
- Date nowTime = new Date();
|
|
|
-
|
|
|
- MkActivitiesScoreEntity mkActivitiesScoreEntity = queryEntityByProdBarcodeAndSkuAndStoreIdAndTime(scoreReductionDTO.getProdBarcode(), scoreReductionDTO.getSku(), scoreReductionDTO.getStoreId(), nowTime);
|
|
|
+ MkActivitiesScoreEntity mkActivitiesScoreEntity = queryEntityByProdBarcodeAndSkuAndStoreIdAndTime(scoreReductionDTO.getProdBarcode(), scoreReductionDTO.getSku(), scoreReductionDTO.getStoreId());
|
|
|
|
|
|
if (Objects.nonNull(mkActivitiesScoreEntity)) {
|
|
|
throw new RRException("该商品已经参与本次活动,商品{"+mkActivitiesScoreEntity.getProdBarcode()+"},sku,{"+mkActivitiesScoreEntity.getSku()+"}", 500);
|
|
@@ -130,8 +127,8 @@ public class MkActivitiesScoreServiceImpl implements MkActivitiesScoreService {
|
|
|
MkActivitiesScoreEntity scoreEntity = new MkActivitiesScoreEntity();
|
|
|
BeanUtils.copyProperties(scoreReductionDTO, scoreEntity);
|
|
|
Date updateTime = new Date();
|
|
|
- DateTime dateTime = DateUtil.parseDate(scoreReductionDTO.getDeadlineStr());
|
|
|
- scoreEntity.setDeadline(dateTime);
|
|
|
+// DateTime dateTime = DateUtil.parseDate(scoreReductionDTO.getDeadlineStr());
|
|
|
+// scoreEntity.setDeadline(dateTime);
|
|
|
scoreEntity.setMkaId(Long.parseLong(mkaId));
|
|
|
scoreEntity.setCreaterSn("0");
|
|
|
scoreEntity.setCreateTime(updateTime);
|
|
@@ -153,12 +150,11 @@ public class MkActivitiesScoreServiceImpl implements MkActivitiesScoreService {
|
|
|
* @param prodBarcode 条码
|
|
|
* @param sku sku
|
|
|
* @param storeId 门店id
|
|
|
- * @param nowTime 当前时间
|
|
|
* @return 实体
|
|
|
*/
|
|
|
@Override
|
|
|
- public MkActivitiesScoreEntity queryEntityByProdBarcodeAndSkuAndStoreIdAndTime(String prodBarcode, String sku, Integer storeId, Date nowTime) {
|
|
|
- return mkActivitiesScoreDao.queryEntityByProdBarcodeAndSkuAndStoreIdAndTime(prodBarcode, sku, storeId, nowTime);
|
|
|
+ public MkActivitiesScoreEntity queryEntityByProdBarcodeAndSkuAndStoreIdAndTime(String prodBarcode, String sku, Integer storeId) {
|
|
|
+ return mkActivitiesScoreDao.queryEntityByProdBarcodeAndSkuAndStoreIdAndTime(prodBarcode, sku, storeId);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -173,17 +169,6 @@ public class MkActivitiesScoreServiceImpl implements MkActivitiesScoreService {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 查询当前时间的参与积分抵扣的sku
|
|
|
- *
|
|
|
- * @param date 当前时间
|
|
|
- * @return sku
|
|
|
- */
|
|
|
- @Override
|
|
|
- public List<MkActivitiesScoreEntity> queryDetailByTime(Date date) {
|
|
|
- return mkActivitiesScoreDao.queryDetailByTime(date);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
* 查询积分抵扣活动信息
|
|
|
*
|
|
|
* @param mkaIdList 活动id集合
|