bug
This commit is contained in:
parent
98ff3486a8
commit
0041201480
@ -567,8 +567,10 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService {
|
||||
ArrayList<ActiveDiscountPayVO> activeDiscountPayVOS = new ArrayList<>();
|
||||
//1.无限制条件的活动和优惠券分别选出一个优惠最大的来
|
||||
//活动
|
||||
ActiveDiscountPayVO activeDiscountPayVO = resList.stream().max(Comparator.comparingDouble(ActiveDiscountPayVO::getDiscounts)).get();
|
||||
activeDiscountPayVOS.add(activeDiscountPayVO);
|
||||
if (CollectionUtils.isNotEmpty(resList)){
|
||||
ActiveDiscountPayVO activeDiscountPayVO = resList.stream().max(Comparator.comparingDouble(ActiveDiscountPayVO::getDiscounts)).get();
|
||||
activeDiscountPayVOS.add(activeDiscountPayVO);
|
||||
}
|
||||
//优惠券
|
||||
CardFavorableRecordVO cardFavorableRecordVO = new CardFavorableRecordVO();
|
||||
if (CollectionUtils.isNotEmpty(cardFavorableRecordVOS)){
|
||||
|
@ -19,6 +19,7 @@ import com.fuint.business.userManager.vo.LJUserVo;
|
||||
import com.fuint.common.dto.AccountInfo;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@ -84,15 +85,20 @@ public class CardFavorableRecordServiceImpl extends ServiceImpl<CardFavorableRec
|
||||
|
||||
@Override
|
||||
public IPage<CardFavorableRecordVO> getCardFavorableList(Page page, CardFavorableRecord cardFavorableRecord) {
|
||||
Integer storeId = TokenUtil.getNowAccountInfo().getStoreId();
|
||||
cardFavorableRecord.setStoreId(storeId);
|
||||
IPage<CardFavorableRecordVO> cardFavorableList = cardFavorableRecordMapper.getCardFavorableList(page, cardFavorableRecord);
|
||||
List<CardFavorableRecordVO> records = cardFavorableList.getRecords();
|
||||
for (CardFavorableRecordVO record : records) {
|
||||
String oilName = "";
|
||||
String[] split = record.getOilType().split(",");
|
||||
for (String s : split) {
|
||||
oilName += oilNameService.selectOilNameById(Integer.parseInt(s)).getOilName();
|
||||
if (StringUtils.isNotEmpty(record.getOilType())){
|
||||
String[] split = record.getOilType().split(",");
|
||||
for (String s : split) {
|
||||
oilName += oilNameService.selectOilNameById(Integer.parseInt(s)).getOilName();
|
||||
}
|
||||
record.setOilName(oilName);
|
||||
}
|
||||
record.setOilName(oilName);
|
||||
|
||||
}
|
||||
cardFavorableList.setRecords(records);
|
||||
return cardFavorableList;
|
||||
|
@ -141,7 +141,7 @@
|
||||
|
||||
<select id="selectUserById" resultType="com.fuint.business.userManager.vo.LJUserVo"
|
||||
parameterType="java.lang.Integer">
|
||||
select * from mt_user
|
||||
select * from mt_user mu
|
||||
<where>
|
||||
mu.id = #{id}
|
||||
</where>
|
||||
@ -172,4 +172,4 @@
|
||||
mi.storeId = #{storeId}
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
Loading…
Reference in New Issue
Block a user