Compare commits

..

2 Commits

  1. 199
      service/src/main/java/com/hfkj/dao/GoodsUserAddressMapper.java
  2. 7
      service/src/main/java/com/hfkj/dao/GoodsUserAddressMapperExt.java
  3. 486
      service/src/main/java/com/hfkj/dao/GoodsUserAddressSqlProvider.java
  4. 212
      service/src/main/java/com/hfkj/entity/GoodsUserAddress.java
  5. 1213
      service/src/main/java/com/hfkj/entity/GoodsUserAddressExample.java
  6. 63
      service/src/main/java/com/hfkj/entity/GoodsUserAddressWithBLOBs.java

@ -0,0 +1,199 @@
package com.hfkj.dao;
import com.hfkj.entity.GoodsUserAddress;
import com.hfkj.entity.GoodsUserAddressExample;
import com.hfkj.entity.GoodsUserAddressWithBLOBs;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;
import org.springframework.stereotype.Repository;
/**
*
* 代码由工具生成,请勿修改!!!
* 如果需要扩展请在其父类进行扩展
*
**/
@Repository
public interface GoodsUserAddressMapper extends GoodsUserAddressMapperExt {
@SelectProvider(type=GoodsUserAddressSqlProvider.class, method="countByExample")
long countByExample(GoodsUserAddressExample example);
@DeleteProvider(type=GoodsUserAddressSqlProvider.class, method="deleteByExample")
int deleteByExample(GoodsUserAddressExample example);
@Delete({
"delete from goods_user_address",
"where id = #{id,jdbcType=BIGINT}"
})
int deleteByPrimaryKey(Long id);
@Insert({
"insert into goods_user_address (user_id, consignee, ",
"phone, address, ",
"region_id, region_name, ",
"whether_default, create_time, ",
"update_time, op_id, ",
"op_name, ext_1, ext_2, ",
"ext_3, province_id, ",
"city_id, county_id, ",
"town_id)",
"values (#{userId,jdbcType=BIGINT}, #{consignee,jdbcType=VARCHAR}, ",
"#{phone,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, ",
"#{regionId,jdbcType=VARCHAR}, #{regionName,jdbcType=VARCHAR}, ",
"#{whetherDefault,jdbcType=BIT}, #{createTime,jdbcType=TIMESTAMP}, ",
"#{updateTime,jdbcType=TIMESTAMP}, #{opId,jdbcType=BIGINT}, ",
"#{opName,jdbcType=VARCHAR}, #{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, ",
"#{ext3,jdbcType=VARCHAR}, #{provinceId,jdbcType=LONGVARCHAR}, ",
"#{cityId,jdbcType=LONGVARCHAR}, #{countyId,jdbcType=LONGVARCHAR}, ",
"#{townId,jdbcType=LONGVARCHAR})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(GoodsUserAddressWithBLOBs record);
@InsertProvider(type=GoodsUserAddressSqlProvider.class, method="insertSelective")
@Options(useGeneratedKeys=true,keyProperty="id")
int insertSelective(GoodsUserAddressWithBLOBs record);
@SelectProvider(type=GoodsUserAddressSqlProvider.class, method="selectByExampleWithBLOBs")
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT),
@Result(column="consignee", property="consignee", jdbcType=JdbcType.VARCHAR),
@Result(column="phone", property="phone", jdbcType=JdbcType.VARCHAR),
@Result(column="address", property="address", jdbcType=JdbcType.VARCHAR),
@Result(column="region_id", property="regionId", jdbcType=JdbcType.VARCHAR),
@Result(column="region_name", property="regionName", jdbcType=JdbcType.VARCHAR),
@Result(column="whether_default", property="whetherDefault", jdbcType=JdbcType.BIT),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="op_id", property="opId", jdbcType=JdbcType.BIGINT),
@Result(column="op_name", property="opName", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR),
@Result(column="province_id", property="provinceId", jdbcType=JdbcType.LONGVARCHAR),
@Result(column="city_id", property="cityId", jdbcType=JdbcType.LONGVARCHAR),
@Result(column="county_id", property="countyId", jdbcType=JdbcType.LONGVARCHAR),
@Result(column="town_id", property="townId", jdbcType=JdbcType.LONGVARCHAR)
})
List<GoodsUserAddressWithBLOBs> selectByExampleWithBLOBs(GoodsUserAddressExample example);
@SelectProvider(type=GoodsUserAddressSqlProvider.class, method="selectByExample")
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT),
@Result(column="consignee", property="consignee", jdbcType=JdbcType.VARCHAR),
@Result(column="phone", property="phone", jdbcType=JdbcType.VARCHAR),
@Result(column="address", property="address", jdbcType=JdbcType.VARCHAR),
@Result(column="region_id", property="regionId", jdbcType=JdbcType.VARCHAR),
@Result(column="region_name", property="regionName", jdbcType=JdbcType.VARCHAR),
@Result(column="whether_default", property="whetherDefault", jdbcType=JdbcType.BIT),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="op_id", property="opId", jdbcType=JdbcType.BIGINT),
@Result(column="op_name", property="opName", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR)
})
List<GoodsUserAddress> selectByExample(GoodsUserAddressExample example);
@Select({
"select",
"id, user_id, consignee, phone, address, region_id, region_name, whether_default, ",
"create_time, update_time, op_id, op_name, ext_1, ext_2, ext_3, province_id, ",
"city_id, county_id, town_id",
"from goods_user_address",
"where id = #{id,jdbcType=BIGINT}"
})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT),
@Result(column="consignee", property="consignee", jdbcType=JdbcType.VARCHAR),
@Result(column="phone", property="phone", jdbcType=JdbcType.VARCHAR),
@Result(column="address", property="address", jdbcType=JdbcType.VARCHAR),
@Result(column="region_id", property="regionId", jdbcType=JdbcType.VARCHAR),
@Result(column="region_name", property="regionName", jdbcType=JdbcType.VARCHAR),
@Result(column="whether_default", property="whetherDefault", jdbcType=JdbcType.BIT),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="op_id", property="opId", jdbcType=JdbcType.BIGINT),
@Result(column="op_name", property="opName", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR),
@Result(column="province_id", property="provinceId", jdbcType=JdbcType.LONGVARCHAR),
@Result(column="city_id", property="cityId", jdbcType=JdbcType.LONGVARCHAR),
@Result(column="county_id", property="countyId", jdbcType=JdbcType.LONGVARCHAR),
@Result(column="town_id", property="townId", jdbcType=JdbcType.LONGVARCHAR)
})
GoodsUserAddressWithBLOBs selectByPrimaryKey(Long id);
@UpdateProvider(type=GoodsUserAddressSqlProvider.class, method="updateByExampleSelective")
int updateByExampleSelective(@Param("record") GoodsUserAddressWithBLOBs record, @Param("example") GoodsUserAddressExample example);
@UpdateProvider(type=GoodsUserAddressSqlProvider.class, method="updateByExampleWithBLOBs")
int updateByExampleWithBLOBs(@Param("record") GoodsUserAddressWithBLOBs record, @Param("example") GoodsUserAddressExample example);
@UpdateProvider(type=GoodsUserAddressSqlProvider.class, method="updateByExample")
int updateByExample(@Param("record") GoodsUserAddress record, @Param("example") GoodsUserAddressExample example);
@UpdateProvider(type=GoodsUserAddressSqlProvider.class, method="updateByPrimaryKeySelective")
int updateByPrimaryKeySelective(GoodsUserAddressWithBLOBs record);
@Update({
"update goods_user_address",
"set user_id = #{userId,jdbcType=BIGINT},",
"consignee = #{consignee,jdbcType=VARCHAR},",
"phone = #{phone,jdbcType=VARCHAR},",
"address = #{address,jdbcType=VARCHAR},",
"region_id = #{regionId,jdbcType=VARCHAR},",
"region_name = #{regionName,jdbcType=VARCHAR},",
"whether_default = #{whetherDefault,jdbcType=BIT},",
"create_time = #{createTime,jdbcType=TIMESTAMP},",
"update_time = #{updateTime,jdbcType=TIMESTAMP},",
"op_id = #{opId,jdbcType=BIGINT},",
"op_name = #{opName,jdbcType=VARCHAR},",
"ext_1 = #{ext1,jdbcType=VARCHAR},",
"ext_2 = #{ext2,jdbcType=VARCHAR},",
"ext_3 = #{ext3,jdbcType=VARCHAR},",
"province_id = #{provinceId,jdbcType=LONGVARCHAR},",
"city_id = #{cityId,jdbcType=LONGVARCHAR},",
"county_id = #{countyId,jdbcType=LONGVARCHAR},",
"town_id = #{townId,jdbcType=LONGVARCHAR}",
"where id = #{id,jdbcType=BIGINT}"
})
int updateByPrimaryKeyWithBLOBs(GoodsUserAddressWithBLOBs record);
@Update({
"update goods_user_address",
"set user_id = #{userId,jdbcType=BIGINT},",
"consignee = #{consignee,jdbcType=VARCHAR},",
"phone = #{phone,jdbcType=VARCHAR},",
"address = #{address,jdbcType=VARCHAR},",
"region_id = #{regionId,jdbcType=VARCHAR},",
"region_name = #{regionName,jdbcType=VARCHAR},",
"whether_default = #{whetherDefault,jdbcType=BIT},",
"create_time = #{createTime,jdbcType=TIMESTAMP},",
"update_time = #{updateTime,jdbcType=TIMESTAMP},",
"op_id = #{opId,jdbcType=BIGINT},",
"op_name = #{opName,jdbcType=VARCHAR},",
"ext_1 = #{ext1,jdbcType=VARCHAR},",
"ext_2 = #{ext2,jdbcType=VARCHAR},",
"ext_3 = #{ext3,jdbcType=VARCHAR}",
"where id = #{id,jdbcType=BIGINT}"
})
int updateByPrimaryKey(GoodsUserAddress record);
}

@ -0,0 +1,7 @@
package com.hfkj.dao;
/**
* mapper扩展类
*/
public interface GoodsUserAddressMapperExt {
}

@ -0,0 +1,486 @@
package com.hfkj.dao;
import com.hfkj.entity.GoodsUserAddressExample.Criteria;
import com.hfkj.entity.GoodsUserAddressExample.Criterion;
import com.hfkj.entity.GoodsUserAddressExample;
import com.hfkj.entity.GoodsUserAddressWithBLOBs;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.jdbc.SQL;
public class GoodsUserAddressSqlProvider {
public String countByExample(GoodsUserAddressExample example) {
SQL sql = new SQL();
sql.SELECT("count(*)").FROM("goods_user_address");
applyWhere(sql, example, false);
return sql.toString();
}
public String deleteByExample(GoodsUserAddressExample example) {
SQL sql = new SQL();
sql.DELETE_FROM("goods_user_address");
applyWhere(sql, example, false);
return sql.toString();
}
public String insertSelective(GoodsUserAddressWithBLOBs record) {
SQL sql = new SQL();
sql.INSERT_INTO("goods_user_address");
if (record.getUserId() != null) {
sql.VALUES("user_id", "#{userId,jdbcType=BIGINT}");
}
if (record.getConsignee() != null) {
sql.VALUES("consignee", "#{consignee,jdbcType=VARCHAR}");
}
if (record.getPhone() != null) {
sql.VALUES("phone", "#{phone,jdbcType=VARCHAR}");
}
if (record.getAddress() != null) {
sql.VALUES("address", "#{address,jdbcType=VARCHAR}");
}
if (record.getRegionId() != null) {
sql.VALUES("region_id", "#{regionId,jdbcType=VARCHAR}");
}
if (record.getRegionName() != null) {
sql.VALUES("region_name", "#{regionName,jdbcType=VARCHAR}");
}
if (record.getWhetherDefault() != null) {
sql.VALUES("whether_default", "#{whetherDefault,jdbcType=BIT}");
}
if (record.getCreateTime() != null) {
sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}");
}
if (record.getUpdateTime() != null) {
sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}");
}
if (record.getOpId() != null) {
sql.VALUES("op_id", "#{opId,jdbcType=BIGINT}");
}
if (record.getOpName() != null) {
sql.VALUES("op_name", "#{opName,jdbcType=VARCHAR}");
}
if (record.getExt1() != null) {
sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}");
}
if (record.getExt2() != null) {
sql.VALUES("ext_2", "#{ext2,jdbcType=VARCHAR}");
}
if (record.getExt3() != null) {
sql.VALUES("ext_3", "#{ext3,jdbcType=VARCHAR}");
}
if (record.getProvinceId() != null) {
sql.VALUES("province_id", "#{provinceId,jdbcType=LONGVARCHAR}");
}
if (record.getCityId() != null) {
sql.VALUES("city_id", "#{cityId,jdbcType=LONGVARCHAR}");
}
if (record.getCountyId() != null) {
sql.VALUES("county_id", "#{countyId,jdbcType=LONGVARCHAR}");
}
if (record.getTownId() != null) {
sql.VALUES("town_id", "#{townId,jdbcType=LONGVARCHAR}");
}
return sql.toString();
}
public String selectByExampleWithBLOBs(GoodsUserAddressExample example) {
SQL sql = new SQL();
if (example != null && example.isDistinct()) {
sql.SELECT_DISTINCT("id");
} else {
sql.SELECT("id");
}
sql.SELECT("user_id");
sql.SELECT("consignee");
sql.SELECT("phone");
sql.SELECT("address");
sql.SELECT("region_id");
sql.SELECT("region_name");
sql.SELECT("whether_default");
sql.SELECT("create_time");
sql.SELECT("update_time");
sql.SELECT("op_id");
sql.SELECT("op_name");
sql.SELECT("ext_1");
sql.SELECT("ext_2");
sql.SELECT("ext_3");
sql.SELECT("province_id");
sql.SELECT("city_id");
sql.SELECT("county_id");
sql.SELECT("town_id");
sql.FROM("goods_user_address");
applyWhere(sql, example, false);
if (example != null && example.getOrderByClause() != null) {
sql.ORDER_BY(example.getOrderByClause());
}
return sql.toString();
}
public String selectByExample(GoodsUserAddressExample example) {
SQL sql = new SQL();
if (example != null && example.isDistinct()) {
sql.SELECT_DISTINCT("id");
} else {
sql.SELECT("id");
}
sql.SELECT("user_id");
sql.SELECT("consignee");
sql.SELECT("phone");
sql.SELECT("address");
sql.SELECT("region_id");
sql.SELECT("region_name");
sql.SELECT("whether_default");
sql.SELECT("create_time");
sql.SELECT("update_time");
sql.SELECT("op_id");
sql.SELECT("op_name");
sql.SELECT("ext_1");
sql.SELECT("ext_2");
sql.SELECT("ext_3");
sql.FROM("goods_user_address");
applyWhere(sql, example, false);
if (example != null && example.getOrderByClause() != null) {
sql.ORDER_BY(example.getOrderByClause());
}
return sql.toString();
}
public String updateByExampleSelective(Map<String, Object> parameter) {
GoodsUserAddressWithBLOBs record = (GoodsUserAddressWithBLOBs) parameter.get("record");
GoodsUserAddressExample example = (GoodsUserAddressExample) parameter.get("example");
SQL sql = new SQL();
sql.UPDATE("goods_user_address");
if (record.getId() != null) {
sql.SET("id = #{record.id,jdbcType=BIGINT}");
}
if (record.getUserId() != null) {
sql.SET("user_id = #{record.userId,jdbcType=BIGINT}");
}
if (record.getConsignee() != null) {
sql.SET("consignee = #{record.consignee,jdbcType=VARCHAR}");
}
if (record.getPhone() != null) {
sql.SET("phone = #{record.phone,jdbcType=VARCHAR}");
}
if (record.getAddress() != null) {
sql.SET("address = #{record.address,jdbcType=VARCHAR}");
}
if (record.getRegionId() != null) {
sql.SET("region_id = #{record.regionId,jdbcType=VARCHAR}");
}
if (record.getRegionName() != null) {
sql.SET("region_name = #{record.regionName,jdbcType=VARCHAR}");
}
if (record.getWhetherDefault() != null) {
sql.SET("whether_default = #{record.whetherDefault,jdbcType=BIT}");
}
if (record.getCreateTime() != null) {
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
}
if (record.getUpdateTime() != null) {
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}");
}
if (record.getOpId() != null) {
sql.SET("op_id = #{record.opId,jdbcType=BIGINT}");
}
if (record.getOpName() != null) {
sql.SET("op_name = #{record.opName,jdbcType=VARCHAR}");
}
if (record.getExt1() != null) {
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}");
}
if (record.getExt2() != null) {
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}");
}
if (record.getExt3() != null) {
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}");
}
if (record.getProvinceId() != null) {
sql.SET("province_id = #{record.provinceId,jdbcType=LONGVARCHAR}");
}
if (record.getCityId() != null) {
sql.SET("city_id = #{record.cityId,jdbcType=LONGVARCHAR}");
}
if (record.getCountyId() != null) {
sql.SET("county_id = #{record.countyId,jdbcType=LONGVARCHAR}");
}
if (record.getTownId() != null) {
sql.SET("town_id = #{record.townId,jdbcType=LONGVARCHAR}");
}
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByExampleWithBLOBs(Map<String, Object> parameter) {
SQL sql = new SQL();
sql.UPDATE("goods_user_address");
sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("user_id = #{record.userId,jdbcType=BIGINT}");
sql.SET("consignee = #{record.consignee,jdbcType=VARCHAR}");
sql.SET("phone = #{record.phone,jdbcType=VARCHAR}");
sql.SET("address = #{record.address,jdbcType=VARCHAR}");
sql.SET("region_id = #{record.regionId,jdbcType=VARCHAR}");
sql.SET("region_name = #{record.regionName,jdbcType=VARCHAR}");
sql.SET("whether_default = #{record.whetherDefault,jdbcType=BIT}");
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}");
sql.SET("op_id = #{record.opId,jdbcType=BIGINT}");
sql.SET("op_name = #{record.opName,jdbcType=VARCHAR}");
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}");
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}");
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}");
sql.SET("province_id = #{record.provinceId,jdbcType=LONGVARCHAR}");
sql.SET("city_id = #{record.cityId,jdbcType=LONGVARCHAR}");
sql.SET("county_id = #{record.countyId,jdbcType=LONGVARCHAR}");
sql.SET("town_id = #{record.townId,jdbcType=LONGVARCHAR}");
GoodsUserAddressExample example = (GoodsUserAddressExample) parameter.get("example");
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByExample(Map<String, Object> parameter) {
SQL sql = new SQL();
sql.UPDATE("goods_user_address");
sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("user_id = #{record.userId,jdbcType=BIGINT}");
sql.SET("consignee = #{record.consignee,jdbcType=VARCHAR}");
sql.SET("phone = #{record.phone,jdbcType=VARCHAR}");
sql.SET("address = #{record.address,jdbcType=VARCHAR}");
sql.SET("region_id = #{record.regionId,jdbcType=VARCHAR}");
sql.SET("region_name = #{record.regionName,jdbcType=VARCHAR}");
sql.SET("whether_default = #{record.whetherDefault,jdbcType=BIT}");
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}");
sql.SET("op_id = #{record.opId,jdbcType=BIGINT}");
sql.SET("op_name = #{record.opName,jdbcType=VARCHAR}");
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}");
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}");
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}");
GoodsUserAddressExample example = (GoodsUserAddressExample) parameter.get("example");
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByPrimaryKeySelective(GoodsUserAddressWithBLOBs record) {
SQL sql = new SQL();
sql.UPDATE("goods_user_address");
if (record.getUserId() != null) {
sql.SET("user_id = #{userId,jdbcType=BIGINT}");
}
if (record.getConsignee() != null) {
sql.SET("consignee = #{consignee,jdbcType=VARCHAR}");
}
if (record.getPhone() != null) {
sql.SET("phone = #{phone,jdbcType=VARCHAR}");
}
if (record.getAddress() != null) {
sql.SET("address = #{address,jdbcType=VARCHAR}");
}
if (record.getRegionId() != null) {
sql.SET("region_id = #{regionId,jdbcType=VARCHAR}");
}
if (record.getRegionName() != null) {
sql.SET("region_name = #{regionName,jdbcType=VARCHAR}");
}
if (record.getWhetherDefault() != null) {
sql.SET("whether_default = #{whetherDefault,jdbcType=BIT}");
}
if (record.getCreateTime() != null) {
sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}");
}
if (record.getUpdateTime() != null) {
sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}");
}
if (record.getOpId() != null) {
sql.SET("op_id = #{opId,jdbcType=BIGINT}");
}
if (record.getOpName() != null) {
sql.SET("op_name = #{opName,jdbcType=VARCHAR}");
}
if (record.getExt1() != null) {
sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}");
}
if (record.getExt2() != null) {
sql.SET("ext_2 = #{ext2,jdbcType=VARCHAR}");
}
if (record.getExt3() != null) {
sql.SET("ext_3 = #{ext3,jdbcType=VARCHAR}");
}
if (record.getProvinceId() != null) {
sql.SET("province_id = #{provinceId,jdbcType=LONGVARCHAR}");
}
if (record.getCityId() != null) {
sql.SET("city_id = #{cityId,jdbcType=LONGVARCHAR}");
}
if (record.getCountyId() != null) {
sql.SET("county_id = #{countyId,jdbcType=LONGVARCHAR}");
}
if (record.getTownId() != null) {
sql.SET("town_id = #{townId,jdbcType=LONGVARCHAR}");
}
sql.WHERE("id = #{id,jdbcType=BIGINT}");
return sql.toString();
}
protected void applyWhere(SQL sql, GoodsUserAddressExample example, boolean includeExamplePhrase) {
if (example == null) {
return;
}
String parmPhrase1;
String parmPhrase1_th;
String parmPhrase2;
String parmPhrase2_th;
String parmPhrase3;
String parmPhrase3_th;
if (includeExamplePhrase) {
parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}";
parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}";
parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}";
parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}";
parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}";
parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}";
} else {
parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}";
parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}";
parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}";
parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}";
parmPhrase3 = "#{oredCriteria[%d].allCriteria[%d].value[%d]}";
parmPhrase3_th = "#{oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}";
}
StringBuilder sb = new StringBuilder();
List<Criteria> oredCriteria = example.getOredCriteria();
boolean firstCriteria = true;
for (int i = 0; i < oredCriteria.size(); i++) {
Criteria criteria = oredCriteria.get(i);
if (criteria.isValid()) {
if (firstCriteria) {
firstCriteria = false;
} else {
sb.append(" or ");
}
sb.append('(');
List<Criterion> criterions = criteria.getAllCriteria();
boolean firstCriterion = true;
for (int j = 0; j < criterions.size(); j++) {
Criterion criterion = criterions.get(j);
if (firstCriterion) {
firstCriterion = false;
} else {
sb.append(" and ");
}
if (criterion.isNoValue()) {
sb.append(criterion.getCondition());
} else if (criterion.isSingleValue()) {
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j));
} else {
sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler()));
}
} else if (criterion.isBetweenValue()) {
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j));
} else {
sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler()));
}
} else if (criterion.isListValue()) {
sb.append(criterion.getCondition());
sb.append(" (");
List<?> listItems = (List<?>) criterion.getValue();
boolean comma = false;
for (int k = 0; k < listItems.size(); k++) {
if (comma) {
sb.append(", ");
} else {
comma = true;
}
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase3, i, j, k));
} else {
sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler()));
}
}
sb.append(')');
}
}
sb.append(')');
}
}
if (sb.length() > 0) {
sql.WHERE(sb.toString());
}
}
}

@ -0,0 +1,212 @@
package com.hfkj.entity;
import java.io.Serializable;
import java.util.Date;
/**
* goods_user_address
* @author
*/
/**
*
* 代码由工具生成
*
**/
public class GoodsUserAddress implements Serializable {
/**
* 主键
*/
private Long id;
/**
* 用户编码
*/
private Long userId;
/**
* 收货人
*/
private String consignee;
/**
* 联系电话
*/
private String phone;
/**
* 详细地址
*/
private String address;
/**
* 区域编码
*/
private String regionId;
/**
* 区域名称
*/
private String regionName;
/**
* 是否默认地址
*/
private Boolean whetherDefault;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 操作人员id
*/
private Long opId;
/**
* 操作人员名称
*/
private String opName;
/**
* ext_1
*/
private String ext1;
/**
* ext_2
*/
private String ext2;
/**
* ext_3
*/
private String ext3;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public String getConsignee() {
return consignee;
}
public void setConsignee(String consignee) {
this.consignee = consignee;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getRegionId() {
return regionId;
}
public void setRegionId(String regionId) {
this.regionId = regionId;
}
public String getRegionName() {
return regionName;
}
public void setRegionName(String regionName) {
this.regionName = regionName;
}
public Boolean getWhetherDefault() {
return whetherDefault;
}
public void setWhetherDefault(Boolean whetherDefault) {
this.whetherDefault = whetherDefault;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public Long getOpId() {
return opId;
}
public void setOpId(Long opId) {
this.opId = opId;
}
public String getOpName() {
return opName;
}
public void setOpName(String opName) {
this.opName = opName;
}
public String getExt1() {
return ext1;
}
public void setExt1(String ext1) {
this.ext1 = ext1;
}
public String getExt2() {
return ext2;
}
public void setExt2(String ext2) {
this.ext2 = ext2;
}
public String getExt3() {
return ext3;
}
public void setExt3(String ext3) {
this.ext3 = ext3;
}
}

@ -0,0 +1,63 @@
package com.hfkj.entity;
import java.io.Serializable;
/**
* goods_user_address
* @author
*/
public class GoodsUserAddressWithBLOBs extends GoodsUserAddress implements Serializable {
/**
* 一级地址编号
*/
private String provinceId;
/**
* 二级地址编号
*/
private String cityId;
/**
* 三级地址编号
*/
private String countyId;
/**
* 四级地址编号
*/
private String townId;
private static final long serialVersionUID = 1L;
public String getProvinceId() {
return provinceId;
}
public void setProvinceId(String provinceId) {
this.provinceId = provinceId;
}
public String getCityId() {
return cityId;
}
public void setCityId(String cityId) {
this.cityId = cityId;
}
public String getCountyId() {
return countyId;
}
public void setCountyId(String countyId) {
this.countyId = countyId;
}
public String getTownId() {
return townId;
}
public void setTownId(String townId) {
this.townId = townId;
}
}
Loading…
Cancel
Save