//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.luozhihui.project.mapper;

import com.luozhihui.project.entity.User;
import java.util.List;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.transaction.annotation.Transactional;

public interface UserRegMapper {
    @Insert({"insert into `user`(`Phone`,`UserName`,`PassWord`,`IdCard`,`DriverLicense`) VALUES(#{Phone},#{UserName},#{PassWord},#{IdCard},#{DriverLicense})"})
    @Transactional
    void save(User user);

    @Select({"select `code` from  `user` where `phone`=#{phone}"})
    List<String> findByCode(@Param("phone") String phone);

    @Select({"select * from  `user` where `phone`=#{phone}"})
    User findByPhone(@Param("phone") String phone);

    void deleteCode(String phone);
}
