rename CommonsDialectImpl.java package

This commit is contained in:
开源海哥 2023-04-24 09:46:38 +08:00
parent ee1cc8dd4c
commit 8481f444fe
5 changed files with 12 additions and 6 deletions

View File

@ -32,6 +32,8 @@ public class GeneratorTest {
dataSource.setUsername("root");
dataSource.setPassword("123456");
// JdbcTypeMapping.registerMapping(BigInteger.class, Long.class);
// JdbcTypeMapping.registerMapping(Integer.class, Long.class);
GlobalConfig globalConfig = new GlobalConfig();
globalConfig.setSourceDir(System.getProperty("user.dir") + "/src/test/java");
@ -41,7 +43,7 @@ public class GeneratorTest {
globalConfig.setEntitySupperClass(BaseEntity.class);
//设置只生成哪些表
globalConfig.addGenerateTable("tb_account", "account_session");
globalConfig.addGenerateTable("account", "account_session");
//设置 entity 的包名
globalConfig.setEntityPackage("com.test.entity");

View File

@ -17,6 +17,7 @@ package com.mybatisflex.core.dialect;
import com.mybatisflex.core.FlexGlobalConfig;
import com.mybatisflex.core.dialect.impl.CommonsDialectImpl;
import com.mybatisflex.core.util.ObjectUtil;
import org.apache.ibatis.util.MapUtil;

View File

@ -13,9 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.mybatisflex.core.dialect;
package com.mybatisflex.core.dialect.impl;
import com.mybatisflex.core.FlexGlobalConfig;
import com.mybatisflex.core.dialect.IDialect;
import com.mybatisflex.core.dialect.KeywordWrap;
import com.mybatisflex.core.dialect.LimitOffsetProcesser;
import com.mybatisflex.core.exception.FlexExceptions;
import com.mybatisflex.core.query.*;
import com.mybatisflex.core.row.Row;
@ -88,8 +91,8 @@ public class CommonsDialectImpl implements IDialect {
Row firstRow = rows.get(0);
Set<String> attrs = firstRow.obtainModifyAttrs();
int index = 0;
for (String attr : attrs) {
fields.append(wrap(attr));
for (String column : attrs) {
fields.append(wrap(column));
if (index != attrs.size() - 1) {
fields.append(", ");
}

View File

@ -1,6 +1,6 @@
package com.mybatisflex.coretest;
import com.mybatisflex.core.dialect.CommonsDialectImpl;
import com.mybatisflex.core.dialect.impl.CommonsDialectImpl;
import com.mybatisflex.core.dialect.IDialect;
import com.mybatisflex.core.dialect.KeywordWrap;
import com.mybatisflex.core.dialect.LimitOffsetProcesser;

View File

@ -1,6 +1,6 @@
package com.mybatisflex.coretest;
import com.mybatisflex.core.dialect.CommonsDialectImpl;
import com.mybatisflex.core.dialect.impl.CommonsDialectImpl;
import com.mybatisflex.core.dialect.IDialect;
import com.mybatisflex.core.query.QueryWrapper;
import com.mybatisflex.core.table.TableInfo;