Commit 0a9ffd13 by 吕明尚

Merge branch 'refs/heads/dev' into test

parents 6ae4d61f 498b4b90
...@@ -56,4 +56,12 @@ public class EquityFundLogController extends BaseController { ...@@ -56,4 +56,12 @@ public class EquityFundLogController extends BaseController {
List<EquityFundLog> list = equityFundLogService.selectEquityFundLogByUid(uid); List<EquityFundLog> list = equityFundLogService.selectEquityFundLogByUid(uid);
return getDataTable(list); return getDataTable(list);
} }
@GetMapping("/listNewUid/{id}")
public TableDataInfo equityFundLogListByNewUid(@PathVariable("id") Long id) {
startPage();
List<EquityFundLog> list = equityFundLogService.selectEquityFundLogByNewUid(id);
return getDataTable(list);
}
} }
...@@ -61,4 +61,6 @@ public interface EquityFundLogService extends IService<EquityFundLog> ...@@ -61,4 +61,6 @@ public interface EquityFundLogService extends IService<EquityFundLog>
public int deleteEquityFundLogById(Long id); public int deleteEquityFundLogById(Long id);
List<EquityFundLog> selectEquityFundLogByUid(Long uid); List<EquityFundLog> selectEquityFundLogByUid(Long uid);
List<EquityFundLog> selectEquityFundLogByNewUid(Long newUid);
} }
...@@ -138,6 +138,8 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper, ...@@ -138,6 +138,8 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
@Override @Override
public boolean addConsumerWallet(ConsumerWallet consumerWallet) { public boolean addConsumerWallet(ConsumerWallet consumerWallet) {
String rechargeMembershipExpirationTime = sysConfigService.selectConfigByKey("rechargeMembershipExpirationTime");
String expirationDateEquityMembership = sysConfigService.selectConfigByKey("expirationDateEquityMembership");
int i = consumerWalletMapper.insertConsumerWallet(consumerWallet); int i = consumerWalletMapper.insertConsumerWallet(consumerWallet);
ConsumerMember one = consumerMemberService.getOne(new LambdaQueryWrapper<ConsumerMember>().eq(ConsumerMember::getConsumerId, consumerWallet.getConsumerId())); ConsumerMember one = consumerMemberService.getOne(new LambdaQueryWrapper<ConsumerMember>().eq(ConsumerMember::getConsumerId, consumerWallet.getConsumerId()));
MemberConfig memberConfig = memberConfigService.getOne(new LambdaQueryWrapper<MemberConfig>().eq(MemberConfig::getMembershipLevel, one.getMembershipLevel())); MemberConfig memberConfig = memberConfigService.getOne(new LambdaQueryWrapper<MemberConfig>().eq(MemberConfig::getMembershipLevel, one.getMembershipLevel()));
...@@ -178,10 +180,10 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper, ...@@ -178,10 +180,10 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
memberProgressLog.setOperationType(YesNoEnum.yes.getIndex()); memberProgressLog.setOperationType(YesNoEnum.yes.getIndex());
memberProgressLog.setCreateTime(new Date()); memberProgressLog.setCreateTime(new Date());
if (one.getIsRecharge().equals(YesNoEnum.yes.getIndex())) { if (one.getIsRecharge().equals(YesNoEnum.yes.getIndex())) {
memberProgressLog.setExpirationTime(DateUtils.addYears(new Date(), 100)); memberProgressLog.setExpirationTime(DateUtils.addYears(new Date(), Integer.parseInt(rechargeMembershipExpirationTime)));
} }
if (one.getIsRights().equals(YesNoEnum.yes.getIndex())) { if (one.getIsRights().equals(YesNoEnum.yes.getIndex())) {
memberProgressLog.setExpirationTime(DateUtils.addYears(new Date(), 1)); memberProgressLog.setExpirationTime(DateUtils.addYears(new Date(), Integer.parseInt(expirationDateEquityMembership)));
} }
memberProgressLogService.save(memberProgressLog); memberProgressLogService.save(memberProgressLog);
...@@ -205,6 +207,8 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper, ...@@ -205,6 +207,8 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
BigDecimal oldBalance = consumerWallet.getBalance(); BigDecimal oldBalance = consumerWallet.getBalance();
BigDecimal oldDuration = consumerWallet.getRemainingDuration(); BigDecimal oldDuration = consumerWallet.getRemainingDuration();
BigDecimal oldIntegral = consumerWallet.getRemainingIntegral(); BigDecimal oldIntegral = consumerWallet.getRemainingIntegral();
String rechargeMembershipExpirationTime = sysConfigService.selectConfigByKey("rechargeMembershipExpirationTime");
String expirationDateEquityMembership = sysConfigService.selectConfigByKey("expirationDateEquityMembership");
RechargeConf rechargeConf = rechargeConfService.selectRechargeConfById(recharge.getRechargeConfId()); RechargeConf rechargeConf = rechargeConfService.selectRechargeConfById(recharge.getRechargeConfId());
if (one.getIsRecharge().equals(YesNoEnum.yes.getIndex())) { if (one.getIsRecharge().equals(YesNoEnum.yes.getIndex())) {
...@@ -212,8 +216,7 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper, ...@@ -212,8 +216,7 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
// .eq(MemberConfig::getMembershipLevel, one.getMembershipLevel()) // .eq(MemberConfig::getMembershipLevel, one.getMembershipLevel())
// .eq(MemberConfig::getMemberType, MemberTypeEnum.RECHARGE.getIndex()) // .eq(MemberConfig::getMemberType, MemberTypeEnum.RECHARGE.getIndex())
// ); // );
String expirationDateEquityMembership = sysConfigService.selectConfigByKey("expirationDateEquityMembership"); one.setExpirationDate(DateUtils.addYears(new Date(), Integer.parseInt(rechargeMembershipExpirationTime)));
one.setExpirationDate(DateUtils.addYears(new Date(), Integer.parseInt(expirationDateEquityMembership)));
} }
logger.debug("修改会员用户"); logger.debug("修改会员用户");
...@@ -272,10 +275,10 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper, ...@@ -272,10 +275,10 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
memberProgressLog.setOperationType(YesNoEnum.yes.getIndex()); memberProgressLog.setOperationType(YesNoEnum.yes.getIndex());
memberProgressLog.setCreateTime(new Date()); memberProgressLog.setCreateTime(new Date());
if (one.getIsRecharge().equals(YesNoEnum.yes.getIndex())) { if (one.getIsRecharge().equals(YesNoEnum.yes.getIndex())) {
memberProgressLog.setExpirationTime(DateUtils.addYears(new Date(), 100)); memberProgressLog.setExpirationTime(DateUtils.addYears(new Date(), Integer.parseInt(rechargeMembershipExpirationTime)));
} }
if (one.getIsRights().equals(YesNoEnum.yes.getIndex())) { if (one.getIsRights().equals(YesNoEnum.yes.getIndex())) {
memberProgressLog.setExpirationTime(DateUtils.addYears(new Date(), 1)); memberProgressLog.setExpirationTime(DateUtils.addYears(new Date(), Integer.parseInt(expirationDateEquityMembership)));
} }
memberProgressLogService.save(memberProgressLog); memberProgressLogService.save(memberProgressLog);
...@@ -300,6 +303,8 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper, ...@@ -300,6 +303,8 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
private void accumulatedConsumptionStatistics(ConsumerWallet consumerWallet, ConsumerMember one, MemberConfig memberConfig) { private void accumulatedConsumptionStatistics(ConsumerWallet consumerWallet, ConsumerMember one, MemberConfig memberConfig) {
logger.debug("统计累计积分开始"); logger.debug("统计累计积分开始");
String rechargeMembershipExpirationTime = sysConfigService.selectConfigByKey("rechargeMembershipExpirationTime");
String expirationDateEquityMembership = sysConfigService.selectConfigByKey("expirationDateEquityMembership");
final BigDecimal[] consumption = {BigDecimal.ZERO}; final BigDecimal[] consumption = {BigDecimal.ZERO};
//查询含当天23:59:59以及往前90天的00:00:00整天的订单 //查询含当天23:59:59以及往前90天的00:00:00整天的订单
Calendar calendar = Calendar.getInstance(); Calendar calendar = Calendar.getInstance();
...@@ -370,10 +375,10 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper, ...@@ -370,10 +375,10 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
memberProgressLog.setOperationType(YesNoEnum.yes.getIndex()); memberProgressLog.setOperationType(YesNoEnum.yes.getIndex());
memberProgressLog.setCreateTime(new Date()); memberProgressLog.setCreateTime(new Date());
if (one.getIsRecharge().equals(YesNoEnum.yes.getIndex())) { if (one.getIsRecharge().equals(YesNoEnum.yes.getIndex())) {
memberProgressLog.setExpirationTime(DateUtils.addYears(new Date(), 100)); memberProgressLog.setExpirationTime(DateUtils.addYears(new Date(), Integer.parseInt(rechargeMembershipExpirationTime)));
} }
if (one.getIsRights().equals(YesNoEnum.yes.getIndex())) { if (one.getIsRights().equals(YesNoEnum.yes.getIndex())) {
memberProgressLog.setExpirationTime(DateUtils.addYears(new Date(), 1)); memberProgressLog.setExpirationTime(DateUtils.addYears(new Date(), Integer.parseInt(expirationDateEquityMembership)));
} }
if (memberProgressLogService.save(memberProgressLog) && integralLogService.save(integralLog)) { if (memberProgressLogService.save(memberProgressLog) && integralLogService.save(integralLog)) {
......
...@@ -102,4 +102,10 @@ public class EquityFundLogServiceImpl extends ServiceImpl<EquityFundLogMapper, E ...@@ -102,4 +102,10 @@ public class EquityFundLogServiceImpl extends ServiceImpl<EquityFundLogMapper, E
return equityFundLogMapper.selectList(new LambdaQueryWrapper<EquityFundLog>().eq(EquityFundLog::getUid,id)); return equityFundLogMapper.selectList(new LambdaQueryWrapper<EquityFundLog>().eq(EquityFundLog::getUid,id));
} }
@Override
public List<EquityFundLog> selectEquityFundLogByNewUid(Long newUid) {
return equityFundLogMapper.selectList(new LambdaQueryWrapper<EquityFundLog>().eq(EquityFundLog::getNewUid,newUid));
}
} }
...@@ -170,6 +170,7 @@ public class EquityMembersOrderServiceImpl extends ServiceImpl<EquityMembersOrde ...@@ -170,6 +170,7 @@ public class EquityMembersOrderServiceImpl extends ServiceImpl<EquityMembersOrde
ConsumerMember consumerMember = consumerMemberService.getOne(new LambdaQueryWrapper<ConsumerMember>().eq(ConsumerMember::getConsumerId, equityMembersOrder.getConsumerId())); ConsumerMember consumerMember = consumerMemberService.getOne(new LambdaQueryWrapper<ConsumerMember>().eq(ConsumerMember::getConsumerId, equityMembersOrder.getConsumerId()));
ConsumerWallet consumerWallet = consumerWalletService.getOne(new LambdaQueryWrapper<ConsumerWallet>().eq(ConsumerWallet::getConsumerId, equityMembersOrder.getConsumerId())); ConsumerWallet consumerWallet = consumerWalletService.getOne(new LambdaQueryWrapper<ConsumerWallet>().eq(ConsumerWallet::getConsumerId, equityMembersOrder.getConsumerId()));
EquityMembersOrderConfig equityMembersOrderConfig = equityMembersOrderConfigService.selectEquityMembersOrderConfigById(equityMembersOrder.getEquityMembersConfigId()); EquityMembersOrderConfig equityMembersOrderConfig = equityMembersOrderConfigService.selectEquityMembersOrderConfigById(equityMembersOrder.getEquityMembersConfigId());
String expirationDateEquityMembership = sysConfigService.selectConfigByKey("expirationDateEquityMembership");
if (ObjectUtil.isEmpty(consumerMember)) { if (ObjectUtil.isEmpty(consumerMember)) {
ConsumerMember newConsumerMember = new ConsumerMember(); ConsumerMember newConsumerMember = new ConsumerMember();
newConsumerMember.setConsumerId(equityMembersOrder.getConsumerId()); newConsumerMember.setConsumerId(equityMembersOrder.getConsumerId());
...@@ -190,7 +191,7 @@ public class EquityMembersOrderServiceImpl extends ServiceImpl<EquityMembersOrde ...@@ -190,7 +191,7 @@ public class EquityMembersOrderServiceImpl extends ServiceImpl<EquityMembersOrde
memberProgressLog.setOperationType(YesNoEnum.yes.getIndex()); memberProgressLog.setOperationType(YesNoEnum.yes.getIndex());
memberProgressLog.setOperationTime(new Date()); memberProgressLog.setOperationTime(new Date());
memberProgressLog.setCreateTime(new Date()); memberProgressLog.setCreateTime(new Date());
memberProgressLog.setExpirationTime(DateUtils.addYears(new Date(), 1)); memberProgressLog.setExpirationTime(DateUtils.addYears(new Date(), Integer.parseInt(expirationDateEquityMembership)));
memberProgressLogService.save(memberProgressLog); memberProgressLogService.save(memberProgressLog);
} }
newConsumerMember.setCreateTime(new Date()); newConsumerMember.setCreateTime(new Date());
...@@ -209,7 +210,7 @@ public class EquityMembersOrderServiceImpl extends ServiceImpl<EquityMembersOrde ...@@ -209,7 +210,7 @@ public class EquityMembersOrderServiceImpl extends ServiceImpl<EquityMembersOrde
.eq(MemberConfig::getMembershipLevel, consumerMember.getMembershipLevel()) .eq(MemberConfig::getMembershipLevel, consumerMember.getMembershipLevel())
// .eq(MemberConfig::getMemberType, MemberTypeEnum.RIGHTS.getIndex()) // .eq(MemberConfig::getMemberType, MemberTypeEnum.RIGHTS.getIndex())
); );
String expirationDateEquityMembership = sysConfigService.selectConfigByKey("expirationDateEquityMembership");
if (consumerMember.getIsRights().equals(YesNoEnum.yes.getIndex())) { if (consumerMember.getIsRights().equals(YesNoEnum.yes.getIndex())) {
//在原来的基础上增加有效期 //在原来的基础上增加有效期
...@@ -262,6 +263,7 @@ public class EquityMembersOrderServiceImpl extends ServiceImpl<EquityMembersOrde ...@@ -262,6 +263,7 @@ public class EquityMembersOrderServiceImpl extends ServiceImpl<EquityMembersOrde
private void extracted(EquityMembersOrder equityMembersOrder, EquityMembersOrderConfig equityMembersOrderConfig, private void extracted(EquityMembersOrder equityMembersOrder, EquityMembersOrderConfig equityMembersOrderConfig,
ConsumerMember consumerMember, ConsumerWallet consumerWallet, MemberConfig memberConfigServiceOne) { ConsumerMember consumerMember, ConsumerWallet consumerWallet, MemberConfig memberConfigServiceOne) {
String expirationDateEquityMembership = sysConfigService.selectConfigByKey("expirationDateEquityMembership");
if (equityMembersOrderConfig.getGiftPoints().compareTo(BigDecimal.ZERO) > 0) { if (equityMembersOrderConfig.getGiftPoints().compareTo(BigDecimal.ZERO) > 0) {
MemberProgressLog memberProgressLog = new MemberProgressLog(); MemberProgressLog memberProgressLog = new MemberProgressLog();
memberProgressLog.setConsumerId(equityMembersOrder.getConsumerId()); memberProgressLog.setConsumerId(equityMembersOrder.getConsumerId());
...@@ -271,7 +273,7 @@ public class EquityMembersOrderServiceImpl extends ServiceImpl<EquityMembersOrde ...@@ -271,7 +273,7 @@ public class EquityMembersOrderServiceImpl extends ServiceImpl<EquityMembersOrde
memberProgressLog.setOperationType(YesNoEnum.yes.getIndex()); memberProgressLog.setOperationType(YesNoEnum.yes.getIndex());
memberProgressLog.setOperationTime(new Date()); memberProgressLog.setOperationTime(new Date());
memberProgressLog.setCreateTime(new Date()); memberProgressLog.setCreateTime(new Date());
memberProgressLog.setExpirationTime(DateUtils.addYears(new Date(), 1)); memberProgressLog.setExpirationTime(DateUtils.addYears(new Date(), Integer.parseInt(expirationDateEquityMembership)));
IntegralLog integralLog = new IntegralLog(); IntegralLog integralLog = new IntegralLog();
integralLog.setConsumerId(equityMembersOrder.getConsumerId()); integralLog.setConsumerId(equityMembersOrder.getConsumerId());
......
...@@ -167,6 +167,8 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme ...@@ -167,6 +167,8 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
@Autowired @Autowired
private MemberProgressLogService memberProgressLogService; private MemberProgressLogService memberProgressLogService;
@Autowired
private ISysConfigService sysConfigService;
@Autowired @Autowired
private RechargeService rechargeService; private RechargeService rechargeService;
...@@ -1197,11 +1199,13 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme ...@@ -1197,11 +1199,13 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
memberProgressLog.setOperationType(YesNoEnum.yes.getIndex()); memberProgressLog.setOperationType(YesNoEnum.yes.getIndex());
memberProgressLog.setOperationTime(new Date()); memberProgressLog.setOperationTime(new Date());
memberProgressLog.setCreateTime(new Date()); memberProgressLog.setCreateTime(new Date());
String rechargeMembershipExpirationTime = sysConfigService.selectConfigByKey("rechargeMembershipExpirationTime");
String expirationDateEquityMembership = sysConfigService.selectConfigByKey("expirationDateEquityMembership");
if (consumerMember.getIsRecharge().equals(YesNoEnum.yes.getIndex())) { if (consumerMember.getIsRecharge().equals(YesNoEnum.yes.getIndex())) {
memberProgressLog.setExpirationTime(DateUtils.addYears(new Date(), 100)); memberProgressLog.setExpirationTime(DateUtils.addYears(new Date(), Integer.parseInt(rechargeMembershipExpirationTime)));
} }
if (consumerMember.getIsRights().equals(YesNoEnum.yes.getIndex())) { if (consumerMember.getIsRights().equals(YesNoEnum.yes.getIndex())) {
memberProgressLog.setExpirationTime(DateUtils.addYears(new Date(), 1)); memberProgressLog.setExpirationTime(DateUtils.addYears(new Date(), Integer.parseInt(expirationDateEquityMembership)));
} }
if (consumerMember.getIsRights().equals(YesNoEnum.yes.getIndex()) || consumerMember.getIsRecharge().equals(YesNoEnum.yes.getIndex())) { if (consumerMember.getIsRights().equals(YesNoEnum.yes.getIndex()) || consumerMember.getIsRecharge().equals(YesNoEnum.yes.getIndex())) {
memberProgressLogService.save(memberProgressLog); memberProgressLogService.save(memberProgressLog);
...@@ -1384,11 +1388,13 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme ...@@ -1384,11 +1388,13 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
memberProgressLog.setOperationType(YesNoEnum.no.getIndex()); memberProgressLog.setOperationType(YesNoEnum.no.getIndex());
memberProgressLog.setOperationTime(new Date()); memberProgressLog.setOperationTime(new Date());
memberProgressLog.setCreateTime(new Date()); memberProgressLog.setCreateTime(new Date());
String rechargeMembershipExpirationTime = sysConfigService.selectConfigByKey("rechargeMembershipExpirationTime");
String expirationDateEquityMembership = sysConfigService.selectConfigByKey("expirationDateEquityMembership");
if (consumerMember.getIsRecharge().equals(YesNoEnum.yes.getIndex())) { if (consumerMember.getIsRecharge().equals(YesNoEnum.yes.getIndex())) {
memberProgressLog.setExpirationTime(DateUtils.addYears(new Date(), 100)); memberProgressLog.setExpirationTime(DateUtils.addYears(new Date(), Integer.parseInt(rechargeMembershipExpirationTime)));
} }
if (consumerMember.getIsRights().equals(YesNoEnum.yes.getIndex())) { if (consumerMember.getIsRights().equals(YesNoEnum.yes.getIndex())) {
memberProgressLog.setExpirationTime(DateUtils.addYears(new Date(), 1)); memberProgressLog.setExpirationTime(DateUtils.addYears(new Date(), Integer.parseInt(expirationDateEquityMembership)));
} }
if ((consumerMember.getIsRecharge().equals(YesNoEnum.yes.getIndex()) || consumerMember.getIsRights().equals(YesNoEnum.yes.getIndex())) if ((consumerMember.getIsRecharge().equals(YesNoEnum.yes.getIndex()) || consumerMember.getIsRights().equals(YesNoEnum.yes.getIndex()))
......
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