Commit 91953e8a authored by “yiyousong”'s avatar “yiyousong”
parents af3837ce 96c11ed9
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<a-form-item label="联系电话:">{{ formState.phone || '--' }}</a-form-item> <a-form-item label="联系电话:">{{ formState.phone || '--' }}</a-form-item>
<a-form-item label="身份证号:">{{ formState.idcard_IDCardNo || '--' }}</a-form-item> <a-form-item label="身份证号:">{{ formState.idcard_IDCardNo || '--' }}</a-form-item>
<a-form-item label="注册时间:">{{ formState.update_time || '--' }}</a-form-item> <a-form-item label="注册时间:">{{ formState.update_time || '--' }}</a-form-item>
<a-form-item label="注册来源:">{{ regType[formState.register_type] || '--' }}</a-form-item> <a-form-item label="注册来源:">{{ regType[formState.register_type] || '现场注册' }}</a-form-item>
<a-form-item label="户籍地址:">{{ formState.idcard_Address || '--' }}</a-form-item> <a-form-item label="户籍地址:">{{ formState.idcard_Address || '--' }}</a-form-item>
</a-form> </a-form>
</div> </div>
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
{{ formState.idcard_Name }}<a-tag color="green" class="info_tag">实名认证</a-tag> {{ formState.idcard_Name }}<a-tag color="green" class="info_tag">实名认证</a-tag>
</div> </div>
<a-row> <a-row>
<a-col :span="8">年龄:{{ formState.idcard_Name }}</a-col> <a-col :span="8">年龄:{{ formState.age }}岁</a-col>
<a-col :span="8">性别:{{ formState.idcard_Sex || '--' }}</a-col> <a-col :span="8">性别:{{ formState.idcard_Sex || '--' }}</a-col>
<a-col :span="8">民族:{{ formState.idcard_Nation }}</a-col> <a-col :span="8">民族:{{ formState.idcard_Nation }}</a-col>
</a-row> </a-row>
......
ALTER TABLE mortals_xhx_product_interface ADD COLUMN `authInfo` varchar(255) COMMENT '授权信息' ;
ALTER TABLE mortals_xhx_product_interface ADD COLUMN `flowInfo` varchar(255) COMMENT '流控信息' ;
-- ----------------------------
-- 产品接口表
-- ----------------------------
DROP TABLE IF EXISTS `mortals_xhx_product_interface_log`;
CREATE TABLE mortals_xhx_product_interface_log(
`id` bigint(20) AUTO_INCREMENT COMMENT '序号,主键,自增长',
`interfaceId` bigint(20) COMMENT '接口id',
`requestParameters` text COMMENT '请求参数',
`version` varchar(255) COMMENT '版本号',
`content` varchar(255) COMMENT '内容说明',
`remark` varchar(255) COMMENT '备注',
`createUserId` bigint(20) NOT NULL COMMENT '创建用户',
`createTime` datetime NOT NULL COMMENT '创建时间',
`updateUserId` bigint(20) COMMENT '更新用户',
`updateTime` datetime COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='产品接口';
package com.mortals.xhx.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
public enum LimitStrategyEnum {
不限流(0, "不限流"),
一万次日(1, "10000次/日"),
一千次日(2, "1000次/日"),
一百次日(3, "100次/日"),
一千次小时(4, "1000次/小时"),
一百次小时(5, "100次/小时"),
一百次分钟(6, "100次/分钟"),
十次分钟(7, "10次/分钟"),
一次分钟(8, "1次/分钟");
private Integer value;
private String desc;
LimitStrategyEnum(Integer value, String desc) {
this.value = value;
this.desc = desc;
}
public Integer getValue() {
return this.value;
}
public String getDesc() {
return this.desc;
}
public static LimitStrategyEnum getByValue(Integer value) {
for (LimitStrategyEnum statusEnum : LimitStrategyEnum.values()) {
if (statusEnum.getValue() == value) {
return statusEnum;
}
}
return null;
}
/**
* 获取Map集合
*
* @param eItem 不包含项
* @return
*/
public static Map<String, String> getEnumMap(Integer... eItem) {
Map<String, String> resultMap = new LinkedHashMap<>();
for (LimitStrategyEnum item : LimitStrategyEnum.values()) {
try {
boolean hasE = false;
for (Integer e : eItem) {
if (item.getValue() == e) {
hasE = true;
break;
}
}
if (!hasE) {
resultMap.put(item.getValue() + "", item.getDesc());
}
} catch (Exception ex) {
}
}
return resultMap;
}
}
\ No newline at end of file
package com.mortals.xhx.module.product.dao;
import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.product.model.ProductInterfaceLogEntity;
import java.util.List;
/**
* 产品接口Dao
* 产品接口 DAO接口
*
* @author zxfei
* @date 2023-07-18
*/
public interface ProductInterfaceLogDao extends ICRUDDao<ProductInterfaceLogEntity,Long>{
}
package com.mortals.xhx.module.product.dao.ibatis;
import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.product.dao.ProductInterfaceLogDao;
import com.mortals.xhx.module.product.model.ProductInterfaceLogEntity;
import java.util.Date;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List;
/**
* 产品接口DaoImpl DAO接口
*
* @author zxfei
* @date 2023-07-18
*/
@Repository("productInterfaceLogDao")
public class ProductInterfaceLogDaoImpl extends BaseCRUDDaoMybatis<ProductInterfaceLogEntity,Long> implements ProductInterfaceLogDao {
}
package com.mortals.xhx.module.product.model; package com.mortals.xhx.module.product.model;
import java.util.List;
import java.util.List;
import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.product.model.vo.ProductInterfaceVo; import com.mortals.xhx.module.product.model.vo.ProductInterfaceVo;
import com.mortals.xhx.module.product.model.ProductInterfaceLogEntity;
import lombok.Data; import lombok.Data;
/** /**
* 产品接口实体对象 * 产品接口实体对象
* *
* @author zxfei * @author zxfei
* @date 2023-05-29 * @date 2023-07-18
*/ */
@Data @Data
public class ProductInterfaceEntity extends ProductInterfaceVo { public class ProductInterfaceEntity extends ProductInterfaceVo {
...@@ -38,7 +45,7 @@ public class ProductInterfaceEntity extends ProductInterfaceVo { ...@@ -38,7 +45,7 @@ public class ProductInterfaceEntity extends ProductInterfaceVo {
/** /**
* 超时时间(秒) * 超时时间(秒)
*/ */
private Long timeoutValue; private Integer timeoutValue;
/** /**
* 限流策略1:分钟,2:小时 * 限流策略1:分钟,2:小时
*/ */
...@@ -91,6 +98,25 @@ public class ProductInterfaceEntity extends ProductInterfaceVo { ...@@ -91,6 +98,25 @@ public class ProductInterfaceEntity extends ProductInterfaceVo {
* 异常返回示例 * 异常返回示例
*/ */
private String abnormalResponse; private String abnormalResponse;
/**
* 授权信息
*/
private String authInfo;
/**
* 流控信息
*/
private String flowInfo;
/**
* 产品接口信息
*/
private List<ProductInterfaceLogEntity> productInterfaceLogList=new ArrayList<>();;
public List<ProductInterfaceLogEntity> getProductInterfaceLogList(){
return productInterfaceLogList;
}
public void setProductInterfaceLogList(List<ProductInterfaceLogEntity> productInterfaceLogList){
this.productInterfaceLogList = productInterfaceLogList;
}
@Override @Override
public int hashCode() { public int hashCode() {
return this.getId().hashCode(); return this.getId().hashCode();
...@@ -121,7 +147,7 @@ public class ProductInterfaceEntity extends ProductInterfaceVo { ...@@ -121,7 +147,7 @@ public class ProductInterfaceEntity extends ProductInterfaceVo {
this.requestUrl = ""; this.requestUrl = "";
this.timeoutValue = -1L; this.timeoutValue = -1;
this.limitStrategy = -1; this.limitStrategy = -1;
...@@ -148,5 +174,9 @@ public class ProductInterfaceEntity extends ProductInterfaceVo { ...@@ -148,5 +174,9 @@ public class ProductInterfaceEntity extends ProductInterfaceVo {
this.normalResponse = ""; this.normalResponse = "";
this.abnormalResponse = ""; this.abnormalResponse = "";
this.authInfo = "";
this.flowInfo = "";
} }
} }
\ No newline at end of file
package com.mortals.xhx.module.product.model;
import java.util.List;
import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.product.model.vo.ProductInterfaceLogVo;
import lombok.Data;
/**
* 产品接口实体对象
*
* @author zxfei
* @date 2023-07-18
*/
@Data
public class ProductInterfaceLogEntity extends ProductInterfaceLogVo {
private static final long serialVersionUID = 1L;
/**
* 接口id
*/
private Long interfaceId;
/**
* 请求参数
*/
private String requestParameters;
/**
* 版本号
*/
private String version;
/**
* 内容说明
*/
private String content;
/**
* 备注
*/
private String remark;
@Override
public int hashCode() {
return this.getId().hashCode();
}
@Override
public boolean equals(Object obj) {
if (obj == null) return false;
if (obj instanceof ProductInterfaceLogEntity) {
ProductInterfaceLogEntity tmp = (ProductInterfaceLogEntity) obj;
if (this.getId() == tmp.getId()) {
return true;
}
}
return false;
}
public void initAttrValue(){
this.interfaceId = -1L;
this.requestParameters = "";
this.version = "";
this.content = "";
this.remark = "";
}
}
\ No newline at end of file
package com.mortals.xhx.module.product.model;
import java.util.List;
import com.mortals.xhx.module.product.model.ProductInterfaceLogEntity;
/**
* 产品接口查询对象
*
* @author zxfei
* @date 2023-07-18
*/
public class ProductInterfaceLogQuery extends ProductInterfaceLogEntity {
/** 开始 序号,主键,自增长 */
private Long idStart;
/** 结束 序号,主键,自增长 */
private Long idEnd;
/** 增加 序号,主键,自增长 */
private Long idIncrement;
/** 序号,主键,自增长列表 */
private List <Long> idList;
/** 序号,主键,自增长排除列表 */
private List <Long> idNotList;
/** 开始 接口id */
private Long interfaceIdStart;
/** 结束 接口id */
private Long interfaceIdEnd;
/** 增加 接口id */
private Long interfaceIdIncrement;
/** 接口id列表 */
private List <Long> interfaceIdList;
/** 接口id排除列表 */
private List <Long> interfaceIdNotList;
/** 请求参数 */
private List<String> requestParametersList;
/** 请求参数排除列表 */
private List <String> requestParametersNotList;
/** 版本号 */
private List<String> versionList;
/** 版本号排除列表 */
private List <String> versionNotList;
/** 内容说明 */
private List<String> contentList;
/** 内容说明排除列表 */
private List <String> contentNotList;
/** 备注 */
private List<String> remarkList;
/** 备注排除列表 */
private List <String> remarkNotList;
/** 开始 创建用户 */
private Long createUserIdStart;
/** 结束 创建用户 */
private Long createUserIdEnd;
/** 增加 创建用户 */
private Long createUserIdIncrement;
/** 创建用户列表 */
private List <Long> createUserIdList;
/** 创建用户排除列表 */
private List <Long> createUserIdNotList;
/** 开始 创建时间 */
private String createTimeStart;
/** 结束 创建时间 */
private String createTimeEnd;
/** 开始 更新用户 */
private Long updateUserIdStart;
/** 结束 更新用户 */
private Long updateUserIdEnd;
/** 增加 更新用户 */
private Long updateUserIdIncrement;
/** 更新用户列表 */
private List <Long> updateUserIdList;
/** 更新用户排除列表 */
private List <Long> updateUserIdNotList;
/** 开始 更新时间 */
private String updateTimeStart;
/** 结束 更新时间 */
private String updateTimeEnd;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<ProductInterfaceLogQuery> orConditionList;
/** AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4) */
private List<ProductInterfaceLogQuery> andConditionList;
public ProductInterfaceLogQuery(){}
/**
* 获取 开始 序号,主键,自增长
* @return idStart
*/
public Long getIdStart(){
return this.idStart;
}
/**
* 设置 开始 序号,主键,自增长
* @param idStart
*/
public void setIdStart(Long idStart){
this.idStart = idStart;
}
/**
* 获取 结束 序号,主键,自增长
* @return $idEnd
*/
public Long getIdEnd(){
return this.idEnd;
}
/**
* 设置 结束 序号,主键,自增长
* @param idEnd
*/
public void setIdEnd(Long idEnd){
this.idEnd = idEnd;
}
/**
* 获取 增加 序号,主键,自增长
* @return idIncrement
*/
public Long getIdIncrement(){
return this.idIncrement;
}
/**
* 设置 增加 序号,主键,自增长
* @param idIncrement
*/
public void setIdIncrement(Long idIncrement){
this.idIncrement = idIncrement;
}
/**
* 获取 序号,主键,自增长
* @return idList
*/
public List<Long> getIdList(){
return this.idList;
}
/**
* 设置 序号,主键,自增长
* @param idList
*/
public void setIdList(List<Long> idList){
this.idList = idList;
}
/**
* 获取 序号,主键,自增长
* @return idNotList
*/
public List<Long> getIdNotList(){
return this.idNotList;
}
/**
* 设置 序号,主键,自增长
* @param idNotList
*/
public void setIdNotList(List<Long> idNotList){
this.idNotList = idNotList;
}
/**
* 获取 开始 接口id
* @return interfaceIdStart
*/
public Long getInterfaceIdStart(){
return this.interfaceIdStart;
}
/**
* 设置 开始 接口id
* @param interfaceIdStart
*/
public void setInterfaceIdStart(Long interfaceIdStart){
this.interfaceIdStart = interfaceIdStart;
}
/**
* 获取 结束 接口id
* @return $interfaceIdEnd
*/
public Long getInterfaceIdEnd(){
return this.interfaceIdEnd;
}
/**
* 设置 结束 接口id
* @param interfaceIdEnd
*/
public void setInterfaceIdEnd(Long interfaceIdEnd){
this.interfaceIdEnd = interfaceIdEnd;
}
/**
* 获取 增加 接口id
* @return interfaceIdIncrement
*/
public Long getInterfaceIdIncrement(){
return this.interfaceIdIncrement;
}
/**
* 设置 增加 接口id
* @param interfaceIdIncrement
*/
public void setInterfaceIdIncrement(Long interfaceIdIncrement){
this.interfaceIdIncrement = interfaceIdIncrement;
}
/**
* 获取 接口id
* @return interfaceIdList
*/
public List<Long> getInterfaceIdList(){
return this.interfaceIdList;
}
/**
* 设置 接口id
* @param interfaceIdList
*/
public void setInterfaceIdList(List<Long> interfaceIdList){
this.interfaceIdList = interfaceIdList;
}
/**
* 获取 接口id
* @return interfaceIdNotList
*/
public List<Long> getInterfaceIdNotList(){
return this.interfaceIdNotList;
}
/**
* 设置 接口id
* @param interfaceIdNotList
*/
public void setInterfaceIdNotList(List<Long> interfaceIdNotList){
this.interfaceIdNotList = interfaceIdNotList;
}
/**
* 获取 请求参数
* @return requestParametersList
*/
public List<String> getRequestParametersList(){
return this.requestParametersList;
}
/**
* 设置 请求参数
* @param requestParametersList
*/
public void setRequestParametersList(List<String> requestParametersList){
this.requestParametersList = requestParametersList;
}
/**
* 获取 请求参数
* @return requestParametersNotList
*/
public List<String> getRequestParametersNotList(){
return this.requestParametersNotList;
}
/**
* 设置 请求参数
* @param requestParametersNotList
*/
public void setRequestParametersNotList(List<String> requestParametersNotList){
this.requestParametersNotList = requestParametersNotList;
}
/**
* 获取 版本号
* @return versionList
*/
public List<String> getVersionList(){
return this.versionList;
}
/**
* 设置 版本号
* @param versionList
*/
public void setVersionList(List<String> versionList){
this.versionList = versionList;
}
/**
* 获取 版本号
* @return versionNotList
*/
public List<String> getVersionNotList(){
return this.versionNotList;
}
/**
* 设置 版本号
* @param versionNotList
*/
public void setVersionNotList(List<String> versionNotList){
this.versionNotList = versionNotList;
}
/**
* 获取 内容说明
* @return contentList
*/
public List<String> getContentList(){
return this.contentList;
}
/**
* 设置 内容说明
* @param contentList
*/
public void setContentList(List<String> contentList){
this.contentList = contentList;
}
/**
* 获取 内容说明
* @return contentNotList
*/
public List<String> getContentNotList(){
return this.contentNotList;
}
/**
* 设置 内容说明
* @param contentNotList
*/
public void setContentNotList(List<String> contentNotList){
this.contentNotList = contentNotList;
}
/**
* 获取 备注
* @return remarkList
*/
public List<String> getRemarkList(){
return this.remarkList;
}
/**
* 设置 备注
* @param remarkList
*/
public void setRemarkList(List<String> remarkList){
this.remarkList = remarkList;
}
/**
* 获取 备注
* @return remarkNotList
*/
public List<String> getRemarkNotList(){
return this.remarkNotList;
}
/**
* 设置 备注
* @param remarkNotList
*/
public void setRemarkNotList(List<String> remarkNotList){
this.remarkNotList = remarkNotList;
}
/**
* 获取 开始 创建用户
* @return createUserIdStart
*/
public Long getCreateUserIdStart(){
return this.createUserIdStart;
}
/**
* 设置 开始 创建用户
* @param createUserIdStart
*/
public void setCreateUserIdStart(Long createUserIdStart){
this.createUserIdStart = createUserIdStart;
}
/**
* 获取 结束 创建用户
* @return $createUserIdEnd
*/
public Long getCreateUserIdEnd(){
return this.createUserIdEnd;
}
/**
* 设置 结束 创建用户
* @param createUserIdEnd
*/
public void setCreateUserIdEnd(Long createUserIdEnd){
this.createUserIdEnd = createUserIdEnd;
}
/**
* 获取 增加 创建用户
* @return createUserIdIncrement
*/
public Long getCreateUserIdIncrement(){
return this.createUserIdIncrement;
}
/**
* 设置 增加 创建用户
* @param createUserIdIncrement
*/
public void setCreateUserIdIncrement(Long createUserIdIncrement){
this.createUserIdIncrement = createUserIdIncrement;
}
/**
* 获取 创建用户
* @return createUserIdList
*/
public List<Long> getCreateUserIdList(){
return this.createUserIdList;
}
/**
* 设置 创建用户
* @param createUserIdList
*/
public void setCreateUserIdList(List<Long> createUserIdList){
this.createUserIdList = createUserIdList;
}
/**
* 获取 创建用户
* @return createUserIdNotList
*/
public List<Long> getCreateUserIdNotList(){
return this.createUserIdNotList;
}
/**
* 设置 创建用户
* @param createUserIdNotList
*/
public void setCreateUserIdNotList(List<Long> createUserIdNotList){
this.createUserIdNotList = createUserIdNotList;
}
/**
* 获取 开始 创建时间
* @return createTimeStart
*/
public String getCreateTimeStart(){
return this.createTimeStart;
}
/**
* 设置 开始 创建时间
* @param createTimeStart
*/
public void setCreateTimeStart(String createTimeStart){
this.createTimeStart = createTimeStart;
}
/**
* 获取 结束 创建时间
* @return createTimeEnd
*/
public String getCreateTimeEnd(){
return this.createTimeEnd;
}
/**
* 设置 结束 创建时间
* @param createTimeEnd
*/
public void setCreateTimeEnd(String createTimeEnd){
this.createTimeEnd = createTimeEnd;
}
/**
* 获取 开始 更新用户
* @return updateUserIdStart
*/
public Long getUpdateUserIdStart(){
return this.updateUserIdStart;
}
/**
* 设置 开始 更新用户
* @param updateUserIdStart
*/
public void setUpdateUserIdStart(Long updateUserIdStart){
this.updateUserIdStart = updateUserIdStart;
}
/**
* 获取 结束 更新用户
* @return $updateUserIdEnd
*/
public Long getUpdateUserIdEnd(){
return this.updateUserIdEnd;
}
/**
* 设置 结束 更新用户
* @param updateUserIdEnd
*/
public void setUpdateUserIdEnd(Long updateUserIdEnd){
this.updateUserIdEnd = updateUserIdEnd;
}
/**
* 获取 增加 更新用户
* @return updateUserIdIncrement
*/
public Long getUpdateUserIdIncrement(){
return this.updateUserIdIncrement;
}
/**
* 设置 增加 更新用户
* @param updateUserIdIncrement
*/
public void setUpdateUserIdIncrement(Long updateUserIdIncrement){
this.updateUserIdIncrement = updateUserIdIncrement;
}
/**
* 获取 更新用户
* @return updateUserIdList
*/
public List<Long> getUpdateUserIdList(){
return this.updateUserIdList;
}
/**
* 设置 更新用户
* @param updateUserIdList
*/
public void setUpdateUserIdList(List<Long> updateUserIdList){
this.updateUserIdList = updateUserIdList;
}
/**
* 获取 更新用户
* @return updateUserIdNotList
*/
public List<Long> getUpdateUserIdNotList(){
return this.updateUserIdNotList;
}
/**
* 设置 更新用户
* @param updateUserIdNotList
*/
public void setUpdateUserIdNotList(List<Long> updateUserIdNotList){
this.updateUserIdNotList = updateUserIdNotList;
}
/**
* 获取 开始 更新时间
* @return updateTimeStart
*/
public String getUpdateTimeStart(){
return this.updateTimeStart;
}
/**
* 设置 开始 更新时间
* @param updateTimeStart
*/
public void setUpdateTimeStart(String updateTimeStart){
this.updateTimeStart = updateTimeStart;
}
/**
* 获取 结束 更新时间
* @return updateTimeEnd
*/
public String getUpdateTimeEnd(){
return this.updateTimeEnd;
}
/**
* 设置 结束 更新时间
* @param updateTimeEnd
*/
public void setUpdateTimeEnd(String updateTimeEnd){
this.updateTimeEnd = updateTimeEnd;
}
/**
* 设置 序号,主键,自增长
* @param id
*/
public ProductInterfaceLogQuery id(Long id){
setId(id);
return this;
}
/**
* 设置 开始 序号,主键,自增长
* @param idStart
*/
public ProductInterfaceLogQuery idStart(Long idStart){
this.idStart = idStart;
return this;
}
/**
* 设置 结束 序号,主键,自增长
* @param idEnd
*/
public ProductInterfaceLogQuery idEnd(Long idEnd){
this.idEnd = idEnd;
return this;
}
/**
* 设置 增加 序号,主键,自增长
* @param idIncrement
*/
public ProductInterfaceLogQuery idIncrement(Long idIncrement){
this.idIncrement = idIncrement;
return this;
}
/**
* 设置 序号,主键,自增长
* @param idList
*/
public ProductInterfaceLogQuery idList(List<Long> idList){
this.idList = idList;
return this;
}
/**
* 设置 序号,主键,自增长
* @param idNotList
*/
public ProductInterfaceLogQuery idNotList(List<Long> idNotList){
this.idNotList = idNotList;
return this;
}
/**
* 设置 接口id
* @param interfaceId
*/
public ProductInterfaceLogQuery interfaceId(Long interfaceId){
setInterfaceId(interfaceId);
return this;
}
/**
* 设置 开始 接口id
* @param interfaceIdStart
*/
public ProductInterfaceLogQuery interfaceIdStart(Long interfaceIdStart){
this.interfaceIdStart = interfaceIdStart;
return this;
}
/**
* 设置 结束 接口id
* @param interfaceIdEnd
*/
public ProductInterfaceLogQuery interfaceIdEnd(Long interfaceIdEnd){
this.interfaceIdEnd = interfaceIdEnd;
return this;
}
/**
* 设置 增加 接口id
* @param interfaceIdIncrement
*/
public ProductInterfaceLogQuery interfaceIdIncrement(Long interfaceIdIncrement){
this.interfaceIdIncrement = interfaceIdIncrement;
return this;
}
/**
* 设置 接口id
* @param interfaceIdList
*/
public ProductInterfaceLogQuery interfaceIdList(List<Long> interfaceIdList){
this.interfaceIdList = interfaceIdList;
return this;
}
/**
* 设置 接口id
* @param interfaceIdNotList
*/
public ProductInterfaceLogQuery interfaceIdNotList(List<Long> interfaceIdNotList){
this.interfaceIdNotList = interfaceIdNotList;
return this;
}
/**
* 设置 请求参数
* @param requestParameters
*/
public ProductInterfaceLogQuery requestParameters(String requestParameters){
setRequestParameters(requestParameters);
return this;
}
/**
* 设置 请求参数
* @param requestParametersList
*/
public ProductInterfaceLogQuery requestParametersList(List<String> requestParametersList){
this.requestParametersList = requestParametersList;
return this;
}
/**
* 设置 版本号
* @param version
*/
public ProductInterfaceLogQuery version(String version){
setVersion(version);
return this;
}
/**
* 设置 版本号
* @param versionList
*/
public ProductInterfaceLogQuery versionList(List<String> versionList){
this.versionList = versionList;
return this;
}
/**
* 设置 内容说明
* @param content
*/
public ProductInterfaceLogQuery content(String content){
setContent(content);
return this;
}
/**
* 设置 内容说明
* @param contentList
*/
public ProductInterfaceLogQuery contentList(List<String> contentList){
this.contentList = contentList;
return this;
}
/**
* 设置 备注
* @param remark
*/
public ProductInterfaceLogQuery remark(String remark){
setRemark(remark);
return this;
}
/**
* 设置 备注
* @param remarkList
*/
public ProductInterfaceLogQuery remarkList(List<String> remarkList){
this.remarkList = remarkList;
return this;
}
/**
* 设置 创建用户
* @param createUserId
*/
public ProductInterfaceLogQuery createUserId(Long createUserId){
setCreateUserId(createUserId);
return this;
}
/**
* 设置 开始 创建用户
* @param createUserIdStart
*/
public ProductInterfaceLogQuery createUserIdStart(Long createUserIdStart){
this.createUserIdStart = createUserIdStart;
return this;
}
/**
* 设置 结束 创建用户
* @param createUserIdEnd
*/
public ProductInterfaceLogQuery createUserIdEnd(Long createUserIdEnd){
this.createUserIdEnd = createUserIdEnd;
return this;
}
/**
* 设置 增加 创建用户
* @param createUserIdIncrement
*/
public ProductInterfaceLogQuery createUserIdIncrement(Long createUserIdIncrement){
this.createUserIdIncrement = createUserIdIncrement;
return this;
}
/**
* 设置 创建用户
* @param createUserIdList
*/
public ProductInterfaceLogQuery createUserIdList(List<Long> createUserIdList){
this.createUserIdList = createUserIdList;
return this;
}
/**
* 设置 创建用户
* @param createUserIdNotList
*/
public ProductInterfaceLogQuery createUserIdNotList(List<Long> createUserIdNotList){
this.createUserIdNotList = createUserIdNotList;
return this;
}
/**
* 设置 更新用户
* @param updateUserId
*/
public ProductInterfaceLogQuery updateUserId(Long updateUserId){
setUpdateUserId(updateUserId);
return this;
}
/**
* 设置 开始 更新用户
* @param updateUserIdStart
*/
public ProductInterfaceLogQuery updateUserIdStart(Long updateUserIdStart){
this.updateUserIdStart = updateUserIdStart;
return this;
}
/**
* 设置 结束 更新用户
* @param updateUserIdEnd
*/
public ProductInterfaceLogQuery updateUserIdEnd(Long updateUserIdEnd){
this.updateUserIdEnd = updateUserIdEnd;
return this;
}
/**
* 设置 增加 更新用户
* @param updateUserIdIncrement
*/
public ProductInterfaceLogQuery updateUserIdIncrement(Long updateUserIdIncrement){
this.updateUserIdIncrement = updateUserIdIncrement;
return this;
}
/**
* 设置 更新用户
* @param updateUserIdList
*/
public ProductInterfaceLogQuery updateUserIdList(List<Long> updateUserIdList){
this.updateUserIdList = updateUserIdList;
return this;
}
/**
* 设置 更新用户
* @param updateUserIdNotList
*/
public ProductInterfaceLogQuery updateUserIdNotList(List<Long> updateUserIdNotList){
this.updateUserIdNotList = updateUserIdNotList;
return this;
}
/**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList
*/
public List<ProductInterfaceLogQuery> getOrConditionList(){
return this.orConditionList;
}
/**
* 设置 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @param orConditionList
*/
public void setOrConditionList(List<ProductInterfaceLogQuery> orConditionList){
this.orConditionList = orConditionList;
}
/**
* 获取 AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4)
* @return andConditionList
*/
public List<ProductInterfaceLogQuery> getAndConditionList(){
return this.andConditionList;
}
/**
* 设置 AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4)
* @param andConditionList
*/
public void setAndConditionList(List<ProductInterfaceLogQuery> andConditionList){
this.andConditionList = andConditionList;
}
}
\ No newline at end of file
package com.mortals.xhx.module.product.model; package com.mortals.xhx.module.product.model;
import java.util.List; import java.util.List;
import java.util.List;
import com.mortals.xhx.module.product.model.ProductInterfaceEntity;
/** /**
* 产品接口查询对象 * 产品接口查询对象
* *
* @author zxfei * @author zxfei
* @date 2023-05-29 * @date 2023-07-18
*/ */
public class ProductInterfaceQuery extends ProductInterfaceEntity { public class ProductInterfaceQuery extends ProductInterfaceEntity {
/** 开始 序号,主键,自增长 */ /** 开始 序号,主键,自增长 */
...@@ -84,19 +86,19 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity { ...@@ -84,19 +86,19 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
/** 请求路径排除列表 */ /** 请求路径排除列表 */
private List <String> requestUrlNotList; private List <String> requestUrlNotList;
/** 开始 超时时间(秒) */ /** 开始 超时时间(秒) */
private Long timeoutValueStart; private Integer timeoutValueStart;
/** 结束 超时时间(秒) */ /** 结束 超时时间(秒) */
private Long timeoutValueEnd; private Integer timeoutValueEnd;
/** 增加 超时时间(秒) */ /** 增加 超时时间(秒) */
private Long timeoutValueIncrement; private Integer timeoutValueIncrement;
/** 超时时间(秒)列表 */ /** 超时时间(秒)列表 */
private List <Long> timeoutValueList; private List <Integer> timeoutValueList;
/** 超时时间(秒)排除列表 */ /** 超时时间(秒)排除列表 */
private List <Long> timeoutValueNotList; private List <Integer> timeoutValueNotList;
/** 开始 限流策略1:分钟,2:小时 */ /** 开始 限流策略1:分钟,2:小时 */
private Integer limitStrategyStart; private Integer limitStrategyStart;
...@@ -203,6 +205,26 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity { ...@@ -203,6 +205,26 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
/** 接口描述排除列表 */ /** 接口描述排除列表 */
private List <String> remarkNotList; private List <String> remarkNotList;
/** 正常返回示例 */
private List<String> normalResponseList;
/** 正常返回示例排除列表 */
private List <String> normalResponseNotList;
/** 异常返回示例 */
private List<String> abnormalResponseList;
/** 异常返回示例排除列表 */
private List <String> abnormalResponseNotList;
/** 授权信息 */
private List<String> authInfoList;
/** 授权信息排除列表 */
private List <String> authInfoNotList;
/** 流控信息 */
private List<String> flowInfoList;
/** 流控信息排除列表 */
private List <String> flowInfoNotList;
/** 开始 创建用户 */ /** 开始 创建用户 */
private Long createUserIdStart; private Long createUserIdStart;
...@@ -245,16 +267,6 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity { ...@@ -245,16 +267,6 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
/** 结束 更新时间 */ /** 结束 更新时间 */
private String updateTimeEnd; private String updateTimeEnd;
/** 正常返回示例 */
private List<String> normalResponseList;
/** 正常返回示例排除列表 */
private List <String> normalResponseNotList;
/** 异常返回示例 */
private List<String> abnormalResponseList;
/** 异常返回示例排除列表 */
private List <String> abnormalResponseNotList;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */ /** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<ProductInterfaceQuery> orConditionList; private List<ProductInterfaceQuery> orConditionList;
...@@ -687,7 +699,7 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity { ...@@ -687,7 +699,7 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
* 获取 开始 超时时间(秒) * 获取 开始 超时时间(秒)
* @return timeoutValueStart * @return timeoutValueStart
*/ */
public Long getTimeoutValueStart(){ public Integer getTimeoutValueStart(){
return this.timeoutValueStart; return this.timeoutValueStart;
} }
...@@ -695,7 +707,7 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity { ...@@ -695,7 +707,7 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
* 设置 开始 超时时间(秒) * 设置 开始 超时时间(秒)
* @param timeoutValueStart * @param timeoutValueStart
*/ */
public void setTimeoutValueStart(Long timeoutValueStart){ public void setTimeoutValueStart(Integer timeoutValueStart){
this.timeoutValueStart = timeoutValueStart; this.timeoutValueStart = timeoutValueStart;
} }
...@@ -703,7 +715,7 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity { ...@@ -703,7 +715,7 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
* 获取 结束 超时时间(秒) * 获取 结束 超时时间(秒)
* @return $timeoutValueEnd * @return $timeoutValueEnd
*/ */
public Long getTimeoutValueEnd(){ public Integer getTimeoutValueEnd(){
return this.timeoutValueEnd; return this.timeoutValueEnd;
} }
...@@ -711,7 +723,7 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity { ...@@ -711,7 +723,7 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
* 设置 结束 超时时间(秒) * 设置 结束 超时时间(秒)
* @param timeoutValueEnd * @param timeoutValueEnd
*/ */
public void setTimeoutValueEnd(Long timeoutValueEnd){ public void setTimeoutValueEnd(Integer timeoutValueEnd){
this.timeoutValueEnd = timeoutValueEnd; this.timeoutValueEnd = timeoutValueEnd;
} }
...@@ -719,7 +731,7 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity { ...@@ -719,7 +731,7 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
* 获取 增加 超时时间(秒) * 获取 增加 超时时间(秒)
* @return timeoutValueIncrement * @return timeoutValueIncrement
*/ */
public Long getTimeoutValueIncrement(){ public Integer getTimeoutValueIncrement(){
return this.timeoutValueIncrement; return this.timeoutValueIncrement;
} }
...@@ -727,7 +739,7 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity { ...@@ -727,7 +739,7 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
* 设置 增加 超时时间(秒) * 设置 增加 超时时间(秒)
* @param timeoutValueIncrement * @param timeoutValueIncrement
*/ */
public void setTimeoutValueIncrement(Long timeoutValueIncrement){ public void setTimeoutValueIncrement(Integer timeoutValueIncrement){
this.timeoutValueIncrement = timeoutValueIncrement; this.timeoutValueIncrement = timeoutValueIncrement;
} }
...@@ -735,7 +747,7 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity { ...@@ -735,7 +747,7 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
* 获取 超时时间(秒) * 获取 超时时间(秒)
* @return timeoutValueList * @return timeoutValueList
*/ */
public List<Long> getTimeoutValueList(){ public List<Integer> getTimeoutValueList(){
return this.timeoutValueList; return this.timeoutValueList;
} }
...@@ -743,7 +755,7 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity { ...@@ -743,7 +755,7 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
* 设置 超时时间(秒) * 设置 超时时间(秒)
* @param timeoutValueList * @param timeoutValueList
*/ */
public void setTimeoutValueList(List<Long> timeoutValueList){ public void setTimeoutValueList(List<Integer> timeoutValueList){
this.timeoutValueList = timeoutValueList; this.timeoutValueList = timeoutValueList;
} }
...@@ -751,7 +763,7 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity { ...@@ -751,7 +763,7 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
* 获取 超时时间(秒) * 获取 超时时间(秒)
* @return timeoutValueNotList * @return timeoutValueNotList
*/ */
public List<Long> getTimeoutValueNotList(){ public List<Integer> getTimeoutValueNotList(){
return this.timeoutValueNotList; return this.timeoutValueNotList;
} }
...@@ -759,7 +771,7 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity { ...@@ -759,7 +771,7 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
* 设置 超时时间(秒) * 设置 超时时间(秒)
* @param timeoutValueNotList * @param timeoutValueNotList
*/ */
public void setTimeoutValueNotList(List<Long> timeoutValueNotList){ public void setTimeoutValueNotList(List<Integer> timeoutValueNotList){
this.timeoutValueNotList = timeoutValueNotList; this.timeoutValueNotList = timeoutValueNotList;
} }
...@@ -1361,6 +1373,134 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity { ...@@ -1361,6 +1373,134 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
this.remarkNotList = remarkNotList; this.remarkNotList = remarkNotList;
} }
/**
* 获取 正常返回示例
* @return normalResponseList
*/
public List<String> getNormalResponseList(){
return this.normalResponseList;
}
/**
* 设置 正常返回示例
* @param normalResponseList
*/
public void setNormalResponseList(List<String> normalResponseList){
this.normalResponseList = normalResponseList;
}
/**
* 获取 正常返回示例
* @return normalResponseNotList
*/
public List<String> getNormalResponseNotList(){
return this.normalResponseNotList;
}
/**
* 设置 正常返回示例
* @param normalResponseNotList
*/
public void setNormalResponseNotList(List<String> normalResponseNotList){
this.normalResponseNotList = normalResponseNotList;
}
/**
* 获取 异常返回示例
* @return abnormalResponseList
*/
public List<String> getAbnormalResponseList(){
return this.abnormalResponseList;
}
/**
* 设置 异常返回示例
* @param abnormalResponseList
*/
public void setAbnormalResponseList(List<String> abnormalResponseList){
this.abnormalResponseList = abnormalResponseList;
}
/**
* 获取 异常返回示例
* @return abnormalResponseNotList
*/
public List<String> getAbnormalResponseNotList(){
return this.abnormalResponseNotList;
}
/**
* 设置 异常返回示例
* @param abnormalResponseNotList
*/
public void setAbnormalResponseNotList(List<String> abnormalResponseNotList){
this.abnormalResponseNotList = abnormalResponseNotList;
}
/**
* 获取 授权信息
* @return authInfoList
*/
public List<String> getAuthInfoList(){
return this.authInfoList;
}
/**
* 设置 授权信息
* @param authInfoList
*/
public void setAuthInfoList(List<String> authInfoList){
this.authInfoList = authInfoList;
}
/**
* 获取 授权信息
* @return authInfoNotList
*/
public List<String> getAuthInfoNotList(){
return this.authInfoNotList;
}
/**
* 设置 授权信息
* @param authInfoNotList
*/
public void setAuthInfoNotList(List<String> authInfoNotList){
this.authInfoNotList = authInfoNotList;
}
/**
* 获取 流控信息
* @return flowInfoList
*/
public List<String> getFlowInfoList(){
return this.flowInfoList;
}
/**
* 设置 流控信息
* @param flowInfoList
*/
public void setFlowInfoList(List<String> flowInfoList){
this.flowInfoList = flowInfoList;
}
/**
* 获取 流控信息
* @return flowInfoNotList
*/
public List<String> getFlowInfoNotList(){
return this.flowInfoNotList;
}
/**
* 设置 流控信息
* @param flowInfoNotList
*/
public void setFlowInfoNotList(List<String> flowInfoNotList){
this.flowInfoNotList = flowInfoNotList;
}
/** /**
* 获取 开始 创建用户 * 获取 开始 创建用户
* @return createUserIdStart * @return createUserIdStart
...@@ -1587,70 +1727,6 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity { ...@@ -1587,70 +1727,6 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
this.updateTimeEnd = updateTimeEnd; this.updateTimeEnd = updateTimeEnd;
} }
/**
* 获取 正常返回示例
* @return normalResponseList
*/
public List<String> getNormalResponseList(){
return this.normalResponseList;
}
/**
* 设置 正常返回示例
* @param normalResponseList
*/
public void setNormalResponseList(List<String> normalResponseList){
this.normalResponseList = normalResponseList;
}
/**
* 获取 正常返回示例
* @return normalResponseNotList
*/
public List<String> getNormalResponseNotList(){
return this.normalResponseNotList;
}
/**
* 设置 正常返回示例
* @param normalResponseNotList
*/
public void setNormalResponseNotList(List<String> normalResponseNotList){
this.normalResponseNotList = normalResponseNotList;
}
/**
* 获取 异常返回示例
* @return abnormalResponseList
*/
public List<String> getAbnormalResponseList(){
return this.abnormalResponseList;
}
/**
* 设置 异常返回示例
* @param abnormalResponseList
*/
public void setAbnormalResponseList(List<String> abnormalResponseList){
this.abnormalResponseList = abnormalResponseList;
}
/**
* 获取 异常返回示例
* @return abnormalResponseNotList
*/
public List<String> getAbnormalResponseNotList(){
return this.abnormalResponseNotList;
}
/**
* 设置 异常返回示例
* @param abnormalResponseNotList
*/
public void setAbnormalResponseNotList(List<String> abnormalResponseNotList){
this.abnormalResponseNotList = abnormalResponseNotList;
}
/** /**
* 设置 序号,主键,自增长 * 设置 序号,主键,自增长
* @param id * @param id
...@@ -1928,7 +2004,7 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity { ...@@ -1928,7 +2004,7 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
* 设置 超时时间(秒) * 设置 超时时间(秒)
* @param timeoutValue * @param timeoutValue
*/ */
public ProductInterfaceQuery timeoutValue(Long timeoutValue){ public ProductInterfaceQuery timeoutValue(Integer timeoutValue){
setTimeoutValue(timeoutValue); setTimeoutValue(timeoutValue);
return this; return this;
} }
...@@ -1937,7 +2013,7 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity { ...@@ -1937,7 +2013,7 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
* 设置 开始 超时时间(秒) * 设置 开始 超时时间(秒)
* @param timeoutValueStart * @param timeoutValueStart
*/ */
public ProductInterfaceQuery timeoutValueStart(Long timeoutValueStart){ public ProductInterfaceQuery timeoutValueStart(Integer timeoutValueStart){
this.timeoutValueStart = timeoutValueStart; this.timeoutValueStart = timeoutValueStart;
return this; return this;
} }
...@@ -1946,7 +2022,7 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity { ...@@ -1946,7 +2022,7 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
* 设置 结束 超时时间(秒) * 设置 结束 超时时间(秒)
* @param timeoutValueEnd * @param timeoutValueEnd
*/ */
public ProductInterfaceQuery timeoutValueEnd(Long timeoutValueEnd){ public ProductInterfaceQuery timeoutValueEnd(Integer timeoutValueEnd){
this.timeoutValueEnd = timeoutValueEnd; this.timeoutValueEnd = timeoutValueEnd;
return this; return this;
} }
...@@ -1955,7 +2031,7 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity { ...@@ -1955,7 +2031,7 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
* 设置 增加 超时时间(秒) * 设置 增加 超时时间(秒)
* @param timeoutValueIncrement * @param timeoutValueIncrement
*/ */
public ProductInterfaceQuery timeoutValueIncrement(Long timeoutValueIncrement){ public ProductInterfaceQuery timeoutValueIncrement(Integer timeoutValueIncrement){
this.timeoutValueIncrement = timeoutValueIncrement; this.timeoutValueIncrement = timeoutValueIncrement;
return this; return this;
} }
...@@ -1964,7 +2040,7 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity { ...@@ -1964,7 +2040,7 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
* 设置 超时时间(秒) * 设置 超时时间(秒)
* @param timeoutValueList * @param timeoutValueList
*/ */
public ProductInterfaceQuery timeoutValueList(List<Long> timeoutValueList){ public ProductInterfaceQuery timeoutValueList(List<Integer> timeoutValueList){
this.timeoutValueList = timeoutValueList; this.timeoutValueList = timeoutValueList;
return this; return this;
} }
...@@ -1973,7 +2049,7 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity { ...@@ -1973,7 +2049,7 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
* 设置 超时时间(秒) * 设置 超时时间(秒)
* @param timeoutValueNotList * @param timeoutValueNotList
*/ */
public ProductInterfaceQuery timeoutValueNotList(List<Long> timeoutValueNotList){ public ProductInterfaceQuery timeoutValueNotList(List<Integer> timeoutValueNotList){
this.timeoutValueNotList = timeoutValueNotList; this.timeoutValueNotList = timeoutValueNotList;
return this; return this;
} }
...@@ -2362,6 +2438,82 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity { ...@@ -2362,6 +2438,82 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
return this; return this;
} }
/**
* 设置 正常返回示例
* @param normalResponse
*/
public ProductInterfaceQuery normalResponse(String normalResponse){
setNormalResponse(normalResponse);
return this;
}
/**
* 设置 正常返回示例
* @param normalResponseList
*/
public ProductInterfaceQuery normalResponseList(List<String> normalResponseList){
this.normalResponseList = normalResponseList;
return this;
}
/**
* 设置 异常返回示例
* @param abnormalResponse
*/
public ProductInterfaceQuery abnormalResponse(String abnormalResponse){
setAbnormalResponse(abnormalResponse);
return this;
}
/**
* 设置 异常返回示例
* @param abnormalResponseList
*/
public ProductInterfaceQuery abnormalResponseList(List<String> abnormalResponseList){
this.abnormalResponseList = abnormalResponseList;
return this;
}
/**
* 设置 授权信息
* @param authInfo
*/
public ProductInterfaceQuery authInfo(String authInfo){
setAuthInfo(authInfo);
return this;
}
/**
* 设置 授权信息
* @param authInfoList
*/
public ProductInterfaceQuery authInfoList(List<String> authInfoList){
this.authInfoList = authInfoList;
return this;
}
/**
* 设置 流控信息
* @param flowInfo
*/
public ProductInterfaceQuery flowInfo(String flowInfo){
setFlowInfo(flowInfo);
return this;
}
/**
* 设置 流控信息
* @param flowInfoList
*/
public ProductInterfaceQuery flowInfoList(List<String> flowInfoList){
this.flowInfoList = flowInfoList;
return this;
}
/** /**
* 设置 创建用户 * 设置 创建用户
* @param createUserId * @param createUserId
...@@ -2472,44 +2624,6 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity { ...@@ -2472,44 +2624,6 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
} }
/**
* 设置 正常返回示例
* @param normalResponse
*/
public ProductInterfaceQuery normalResponse(String normalResponse){
setNormalResponse(normalResponse);
return this;
}
/**
* 设置 正常返回示例
* @param normalResponseList
*/
public ProductInterfaceQuery normalResponseList(List<String> normalResponseList){
this.normalResponseList = normalResponseList;
return this;
}
/**
* 设置 异常返回示例
* @param abnormalResponse
*/
public ProductInterfaceQuery abnormalResponse(String abnormalResponse){
setAbnormalResponse(abnormalResponse);
return this;
}
/**
* 设置 异常返回示例
* @param abnormalResponseList
*/
public ProductInterfaceQuery abnormalResponseList(List<String> abnormalResponseList){
this.abnormalResponseList = abnormalResponseList;
return this;
}
/** /**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) * 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList * @return orConditionList
......
package com.mortals.xhx.module.product.model.vo;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.product.model.ProductInterfaceLogEntity;
import java.util.ArrayList;
import java.util.List;
import lombok.Data;
import com.mortals.framework.annotation.Excel;
import java.math.BigDecimal;
import java.util.Date;
/**
* 产品接口视图对象
*
* @author zxfei
* @date 2023-07-18
*/
@Data
public class ProductInterfaceLogVo extends BaseEntityLong {
}
\ No newline at end of file
package com.mortals.xhx.module.product.service;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.product.model.ProductInterfaceLogEntity;
import com.mortals.xhx.module.product.dao.ProductInterfaceLogDao;
/**
* ProductInterfaceLogService
*
* 产品接口 service接口
*
* @author zxfei
* @date 2023-07-18
*/
public interface ProductInterfaceLogService extends ICRUDService<ProductInterfaceLogEntity,Long>{
ProductInterfaceLogDao getDao();
}
\ No newline at end of file
package com.mortals.xhx.module.product.service; package com.mortals.xhx.module.product.service;
import com.mortals.framework.service.ICRUDService; import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.product.dao.ProductInterfaceDao;
import com.mortals.xhx.module.product.model.ProductInterfaceEntity; import com.mortals.xhx.module.product.model.ProductInterfaceEntity;
/**
* ProductInterfaceService
*
* 产品接口 service接口
*
* @author zxfei
* @date 2023-02-22
*/
public interface ProductInterfaceService extends ICRUDService<ProductInterfaceEntity,Long>{
/**
* ProductInterfaceService
* <p>
* 产品接口 service接口
*
* @author zxfei
* @date 2023-02-22
*/
public interface ProductInterfaceService extends ICRUDService<ProductInterfaceEntity, Long> {
ProductInterfaceDao getDao();
} }
\ No newline at end of file
package com.mortals.xhx.module.product.service.impl;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.xhx.module.product.dao.ProductInterfaceLogDao;
import com.mortals.xhx.module.product.model.ProductInterfaceLogEntity;
import com.mortals.xhx.module.product.service.ProductInterfaceLogService;
import lombok.extern.slf4j.Slf4j;
/**
* ProductInterfaceLogService
* 产品接口 service实现
*
* @author zxfei
* @date 2023-07-18
*/
@Service("productInterfaceLogService")
@Slf4j
public class ProductInterfaceLogServiceImpl extends AbstractCRUDServiceImpl<ProductInterfaceLogDao, ProductInterfaceLogEntity, Long> implements ProductInterfaceLogService {
}
\ No newline at end of file
package com.mortals.xhx.module.product.service.impl; package com.mortals.xhx.module.product.service.impl;
import com.mortals.framework.util.StringUtils; import com.mortals.framework.util.StringUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl; import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
...@@ -7,25 +8,77 @@ import com.mortals.framework.model.Context; ...@@ -7,25 +8,77 @@ import com.mortals.framework.model.Context;
import com.mortals.xhx.module.product.dao.ProductInterfaceDao; import com.mortals.xhx.module.product.dao.ProductInterfaceDao;
import com.mortals.xhx.module.product.model.ProductInterfaceEntity; import com.mortals.xhx.module.product.model.ProductInterfaceEntity;
import com.mortals.xhx.module.product.service.ProductInterfaceService; import com.mortals.xhx.module.product.service.ProductInterfaceService;
import org.springframework.beans.factory.annotation.Autowired;
import com.mortals.xhx.module.product.model.ProductInterfaceLogEntity;
import com.mortals.xhx.module.product.model.ProductInterfaceLogQuery;
import com.mortals.xhx.module.product.service.ProductInterfaceLogService;
import org.springframework.util.ObjectUtils;
import java.util.Date;
import java.util.Arrays;
import java.util.List;
import lombok.extern.slf4j.Slf4j;
/** /**
* ProductInterfaceService * ProductInterfaceService
* 产品接口 service实现 * 产品接口 service实现
* *
* @author zxfei * @author zxfei
* @date 2023-02-22 * @date 2023-07-18
*/ */
@Service("productInterfaceService") @Service("productInterfaceService")
@Slf4j
public class ProductInterfaceServiceImpl extends AbstractCRUDServiceImpl<ProductInterfaceDao, ProductInterfaceEntity, Long> implements ProductInterfaceService { public class ProductInterfaceServiceImpl extends AbstractCRUDServiceImpl<ProductInterfaceDao, ProductInterfaceEntity, Long> implements ProductInterfaceService {
@Autowired
private ProductInterfaceLogService productInterfaceLogService;
@Override
protected void saveAfter(ProductInterfaceEntity entity, Context context) throws AppException {
if (!ObjectUtils.isEmpty(entity.getProductInterfaceLogList())) {
entity.getProductInterfaceLogList().stream().peek(item -> {
item.setInterfaceId(entity.getId());
item.setCreateUserId(this.getContextUserId(context));
item.setCreateTime(new Date());
}).count();
productInterfaceLogService.save(entity.getProductInterfaceLogList());
}
super.saveAfter(entity, context);
}
@Override
protected void updateAfter(ProductInterfaceEntity entity, Context context) throws AppException {
if (!ObjectUtils.isEmpty(entity.getProductInterfaceLogList())) {
// Long[] productInterfaceLogIds = productInterfaceLogService.find(new ProductInterfaceLogQuery().interfaceId(entity.getId())).stream().map(ProductInterfaceLogEntity::getId).toArray(Long[]::new);
// productInterfaceLogService.remove(productInterfaceLogIds, context);
entity.getProductInterfaceLogList().stream().peek(item -> {
item.setInterfaceId(entity.getId());
item.setCreateUserId(this.getContextUserId(context));
item.setCreateTime(new Date());
item.setUpdateUserId(this.getContextUserId(context));
item.setUpdateTime(new Date());
}).count();
productInterfaceLogService.save(entity.getProductInterfaceLogList());
}
super.updateAfter(entity, context);
}
@Override
protected void removeAfter(Long[] ids, Context context, int result) throws AppException {
List<ProductInterfaceLogEntity> productInterfaceLoglist = productInterfaceLogService.find(new ProductInterfaceLogQuery().interfaceIdList(Arrays.asList(ids)));
productInterfaceLogService.removeList(productInterfaceLoglist, context);
super.removeAfter(ids, context, result);
}
@Override @Override
protected void validData(ProductInterfaceEntity entity, Context context) throws AppException { protected void validData(ProductInterfaceEntity entity, Context context) throws AppException {
if(entity.getProductId()==null){ if (entity.getProductId() == null) {
throw new AppException("产品id不能为空"); throw new AppException("产品id不能为空");
} }
if(StringUtils.isEmpty(entity.getInterfaceName())){ if (StringUtils.isEmpty(entity.getInterfaceName())) {
throw new AppException("接口名称不能为空"); throw new AppException("接口名称不能为空");
} }
if(StringUtils.isEmpty(entity.getVersionNumber())){ if (StringUtils.isEmpty(entity.getVersionNumber())) {
throw new AppException("版本号不能为空"); throw new AppException("版本号不能为空");
} }
} }
......
...@@ -2,6 +2,7 @@ package com.mortals.xhx.module.product.web; ...@@ -2,6 +2,7 @@ package com.mortals.xhx.module.product.web;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.common.code.LimitStrategyEnum;
import com.mortals.xhx.module.param.service.ParamService; import com.mortals.xhx.module.param.service.ParamService;
import com.mortals.xhx.module.product.model.ProductInterfaceEntity; import com.mortals.xhx.module.product.model.ProductInterfaceEntity;
import com.mortals.xhx.module.product.service.ProductInterfaceService; import com.mortals.xhx.module.product.service.ProductInterfaceService;
...@@ -32,7 +33,7 @@ public class ProductInterfaceController extends BaseCRUDJsonBodyMappingControlle ...@@ -32,7 +33,7 @@ public class ProductInterfaceController extends BaseCRUDJsonBodyMappingControlle
protected void init(Map<String, Object> model, Context context) { protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "requestType", paramService.getParamBySecondOrganize("ProductInterface","requestType")); this.addDict(model, "requestType", paramService.getParamBySecondOrganize("ProductInterface","requestType"));
this.addDict(model, "requestProtocol", paramService.getParamBySecondOrganize("ProductInterface","requestProtocol")); this.addDict(model, "requestProtocol", paramService.getParamBySecondOrganize("ProductInterface","requestProtocol"));
this.addDict(model, "limitStrategy", paramService.getParamBySecondOrganize("ProductInterface","limitStrategy")); this.addDict(model, "limitStrategy", LimitStrategyEnum.getEnumMap());
this.addDict(model, "contentType", paramService.getParamBySecondOrganize("ProductInterface","contentType")); this.addDict(model, "contentType", paramService.getParamBySecondOrganize("ProductInterface","contentType"));
this.addDict(model, "network", paramService.getParamBySecondOrganize("ProductInterface","network")); this.addDict(model, "network", paramService.getParamBySecondOrganize("ProductInterface","network"));
this.addDict(model, "interfaceTag", paramService.getParamBySecondOrganize("ProductInterface","interfaceTag")); this.addDict(model, "interfaceTag", paramService.getParamBySecondOrganize("ProductInterface","interfaceTag"));
......
package com.mortals.xhx.module.product.web;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.module.param.service.ParamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import com.mortals.framework.model.Context;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.module.product.model.ProductInterfaceLogEntity;
import com.mortals.xhx.module.product.service.ProductInterfaceLogService;
import org.apache.commons.lang3.ArrayUtils;
import com.mortals.framework.util.StringUtils;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import com.alibaba.fastjson.JSONObject;
import java.util.Arrays;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import static com.mortals.framework.ap.SysConstains.*;
/**
*
* 产品接口
*
* @author zxfei
* @date 2023-07-18
*/
@RestController
@RequestMapping("product/interface/log")
public class ProductInterfaceLogController extends BaseCRUDJsonBodyMappingController<ProductInterfaceLogService,ProductInterfaceLogEntity,Long> {
@Autowired
private ParamService paramService;
public ProductInterfaceLogController(){
super.setModuleDesc( "产品接口");
}
@Override
protected void init(Map<String, Object> model, Context context) {
super.init(model, context);
}
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.module.product.dao.ibatis.ProductInterfaceLogDaoImpl">
<!-- 字段和属性映射 -->
<resultMap type="ProductInterfaceLogEntity" id="ProductInterfaceLogEntity-Map">
<id property="id" column="id" />
<result property="interfaceId" column="interfaceId" />
<result property="requestParameters" column="requestParameters" />
<result property="version" column="version" />
<result property="content" column="content" />
<result property="remark" column="remark" />
<result property="createUserId" column="createUserId" />
<result property="createTime" column="createTime" />
<result property="updateUserId" column="updateUserId" />
<result property="updateTime" column="updateTime" />
</resultMap>
<!-- 表所有列 -->
<sql id="_columns">
<trim suffixOverrides="," suffix="">
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('id') or colPickMode == 1 and data.containsKey('id')))">
a.id,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('interfaceId') or colPickMode == 1 and data.containsKey('interfaceId')))">
a.interfaceId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('requestParameters') or colPickMode == 1 and data.containsKey('requestParameters')))">
a.requestParameters,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('version') or colPickMode == 1 and data.containsKey('version')))">
a.version,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('content') or colPickMode == 1 and data.containsKey('content')))">
a.content,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('remark') or colPickMode == 1 and data.containsKey('remark')))">
a.remark,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createUserId') or colPickMode == 1 and data.containsKey('createUserId')))">
a.createUserId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createTime') or colPickMode == 1 and data.containsKey('createTime')))">
a.createTime,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateUserId') or colPickMode == 1 and data.containsKey('updateUserId')))">
a.updateUserId,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))">
a.updateTime,
</if>
</trim>
</sql>
<!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="ProductInterfaceLogEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_product_interface_log
(interfaceId,requestParameters,version,content,remark,createUserId,createTime,updateUserId,updateTime)
VALUES
(#{interfaceId},#{requestParameters},#{version},#{content},#{remark},#{createUserId},#{createTime},#{updateUserId},#{updateTime})
</insert>
<!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_product_interface_log
(interfaceId,requestParameters,version,content,remark,createUserId,createTime,updateUserId,updateTime)
VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.interfaceId},#{item.requestParameters},#{item.version},#{item.content},#{item.remark},#{item.createUserId},#{item.createTime},#{item.updateUserId},#{item.updateTime})
</foreach>
</insert>
<!-- 根据ParamDto更新 -->
<update id="update" parameterType="paramDto">
update mortals_xhx_product_interface_log as a
set
<trim suffixOverrides="," suffix="">
<if test="(colPickMode==0 and data.containsKey('interfaceId')) or (colPickMode==1 and !data.containsKey('interfaceId'))">
a.interfaceId=#{data.interfaceId},
</if>
<if test="(colPickMode==0 and data.containsKey('interfaceIdIncrement')) or (colPickMode==1 and !data.containsKey('interfaceIdIncrement'))">
a.interfaceId=ifnull(a.interfaceId,0) + #{data.interfaceIdIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('requestParameters')) or (colPickMode==1 and !data.containsKey('requestParameters'))">
a.requestParameters=#{data.requestParameters},
</if>
<if test="(colPickMode==0 and data.containsKey('version')) or (colPickMode==1 and !data.containsKey('version'))">
a.version=#{data.version},
</if>
<if test="(colPickMode==0 and data.containsKey('content')) or (colPickMode==1 and !data.containsKey('content'))">
a.content=#{data.content},
</if>
<if test="(colPickMode==0 and data.containsKey('remark')) or (colPickMode==1 and !data.containsKey('remark'))">
a.remark=#{data.remark},
</if>
<if test="(colPickMode==0 and data.containsKey('createUserId')) or (colPickMode==1 and !data.containsKey('createUserId'))">
a.createUserId=#{data.createUserId},
</if>
<if test="(colPickMode==0 and data.containsKey('createUserIdIncrement')) or (colPickMode==1 and !data.containsKey('createUserIdIncrement'))">
a.createUserId=ifnull(a.createUserId,0) + #{data.createUserIdIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('createTime')) or (colPickMode==1 and !data.containsKey('createTime'))">
a.createTime=#{data.createTime},
</if>
<if test="(colPickMode==0 and data.containsKey('updateUserId')) or (colPickMode==1 and !data.containsKey('updateUserId'))">
a.updateUserId=#{data.updateUserId},
</if>
<if test="(colPickMode==0 and data.containsKey('updateUserIdIncrement')) or (colPickMode==1 and !data.containsKey('updateUserIdIncrement'))">
a.updateUserId=ifnull(a.updateUserId,0) + #{data.updateUserIdIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('updateTime')) or (colPickMode==1 and !data.containsKey('updateTime'))">
a.updateTime=#{data.updateTime},
</if>
</trim>
<trim suffixOverrides="where" suffix="">
where
<trim prefixOverrides="and" prefix="">
<include refid="_condition_"/>
</trim>
</trim>
</update>
<!-- 批量更新 -->
<update id="updateBatch" parameterType="paramDto">
update mortals_xhx_product_interface_log as a
<trim prefix="set" suffixOverrides=",">
<trim prefix="interfaceId=(case" suffix="ELSE interfaceId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('interfaceId')) or (colPickMode==1 and !item.containsKey('interfaceId'))">
when a.id=#{item.id} then #{item.interfaceId}
</when>
<when test="(colPickMode==0 and item.containsKey('interfaceIdIncrement')) or (colPickMode==1 and !item.containsKey('interfaceIdIncrement'))">
when a.id=#{item.id} then ifnull(a.interfaceId,0) + #{item.interfaceIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="requestParameters=(case" suffix="ELSE requestParameters end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('requestParameters')) or (colPickMode==1 and !item.containsKey('requestParameters'))">
when a.id=#{item.id} then #{item.requestParameters}
</if>
</foreach>
</trim>
<trim prefix="version=(case" suffix="ELSE version end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('version')) or (colPickMode==1 and !item.containsKey('version'))">
when a.id=#{item.id} then #{item.version}
</if>
</foreach>
</trim>
<trim prefix="content=(case" suffix="ELSE content end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('content')) or (colPickMode==1 and !item.containsKey('content'))">
when a.id=#{item.id} then #{item.content}
</if>
</foreach>
</trim>
<trim prefix="remark=(case" suffix="ELSE remark end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('remark')) or (colPickMode==1 and !item.containsKey('remark'))">
when a.id=#{item.id} then #{item.remark}
</if>
</foreach>
</trim>
<trim prefix="createUserId=(case" suffix="ELSE createUserId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('createUserId')) or (colPickMode==1 and !item.containsKey('createUserId'))">
when a.id=#{item.id} then #{item.createUserId}
</when>
<when test="(colPickMode==0 and item.containsKey('createUserIdIncrement')) or (colPickMode==1 and !item.containsKey('createUserIdIncrement'))">
when a.id=#{item.id} then ifnull(a.createUserId,0) + #{item.createUserIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="createTime=(case" suffix="ELSE createTime end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('createTime')) or (colPickMode==1 and !item.containsKey('createTime'))">
when a.id=#{item.id} then #{item.createTime}
</if>
</foreach>
</trim>
<trim prefix="updateUserId=(case" suffix="ELSE updateUserId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('updateUserId')) or (colPickMode==1 and !item.containsKey('updateUserId'))">
when a.id=#{item.id} then #{item.updateUserId}
</when>
<when test="(colPickMode==0 and item.containsKey('updateUserIdIncrement')) or (colPickMode==1 and !item.containsKey('updateUserIdIncrement'))">
when a.id=#{item.id} then ifnull(a.updateUserId,0) + #{item.updateUserIdIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="updateTime=(case" suffix="ELSE updateTime end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('updateTime')) or (colPickMode==1 and !item.containsKey('updateTime'))">
when a.id=#{item.id} then #{item.updateTime}
</if>
</foreach>
</trim>
</trim>
where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
#{item.id}
</foreach>
</update>
<!-- 根据主健查询 -->
<select id="getByKey" parameterType="paramDto" resultMap="ProductInterfaceLogEntity-Map">
select <include refid="_columns"/>
from mortals_xhx_product_interface_log as a
where a.id=#{condition.id}
</select>
<!-- 根据主健删除 -->
<delete id="deleteByKey" parameterType="paramDto">
delete a.* from mortals_xhx_product_interface_log as a where a.id=#{condition.id}
</delete>
<!-- 根据主健删除一批,针对单一主健有效 -->
<delete id="deleteByKeys">
delete from mortals_xhx_product_interface_log where id in
<foreach collection="array" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
<!-- 根据主健列表删除一批,针对单一主健有效 -->
<delete id="deleteByKeyList">
delete from mortals_xhx_product_interface_log where id in
<foreach collection="list" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
<!-- 根据对象列表删除一批,针对单一主健有效 -->
<delete id="deleteByEntityList">
delete from mortals_xhx_product_interface_log where id in
<foreach collection="list" item="item" index="index" open="(" separator="," close=")">
#{item.id}
</foreach>
</delete>
<!-- 根据paramDto删除一批 -->
<delete id="deleteByMap" parameterType="paramDto">
delete a.* from mortals_xhx_product_interface_log as a
<trim suffixOverrides="where" suffix="">
where
<trim prefixOverrides="and" prefix="">
<include refid="_condition_"/>
</trim>
</trim>
</delete>
<!-- 获取列表 -->
<select id="getList" parameterType="paramDto" resultMap="ProductInterfaceLogEntity-Map">
select <include refid="_columns"/>
from mortals_xhx_product_interface_log as a
<trim suffixOverrides="where" suffix="">
where
<trim prefixOverrides="and" prefix="">
<include refid="_condition_"/>
</trim>
</trim>
<include refid="_orderCols_"/>
</select>
<!-- 获取 -->
<select id="getListCount" parameterType="paramDto" resultType="int">
select count(1)
from mortals_xhx_product_interface_log as a
<trim suffixOverrides="where" suffix="">
where
<trim prefixOverrides="and" prefix="">
<include refid="_condition_"/>
</trim>
</trim>
</select>
<!-- 条件映射 -->
<sql id="_condition_">
<if test="condition != null and !condition.isEmpty()">
<!-- 条件映射-普通条件 -->
<include refid="_condition_param_">
<property name="_conditionParam_" value="condition"/>
<property name="_conditionType_" value="and"/>
</include>
<!-- 条件映射-集合之间使用AND,集合中元素使用OR-(list[0].1 or list[0].2) and (list[1].3 or list[1].4) -->
<if test="condition.containsKey('andConditionList') and !condition.andConditionList.isEmpty()">
and
<foreach collection="condition.andConditionList" open="(" close=")" index="index" item="andCondition" separator=" and ">
<trim prefixOverrides="or" prefix="(" suffix=")">
<include refid="_condition_param_">
<property name="_conditionParam_" value="andCondition"/>
<property name="_conditionType_" value="or"/>
</include>
</trim>
</foreach>
</if>
<!-- 条件映射-集合之间使用OR,集合中元素使用AND-(list[0].1 and list[0].2) or (list[1].3 and list[1].4) -->
<if test="condition.containsKey('orConditionList') and !condition.orConditionList.isEmpty()">
and
<foreach collection="condition.orConditionList" open="(" close=")" index="index" item="orCondition" separator=" or ">
<trim prefixOverrides="and" prefix="(" suffix=")">
<include refid="_condition_param_">
<property name="_conditionParam_" value="orCondition"/>
<property name="_conditionType_" value="and"/>
</include>
</trim>
</foreach>
</if>
</if>
</sql>
<!-- 条件映射-代参数 -->
<sql id="_condition_param_">
<bind name="conditionParamRef" value="${_conditionParam_}"/>
<if test="conditionParamRef.containsKey('id')">
<if test="conditionParamRef.id != null">
${_conditionType_} a.id=#{${_conditionParam_}.id}
</if>
</if>
<if test="conditionParamRef.containsKey('id')">
<if test="conditionParamRef.id != null ">
${_conditionType_} a.id = #{${_conditionParam_}.id}
</if>
<if test="conditionParamRef.id == null">
${_conditionType_} a.id is null
</if>
</if>
<if test="conditionParamRef.containsKey('idList') and conditionParamRef.idList.size() > 0">
${_conditionType_} a.id in
<foreach collection="conditionParamRef.idList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('idNotList') and conditionParamRef.idNotList.size() > 0">
${_conditionType_} a.id not in
<foreach collection="conditionParamRef.idNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('idStart') and conditionParamRef.idStart != null">
${_conditionType_} a.id <![CDATA[ >= ]]> #{${_conditionParam_}.idStart}
</if>
<if test="conditionParamRef.containsKey('idEnd') and conditionParamRef.idEnd != null">
${_conditionType_} a.id <![CDATA[ <= ]]> #{${_conditionParam_}.idEnd}
</if>
<if test="conditionParamRef.containsKey('interfaceId')">
<if test="conditionParamRef.interfaceId != null ">
${_conditionType_} a.interfaceId = #{${_conditionParam_}.interfaceId}
</if>
<if test="conditionParamRef.interfaceId == null">
${_conditionType_} a.interfaceId is null
</if>
</if>
<if test="conditionParamRef.containsKey('interfaceIdList') and conditionParamRef.interfaceIdList.size() > 0">
${_conditionType_} a.interfaceId in
<foreach collection="conditionParamRef.interfaceIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('interfaceIdNotList') and conditionParamRef.interfaceIdNotList.size() > 0">
${_conditionType_} a.interfaceId not in
<foreach collection="conditionParamRef.interfaceIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('interfaceIdStart') and conditionParamRef.interfaceIdStart != null">
${_conditionType_} a.interfaceId <![CDATA[ >= ]]> #{${_conditionParam_}.interfaceIdStart}
</if>
<if test="conditionParamRef.containsKey('interfaceIdEnd') and conditionParamRef.interfaceIdEnd != null">
${_conditionType_} a.interfaceId <![CDATA[ <= ]]> #{${_conditionParam_}.interfaceIdEnd}
</if>
<if test="conditionParamRef.containsKey('requestParameters')">
<if test="conditionParamRef.requestParameters != null and conditionParamRef.requestParameters != ''">
${_conditionType_} a.requestParameters like #{${_conditionParam_}.requestParameters}
</if>
<if test="conditionParamRef.requestParameters == null">
${_conditionType_} a.requestParameters is null
</if>
</if>
<if test="conditionParamRef.containsKey('requestParametersList') and conditionParamRef.requestParametersList.size() > 0">
${_conditionType_} a.requestParameters in
<foreach collection="conditionParamRef.requestParametersList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('requestParametersNotList') and conditionParamRef.requestParametersNotList.size() > 0">
${_conditionType_} a.requestParameters not in
<foreach collection="conditionParamRef.requestParametersNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('version')">
<if test="conditionParamRef.version != null and conditionParamRef.version != ''">
${_conditionType_} a.version like #{${_conditionParam_}.version}
</if>
<if test="conditionParamRef.version == null">
${_conditionType_} a.version is null
</if>
</if>
<if test="conditionParamRef.containsKey('versionList') and conditionParamRef.versionList.size() > 0">
${_conditionType_} a.version in
<foreach collection="conditionParamRef.versionList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('versionNotList') and conditionParamRef.versionNotList.size() > 0">
${_conditionType_} a.version not in
<foreach collection="conditionParamRef.versionNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('content')">
<if test="conditionParamRef.content != null and conditionParamRef.content != ''">
${_conditionType_} a.content like #{${_conditionParam_}.content}
</if>
<if test="conditionParamRef.content == null">
${_conditionType_} a.content is null
</if>
</if>
<if test="conditionParamRef.containsKey('contentList') and conditionParamRef.contentList.size() > 0">
${_conditionType_} a.content in
<foreach collection="conditionParamRef.contentList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('contentNotList') and conditionParamRef.contentNotList.size() > 0">
${_conditionType_} a.content not in
<foreach collection="conditionParamRef.contentNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('remark')">
<if test="conditionParamRef.remark != null and conditionParamRef.remark != ''">
${_conditionType_} a.remark like #{${_conditionParam_}.remark}
</if>
<if test="conditionParamRef.remark == null">
${_conditionType_} a.remark is null
</if>
</if>
<if test="conditionParamRef.containsKey('remarkList') and conditionParamRef.remarkList.size() > 0">
${_conditionType_} a.remark in
<foreach collection="conditionParamRef.remarkList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('remarkNotList') and conditionParamRef.remarkNotList.size() > 0">
${_conditionType_} a.remark not in
<foreach collection="conditionParamRef.remarkNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('createUserId')">
<if test="conditionParamRef.createUserId != null ">
${_conditionType_} a.createUserId = #{${_conditionParam_}.createUserId}
</if>
<if test="conditionParamRef.createUserId == null">
${_conditionType_} a.createUserId is null
</if>
</if>
<if test="conditionParamRef.containsKey('createUserIdList') and conditionParamRef.createUserIdList.size() > 0">
${_conditionType_} a.createUserId in
<foreach collection="conditionParamRef.createUserIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('createUserIdNotList') and conditionParamRef.createUserIdNotList.size() > 0">
${_conditionType_} a.createUserId not in
<foreach collection="conditionParamRef.createUserIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('createUserIdStart') and conditionParamRef.createUserIdStart != null">
${_conditionType_} a.createUserId <![CDATA[ >= ]]> #{${_conditionParam_}.createUserIdStart}
</if>
<if test="conditionParamRef.containsKey('createUserIdEnd') and conditionParamRef.createUserIdEnd != null">
${_conditionType_} a.createUserId <![CDATA[ <= ]]> #{${_conditionParam_}.createUserIdEnd}
</if>
<if test="conditionParamRef.containsKey('createTime')">
<if test="conditionParamRef.createTime != null ">
${_conditionType_} a.createTime = #{${_conditionParam_}.createTime}
</if>
<if test="conditionParamRef.createTime == null">
${_conditionType_} a.createTime is null
</if>
</if>
<if test="conditionParamRef.containsKey('createTimeStart') and conditionParamRef.createTimeStart != null and conditionParamRef.createTimeStart!=''">
${_conditionType_} a.createTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.createTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('createTimeEnd') and conditionParamRef.createTimeEnd != null and conditionParamRef.createTimeEnd!=''">
${_conditionType_} a.createTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.createTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('updateUserId')">
<if test="conditionParamRef.updateUserId != null ">
${_conditionType_} a.updateUserId = #{${_conditionParam_}.updateUserId}
</if>
<if test="conditionParamRef.updateUserId == null">
${_conditionType_} a.updateUserId is null
</if>
</if>
<if test="conditionParamRef.containsKey('updateUserIdList') and conditionParamRef.updateUserIdList.size() > 0">
${_conditionType_} a.updateUserId in
<foreach collection="conditionParamRef.updateUserIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('updateUserIdNotList') and conditionParamRef.updateUserIdNotList.size() > 0">
${_conditionType_} a.updateUserId not in
<foreach collection="conditionParamRef.updateUserIdNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('updateUserIdStart') and conditionParamRef.updateUserIdStart != null">
${_conditionType_} a.updateUserId <![CDATA[ >= ]]> #{${_conditionParam_}.updateUserIdStart}
</if>
<if test="conditionParamRef.containsKey('updateUserIdEnd') and conditionParamRef.updateUserIdEnd != null">
${_conditionType_} a.updateUserId <![CDATA[ <= ]]> #{${_conditionParam_}.updateUserIdEnd}
</if>
<if test="conditionParamRef.containsKey('updateTime')">
<if test="conditionParamRef.updateTime != null ">
${_conditionType_} a.updateTime = #{${_conditionParam_}.updateTime}
</if>
<if test="conditionParamRef.updateTime == null">
${_conditionType_} a.updateTime is null
</if>
</if>
<if test="conditionParamRef.containsKey('updateTimeStart') and conditionParamRef.updateTimeStart != null and conditionParamRef.updateTimeStart!=''">
${_conditionType_} a.updateTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('updateTimeEnd') and conditionParamRef.updateTimeEnd != null and conditionParamRef.updateTimeEnd!=''">
${_conditionType_} a.updateTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
</sql>
<sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()">
order by
<trim suffixOverrides="," suffix="">
<foreach collection="orderColList" open="" close="" index="index" item="item" separator=",">
${item.colName} ${item.sortKind}
</foreach>
</trim>
</if>
<if test="(orderColList == null or orderColList.isEmpty()) and orderCol != null and !orderCol.isEmpty()">
order by
<trim suffixOverrides="," suffix="">
<if test="orderCol.containsKey('id')">
a.id
<if test='orderCol.id != null and "DESC".equalsIgnoreCase(orderCol.id)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('interfaceId')">
a.interfaceId
<if test='orderCol.interfaceId != null and "DESC".equalsIgnoreCase(orderCol.interfaceId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('requestParameters')">
a.requestParameters
<if test='orderCol.requestParameters != null and "DESC".equalsIgnoreCase(orderCol.requestParameters)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('version')">
a.version
<if test='orderCol.version != null and "DESC".equalsIgnoreCase(orderCol.version)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('content')">
a.content
<if test='orderCol.content != null and "DESC".equalsIgnoreCase(orderCol.content)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('remark')">
a.remark
<if test='orderCol.remark != null and "DESC".equalsIgnoreCase(orderCol.remark)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('createUserId')">
a.createUserId
<if test='orderCol.createUserId != null and "DESC".equalsIgnoreCase(orderCol.createUserId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('createTime')">
a.createTime
<if test='orderCol.createTime != null and "DESC".equalsIgnoreCase(orderCol.createTime)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('updateUserId')">
a.updateUserId
<if test='orderCol.updateUserId != null and "DESC".equalsIgnoreCase(orderCol.updateUserId)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('updateTime')">
a.updateTime
<if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if>
,
</if>
</trim>
</if>
</sql>
<sql id="_group_by_">
<if test="groupList != null and !groupList.isEmpty()">
GROUP BY
<trim suffixOverrides="," suffix="">
<foreach collection="groupList" open="" close="" index="index" item="item" separator=",">
${item}
</foreach>
</trim>
</if>
</sql>
</mapper>
\ No newline at end of file
...@@ -24,13 +24,27 @@ ...@@ -24,13 +24,27 @@
<result property="outEncrypt" column="outEncrypt" /> <result property="outEncrypt" column="outEncrypt" />
<result property="responseParameters" column="responseParameters" /> <result property="responseParameters" column="responseParameters" />
<result property="remark" column="remark" /> <result property="remark" column="remark" />
<result property="normalResponse" column="normalResponse" />
<result property="abnormalResponse" column="abnormalResponse" />
<result property="authInfo" column="authInfo" />
<result property="flowInfo" column="flowInfo" />
<result property="createUserId" column="createUserId" />
<result property="createTime" column="createTime" />
<result property="updateUserId" column="updateUserId" />
<result property="updateTime" column="updateTime" />
<collection property="productInterfaceLogList" column="id" ofType="ProductInterfaceLogEntity" javaType="ArrayList" select="getProductInterfaceLogByInterfaceId"></collection>
</resultMap>
<resultMap type="ProductInterfaceLogEntity" id="ProductInterfaceLogEntity-Map">
<result property="id" column="id" />
<result property="interfaceId" column="interfaceId" />
<result property="requestParameters" column="requestParameters" />
<result property="version" column="version" />
<result property="content" column="content" />
<result property="remark" column="remark" />
<result property="createUserId" column="createUserId" /> <result property="createUserId" column="createUserId" />
<result property="createTime" column="createTime" /> <result property="createTime" column="createTime" />
<result property="updateUserId" column="updateUserId" /> <result property="updateUserId" column="updateUserId" />
<result property="updateTime" column="updateTime" /> <result property="updateTime" column="updateTime" />
<result property="normalResponse" column="normalResponse" />
<result property="abnormalResponse" column="abnormalResponse" />
</resultMap> </resultMap>
...@@ -94,6 +108,18 @@ ...@@ -94,6 +108,18 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('remark') or colPickMode == 1 and data.containsKey('remark')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('remark') or colPickMode == 1 and data.containsKey('remark')))">
a.remark, a.remark,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('normalResponse') or colPickMode == 1 and data.containsKey('normalResponse')))">
a.normalResponse,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('abnormalResponse') or colPickMode == 1 and data.containsKey('abnormalResponse')))">
a.abnormalResponse,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('authInfo') or colPickMode == 1 and data.containsKey('authInfo')))">
a.authInfo,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('flowInfo') or colPickMode == 1 and data.containsKey('flowInfo')))">
a.flowInfo,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createUserId') or colPickMode == 1 and data.containsKey('createUserId')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createUserId') or colPickMode == 1 and data.containsKey('createUserId')))">
a.createUserId, a.createUserId,
</if> </if>
...@@ -106,29 +132,29 @@ ...@@ -106,29 +132,29 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))">
a.updateTime, a.updateTime,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('normalResponse') or colPickMode == 1 and data.containsKey('normalResponse')))"> </trim>
a.normalResponse, </sql>
</if> <!-- 子表所有列 -->
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('abnormalResponse') or colPickMode == 1 and data.containsKey('abnormalResponse')))"> <sql id="_columns_sub">
a.abnormalResponse, <trim suffixOverrides="," suffix="">
</if> b.id,b.interfaceId,b.requestParameters,b.version,b.content,b.remark,b.createUserId,b.createTime,b.updateUserId,b.updateTime,
</trim> </trim>
</sql> </sql>
<!-- 新增 区分主键自增加还是业务插入 --> <!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="ProductInterfaceEntity" useGeneratedKeys="true" keyProperty="id"> <insert id="insert" parameterType="ProductInterfaceEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_product_interface insert into mortals_xhx_product_interface
(productId,interfaceName,versionNumber,requestType,requestProtocol,requestUrl,timeoutValue,limitStrategy,network,description,contentType,interfaceTag,interfaceSource,inEncrypt,requestParameters,outEncrypt,responseParameters,remark,createUserId,createTime,updateUserId,updateTime,normalResponse,abnormalResponse) (productId,interfaceName,versionNumber,requestType,requestProtocol,requestUrl,timeoutValue,limitStrategy,network,description,contentType,interfaceTag,interfaceSource,inEncrypt,requestParameters,outEncrypt,responseParameters,remark,normalResponse,abnormalResponse,authInfo,flowInfo,createUserId,createTime,updateUserId,updateTime)
VALUES VALUES
(#{productId},#{interfaceName},#{versionNumber},#{requestType},#{requestProtocol},#{requestUrl},#{timeoutValue},#{limitStrategy},#{network},#{description},#{contentType},#{interfaceTag},#{interfaceSource},#{inEncrypt},#{requestParameters},#{outEncrypt},#{responseParameters},#{remark},#{createUserId},#{createTime},#{updateUserId},#{updateTime},#{normalResponse},#{abnormalResponse}) (#{productId},#{interfaceName},#{versionNumber},#{requestType},#{requestProtocol},#{requestUrl},#{timeoutValue},#{limitStrategy},#{network},#{description},#{contentType},#{interfaceTag},#{interfaceSource},#{inEncrypt},#{requestParameters},#{outEncrypt},#{responseParameters},#{remark},#{normalResponse},#{abnormalResponse},#{authInfo},#{flowInfo},#{createUserId},#{createTime},#{updateUserId},#{updateTime})
</insert> </insert>
<!-- 批量新增 --> <!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto"> <insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_product_interface insert into mortals_xhx_product_interface
(productId,interfaceName,versionNumber,requestType,requestProtocol,requestUrl,timeoutValue,limitStrategy,network,description,contentType,interfaceTag,interfaceSource,inEncrypt,requestParameters,outEncrypt,responseParameters,remark,createUserId,createTime,updateUserId,updateTime,normalResponse,abnormalResponse) (productId,interfaceName,versionNumber,requestType,requestProtocol,requestUrl,timeoutValue,limitStrategy,network,description,contentType,interfaceTag,interfaceSource,inEncrypt,requestParameters,outEncrypt,responseParameters,remark,normalResponse,abnormalResponse,authInfo,flowInfo,createUserId,createTime,updateUserId,updateTime)
VALUES VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," > <foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.productId},#{item.interfaceName},#{item.versionNumber},#{item.requestType},#{item.requestProtocol},#{item.requestUrl},#{item.timeoutValue},#{item.limitStrategy},#{item.network},#{item.description},#{item.contentType},#{item.interfaceTag},#{item.interfaceSource},#{item.inEncrypt},#{item.requestParameters},#{item.outEncrypt},#{item.responseParameters},#{item.remark},#{item.createUserId},#{item.createTime},#{item.updateUserId},#{item.updateTime},#{item.normalResponse},#{item.abnormalResponse}) (#{item.productId},#{item.interfaceName},#{item.versionNumber},#{item.requestType},#{item.requestProtocol},#{item.requestUrl},#{item.timeoutValue},#{item.limitStrategy},#{item.network},#{item.description},#{item.contentType},#{item.interfaceTag},#{item.interfaceSource},#{item.inEncrypt},#{item.requestParameters},#{item.outEncrypt},#{item.responseParameters},#{item.remark},#{item.normalResponse},#{item.abnormalResponse},#{item.authInfo},#{item.flowInfo},#{item.createUserId},#{item.createTime},#{item.updateUserId},#{item.updateTime})
</foreach> </foreach>
</insert> </insert>
...@@ -219,6 +245,18 @@ ...@@ -219,6 +245,18 @@
<if test="(colPickMode==0 and data.containsKey('remark')) or (colPickMode==1 and !data.containsKey('remark'))"> <if test="(colPickMode==0 and data.containsKey('remark')) or (colPickMode==1 and !data.containsKey('remark'))">
a.remark=#{data.remark}, a.remark=#{data.remark},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('normalResponse')) or (colPickMode==1 and !data.containsKey('normalResponse'))">
a.normalResponse=#{data.normalResponse},
</if>
<if test="(colPickMode==0 and data.containsKey('abnormalResponse')) or (colPickMode==1 and !data.containsKey('abnormalResponse'))">
a.abnormalResponse=#{data.abnormalResponse},
</if>
<if test="(colPickMode==0 and data.containsKey('authInfo')) or (colPickMode==1 and !data.containsKey('authInfo'))">
a.authInfo=#{data.authInfo},
</if>
<if test="(colPickMode==0 and data.containsKey('flowInfo')) or (colPickMode==1 and !data.containsKey('flowInfo'))">
a.flowInfo=#{data.flowInfo},
</if>
<if test="(colPickMode==0 and data.containsKey('createUserId')) or (colPickMode==1 and !data.containsKey('createUserId'))"> <if test="(colPickMode==0 and data.containsKey('createUserId')) or (colPickMode==1 and !data.containsKey('createUserId'))">
a.createUserId=#{data.createUserId}, a.createUserId=#{data.createUserId},
</if> </if>
...@@ -237,12 +275,6 @@ ...@@ -237,12 +275,6 @@
<if test="(colPickMode==0 and data.containsKey('updateTime')) or (colPickMode==1 and !data.containsKey('updateTime'))"> <if test="(colPickMode==0 and data.containsKey('updateTime')) or (colPickMode==1 and !data.containsKey('updateTime'))">
a.updateTime=#{data.updateTime}, a.updateTime=#{data.updateTime},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('normalResponse')) or (colPickMode==1 and !data.containsKey('normalResponse'))">
a.normalResponse=#{data.normalResponse},
</if>
<if test="(colPickMode==0 and data.containsKey('abnormalResponse')) or (colPickMode==1 and !data.containsKey('abnormalResponse'))">
a.abnormalResponse=#{data.abnormalResponse},
</if>
</trim> </trim>
<trim suffixOverrides="where" suffix=""> <trim suffixOverrides="where" suffix="">
where where
...@@ -426,6 +458,34 @@ ...@@ -426,6 +458,34 @@
</if> </if>
</foreach> </foreach>
</trim> </trim>
<trim prefix="normalResponse=(case" suffix="ELSE normalResponse end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('normalResponse')) or (colPickMode==1 and !item.containsKey('normalResponse'))">
when a.id=#{item.id} then #{item.normalResponse}
</if>
</foreach>
</trim>
<trim prefix="abnormalResponse=(case" suffix="ELSE abnormalResponse end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('abnormalResponse')) or (colPickMode==1 and !item.containsKey('abnormalResponse'))">
when a.id=#{item.id} then #{item.abnormalResponse}
</if>
</foreach>
</trim>
<trim prefix="authInfo=(case" suffix="ELSE authInfo end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('authInfo')) or (colPickMode==1 and !item.containsKey('authInfo'))">
when a.id=#{item.id} then #{item.authInfo}
</if>
</foreach>
</trim>
<trim prefix="flowInfo=(case" suffix="ELSE flowInfo end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('flowInfo')) or (colPickMode==1 and !item.containsKey('flowInfo'))">
when a.id=#{item.id} then #{item.flowInfo}
</if>
</foreach>
</trim>
<trim prefix="createUserId=(case" suffix="ELSE createUserId end),"> <trim prefix="createUserId=(case" suffix="ELSE createUserId end),">
<foreach collection="data.dataList" item="item" index="index" separator="" > <foreach collection="data.dataList" item="item" index="index" separator="" >
<choose> <choose>
...@@ -464,20 +524,6 @@ ...@@ -464,20 +524,6 @@
</if> </if>
</foreach> </foreach>
</trim> </trim>
<trim prefix="normalResponse=(case" suffix="ELSE normalResponse end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('normalResponse')) or (colPickMode==1 and !item.containsKey('normalResponse'))">
when a.id=#{item.id} then #{item.normalResponse}
</if>
</foreach>
</trim>
<trim prefix="abnormalResponse=(case" suffix="ELSE abnormalResponse end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('abnormalResponse')) or (colPickMode==1 and !item.containsKey('abnormalResponse'))">
when a.id=#{item.id} then #{item.abnormalResponse}
</if>
</foreach>
</trim>
</trim> </trim>
where id in where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")"> <foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
...@@ -538,6 +584,14 @@ ...@@ -538,6 +584,14 @@
</trim> </trim>
<include refid="_orderCols_"/> <include refid="_orderCols_"/>
</select> </select>
<!-- 获取子列表 -->
<select id="getProductInterfaceLogByInterfaceId" parameterType="java.lang.Long" resultMap="ProductInterfaceLogEntity-Map">
select <include refid="_columns_sub"/>
from mortals_xhx_product_interface_log as b
<trim suffixOverrides="where" suffix="">
where b.interfaceId = #{id}
</trim>
</select>
...@@ -1053,6 +1107,90 @@ ...@@ -1053,6 +1107,90 @@
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('normalResponse')">
<if test="conditionParamRef.normalResponse != null and conditionParamRef.normalResponse != ''">
${_conditionType_} a.normalResponse like #{${_conditionParam_}.normalResponse}
</if>
<if test="conditionParamRef.normalResponse == null">
${_conditionType_} a.normalResponse is null
</if>
</if>
<if test="conditionParamRef.containsKey('normalResponseList') and conditionParamRef.normalResponseList.size() > 0">
${_conditionType_} a.normalResponse in
<foreach collection="conditionParamRef.normalResponseList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('normalResponseNotList') and conditionParamRef.normalResponseNotList.size() > 0">
${_conditionType_} a.normalResponse not in
<foreach collection="conditionParamRef.normalResponseNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('abnormalResponse')">
<if test="conditionParamRef.abnormalResponse != null and conditionParamRef.abnormalResponse != ''">
${_conditionType_} a.abnormalResponse like #{${_conditionParam_}.abnormalResponse}
</if>
<if test="conditionParamRef.abnormalResponse == null">
${_conditionType_} a.abnormalResponse is null
</if>
</if>
<if test="conditionParamRef.containsKey('abnormalResponseList') and conditionParamRef.abnormalResponseList.size() > 0">
${_conditionType_} a.abnormalResponse in
<foreach collection="conditionParamRef.abnormalResponseList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('abnormalResponseNotList') and conditionParamRef.abnormalResponseNotList.size() > 0">
${_conditionType_} a.abnormalResponse not in
<foreach collection="conditionParamRef.abnormalResponseNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('authInfo')">
<if test="conditionParamRef.authInfo != null and conditionParamRef.authInfo != ''">
${_conditionType_} a.authInfo like #{${_conditionParam_}.authInfo}
</if>
<if test="conditionParamRef.authInfo == null">
${_conditionType_} a.authInfo is null
</if>
</if>
<if test="conditionParamRef.containsKey('authInfoList') and conditionParamRef.authInfoList.size() > 0">
${_conditionType_} a.authInfo in
<foreach collection="conditionParamRef.authInfoList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('authInfoNotList') and conditionParamRef.authInfoNotList.size() > 0">
${_conditionType_} a.authInfo not in
<foreach collection="conditionParamRef.authInfoNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('flowInfo')">
<if test="conditionParamRef.flowInfo != null and conditionParamRef.flowInfo != ''">
${_conditionType_} a.flowInfo like #{${_conditionParam_}.flowInfo}
</if>
<if test="conditionParamRef.flowInfo == null">
${_conditionType_} a.flowInfo is null
</if>
</if>
<if test="conditionParamRef.containsKey('flowInfoList') and conditionParamRef.flowInfoList.size() > 0">
${_conditionType_} a.flowInfo in
<foreach collection="conditionParamRef.flowInfoList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('flowInfoNotList') and conditionParamRef.flowInfoNotList.size() > 0">
${_conditionType_} a.flowInfo not in
<foreach collection="conditionParamRef.flowInfoNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('createUserId')"> <if test="conditionParamRef.containsKey('createUserId')">
<if test="conditionParamRef.createUserId != null "> <if test="conditionParamRef.createUserId != null ">
${_conditionType_} a.createUserId = #{${_conditionParam_}.createUserId} ${_conditionType_} a.createUserId = #{${_conditionParam_}.createUserId}
...@@ -1137,48 +1275,6 @@ ...@@ -1137,48 +1275,6 @@
<if test="conditionParamRef.containsKey('updateTimeEnd') and conditionParamRef.updateTimeEnd != null and conditionParamRef.updateTimeEnd!=''"> <if test="conditionParamRef.containsKey('updateTimeEnd') and conditionParamRef.updateTimeEnd != null and conditionParamRef.updateTimeEnd!=''">
${_conditionType_} a.updateTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') ${_conditionType_} a.updateTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if> </if>
<if test="conditionParamRef.containsKey('normalResponse')">
<if test="conditionParamRef.normalResponse != null and conditionParamRef.normalResponse != ''">
${_conditionType_} a.normalResponse like #{${_conditionParam_}.normalResponse}
</if>
<if test="conditionParamRef.normalResponse == null">
${_conditionType_} a.normalResponse is null
</if>
</if>
<if test="conditionParamRef.containsKey('normalResponseList') and conditionParamRef.normalResponseList.size() > 0">
${_conditionType_} a.normalResponse in
<foreach collection="conditionParamRef.normalResponseList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('normalResponseNotList') and conditionParamRef.normalResponseNotList.size() > 0">
${_conditionType_} a.normalResponse not in
<foreach collection="conditionParamRef.normalResponseNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('abnormalResponse')">
<if test="conditionParamRef.abnormalResponse != null and conditionParamRef.abnormalResponse != ''">
${_conditionType_} a.abnormalResponse like #{${_conditionParam_}.abnormalResponse}
</if>
<if test="conditionParamRef.abnormalResponse == null">
${_conditionType_} a.abnormalResponse is null
</if>
</if>
<if test="conditionParamRef.containsKey('abnormalResponseList') and conditionParamRef.abnormalResponseList.size() > 0">
${_conditionType_} a.abnormalResponse in
<foreach collection="conditionParamRef.abnormalResponseList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('abnormalResponseNotList') and conditionParamRef.abnormalResponseNotList.size() > 0">
${_conditionType_} a.abnormalResponse not in
<foreach collection="conditionParamRef.abnormalResponseNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
</sql> </sql>
<sql id="_orderCols_"> <sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()"> <if test="orderColList != null and !orderColList.isEmpty()">
...@@ -1287,6 +1383,26 @@ ...@@ -1287,6 +1383,26 @@
<if test='orderCol.remark != null and "DESC".equalsIgnoreCase(orderCol.remark)'>DESC</if> <if test='orderCol.remark != null and "DESC".equalsIgnoreCase(orderCol.remark)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('normalResponse')">
a.normalResponse
<if test='orderCol.normalResponse != null and "DESC".equalsIgnoreCase(orderCol.normalResponse)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('abnormalResponse')">
a.abnormalResponse
<if test='orderCol.abnormalResponse != null and "DESC".equalsIgnoreCase(orderCol.abnormalResponse)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('authInfo')">
a.authInfo
<if test='orderCol.authInfo != null and "DESC".equalsIgnoreCase(orderCol.authInfo)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('flowInfo')">
a.flowInfo
<if test='orderCol.flowInfo != null and "DESC".equalsIgnoreCase(orderCol.flowInfo)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('createUserId')"> <if test="orderCol.containsKey('createUserId')">
a.createUserId a.createUserId
<if test='orderCol.createUserId != null and "DESC".equalsIgnoreCase(orderCol.createUserId)'>DESC</if> <if test='orderCol.createUserId != null and "DESC".equalsIgnoreCase(orderCol.createUserId)'>DESC</if>
...@@ -1307,16 +1423,6 @@ ...@@ -1307,16 +1423,6 @@
<if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if> <if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('normalResponse')">
a.normalResponse
<if test='orderCol.normalResponse != null and "DESC".equalsIgnoreCase(orderCol.normalResponse)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('abnormalResponse')">
a.abnormalResponse
<if test='orderCol.abnormalResponse != null and "DESC".equalsIgnoreCase(orderCol.abnormalResponse)'>DESC</if>
,
</if>
</trim> </trim>
</if> </if>
</sql> </sql>
......
###登录
POST {{baseUrl}}/login/login
Content-Type: application/json
{
"loginName":"admin",
"password":"admin",
"securityCode":"8888"
}
> {%
client.global.set("SmsSet_id", JSON.parse(response.body).data.id);
client.global.set("authToken", JSON.parse(response.body).data.token);
%}
###产品接口列表
POST {{baseUrl}}/product/interface/log/list
Content-Type: application/json
{
"page":1,
"size":10
}
###产品接口更新与保存
POST {{baseUrl}}/product/interface/log/save
Authorization: {{authToken}}
Content-Type: application/json
{
"interfaceId":62,
"requestParameters":"pb92dy",
"version":"8lkpuh",
"content":"e7kwqt",
"remark":"riyuuu",
}
> {%
client.global.set("ProductInterfaceLog_id", JSON.parse(response.body).data.id);
%}
###产品接口查看
GET {{baseUrl}}/product/interface/log/info?id={{ProductInterfaceLog_id}}
Accept: application/json
###产品接口编辑
GET {{baseUrl}}/product/interface/log/edit?id={{ProductInterfaceLog_id}}
Accept: application/json
###产品接口删除
GET {{baseUrl}}/product/interface/log/delete?id={{ProductInterfaceLog_id}}
Authorization: {{authToken}}
Accept: application/json
package com.mortals.xhx.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
public enum LimitStrategyEnum {
不限流(0, "不限流"),
一万次日(1, "10000次/日"),
一千次日(2, "1000次/日"),
一百次日(3, "100次/日"),
一千次小时(4, "1000次/小时"),
一百次小时(5, "100次/小时"),
一百次分钟(6, "100次/分钟"),
十次分钟(7, "10次/分钟"),
一次分钟(8, "1次/分钟");
private Integer value;
private String desc;
LimitStrategyEnum(Integer value, String desc) {
this.value = value;
this.desc = desc;
}
public Integer getValue() {
return this.value;
}
public String getDesc() {
return this.desc;
}
public static LimitStrategyEnum getByValue(Integer value) {
for (LimitStrategyEnum statusEnum : LimitStrategyEnum.values()) {
if (statusEnum.getValue() == value) {
return statusEnum;
}
}
return null;
}
/**
* 获取Map集合
*
* @param eItem 不包含项
* @return
*/
public static Map<String, String> getEnumMap(Integer... eItem) {
Map<String, String> resultMap = new LinkedHashMap<>();
for (LimitStrategyEnum item : LimitStrategyEnum.values()) {
try {
boolean hasE = false;
for (Integer e : eItem) {
if (item.getValue() == e) {
hasE = true;
break;
}
}
if (!hasE) {
resultMap.put(item.getValue() + "", item.getDesc());
}
} catch (Exception ex) {
}
}
return resultMap;
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment