Commit 6cfe5a6d by xieshixiang

修改解绑条件限制逻辑

parent 29bc0eb1
......@@ -104,6 +104,7 @@ public class BindServiceImpl extends ServiceImpl<BindInfoMapper, BindInfo> imple
return ResponseGenerator.fail(StatusCode.DATA_ERROR);
}
//规则3:判断当前车牌号是否已绑定
QueryWrapper<BindInfo> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("user_id", info.getUserId());
queryWrapper.eq("plate_num", info.getPlateNum());
......@@ -127,7 +128,9 @@ public class BindServiceImpl extends ServiceImpl<BindInfoMapper, BindInfo> imple
*/
@Override
public boolean unbindInfo(UnBindReq req) {
/**
* 解绑规则:30天内,同一客户解绑次数总计不能超过10次
*/
QueryWrapper<BindInfo> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("user_id", req.getUnqId());
queryWrapper.eq("unbind_time", DateUtil.offsetDay(new Date(), -30));
......
-- auto-generated definition
-- auto-generated definition
create table verify_info
(
id bigint auto_increment
primary key,
user_id varchar(36) null comment '用户id',
verify_code varchar(50) null comment '短信验证码',
phone varchar(11) null comment '电话号码',
pass_time datetime null comment '验证通过时间'
)
comment '短信验证通过记录';
-- auto-generated definition
-- auto-generated definition
create table bind_info
(
unq_id varchar(36) not null comment '用户车辆绑定记录唯一编号'
primary key,
user_id varchar(128) not null comment '客户唯一编号',
phone varchar(11) not null comment '客户手机号',
plate_color varchar(2) null comment '车牌颜色:A:白,B:灰,C:黄,D:粉,E:红,F:紫,G:绿,H:蓝,I:棕,J:黑',
plate_num varchar(20) not null comment '车主车牌号',
plate_type varchar(20) not null comment '车牌类型',
status varchar(10) default '1' null comment '绑定状态:0,未绑定,1,已绑定',
gmt_bind_time datetime null comment '绑定时间',
unbind_time datetime null comment '解绑时间'
)
comment '用户车辆绑定信息';
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