mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 02:55:04 +08:00
update 订单列表添加车牌号字段
This commit is contained in:
@@ -428,25 +428,29 @@ public class MemberService {
|
||||
* @param dto
|
||||
*/
|
||||
public void memberBindingCarNo(BindingCarNoDTO dto){
|
||||
// 校验短信验证码
|
||||
MemberRegisterAndLoginDTO registerAndLoginDTO = MemberRegisterAndLoginDTO.builder()
|
||||
.mobileNumber(dto.getPhoneNumber())
|
||||
.verificationCode(dto.getVerificationCode())
|
||||
.build();
|
||||
checkVerificationCode(registerAndLoginDTO);
|
||||
// 校验短信验证码(2023.8.24 不做校验)
|
||||
// MemberRegisterAndLoginDTO registerAndLoginDTO = MemberRegisterAndLoginDTO.builder()
|
||||
// .mobileNumber(dto.getPhoneNumber())
|
||||
// .verificationCode(dto.getVerificationCode())
|
||||
// .build();
|
||||
// checkVerificationCode(registerAndLoginDTO);
|
||||
|
||||
// 判断当前车牌号是否已经绑定
|
||||
// 判断当前车牌号是否已经绑定 (2023.8.24 不做校验)
|
||||
MemberPlateNumberRelation relation = new MemberPlateNumberRelation();
|
||||
relation.setMemberId(dto.getMemberId());
|
||||
relation.setLicensePlateNumber(dto.getCarNo());
|
||||
List<MemberPlateNumberRelation> list = memberPlateNumberRelationService.selectMemberPlateNumberRelationList(relation);
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
// 不为空说明该用户绑定过此车牌号
|
||||
throw new BusinessException(ReturnCodeEnum.CODE_THIS_CARNO_HAS_BEEN_BINDING);
|
||||
if (StringUtils.isBlank(dto.getCarNo())) {
|
||||
throw new BusinessException(ReturnCodeEnum.CODE_PARAM_NOT_NULL_ERROR);
|
||||
}
|
||||
relation.setLicensePlateNumber(dto.getCarNo());
|
||||
// List<MemberPlateNumberRelation> list = memberPlateNumberRelationService.selectMemberPlateNumberRelationList(relation);
|
||||
// if (CollectionUtils.isNotEmpty(list)) {
|
||||
// // 不为空说明该用户绑定过此车牌号
|
||||
// throw new BusinessException(ReturnCodeEnum.CODE_THIS_CARNO_HAS_BEEN_BINDING);
|
||||
// }
|
||||
|
||||
// 校验该车牌号是否为新能源车牌
|
||||
|
||||
relation.setPhoneNumber(dto.getPhoneNumber());
|
||||
// relation.setPhoneNumber(dto.getPhoneNumber());
|
||||
if (StringUtils.isNotBlank(dto.getVinCode())) {
|
||||
// 判断当前vin是否被绑定
|
||||
MemberPlateNumberRelation memberPlateInfoByVinCode = memberPlateNumberRelationService.getMemberPlateInfoByVinCode(dto.getVinCode());
|
||||
|
||||
@@ -132,6 +132,11 @@ public class OrderBasicInfo extends BaseEntity {
|
||||
@Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date payTime;
|
||||
|
||||
/**
|
||||
* 车牌号码
|
||||
*/
|
||||
private String plateNumber;
|
||||
|
||||
/**
|
||||
* 订单总金额 = 电费总金额 + 服务费总金额
|
||||
*/
|
||||
|
||||
@@ -73,4 +73,9 @@ public class GenerateOrderDTO extends BasicPileDTO{
|
||||
* vin启动有值
|
||||
*/
|
||||
private MemberPlateNumberRelation MemberPlateNumberRelation;
|
||||
|
||||
/**
|
||||
* 车牌号码
|
||||
*/
|
||||
private String plateNumber;
|
||||
}
|
||||
|
||||
@@ -22,18 +22,4 @@ public class GetTokenDTO {
|
||||
*/
|
||||
private String secretKey;
|
||||
|
||||
/**
|
||||
* 请求时间,格式:YYYYMMDDHHMMSS
|
||||
*/
|
||||
private String accTime;
|
||||
|
||||
/**
|
||||
* 1.0
|
||||
*/
|
||||
private String version;
|
||||
|
||||
/**
|
||||
* 使用签名公式获得
|
||||
*/
|
||||
private String sign;
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
<result property="payStatus" column="pay_status"/>
|
||||
<result property="payAmount" column="pay_amount"/>
|
||||
<result property="payTime" column="pay_time"/>
|
||||
<result property="plateNumber" column="plate_number"/>
|
||||
<result property="orderAmount" column="order_amount"/>
|
||||
<result property="virtualAmount" column="virtual_amount"/>
|
||||
<result property="settleAmount" column="settle_amount"/>
|
||||
@@ -104,6 +105,7 @@
|
||||
pay_status,
|
||||
pay_amount,
|
||||
pay_time,
|
||||
plate_number,
|
||||
order_amount,
|
||||
virtual_amount,
|
||||
settle_amount,
|
||||
@@ -351,6 +353,9 @@
|
||||
<if test="payTime != null">
|
||||
pay_time,
|
||||
</if>
|
||||
<if test="plateNumber != null">
|
||||
plate_number,
|
||||
</if>
|
||||
<if test="orderAmount != null">
|
||||
order_amount,
|
||||
</if>
|
||||
@@ -452,6 +457,9 @@
|
||||
<if test="payTime != null">
|
||||
#{payTime},
|
||||
</if>
|
||||
<if test="plateNumber != null">
|
||||
#{plateNumber},
|
||||
</if>
|
||||
<if test="orderAmount != null">
|
||||
#{orderAmount},
|
||||
</if>
|
||||
@@ -554,6 +562,9 @@
|
||||
<if test="payTime != null">
|
||||
pay_time = #{payTime},
|
||||
</if>
|
||||
<if test="plateNumber != null">
|
||||
plate_number = #{plateNumber},
|
||||
</if>
|
||||
<if test="orderAmount != null">
|
||||
order_amount = #{orderAmount},
|
||||
</if>
|
||||
|
||||
@@ -102,11 +102,6 @@ public class LTYTServiceImpl implements LTYTService {
|
||||
if (StringUtils.isBlank(token)) {
|
||||
throw new BusinessException("", "路通云停系统 给指定车辆绑定优惠券 方法获取令牌失败");
|
||||
}
|
||||
// LTYTCommonParams params = new LTYTCommonParams();
|
||||
// params.setAppId(dto.getAppId());
|
||||
// params.setAccTime(DateUtils.dateTimeNow(DateUtils.YYYYMMDDHHMMSS));
|
||||
// params.setToken(token);
|
||||
// params.setVersion("1.0");
|
||||
|
||||
String url = BASE_URL + "bindCoupon";
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
@@ -127,8 +122,9 @@ public class LTYTServiceImpl implements LTYTService {
|
||||
// 发送请求
|
||||
String result = HttpUtil.post(url, JSON.toJSONString(jsonObject));
|
||||
log.info("给指定车辆绑定优惠券 params:{}, result:{}", JSON.toJSONString(jsonObject), result);
|
||||
JSONObject resultJson = JSONObject.parseObject(result);
|
||||
|
||||
return null;
|
||||
return resultJson.getString("msg");
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws UnsupportedEncodingException {
|
||||
|
||||
Reference in New Issue
Block a user