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