记得上下班打卡 | git大法好,push需谨慎

Commit b445b1f6 authored by 张国柄's avatar 张国柄

去除限购逻辑;

parent a3bb0918
package com.liquidnet.client.admin.zhengzai.adam.service.impl; package com.liquidnet.client.admin.zhengzai.adam.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.liquidnet.client.admin.zhengzai.adam.service.IAdamMemberPriceAdminService; import com.liquidnet.client.admin.zhengzai.adam.service.IAdamMemberPriceAdminService;
...@@ -54,14 +55,15 @@ public class AdamMemberPriceAdminServiceImpl extends ServiceImpl<AdamMemberPrice ...@@ -54,14 +55,15 @@ public class AdamMemberPriceAdminServiceImpl extends ServiceImpl<AdamMemberPrice
AdamMember updateInfo = new AdamMember(); AdamMember updateInfo = new AdamMember();
updateInfo.setIntegralRate(param.getIntegralRate()); updateInfo.setIntegralRate(param.getIntegralRate());
if (adamMemberMapper.update(updateInfo, Wrappers.lambdaUpdate(AdamMember.class) LambdaUpdateWrapper<AdamMember> memberLambdaUpdateWrapper = Wrappers.lambdaUpdate(AdamMember.class);
.eq(AdamMember::getState, 1) memberLambdaUpdateWrapper.eq(AdamMember::getState, 1);
.eq(AdamMember::getMemberId, param.getMemberId())) > 0) { memberLambdaUpdateWrapper.eq(AdamMember::getMemberId, param.getMemberId());
LambdaQueryWrapper<AdamMemberPrice> queryWrapper = Wrappers.lambdaQuery(AdamMemberPrice.class) if (adamMemberMapper.update(updateInfo, memberLambdaUpdateWrapper) > 0) {
// .eq(AdamMemberPrice::getMemberPriceId, memberPriceId) LambdaQueryWrapper<AdamMemberPrice> memberPriceLambdaQueryWrapper = Wrappers.lambdaQuery(AdamMemberPrice.class);
.eq(AdamMemberPrice::getMemberId, memberId) // memberPriceLambdaQueryWrapper.eq(AdamMemberPrice::getMemberPriceId, memberPriceId);
.eq(AdamMemberPrice::getState, 1); memberPriceLambdaQueryWrapper.eq(AdamMemberPrice::getMemberId, memberId);
List<AdamMemberPrice> memberPriceList = adamMemberPriceMapper.selectList(queryWrapper); memberPriceLambdaQueryWrapper.eq(AdamMemberPrice::getState, 1);
List<AdamMemberPrice> memberPriceList = adamMemberPriceMapper.selectList(memberPriceLambdaQueryWrapper);
LocalDateTime nowTime = LocalDateTime.now(); LocalDateTime nowTime = LocalDateTime.now();
boolean saveOrUpdateRst; boolean saveOrUpdateRst;
AdamMemberPrice saveOrUpdateInfo; AdamMemberPrice saveOrUpdateInfo;
...@@ -88,9 +90,9 @@ public class AdamMemberPriceAdminServiceImpl extends ServiceImpl<AdamMemberPrice ...@@ -88,9 +90,9 @@ public class AdamMemberPriceAdminServiceImpl extends ServiceImpl<AdamMemberPrice
saveOrUpdateInfo.setPriceSpecial(param.getPriceSpecial()); saveOrUpdateInfo.setPriceSpecial(param.getPriceSpecial());
saveOrUpdateInfo.setDays(param.getDays()); saveOrUpdateInfo.setDays(param.getDays());
saveOrUpdateRst = adamMemberPriceMapper.update(saveOrUpdateInfo, queryWrapper) > 0; saveOrUpdateRst = adamMemberPriceMapper.update(saveOrUpdateInfo, memberPriceLambdaQueryWrapper) > 0;
saveOrUpdateInfo = adamMemberPriceMapper.selectList(queryWrapper).get(0); saveOrUpdateInfo = adamMemberPriceMapper.selectList(memberPriceLambdaQueryWrapper).get(0);
} }
if (saveOrUpdateRst) { if (saveOrUpdateRst) {
String memberPriceId = saveOrUpdateInfo.getMemberPriceId(); String memberPriceId = saveOrUpdateInfo.getMemberPriceId();
......
...@@ -52,9 +52,10 @@ public class AdamMemberServiceAdminImpl extends ServiceImpl<AdamMemberMapper, Ad ...@@ -52,9 +52,10 @@ public class AdamMemberServiceAdminImpl extends ServiceImpl<AdamMemberMapper, Ad
public boolean edit(AdamMemberBuildParam parameter) { public boolean edit(AdamMemberBuildParam parameter) {
AdamMember adamMember = new AdamMember(); AdamMember adamMember = new AdamMember();
BeanUtils.copyProperties(parameter, adamMember); BeanUtils.copyProperties(parameter, adamMember);
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); adamMember.setLimitation(0);
adamMember.setLimitbAt(LocalDateTime.parse(parameter.getLimitbAt(), dateTimeFormatter)); // DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
adamMember.setLimiteAt(LocalDateTime.parse(parameter.getLimitbAt(), dateTimeFormatter)); // adamMember.setLimitbAt(LocalDateTime.parse(parameter.getLimitbAt(), dateTimeFormatter));
// adamMember.setLimiteAt(LocalDateTime.parse(parameter.getLimitbAt(), dateTimeFormatter));
adamMember.setUpdatedAt(LocalDateTime.now()); adamMember.setUpdatedAt(LocalDateTime.now());
AdamMemberVo vo = AdamMemberVo.getNew().copy(adamMember); AdamMemberVo vo = AdamMemberVo.getNew().copy(adamMember);
......
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