diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighDiscountAgentRelController.java b/hai-bweb/src/main/java/com/bweb/controller/HighDiscountAgentRelController.java index e3393547..1596f2aa 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/HighDiscountAgentRelController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/HighDiscountAgentRelController.java @@ -163,14 +163,14 @@ public class HighDiscountAgentRelController { @RequestMapping(value="/getDiscountCodeList",method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询优惠券码 列表") - public ResponseData getDiscountAgentList(@RequestParam(name = "couponAgentId", required = true) Long couponAgentId, + public ResponseData getDiscountAgentList(@RequestParam(name = "discountAgentId", required = true) Long discountAgentId, @RequestParam(name = "status", required = false) Integer status, @RequestParam(name = "pageNum", required = true) Integer pageNum, @RequestParam(name = "pageSize", required = true) Integer pageSize) { try { Map map = new HashMap<>(); - map.put("couponAgentId", couponAgentId); + map.put("discountAgentId", discountAgentId); map.put("status", status); PageHelper.startPage(pageNum,pageSize); diff --git a/hai-service/src/main/java/com/hai/model/HighDiscountAgentCodeModel.java b/hai-service/src/main/java/com/hai/model/HighDiscountAgentCodeModel.java index a562c4ec..7d427497 100644 --- a/hai-service/src/main/java/com/hai/model/HighDiscountAgentCodeModel.java +++ b/hai-service/src/main/java/com/hai/model/HighDiscountAgentCodeModel.java @@ -3,6 +3,7 @@ package com.hai.model; import com.hai.entity.HighAgent; import com.hai.entity.HighDiscount; import com.hai.entity.HighOrder; +import com.hai.entity.HighUser; /** * 优惠券码 @@ -18,6 +19,9 @@ public class HighDiscountAgentCodeModel { // 订单 private HighOrder highOrder; + // 用户 + private HighUser highUser; + public HighAgent getHighAgent() { return highAgent; } @@ -41,4 +45,12 @@ public class HighDiscountAgentCodeModel { public void setHighOrder(HighOrder highOrder) { this.highOrder = highOrder; } + + public HighUser getHighUser() { + return highUser; + } + + public void setHighUser(HighUser highUser) { + this.highUser = highUser; + } } diff --git a/hai-service/src/main/java/com/hai/service/HighDiscountUserRelService.java b/hai-service/src/main/java/com/hai/service/HighDiscountUserRelService.java index 6dc332df..b3cfb23f 100644 --- a/hai-service/src/main/java/com/hai/service/HighDiscountUserRelService.java +++ b/hai-service/src/main/java/com/hai/service/HighDiscountUserRelService.java @@ -34,6 +34,13 @@ public interface HighDiscountUserRelService { **/ HighDiscountUserRel getRelByUserDiscount(Long userId,Long discountId); + /** + * @Author 袁野 + * @Description 优惠券id查询 + * @Date 2021/4/4 15:45 + **/ + HighDiscountUserRel getRelByDiscount(Long discountId); + /** * @Author 胡锐 * @Description 根据id查询 diff --git a/hai-service/src/main/java/com/hai/service/impl/HighDiscountAgentCodeServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighDiscountAgentCodeServiceImpl.java index 86f74d37..bb278771 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighDiscountAgentCodeServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighDiscountAgentCodeServiceImpl.java @@ -33,6 +33,12 @@ public class HighDiscountAgentCodeServiceImpl implements HighDiscountAgentCodeSe @Resource private HighOrderService highOrderService; + @Resource + private HighUserService highUserService; + + @Resource + private HighDiscountUserRelService highDiscountUserRelService; + @Override public void insertCodeList(List discountAgentCodeList) { highDiscountAgentCodeMapper.insertListCode(discountAgentCodeList); @@ -65,6 +71,13 @@ public class HighDiscountAgentCodeServiceImpl implements HighDiscountAgentCodeSe List list = highDiscountAgentCodeMapper.selectByExample(example); for (HighDiscountAgentCode code : list) { HighDiscountAgentRel rel = highDiscountAgentRelService.getRelById(code.getDiscountAgentId()); + + HighDiscountUserRel userRel = highDiscountUserRelService.getRelByDiscount(code.getId()); + + if (userRel != null) { + code.setHighUser(highUserService.findByUserId(userRel.getUserId())); + } + if (rel != null) { code.setHighDiscount(highDiscountService.getDiscountById(rel.getDiscountId())); code.setHighAgent(highAgentService.findByAgentMsgId(rel.getAgentId())); diff --git a/hai-service/src/main/java/com/hai/service/impl/HighDiscountUserRelServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighDiscountUserRelServiceImpl.java index c0deb84a..a0cae8a2 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighDiscountUserRelServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighDiscountUserRelServiceImpl.java @@ -122,6 +122,17 @@ public class HighDiscountUserRelServiceImpl implements HighDiscountUserRelServic return null; } + @Override + public HighDiscountUserRel getRelByDiscount(Long discountId) { + HighDiscountUserRelExample example = new HighDiscountUserRelExample(); + example.createCriteria().andDiscountAgentCodeIdEqualTo(discountId); + List list = highDiscountUserRelMapper.selectByExample(example); + if (list.size() > 0) { + return list.get(0); + } + return null; + } + @Override public HighDiscountUserRel getRelById(Long id) { HighDiscountUserRel rel = highDiscountUserRelMapper.selectByPrimaryKey(id); diff --git a/src/main/java/com/hai/dao/SecSinopecConfigMapper.java b/src/main/java/com/hai/dao/SecSinopecConfigMapper.java new file mode 100644 index 00000000..c5ce981b --- /dev/null +++ b/src/main/java/com/hai/dao/SecSinopecConfigMapper.java @@ -0,0 +1,105 @@ +package com.hai.dao; + +import com.hai.entity.SecSinopecConfig; +import com.hai.entity.SecSinopecConfigExample; +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 SecSinopecConfigMapper extends SecSinopecConfigMapperExt { + @SelectProvider(type=SecSinopecConfigSqlProvider.class, method="countByExample") + long countByExample(SecSinopecConfigExample example); + + @DeleteProvider(type=SecSinopecConfigSqlProvider.class, method="deleteByExample") + int deleteByExample(SecSinopecConfigExample example); + + @Delete({ + "delete from sec_sinopec_config", + "where id = #{id,jdbcType=INTEGER}" + }) + int deleteByPrimaryKey(Integer id); + + @Insert({ + "insert into sec_sinopec_config (`name`, app_secret, ", + "code, create_time, ", + "SignKey, app_id)", + "values (#{name,jdbcType=VARCHAR}, #{appSecret,jdbcType=VARCHAR}, ", + "#{code,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ", + "#{signkey,jdbcType=VARCHAR}, #{appId,jdbcType=VARCHAR})" + }) + @Options(useGeneratedKeys=true,keyProperty="id") + int insert(SecSinopecConfig record); + + @InsertProvider(type=SecSinopecConfigSqlProvider.class, method="insertSelective") + @Options(useGeneratedKeys=true,keyProperty="id") + int insertSelective(SecSinopecConfig record); + + @SelectProvider(type=SecSinopecConfigSqlProvider.class, method="selectByExample") + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true), + @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR), + @Result(column="app_secret", property="appSecret", jdbcType=JdbcType.VARCHAR), + @Result(column="code", property="code", jdbcType=JdbcType.VARCHAR), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="SignKey", property="signkey", jdbcType=JdbcType.VARCHAR), + @Result(column="app_id", property="appId", jdbcType=JdbcType.VARCHAR) + }) + List selectByExample(SecSinopecConfigExample example); + + @Select({ + "select", + "id, `name`, app_secret, code, create_time, SignKey, app_id", + "from sec_sinopec_config", + "where id = #{id,jdbcType=INTEGER}" + }) + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true), + @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR), + @Result(column="app_secret", property="appSecret", jdbcType=JdbcType.VARCHAR), + @Result(column="code", property="code", jdbcType=JdbcType.VARCHAR), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="SignKey", property="signkey", jdbcType=JdbcType.VARCHAR), + @Result(column="app_id", property="appId", jdbcType=JdbcType.VARCHAR) + }) + SecSinopecConfig selectByPrimaryKey(Integer id); + + @UpdateProvider(type=SecSinopecConfigSqlProvider.class, method="updateByExampleSelective") + int updateByExampleSelective(@Param("record") SecSinopecConfig record, @Param("example") SecSinopecConfigExample example); + + @UpdateProvider(type=SecSinopecConfigSqlProvider.class, method="updateByExample") + int updateByExample(@Param("record") SecSinopecConfig record, @Param("example") SecSinopecConfigExample example); + + @UpdateProvider(type=SecSinopecConfigSqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(SecSinopecConfig record); + + @Update({ + "update sec_sinopec_config", + "set `name` = #{name,jdbcType=VARCHAR},", + "app_secret = #{appSecret,jdbcType=VARCHAR},", + "code = #{code,jdbcType=VARCHAR},", + "create_time = #{createTime,jdbcType=TIMESTAMP},", + "SignKey = #{signkey,jdbcType=VARCHAR},", + "app_id = #{appId,jdbcType=VARCHAR}", + "where id = #{id,jdbcType=INTEGER}" + }) + int updateByPrimaryKey(SecSinopecConfig record); +} \ No newline at end of file diff --git a/src/main/java/com/hai/dao/SecSinopecConfigMapperExt.java b/src/main/java/com/hai/dao/SecSinopecConfigMapperExt.java new file mode 100644 index 00000000..65b8cde8 --- /dev/null +++ b/src/main/java/com/hai/dao/SecSinopecConfigMapperExt.java @@ -0,0 +1,7 @@ +package com.hai.dao; + +/** + * mapper扩展类 + */ +public interface SecSinopecConfigMapperExt { +} \ No newline at end of file diff --git a/src/main/java/com/hai/dao/SecSinopecConfigSqlProvider.java b/src/main/java/com/hai/dao/SecSinopecConfigSqlProvider.java new file mode 100644 index 00000000..4b2490b1 --- /dev/null +++ b/src/main/java/com/hai/dao/SecSinopecConfigSqlProvider.java @@ -0,0 +1,262 @@ +package com.hai.dao; + +import com.hai.entity.SecSinopecConfig; +import com.hai.entity.SecSinopecConfigExample.Criteria; +import com.hai.entity.SecSinopecConfigExample.Criterion; +import com.hai.entity.SecSinopecConfigExample; +import java.util.List; +import java.util.Map; +import org.apache.ibatis.jdbc.SQL; + +public class SecSinopecConfigSqlProvider { + + public String countByExample(SecSinopecConfigExample example) { + SQL sql = new SQL(); + sql.SELECT("count(*)").FROM("sec_sinopec_config"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String deleteByExample(SecSinopecConfigExample example) { + SQL sql = new SQL(); + sql.DELETE_FROM("sec_sinopec_config"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String insertSelective(SecSinopecConfig record) { + SQL sql = new SQL(); + sql.INSERT_INTO("sec_sinopec_config"); + + if (record.getName() != null) { + sql.VALUES("`name`", "#{name,jdbcType=VARCHAR}"); + } + + if (record.getAppSecret() != null) { + sql.VALUES("app_secret", "#{appSecret,jdbcType=VARCHAR}"); + } + + if (record.getCode() != null) { + sql.VALUES("code", "#{code,jdbcType=VARCHAR}"); + } + + if (record.getCreateTime() != null) { + sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getSignkey() != null) { + sql.VALUES("SignKey", "#{signkey,jdbcType=VARCHAR}"); + } + + if (record.getAppId() != null) { + sql.VALUES("app_id", "#{appId,jdbcType=VARCHAR}"); + } + + return sql.toString(); + } + + public String selectByExample(SecSinopecConfigExample example) { + SQL sql = new SQL(); + if (example != null && example.isDistinct()) { + sql.SELECT_DISTINCT("id"); + } else { + sql.SELECT("id"); + } + sql.SELECT("`name`"); + sql.SELECT("app_secret"); + sql.SELECT("code"); + sql.SELECT("create_time"); + sql.SELECT("SignKey"); + sql.SELECT("app_id"); + sql.FROM("sec_sinopec_config"); + applyWhere(sql, example, false); + + if (example != null && example.getOrderByClause() != null) { + sql.ORDER_BY(example.getOrderByClause()); + } + + return sql.toString(); + } + + public String updateByExampleSelective(Map parameter) { + SecSinopecConfig record = (SecSinopecConfig) parameter.get("record"); + SecSinopecConfigExample example = (SecSinopecConfigExample) parameter.get("example"); + + SQL sql = new SQL(); + sql.UPDATE("sec_sinopec_config"); + + if (record.getId() != null) { + sql.SET("id = #{record.id,jdbcType=INTEGER}"); + } + + if (record.getName() != null) { + sql.SET("`name` = #{record.name,jdbcType=VARCHAR}"); + } + + if (record.getAppSecret() != null) { + sql.SET("app_secret = #{record.appSecret,jdbcType=VARCHAR}"); + } + + if (record.getCode() != null) { + sql.SET("code = #{record.code,jdbcType=VARCHAR}"); + } + + if (record.getCreateTime() != null) { + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getSignkey() != null) { + sql.SET("SignKey = #{record.signkey,jdbcType=VARCHAR}"); + } + + if (record.getAppId() != null) { + sql.SET("app_id = #{record.appId,jdbcType=VARCHAR}"); + } + + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByExample(Map parameter) { + SQL sql = new SQL(); + sql.UPDATE("sec_sinopec_config"); + + sql.SET("id = #{record.id,jdbcType=INTEGER}"); + sql.SET("`name` = #{record.name,jdbcType=VARCHAR}"); + sql.SET("app_secret = #{record.appSecret,jdbcType=VARCHAR}"); + sql.SET("code = #{record.code,jdbcType=VARCHAR}"); + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + sql.SET("SignKey = #{record.signkey,jdbcType=VARCHAR}"); + sql.SET("app_id = #{record.appId,jdbcType=VARCHAR}"); + + SecSinopecConfigExample example = (SecSinopecConfigExample) parameter.get("example"); + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByPrimaryKeySelective(SecSinopecConfig record) { + SQL sql = new SQL(); + sql.UPDATE("sec_sinopec_config"); + + if (record.getName() != null) { + sql.SET("`name` = #{name,jdbcType=VARCHAR}"); + } + + if (record.getAppSecret() != null) { + sql.SET("app_secret = #{appSecret,jdbcType=VARCHAR}"); + } + + if (record.getCode() != null) { + sql.SET("code = #{code,jdbcType=VARCHAR}"); + } + + if (record.getCreateTime() != null) { + sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getSignkey() != null) { + sql.SET("SignKey = #{signkey,jdbcType=VARCHAR}"); + } + + if (record.getAppId() != null) { + sql.SET("app_id = #{appId,jdbcType=VARCHAR}"); + } + + sql.WHERE("id = #{id,jdbcType=INTEGER}"); + + return sql.toString(); + } + + protected void applyWhere(SQL sql, SecSinopecConfigExample 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 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 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()); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/hai/entity/SecSinopecConfig.java b/src/main/java/com/hai/entity/SecSinopecConfig.java new file mode 100644 index 00000000..927aecd4 --- /dev/null +++ b/src/main/java/com/hai/entity/SecSinopecConfig.java @@ -0,0 +1,161 @@ +package com.hai.entity; + +import java.io.Serializable; +import java.util.Date; + +/** + * sec_sinopec_config + * @author + */ +/** + * + * 代码由工具生成 + * + **/ +public class SecSinopecConfig implements Serializable { + /** + * 主键 + */ + private Integer id; + + /** + * 中石化客户名称 + */ + private String name; + + /** + * 客户密码 + */ + private String appSecret; + + /** + * 客户编码 + */ + private String code; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 签名key + */ + private String signkey; + + /** + * 客户AppId + */ + private String appId; + + private static final long serialVersionUID = 1L; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getAppSecret() { + return appSecret; + } + + public void setAppSecret(String appSecret) { + this.appSecret = appSecret; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public String getSignkey() { + return signkey; + } + + public void setSignkey(String signkey) { + this.signkey = signkey; + } + + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + SecSinopecConfig other = (SecSinopecConfig) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getAppSecret() == null ? other.getAppSecret() == null : this.getAppSecret().equals(other.getAppSecret())) + && (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getSignkey() == null ? other.getSignkey() == null : this.getSignkey().equals(other.getSignkey())) + && (this.getAppId() == null ? other.getAppId() == null : this.getAppId().equals(other.getAppId())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getAppSecret() == null) ? 0 : getAppSecret().hashCode()); + result = prime * result + ((getCode() == null) ? 0 : getCode().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getSignkey() == null) ? 0 : getSignkey().hashCode()); + result = prime * result + ((getAppId() == null) ? 0 : getAppId().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(", name=").append(name); + sb.append(", appSecret=").append(appSecret); + sb.append(", code=").append(code); + sb.append(", createTime=").append(createTime); + sb.append(", signkey=").append(signkey); + sb.append(", appId=").append(appId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/com/hai/entity/SecSinopecConfigExample.java b/src/main/java/com/hai/entity/SecSinopecConfigExample.java new file mode 100644 index 00000000..a866b79c --- /dev/null +++ b/src/main/java/com/hai/entity/SecSinopecConfigExample.java @@ -0,0 +1,693 @@ +package com.hai.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class SecSinopecConfigExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public SecSinopecConfigExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Integer value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Integer value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Integer value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Integer value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Integer value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Integer value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Integer value1, Integer value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Integer value1, Integer value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andAppSecretIsNull() { + addCriterion("app_secret is null"); + return (Criteria) this; + } + + public Criteria andAppSecretIsNotNull() { + addCriterion("app_secret is not null"); + return (Criteria) this; + } + + public Criteria andAppSecretEqualTo(String value) { + addCriterion("app_secret =", value, "appSecret"); + return (Criteria) this; + } + + public Criteria andAppSecretNotEqualTo(String value) { + addCriterion("app_secret <>", value, "appSecret"); + return (Criteria) this; + } + + public Criteria andAppSecretGreaterThan(String value) { + addCriterion("app_secret >", value, "appSecret"); + return (Criteria) this; + } + + public Criteria andAppSecretGreaterThanOrEqualTo(String value) { + addCriterion("app_secret >=", value, "appSecret"); + return (Criteria) this; + } + + public Criteria andAppSecretLessThan(String value) { + addCriterion("app_secret <", value, "appSecret"); + return (Criteria) this; + } + + public Criteria andAppSecretLessThanOrEqualTo(String value) { + addCriterion("app_secret <=", value, "appSecret"); + return (Criteria) this; + } + + public Criteria andAppSecretLike(String value) { + addCriterion("app_secret like", value, "appSecret"); + return (Criteria) this; + } + + public Criteria andAppSecretNotLike(String value) { + addCriterion("app_secret not like", value, "appSecret"); + return (Criteria) this; + } + + public Criteria andAppSecretIn(List values) { + addCriterion("app_secret in", values, "appSecret"); + return (Criteria) this; + } + + public Criteria andAppSecretNotIn(List values) { + addCriterion("app_secret not in", values, "appSecret"); + return (Criteria) this; + } + + public Criteria andAppSecretBetween(String value1, String value2) { + addCriterion("app_secret between", value1, value2, "appSecret"); + return (Criteria) this; + } + + public Criteria andAppSecretNotBetween(String value1, String value2) { + addCriterion("app_secret not between", value1, value2, "appSecret"); + return (Criteria) this; + } + + public Criteria andCodeIsNull() { + addCriterion("code is null"); + return (Criteria) this; + } + + public Criteria andCodeIsNotNull() { + addCriterion("code is not null"); + return (Criteria) this; + } + + public Criteria andCodeEqualTo(String value) { + addCriterion("code =", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotEqualTo(String value) { + addCriterion("code <>", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThan(String value) { + addCriterion("code >", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThanOrEqualTo(String value) { + addCriterion("code >=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThan(String value) { + addCriterion("code <", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThanOrEqualTo(String value) { + addCriterion("code <=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLike(String value) { + addCriterion("code like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotLike(String value) { + addCriterion("code not like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeIn(List values) { + addCriterion("code in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotIn(List values) { + addCriterion("code not in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeBetween(String value1, String value2) { + addCriterion("code between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotBetween(String value1, String value2) { + addCriterion("code not between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Date value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Date value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Date value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Date value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Date value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Date value1, Date value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Date value1, Date value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andSignkeyIsNull() { + addCriterion("SignKey is null"); + return (Criteria) this; + } + + public Criteria andSignkeyIsNotNull() { + addCriterion("SignKey is not null"); + return (Criteria) this; + } + + public Criteria andSignkeyEqualTo(String value) { + addCriterion("SignKey =", value, "signkey"); + return (Criteria) this; + } + + public Criteria andSignkeyNotEqualTo(String value) { + addCriterion("SignKey <>", value, "signkey"); + return (Criteria) this; + } + + public Criteria andSignkeyGreaterThan(String value) { + addCriterion("SignKey >", value, "signkey"); + return (Criteria) this; + } + + public Criteria andSignkeyGreaterThanOrEqualTo(String value) { + addCriterion("SignKey >=", value, "signkey"); + return (Criteria) this; + } + + public Criteria andSignkeyLessThan(String value) { + addCriterion("SignKey <", value, "signkey"); + return (Criteria) this; + } + + public Criteria andSignkeyLessThanOrEqualTo(String value) { + addCriterion("SignKey <=", value, "signkey"); + return (Criteria) this; + } + + public Criteria andSignkeyLike(String value) { + addCriterion("SignKey like", value, "signkey"); + return (Criteria) this; + } + + public Criteria andSignkeyNotLike(String value) { + addCriterion("SignKey not like", value, "signkey"); + return (Criteria) this; + } + + public Criteria andSignkeyIn(List values) { + addCriterion("SignKey in", values, "signkey"); + return (Criteria) this; + } + + public Criteria andSignkeyNotIn(List values) { + addCriterion("SignKey not in", values, "signkey"); + return (Criteria) this; + } + + public Criteria andSignkeyBetween(String value1, String value2) { + addCriterion("SignKey between", value1, value2, "signkey"); + return (Criteria) this; + } + + public Criteria andSignkeyNotBetween(String value1, String value2) { + addCriterion("SignKey not between", value1, value2, "signkey"); + return (Criteria) this; + } + + public Criteria andAppIdIsNull() { + addCriterion("app_id is null"); + return (Criteria) this; + } + + public Criteria andAppIdIsNotNull() { + addCriterion("app_id is not null"); + return (Criteria) this; + } + + public Criteria andAppIdEqualTo(String value) { + addCriterion("app_id =", value, "appId"); + return (Criteria) this; + } + + public Criteria andAppIdNotEqualTo(String value) { + addCriterion("app_id <>", value, "appId"); + return (Criteria) this; + } + + public Criteria andAppIdGreaterThan(String value) { + addCriterion("app_id >", value, "appId"); + return (Criteria) this; + } + + public Criteria andAppIdGreaterThanOrEqualTo(String value) { + addCriterion("app_id >=", value, "appId"); + return (Criteria) this; + } + + public Criteria andAppIdLessThan(String value) { + addCriterion("app_id <", value, "appId"); + return (Criteria) this; + } + + public Criteria andAppIdLessThanOrEqualTo(String value) { + addCriterion("app_id <=", value, "appId"); + return (Criteria) this; + } + + public Criteria andAppIdLike(String value) { + addCriterion("app_id like", value, "appId"); + return (Criteria) this; + } + + public Criteria andAppIdNotLike(String value) { + addCriterion("app_id not like", value, "appId"); + return (Criteria) this; + } + + public Criteria andAppIdIn(List values) { + addCriterion("app_id in", values, "appId"); + return (Criteria) this; + } + + public Criteria andAppIdNotIn(List values) { + addCriterion("app_id not in", values, "appId"); + return (Criteria) this; + } + + public Criteria andAppIdBetween(String value1, String value2) { + addCriterion("app_id between", value1, value2, "appId"); + return (Criteria) this; + } + + public Criteria andAppIdNotBetween(String value1, String value2) { + addCriterion("app_id not between", value1, value2, "appId"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file