All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.mybatis.pj.provider.MyUpdateProvider Maven / Gradle / Ivy

There is a newer version: 2.2.1
Show newest version
package com.mybatis.pj.provider;

import org.apache.ibatis.mapping.MappedStatement;

import com.mybatis.pj.util.MyExampleSqlHelp;

import tk.mybatis.mapper.mapperhelper.MapperHelper;
import tk.mybatis.mapper.mapperhelper.MapperTemplate;

public class MyUpdateProvider extends MapperTemplate{

	public MyUpdateProvider(Class mapperClass, MapperHelper mapperHelper) {
		super(mapperClass, mapperHelper);
	}
	
	public String updateObject(MappedStatement ms) {
		StringBuilder sql = new StringBuilder("UPDATE ");
        sql.append(MyExampleSqlHelp.getUpdateColumn());
        sql.append(MyExampleSqlHelp.useWhereAndEqualsWhere());
        sql.append(MyExampleSqlHelp.useGreaterThan());
        sql.append(MyExampleSqlHelp.useLessThan());
        sql.append(MyExampleSqlHelp.useNotEquals());
        sql.append(MyExampleSqlHelp.notUseWhere());
        sql.append(MyExampleSqlHelp.useIn());
        sql.append(MyExampleSqlHelp.useLike());
        System.out.println("方法执行结束后的sql:"+sql.toString());
        return sql.toString();
	}
	
	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy