mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-22 12:05:05 +08:00
update
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
package com.jsowell.pile.mapper;
|
||||
|
||||
import com.jsowell.pile.domain.MemberGroup;
|
||||
import com.jsowell.pile.vo.web.MemberDiscountVO;
|
||||
import com.jsowell.pile.vo.web.MemberGroupVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
@@ -63,4 +65,13 @@ public interface MemberGroupMapper {
|
||||
public int deleteMemberGroupByIds(Long[] ids);
|
||||
|
||||
List<MemberGroupVO> queryMemberGroupList(MemberGroup memberGroup);
|
||||
|
||||
/**
|
||||
* 查询会员折扣
|
||||
* @param merchantId
|
||||
* @param stationId
|
||||
* @param memberId
|
||||
* @return
|
||||
*/
|
||||
MemberDiscountVO queryMemberDiscount(@Param("merchantId") String merchantId, @Param("stationId") String stationId, @Param("memberId") String memberId);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.jsowell.pile.service;
|
||||
|
||||
import com.jsowell.pile.domain.MemberGroup;
|
||||
import com.jsowell.pile.vo.web.MemberDiscountVO;
|
||||
import com.jsowell.pile.vo.web.MemberGroupVO;
|
||||
|
||||
import java.util.List;
|
||||
@@ -60,4 +61,13 @@ public interface MemberGroupService
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMemberGroupById(Long id);
|
||||
|
||||
/**
|
||||
* 查询会员折扣
|
||||
* @param merchantId
|
||||
* @param stationId
|
||||
* @param memberId
|
||||
* @return
|
||||
*/
|
||||
MemberDiscountVO queryMemberDiscount(String merchantId, String stationId, String memberId);
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.jsowell.common.util.id.IdUtils;
|
||||
import com.jsowell.pile.domain.MemberGroup;
|
||||
import com.jsowell.pile.mapper.MemberGroupMapper;
|
||||
import com.jsowell.pile.service.MemberGroupService;
|
||||
import com.jsowell.pile.vo.web.MemberDiscountVO;
|
||||
import com.jsowell.pile.vo.web.MemberGroupVO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
@@ -127,4 +128,13 @@ public class MemberGroupServiceImpl implements MemberGroupService {
|
||||
public int deleteMemberGroupById(Long id) {
|
||||
return memberGroupMapper.deleteMemberGroupById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询会员折扣
|
||||
*/
|
||||
@Override
|
||||
public MemberDiscountVO queryMemberDiscount(String merchantId, String stationId, String memberId) {
|
||||
MemberDiscountVO MemberDiscountVO = memberGroupMapper.queryMemberDiscount(merchantId, stationId, memberId);
|
||||
return MemberDiscountVO;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3083,7 +3083,9 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService {
|
||||
}
|
||||
}
|
||||
|
||||
// 计算启动金额
|
||||
/**
|
||||
* 计算启动金额
|
||||
*/
|
||||
private BigDecimal computeChargeAmount(String merchantId, String stationId, String memberId, BigDecimal payAmount) {
|
||||
// 默认折扣100%
|
||||
BigDecimal discount = BigDecimal.ONE;
|
||||
|
||||
@@ -400,6 +400,9 @@ public abstract class AbstractProgramLogic implements InitializingBean {
|
||||
totalElectricityAmount = orderAmount.subtract(totalServiceAmount);
|
||||
}
|
||||
|
||||
// 查询会员折扣
|
||||
|
||||
|
||||
// 电费总金额
|
||||
orderDetail.setTotalElectricityAmount(totalElectricityAmount);
|
||||
// 服务费总金额
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.jsowell.pile.vo.web;
|
||||
|
||||
import lombok.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
public class MemberDiscountVO {
|
||||
/**
|
||||
* 会员组编号
|
||||
*/
|
||||
private String groupCode;
|
||||
|
||||
/**
|
||||
* 运营商id
|
||||
*/
|
||||
private String merchantId;
|
||||
|
||||
/**
|
||||
* 站点id
|
||||
*/
|
||||
private String stationId;
|
||||
|
||||
/** 会员组等级 */
|
||||
private String groupLevel;
|
||||
|
||||
/** 类型(1-服务费折扣,2-电费折扣 ,3-电费和服务费一起折扣) */
|
||||
private String groupType;
|
||||
|
||||
/** 折扣率 */
|
||||
private BigDecimal discount;
|
||||
}
|
||||
Reference in New Issue
Block a user