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

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

去除限购逻辑;

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