Compare commits

..

No commits in common. "2385b58bb0eced703d70c55e4d7b66b93b97af13" and "c8bc8356448efdee5dd9c9e819a7aecac06b436c" have entirely different histories.

5 changed files with 0 additions and 40 deletions

View File

@ -19,7 +19,6 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.util.List;
import java.util.Optional;
@ -141,16 +140,4 @@ public class MemberController {
}
/**
*
*/
@GetMapping("calculatePayment")
public AjaxResult calculatePayment(@NotNull(message = "请选择会员") Long memberLevelId, @RequestParam(required = false) Long promotionId) {
MemberLevel memberLevel = memberLevelService.getById(memberLevelId);
Double unitPrice = memberLevel.getUnitPrice();
unitPrice = memberService.calculatePayment(unitPrice, promotionId);
return AjaxResult.success(unitPrice);
}
}

View File

@ -3,7 +3,6 @@ package com.mcwl.memberCenter.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.mcwl.memberCenter.domain.Member;
import javax.validation.constraints.NotNull;
import java.util.List;
public interface MemberService extends IService<Member> {
@ -42,6 +41,4 @@ public interface MemberService extends IService<Member> {
* @param consumePoints
*/
void consumePoints(Double consumePoints);
Double calculatePayment(Double unitPrice, Long promotionId);
}

View File

@ -214,24 +214,6 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, Member> impleme
}
@Override
public Double calculatePayment(Double unitPrice, Long promotionId) {
if (Objects.isNull(promotionId)) {
return unitPrice;
}
Promotion promotion = promotionMapper.selectById(promotionId);
if (Objects.isNull(promotion)) {
return unitPrice;
}
PromotionEnum activityType = promotion.getActivityType();
if (activityType == PromotionEnum.DISCOUNT) {
return unitPrice * promotion.getActivityValue();
}
return unitPrice;
}
private void saveMemberConsume(Double consumePoints, Long userId, double points) {
MemberConsume memberConsume = new MemberConsume();
memberConsume.setUserId(userId);

View File

@ -85,9 +85,4 @@ public class ModelImage extends BaseEntity {
*
*/
private Integer status;
/**
*
*/
private Integer isTop;
}

View File

@ -82,7 +82,6 @@ public class ModelImageServiceImpl extends ServiceImpl<ModelImageMapper, ModelIm
BeanUtil.copyProperties(modelImageRes, modelImage);
modelImage.setUserId(SecurityUtils.getUserId());
modelImage.setCreateBy(SecurityUtils.getUsername());
modelImage.setCreateTime(new Date());
modelImage.setUpdateBy(SecurityUtils.getUsername());
modelImage.setUpdateTime(new Date());
modelImage.setStatus(3);