parent
15429ed270
commit
74600b4e78
@ -0,0 +1,155 @@ |
||||
package com.hfkj.dao; |
||||
|
||||
import com.hfkj.entity.GoodsAutoRel; |
||||
import com.hfkj.entity.GoodsAutoRelExample; |
||||
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 GoodsAutoRelMapper extends GoodsAutoRelMapperExt { |
||||
@SelectProvider(type=GoodsAutoRelSqlProvider.class, method="countByExample") |
||||
long countByExample(GoodsAutoRelExample example); |
||||
|
||||
@DeleteProvider(type=GoodsAutoRelSqlProvider.class, method="deleteByExample") |
||||
int deleteByExample(GoodsAutoRelExample example); |
||||
|
||||
@Delete({ |
||||
"delete from goods_auto_rel", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
int deleteByPrimaryKey(Long id); |
||||
|
||||
@Insert({ |
||||
"insert into goods_auto_rel (`type`, goods_id, ", |
||||
"goods_name, task_id, ", |
||||
"task_title, listing_time, ", |
||||
"removal_time, `status`, ", |
||||
"remak, create_time, ", |
||||
"update_time, create_user_id, ", |
||||
"create_user_name, update_user_id, ", |
||||
"update_user_name, ext_1, ", |
||||
"ext_2, ext_3)", |
||||
"values (#{type,jdbcType=INTEGER}, #{goodsId,jdbcType=BIGINT}, ", |
||||
"#{goodsName,jdbcType=VARCHAR}, #{taskId,jdbcType=BIGINT}, ", |
||||
"#{taskTitle,jdbcType=VARCHAR}, #{listingTime,jdbcType=TIMESTAMP}, ", |
||||
"#{removalTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}, ", |
||||
"#{remak,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ", |
||||
"#{updateTime,jdbcType=TIMESTAMP}, #{createUserId,jdbcType=BIGINT}, ", |
||||
"#{createUserName,jdbcType=VARCHAR}, #{updateUserId,jdbcType=BIGINT}, ", |
||||
"#{updateUserName,jdbcType=VARCHAR}, #{ext1,jdbcType=VARCHAR}, ", |
||||
"#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" |
||||
}) |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insert(GoodsAutoRel record); |
||||
|
||||
@InsertProvider(type=GoodsAutoRelSqlProvider.class, method="insertSelective") |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insertSelective(GoodsAutoRel record); |
||||
|
||||
@SelectProvider(type=GoodsAutoRelSqlProvider.class, method="selectByExample") |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="goods_id", property="goodsId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="goods_name", property="goodsName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="task_id", property="taskId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="task_title", property="taskTitle", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="listing_time", property="listingTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="removal_time", property="removalTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="remak", property="remak", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="create_user_id", property="createUserId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="create_user_name", property="createUserName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="update_user_id", property="updateUserId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="update_user_name", property="updateUserName", 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<GoodsAutoRel> selectByExample(GoodsAutoRelExample example); |
||||
|
||||
@Select({ |
||||
"select", |
||||
"id, `type`, goods_id, goods_name, task_id, task_title, listing_time, removal_time, ", |
||||
"`status`, remak, create_time, update_time, create_user_id, create_user_name, ", |
||||
"update_user_id, update_user_name, ext_1, ext_2, ext_3", |
||||
"from goods_auto_rel", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="goods_id", property="goodsId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="goods_name", property="goodsName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="task_id", property="taskId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="task_title", property="taskTitle", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="listing_time", property="listingTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="removal_time", property="removalTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="remak", property="remak", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="create_user_id", property="createUserId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="create_user_name", property="createUserName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="update_user_id", property="updateUserId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="update_user_name", property="updateUserName", 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) |
||||
}) |
||||
GoodsAutoRel selectByPrimaryKey(Long id); |
||||
|
||||
@UpdateProvider(type=GoodsAutoRelSqlProvider.class, method="updateByExampleSelective") |
||||
int updateByExampleSelective(@Param("record") GoodsAutoRel record, @Param("example") GoodsAutoRelExample example); |
||||
|
||||
@UpdateProvider(type=GoodsAutoRelSqlProvider.class, method="updateByExample") |
||||
int updateByExample(@Param("record") GoodsAutoRel record, @Param("example") GoodsAutoRelExample example); |
||||
|
||||
@UpdateProvider(type=GoodsAutoRelSqlProvider.class, method="updateByPrimaryKeySelective") |
||||
int updateByPrimaryKeySelective(GoodsAutoRel record); |
||||
|
||||
@Update({ |
||||
"update goods_auto_rel", |
||||
"set `type` = #{type,jdbcType=INTEGER},", |
||||
"goods_id = #{goodsId,jdbcType=BIGINT},", |
||||
"goods_name = #{goodsName,jdbcType=VARCHAR},", |
||||
"task_id = #{taskId,jdbcType=BIGINT},", |
||||
"task_title = #{taskTitle,jdbcType=VARCHAR},", |
||||
"listing_time = #{listingTime,jdbcType=TIMESTAMP},", |
||||
"removal_time = #{removalTime,jdbcType=TIMESTAMP},", |
||||
"`status` = #{status,jdbcType=INTEGER},", |
||||
"remak = #{remak,jdbcType=VARCHAR},", |
||||
"create_time = #{createTime,jdbcType=TIMESTAMP},", |
||||
"update_time = #{updateTime,jdbcType=TIMESTAMP},", |
||||
"create_user_id = #{createUserId,jdbcType=BIGINT},", |
||||
"create_user_name = #{createUserName,jdbcType=VARCHAR},", |
||||
"update_user_id = #{updateUserId,jdbcType=BIGINT},", |
||||
"update_user_name = #{updateUserName,jdbcType=VARCHAR},", |
||||
"ext_1 = #{ext1,jdbcType=VARCHAR},", |
||||
"ext_2 = #{ext2,jdbcType=VARCHAR},", |
||||
"ext_3 = #{ext3,jdbcType=VARCHAR}", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
int updateByPrimaryKey(GoodsAutoRel record); |
||||
} |
@ -0,0 +1,7 @@ |
||||
package com.hfkj.dao; |
||||
|
||||
/** |
||||
* mapper扩展类 |
||||
*/ |
||||
public interface GoodsAutoRelMapperExt { |
||||
} |
@ -0,0 +1,430 @@ |
||||
package com.hfkj.dao; |
||||
|
||||
import com.hfkj.entity.GoodsAutoRel; |
||||
import com.hfkj.entity.GoodsAutoRelExample.Criteria; |
||||
import com.hfkj.entity.GoodsAutoRelExample.Criterion; |
||||
import com.hfkj.entity.GoodsAutoRelExample; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
import org.apache.ibatis.jdbc.SQL; |
||||
|
||||
public class GoodsAutoRelSqlProvider { |
||||
|
||||
public String countByExample(GoodsAutoRelExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.SELECT("count(*)").FROM("goods_auto_rel"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String deleteByExample(GoodsAutoRelExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.DELETE_FROM("goods_auto_rel"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String insertSelective(GoodsAutoRel record) { |
||||
SQL sql = new SQL(); |
||||
sql.INSERT_INTO("goods_auto_rel"); |
||||
|
||||
if (record.getType() != null) { |
||||
sql.VALUES("`type`", "#{type,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getGoodsId() != null) { |
||||
sql.VALUES("goods_id", "#{goodsId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getGoodsName() != null) { |
||||
sql.VALUES("goods_name", "#{goodsName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getTaskId() != null) { |
||||
sql.VALUES("task_id", "#{taskId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getTaskTitle() != null) { |
||||
sql.VALUES("task_title", "#{taskTitle,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getListingTime() != null) { |
||||
sql.VALUES("listing_time", "#{listingTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getRemovalTime() != null) { |
||||
sql.VALUES("removal_time", "#{removalTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getRemak() != null) { |
||||
sql.VALUES("remak", "#{remak,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getCreateTime() != null) { |
||||
sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getUpdateTime() != null) { |
||||
sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getCreateUserId() != null) { |
||||
sql.VALUES("create_user_id", "#{createUserId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getCreateUserName() != null) { |
||||
sql.VALUES("create_user_name", "#{createUserName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getUpdateUserId() != null) { |
||||
sql.VALUES("update_user_id", "#{updateUserId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getUpdateUserName() != null) { |
||||
sql.VALUES("update_user_name", "#{updateUserName,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}"); |
||||
} |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String selectByExample(GoodsAutoRelExample example) { |
||||
SQL sql = new SQL(); |
||||
if (example != null && example.isDistinct()) { |
||||
sql.SELECT_DISTINCT("id"); |
||||
} else { |
||||
sql.SELECT("id"); |
||||
} |
||||
sql.SELECT("`type`"); |
||||
sql.SELECT("goods_id"); |
||||
sql.SELECT("goods_name"); |
||||
sql.SELECT("task_id"); |
||||
sql.SELECT("task_title"); |
||||
sql.SELECT("listing_time"); |
||||
sql.SELECT("removal_time"); |
||||
sql.SELECT("`status`"); |
||||
sql.SELECT("remak"); |
||||
sql.SELECT("create_time"); |
||||
sql.SELECT("update_time"); |
||||
sql.SELECT("create_user_id"); |
||||
sql.SELECT("create_user_name"); |
||||
sql.SELECT("update_user_id"); |
||||
sql.SELECT("update_user_name"); |
||||
sql.SELECT("ext_1"); |
||||
sql.SELECT("ext_2"); |
||||
sql.SELECT("ext_3"); |
||||
sql.FROM("goods_auto_rel"); |
||||
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) { |
||||
GoodsAutoRel record = (GoodsAutoRel) parameter.get("record"); |
||||
GoodsAutoRelExample example = (GoodsAutoRelExample) parameter.get("example"); |
||||
|
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("goods_auto_rel"); |
||||
|
||||
if (record.getId() != null) { |
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getType() != null) { |
||||
sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getGoodsId() != null) { |
||||
sql.SET("goods_id = #{record.goodsId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getGoodsName() != null) { |
||||
sql.SET("goods_name = #{record.goodsName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getTaskId() != null) { |
||||
sql.SET("task_id = #{record.taskId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getTaskTitle() != null) { |
||||
sql.SET("task_title = #{record.taskTitle,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getListingTime() != null) { |
||||
sql.SET("listing_time = #{record.listingTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getRemovalTime() != null) { |
||||
sql.SET("removal_time = #{record.removalTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getRemak() != null) { |
||||
sql.SET("remak = #{record.remak,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
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.getCreateUserId() != null) { |
||||
sql.SET("create_user_id = #{record.createUserId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getCreateUserName() != null) { |
||||
sql.SET("create_user_name = #{record.createUserName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getUpdateUserId() != null) { |
||||
sql.SET("update_user_id = #{record.updateUserId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getUpdateUserName() != null) { |
||||
sql.SET("update_user_name = #{record.updateUserName,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}"); |
||||
} |
||||
|
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByExample(Map<String, Object> parameter) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("goods_auto_rel"); |
||||
|
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); |
||||
sql.SET("goods_id = #{record.goodsId,jdbcType=BIGINT}"); |
||||
sql.SET("goods_name = #{record.goodsName,jdbcType=VARCHAR}"); |
||||
sql.SET("task_id = #{record.taskId,jdbcType=BIGINT}"); |
||||
sql.SET("task_title = #{record.taskTitle,jdbcType=VARCHAR}"); |
||||
sql.SET("listing_time = #{record.listingTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("removal_time = #{record.removalTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||
sql.SET("remak = #{record.remak,jdbcType=VARCHAR}"); |
||||
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("create_user_id = #{record.createUserId,jdbcType=BIGINT}"); |
||||
sql.SET("create_user_name = #{record.createUserName,jdbcType=VARCHAR}"); |
||||
sql.SET("update_user_id = #{record.updateUserId,jdbcType=BIGINT}"); |
||||
sql.SET("update_user_name = #{record.updateUserName,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}"); |
||||
|
||||
GoodsAutoRelExample example = (GoodsAutoRelExample) parameter.get("example"); |
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByPrimaryKeySelective(GoodsAutoRel record) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("goods_auto_rel"); |
||||
|
||||
if (record.getType() != null) { |
||||
sql.SET("`type` = #{type,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getGoodsId() != null) { |
||||
sql.SET("goods_id = #{goodsId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getGoodsName() != null) { |
||||
sql.SET("goods_name = #{goodsName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getTaskId() != null) { |
||||
sql.SET("task_id = #{taskId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getTaskTitle() != null) { |
||||
sql.SET("task_title = #{taskTitle,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getListingTime() != null) { |
||||
sql.SET("listing_time = #{listingTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getRemovalTime() != null) { |
||||
sql.SET("removal_time = #{removalTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.SET("`status` = #{status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getRemak() != null) { |
||||
sql.SET("remak = #{remak,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getCreateTime() != null) { |
||||
sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getUpdateTime() != null) { |
||||
sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getCreateUserId() != null) { |
||||
sql.SET("create_user_id = #{createUserId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getCreateUserName() != null) { |
||||
sql.SET("create_user_name = #{createUserName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getUpdateUserId() != null) { |
||||
sql.SET("update_user_id = #{updateUserId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getUpdateUserName() != null) { |
||||
sql.SET("update_user_name = #{updateUserName,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}"); |
||||
} |
||||
|
||||
sql.WHERE("id = #{id,jdbcType=BIGINT}"); |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
protected void applyWhere(SQL sql, GoodsAutoRelExample 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,142 @@ |
||||
package com.hfkj.dao; |
||||
|
||||
import com.hfkj.entity.GoodsAutoTask; |
||||
import com.hfkj.entity.GoodsAutoTaskExample; |
||||
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 GoodsAutoTaskMapper extends GoodsAutoTaskMapperExt { |
||||
@SelectProvider(type=GoodsAutoTaskSqlProvider.class, method="countByExample") |
||||
long countByExample(GoodsAutoTaskExample example); |
||||
|
||||
@DeleteProvider(type=GoodsAutoTaskSqlProvider.class, method="deleteByExample") |
||||
int deleteByExample(GoodsAutoTaskExample example); |
||||
|
||||
@Delete({ |
||||
"delete from goods_auto_task", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
int deleteByPrimaryKey(Long id); |
||||
|
||||
@Insert({ |
||||
"insert into goods_auto_task (`type`, task_title, ", |
||||
"listing_time, removal_time, ", |
||||
"inventory, `status`, ", |
||||
"create_time, update_time, ", |
||||
"create_user_id, create_user_name, ", |
||||
"update_user_id, update_user_name, ", |
||||
"ext_1, ext_2, ext_3)", |
||||
"values (#{type,jdbcType=INTEGER}, #{taskTitle,jdbcType=VARCHAR}, ", |
||||
"#{listingTime,jdbcType=TIMESTAMP}, #{removalTime,jdbcType=TIMESTAMP}, ", |
||||
"#{inventory,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, ", |
||||
"#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", |
||||
"#{createUserId,jdbcType=BIGINT}, #{createUserName,jdbcType=VARCHAR}, ", |
||||
"#{updateUserId,jdbcType=BIGINT}, #{updateUserName,jdbcType=VARCHAR}, ", |
||||
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" |
||||
}) |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insert(GoodsAutoTask record); |
||||
|
||||
@InsertProvider(type=GoodsAutoTaskSqlProvider.class, method="insertSelective") |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insertSelective(GoodsAutoTask record); |
||||
|
||||
@SelectProvider(type=GoodsAutoTaskSqlProvider.class, method="selectByExample") |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="task_title", property="taskTitle", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="listing_time", property="listingTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="removal_time", property="removalTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="inventory", property="inventory", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="create_user_id", property="createUserId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="create_user_name", property="createUserName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="update_user_id", property="updateUserId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="update_user_name", property="updateUserName", 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<GoodsAutoTask> selectByExample(GoodsAutoTaskExample example); |
||||
|
||||
@Select({ |
||||
"select", |
||||
"id, `type`, task_title, listing_time, removal_time, inventory, `status`, create_time, ", |
||||
"update_time, create_user_id, create_user_name, update_user_id, update_user_name, ", |
||||
"ext_1, ext_2, ext_3", |
||||
"from goods_auto_task", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="task_title", property="taskTitle", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="listing_time", property="listingTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="removal_time", property="removalTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="inventory", property="inventory", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="create_user_id", property="createUserId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="create_user_name", property="createUserName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="update_user_id", property="updateUserId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="update_user_name", property="updateUserName", 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) |
||||
}) |
||||
GoodsAutoTask selectByPrimaryKey(Long id); |
||||
|
||||
@UpdateProvider(type=GoodsAutoTaskSqlProvider.class, method="updateByExampleSelective") |
||||
int updateByExampleSelective(@Param("record") GoodsAutoTask record, @Param("example") GoodsAutoTaskExample example); |
||||
|
||||
@UpdateProvider(type=GoodsAutoTaskSqlProvider.class, method="updateByExample") |
||||
int updateByExample(@Param("record") GoodsAutoTask record, @Param("example") GoodsAutoTaskExample example); |
||||
|
||||
@UpdateProvider(type=GoodsAutoTaskSqlProvider.class, method="updateByPrimaryKeySelective") |
||||
int updateByPrimaryKeySelective(GoodsAutoTask record); |
||||
|
||||
@Update({ |
||||
"update goods_auto_task", |
||||
"set `type` = #{type,jdbcType=INTEGER},", |
||||
"task_title = #{taskTitle,jdbcType=VARCHAR},", |
||||
"listing_time = #{listingTime,jdbcType=TIMESTAMP},", |
||||
"removal_time = #{removalTime,jdbcType=TIMESTAMP},", |
||||
"inventory = #{inventory,jdbcType=INTEGER},", |
||||
"`status` = #{status,jdbcType=INTEGER},", |
||||
"create_time = #{createTime,jdbcType=TIMESTAMP},", |
||||
"update_time = #{updateTime,jdbcType=TIMESTAMP},", |
||||
"create_user_id = #{createUserId,jdbcType=BIGINT},", |
||||
"create_user_name = #{createUserName,jdbcType=VARCHAR},", |
||||
"update_user_id = #{updateUserId,jdbcType=BIGINT},", |
||||
"update_user_name = #{updateUserName,jdbcType=VARCHAR},", |
||||
"ext_1 = #{ext1,jdbcType=VARCHAR},", |
||||
"ext_2 = #{ext2,jdbcType=VARCHAR},", |
||||
"ext_3 = #{ext3,jdbcType=VARCHAR}", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
int updateByPrimaryKey(GoodsAutoTask record); |
||||
} |
@ -0,0 +1,64 @@ |
||||
package com.hfkj.dao; |
||||
|
||||
import com.hfkj.entity.GoodsAutoTask; |
||||
import org.apache.ibatis.annotations.Result; |
||||
import org.apache.ibatis.annotations.Results; |
||||
import org.apache.ibatis.annotations.Select; |
||||
import org.apache.ibatis.type.JdbcType; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* mapper扩展类 |
||||
*/ |
||||
public interface GoodsAutoTaskMapperExt { |
||||
|
||||
@Select("<script>" + |
||||
" SELECT * FROM goods_auto_task" + |
||||
" WHERE DATE(listing_time) = CURDATE() AND `status` = 1 and type = 1 ORDER BY listing_time DESC;" + |
||||
"</script>") |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType= JdbcType.BIGINT, id=true), |
||||
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="task_title", property="taskTitle", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="listing_time", property="listingTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="removal_time", property="removalTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="inventory", property="inventory", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="create_user_id", property="createUserId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="create_user_name", property="createUserName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="update_user_id", property="updateUserId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="update_user_name", property="updateUserName", 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<GoodsAutoTask> listingList(); |
||||
|
||||
@Select("<script>" + |
||||
" SELECT * FROM goods_auto_task" + |
||||
" WHERE DATE(removal_time) = CURDATE() AND `status` = 1 and type = 2 ORDER BY removal_time DESC;" + |
||||
"</script>") |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="task_title", property="taskTitle", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="listing_time", property="listingTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="removal_time", property="removalTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="inventory", property="inventory", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="create_user_id", property="createUserId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="create_user_name", property="createUserName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="update_user_id", property="updateUserId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="update_user_name", property="updateUserName", 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<GoodsAutoTask> removalList(); |
||||
|
||||
} |
@ -0,0 +1,388 @@ |
||||
package com.hfkj.dao; |
||||
|
||||
import com.hfkj.entity.GoodsAutoTask; |
||||
import com.hfkj.entity.GoodsAutoTaskExample.Criteria; |
||||
import com.hfkj.entity.GoodsAutoTaskExample.Criterion; |
||||
import com.hfkj.entity.GoodsAutoTaskExample; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
import org.apache.ibatis.jdbc.SQL; |
||||
|
||||
public class GoodsAutoTaskSqlProvider { |
||||
|
||||
public String countByExample(GoodsAutoTaskExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.SELECT("count(*)").FROM("goods_auto_task"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String deleteByExample(GoodsAutoTaskExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.DELETE_FROM("goods_auto_task"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String insertSelective(GoodsAutoTask record) { |
||||
SQL sql = new SQL(); |
||||
sql.INSERT_INTO("goods_auto_task"); |
||||
|
||||
if (record.getType() != null) { |
||||
sql.VALUES("`type`", "#{type,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getTaskTitle() != null) { |
||||
sql.VALUES("task_title", "#{taskTitle,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getListingTime() != null) { |
||||
sql.VALUES("listing_time", "#{listingTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getRemovalTime() != null) { |
||||
sql.VALUES("removal_time", "#{removalTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getInventory() != null) { |
||||
sql.VALUES("inventory", "#{inventory,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCreateTime() != null) { |
||||
sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getUpdateTime() != null) { |
||||
sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getCreateUserId() != null) { |
||||
sql.VALUES("create_user_id", "#{createUserId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getCreateUserName() != null) { |
||||
sql.VALUES("create_user_name", "#{createUserName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getUpdateUserId() != null) { |
||||
sql.VALUES("update_user_id", "#{updateUserId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getUpdateUserName() != null) { |
||||
sql.VALUES("update_user_name", "#{updateUserName,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}"); |
||||
} |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String selectByExample(GoodsAutoTaskExample example) { |
||||
SQL sql = new SQL(); |
||||
if (example != null && example.isDistinct()) { |
||||
sql.SELECT_DISTINCT("id"); |
||||
} else { |
||||
sql.SELECT("id"); |
||||
} |
||||
sql.SELECT("`type`"); |
||||
sql.SELECT("task_title"); |
||||
sql.SELECT("listing_time"); |
||||
sql.SELECT("removal_time"); |
||||
sql.SELECT("inventory"); |
||||
sql.SELECT("`status`"); |
||||
sql.SELECT("create_time"); |
||||
sql.SELECT("update_time"); |
||||
sql.SELECT("create_user_id"); |
||||
sql.SELECT("create_user_name"); |
||||
sql.SELECT("update_user_id"); |
||||
sql.SELECT("update_user_name"); |
||||
sql.SELECT("ext_1"); |
||||
sql.SELECT("ext_2"); |
||||
sql.SELECT("ext_3"); |
||||
sql.FROM("goods_auto_task"); |
||||
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) { |
||||
GoodsAutoTask record = (GoodsAutoTask) parameter.get("record"); |
||||
GoodsAutoTaskExample example = (GoodsAutoTaskExample) parameter.get("example"); |
||||
|
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("goods_auto_task"); |
||||
|
||||
if (record.getId() != null) { |
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getType() != null) { |
||||
sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getTaskTitle() != null) { |
||||
sql.SET("task_title = #{record.taskTitle,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getListingTime() != null) { |
||||
sql.SET("listing_time = #{record.listingTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getRemovalTime() != null) { |
||||
sql.SET("removal_time = #{record.removalTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getInventory() != null) { |
||||
sql.SET("inventory = #{record.inventory,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
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.getCreateUserId() != null) { |
||||
sql.SET("create_user_id = #{record.createUserId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getCreateUserName() != null) { |
||||
sql.SET("create_user_name = #{record.createUserName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getUpdateUserId() != null) { |
||||
sql.SET("update_user_id = #{record.updateUserId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getUpdateUserName() != null) { |
||||
sql.SET("update_user_name = #{record.updateUserName,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}"); |
||||
} |
||||
|
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByExample(Map<String, Object> parameter) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("goods_auto_task"); |
||||
|
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); |
||||
sql.SET("task_title = #{record.taskTitle,jdbcType=VARCHAR}"); |
||||
sql.SET("listing_time = #{record.listingTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("removal_time = #{record.removalTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("inventory = #{record.inventory,jdbcType=INTEGER}"); |
||||
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("create_user_id = #{record.createUserId,jdbcType=BIGINT}"); |
||||
sql.SET("create_user_name = #{record.createUserName,jdbcType=VARCHAR}"); |
||||
sql.SET("update_user_id = #{record.updateUserId,jdbcType=BIGINT}"); |
||||
sql.SET("update_user_name = #{record.updateUserName,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}"); |
||||
|
||||
GoodsAutoTaskExample example = (GoodsAutoTaskExample) parameter.get("example"); |
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByPrimaryKeySelective(GoodsAutoTask record) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("goods_auto_task"); |
||||
|
||||
if (record.getType() != null) { |
||||
sql.SET("`type` = #{type,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getTaskTitle() != null) { |
||||
sql.SET("task_title = #{taskTitle,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getListingTime() != null) { |
||||
sql.SET("listing_time = #{listingTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getRemovalTime() != null) { |
||||
sql.SET("removal_time = #{removalTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getInventory() != null) { |
||||
sql.SET("inventory = #{inventory,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.SET("`status` = #{status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCreateTime() != null) { |
||||
sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getUpdateTime() != null) { |
||||
sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getCreateUserId() != null) { |
||||
sql.SET("create_user_id = #{createUserId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getCreateUserName() != null) { |
||||
sql.SET("create_user_name = #{createUserName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getUpdateUserId() != null) { |
||||
sql.SET("update_user_id = #{updateUserId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getUpdateUserName() != null) { |
||||
sql.SET("update_user_name = #{updateUserName,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}"); |
||||
} |
||||
|
||||
sql.WHERE("id = #{id,jdbcType=BIGINT}"); |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
protected void applyWhere(SQL sql, GoodsAutoTaskExample 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,344 @@ |
||||
package com.hfkj.entity; |
||||
|
||||
import java.io.Serializable; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* goods_auto_rel |
||||
* @author |
||||
*/ |
||||
/** |
||||
* |
||||
* 代码由工具生成 |
||||
* |
||||
**/ |
||||
public class GoodsAutoRel implements Serializable { |
||||
/** |
||||
* 主键 |
||||
*/ |
||||
private Long id; |
||||
|
||||
/** |
||||
* 类型:1 上架 2:下架 |
||||
*/ |
||||
private Integer type; |
||||
|
||||
/** |
||||
* 商品ID |
||||
*/ |
||||
private Long goodsId; |
||||
|
||||
/** |
||||
* 商品名称 |
||||
*/ |
||||
private String goodsName; |
||||
|
||||
/** |
||||
* 任务ID |
||||
*/ |
||||
private Long taskId; |
||||
|
||||
/** |
||||
* 任务标题 |
||||
*/ |
||||
private String taskTitle; |
||||
|
||||
/** |
||||
* 上架时间 |
||||
*/ |
||||
private Date listingTime; |
||||
|
||||
/** |
||||
* 下架时间 |
||||
*/ |
||||
private Date removalTime; |
||||
|
||||
/** |
||||
* 状态 1:待启动 0:删除 2:成功 3:失败 |
||||
*/ |
||||
private Integer status; |
||||
|
||||
/** |
||||
* 备注 |
||||
*/ |
||||
private String remak; |
||||
|
||||
/** |
||||
* 创建时间 |
||||
*/ |
||||
private Date createTime; |
||||
|
||||
/** |
||||
* 更新时间 |
||||
*/ |
||||
private Date updateTime; |
||||
|
||||
/** |
||||
* 创建人ID |
||||
*/ |
||||
private Long createUserId; |
||||
|
||||
/** |
||||
* 创建人名称 |
||||
*/ |
||||
private String createUserName; |
||||
|
||||
/** |
||||
* 更新人ID |
||||
*/ |
||||
private Long updateUserId; |
||||
|
||||
/** |
||||
* 更新人名称 |
||||
*/ |
||||
private String updateUserName; |
||||
|
||||
private String ext1; |
||||
|
||||
private String ext2; |
||||
|
||||
private String ext3; |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
public Long getId() { |
||||
return id; |
||||
} |
||||
|
||||
public void setId(Long id) { |
||||
this.id = id; |
||||
} |
||||
|
||||
public Integer getType() { |
||||
return type; |
||||
} |
||||
|
||||
public void setType(Integer type) { |
||||
this.type = type; |
||||
} |
||||
|
||||
public Long getGoodsId() { |
||||
return goodsId; |
||||
} |
||||
|
||||
public void setGoodsId(Long goodsId) { |
||||
this.goodsId = goodsId; |
||||
} |
||||
|
||||
public String getGoodsName() { |
||||
return goodsName; |
||||
} |
||||
|
||||
public void setGoodsName(String goodsName) { |
||||
this.goodsName = goodsName; |
||||
} |
||||
|
||||
public Long getTaskId() { |
||||
return taskId; |
||||
} |
||||
|
||||
public void setTaskId(Long taskId) { |
||||
this.taskId = taskId; |
||||
} |
||||
|
||||
public String getTaskTitle() { |
||||
return taskTitle; |
||||
} |
||||
|
||||
public void setTaskTitle(String taskTitle) { |
||||
this.taskTitle = taskTitle; |
||||
} |
||||
|
||||
public Date getListingTime() { |
||||
return listingTime; |
||||
} |
||||
|
||||
public void setListingTime(Date listingTime) { |
||||
this.listingTime = listingTime; |
||||
} |
||||
|
||||
public Date getRemovalTime() { |
||||
return removalTime; |
||||
} |
||||
|
||||
public void setRemovalTime(Date removalTime) { |
||||
this.removalTime = removalTime; |
||||
} |
||||
|
||||
public Integer getStatus() { |
||||
return status; |
||||
} |
||||
|
||||
public void setStatus(Integer status) { |
||||
this.status = status; |
||||
} |
||||
|
||||
public String getRemak() { |
||||
return remak; |
||||
} |
||||
|
||||
public void setRemak(String remak) { |
||||
this.remak = remak; |
||||
} |
||||
|
||||
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 getCreateUserId() { |
||||
return createUserId; |
||||
} |
||||
|
||||
public void setCreateUserId(Long createUserId) { |
||||
this.createUserId = createUserId; |
||||
} |
||||
|
||||
public String getCreateUserName() { |
||||
return createUserName; |
||||
} |
||||
|
||||
public void setCreateUserName(String createUserName) { |
||||
this.createUserName = createUserName; |
||||
} |
||||
|
||||
public Long getUpdateUserId() { |
||||
return updateUserId; |
||||
} |
||||
|
||||
public void setUpdateUserId(Long updateUserId) { |
||||
this.updateUserId = updateUserId; |
||||
} |
||||
|
||||
public String getUpdateUserName() { |
||||
return updateUserName; |
||||
} |
||||
|
||||
public void setUpdateUserName(String updateUserName) { |
||||
this.updateUserName = updateUserName; |
||||
} |
||||
|
||||
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; |
||||
} |
||||
|
||||
@Override |
||||
public boolean equals(Object that) { |
||||
if (this == that) { |
||||
return true; |
||||
} |
||||
if (that == null) { |
||||
return false; |
||||
} |
||||
if (getClass() != that.getClass()) { |
||||
return false; |
||||
} |
||||
GoodsAutoRel other = (GoodsAutoRel) that; |
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) |
||||
&& (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType())) |
||||
&& (this.getGoodsId() == null ? other.getGoodsId() == null : this.getGoodsId().equals(other.getGoodsId())) |
||||
&& (this.getGoodsName() == null ? other.getGoodsName() == null : this.getGoodsName().equals(other.getGoodsName())) |
||||
&& (this.getTaskId() == null ? other.getTaskId() == null : this.getTaskId().equals(other.getTaskId())) |
||||
&& (this.getTaskTitle() == null ? other.getTaskTitle() == null : this.getTaskTitle().equals(other.getTaskTitle())) |
||||
&& (this.getListingTime() == null ? other.getListingTime() == null : this.getListingTime().equals(other.getListingTime())) |
||||
&& (this.getRemovalTime() == null ? other.getRemovalTime() == null : this.getRemovalTime().equals(other.getRemovalTime())) |
||||
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) |
||||
&& (this.getRemak() == null ? other.getRemak() == null : this.getRemak().equals(other.getRemak())) |
||||
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) |
||||
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) |
||||
&& (this.getCreateUserId() == null ? other.getCreateUserId() == null : this.getCreateUserId().equals(other.getCreateUserId())) |
||||
&& (this.getCreateUserName() == null ? other.getCreateUserName() == null : this.getCreateUserName().equals(other.getCreateUserName())) |
||||
&& (this.getUpdateUserId() == null ? other.getUpdateUserId() == null : this.getUpdateUserId().equals(other.getUpdateUserId())) |
||||
&& (this.getUpdateUserName() == null ? other.getUpdateUserName() == null : this.getUpdateUserName().equals(other.getUpdateUserName())) |
||||
&& (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1())) |
||||
&& (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2())) |
||||
&& (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3())); |
||||
} |
||||
|
||||
@Override |
||||
public int hashCode() { |
||||
final int prime = 31; |
||||
int result = 1; |
||||
result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); |
||||
result = prime * result + ((getType() == null) ? 0 : getType().hashCode()); |
||||
result = prime * result + ((getGoodsId() == null) ? 0 : getGoodsId().hashCode()); |
||||
result = prime * result + ((getGoodsName() == null) ? 0 : getGoodsName().hashCode()); |
||||
result = prime * result + ((getTaskId() == null) ? 0 : getTaskId().hashCode()); |
||||
result = prime * result + ((getTaskTitle() == null) ? 0 : getTaskTitle().hashCode()); |
||||
result = prime * result + ((getListingTime() == null) ? 0 : getListingTime().hashCode()); |
||||
result = prime * result + ((getRemovalTime() == null) ? 0 : getRemovalTime().hashCode()); |
||||
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); |
||||
result = prime * result + ((getRemak() == null) ? 0 : getRemak().hashCode()); |
||||
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); |
||||
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); |
||||
result = prime * result + ((getCreateUserId() == null) ? 0 : getCreateUserId().hashCode()); |
||||
result = prime * result + ((getCreateUserName() == null) ? 0 : getCreateUserName().hashCode()); |
||||
result = prime * result + ((getUpdateUserId() == null) ? 0 : getUpdateUserId().hashCode()); |
||||
result = prime * result + ((getUpdateUserName() == null) ? 0 : getUpdateUserName().hashCode()); |
||||
result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode()); |
||||
result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode()); |
||||
result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode()); |
||||
return result; |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
StringBuilder sb = new StringBuilder(); |
||||
sb.append(getClass().getSimpleName()); |
||||
sb.append(" ["); |
||||
sb.append("Hash = ").append(hashCode()); |
||||
sb.append(", id=").append(id); |
||||
sb.append(", type=").append(type); |
||||
sb.append(", goodsId=").append(goodsId); |
||||
sb.append(", goodsName=").append(goodsName); |
||||
sb.append(", taskId=").append(taskId); |
||||
sb.append(", taskTitle=").append(taskTitle); |
||||
sb.append(", listingTime=").append(listingTime); |
||||
sb.append(", removalTime=").append(removalTime); |
||||
sb.append(", status=").append(status); |
||||
sb.append(", remak=").append(remak); |
||||
sb.append(", createTime=").append(createTime); |
||||
sb.append(", updateTime=").append(updateTime); |
||||
sb.append(", createUserId=").append(createUserId); |
||||
sb.append(", createUserName=").append(createUserName); |
||||
sb.append(", updateUserId=").append(updateUserId); |
||||
sb.append(", updateUserName=").append(updateUserName); |
||||
sb.append(", ext1=").append(ext1); |
||||
sb.append(", ext2=").append(ext2); |
||||
sb.append(", ext3=").append(ext3); |
||||
sb.append(", serialVersionUID=").append(serialVersionUID); |
||||
sb.append("]"); |
||||
return sb.toString(); |
||||
} |
||||
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,296 @@ |
||||
package com.hfkj.entity; |
||||
|
||||
import java.io.Serializable; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* goods_auto_task |
||||
* @author |
||||
*/ |
||||
/** |
||||
* |
||||
* 代码由工具生成 |
||||
* |
||||
**/ |
||||
public class GoodsAutoTask implements Serializable { |
||||
/** |
||||
* 主键 |
||||
*/ |
||||
private Long id; |
||||
|
||||
/** |
||||
* 类型:1 上架 2:下架 |
||||
*/ |
||||
private Integer type; |
||||
|
||||
/** |
||||
* 任务标题 |
||||
*/ |
||||
private String taskTitle; |
||||
|
||||
/** |
||||
* 上架时间 |
||||
*/ |
||||
private Date listingTime; |
||||
|
||||
/** |
||||
* 下架时间 |
||||
*/ |
||||
private Date removalTime; |
||||
|
||||
/** |
||||
* 库存 |
||||
*/ |
||||
private Integer inventory; |
||||
|
||||
/** |
||||
* 状态:1:启动 2 成功 3:失败 0:删除 |
||||
*/ |
||||
private Integer status; |
||||
|
||||
/** |
||||
* 创建时间 |
||||
*/ |
||||
private Date createTime; |
||||
|
||||
/** |
||||
* 更新时间 |
||||
*/ |
||||
private Date updateTime; |
||||
|
||||
/** |
||||
* 创建人ID |
||||
*/ |
||||
private Long createUserId; |
||||
|
||||
/** |
||||
* 创建人名称 |
||||
*/ |
||||
private String createUserName; |
||||
|
||||
/** |
||||
* 更新人ID |
||||
*/ |
||||
private Long updateUserId; |
||||
|
||||
/** |
||||
* 更新人名称 |
||||
*/ |
||||
private String updateUserName; |
||||
|
||||
private String ext1; |
||||
|
||||
private String ext2; |
||||
|
||||
private String ext3; |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
public Long getId() { |
||||
return id; |
||||
} |
||||
|
||||
public void setId(Long id) { |
||||
this.id = id; |
||||
} |
||||
|
||||
public Integer getType() { |
||||
return type; |
||||
} |
||||
|
||||
public void setType(Integer type) { |
||||
this.type = type; |
||||
} |
||||
|
||||
public String getTaskTitle() { |
||||
return taskTitle; |
||||
} |
||||
|
||||
public void setTaskTitle(String taskTitle) { |
||||
this.taskTitle = taskTitle; |
||||
} |
||||
|
||||
public Date getListingTime() { |
||||
return listingTime; |
||||
} |
||||
|
||||
public void setListingTime(Date listingTime) { |
||||
this.listingTime = listingTime; |
||||
} |
||||
|
||||
public Date getRemovalTime() { |
||||
return removalTime; |
||||
} |
||||
|
||||
public void setRemovalTime(Date removalTime) { |
||||
this.removalTime = removalTime; |
||||
} |
||||
|
||||
public Integer getInventory() { |
||||
return inventory; |
||||
} |
||||
|
||||
public void setInventory(Integer inventory) { |
||||
this.inventory = inventory; |
||||
} |
||||
|
||||
public Integer getStatus() { |
||||
return status; |
||||
} |
||||
|
||||
public void setStatus(Integer status) { |
||||
this.status = status; |
||||
} |
||||
|
||||
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 getCreateUserId() { |
||||
return createUserId; |
||||
} |
||||
|
||||
public void setCreateUserId(Long createUserId) { |
||||
this.createUserId = createUserId; |
||||
} |
||||
|
||||
public String getCreateUserName() { |
||||
return createUserName; |
||||
} |
||||
|
||||
public void setCreateUserName(String createUserName) { |
||||
this.createUserName = createUserName; |
||||
} |
||||
|
||||
public Long getUpdateUserId() { |
||||
return updateUserId; |
||||
} |
||||
|
||||
public void setUpdateUserId(Long updateUserId) { |
||||
this.updateUserId = updateUserId; |
||||
} |
||||
|
||||
public String getUpdateUserName() { |
||||
return updateUserName; |
||||
} |
||||
|
||||
public void setUpdateUserName(String updateUserName) { |
||||
this.updateUserName = updateUserName; |
||||
} |
||||
|
||||
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; |
||||
} |
||||
|
||||
@Override |
||||
public boolean equals(Object that) { |
||||
if (this == that) { |
||||
return true; |
||||
} |
||||
if (that == null) { |
||||
return false; |
||||
} |
||||
if (getClass() != that.getClass()) { |
||||
return false; |
||||
} |
||||
GoodsAutoTask other = (GoodsAutoTask) that; |
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) |
||||
&& (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType())) |
||||
&& (this.getTaskTitle() == null ? other.getTaskTitle() == null : this.getTaskTitle().equals(other.getTaskTitle())) |
||||
&& (this.getListingTime() == null ? other.getListingTime() == null : this.getListingTime().equals(other.getListingTime())) |
||||
&& (this.getRemovalTime() == null ? other.getRemovalTime() == null : this.getRemovalTime().equals(other.getRemovalTime())) |
||||
&& (this.getInventory() == null ? other.getInventory() == null : this.getInventory().equals(other.getInventory())) |
||||
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) |
||||
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) |
||||
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) |
||||
&& (this.getCreateUserId() == null ? other.getCreateUserId() == null : this.getCreateUserId().equals(other.getCreateUserId())) |
||||
&& (this.getCreateUserName() == null ? other.getCreateUserName() == null : this.getCreateUserName().equals(other.getCreateUserName())) |
||||
&& (this.getUpdateUserId() == null ? other.getUpdateUserId() == null : this.getUpdateUserId().equals(other.getUpdateUserId())) |
||||
&& (this.getUpdateUserName() == null ? other.getUpdateUserName() == null : this.getUpdateUserName().equals(other.getUpdateUserName())) |
||||
&& (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1())) |
||||
&& (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2())) |
||||
&& (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3())); |
||||
} |
||||
|
||||
@Override |
||||
public int hashCode() { |
||||
final int prime = 31; |
||||
int result = 1; |
||||
result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); |
||||
result = prime * result + ((getType() == null) ? 0 : getType().hashCode()); |
||||
result = prime * result + ((getTaskTitle() == null) ? 0 : getTaskTitle().hashCode()); |
||||
result = prime * result + ((getListingTime() == null) ? 0 : getListingTime().hashCode()); |
||||
result = prime * result + ((getRemovalTime() == null) ? 0 : getRemovalTime().hashCode()); |
||||
result = prime * result + ((getInventory() == null) ? 0 : getInventory().hashCode()); |
||||
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); |
||||
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); |
||||
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); |
||||
result = prime * result + ((getCreateUserId() == null) ? 0 : getCreateUserId().hashCode()); |
||||
result = prime * result + ((getCreateUserName() == null) ? 0 : getCreateUserName().hashCode()); |
||||
result = prime * result + ((getUpdateUserId() == null) ? 0 : getUpdateUserId().hashCode()); |
||||
result = prime * result + ((getUpdateUserName() == null) ? 0 : getUpdateUserName().hashCode()); |
||||
result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode()); |
||||
result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode()); |
||||
result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode()); |
||||
return result; |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
StringBuilder sb = new StringBuilder(); |
||||
sb.append(getClass().getSimpleName()); |
||||
sb.append(" ["); |
||||
sb.append("Hash = ").append(hashCode()); |
||||
sb.append(", id=").append(id); |
||||
sb.append(", type=").append(type); |
||||
sb.append(", taskTitle=").append(taskTitle); |
||||
sb.append(", listingTime=").append(listingTime); |
||||
sb.append(", removalTime=").append(removalTime); |
||||
sb.append(", inventory=").append(inventory); |
||||
sb.append(", status=").append(status); |
||||
sb.append(", createTime=").append(createTime); |
||||
sb.append(", updateTime=").append(updateTime); |
||||
sb.append(", createUserId=").append(createUserId); |
||||
sb.append(", createUserName=").append(createUserName); |
||||
sb.append(", updateUserId=").append(updateUserId); |
||||
sb.append(", updateUserName=").append(updateUserName); |
||||
sb.append(", ext1=").append(ext1); |
||||
sb.append(", ext2=").append(ext2); |
||||
sb.append(", ext3=").append(ext3); |
||||
sb.append(", serialVersionUID=").append(serialVersionUID); |
||||
sb.append("]"); |
||||
return sb.toString(); |
||||
} |
||||
} |
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue