新增mybatis逆向工程
parent
47bdb8ccf8
commit
9919817637
@ -0,0 +1,39 @@
|
||||
package com.ruoyi;
|
||||
|
||||
import org.mybatis.generator.api.MyBatisGenerator;
|
||||
import org.mybatis.generator.config.Configuration;
|
||||
import org.mybatis.generator.config.xml.ConfigurationParser;
|
||||
import org.mybatis.generator.internal.DefaultShellCallback;
|
||||
|
||||
import java.io.File;
|
||||
import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public class GeneratorUtil {
|
||||
public static void generate() {
|
||||
try {
|
||||
List<String> warnings = new ArrayList<>();
|
||||
boolean overwrite = true;
|
||||
|
||||
// 获取 generatorConfig.xml 文件路径
|
||||
URL resourceUrl = GeneratorUtil.class.getResource("/generatorConfig.xml");
|
||||
String configFilePath = resourceUrl.getFile();
|
||||
|
||||
File configFileObj = new File(configFilePath);
|
||||
ConfigurationParser cp = new ConfigurationParser(warnings);
|
||||
Configuration config = cp.parseConfiguration(configFileObj);
|
||||
|
||||
DefaultShellCallback callback = new DefaultShellCallback(overwrite);
|
||||
MyBatisGenerator myBatisGenerator = new MyBatisGenerator(config, callback, warnings);
|
||||
myBatisGenerator.generate(null);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
generate();
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,96 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import com.ruoyi.system.domain.SysTrainingScore;
|
||||
import com.ruoyi.system.domain.SysTrainingScoreExample;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface SysTrainingScoreMapper {
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table sys_training_score
|
||||
*
|
||||
* @mbg.generated Thu Aug 10 10:19:07 CST 2023
|
||||
*/
|
||||
long countByExample(SysTrainingScoreExample example);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table sys_training_score
|
||||
*
|
||||
* @mbg.generated Thu Aug 10 10:19:07 CST 2023
|
||||
*/
|
||||
int deleteByExample(SysTrainingScoreExample example);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table sys_training_score
|
||||
*
|
||||
* @mbg.generated Thu Aug 10 10:19:07 CST 2023
|
||||
*/
|
||||
int deleteByPrimaryKey(String id);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table sys_training_score
|
||||
*
|
||||
* @mbg.generated Thu Aug 10 10:19:07 CST 2023
|
||||
*/
|
||||
int insert(SysTrainingScore record);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table sys_training_score
|
||||
*
|
||||
* @mbg.generated Thu Aug 10 10:19:07 CST 2023
|
||||
*/
|
||||
int insertSelective(SysTrainingScore record);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table sys_training_score
|
||||
*
|
||||
* @mbg.generated Thu Aug 10 10:19:07 CST 2023
|
||||
*/
|
||||
List<SysTrainingScore> selectByExample(SysTrainingScoreExample example);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table sys_training_score
|
||||
*
|
||||
* @mbg.generated Thu Aug 10 10:19:07 CST 2023
|
||||
*/
|
||||
SysTrainingScore selectByPrimaryKey(String id);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table sys_training_score
|
||||
*
|
||||
* @mbg.generated Thu Aug 10 10:19:07 CST 2023
|
||||
*/
|
||||
int updateByExampleSelective(@Param("record") SysTrainingScore record, @Param("example") SysTrainingScoreExample example);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table sys_training_score
|
||||
*
|
||||
* @mbg.generated Thu Aug 10 10:19:07 CST 2023
|
||||
*/
|
||||
int updateByExample(@Param("record") SysTrainingScore record, @Param("example") SysTrainingScoreExample example);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table sys_training_score
|
||||
*
|
||||
* @mbg.generated Thu Aug 10 10:19:07 CST 2023
|
||||
*/
|
||||
int updateByPrimaryKeySelective(SysTrainingScore record);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table sys_training_score
|
||||
*
|
||||
* @mbg.generated Thu Aug 10 10:19:07 CST 2023
|
||||
*/
|
||||
int updateByPrimaryKey(SysTrainingScore record);
|
||||
}
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue