|
@@ -50,6 +50,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
+import java.math.BigDecimal;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Collection;
|
|
|
import java.util.List;
|
|
@@ -229,6 +230,13 @@ public class DistributionActivityTemplateServiceImpl extends ServiceImpl<Distrib
|
|
|
List<DistributionActivityTemplateGoods> collect = bo.getGoodsList().stream().map(item -> {
|
|
|
DistributionActivityTemplateGoods entity = BeanUtil.toBean(item, DistributionActivityTemplateGoods.class);
|
|
|
entity.setDistributionTempId(tempId);
|
|
|
+ if (ObjectUtils.isNotNull(item.getProfitType()) && item.getProfitType() == 1){
|
|
|
+ //佣金是百分比
|
|
|
+ entity.setProfitMax(item.getProfitMax().divide(new BigDecimal(100)));
|
|
|
+ entity.setProfitOne(item.getProfitOne().divide(new BigDecimal(100)));
|
|
|
+ entity.setProfitTwo(item.getProfitTwo().divide(new BigDecimal(100)));
|
|
|
+ entity.setProfitThree(item.getProfitThree().divide(new BigDecimal(100)));
|
|
|
+ }
|
|
|
entity.setCreateTime(DateUtils.getNowTime());
|
|
|
entity.setUpdateTime(DateUtils.getNowTime());
|
|
|
return entity;
|