|
@@ -85,11 +85,16 @@ public class PriceUtilService {
|
|
public void setPriceByUserId(PriceVo price, Integer userId) {
|
|
public void setPriceByUserId(PriceVo price, Integer userId) {
|
|
// 根据用户Id查询用户身份
|
|
// 根据用户Id查询用户身份
|
|
Integer identity = priceMapper.getIdentityByUserId(userId);
|
|
Integer identity = priceMapper.getIdentityByUserId(userId);
|
|
- price.setRepurchaseFlag(0);
|
|
|
|
- if (price.getActStatus() == null){
|
|
|
|
|
|
+ // 根据商品id查询商品活动
|
|
|
|
+ PromotionsVo promotions = promotionsMapper.getPromotionsByProductId(price.getProductId());
|
|
|
|
+ if (null != promotions) {
|
|
|
|
+ price.setPromotions(promotions);
|
|
|
|
+ price.setActStatus(1);
|
|
|
|
+ } else {
|
|
// 默认非促销活动状态
|
|
// 默认非促销活动状态
|
|
price.setActStatus(0);
|
|
price.setActStatus(0);
|
|
}
|
|
}
|
|
|
|
+ price.setRepurchaseFlag(0);
|
|
if (null != identity && identity > 0) {
|
|
if (null != identity && identity > 0) {
|
|
// 用户身份: 2-会员机构, 4-普通机构
|
|
// 用户身份: 2-会员机构, 4-普通机构
|
|
price.setUserIdentity(identity);
|
|
price.setUserIdentity(identity);
|
|
@@ -97,8 +102,6 @@ public class PriceUtilService {
|
|
price.setOriginalPrice(price.getPrice());
|
|
price.setOriginalPrice(price.getPrice());
|
|
//税费标志
|
|
//税费标志
|
|
boolean taxFlag = "0".equals(price.getIncludedTax()) && ("1".equals(price.getInvoiceType()) || "2".equals(price.getInvoiceType()));
|
|
boolean taxFlag = "0".equals(price.getIncludedTax()) && ("1".equals(price.getInvoiceType()) || "2".equals(price.getInvoiceType()));
|
|
- // 根据商品id查询商品活动
|
|
|
|
- PromotionsVo promotions = promotionsMapper.getPromotionsByProductId(price.getProductId());
|
|
|
|
if (null != promotions) {
|
|
if (null != promotions) {
|
|
// 促销活动
|
|
// 促销活动
|
|
price.setActStatus(1);
|
|
price.setActStatus(1);
|