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