Commit 062003f4 by 吕明尚

用户信息增加字段

parent efbc0c32
......@@ -1336,23 +1336,20 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
monthlyCardLogService.save(monthlyCardLog);
}
}
// if (!ObjectUtils.isEmpty(sOrder.getSecondaryCardId()) && !ObjectUtils.isEmpty(sOrder.getPackId())) {
// if (sOrder.getPackId().equals(consumerSecondaryCard.getPackId())) {
// consumerSecondaryCard.setNumber(consumerSecondaryCard.getNumber() - 1);
// SecondaryCardLog secondaryCardLog = new SecondaryCardLog();
// secondaryCardLog.setConsumerSecondaryCardId(sOrder.getSecondaryCardId());
// secondaryCardLog.setConsumerId(consumerSecondaryCard.getConsumerId());
// secondaryCardLog.setPhone(sOrder.getConsumerPhone());
// secondaryCardLog.setPackId(sOrder.getPackId());
// secondaryCardLog.setUsageCount(1L);
// secondaryCardLog.setResidueCount(Long.valueOf(consumerSecondaryCard.getNumber()));
// secondaryCardLog.setOperationType(YesNoEnum.no.getIndex());
// secondaryCardLog.setOperationTime(new Date());
// secondaryCardLog.setCreateTime(new Date());
// consumerSecondaryCardService.updateById(consumerSecondaryCard);
// secondaryCardLogService.save(secondaryCardLog);
// }
// }
if (!ObjectUtils.isEmpty(sOrder.getSecondaryCardId())) {
consumerSecondaryCard.setNumber(consumerSecondaryCard.getNumber() - 1);
SecondaryCardLog secondaryCardLog = new SecondaryCardLog();
secondaryCardLog.setConsumerSecondaryCardId(sOrder.getSecondaryCardId());
secondaryCardLog.setConsumerId(consumerSecondaryCard.getConsumerId());
secondaryCardLog.setPhone(sOrder.getConsumerPhone());
secondaryCardLog.setUsageCount(1L);
secondaryCardLog.setResidueCount(Long.valueOf(consumerSecondaryCard.getNumber()));
secondaryCardLog.setOperationType(YesNoEnum.no.getIndex());
secondaryCardLog.setOperationTime(new Date());
secondaryCardLog.setCreateTime(new Date());
consumerSecondaryCardService.updateById(consumerSecondaryCard);
secondaryCardLogService.save(secondaryCardLog);
}
}
private void refundExtracted(ConsumerWallet consumerWallet, SOrder sOrder, ConsumerMember consumerMember) {
......
......@@ -78,6 +78,7 @@
<select id="selectByConsumerId" resultMap="ConsumerMonthlyCardResult">
select c.id,
c.monthly_card_conf_id,
c1.name as 'conf_name', c1.monthly_card_amount as 'conf_amount',
c.consumer_id,
c2.nick_name,
c2.avatar,
......@@ -93,6 +94,7 @@
c.remark
from s_consumer_monthly_card c
join s_consumer c2 on c.consumer_id = c2.id
join s_monthly_card_conf c1 on c.monthly_card_conf_id = c1.id
where c.is_delete = 0
and c.consumer_id = #{consumerId}
</select>
......
......@@ -87,6 +87,7 @@
c.phone,
m.nick_name,
m.avatar,
s.name as 'conf_name', s.secondary_card_amount as 'conf_amount',
c.single_duration,
c.single_amount,
c.expiration_date,
......@@ -99,6 +100,7 @@
c.remark
from s_consumer_secondary_card c
join s_consumer m on c.consumer_id = m.id
join s_secondary_card_conf s on c.secondary_card_conf_id = s.id
where c.is_delete = 0
and c.consumer_id = #{consumerId}
</select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment