mirror of
				https://gitee.com/coder-xiaomo/flashsale
				synced 2025-11-04 14:13:14 +08:00 
			
		
		
		
	初始化Git仓库,已完成mybatis-generator自动生成
This commit is contained in:
		
							
								
								
									
										26
									
								
								src/main/java/com/cxyxiaomo/flashsale/App.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								src/main/java/com/cxyxiaomo/flashsale/App.java
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,26 @@
 | 
			
		||||
package com.cxyxiaomo.flashsale;
 | 
			
		||||
 | 
			
		||||
import org.springframework.boot.SpringApplication;
 | 
			
		||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
 | 
			
		||||
import org.springframework.web.bind.annotation.RequestMapping;
 | 
			
		||||
import org.springframework.web.bind.annotation.RestController;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Hello world!
 | 
			
		||||
 */
 | 
			
		||||
@EnableAutoConfiguration // 将这个App的启动类当成一个自动化,可支持配置的Bean,并且能够开启整个一个工程类的基于SpringBoot的一个自动化配置
 | 
			
		||||
@RestController
 | 
			
		||||
public class App {
 | 
			
		||||
 | 
			
		||||
    @RequestMapping("/")
 | 
			
		||||
    public String home() {
 | 
			
		||||
        return "Hello world!";
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static void main(String[] args) {
 | 
			
		||||
        System.out.println("Hello World!");
 | 
			
		||||
 | 
			
		||||
        // 启动SpringBoot项目
 | 
			
		||||
        SpringApplication.run(App.class, args);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,53 @@
 | 
			
		||||
package com.cxyxiaomo.flashsale.dao;
 | 
			
		||||
 | 
			
		||||
import com.cxyxiaomo.flashsale.dataobject.userDataObject;
 | 
			
		||||
 | 
			
		||||
public interface userDataObjectMapper {
 | 
			
		||||
    /**
 | 
			
		||||
     * This method was generated by MyBatis Generator.
 | 
			
		||||
     * This method corresponds to the database table user_info
 | 
			
		||||
     *
 | 
			
		||||
     * @mbg.generated Tue Mar 01 14:58:29 CST 2022
 | 
			
		||||
     */
 | 
			
		||||
    int deleteByPrimaryKey(Integer id);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * This method was generated by MyBatis Generator.
 | 
			
		||||
     * This method corresponds to the database table user_info
 | 
			
		||||
     *
 | 
			
		||||
     * @mbg.generated Tue Mar 01 14:58:29 CST 2022
 | 
			
		||||
     */
 | 
			
		||||
    int insert(userDataObject record);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * This method was generated by MyBatis Generator.
 | 
			
		||||
     * This method corresponds to the database table user_info
 | 
			
		||||
     *
 | 
			
		||||
     * @mbg.generated Tue Mar 01 14:58:29 CST 2022
 | 
			
		||||
     */
 | 
			
		||||
    int insertSelective(userDataObject record);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * This method was generated by MyBatis Generator.
 | 
			
		||||
     * This method corresponds to the database table user_info
 | 
			
		||||
     *
 | 
			
		||||
     * @mbg.generated Tue Mar 01 14:58:29 CST 2022
 | 
			
		||||
     */
 | 
			
		||||
    userDataObject selectByPrimaryKey(Integer id);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * This method was generated by MyBatis Generator.
 | 
			
		||||
     * This method corresponds to the database table user_info
 | 
			
		||||
     *
 | 
			
		||||
     * @mbg.generated Tue Mar 01 14:58:29 CST 2022
 | 
			
		||||
     */
 | 
			
		||||
    int updateByPrimaryKeySelective(userDataObject record);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * This method was generated by MyBatis Generator.
 | 
			
		||||
     * This method corresponds to the database table user_info
 | 
			
		||||
     *
 | 
			
		||||
     * @mbg.generated Tue Mar 01 14:58:29 CST 2022
 | 
			
		||||
     */
 | 
			
		||||
    int updateByPrimaryKey(userDataObject record);
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,53 @@
 | 
			
		||||
package com.cxyxiaomo.flashsale.dao;
 | 
			
		||||
 | 
			
		||||
import com.cxyxiaomo.flashsale.dataobject.userPasswordDataObject;
 | 
			
		||||
 | 
			
		||||
public interface userPasswordDataObjectMapper {
 | 
			
		||||
    /**
 | 
			
		||||
     * This method was generated by MyBatis Generator.
 | 
			
		||||
     * This method corresponds to the database table user_password
 | 
			
		||||
     *
 | 
			
		||||
     * @mbg.generated Tue Mar 01 14:58:29 CST 2022
 | 
			
		||||
     */
 | 
			
		||||
    int deleteByPrimaryKey(Integer id);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * This method was generated by MyBatis Generator.
 | 
			
		||||
     * This method corresponds to the database table user_password
 | 
			
		||||
     *
 | 
			
		||||
     * @mbg.generated Tue Mar 01 14:58:29 CST 2022
 | 
			
		||||
     */
 | 
			
		||||
    int insert(userPasswordDataObject record);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * This method was generated by MyBatis Generator.
 | 
			
		||||
     * This method corresponds to the database table user_password
 | 
			
		||||
     *
 | 
			
		||||
     * @mbg.generated Tue Mar 01 14:58:29 CST 2022
 | 
			
		||||
     */
 | 
			
		||||
    int insertSelective(userPasswordDataObject record);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * This method was generated by MyBatis Generator.
 | 
			
		||||
     * This method corresponds to the database table user_password
 | 
			
		||||
     *
 | 
			
		||||
     * @mbg.generated Tue Mar 01 14:58:29 CST 2022
 | 
			
		||||
     */
 | 
			
		||||
    userPasswordDataObject selectByPrimaryKey(Integer id);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * This method was generated by MyBatis Generator.
 | 
			
		||||
     * This method corresponds to the database table user_password
 | 
			
		||||
     *
 | 
			
		||||
     * @mbg.generated Tue Mar 01 14:58:29 CST 2022
 | 
			
		||||
     */
 | 
			
		||||
    int updateByPrimaryKeySelective(userPasswordDataObject record);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * This method was generated by MyBatis Generator.
 | 
			
		||||
     * This method corresponds to the database table user_password
 | 
			
		||||
     *
 | 
			
		||||
     * @mbg.generated Tue Mar 01 14:58:29 CST 2022
 | 
			
		||||
     */
 | 
			
		||||
    int updateByPrimaryKey(userPasswordDataObject record);
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,234 @@
 | 
			
		||||
package com.cxyxiaomo.flashsale.dataobject;
 | 
			
		||||
 | 
			
		||||
public class userDataObject {
 | 
			
		||||
    /**
 | 
			
		||||
     *
 | 
			
		||||
     * This field was generated by MyBatis Generator.
 | 
			
		||||
     * This field corresponds to the database column user_info.id
 | 
			
		||||
     *
 | 
			
		||||
     * @mbg.generated Tue Mar 01 14:58:29 CST 2022
 | 
			
		||||
     */
 | 
			
		||||
    private Integer id;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     *
 | 
			
		||||
     * This field was generated by MyBatis Generator.
 | 
			
		||||
     * This field corresponds to the database column user_info.name
 | 
			
		||||
     *
 | 
			
		||||
     * @mbg.generated Tue Mar 01 14:58:29 CST 2022
 | 
			
		||||
     */
 | 
			
		||||
    private String name;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     *
 | 
			
		||||
     * This field was generated by MyBatis Generator.
 | 
			
		||||
     * This field corresponds to the database column user_info.gender
 | 
			
		||||
     *
 | 
			
		||||
     * @mbg.generated Tue Mar 01 14:58:29 CST 2022
 | 
			
		||||
     */
 | 
			
		||||
    private Byte gender;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     *
 | 
			
		||||
     * This field was generated by MyBatis Generator.
 | 
			
		||||
     * This field corresponds to the database column user_info.age
 | 
			
		||||
     *
 | 
			
		||||
     * @mbg.generated Tue Mar 01 14:58:29 CST 2022
 | 
			
		||||
     */
 | 
			
		||||
    private Integer age;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     *
 | 
			
		||||
     * This field was generated by MyBatis Generator.
 | 
			
		||||
     * This field corresponds to the database column user_info.telephone
 | 
			
		||||
     *
 | 
			
		||||
     * @mbg.generated Tue Mar 01 14:58:29 CST 2022
 | 
			
		||||
     */
 | 
			
		||||
    private String telephone;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     *
 | 
			
		||||
     * This field was generated by MyBatis Generator.
 | 
			
		||||
     * This field corresponds to the database column user_info.register_mode
 | 
			
		||||
     *
 | 
			
		||||
     * @mbg.generated Tue Mar 01 14:58:29 CST 2022
 | 
			
		||||
     */
 | 
			
		||||
    private String registerMode;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     *
 | 
			
		||||
     * This field was generated by MyBatis Generator.
 | 
			
		||||
     * This field corresponds to the database column user_info.third_party_id
 | 
			
		||||
     *
 | 
			
		||||
     * @mbg.generated Tue Mar 01 14:58:29 CST 2022
 | 
			
		||||
     */
 | 
			
		||||
    private String thirdPartyId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * This method was generated by MyBatis Generator.
 | 
			
		||||
     * This method returns the value of the database column user_info.id
 | 
			
		||||
     *
 | 
			
		||||
     * @return the value of user_info.id
 | 
			
		||||
     *
 | 
			
		||||
     * @mbg.generated Tue Mar 01 14:58:29 CST 2022
 | 
			
		||||
     */
 | 
			
		||||
    public Integer getId() {
 | 
			
		||||
        return id;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * This method was generated by MyBatis Generator.
 | 
			
		||||
     * This method sets the value of the database column user_info.id
 | 
			
		||||
     *
 | 
			
		||||
     * @param id the value for user_info.id
 | 
			
		||||
     *
 | 
			
		||||
     * @mbg.generated Tue Mar 01 14:58:29 CST 2022
 | 
			
		||||
     */
 | 
			
		||||
    public void setId(Integer id) {
 | 
			
		||||
        this.id = id;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * This method was generated by MyBatis Generator.
 | 
			
		||||
     * This method returns the value of the database column user_info.name
 | 
			
		||||
     *
 | 
			
		||||
     * @return the value of user_info.name
 | 
			
		||||
     *
 | 
			
		||||
     * @mbg.generated Tue Mar 01 14:58:29 CST 2022
 | 
			
		||||
     */
 | 
			
		||||
    public String getName() {
 | 
			
		||||
        return name;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * This method was generated by MyBatis Generator.
 | 
			
		||||
     * This method sets the value of the database column user_info.name
 | 
			
		||||
     *
 | 
			
		||||
     * @param name the value for user_info.name
 | 
			
		||||
     *
 | 
			
		||||
     * @mbg.generated Tue Mar 01 14:58:29 CST 2022
 | 
			
		||||
     */
 | 
			
		||||
    public void setName(String name) {
 | 
			
		||||
        this.name = name == null ? null : name.trim();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * This method was generated by MyBatis Generator.
 | 
			
		||||
     * This method returns the value of the database column user_info.gender
 | 
			
		||||
     *
 | 
			
		||||
     * @return the value of user_info.gender
 | 
			
		||||
     *
 | 
			
		||||
     * @mbg.generated Tue Mar 01 14:58:29 CST 2022
 | 
			
		||||
     */
 | 
			
		||||
    public Byte getGender() {
 | 
			
		||||
        return gender;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * This method was generated by MyBatis Generator.
 | 
			
		||||
     * This method sets the value of the database column user_info.gender
 | 
			
		||||
     *
 | 
			
		||||
     * @param gender the value for user_info.gender
 | 
			
		||||
     *
 | 
			
		||||
     * @mbg.generated Tue Mar 01 14:58:29 CST 2022
 | 
			
		||||
     */
 | 
			
		||||
    public void setGender(Byte gender) {
 | 
			
		||||
        this.gender = gender;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * This method was generated by MyBatis Generator.
 | 
			
		||||
     * This method returns the value of the database column user_info.age
 | 
			
		||||
     *
 | 
			
		||||
     * @return the value of user_info.age
 | 
			
		||||
     *
 | 
			
		||||
     * @mbg.generated Tue Mar 01 14:58:29 CST 2022
 | 
			
		||||
     */
 | 
			
		||||
    public Integer getAge() {
 | 
			
		||||
        return age;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * This method was generated by MyBatis Generator.
 | 
			
		||||
     * This method sets the value of the database column user_info.age
 | 
			
		||||
     *
 | 
			
		||||
     * @param age the value for user_info.age
 | 
			
		||||
     *
 | 
			
		||||
     * @mbg.generated Tue Mar 01 14:58:29 CST 2022
 | 
			
		||||
     */
 | 
			
		||||
    public void setAge(Integer age) {
 | 
			
		||||
        this.age = age;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * This method was generated by MyBatis Generator.
 | 
			
		||||
     * This method returns the value of the database column user_info.telephone
 | 
			
		||||
     *
 | 
			
		||||
     * @return the value of user_info.telephone
 | 
			
		||||
     *
 | 
			
		||||
     * @mbg.generated Tue Mar 01 14:58:29 CST 2022
 | 
			
		||||
     */
 | 
			
		||||
    public String getTelephone() {
 | 
			
		||||
        return telephone;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * This method was generated by MyBatis Generator.
 | 
			
		||||
     * This method sets the value of the database column user_info.telephone
 | 
			
		||||
     *
 | 
			
		||||
     * @param telephone the value for user_info.telephone
 | 
			
		||||
     *
 | 
			
		||||
     * @mbg.generated Tue Mar 01 14:58:29 CST 2022
 | 
			
		||||
     */
 | 
			
		||||
    public void setTelephone(String telephone) {
 | 
			
		||||
        this.telephone = telephone == null ? null : telephone.trim();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * This method was generated by MyBatis Generator.
 | 
			
		||||
     * This method returns the value of the database column user_info.register_mode
 | 
			
		||||
     *
 | 
			
		||||
     * @return the value of user_info.register_mode
 | 
			
		||||
     *
 | 
			
		||||
     * @mbg.generated Tue Mar 01 14:58:29 CST 2022
 | 
			
		||||
     */
 | 
			
		||||
    public String getRegisterMode() {
 | 
			
		||||
        return registerMode;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * This method was generated by MyBatis Generator.
 | 
			
		||||
     * This method sets the value of the database column user_info.register_mode
 | 
			
		||||
     *
 | 
			
		||||
     * @param registerMode the value for user_info.register_mode
 | 
			
		||||
     *
 | 
			
		||||
     * @mbg.generated Tue Mar 01 14:58:29 CST 2022
 | 
			
		||||
     */
 | 
			
		||||
    public void setRegisterMode(String registerMode) {
 | 
			
		||||
        this.registerMode = registerMode == null ? null : registerMode.trim();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * This method was generated by MyBatis Generator.
 | 
			
		||||
     * This method returns the value of the database column user_info.third_party_id
 | 
			
		||||
     *
 | 
			
		||||
     * @return the value of user_info.third_party_id
 | 
			
		||||
     *
 | 
			
		||||
     * @mbg.generated Tue Mar 01 14:58:29 CST 2022
 | 
			
		||||
     */
 | 
			
		||||
    public String getThirdPartyId() {
 | 
			
		||||
        return thirdPartyId;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * This method was generated by MyBatis Generator.
 | 
			
		||||
     * This method sets the value of the database column user_info.third_party_id
 | 
			
		||||
     *
 | 
			
		||||
     * @param thirdPartyId the value for user_info.third_party_id
 | 
			
		||||
     *
 | 
			
		||||
     * @mbg.generated Tue Mar 01 14:58:29 CST 2022
 | 
			
		||||
     */
 | 
			
		||||
    public void setThirdPartyId(String thirdPartyId) {
 | 
			
		||||
        this.thirdPartyId = thirdPartyId == null ? null : thirdPartyId.trim();
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,102 @@
 | 
			
		||||
package com.cxyxiaomo.flashsale.dataobject;
 | 
			
		||||
 | 
			
		||||
public class userPasswordDataObject {
 | 
			
		||||
    /**
 | 
			
		||||
     *
 | 
			
		||||
     * This field was generated by MyBatis Generator.
 | 
			
		||||
     * This field corresponds to the database column user_password.id
 | 
			
		||||
     *
 | 
			
		||||
     * @mbg.generated Tue Mar 01 14:58:29 CST 2022
 | 
			
		||||
     */
 | 
			
		||||
    private Integer id;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     *
 | 
			
		||||
     * This field was generated by MyBatis Generator.
 | 
			
		||||
     * This field corresponds to the database column user_password.encrpt_password
 | 
			
		||||
     *
 | 
			
		||||
     * @mbg.generated Tue Mar 01 14:58:29 CST 2022
 | 
			
		||||
     */
 | 
			
		||||
    private String encrptPassword;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     *
 | 
			
		||||
     * This field was generated by MyBatis Generator.
 | 
			
		||||
     * This field corresponds to the database column user_password.user_id
 | 
			
		||||
     *
 | 
			
		||||
     * @mbg.generated Tue Mar 01 14:58:29 CST 2022
 | 
			
		||||
     */
 | 
			
		||||
    private Integer userId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * This method was generated by MyBatis Generator.
 | 
			
		||||
     * This method returns the value of the database column user_password.id
 | 
			
		||||
     *
 | 
			
		||||
     * @return the value of user_password.id
 | 
			
		||||
     *
 | 
			
		||||
     * @mbg.generated Tue Mar 01 14:58:29 CST 2022
 | 
			
		||||
     */
 | 
			
		||||
    public Integer getId() {
 | 
			
		||||
        return id;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * This method was generated by MyBatis Generator.
 | 
			
		||||
     * This method sets the value of the database column user_password.id
 | 
			
		||||
     *
 | 
			
		||||
     * @param id the value for user_password.id
 | 
			
		||||
     *
 | 
			
		||||
     * @mbg.generated Tue Mar 01 14:58:29 CST 2022
 | 
			
		||||
     */
 | 
			
		||||
    public void setId(Integer id) {
 | 
			
		||||
        this.id = id;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * This method was generated by MyBatis Generator.
 | 
			
		||||
     * This method returns the value of the database column user_password.encrpt_password
 | 
			
		||||
     *
 | 
			
		||||
     * @return the value of user_password.encrpt_password
 | 
			
		||||
     *
 | 
			
		||||
     * @mbg.generated Tue Mar 01 14:58:29 CST 2022
 | 
			
		||||
     */
 | 
			
		||||
    public String getEncrptPassword() {
 | 
			
		||||
        return encrptPassword;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * This method was generated by MyBatis Generator.
 | 
			
		||||
     * This method sets the value of the database column user_password.encrpt_password
 | 
			
		||||
     *
 | 
			
		||||
     * @param encrptPassword the value for user_password.encrpt_password
 | 
			
		||||
     *
 | 
			
		||||
     * @mbg.generated Tue Mar 01 14:58:29 CST 2022
 | 
			
		||||
     */
 | 
			
		||||
    public void setEncrptPassword(String encrptPassword) {
 | 
			
		||||
        this.encrptPassword = encrptPassword == null ? null : encrptPassword.trim();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * This method was generated by MyBatis Generator.
 | 
			
		||||
     * This method returns the value of the database column user_password.user_id
 | 
			
		||||
     *
 | 
			
		||||
     * @return the value of user_password.user_id
 | 
			
		||||
     *
 | 
			
		||||
     * @mbg.generated Tue Mar 01 14:58:29 CST 2022
 | 
			
		||||
     */
 | 
			
		||||
    public Integer getUserId() {
 | 
			
		||||
        return userId;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * This method was generated by MyBatis Generator.
 | 
			
		||||
     * This method sets the value of the database column user_password.user_id
 | 
			
		||||
     *
 | 
			
		||||
     * @param userId the value for user_password.user_id
 | 
			
		||||
     *
 | 
			
		||||
     * @mbg.generated Tue Mar 01 14:58:29 CST 2022
 | 
			
		||||
     */
 | 
			
		||||
    public void setUserId(Integer userId) {
 | 
			
		||||
        this.userId = userId;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										6
									
								
								src/main/resources/application.properties
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								src/main/resources/application.properties
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,6 @@
 | 
			
		||||
 | 
			
		||||
# ????
 | 
			
		||||
server.port=8090
 | 
			
		||||
 | 
			
		||||
#mybatis.mapper-locations=classpath:mapping/*.xml
 | 
			
		||||
mybatis.mapperLocations=classpath:mapping/*.xml
 | 
			
		||||
							
								
								
									
										157
									
								
								src/main/resources/mapping/userDataObjectMapper.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										157
									
								
								src/main/resources/mapping/userDataObjectMapper.xml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,157 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 | 
			
		||||
<mapper namespace="com.cxyxiaomo.flashsale.dao.userDataObjectMapper">
 | 
			
		||||
  <resultMap id="BaseResultMap" type="com.cxyxiaomo.flashsale.dataobject.userDataObject">
 | 
			
		||||
    <!--
 | 
			
		||||
      WARNING - @mbg.generated
 | 
			
		||||
      This element is automatically generated by MyBatis Generator, do not modify.
 | 
			
		||||
      This element was generated on Tue Mar 01 14:58:29 CST 2022.
 | 
			
		||||
    -->
 | 
			
		||||
    <id column="id" jdbcType="INTEGER" property="id" />
 | 
			
		||||
    <result column="name" jdbcType="VARCHAR" property="name" />
 | 
			
		||||
    <result column="gender" jdbcType="TINYINT" property="gender" />
 | 
			
		||||
    <result column="age" jdbcType="INTEGER" property="age" />
 | 
			
		||||
    <result column="telephone" jdbcType="VARCHAR" property="telephone" />
 | 
			
		||||
    <result column="register_mode" jdbcType="VARCHAR" property="registerMode" />
 | 
			
		||||
    <result column="third_party_id" jdbcType="VARCHAR" property="thirdPartyId" />
 | 
			
		||||
  </resultMap>
 | 
			
		||||
  <sql id="Base_Column_List">
 | 
			
		||||
    <!--
 | 
			
		||||
      WARNING - @mbg.generated
 | 
			
		||||
      This element is automatically generated by MyBatis Generator, do not modify.
 | 
			
		||||
      This element was generated on Tue Mar 01 14:58:29 CST 2022.
 | 
			
		||||
    -->
 | 
			
		||||
    id, name, gender, age, telephone, register_mode, third_party_id
 | 
			
		||||
  </sql>
 | 
			
		||||
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
 | 
			
		||||
    <!--
 | 
			
		||||
      WARNING - @mbg.generated
 | 
			
		||||
      This element is automatically generated by MyBatis Generator, do not modify.
 | 
			
		||||
      This element was generated on Tue Mar 01 14:58:29 CST 2022.
 | 
			
		||||
    -->
 | 
			
		||||
    select 
 | 
			
		||||
    <include refid="Base_Column_List" />
 | 
			
		||||
    from user_info
 | 
			
		||||
    where id = #{id,jdbcType=INTEGER}
 | 
			
		||||
  </select>
 | 
			
		||||
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
 | 
			
		||||
    <!--
 | 
			
		||||
      WARNING - @mbg.generated
 | 
			
		||||
      This element is automatically generated by MyBatis Generator, do not modify.
 | 
			
		||||
      This element was generated on Tue Mar 01 14:58:29 CST 2022.
 | 
			
		||||
    -->
 | 
			
		||||
    delete from user_info
 | 
			
		||||
    where id = #{id,jdbcType=INTEGER}
 | 
			
		||||
  </delete>
 | 
			
		||||
  <insert id="insert" parameterType="com.cxyxiaomo.flashsale.dataobject.userDataObject">
 | 
			
		||||
    <!--
 | 
			
		||||
      WARNING - @mbg.generated
 | 
			
		||||
      This element is automatically generated by MyBatis Generator, do not modify.
 | 
			
		||||
      This element was generated on Tue Mar 01 14:58:29 CST 2022.
 | 
			
		||||
    -->
 | 
			
		||||
    insert into user_info (id, name, gender, 
 | 
			
		||||
      age, telephone, register_mode, 
 | 
			
		||||
      third_party_id)
 | 
			
		||||
    values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{gender,jdbcType=TINYINT}, 
 | 
			
		||||
      #{age,jdbcType=INTEGER}, #{telephone,jdbcType=VARCHAR}, #{registerMode,jdbcType=VARCHAR}, 
 | 
			
		||||
      #{thirdPartyId,jdbcType=VARCHAR})
 | 
			
		||||
  </insert>
 | 
			
		||||
  <insert id="insertSelective" parameterType="com.cxyxiaomo.flashsale.dataobject.userDataObject">
 | 
			
		||||
    <!--
 | 
			
		||||
      WARNING - @mbg.generated
 | 
			
		||||
      This element is automatically generated by MyBatis Generator, do not modify.
 | 
			
		||||
      This element was generated on Tue Mar 01 14:58:29 CST 2022.
 | 
			
		||||
    -->
 | 
			
		||||
    insert into user_info
 | 
			
		||||
    <trim prefix="(" suffix=")" suffixOverrides=",">
 | 
			
		||||
      <if test="id != null">
 | 
			
		||||
        id,
 | 
			
		||||
      </if>
 | 
			
		||||
      <if test="name != null">
 | 
			
		||||
        name,
 | 
			
		||||
      </if>
 | 
			
		||||
      <if test="gender != null">
 | 
			
		||||
        gender,
 | 
			
		||||
      </if>
 | 
			
		||||
      <if test="age != null">
 | 
			
		||||
        age,
 | 
			
		||||
      </if>
 | 
			
		||||
      <if test="telephone != null">
 | 
			
		||||
        telephone,
 | 
			
		||||
      </if>
 | 
			
		||||
      <if test="registerMode != null">
 | 
			
		||||
        register_mode,
 | 
			
		||||
      </if>
 | 
			
		||||
      <if test="thirdPartyId != null">
 | 
			
		||||
        third_party_id,
 | 
			
		||||
      </if>
 | 
			
		||||
    </trim>
 | 
			
		||||
    <trim prefix="values (" suffix=")" suffixOverrides=",">
 | 
			
		||||
      <if test="id != null">
 | 
			
		||||
        #{id,jdbcType=INTEGER},
 | 
			
		||||
      </if>
 | 
			
		||||
      <if test="name != null">
 | 
			
		||||
        #{name,jdbcType=VARCHAR},
 | 
			
		||||
      </if>
 | 
			
		||||
      <if test="gender != null">
 | 
			
		||||
        #{gender,jdbcType=TINYINT},
 | 
			
		||||
      </if>
 | 
			
		||||
      <if test="age != null">
 | 
			
		||||
        #{age,jdbcType=INTEGER},
 | 
			
		||||
      </if>
 | 
			
		||||
      <if test="telephone != null">
 | 
			
		||||
        #{telephone,jdbcType=VARCHAR},
 | 
			
		||||
      </if>
 | 
			
		||||
      <if test="registerMode != null">
 | 
			
		||||
        #{registerMode,jdbcType=VARCHAR},
 | 
			
		||||
      </if>
 | 
			
		||||
      <if test="thirdPartyId != null">
 | 
			
		||||
        #{thirdPartyId,jdbcType=VARCHAR},
 | 
			
		||||
      </if>
 | 
			
		||||
    </trim>
 | 
			
		||||
  </insert>
 | 
			
		||||
  <update id="updateByPrimaryKeySelective" parameterType="com.cxyxiaomo.flashsale.dataobject.userDataObject">
 | 
			
		||||
    <!--
 | 
			
		||||
      WARNING - @mbg.generated
 | 
			
		||||
      This element is automatically generated by MyBatis Generator, do not modify.
 | 
			
		||||
      This element was generated on Tue Mar 01 14:58:29 CST 2022.
 | 
			
		||||
    -->
 | 
			
		||||
    update user_info
 | 
			
		||||
    <set>
 | 
			
		||||
      <if test="name != null">
 | 
			
		||||
        name = #{name,jdbcType=VARCHAR},
 | 
			
		||||
      </if>
 | 
			
		||||
      <if test="gender != null">
 | 
			
		||||
        gender = #{gender,jdbcType=TINYINT},
 | 
			
		||||
      </if>
 | 
			
		||||
      <if test="age != null">
 | 
			
		||||
        age = #{age,jdbcType=INTEGER},
 | 
			
		||||
      </if>
 | 
			
		||||
      <if test="telephone != null">
 | 
			
		||||
        telephone = #{telephone,jdbcType=VARCHAR},
 | 
			
		||||
      </if>
 | 
			
		||||
      <if test="registerMode != null">
 | 
			
		||||
        register_mode = #{registerMode,jdbcType=VARCHAR},
 | 
			
		||||
      </if>
 | 
			
		||||
      <if test="thirdPartyId != null">
 | 
			
		||||
        third_party_id = #{thirdPartyId,jdbcType=VARCHAR},
 | 
			
		||||
      </if>
 | 
			
		||||
    </set>
 | 
			
		||||
    where id = #{id,jdbcType=INTEGER}
 | 
			
		||||
  </update>
 | 
			
		||||
  <update id="updateByPrimaryKey" parameterType="com.cxyxiaomo.flashsale.dataobject.userDataObject">
 | 
			
		||||
    <!--
 | 
			
		||||
      WARNING - @mbg.generated
 | 
			
		||||
      This element is automatically generated by MyBatis Generator, do not modify.
 | 
			
		||||
      This element was generated on Tue Mar 01 14:58:29 CST 2022.
 | 
			
		||||
    -->
 | 
			
		||||
    update user_info
 | 
			
		||||
    set name = #{name,jdbcType=VARCHAR},
 | 
			
		||||
      gender = #{gender,jdbcType=TINYINT},
 | 
			
		||||
      age = #{age,jdbcType=INTEGER},
 | 
			
		||||
      telephone = #{telephone,jdbcType=VARCHAR},
 | 
			
		||||
      register_mode = #{registerMode,jdbcType=VARCHAR},
 | 
			
		||||
      third_party_id = #{thirdPartyId,jdbcType=VARCHAR}
 | 
			
		||||
    where id = #{id,jdbcType=INTEGER}
 | 
			
		||||
  </update>
 | 
			
		||||
</mapper>
 | 
			
		||||
							
								
								
									
										111
									
								
								src/main/resources/mapping/userPasswordDataObjectMapper.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										111
									
								
								src/main/resources/mapping/userPasswordDataObjectMapper.xml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,111 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 | 
			
		||||
<mapper namespace="com.cxyxiaomo.flashsale.dao.userPasswordDataObjectMapper">
 | 
			
		||||
  <resultMap id="BaseResultMap" type="com.cxyxiaomo.flashsale.dataobject.userPasswordDataObject">
 | 
			
		||||
    <!--
 | 
			
		||||
      WARNING - @mbg.generated
 | 
			
		||||
      This element is automatically generated by MyBatis Generator, do not modify.
 | 
			
		||||
      This element was generated on Tue Mar 01 14:58:29 CST 2022.
 | 
			
		||||
    -->
 | 
			
		||||
    <id column="id" jdbcType="INTEGER" property="id" />
 | 
			
		||||
    <result column="encrpt_password" jdbcType="VARCHAR" property="encrptPassword" />
 | 
			
		||||
    <result column="user_id" jdbcType="INTEGER" property="userId" />
 | 
			
		||||
  </resultMap>
 | 
			
		||||
  <sql id="Base_Column_List">
 | 
			
		||||
    <!--
 | 
			
		||||
      WARNING - @mbg.generated
 | 
			
		||||
      This element is automatically generated by MyBatis Generator, do not modify.
 | 
			
		||||
      This element was generated on Tue Mar 01 14:58:29 CST 2022.
 | 
			
		||||
    -->
 | 
			
		||||
    id, encrpt_password, user_id
 | 
			
		||||
  </sql>
 | 
			
		||||
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
 | 
			
		||||
    <!--
 | 
			
		||||
      WARNING - @mbg.generated
 | 
			
		||||
      This element is automatically generated by MyBatis Generator, do not modify.
 | 
			
		||||
      This element was generated on Tue Mar 01 14:58:29 CST 2022.
 | 
			
		||||
    -->
 | 
			
		||||
    select 
 | 
			
		||||
    <include refid="Base_Column_List" />
 | 
			
		||||
    from user_password
 | 
			
		||||
    where id = #{id,jdbcType=INTEGER}
 | 
			
		||||
  </select>
 | 
			
		||||
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
 | 
			
		||||
    <!--
 | 
			
		||||
      WARNING - @mbg.generated
 | 
			
		||||
      This element is automatically generated by MyBatis Generator, do not modify.
 | 
			
		||||
      This element was generated on Tue Mar 01 14:58:29 CST 2022.
 | 
			
		||||
    -->
 | 
			
		||||
    delete from user_password
 | 
			
		||||
    where id = #{id,jdbcType=INTEGER}
 | 
			
		||||
  </delete>
 | 
			
		||||
  <insert id="insert" parameterType="com.cxyxiaomo.flashsale.dataobject.userPasswordDataObject">
 | 
			
		||||
    <!--
 | 
			
		||||
      WARNING - @mbg.generated
 | 
			
		||||
      This element is automatically generated by MyBatis Generator, do not modify.
 | 
			
		||||
      This element was generated on Tue Mar 01 14:58:29 CST 2022.
 | 
			
		||||
    -->
 | 
			
		||||
    insert into user_password (id, encrpt_password, user_id
 | 
			
		||||
      )
 | 
			
		||||
    values (#{id,jdbcType=INTEGER}, #{encrptPassword,jdbcType=VARCHAR}, #{userId,jdbcType=INTEGER}
 | 
			
		||||
      )
 | 
			
		||||
  </insert>
 | 
			
		||||
  <insert id="insertSelective" parameterType="com.cxyxiaomo.flashsale.dataobject.userPasswordDataObject">
 | 
			
		||||
    <!--
 | 
			
		||||
      WARNING - @mbg.generated
 | 
			
		||||
      This element is automatically generated by MyBatis Generator, do not modify.
 | 
			
		||||
      This element was generated on Tue Mar 01 14:58:29 CST 2022.
 | 
			
		||||
    -->
 | 
			
		||||
    insert into user_password
 | 
			
		||||
    <trim prefix="(" suffix=")" suffixOverrides=",">
 | 
			
		||||
      <if test="id != null">
 | 
			
		||||
        id,
 | 
			
		||||
      </if>
 | 
			
		||||
      <if test="encrptPassword != null">
 | 
			
		||||
        encrpt_password,
 | 
			
		||||
      </if>
 | 
			
		||||
      <if test="userId != null">
 | 
			
		||||
        user_id,
 | 
			
		||||
      </if>
 | 
			
		||||
    </trim>
 | 
			
		||||
    <trim prefix="values (" suffix=")" suffixOverrides=",">
 | 
			
		||||
      <if test="id != null">
 | 
			
		||||
        #{id,jdbcType=INTEGER},
 | 
			
		||||
      </if>
 | 
			
		||||
      <if test="encrptPassword != null">
 | 
			
		||||
        #{encrptPassword,jdbcType=VARCHAR},
 | 
			
		||||
      </if>
 | 
			
		||||
      <if test="userId != null">
 | 
			
		||||
        #{userId,jdbcType=INTEGER},
 | 
			
		||||
      </if>
 | 
			
		||||
    </trim>
 | 
			
		||||
  </insert>
 | 
			
		||||
  <update id="updateByPrimaryKeySelective" parameterType="com.cxyxiaomo.flashsale.dataobject.userPasswordDataObject">
 | 
			
		||||
    <!--
 | 
			
		||||
      WARNING - @mbg.generated
 | 
			
		||||
      This element is automatically generated by MyBatis Generator, do not modify.
 | 
			
		||||
      This element was generated on Tue Mar 01 14:58:29 CST 2022.
 | 
			
		||||
    -->
 | 
			
		||||
    update user_password
 | 
			
		||||
    <set>
 | 
			
		||||
      <if test="encrptPassword != null">
 | 
			
		||||
        encrpt_password = #{encrptPassword,jdbcType=VARCHAR},
 | 
			
		||||
      </if>
 | 
			
		||||
      <if test="userId != null">
 | 
			
		||||
        user_id = #{userId,jdbcType=INTEGER},
 | 
			
		||||
      </if>
 | 
			
		||||
    </set>
 | 
			
		||||
    where id = #{id,jdbcType=INTEGER}
 | 
			
		||||
  </update>
 | 
			
		||||
  <update id="updateByPrimaryKey" parameterType="com.cxyxiaomo.flashsale.dataobject.userPasswordDataObject">
 | 
			
		||||
    <!--
 | 
			
		||||
      WARNING - @mbg.generated
 | 
			
		||||
      This element is automatically generated by MyBatis Generator, do not modify.
 | 
			
		||||
      This element was generated on Tue Mar 01 14:58:29 CST 2022.
 | 
			
		||||
    -->
 | 
			
		||||
    update user_password
 | 
			
		||||
    set encrpt_password = #{encrptPassword,jdbcType=VARCHAR},
 | 
			
		||||
      user_id = #{userId,jdbcType=INTEGER}
 | 
			
		||||
    where id = #{id,jdbcType=INTEGER}
 | 
			
		||||
  </update>
 | 
			
		||||
</mapper>
 | 
			
		||||
							
								
								
									
										52
									
								
								src/main/resources/mybatis-generator.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										52
									
								
								src/main/resources/mybatis-generator.xml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,52 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<!DOCTYPE generatorConfiguration
 | 
			
		||||
        PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
 | 
			
		||||
        "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
 | 
			
		||||
<generatorConfiguration>
 | 
			
		||||
 | 
			
		||||
    <context id="DB2Tables" targetRuntime="MyBatis3">
 | 
			
		||||
        <!-- 数据库链接地址账号密码 -->
 | 
			
		||||
        <jdbcConnection driverClass="com.mysql.jdbc.Driver"
 | 
			
		||||
                        connectionURL="jdbc:mysql://127.0.0.1:3306/flashsale?serverTimezone=Asia/Shanghai"
 | 
			
		||||
                        userId="root"
 | 
			
		||||
                        password="111111">
 | 
			
		||||
        </jdbcConnection>
 | 
			
		||||
 | 
			
		||||
        <!-- 生成 DataObject 类存放位置 -->
 | 
			
		||||
        <javaModelGenerator targetPackage="com.cxyxiaomo.flashsale.dataobject" targetProject="src/main/java">
 | 
			
		||||
            <property name="enableSubPackages" value="true" />
 | 
			
		||||
            <property name="trimStrings" value="true" />
 | 
			
		||||
        </javaModelGenerator>
 | 
			
		||||
 | 
			
		||||
        <!-- 生成映射文件存放位置 -->
 | 
			
		||||
        <sqlMapGenerator targetPackage="mapping"  targetProject="src/main/resources">
 | 
			
		||||
            <property name="enableSubPackages" value="true" />
 | 
			
		||||
        </sqlMapGenerator>
 | 
			
		||||
 | 
			
		||||
        <!-- 生成Dao类存放位置 -->
 | 
			
		||||
        <!-- 客户端代码,生成易于使用的针对Mode L对象和XML配置文件的代码
 | 
			
		||||
                type="ANNOTATEDMAPPER",生成Java Model和基于注解的Mapper对象
 | 
			
		||||
                type="MIXEDMAPPER",生成基于注解的Java Model和相应的Mapper对象
 | 
			
		||||
                type="XM1LMAPPER",生成SQLMap XML文件和独立的Mapper接口
 | 
			
		||||
        -->
 | 
			
		||||
        <javaClientGenerator type="XMLMAPPER" targetPackage="com.cxyxiaomo.flashsale.dao" targetProject="src/main/java">
 | 
			
		||||
            <property name="enableSubPackages" value="true" />
 | 
			
		||||
        </javaClientGenerator>
 | 
			
		||||
 | 
			
		||||
        <!-- 生成对应表及其类名 -->
 | 
			
		||||
        <table tableName="user_info" domainObjectName="userDataObject" enableCountByExample="false"
 | 
			
		||||
               enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false"
 | 
			
		||||
               selectByExampleQueryId="false">
 | 
			
		||||
            <!--            去除复杂操作语句-->
 | 
			
		||||
            <!--            enableCountByExample="false"-->
 | 
			
		||||
            <!--            enableUpdateByExample="false" -->
 | 
			
		||||
            <!--            enableDeleteByExample="false" -->
 | 
			
		||||
            <!--            enableSelectByExample="false"-->
 | 
			
		||||
            <!--            selectByExampleQueryId="false"-->
 | 
			
		||||
        </table>
 | 
			
		||||
        <table tableName="user_password" domainObjectName="userPasswordDataObject" enableCountByExample="false"
 | 
			
		||||
               enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false"
 | 
			
		||||
               selectByExampleQueryId="false"></table>
 | 
			
		||||
 | 
			
		||||
    </context>
 | 
			
		||||
</generatorConfiguration>
 | 
			
		||||
							
								
								
									
										20
									
								
								src/test/java/com/cxyxiaomo/flashsale/AppTest.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								src/test/java/com/cxyxiaomo/flashsale/AppTest.java
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,20 @@
 | 
			
		||||
package com.cxyxiaomo.flashsale;
 | 
			
		||||
 | 
			
		||||
import static org.junit.Assert.assertTrue;
 | 
			
		||||
 | 
			
		||||
import org.junit.Test;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Unit test for simple App.
 | 
			
		||||
 */
 | 
			
		||||
public class AppTest 
 | 
			
		||||
{
 | 
			
		||||
    /**
 | 
			
		||||
     * Rigorous Test :-)
 | 
			
		||||
     */
 | 
			
		||||
    @Test
 | 
			
		||||
    public void shouldAnswerWithTrue()
 | 
			
		||||
    {
 | 
			
		||||
        assertTrue( true );
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user