会员价

PayType
This commit is contained in:
wangw 2025-03-25 23:56:23 +08:00
parent 5a872e0c08
commit 9071e98755
3 changed files with 9 additions and 3 deletions

View File

@ -61,7 +61,9 @@ public class CurProdSkuServiceImpl extends ServiceImpl<CurProdSkuMapper, CurProd
curProdSku.setProductId(Long.valueOf(oldProductSku.getProductId()));
curProdSku.setOriginPrice(oldProductSku.getOriginPrice());
curProdSku.setCostPrice(oldProductSku.getCostPrice());
curProdSku.setMemberPrice(oldProductSku.getMemberPrice());
// curProdSku.setMemberPrice(oldProductSku.getMemberPrice());
curProdSku.setMemberPrice((oldProductSku.getMemberPrice() == null || oldProductSku.getMemberPrice().compareTo(BigDecimal.ZERO) <= 0)
? oldProductSku.getSalePrice() : oldProductSku.getMemberPrice());
curProdSku.setSalePrice(oldProductSku.getSalePrice());
curProdSku.setSuitNum(oldProductSku.getSuit());
curProdSku.setSpecInfo(oldProductSku.getSpecSnap());

View File

@ -11,6 +11,8 @@ import com.czg.mergedata.cur.service.CurShopPayTypeService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
import java.util.Date;
/**
* 店铺支付类型 服务层实现
*
@ -27,8 +29,8 @@ public class CurShopPayTypeServiceImpl extends ServiceImpl<CurShopPayTypeMapper,
mapper.truncateTable();
oldShopPayTypeService.list().forEach(item -> {
CurShopPayType payType = BeanUtil.copyProperties(item, CurShopPayType.class);
payType.setCreateTime(DateUtil.date(item.getCreatedAt()).toLocalDateTime());
payType.setUpdateTime(DateUtil.date(item.getUpdatedAt()).toLocalDateTime());
payType.setCreateTime(DateUtil.toLocalDateTime(item.getCreatedAt() == null ? new Date() : new Date(item.getCreatedAt())));
payType.setUpdateTime(DateUtil.toLocalDateTime(item.getUpdatedAt() == null ? new Date() : new Date(item.getUpdatedAt())));
save(payType);
});
return null;

View File

@ -1,5 +1,6 @@
package com.czg.mergedata.old.mapper;
import com.mybatisflex.annotation.UseDataSource;
import com.mybatisflex.core.BaseMapper;
import com.czg.mergedata.old.entity.OldShopPayType;
@ -9,6 +10,7 @@ import com.czg.mergedata.old.entity.OldShopPayType;
* @author Administrator
* @since 2025-03-25
*/
@UseDataSource("ds2")
public interface OldShopPayTypeMapper extends BaseMapper<OldShopPayType> {
}