提交代码

yy_dev
胡锐 2 years ago
parent c68b5da74a
commit 92a6eaa4ee
  1. 1
      cweb/src/main/java/com/cweb/config/AuthConfig.java
  2. 56
      cweb/src/main/java/com/cweb/controller/SecVersionController.java
  3. 7
      cweb/src/main/java/com/cweb/controller/TestController.java
  4. 54
      service/src/main/java/com/hfkj/channel/lakala/LaKaLaTradeService.java
  5. 113
      service/src/main/java/com/hfkj/dao/SecVersionMapper.java
  6. 7
      service/src/main/java/com/hfkj/dao/SecVersionMapperExt.java
  7. 290
      service/src/main/java/com/hfkj/dao/SecVersionSqlProvider.java
  8. 180
      service/src/main/java/com/hfkj/entity/SecVersion.java
  9. 832
      service/src/main/java/com/hfkj/entity/SecVersionExample.java
  10. 15
      service/src/main/java/com/hfkj/service/SecVersionService.java
  11. 40
      service/src/main/java/com/hfkj/service/impl/SecVersionServiceImpl.java

@ -105,6 +105,7 @@ public class AuthConfig implements WebMvcConfigurer {
.excludePathPatterns("/deviceOrderPay/orderNotify")
.excludePathPatterns("/storeDiscountActivityPartakeUser/*")
.excludePathPatterns("/wechat/*")
.excludePathPatterns("/sysVersion/*")
.excludePathPatterns("/cmsContent/*")
.excludePathPatterns("/merWithdrawal/notify")
.excludePathPatterns("/common/*")

@ -0,0 +1,56 @@
package com.cweb.controller;
import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hfkj.common.exception.ErrorCode;
import com.hfkj.common.exception.ErrorHelp;
import com.hfkj.common.exception.SysCode;
import com.hfkj.common.security.UserCenter;
import com.hfkj.common.utils.ResponseMsgUtil;
import com.hfkj.entity.BsAudit;
import com.hfkj.model.ResponseData;
import com.hfkj.model.UserInfoModel;
import com.hfkj.service.BsAuditService;
import com.hfkj.service.SecVersionService;
import com.hfkj.sysenum.AuditStatusEnum;
import com.hfkj.sysenum.SecUserTypeEnum;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;
@Controller
@Api(value = "系统版本")
@RequestMapping(value = "/sysVersion")
public class SecVersionController {
private static Logger log = LoggerFactory.getLogger(SecVersionController.class);
@Resource
private SecVersionService secVersionService;
@RequestMapping(value="/queryVersion",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询版本")
public ResponseData queryVersion(@RequestParam(name = "termType", required = true) String termType) {
try {
return ResponseMsgUtil.success(secVersionService.getVersion(termType));
} catch (Exception e) {
log.error(e.getMessage(), e);
return ResponseMsgUtil.exception(e);
}
}
}

@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.hfkj.channel.alipay.utils.AlipayRequest;
import com.hfkj.channel.lakala.LaKaLaLedgerService;
import com.hfkj.channel.lakala.LaKaLaTradeService;
import com.hfkj.channel.lakala.LaKaLaWalletService;
import com.hfkj.channel.lakala.config.LaKaLaConfig;
import com.hfkj.channel.saas.SaasActivityService;
@ -95,6 +96,9 @@ public class TestController {
@Resource
private LaKaLaWalletService laKaLaWalletService;
@Resource
private LaKaLaTradeService laKaLaTradeService;
@Resource
private BsStoreCidService bsStoreCidService;
@ -255,7 +259,8 @@ public class TestController {
/* return ResponseMsgUtil.success(saasMerService.reconsiderSubmit("123364703"));*/
//return ResponseMsgUtil.success(saasMerService.merchantInfo("123364703"));
// return ResponseMsgUtil.success(saasCommon.getCategory(null));
return ResponseMsgUtil.success(laKaLaLedgerService.queryLedgerMer(code));
// return ResponseMsgUtil.success(laKaLaLedgerService.queryLedgerMer(code));
return ResponseMsgUtil.success(laKaLaTradeService.queryTrans(code));
// return ResponseMsgUtil.success("");
// 1200
// return ResponseMsgUtil.success(saasCommon.fileUpload(new HashMap<>()));

@ -282,6 +282,60 @@ public class LaKaLaTradeService {
}
/**
* 商户计费查询
* @param tradeNo 订单号
*/
public Map<String, Object> queryTrans(String tradeNo) {
log.info("========= Start 商户计费查询 Start ===========");
// 查询交易订单
BsTradeOrder order = tradeOrderService.getOrderByOutTradeNo(tradeNo);
if (order == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到交易订单");
}
// 查询商户号
BsMerPlatformNo platformNo = merPlatformNoService.getPlatformNo(order.getMerId(), PlatformTypeEnum.type1);
if (platformNo == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到商户号");
}
// 查询终端号
BsMerPlatformTerm merPlatformTerm = merPlatformTermService.getMerPlatformTerm(platformNo.getId(), "WECHAT_PAY");
if (merPlatformTerm == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到商户终端号");
}
Map<String, Object> commonParam = new HashMap<>();
commonParam.put("req_time", DateUtil.format(new Date(), "yyyyMMddHHmmss"));
commonParam.put("version", "3.0");
commonParam.put("out_org_code", CommonSysConst.getSysConfig().getLkl_v3_appid());
Map<String, Object> map = new HashMap<>();
map.put("merchant_no", platformNo.getCupNo());
map.put("term_no", merPlatformTerm.getTermNo());
map.put("log_no", order.getPlatformLogNo());
commonParam.put("req_data", map);
Map<String, Object> reqParam = LaKaLaConfig.generateSignParamsV3(JSONObject.parseObject(JSONObject.toJSONString(commonParam)));
// 头部参数
Map<String, Object> heard = new HashMap<>();
heard.put("Authorization", reqParam.get("Authorization"));
// 请求记录
// 请求拉卡拉接口
JSONObject responseBody = HttpsUtils.doPost(CommonSysConst.getSysConfig().getLkl_request_url() + "/api/v3/lams/merchant/query_trans", commonParam, heard);
log.info("请求参数:"+ JSONObject.toJSONString(commonParam));
log.info("响应参数:"+ JSONObject.toJSONString(responseBody));
System.out.println("请求参数:"+ JSONObject.toJSONString(commonParam));
System.out.println("响应参数:"+ JSONObject.toJSONString(responseBody));
if (!responseBody.getString("code").equals("000000")) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, responseBody.getString("msg"));
};
log.info("========= END 商户计费查询 END ===========");
return responseBody.getJSONObject("resp_data");
}
/**
* 退款
* @param refundNo 订单号

@ -0,0 +1,113 @@
package com.hfkj.dao;
import com.hfkj.entity.SecVersion;
import com.hfkj.entity.SecVersionExample;
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 SecVersionMapper extends SecVersionMapperExt {
@SelectProvider(type=SecVersionSqlProvider.class, method="countByExample")
long countByExample(SecVersionExample example);
@DeleteProvider(type=SecVersionSqlProvider.class, method="deleteByExample")
int deleteByExample(SecVersionExample example);
@Delete({
"delete from sec_version",
"where id = #{id,jdbcType=INTEGER}"
})
int deleteByPrimaryKey(Integer id);
@Insert({
"insert into sec_version (term_type, version_type, ",
"version, content, ",
"file_url, ext_1, ext_2, ",
"ext_3)",
"values (#{termType,jdbcType=VARCHAR}, #{versionType,jdbcType=INTEGER}, ",
"#{version,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR}, ",
"#{fileUrl,jdbcType=VARCHAR}, #{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, ",
"#{ext3,jdbcType=VARCHAR})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(SecVersion record);
@InsertProvider(type=SecVersionSqlProvider.class, method="insertSelective")
@Options(useGeneratedKeys=true,keyProperty="id")
int insertSelective(SecVersion record);
@SelectProvider(type=SecVersionSqlProvider.class, method="selectByExample")
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
@Result(column="term_type", property="termType", jdbcType=JdbcType.VARCHAR),
@Result(column="version_type", property="versionType", jdbcType=JdbcType.INTEGER),
@Result(column="version", property="version", jdbcType=JdbcType.VARCHAR),
@Result(column="content", property="content", jdbcType=JdbcType.VARCHAR),
@Result(column="file_url", property="fileUrl", 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<SecVersion> selectByExample(SecVersionExample example);
@Select({
"select",
"id, term_type, version_type, version, content, file_url, ext_1, ext_2, ext_3",
"from sec_version",
"where id = #{id,jdbcType=INTEGER}"
})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
@Result(column="term_type", property="termType", jdbcType=JdbcType.VARCHAR),
@Result(column="version_type", property="versionType", jdbcType=JdbcType.INTEGER),
@Result(column="version", property="version", jdbcType=JdbcType.VARCHAR),
@Result(column="content", property="content", jdbcType=JdbcType.VARCHAR),
@Result(column="file_url", property="fileUrl", 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)
})
SecVersion selectByPrimaryKey(Integer id);
@UpdateProvider(type=SecVersionSqlProvider.class, method="updateByExampleSelective")
int updateByExampleSelective(@Param("record") SecVersion record, @Param("example") SecVersionExample example);
@UpdateProvider(type=SecVersionSqlProvider.class, method="updateByExample")
int updateByExample(@Param("record") SecVersion record, @Param("example") SecVersionExample example);
@UpdateProvider(type=SecVersionSqlProvider.class, method="updateByPrimaryKeySelective")
int updateByPrimaryKeySelective(SecVersion record);
@Update({
"update sec_version",
"set term_type = #{termType,jdbcType=VARCHAR},",
"version_type = #{versionType,jdbcType=INTEGER},",
"version = #{version,jdbcType=VARCHAR},",
"content = #{content,jdbcType=VARCHAR},",
"file_url = #{fileUrl,jdbcType=VARCHAR},",
"ext_1 = #{ext1,jdbcType=VARCHAR},",
"ext_2 = #{ext2,jdbcType=VARCHAR},",
"ext_3 = #{ext3,jdbcType=VARCHAR}",
"where id = #{id,jdbcType=INTEGER}"
})
int updateByPrimaryKey(SecVersion record);
}

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

@ -0,0 +1,290 @@
package com.hfkj.dao;
import com.hfkj.entity.SecVersion;
import com.hfkj.entity.SecVersionExample.Criteria;
import com.hfkj.entity.SecVersionExample.Criterion;
import com.hfkj.entity.SecVersionExample;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.jdbc.SQL;
public class SecVersionSqlProvider {
public String countByExample(SecVersionExample example) {
SQL sql = new SQL();
sql.SELECT("count(*)").FROM("sec_version");
applyWhere(sql, example, false);
return sql.toString();
}
public String deleteByExample(SecVersionExample example) {
SQL sql = new SQL();
sql.DELETE_FROM("sec_version");
applyWhere(sql, example, false);
return sql.toString();
}
public String insertSelective(SecVersion record) {
SQL sql = new SQL();
sql.INSERT_INTO("sec_version");
if (record.getTermType() != null) {
sql.VALUES("term_type", "#{termType,jdbcType=VARCHAR}");
}
if (record.getVersionType() != null) {
sql.VALUES("version_type", "#{versionType,jdbcType=INTEGER}");
}
if (record.getVersion() != null) {
sql.VALUES("version", "#{version,jdbcType=VARCHAR}");
}
if (record.getContent() != null) {
sql.VALUES("content", "#{content,jdbcType=VARCHAR}");
}
if (record.getFileUrl() != null) {
sql.VALUES("file_url", "#{fileUrl,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(SecVersionExample example) {
SQL sql = new SQL();
if (example != null && example.isDistinct()) {
sql.SELECT_DISTINCT("id");
} else {
sql.SELECT("id");
}
sql.SELECT("term_type");
sql.SELECT("version_type");
sql.SELECT("version");
sql.SELECT("content");
sql.SELECT("file_url");
sql.SELECT("ext_1");
sql.SELECT("ext_2");
sql.SELECT("ext_3");
sql.FROM("sec_version");
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) {
SecVersion record = (SecVersion) parameter.get("record");
SecVersionExample example = (SecVersionExample) parameter.get("example");
SQL sql = new SQL();
sql.UPDATE("sec_version");
if (record.getId() != null) {
sql.SET("id = #{record.id,jdbcType=INTEGER}");
}
if (record.getTermType() != null) {
sql.SET("term_type = #{record.termType,jdbcType=VARCHAR}");
}
if (record.getVersionType() != null) {
sql.SET("version_type = #{record.versionType,jdbcType=INTEGER}");
}
if (record.getVersion() != null) {
sql.SET("version = #{record.version,jdbcType=VARCHAR}");
}
if (record.getContent() != null) {
sql.SET("content = #{record.content,jdbcType=VARCHAR}");
}
if (record.getFileUrl() != null) {
sql.SET("file_url = #{record.fileUrl,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("sec_version");
sql.SET("id = #{record.id,jdbcType=INTEGER}");
sql.SET("term_type = #{record.termType,jdbcType=VARCHAR}");
sql.SET("version_type = #{record.versionType,jdbcType=INTEGER}");
sql.SET("version = #{record.version,jdbcType=VARCHAR}");
sql.SET("content = #{record.content,jdbcType=VARCHAR}");
sql.SET("file_url = #{record.fileUrl,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}");
SecVersionExample example = (SecVersionExample) parameter.get("example");
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByPrimaryKeySelective(SecVersion record) {
SQL sql = new SQL();
sql.UPDATE("sec_version");
if (record.getTermType() != null) {
sql.SET("term_type = #{termType,jdbcType=VARCHAR}");
}
if (record.getVersionType() != null) {
sql.SET("version_type = #{versionType,jdbcType=INTEGER}");
}
if (record.getVersion() != null) {
sql.SET("version = #{version,jdbcType=VARCHAR}");
}
if (record.getContent() != null) {
sql.SET("content = #{content,jdbcType=VARCHAR}");
}
if (record.getFileUrl() != null) {
sql.SET("file_url = #{fileUrl,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=INTEGER}");
return sql.toString();
}
protected void applyWhere(SQL sql, SecVersionExample 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,180 @@
package com.hfkj.entity;
import java.io.Serializable;
/**
* sec_version
* @author
*/
/**
*
* 代码由工具生成
*
**/
public class SecVersion implements Serializable {
private Integer id;
/**
* 终端标识 APP
*/
private String termType;
/**
* 版本类型 1小版本 2大版本
*/
private Integer versionType;
/**
* 版本号
*/
private String version;
/**
* 版本内容
*/
private String content;
/**
* 文件路径
*/
private String fileUrl;
private String ext1;
private String ext2;
private String ext3;
private static final long serialVersionUID = 1L;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getTermType() {
return termType;
}
public void setTermType(String termType) {
this.termType = termType;
}
public Integer getVersionType() {
return versionType;
}
public void setVersionType(Integer versionType) {
this.versionType = versionType;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public String getFileUrl() {
return fileUrl;
}
public void setFileUrl(String fileUrl) {
this.fileUrl = fileUrl;
}
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;
}
SecVersion other = (SecVersion) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getTermType() == null ? other.getTermType() == null : this.getTermType().equals(other.getTermType()))
&& (this.getVersionType() == null ? other.getVersionType() == null : this.getVersionType().equals(other.getVersionType()))
&& (this.getVersion() == null ? other.getVersion() == null : this.getVersion().equals(other.getVersion()))
&& (this.getContent() == null ? other.getContent() == null : this.getContent().equals(other.getContent()))
&& (this.getFileUrl() == null ? other.getFileUrl() == null : this.getFileUrl().equals(other.getFileUrl()))
&& (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 + ((getTermType() == null) ? 0 : getTermType().hashCode());
result = prime * result + ((getVersionType() == null) ? 0 : getVersionType().hashCode());
result = prime * result + ((getVersion() == null) ? 0 : getVersion().hashCode());
result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode());
result = prime * result + ((getFileUrl() == null) ? 0 : getFileUrl().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(", termType=").append(termType);
sb.append(", versionType=").append(versionType);
sb.append(", version=").append(version);
sb.append(", content=").append(content);
sb.append(", fileUrl=").append(fileUrl);
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();
}
}

@ -0,0 +1,832 @@
package com.hfkj.entity;
import java.util.ArrayList;
import java.util.List;
public class SecVersionExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
private Integer limit;
private Long offset;
public SecVersionExample() {
oredCriteria = new ArrayList<Criteria>();
}
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<Criteria> 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<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> 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<Integer> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Integer> 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 andTermTypeIsNull() {
addCriterion("term_type is null");
return (Criteria) this;
}
public Criteria andTermTypeIsNotNull() {
addCriterion("term_type is not null");
return (Criteria) this;
}
public Criteria andTermTypeEqualTo(String value) {
addCriterion("term_type =", value, "termType");
return (Criteria) this;
}
public Criteria andTermTypeNotEqualTo(String value) {
addCriterion("term_type <>", value, "termType");
return (Criteria) this;
}
public Criteria andTermTypeGreaterThan(String value) {
addCriterion("term_type >", value, "termType");
return (Criteria) this;
}
public Criteria andTermTypeGreaterThanOrEqualTo(String value) {
addCriterion("term_type >=", value, "termType");
return (Criteria) this;
}
public Criteria andTermTypeLessThan(String value) {
addCriterion("term_type <", value, "termType");
return (Criteria) this;
}
public Criteria andTermTypeLessThanOrEqualTo(String value) {
addCriterion("term_type <=", value, "termType");
return (Criteria) this;
}
public Criteria andTermTypeLike(String value) {
addCriterion("term_type like", value, "termType");
return (Criteria) this;
}
public Criteria andTermTypeNotLike(String value) {
addCriterion("term_type not like", value, "termType");
return (Criteria) this;
}
public Criteria andTermTypeIn(List<String> values) {
addCriterion("term_type in", values, "termType");
return (Criteria) this;
}
public Criteria andTermTypeNotIn(List<String> values) {
addCriterion("term_type not in", values, "termType");
return (Criteria) this;
}
public Criteria andTermTypeBetween(String value1, String value2) {
addCriterion("term_type between", value1, value2, "termType");
return (Criteria) this;
}
public Criteria andTermTypeNotBetween(String value1, String value2) {
addCriterion("term_type not between", value1, value2, "termType");
return (Criteria) this;
}
public Criteria andVersionTypeIsNull() {
addCriterion("version_type is null");
return (Criteria) this;
}
public Criteria andVersionTypeIsNotNull() {
addCriterion("version_type is not null");
return (Criteria) this;
}
public Criteria andVersionTypeEqualTo(Integer value) {
addCriterion("version_type =", value, "versionType");
return (Criteria) this;
}
public Criteria andVersionTypeNotEqualTo(Integer value) {
addCriterion("version_type <>", value, "versionType");
return (Criteria) this;
}
public Criteria andVersionTypeGreaterThan(Integer value) {
addCriterion("version_type >", value, "versionType");
return (Criteria) this;
}
public Criteria andVersionTypeGreaterThanOrEqualTo(Integer value) {
addCriterion("version_type >=", value, "versionType");
return (Criteria) this;
}
public Criteria andVersionTypeLessThan(Integer value) {
addCriterion("version_type <", value, "versionType");
return (Criteria) this;
}
public Criteria andVersionTypeLessThanOrEqualTo(Integer value) {
addCriterion("version_type <=", value, "versionType");
return (Criteria) this;
}
public Criteria andVersionTypeIn(List<Integer> values) {
addCriterion("version_type in", values, "versionType");
return (Criteria) this;
}
public Criteria andVersionTypeNotIn(List<Integer> values) {
addCriterion("version_type not in", values, "versionType");
return (Criteria) this;
}
public Criteria andVersionTypeBetween(Integer value1, Integer value2) {
addCriterion("version_type between", value1, value2, "versionType");
return (Criteria) this;
}
public Criteria andVersionTypeNotBetween(Integer value1, Integer value2) {
addCriterion("version_type not between", value1, value2, "versionType");
return (Criteria) this;
}
public Criteria andVersionIsNull() {
addCriterion("version is null");
return (Criteria) this;
}
public Criteria andVersionIsNotNull() {
addCriterion("version is not null");
return (Criteria) this;
}
public Criteria andVersionEqualTo(String value) {
addCriterion("version =", value, "version");
return (Criteria) this;
}
public Criteria andVersionNotEqualTo(String value) {
addCriterion("version <>", value, "version");
return (Criteria) this;
}
public Criteria andVersionGreaterThan(String value) {
addCriterion("version >", value, "version");
return (Criteria) this;
}
public Criteria andVersionGreaterThanOrEqualTo(String value) {
addCriterion("version >=", value, "version");
return (Criteria) this;
}
public Criteria andVersionLessThan(String value) {
addCriterion("version <", value, "version");
return (Criteria) this;
}
public Criteria andVersionLessThanOrEqualTo(String value) {
addCriterion("version <=", value, "version");
return (Criteria) this;
}
public Criteria andVersionLike(String value) {
addCriterion("version like", value, "version");
return (Criteria) this;
}
public Criteria andVersionNotLike(String value) {
addCriterion("version not like", value, "version");
return (Criteria) this;
}
public Criteria andVersionIn(List<String> values) {
addCriterion("version in", values, "version");
return (Criteria) this;
}
public Criteria andVersionNotIn(List<String> values) {
addCriterion("version not in", values, "version");
return (Criteria) this;
}
public Criteria andVersionBetween(String value1, String value2) {
addCriterion("version between", value1, value2, "version");
return (Criteria) this;
}
public Criteria andVersionNotBetween(String value1, String value2) {
addCriterion("version not between", value1, value2, "version");
return (Criteria) this;
}
public Criteria andContentIsNull() {
addCriterion("content is null");
return (Criteria) this;
}
public Criteria andContentIsNotNull() {
addCriterion("content is not null");
return (Criteria) this;
}
public Criteria andContentEqualTo(String value) {
addCriterion("content =", value, "content");
return (Criteria) this;
}
public Criteria andContentNotEqualTo(String value) {
addCriterion("content <>", value, "content");
return (Criteria) this;
}
public Criteria andContentGreaterThan(String value) {
addCriterion("content >", value, "content");
return (Criteria) this;
}
public Criteria andContentGreaterThanOrEqualTo(String value) {
addCriterion("content >=", value, "content");
return (Criteria) this;
}
public Criteria andContentLessThan(String value) {
addCriterion("content <", value, "content");
return (Criteria) this;
}
public Criteria andContentLessThanOrEqualTo(String value) {
addCriterion("content <=", value, "content");
return (Criteria) this;
}
public Criteria andContentLike(String value) {
addCriterion("content like", value, "content");
return (Criteria) this;
}
public Criteria andContentNotLike(String value) {
addCriterion("content not like", value, "content");
return (Criteria) this;
}
public Criteria andContentIn(List<String> values) {
addCriterion("content in", values, "content");
return (Criteria) this;
}
public Criteria andContentNotIn(List<String> values) {
addCriterion("content not in", values, "content");
return (Criteria) this;
}
public Criteria andContentBetween(String value1, String value2) {
addCriterion("content between", value1, value2, "content");
return (Criteria) this;
}
public Criteria andContentNotBetween(String value1, String value2) {
addCriterion("content not between", value1, value2, "content");
return (Criteria) this;
}
public Criteria andFileUrlIsNull() {
addCriterion("file_url is null");
return (Criteria) this;
}
public Criteria andFileUrlIsNotNull() {
addCriterion("file_url is not null");
return (Criteria) this;
}
public Criteria andFileUrlEqualTo(String value) {
addCriterion("file_url =", value, "fileUrl");
return (Criteria) this;
}
public Criteria andFileUrlNotEqualTo(String value) {
addCriterion("file_url <>", value, "fileUrl");
return (Criteria) this;
}
public Criteria andFileUrlGreaterThan(String value) {
addCriterion("file_url >", value, "fileUrl");
return (Criteria) this;
}
public Criteria andFileUrlGreaterThanOrEqualTo(String value) {
addCriterion("file_url >=", value, "fileUrl");
return (Criteria) this;
}
public Criteria andFileUrlLessThan(String value) {
addCriterion("file_url <", value, "fileUrl");
return (Criteria) this;
}
public Criteria andFileUrlLessThanOrEqualTo(String value) {
addCriterion("file_url <=", value, "fileUrl");
return (Criteria) this;
}
public Criteria andFileUrlLike(String value) {
addCriterion("file_url like", value, "fileUrl");
return (Criteria) this;
}
public Criteria andFileUrlNotLike(String value) {
addCriterion("file_url not like", value, "fileUrl");
return (Criteria) this;
}
public Criteria andFileUrlIn(List<String> values) {
addCriterion("file_url in", values, "fileUrl");
return (Criteria) this;
}
public Criteria andFileUrlNotIn(List<String> values) {
addCriterion("file_url not in", values, "fileUrl");
return (Criteria) this;
}
public Criteria andFileUrlBetween(String value1, String value2) {
addCriterion("file_url between", value1, value2, "fileUrl");
return (Criteria) this;
}
public Criteria andFileUrlNotBetween(String value1, String value2) {
addCriterion("file_url not between", value1, value2, "fileUrl");
return (Criteria) this;
}
public Criteria andExt1IsNull() {
addCriterion("ext_1 is null");
return (Criteria) this;
}
public Criteria andExt1IsNotNull() {
addCriterion("ext_1 is not null");
return (Criteria) this;
}
public Criteria andExt1EqualTo(String value) {
addCriterion("ext_1 =", value, "ext1");
return (Criteria) this;
}
public Criteria andExt1NotEqualTo(String value) {
addCriterion("ext_1 <>", value, "ext1");
return (Criteria) this;
}
public Criteria andExt1GreaterThan(String value) {
addCriterion("ext_1 >", value, "ext1");
return (Criteria) this;
}
public Criteria andExt1GreaterThanOrEqualTo(String value) {
addCriterion("ext_1 >=", value, "ext1");
return (Criteria) this;
}
public Criteria andExt1LessThan(String value) {
addCriterion("ext_1 <", value, "ext1");
return (Criteria) this;
}
public Criteria andExt1LessThanOrEqualTo(String value) {
addCriterion("ext_1 <=", value, "ext1");
return (Criteria) this;
}
public Criteria andExt1Like(String value) {
addCriterion("ext_1 like", value, "ext1");
return (Criteria) this;
}
public Criteria andExt1NotLike(String value) {
addCriterion("ext_1 not like", value, "ext1");
return (Criteria) this;
}
public Criteria andExt1In(List<String> values) {
addCriterion("ext_1 in", values, "ext1");
return (Criteria) this;
}
public Criteria andExt1NotIn(List<String> values) {
addCriterion("ext_1 not in", values, "ext1");
return (Criteria) this;
}
public Criteria andExt1Between(String value1, String value2) {
addCriterion("ext_1 between", value1, value2, "ext1");
return (Criteria) this;
}
public Criteria andExt1NotBetween(String value1, String value2) {
addCriterion("ext_1 not between", value1, value2, "ext1");
return (Criteria) this;
}
public Criteria andExt2IsNull() {
addCriterion("ext_2 is null");
return (Criteria) this;
}
public Criteria andExt2IsNotNull() {
addCriterion("ext_2 is not null");
return (Criteria) this;
}
public Criteria andExt2EqualTo(String value) {
addCriterion("ext_2 =", value, "ext2");
return (Criteria) this;
}
public Criteria andExt2NotEqualTo(String value) {
addCriterion("ext_2 <>", value, "ext2");
return (Criteria) this;
}
public Criteria andExt2GreaterThan(String value) {
addCriterion("ext_2 >", value, "ext2");
return (Criteria) this;
}
public Criteria andExt2GreaterThanOrEqualTo(String value) {
addCriterion("ext_2 >=", value, "ext2");
return (Criteria) this;
}
public Criteria andExt2LessThan(String value) {
addCriterion("ext_2 <", value, "ext2");
return (Criteria) this;
}
public Criteria andExt2LessThanOrEqualTo(String value) {
addCriterion("ext_2 <=", value, "ext2");
return (Criteria) this;
}
public Criteria andExt2Like(String value) {
addCriterion("ext_2 like", value, "ext2");
return (Criteria) this;
}
public Criteria andExt2NotLike(String value) {
addCriterion("ext_2 not like", value, "ext2");
return (Criteria) this;
}
public Criteria andExt2In(List<String> values) {
addCriterion("ext_2 in", values, "ext2");
return (Criteria) this;
}
public Criteria andExt2NotIn(List<String> values) {
addCriterion("ext_2 not in", values, "ext2");
return (Criteria) this;
}
public Criteria andExt2Between(String value1, String value2) {
addCriterion("ext_2 between", value1, value2, "ext2");
return (Criteria) this;
}
public Criteria andExt2NotBetween(String value1, String value2) {
addCriterion("ext_2 not between", value1, value2, "ext2");
return (Criteria) this;
}
public Criteria andExt3IsNull() {
addCriterion("ext_3 is null");
return (Criteria) this;
}
public Criteria andExt3IsNotNull() {
addCriterion("ext_3 is not null");
return (Criteria) this;
}
public Criteria andExt3EqualTo(String value) {
addCriterion("ext_3 =", value, "ext3");
return (Criteria) this;
}
public Criteria andExt3NotEqualTo(String value) {
addCriterion("ext_3 <>", value, "ext3");
return (Criteria) this;
}
public Criteria andExt3GreaterThan(String value) {
addCriterion("ext_3 >", value, "ext3");
return (Criteria) this;
}
public Criteria andExt3GreaterThanOrEqualTo(String value) {
addCriterion("ext_3 >=", value, "ext3");
return (Criteria) this;
}
public Criteria andExt3LessThan(String value) {
addCriterion("ext_3 <", value, "ext3");
return (Criteria) this;
}
public Criteria andExt3LessThanOrEqualTo(String value) {
addCriterion("ext_3 <=", value, "ext3");
return (Criteria) this;
}
public Criteria andExt3Like(String value) {
addCriterion("ext_3 like", value, "ext3");
return (Criteria) this;
}
public Criteria andExt3NotLike(String value) {
addCriterion("ext_3 not like", value, "ext3");
return (Criteria) this;
}
public Criteria andExt3In(List<String> values) {
addCriterion("ext_3 in", values, "ext3");
return (Criteria) this;
}
public Criteria andExt3NotIn(List<String> values) {
addCriterion("ext_3 not in", values, "ext3");
return (Criteria) this;
}
public Criteria andExt3Between(String value1, String value2) {
addCriterion("ext_3 between", value1, value2, "ext3");
return (Criteria) this;
}
public Criteria andExt3NotBetween(String value1, String value2) {
addCriterion("ext_3 not between", value1, value2, "ext3");
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);
}
}
}

@ -0,0 +1,15 @@
package com.hfkj.service;
import com.hfkj.entity.SecVersion;
/**
* @className: SecVersionService
* @author: HuRui
* @date: 2023/6/21
**/
public interface SecVersionService {
void editData(SecVersion version);
SecVersion getVersion(String termType);
}

@ -0,0 +1,40 @@
package com.hfkj.service.impl;
import com.alicp.jetcache.anno.CacheType;
import com.alicp.jetcache.anno.Cached;
import com.hfkj.dao.SecVersionMapper;
import com.hfkj.entity.SecVersion;
import com.hfkj.entity.SecVersionExample;
import com.hfkj.service.SecVersionService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
/**
* @className: SecVersionServiceImpl
* @author: HuRui
* @date: 2023/6/21
**/
@Service("secVersionService")
public class SecVersionServiceImpl implements SecVersionService {
@Resource
private SecVersionMapper secVersionMapper;
@Override
public void editData(SecVersion version) {
}
@Override
@Cached(cacheType = CacheType.REMOTE, name="SYSTEM_VERSION:", key = "#termType")
public SecVersion getVersion(String termType) {
SecVersionExample example = new SecVersionExample();
example.createCriteria().andTermTypeEqualTo(termType);
List<SecVersion> list = secVersionMapper.selectByExample(example);
if (list.size() > 0) {
return list.get(0);
}
return null;
}
}
Loading…
Cancel
Save