会员价

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.setProductId(Long.valueOf(oldProductSku.getProductId()));
curProdSku.setOriginPrice(oldProductSku.getOriginPrice()); curProdSku.setOriginPrice(oldProductSku.getOriginPrice());
curProdSku.setCostPrice(oldProductSku.getCostPrice()); 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.setSalePrice(oldProductSku.getSalePrice());
curProdSku.setSuitNum(oldProductSku.getSuit()); curProdSku.setSuitNum(oldProductSku.getSuit());
curProdSku.setSpecInfo(oldProductSku.getSpecSnap()); curProdSku.setSpecInfo(oldProductSku.getSpecSnap());

View File

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

View File

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