Commit 229f8acb authored by 赵啸非's avatar 赵啸非

修改平台编码

parent 12e00717
......@@ -55,8 +55,10 @@ CREATE TABLE mortals_xhx_platform(
`platformName` varchar(20) NOT NULL COMMENT '平台名称,名称唯一',
`platformSn` varchar(256) NOT NULL COMMENT '平台编码,编码唯一(编码加上站点编码,如phxt-51010251-1做Vhost虚拟机编码)',
`sendMsgType` tinyint(2) NOT NULL COMMENT '发送第三方平台消息类型(0.http,1.jms)',
`sendConfig` varchar(2048) COMMENT '发送参数配置,如发送消息地址等,xml结构,根据消息类型变化',
`sendUrl` varchar(512) COMMENT '发送参数请求地址',
`callbackUrl` varchar(512) COMMENT '回调参数地址',
`sendSwitch` tinyint(2) NOT NULL COMMENT '是否启用发送消息(0.停用,1.启用)',
`homeUrl` varchar(512) COMMENT '首页地址',
`platformRemark` varchar(256) COMMENT '备注',
`createUserId` bigint(20) NOT NULL COMMENT '创建用户',
`createTime` datetime NOT NULL COMMENT '创建时间',
......@@ -64,6 +66,7 @@ CREATE TABLE mortals_xhx_platform(
`updateTime` datetime COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='平台系统';
-- ----------------------------
-- 产品表
-- ----------------------------
......
package com.mortals.xhx.base.system.message;
import com.mortals.xhx.busiz.req.DeviceReq;
import com.mortals.xhx.busiz.rsp.ApiResp;
import com.mortals.xhx.queue.TbQueueCallback;
import com.mortals.xhx.queue.TbQueueMsgHeaders;
import com.mortals.xhx.queue.TopicPartitionInfo;
......@@ -45,4 +47,8 @@ public interface MessageService {
String siteTree();
ApiResp<String> sendThirdParty(String sendUrl,Integer messageType, DeviceReq deviceReq);
}
\ No newline at end of file
......@@ -10,6 +10,9 @@ import com.mortals.framework.service.impl.AbstractCRUDCacheServiceImpl;
import com.mortals.framework.util.DateUtils;
import com.mortals.framework.util.HttpUtil;
import com.mortals.xhx.base.system.message.MessageService;
import com.mortals.xhx.busiz.req.ApiReq;
import com.mortals.xhx.busiz.req.ApiThirdPartyReq;
import com.mortals.xhx.busiz.req.DeviceReq;
import com.mortals.xhx.busiz.rsp.ApiResp;
import com.mortals.xhx.common.code.ApiRespCodeEnum;
import com.mortals.xhx.common.code.YesNoEnum;
......@@ -143,4 +146,21 @@ public class MessageServiceImpl implements MessageService {
return resp;
}
@Override
public ApiResp<String> sendThirdParty(String sendUrl,Integer messageType, DeviceReq deviceReq) {
ApiThirdPartyReq<DeviceReq> deviceReqApiReq = new ApiThirdPartyReq<>();
deviceReqApiReq.setCode(YesNoEnum.YES.getValue());
deviceReqApiReq.setType(messageType);
String resp = null;
try {
Map<String, String> header = new HashMap<>();
header.put(HEADER_CONTENT_TYPE, "application/json");
resp = HttpUtil.doPost(sendUrl, header, JSON.toJSONString(deviceReqApiReq));
return JSON.parseObject(resp,ApiResp.class);
} catch (Exception e) {
log.error("异常:", e);
}
return null;
}
}
\ No newline at end of file
......@@ -342,6 +342,12 @@ public class UserEntity extends UserEntityExt implements IUser {
public Long getSiteId() {
return this.siteId;
}
@Override
public String getSiteIds() {
return null;
}
/**
* 设置 站点id
* @param siteId
......
package com.mortals.xhx.busiz.req;
import lombok.Data;
@Data
public class ApiThirdPartyReq<T> {
/**
* 结果编码
*/
private int code;
/**
* 结果描述
*/
private String msg;
/**
* 0:设备增删改查,data数据域封装具体设备消息,1:设备消息类,数据域透传设备上行消息体。
*/
private Integer type;
/**
* 响应数据
*/
private T data;
}
......@@ -9,19 +9,27 @@ import java.io.Serializable;
@Data
public class DeviceReq implements Serializable {
/**
* 状态,0:新增,1:修改,2:删除,3:激活,4:上线,5:下线
*/
private Integer deviceStatus;
/**
* 平台系统编码
*/
private String platformCode;
/**
* 产品编码
*/
private String productCode;
/**
* 设备名称
*/
private String deviceName;
/**
* 设备编码(暂定mac地址)
*/
private String deviceCode;
/**
* mac地址
*/
private String deviceMac;
/**
* 所属站点编码
*/
......@@ -30,33 +38,10 @@ public class DeviceReq implements Serializable {
* 所属站点名称
*/
private String siteName;
/**
* 设备ip
*/
private String ip;
/**
* 设备端口
*/
private String port;
/**
* 平台id
*/
private Long platformId;
/**
* 产品Id
*/
private Long productId;
/**
* 设备备注信息
*/
private String deviceRemark;
public static void main(String[] args) {
// DeviceReq deviceReq = new DeviceReq();
// deviceReq.setIsAdmin();
// deviceReq.seti
}
}
......@@ -53,7 +53,6 @@ import java.util.stream.Collectors;
@Slf4j
@RequestMapping("/api")
public class DeviceApiController {
@Autowired
private DeviceService deviceService;
@Autowired
......@@ -64,7 +63,6 @@ public class DeviceApiController {
private IAuthTokenService authTokenService;
@Autowired
private PlatformService platformService;
@Value("${queue.rabbitmq.virtual_host:}")
private String virtualHost;
@Value("${queue.rabbitmq.password:}")
......
package com.mortals.xhx.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* 设备状态,1:新增,2:修改,3:删除,4:激活,5:上线,6:下线
*
* @author zxfei
*/
public enum DeviceStatusEnum {
ADD(1, "新增"),
UPDATE(2, "修改"),
DEL(3, "删除"),
ACTIVE(4, "激活"),
ONLINE(5, "上线"),
OFFLINE(6, "下线");
private Integer value;
private String desc;
DeviceStatusEnum(Integer value, String desc) {
this.value = value;
this.desc = desc;
}
public Integer getValue() {
return this.value;
}
public String getDesc() {
return this.desc;
}
public static DeviceStatusEnum getByValue(Integer value) {
for (DeviceStatusEnum deviceTypeEnum : DeviceStatusEnum.values()) {
if (deviceTypeEnum.getValue() == value) {
return deviceTypeEnum;
}
}
return null;
}
/**
* 获取Map集合
*
* @param eItem 不包含项
* @return
*/
public static Map<String, String> getEnumMap(Integer... eItem) {
Map<String, String> resultMap = new LinkedHashMap<>();
for (DeviceStatusEnum item : DeviceStatusEnum.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.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
public enum MessageTypeEnum {
CRUD(0, "设备增删改查"),
TRANSACTION(1, "设备消息类,数据域透传设备上行消息体");
private Integer value;
private String desc;
MessageTypeEnum(Integer value, String desc) {
this.value = value;
this.desc = desc;
}
public Integer getValue() {
return this.value;
}
public String getDesc() {
return this.desc;
}
public static MessageTypeEnum getByValue(Integer value) {
for (MessageTypeEnum sendMsgTypeEnum : MessageTypeEnum.values()) {
if (sendMsgTypeEnum.getValue() == value) {
return sendMsgTypeEnum;
}
}
return null;
}
/**
* 获取Map集合
*
* @param eItem 不包含项
* @return
*/
public static Map<String, String> getEnumMap(Integer... eItem) {
Map<String, String> resultMap = new LinkedHashMap<>();
for (MessageTypeEnum item : MessageTypeEnum.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.common.key;
/**
* 错误码
*
* @author: zxfei
* @date: 2022/5/12 14:56
*/
public interface ErrorCode {
public static final int STATUS_MS_EXCEPTION = 500;
public static final int STATUS_VALIDATE_EXCEPTION = 420;
public static final int STATUS_UNCHECKED_EXCEPTION = 605;
public static final int STATUS_TOKEN_NULL_EXCEPTION = 604;
public static final int STATUS_CODE_SUCCESS = 0;
public static final int STATUS_CODE_WARN = 1;
public static final int STATUS_CODE_ERROR = 2;
public static final int STATUS_CODE_INFO = 3;
public static final int STATUS_CODE_TOKEN_EXPIRED = 4;
public static final int STATUS_CODE_FATAL = 5;
public static final int STATUS_CODE_TRADE_PWD_NOT_SET = 6;
public static final int STATUS_ACCOUNT_LOCKED = 7;
public static final int STATUS_TRADE_PWD_OVER_THREE_TIME = 8;
public static final int STATUS_TRADE_PWD_ERROR = 9;
public static final int STATUS_EMPTY_PWD_ERROR = 10;
public static final int STATUS_TEL_NOT_RGI_ERROR = 11;
public static final int STATUS_TEL_ALREADY_REGI = 12;
public static final int STATUS_SAFETY_RISK = 13;
public static final int STATUS_LOGIN_CODE = 15;
public static final int BOOK_FAKUAN_CODE = 16;//还有未付款的订单code
public static final String ERROR_TOKEN_EXPIRED = "登陆过期,请重新登录";
public static final String ERROR_TRADE_PWD_OVER_THREE_TIME = "支付密码错误,请15分钟后再试";
public static final String ERROR_TRADE_PWD_ERROR = "支付密码错误,请重试";
public static final String ERROR_EMPTY_PWD_ERROR = "请设置登录密码";
public static final String ERROR_TEL_NOT_RGI = "该号码未注册";
public static final String ERROR_USERNAME_OR_PASSWORD = "用户名或者密码错误";
public static final String ERROR_TRADE_PWD = "交易密码错误";
public static final String ERROR_FORBIDDEN_OPER = "非法操作";
public static final String ERROR_TRADE_PWD_NOT_SET = "非法操作";
public static final String ERROR_NOT_REAL_NAME_AUTH = "您未实名认证,禁止该操作";
public static final String ERROR_INTERNAL_SERVER_ERROR = "服务器内部错误";
public static final String ERROR_UNAUTHORIZED = "token不正确或已过期";
public static final String ERROR_TOKEN_IS_NULL = "token不能为空";
public static final String ERROR_MISS_SERVLET = "服务不存在";
public static final String ERROR_CAPTCHA_OFTEN = "验证码已发送";
public static final String ERROR_CAPTCHA_WRONG = "验证码错误";
public static final String ERROR_TEL_ALREADY_REGI = "该手机号已被注册";
public static final String ERROR_CODE_DUPLICATE_KEY = "重复添加信息(含部分)";
public static final String ERROR_NOT_EXITS = "对应记录不存在";
public static final String ERROR_STATUS_CATEGORY = "状态错误";
public static final String ERROR_FRIEND_SHIP_ALREADY = "已经是你好友";
public static final String ERROR_FRIEND_SHIP_WAIT = "已向改好友发出邀请,等待接受";
public static final String ERROR_CODE_ACCOUNT_LOCKED = "账号被锁定,请联系客服";
public static final String WARN_ARGUMENT = "参数错误";
public static final String ERROR_USERNAME_EXIST = "该号码已被注册";
public static final String ERROR_SAFETY_RISK = "不在常用设备上登录";
public static final String INFO_TEL_BIND = "手机号码已经被绑定";
public static final String INFO_TEL_FORMAT_WRONG = "手机号码格式不正确";
public static final String ERROR_NOT_FOUND = "404 not found";
public static final String DISABLED="该账号已被封禁,如有疑问请联系平台";
public static final String DATENULL="缺少参数";
public static final String ERRDATE="无效参数";
public static final String ERRSTAE="状态异常";
public static final String EXTDATE="参数异常";
public static final String NUMEXE="账号异常";
public static final String CAPDON="资产已被冻结,如有疑问请联系平台";
public static final String CONOTS="操作失败";
public static final String OK="成功!";
public static final String TOKENX="身份验证失败,请重新登录";
public static final String CAPNOT="充值余额不足请充值";
public static final String SYSNOT="系统繁忙,请稍后再试...";
public static final String NOWER="没有权限";
public static final String PAGEDATA="分页参数不能为空";
public static final String CARADD_MEMBERS="该司机已有绑定车辆,不能绑定多个";
}
package com.mortals.xhx.common.key;
/**
*
*
* @author: zxfei
* @date: 2022/5/12 14:57
*/
public class HttpStatus {
/**
* 操作成功
*/
public static final int SUCCESS = 200;
/**
* 对象创建成功
*/
public static final int CREATED = 201;
/**
* 请求已经被接受
*/
public static final int ACCEPTED = 202;
/**
* 操作已经执行成功,但是没有返回数据
*/
public static final int NO_CONTENT = 204;
/**
* 资源已被移除
*/
public static final int MOVED_PERM = 301;
/**
* 重定向
*/
public static final int SEE_OTHER = 303;
/**
* 资源没有被修改
*/
public static final int NOT_MODIFIED = 304;
/**
* 参数列表错误(缺少,格式不匹配)
*/
public static final int BAD_REQUEST = 400;
/**
* 未授权
*/
public static final int UNAUTHORIZED = 401;
/**
* 访问受限,授权过期
*/
public static final int FORBIDDEN = 403;
/**
* 资源,服务未找到
*/
public static final int NOT_FOUND = 404;
/**
* 不允许的http方法
*/
public static final int BAD_METHOD = 405;
/**
* 资源冲突,或者资源被锁
*/
public static final int CONFLICT = 409;
/**
* 不支持的数据,媒体类型
*/
public static final int UNSUPPORTED_TYPE = 415;
/**
* 系统内部错误
*/
public static final int ERROR = 500;
/**
* 接口未实现
*/
public static final int NOT_IMPLEMENTED = 501;
}
......@@ -24,7 +24,12 @@ public interface DeviceService extends ICRUDCacheService<DeviceEntity,Long>{
ApiResp<String> sendDeviceMessage(List<Long> deviceIds, TopicPartitionInfo info,TbQueueMsgHeaders header, String message , Context context);
/**
* 设备激活
* @param deviceCode
* @param context
*/
void active(String deviceCode,Context context);
}
\ No newline at end of file
package com.mortals.xhx.module.device.service.impl;
import cn.hutool.core.lang.PatternPool;
import cn.hutool.http.HttpUtil;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.service.impl.AbstractCRUDCacheServiceImpl;
import com.mortals.xhx.base.system.message.MessageService;
import com.mortals.xhx.busiz.req.DeviceReq;
import com.mortals.xhx.busiz.rsp.ApiResp;
import com.mortals.xhx.common.code.ApiRespCodeEnum;
import com.mortals.xhx.common.code.*;
import com.mortals.xhx.common.key.Constant;
import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.module.device.dao.DeviceDao;
import com.mortals.xhx.module.device.model.DeviceEntity;
import com.mortals.xhx.module.device.model.DeviceQuery;
......@@ -17,6 +21,7 @@ import com.mortals.xhx.module.product.model.ProductEntity;
import com.mortals.xhx.module.product.service.ProductService;
import com.mortals.xhx.queue.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
......@@ -55,10 +60,10 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D
@Override
protected void validData(DeviceEntity entity, Context context) throws AppException {
if(!ObjectUtils.isEmpty(entity.getPlatformId())){
throw new AppException("所属平台不能为空!");
}
if(!ObjectUtils.isEmpty(entity.getProductId())){
if (!ObjectUtils.isEmpty(entity.getPlatformId())) {
throw new AppException("所属平台不能为空!");
}
if (!ObjectUtils.isEmpty(entity.getProductId())) {
throw new AppException("所属产品不能为空!");
}
......@@ -75,11 +80,9 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D
public void onSuccess(TbQueueMsgMetadata metadata) {
log.info("消息投递成功,设备通道编码:" + deviceEntity.getDeviceMac());
}
@Override
public void onFailure(Throwable t) {
log.error("消息投递成功,设备通道编码:" + deviceEntity.getDeviceMac(), t);
}
};
messageService.send(info, header, message, callback);
......@@ -98,6 +101,33 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D
return resp;
}
@Override
public void active(String deviceCode, Context context) {
DeviceEntity deviceEntity = this.selectOne(new DeviceQuery().deviceCode(deviceCode));
if (!ObjectUtils.isEmpty(deviceEntity)) throw new AppException("当前设备不存在!");
if (deviceEntity.getActive() == ActiveEnum.已激活.getValue()) throw new AppException("当前设备已激活!");
deviceEntity.setActive(ActiveEnum.已激活.getValue());
this.update(deviceEntity, context);
PlatformEntity platformEntity = platformService.get(deviceEntity.getPlatformId());
ProductEntity productEntity = productService.get(deviceEntity.getProductId());
if (!ObjectUtils.isEmpty(platformEntity) && !ObjectUtils.isEmpty(productEntity)) {
//新增设备通知第三方平台
DeviceReq deviceReq = new DeviceReq();
BeanUtils.copyProperties(deviceEntity, deviceReq, BeanUtil.getNullPropertyNames(deviceEntity));
deviceReq.setDeviceStatus(DeviceStatusEnum.ACTIVE.getValue());
deviceReq.setProductCode(productEntity.getProductCode());
deviceReq.setPlatformCode(platformEntity.getPlatformSn());
if (!ObjectUtils.isEmpty(platformEntity.getSendUrl()) && platformEntity.getSendSwitch() == SendSwitchEnum.启用.getValue()) {
if (PatternPool.URL_HTTP.matcher(platformEntity.getSendUrl()).find()) {
ApiResp<String> resp = messageService.sendThirdParty(platformEntity.getSendUrl(), MessageTypeEnum.CRUD.getValue(), deviceReq);
} else {
throw new AppException("http send url 不合法!" + platformEntity.getSendUrl());
}
}
}
}
@Override
protected void saveAfter(DeviceEntity entity, Context context) throws AppException {
......@@ -128,15 +158,50 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D
//创建下行队列
info = TopicPartitionInfo.builder().exchangeName(exchangeName).topic(Constant.DOWN_TOPIC + entity.getDeviceCode()).build();
messageService.queueDeclare(info, callback);
//新增设备通知第三方平台
DeviceReq deviceReq = new DeviceReq();
BeanUtils.copyProperties(entity, deviceReq, BeanUtil.getNullPropertyNames(entity));
deviceReq.setDeviceStatus(DeviceStatusEnum.ADD.getValue());
deviceReq.setProductCode(productEntity.getProductCode());
deviceReq.setPlatformCode(platformEntity.getPlatformSn());
if (!ObjectUtils.isEmpty(platformEntity.getSendUrl()) && platformEntity.getSendSwitch() == SendSwitchEnum.启用.getValue()) {
if (PatternPool.URL_HTTP.matcher(platformEntity.getSendUrl()).find()) {
ApiResp<String> resp = messageService.sendThirdParty(platformEntity.getSendUrl(), MessageTypeEnum.CRUD.getValue(), deviceReq);
} else {
throw new AppException("http send url 不合法!" + platformEntity.getSendUrl());
}
}
} else {
throw new AppException("产品或平台不存在!");
}
super.saveAfter(entity, context);
}
@Override
protected void updateAfter(DeviceEntity entity, Context context) throws AppException {
PlatformEntity platformEntity = platformService.get(entity.getPlatformId());
ProductEntity productEntity = productService.get(entity.getProductId());
if (!ObjectUtils.isEmpty(platformEntity) && !ObjectUtils.isEmpty(productEntity)) {
//新增设备通知第三方平台
DeviceReq deviceReq = new DeviceReq();
BeanUtils.copyProperties(entity, deviceReq, BeanUtil.getNullPropertyNames(entity));
deviceReq.setDeviceStatus(DeviceStatusEnum.UPDATE.getValue());
deviceReq.setProductCode(productEntity.getProductCode());
deviceReq.setPlatformCode(platformEntity.getPlatformSn());
if (!ObjectUtils.isEmpty(platformEntity.getSendUrl()) && platformEntity.getSendSwitch() == SendSwitchEnum.启用.getValue()) {
if (PatternPool.URL_HTTP.matcher(platformEntity.getSendUrl()).find()) {
ApiResp<String> resp = messageService.sendThirdParty(platformEntity.getSendUrl(), MessageTypeEnum.CRUD.getValue(), deviceReq);
} else {
throw new AppException("http send url 不合法!" + platformEntity.getSendUrl());
}
}
}
super.updateAfter(entity, context);
}
@Override
protected void removeBefore(Long[] ids, Context context) throws AppException {
Arrays.asList(ids).stream().forEach(id -> {
......@@ -146,14 +211,35 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D
public void onSuccess(TbQueueMsgMetadata metadata) {
log.info("队列删除成功");
}
@Override
public void onFailure(Throwable t) {
log.error("队列删除失败", t);
}
};
messageService.delQueue(Constant.UPLOAD_TOPIC + deviceEntity.getDeviceCode(),callback);
messageService.delQueue(Constant.DOWN_TOPIC + deviceEntity.getDeviceCode(),callback);
messageService.delQueue(Constant.UPLOAD_TOPIC + deviceEntity.getDeviceCode(), callback);
messageService.delQueue(Constant.DOWN_TOPIC + deviceEntity.getDeviceCode(), callback);
PlatformEntity platformEntity = platformService.get(deviceEntity.getPlatformId());
ProductEntity productEntity = productService.get(deviceEntity.getProductId());
if (!ObjectUtils.isEmpty(platformEntity) && !ObjectUtils.isEmpty(productEntity)) {
//新增设备通知第三方平台
DeviceReq deviceReq = new DeviceReq();
BeanUtils.copyProperties(deviceEntity, deviceReq, BeanUtil.getNullPropertyNames(deviceEntity));
deviceReq.setDeviceStatus(DeviceStatusEnum.DEL.getValue());
deviceReq.setProductCode(productEntity.getProductCode());
deviceReq.setPlatformCode(platformEntity.getPlatformSn());
if (!ObjectUtils.isEmpty(platformEntity.getSendUrl()) && platformEntity.getSendSwitch() == SendSwitchEnum.启用.getValue()) {
if (PatternPool.URL_HTTP.matcher(platformEntity.getSendUrl()).find()) {
ApiResp<String> resp = messageService.sendThirdParty(platformEntity.getSendUrl(), MessageTypeEnum.CRUD.getValue(), deviceReq);
} else {
throw new AppException("http send url 不合法!" + platformEntity.getSendUrl());
}
}
}
});
super.removeBefore(ids, context);
......
......@@ -7,125 +7,161 @@ import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.platform.model.vo.PlatformVo;
/**
* 平台系统实体对象
*
* @author zxfei
* @date 2022-04-25
*/
* 平台系统实体对象
*
* @author zxfei
* @date 2022-05-30
*/
public class PlatformEntity extends PlatformVo {
private static final long serialVersionUID = 1L;
/**
* 平台名称,名称唯一
*/
* 平台名称,名称唯一
*/
@Excel(name = "平台名称,名称唯一")
private String platformName;
/**
* 平台编码,编码唯一(编码加上站点编码,如phxt-51010251-1做Vhost虚拟机编码)
*/
* 平台编码,编码唯一(编码加上站点编码,如phxt-51010251-1做Vhost虚拟机编码)
*/
private String platformSn;
/**
* 发送第三方平台消息类型(0.http,1.jms)
*/
* 发送第三方平台消息类型(0.http,1.jms)
*/
private Integer sendMsgType;
/**
* 发送参数配置,如发送消息地址等,xml结构,根据消息类型变化
*/
private String sendConfig;
* 发送参数请求地址
*/
private String sendUrl;
/**
* 是否启用发送消息(0.停用,1.启用)
*/
* 回调参数地址
*/
private String callbackUrl;
/**
* 是否启用发送消息(0.停用,1.启用)
*/
private Integer sendSwitch;
/**
* 备注
*/
* 首页地址
*/
private String homeUrl;
/**
* 备注
*/
private String platformRemark;
public PlatformEntity(){}
/**
* 获取 平台名称,名称唯一
* @return String
*/
* 获取 平台名称,名称唯一
* @return String
*/
public String getPlatformName(){
return platformName;
}
/**
* 设置 平台名称,名称唯一
* @param platformName
*/
* 设置 平台名称,名称唯一
* @param platformName
*/
public void setPlatformName(String platformName){
this.platformName = platformName;
}
/**
* 获取 平台编码,编码唯一(编码加上站点编码,如phxt-51010251-1做Vhost虚拟机编码)
* @return String
*/
* 获取 平台编码,编码唯一(编码加上站点编码,如phxt-51010251-1做Vhost虚拟机编码)
* @return String
*/
public String getPlatformSn(){
return platformSn;
}
/**
* 设置 平台编码,编码唯一(编码加上站点编码,如phxt-51010251-1做Vhost虚拟机编码)
* @param platformSn
*/
* 设置 平台编码,编码唯一(编码加上站点编码,如phxt-51010251-1做Vhost虚拟机编码)
* @param platformSn
*/
public void setPlatformSn(String platformSn){
this.platformSn = platformSn;
}
/**
* 获取 发送第三方平台消息类型(0.http,1.jms)
* @return Integer
*/
* 获取 发送第三方平台消息类型(0.http,1.jms)
* @return Integer
*/
public Integer getSendMsgType(){
return sendMsgType;
}
/**
* 设置 发送第三方平台消息类型(0.http,1.jms)
* @param sendMsgType
*/
* 设置 发送第三方平台消息类型(0.http,1.jms)
* @param sendMsgType
*/
public void setSendMsgType(Integer sendMsgType){
this.sendMsgType = sendMsgType;
}
/**
* 获取 发送参数配置,如发送消息地址等,xml结构,根据消息类型变化
* @return String
*/
public String getSendConfig(){
return sendConfig;
* 获取 发送参数请求地址
* @return String
*/
public String getSendUrl(){
return sendUrl;
}
/**
* 设置 发送参数请求地址
* @param sendUrl
*/
public void setSendUrl(String sendUrl){
this.sendUrl = sendUrl;
}
/**
* 获取 回调参数地址
* @return String
*/
public String getCallbackUrl(){
return callbackUrl;
}
/**
* 设置 发送参数配置,如发送消息地址等,xml结构,根据消息类型变化
* @param sendConfig
*/
public void setSendConfig(String sendConfig){
this.sendConfig = sendConfig;
* 设置 回调参数地址
* @param callbackUrl
*/
public void setCallbackUrl(String callbackUrl){
this.callbackUrl = callbackUrl;
}
/**
* 获取 是否启用发送消息(0.停用,1.启用)
* @return Integer
*/
* 获取 是否启用发送消息(0.停用,1.启用)
* @return Integer
*/
public Integer getSendSwitch(){
return sendSwitch;
}
/**
* 设置 是否启用发送消息(0.停用,1.启用)
* @param sendSwitch
*/
* 设置 是否启用发送消息(0.停用,1.启用)
* @param sendSwitch
*/
public void setSendSwitch(Integer sendSwitch){
this.sendSwitch = sendSwitch;
}
/**
* 获取 备注
* @return String
*/
* 获取 首页地址
* @return String
*/
public String getHomeUrl(){
return homeUrl;
}
/**
* 设置 首页地址
* @param homeUrl
*/
public void setHomeUrl(String homeUrl){
this.homeUrl = homeUrl;
}
/**
* 获取 备注
* @return String
*/
public String getPlatformRemark(){
return platformRemark;
}
/**
* 设置 备注
* @param platformRemark
*/
* 设置 备注
* @param platformRemark
*/
public void setPlatformRemark(String platformRemark){
this.platformRemark = platformRemark;
}
......@@ -135,7 +171,7 @@ public class PlatformEntity extends PlatformVo {
@Override
public int hashCode() {
return this.getId().hashCode();
return this.getId().hashCode();
}
@Override
public boolean equals(Object obj) {
......@@ -143,7 +179,7 @@ public class PlatformEntity extends PlatformVo {
if (obj instanceof PlatformEntity) {
PlatformEntity tmp = (PlatformEntity) obj;
if (this.getId() == tmp.getId()) {
return true;
return true;
}
}
return false;
......@@ -154,24 +190,30 @@ public class PlatformEntity extends PlatformVo {
sb.append(",platformName:").append(getPlatformName());
sb.append(",platformSn:").append(getPlatformSn());
sb.append(",sendMsgType:").append(getSendMsgType());
sb.append(",sendConfig:").append(getSendConfig());
sb.append(",sendUrl:").append(getSendUrl());
sb.append(",callbackUrl:").append(getCallbackUrl());
sb.append(",sendSwitch:").append(getSendSwitch());
sb.append(",homeUrl:").append(getHomeUrl());
sb.append(",platformRemark:").append(getPlatformRemark());
return sb.toString();
}
public void initAttrValue(){
this.platformName = "";
this.platformName = "";
this.platformSn = "";
this.sendMsgType = 0;
this.platformSn = "";
this.sendUrl = "";
this.sendMsgType = 0;
this.callbackUrl = "";
this.sendConfig = "";
this.sendSwitch = 0;
this.sendSwitch = 0;
this.homeUrl = "";
this.platformRemark = "";
this.platformRemark = "";
}
}
\ No newline at end of file
......@@ -3,11 +3,11 @@ package com.mortals.xhx.module.platform.model;
import java.util.List;
import com.mortals.xhx.module.platform.model.PlatformEntity;
/**
* 平台系统查询对象
*
* @author zxfei
* @date 2022-04-25
*/
* 平台系统查询对象
*
* @author zxfei
* @date 2022-05-30
*/
public class PlatformQuery extends PlatformEntity {
/** 开始 主键ID,主键,自增长 */
private Long idStart;
......@@ -39,8 +39,11 @@ public class PlatformQuery extends PlatformEntity {
/** 发送第三方平台消息类型(0.http,1.jms)列表 */
private List <Integer> sendMsgTypeList;
/** 发送参数配置,如发送消息地址等,xml结构,根据消息类型变化 */
private List<String> sendConfigList;
/** 发送参数请求地址 */
private List<String> sendUrlList;
/** 回调参数地址 */
private List<String> callbackUrlList;
/** 开始 是否启用发送消息(0.停用,1.启用) */
private Integer sendSwitchStart;
......@@ -54,6 +57,9 @@ public class PlatformQuery extends PlatformEntity {
/** 是否启用发送消息(0.停用,1.启用)列表 */
private List <Integer> sendSwitchList;
/** 首页地址 */
private List<String> homeUrlList;
/** 备注 */
private List<String> platformRemarkList;
......@@ -102,780 +108,848 @@ public class PlatformQuery extends PlatformEntity {
public PlatformQuery(){}
/**
* 获取 开始 主键ID,主键,自增长
* @return idStart
*/
* 获取 开始 主键ID,主键,自增长
* @return idStart
*/
public Long getIdStart(){
return this.idStart;
}
/**
* 设置 开始 主键ID,主键,自增长
* @param idStart
*/
* 设置 开始 主键ID,主键,自增长
* @param idStart
*/
public void setIdStart(Long idStart){
this.idStart = idStart;
}
/**
* 获取 结束 主键ID,主键,自增长
* @return $idEnd
*/
* 获取 结束 主键ID,主键,自增长
* @return $idEnd
*/
public Long getIdEnd(){
return this.idEnd;
}
/**
* 设置 结束 主键ID,主键,自增长
* @param idEnd
*/
* 设置 结束 主键ID,主键,自增长
* @param idEnd
*/
public void setIdEnd(Long idEnd){
this.idEnd = idEnd;
}
/**
* 获取 增加 主键ID,主键,自增长
* @return idIncrement
*/
* 获取 增加 主键ID,主键,自增长
* @return idIncrement
*/
public Long getIdIncrement(){
return this.idIncrement;
}
/**
* 设置 增加 主键ID,主键,自增长
* @param idIncrement
*/
* 设置 增加 主键ID,主键,自增长
* @param idIncrement
*/
public void setIdIncrement(Long idIncrement){
this.idIncrement = idIncrement;
}
/**
* 获取 主键ID,主键,自增长
* @return idList
*/
* 获取 主键ID,主键,自增长
* @return idList
*/
public List<Long> getIdList(){
return this.idList;
}
/**
* 设置 主键ID,主键,自增长
* @param idList
*/
* 设置 主键ID,主键,自增长
* @param idList
*/
public void setIdList(List<Long> idList){
this.idList = idList;
}
/**
* 获取 平台名称,名称唯一
* @return platformNameList
*/
* 获取 平台名称,名称唯一
* @return platformNameList
*/
public List<String> getPlatformNameList(){
return this.platformNameList;
}
/**
* 设置 平台名称,名称唯一
* @param platformNameList
*/
* 设置 平台名称,名称唯一
* @param platformNameList
*/
public void setPlatformNameList(List<String> platformNameList){
this.platformNameList = platformNameList;
}
/**
* 获取 平台编码,编码唯一(编码加上站点编码,如phxt-51010251-1做Vhost虚拟机编码)
* @return platformSnList
*/
* 获取 平台编码,编码唯一(编码加上站点编码,如phxt-51010251-1做Vhost虚拟机编码)
* @return platformSnList
*/
public List<String> getPlatformSnList(){
return this.platformSnList;
}
/**
* 设置 平台编码,编码唯一(编码加上站点编码,如phxt-51010251-1做Vhost虚拟机编码)
* @param platformSnList
*/
* 设置 平台编码,编码唯一(编码加上站点编码,如phxt-51010251-1做Vhost虚拟机编码)
* @param platformSnList
*/
public void setPlatformSnList(List<String> platformSnList){
this.platformSnList = platformSnList;
}
/**
* 获取 开始 发送第三方平台消息类型(0.http,1.jms)
* @return sendMsgTypeStart
*/
* 获取 开始 发送第三方平台消息类型(0.http,1.jms)
* @return sendMsgTypeStart
*/
public Integer getSendMsgTypeStart(){
return this.sendMsgTypeStart;
}
/**
* 设置 开始 发送第三方平台消息类型(0.http,1.jms)
* @param sendMsgTypeStart
*/
* 设置 开始 发送第三方平台消息类型(0.http,1.jms)
* @param sendMsgTypeStart
*/
public void setSendMsgTypeStart(Integer sendMsgTypeStart){
this.sendMsgTypeStart = sendMsgTypeStart;
}
/**
* 获取 结束 发送第三方平台消息类型(0.http,1.jms)
* @return $sendMsgTypeEnd
*/
* 获取 结束 发送第三方平台消息类型(0.http,1.jms)
* @return $sendMsgTypeEnd
*/
public Integer getSendMsgTypeEnd(){
return this.sendMsgTypeEnd;
}
/**
* 设置 结束 发送第三方平台消息类型(0.http,1.jms)
* @param sendMsgTypeEnd
*/
* 设置 结束 发送第三方平台消息类型(0.http,1.jms)
* @param sendMsgTypeEnd
*/
public void setSendMsgTypeEnd(Integer sendMsgTypeEnd){
this.sendMsgTypeEnd = sendMsgTypeEnd;
}
/**
* 获取 增加 发送第三方平台消息类型(0.http,1.jms)
* @return sendMsgTypeIncrement
*/
* 获取 增加 发送第三方平台消息类型(0.http,1.jms)
* @return sendMsgTypeIncrement
*/
public Integer getSendMsgTypeIncrement(){
return this.sendMsgTypeIncrement;
}
/**
* 设置 增加 发送第三方平台消息类型(0.http,1.jms)
* @param sendMsgTypeIncrement
*/
* 设置 增加 发送第三方平台消息类型(0.http,1.jms)
* @param sendMsgTypeIncrement
*/
public void setSendMsgTypeIncrement(Integer sendMsgTypeIncrement){
this.sendMsgTypeIncrement = sendMsgTypeIncrement;
}
/**
* 获取 发送第三方平台消息类型(0.http,1.jms)
* @return sendMsgTypeList
*/
* 获取 发送第三方平台消息类型(0.http,1.jms)
* @return sendMsgTypeList
*/
public List<Integer> getSendMsgTypeList(){
return this.sendMsgTypeList;
}
/**
* 设置 发送第三方平台消息类型(0.http,1.jms)
* @param sendMsgTypeList
*/
* 设置 发送第三方平台消息类型(0.http,1.jms)
* @param sendMsgTypeList
*/
public void setSendMsgTypeList(List<Integer> sendMsgTypeList){
this.sendMsgTypeList = sendMsgTypeList;
}
/**
* 获取 发送参数配置,如发送消息地址等,xml结构,根据消息类型变化
* @return sendConfigList
*/
public List<String> getSendConfigList(){
return this.sendConfigList;
* 获取 发送参数请求地址
* @return sendUrlList
*/
public List<String> getSendUrlList(){
return this.sendUrlList;
}
/**
* 设置 发送参数配置,如发送消息地址等,xml结构,根据消息类型变化
* @param sendConfigList
*/
public void setSendConfigList(List<String> sendConfigList){
this.sendConfigList = sendConfigList;
* 设置 发送参数请求地址
* @param sendUrlList
*/
public void setSendUrlList(List<String> sendUrlList){
this.sendUrlList = sendUrlList;
}
/**
* 获取 开始 是否启用发送消息(0.停用,1.启用)
* @return sendSwitchStart
*/
* 获取 回调参数地址
* @return callbackUrlList
*/
public List<String> getCallbackUrlList(){
return this.callbackUrlList;
}
/**
* 设置 回调参数地址
* @param callbackUrlList
*/
public void setCallbackUrlList(List<String> callbackUrlList){
this.callbackUrlList = callbackUrlList;
}
/**
* 获取 开始 是否启用发送消息(0.停用,1.启用)
* @return sendSwitchStart
*/
public Integer getSendSwitchStart(){
return this.sendSwitchStart;
}
/**
* 设置 开始 是否启用发送消息(0.停用,1.启用)
* @param sendSwitchStart
*/
* 设置 开始 是否启用发送消息(0.停用,1.启用)
* @param sendSwitchStart
*/
public void setSendSwitchStart(Integer sendSwitchStart){
this.sendSwitchStart = sendSwitchStart;
}
/**
* 获取 结束 是否启用发送消息(0.停用,1.启用)
* @return $sendSwitchEnd
*/
* 获取 结束 是否启用发送消息(0.停用,1.启用)
* @return $sendSwitchEnd
*/
public Integer getSendSwitchEnd(){
return this.sendSwitchEnd;
}
/**
* 设置 结束 是否启用发送消息(0.停用,1.启用)
* @param sendSwitchEnd
*/
* 设置 结束 是否启用发送消息(0.停用,1.启用)
* @param sendSwitchEnd
*/
public void setSendSwitchEnd(Integer sendSwitchEnd){
this.sendSwitchEnd = sendSwitchEnd;
}
/**
* 获取 增加 是否启用发送消息(0.停用,1.启用)
* @return sendSwitchIncrement
*/
* 获取 增加 是否启用发送消息(0.停用,1.启用)
* @return sendSwitchIncrement
*/
public Integer getSendSwitchIncrement(){
return this.sendSwitchIncrement;
}
/**
* 设置 增加 是否启用发送消息(0.停用,1.启用)
* @param sendSwitchIncrement
*/
* 设置 增加 是否启用发送消息(0.停用,1.启用)
* @param sendSwitchIncrement
*/
public void setSendSwitchIncrement(Integer sendSwitchIncrement){
this.sendSwitchIncrement = sendSwitchIncrement;
}
/**
* 获取 是否启用发送消息(0.停用,1.启用)
* @return sendSwitchList
*/
* 获取 是否启用发送消息(0.停用,1.启用)
* @return sendSwitchList
*/
public List<Integer> getSendSwitchList(){
return this.sendSwitchList;
}
/**
* 设置 是否启用发送消息(0.停用,1.启用)
* @param sendSwitchList
*/
* 设置 是否启用发送消息(0.停用,1.启用)
* @param sendSwitchList
*/
public void setSendSwitchList(List<Integer> sendSwitchList){
this.sendSwitchList = sendSwitchList;
}
/**
* 获取 备注
* @return platformRemarkList
*/
* 获取 首页地址
* @return homeUrlList
*/
public List<String> getHomeUrlList(){
return this.homeUrlList;
}
/**
* 设置 首页地址
* @param homeUrlList
*/
public void setHomeUrlList(List<String> homeUrlList){
this.homeUrlList = homeUrlList;
}
/**
* 获取 备注
* @return platformRemarkList
*/
public List<String> getPlatformRemarkList(){
return this.platformRemarkList;
}
/**
* 设置 备注
* @param platformRemarkList
*/
* 设置 备注
* @param platformRemarkList
*/
public void setPlatformRemarkList(List<String> platformRemarkList){
this.platformRemarkList = platformRemarkList;
}
/**
* 获取 开始 创建用户
* @return createUserIdStart
*/
* 获取 开始 创建用户
* @return createUserIdStart
*/
public Long getCreateUserIdStart(){
return this.createUserIdStart;
}
/**
* 设置 开始 创建用户
* @param createUserIdStart
*/
* 设置 开始 创建用户
* @param createUserIdStart
*/
public void setCreateUserIdStart(Long createUserIdStart){
this.createUserIdStart = createUserIdStart;
}
/**
* 获取 结束 创建用户
* @return $createUserIdEnd
*/
* 获取 结束 创建用户
* @return $createUserIdEnd
*/
public Long getCreateUserIdEnd(){
return this.createUserIdEnd;
}
/**
* 设置 结束 创建用户
* @param createUserIdEnd
*/
* 设置 结束 创建用户
* @param createUserIdEnd
*/
public void setCreateUserIdEnd(Long createUserIdEnd){
this.createUserIdEnd = createUserIdEnd;
}
/**
* 获取 增加 创建用户
* @return createUserIdIncrement
*/
* 获取 增加 创建用户
* @return createUserIdIncrement
*/
public Long getCreateUserIdIncrement(){
return this.createUserIdIncrement;
}
/**
* 设置 增加 创建用户
* @param createUserIdIncrement
*/
* 设置 增加 创建用户
* @param createUserIdIncrement
*/
public void setCreateUserIdIncrement(Long createUserIdIncrement){
this.createUserIdIncrement = createUserIdIncrement;
}
/**
* 获取 创建用户
* @return createUserIdList
*/
* 获取 创建用户
* @return createUserIdList
*/
public List<Long> getCreateUserIdList(){
return this.createUserIdList;
}
/**
* 设置 创建用户
* @param createUserIdList
*/
* 设置 创建用户
* @param createUserIdList
*/
public void setCreateUserIdList(List<Long> createUserIdList){
this.createUserIdList = createUserIdList;
}
/**
* 获取 开始 创建时间
* @return createTimeStart
*/
* 获取 开始 创建时间
* @return createTimeStart
*/
public String getCreateTimeStart(){
return this.createTimeStart;
}
/**
* 设置 开始 创建时间
* @param createTimeStart
*/
* 设置 开始 创建时间
* @param createTimeStart
*/
public void setCreateTimeStart(String createTimeStart){
this.createTimeStart = createTimeStart;
}
/**
* 获取 结束 创建时间
* @return createTimeEnd
*/
* 获取 结束 创建时间
* @return createTimeEnd
*/
public String getCreateTimeEnd(){
return this.createTimeEnd;
}
/**
* 设置 结束 创建时间
* @param createTimeEnd
*/
* 设置 结束 创建时间
* @param createTimeEnd
*/
public void setCreateTimeEnd(String createTimeEnd){
this.createTimeEnd = createTimeEnd;
}
/**
* 获取 开始 更新用户
* @return updateUserIdStart
*/
* 获取 开始 更新用户
* @return updateUserIdStart
*/
public Long getUpdateUserIdStart(){
return this.updateUserIdStart;
}
/**
* 设置 开始 更新用户
* @param updateUserIdStart
*/
* 设置 开始 更新用户
* @param updateUserIdStart
*/
public void setUpdateUserIdStart(Long updateUserIdStart){
this.updateUserIdStart = updateUserIdStart;
}
/**
* 获取 结束 更新用户
* @return $updateUserIdEnd
*/
* 获取 结束 更新用户
* @return $updateUserIdEnd
*/
public Long getUpdateUserIdEnd(){
return this.updateUserIdEnd;
}
/**
* 设置 结束 更新用户
* @param updateUserIdEnd
*/
* 设置 结束 更新用户
* @param updateUserIdEnd
*/
public void setUpdateUserIdEnd(Long updateUserIdEnd){
this.updateUserIdEnd = updateUserIdEnd;
}
/**
* 获取 增加 更新用户
* @return updateUserIdIncrement
*/
* 获取 增加 更新用户
* @return updateUserIdIncrement
*/
public Long getUpdateUserIdIncrement(){
return this.updateUserIdIncrement;
}
/**
* 设置 增加 更新用户
* @param updateUserIdIncrement
*/
* 设置 增加 更新用户
* @param updateUserIdIncrement
*/
public void setUpdateUserIdIncrement(Long updateUserIdIncrement){
this.updateUserIdIncrement = updateUserIdIncrement;
}
/**
* 获取 更新用户
* @return updateUserIdList
*/
* 获取 更新用户
* @return updateUserIdList
*/
public List<Long> getUpdateUserIdList(){
return this.updateUserIdList;
}
/**
* 设置 更新用户
* @param updateUserIdList
*/
* 设置 更新用户
* @param updateUserIdList
*/
public void setUpdateUserIdList(List<Long> updateUserIdList){
this.updateUserIdList = updateUserIdList;
}
/**
* 获取 开始 更新时间
* @return updateTimeStart
*/
* 获取 开始 更新时间
* @return updateTimeStart
*/
public String getUpdateTimeStart(){
return this.updateTimeStart;
}
/**
* 设置 开始 更新时间
* @param updateTimeStart
*/
* 设置 开始 更新时间
* @param updateTimeStart
*/
public void setUpdateTimeStart(String updateTimeStart){
this.updateTimeStart = updateTimeStart;
}
/**
* 获取 结束 更新时间
* @return updateTimeEnd
*/
* 获取 结束 更新时间
* @return updateTimeEnd
*/
public String getUpdateTimeEnd(){
return this.updateTimeEnd;
}
/**
* 设置 结束 更新时间
* @param updateTimeEnd
*/
* 设置 结束 更新时间
* @param updateTimeEnd
*/
public void setUpdateTimeEnd(String updateTimeEnd){
this.updateTimeEnd = updateTimeEnd;
}
/**
* 设置 主键ID,主键,自增长
* @param id
*/
* 设置 主键ID,主键,自增长
* @param id
*/
public PlatformQuery id(Long id){
setId(id);
return this;
}
/**
* 设置 开始 主键ID,主键,自增长
* @param idStart
*/
setId(id);
return this;
}
/**
* 设置 开始 主键ID,主键,自增长
* @param idStart
*/
public PlatformQuery idStart(Long idStart){
this.idStart = idStart;
return this;
this.idStart = idStart;
return this;
}
/**
* 设置 结束 主键ID,主键,自增长
* @param idEnd
*/
* 设置 结束 主键ID,主键,自增长
* @param idEnd
*/
public PlatformQuery idEnd(Long idEnd){
this.idEnd = idEnd;
return this;
this.idEnd = idEnd;
return this;
}
/**
* 设置 增加 主键ID,主键,自增长
* @param idIncrement
*/
* 设置 增加 主键ID,主键,自增长
* @param idIncrement
*/
public PlatformQuery idIncrement(Long idIncrement){
this.idIncrement = idIncrement;
return this;
this.idIncrement = idIncrement;
return this;
}
/**
* 设置 主键ID,主键,自增长
* @param idList
*/
* 设置 主键ID,主键,自增长
* @param idList
*/
public PlatformQuery idList(List<Long> idList){
this.idList = idList;
return this;
}
return this;
}
/**
* 设置 平台名称,名称唯一
* @param platformName
*/
/**
* 设置 平台名称,名称唯一
* @param platformName
*/
public PlatformQuery platformName(String platformName){
setPlatformName(platformName);
return this;
return this;
}
/**
* 设置 平台名称,名称唯一
* @param platformNameList
*/
* 设置 平台名称,名称唯一
* @param platformNameList
*/
public PlatformQuery platformNameList(List<String> platformNameList){
this.platformNameList = platformNameList;
return this;
return this;
}
/**
* 设置 平台编码,编码唯一(编码加上站点编码,如phxt-51010251-1做Vhost虚拟机编码)
* @param platformSn
*/
/**
* 设置 平台编码,编码唯一(编码加上站点编码,如phxt-51010251-1做Vhost虚拟机编码)
* @param platformSn
*/
public PlatformQuery platformSn(String platformSn){
setPlatformSn(platformSn);
return this;
return this;
}
/**
* 设置 平台编码,编码唯一(编码加上站点编码,如phxt-51010251-1做Vhost虚拟机编码)
* @param platformSnList
*/
* 设置 平台编码,编码唯一(编码加上站点编码,如phxt-51010251-1做Vhost虚拟机编码)
* @param platformSnList
*/
public PlatformQuery platformSnList(List<String> platformSnList){
this.platformSnList = platformSnList;
return this;
return this;
}
/**
* 设置 发送第三方平台消息类型(0.http,1.jms)
* @param sendMsgType
*/
* 设置 发送第三方平台消息类型(0.http,1.jms)
* @param sendMsgType
*/
public PlatformQuery sendMsgType(Integer sendMsgType){
setSendMsgType(sendMsgType);
return this;
}
/**
* 设置 开始 发送第三方平台消息类型(0.http,1.jms)
* @param sendMsgTypeStart
*/
setSendMsgType(sendMsgType);
return this;
}
/**
* 设置 开始 发送第三方平台消息类型(0.http,1.jms)
* @param sendMsgTypeStart
*/
public PlatformQuery sendMsgTypeStart(Integer sendMsgTypeStart){
this.sendMsgTypeStart = sendMsgTypeStart;
return this;
this.sendMsgTypeStart = sendMsgTypeStart;
return this;
}
/**
* 设置 结束 发送第三方平台消息类型(0.http,1.jms)
* @param sendMsgTypeEnd
*/
* 设置 结束 发送第三方平台消息类型(0.http,1.jms)
* @param sendMsgTypeEnd
*/
public PlatformQuery sendMsgTypeEnd(Integer sendMsgTypeEnd){
this.sendMsgTypeEnd = sendMsgTypeEnd;
return this;
this.sendMsgTypeEnd = sendMsgTypeEnd;
return this;
}
/**
* 设置 增加 发送第三方平台消息类型(0.http,1.jms)
* @param sendMsgTypeIncrement
*/
* 设置 增加 发送第三方平台消息类型(0.http,1.jms)
* @param sendMsgTypeIncrement
*/
public PlatformQuery sendMsgTypeIncrement(Integer sendMsgTypeIncrement){
this.sendMsgTypeIncrement = sendMsgTypeIncrement;
return this;
this.sendMsgTypeIncrement = sendMsgTypeIncrement;
return this;
}
/**
* 设置 发送第三方平台消息类型(0.http,1.jms)
* @param sendMsgTypeList
*/
* 设置 发送第三方平台消息类型(0.http,1.jms)
* @param sendMsgTypeList
*/
public PlatformQuery sendMsgTypeList(List<Integer> sendMsgTypeList){
this.sendMsgTypeList = sendMsgTypeList;
return this;
}
return this;
}
/**
* 设置 发送参数请求地址
* @param sendUrl
*/
public PlatformQuery sendUrl(String sendUrl){
setSendUrl(sendUrl);
return this;
}
/**
* 设置 发送参数配置,如发送消息地址等,xml结构,根据消息类型变化
* @param sendConfig
*/
public PlatformQuery sendConfig(String sendConfig){
setSendConfig(sendConfig);
return this;
/**
* 设置 发送参数请求地址
* @param sendUrlList
*/
public PlatformQuery sendUrlList(List<String> sendUrlList){
this.sendUrlList = sendUrlList;
return this;
}
/**
* 设置 发送参数配置,如发送消息地址等,xml结构,根据消息类型变化
* @param sendConfigList
*/
public PlatformQuery sendConfigList(List<String> sendConfigList){
this.sendConfigList = sendConfigList;
return this;
* 设置 回调参数地址
* @param callbackUrl
*/
public PlatformQuery callbackUrl(String callbackUrl){
setCallbackUrl(callbackUrl);
return this;
}
/**
* 设置 是否启用发送消息(0.停用,1.启用)
* @param sendSwitch
*/
* 设置 回调参数地址
* @param callbackUrlList
*/
public PlatformQuery callbackUrlList(List<String> callbackUrlList){
this.callbackUrlList = callbackUrlList;
return this;
}
/**
* 设置 是否启用发送消息(0.停用,1.启用)
* @param sendSwitch
*/
public PlatformQuery sendSwitch(Integer sendSwitch){
setSendSwitch(sendSwitch);
return this;
}
/**
* 设置 开始 是否启用发送消息(0.停用,1.启用)
* @param sendSwitchStart
*/
setSendSwitch(sendSwitch);
return this;
}
/**
* 设置 开始 是否启用发送消息(0.停用,1.启用)
* @param sendSwitchStart
*/
public PlatformQuery sendSwitchStart(Integer sendSwitchStart){
this.sendSwitchStart = sendSwitchStart;
return this;
this.sendSwitchStart = sendSwitchStart;
return this;
}
/**
* 设置 结束 是否启用发送消息(0.停用,1.启用)
* @param sendSwitchEnd
*/
* 设置 结束 是否启用发送消息(0.停用,1.启用)
* @param sendSwitchEnd
*/
public PlatformQuery sendSwitchEnd(Integer sendSwitchEnd){
this.sendSwitchEnd = sendSwitchEnd;
return this;
this.sendSwitchEnd = sendSwitchEnd;
return this;
}
/**
* 设置 增加 是否启用发送消息(0.停用,1.启用)
* @param sendSwitchIncrement
*/
* 设置 增加 是否启用发送消息(0.停用,1.启用)
* @param sendSwitchIncrement
*/
public PlatformQuery sendSwitchIncrement(Integer sendSwitchIncrement){
this.sendSwitchIncrement = sendSwitchIncrement;
return this;
this.sendSwitchIncrement = sendSwitchIncrement;
return this;
}
/**
* 设置 是否启用发送消息(0.停用,1.启用)
* @param sendSwitchList
*/
* 设置 是否启用发送消息(0.停用,1.启用)
* @param sendSwitchList
*/
public PlatformQuery sendSwitchList(List<Integer> sendSwitchList){
this.sendSwitchList = sendSwitchList;
return this;
}
return this;
}
/**
* 设置 首页地址
* @param homeUrl
*/
public PlatformQuery homeUrl(String homeUrl){
setHomeUrl(homeUrl);
return this;
}
/**
* 设置 首页地址
* @param homeUrlList
*/
public PlatformQuery homeUrlList(List<String> homeUrlList){
this.homeUrlList = homeUrlList;
return this;
}
/**
* 设置 备注
* @param platformRemark
*/
/**
* 设置 备注
* @param platformRemark
*/
public PlatformQuery platformRemark(String platformRemark){
setPlatformRemark(platformRemark);
return this;
return this;
}
/**
* 设置 备注
* @param platformRemarkList
*/
* 设置 备注
* @param platformRemarkList
*/
public PlatformQuery platformRemarkList(List<String> platformRemarkList){
this.platformRemarkList = platformRemarkList;
return this;
return this;
}
/**
* 设置 创建用户
* @param createUserId
*/
* 设置 创建用户
* @param createUserId
*/
public PlatformQuery createUserId(Long createUserId){
setCreateUserId(createUserId);
return this;
}
/**
* 设置 开始 创建用户
* @param createUserIdStart
*/
setCreateUserId(createUserId);
return this;
}
/**
* 设置 开始 创建用户
* @param createUserIdStart
*/
public PlatformQuery createUserIdStart(Long createUserIdStart){
this.createUserIdStart = createUserIdStart;
return this;
this.createUserIdStart = createUserIdStart;
return this;
}
/**
* 设置 结束 创建用户
* @param createUserIdEnd
*/
* 设置 结束 创建用户
* @param createUserIdEnd
*/
public PlatformQuery createUserIdEnd(Long createUserIdEnd){
this.createUserIdEnd = createUserIdEnd;
return this;
this.createUserIdEnd = createUserIdEnd;
return this;
}
/**
* 设置 增加 创建用户
* @param createUserIdIncrement
*/
* 设置 增加 创建用户
* @param createUserIdIncrement
*/
public PlatformQuery createUserIdIncrement(Long createUserIdIncrement){
this.createUserIdIncrement = createUserIdIncrement;
return this;
this.createUserIdIncrement = createUserIdIncrement;
return this;
}
/**
* 设置 创建用户
* @param createUserIdList
*/
* 设置 创建用户
* @param createUserIdList
*/
public PlatformQuery createUserIdList(List<Long> createUserIdList){
this.createUserIdList = createUserIdList;
return this;
}
return this;
}
/**
* 设置 更新用户
* @param updateUserId
*/
* 设置 更新用户
* @param updateUserId
*/
public PlatformQuery updateUserId(Long updateUserId){
setUpdateUserId(updateUserId);
return this;
}
/**
* 设置 开始 更新用户
* @param updateUserIdStart
*/
setUpdateUserId(updateUserId);
return this;
}
/**
* 设置 开始 更新用户
* @param updateUserIdStart
*/
public PlatformQuery updateUserIdStart(Long updateUserIdStart){
this.updateUserIdStart = updateUserIdStart;
return this;
this.updateUserIdStart = updateUserIdStart;
return this;
}
/**
* 设置 结束 更新用户
* @param updateUserIdEnd
*/
* 设置 结束 更新用户
* @param updateUserIdEnd
*/
public PlatformQuery updateUserIdEnd(Long updateUserIdEnd){
this.updateUserIdEnd = updateUserIdEnd;
return this;
this.updateUserIdEnd = updateUserIdEnd;
return this;
}
/**
* 设置 增加 更新用户
* @param updateUserIdIncrement
*/
* 设置 增加 更新用户
* @param updateUserIdIncrement
*/
public PlatformQuery updateUserIdIncrement(Long updateUserIdIncrement){
this.updateUserIdIncrement = updateUserIdIncrement;
return this;
this.updateUserIdIncrement = updateUserIdIncrement;
return this;
}
/**
* 设置 更新用户
* @param updateUserIdList
*/
* 设置 更新用户
* @param updateUserIdList
*/
public PlatformQuery updateUserIdList(List<Long> updateUserIdList){
this.updateUserIdList = updateUserIdList;
return this;
}
return this;
}
/**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList
*/
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList
*/
public List<PlatformQuery> getOrConditionList(){
return this.orConditionList;
return this.orConditionList;
}
/**
* 设置 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @param 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<PlatformQuery> orConditionList){
this.orConditionList = orConditionList;
}
/**
* 获取 AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4)
* @return andConditionList
*/
* 获取 AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4)
* @return andConditionList
*/
public List<PlatformQuery> getAndConditionList(){
return this.andConditionList;
}
/**
* 设置 AND条件集合,列表项之间是AND,项内容之间是OR,如:(list[0].1 or list[0].2) and (list[1].3 or list[1].4)
* @param 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<PlatformQuery> andConditionList){
this.andConditionList = andConditionList;
}
......
......@@ -49,10 +49,6 @@ public class PlatformController extends BaseCRUDJsonMappingController<PlatformSe
@Autowired
private ParamService paramService;
private ICacheService cacheService = LocalCacheServiceImpl.getInstance();
private final String KEY = "base-platform:admin,admin";//基础服务平台获取token
public PlatformController() {
super.setFormClass(PlatformForm.class);
super.setModuleDesc("平台系统");
......@@ -64,133 +60,4 @@ public class PlatformController extends BaseCRUDJsonMappingController<PlatformSe
this.addDict(model, "sendSwitch", paramService.getParamBySecondOrganize("Platform", "sendSwitch"));
super.init(request, response, form, model, context);
}
@GetMapping("getSite")
public String getSite(@RequestParam("parentId") String parentId) {
log.info("【获取站点】【请求体】-->parentId " + parentId);
String res = null;
try {
String token = cacheService.get(KEY);
if(token == null){
token = getToken();
if(token == null){
throw new AppException("未获取到token");
}
}
res = getSiteList(parentId, token);
if(JSONObject.parseObject(res).get("code").equals(-1)){
token = getToken();
res = getSiteList(parentId, token);
}
} catch (Exception e) {
log.error("接收数据失败", e);
return res;
}
log.info("响应【获取站点】【响应体】--> " + res);
return res;
}
//获取基础服务平台站点信息
private String getSiteList(String parentId, String token){
CloseableHttpClient httpClient = null;
CloseableHttpResponse response = null;
String result = "";
try {
// 通过址默认配置创建一个httpClient实例
httpClient = HttpClients.createDefault();
// 创建httpGet远程连接实例
HttpGet httpGet = new HttpGet("http://192.168.0.98:11071/zwfw/area/getListByParentId?parentId=" + parentId);
// 设置请求头信息,鉴权
httpGet.setHeader("Authorization", token);
// 执行get请求得到返回对象
response = httpClient.execute(httpGet);
// 通过返回对象获取返回数据
HttpEntity entity = response.getEntity();
// 通过EntityUtils中的toString方法将结果转换为字符串
result = EntityUtils.toString(entity);
} catch (Exception e) {
log.error("接收数据失败", e);
return JSON.toJSONString(result);
} finally {
if (response != null) {
try {
response.close();
} catch (IOException e) {
e.printStackTrace();
}
}
if (httpClient != null) {
try {
httpClient.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
JSONObject object = JSONObject.parseObject(result);
if(object == null || object.get("code") == null){
throw new AppException("基础服务平台获取站点信息失败,响应值: " + response);
}
return result;
}
//获取基础服务平台token
private String getToken() {
CloseableHttpResponse httpResponse = null;
String response = "";
Object token = null;
// 创建httpClient实例
CloseableHttpClient httpClient = HttpClients.createDefault();
// 创建httpPost远程连接实例
HttpPost httpPost = new HttpPost("http://192.168.0.98:11071/zwfw/login/login");
JSONObject request = null;
try {
request = new JSONObject();
request.put("loginName", "admin");
request.put("password", "admin");
request.put("securityCode", 8888);
log.info("登录基础服务平台,参数-->" + request);
StringEntity entity = new StringEntity(request.toString());
entity.setContentType("application/json;charset=UTF-8");
httpPost.setEntity(entity);
// httpClient对象执行post请求,并返回响应参数对象
httpResponse = httpClient.execute(httpPost);
// 从响应对象中获取响应内容
HttpEntity httpEntity = httpResponse.getEntity();
response = EntityUtils.toString(httpEntity);
} catch (IOException e) {
e.printStackTrace();
log.error("基础服务平台登录失败,响应体:" + httpResponse);
} finally {
// 关闭资源
if (null != httpResponse) {
try {
httpResponse.close();
} catch (IOException e) {
e.printStackTrace();
}
}
if (null != httpClient) {
try {
httpClient.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
JSONObject object = JSONObject.parseObject(response);
if(object == null || object.get("code") == null || object.get("code").equals(-1)){
throw new AppException("基础服务平台登录获取token失败,响应值: " + response);
}
if(object.get("code").equals(1)){
token = JSONObject.parseObject(object.get("data").toString()).get("token");
cacheService.sadd(KEY,token);
return token.toString();
}
return null;
}
}
\ 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">
"mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.module.platform.dao.ibatis.PlatformDaoImpl">
<!-- 字段和属性映射 -->
<resultMap type="PlatformEntity" id="PlatformEntity-Map">
<id property="id" column="id" />
<result property="platformName" column="platformName" />
<result property="platformSn" column="platformSn" />
<result property="sendMsgType" column="sendMsgType" />
<result property="sendConfig" column="sendConfig" />
<result property="sendSwitch" column="sendSwitch" />
<result property="platformRemark" column="platformRemark" />
<result property="createUserId" column="createUserId" />
<result property="createTime" column="createTime" />
<result property="updateUserId" column="updateUserId" />
<result property="updateTime" column="updateTime" />
<id property="id" column="id" />
<result property="platformName" column="platformName" />
<result property="platformSn" column="platformSn" />
<result property="sendMsgType" column="sendMsgType" />
<result property="sendUrl" column="sendUrl" />
<result property="callbackUrl" column="callbackUrl" />
<result property="sendSwitch" column="sendSwitch" />
<result property="homeUrl" column="homeUrl" />
<result property="platformRemark" column="platformRemark" />
<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('platformName') or colPickMode == 1 and data.containsKey('platformName')))">
a.platformName,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('platformSn') or colPickMode == 1 and data.containsKey('platformSn')))">
a.platformSn,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('sendMsgType') or colPickMode == 1 and data.containsKey('sendMsgType')))">
a.sendMsgType,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('sendConfig') or colPickMode == 1 and data.containsKey('sendConfig')))">
a.sendConfig,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('sendSwitch') or colPickMode == 1 and data.containsKey('sendSwitch')))">
a.sendSwitch,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('platformRemark') or colPickMode == 1 and data.containsKey('platformRemark')))">
a.platformRemark,
</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>
<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('platformName') or colPickMode == 1 and data.containsKey('platformName')))">
a.platformName,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('platformSn') or colPickMode == 1 and data.containsKey('platformSn')))">
a.platformSn,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('sendMsgType') or colPickMode == 1 and data.containsKey('sendMsgType')))">
a.sendMsgType,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('sendUrl') or colPickMode == 1 and data.containsKey('sendUrl')))">
a.sendUrl,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('callbackUrl') or colPickMode == 1 and data.containsKey('callbackUrl')))">
a.callbackUrl,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('sendSwitch') or colPickMode == 1 and data.containsKey('sendSwitch')))">
a.sendSwitch,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('homeUrl') or colPickMode == 1 and data.containsKey('homeUrl')))">
a.homeUrl,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('platformRemark') or colPickMode == 1 and data.containsKey('platformRemark')))">
a.platformRemark,
</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="PlatformEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_platform
(platformName,platformSn,sendMsgType,sendConfig,sendSwitch,platformRemark,createUserId,createTime,updateUserId,updateTime)
(platformName,platformSn,sendMsgType,sendUrl,callbackUrl,sendSwitch,homeUrl,platformRemark,createUserId,createTime,updateUserId,updateTime)
VALUES
(#{platformName},#{platformSn},#{sendMsgType},#{sendConfig},#{sendSwitch},#{platformRemark},#{createUserId},#{createTime},#{updateUserId},#{updateTime})
(#{platformName},#{platformSn},#{sendMsgType},#{sendUrl},#{callbackUrl},#{sendSwitch},#{homeUrl},#{platformRemark},#{createUserId},#{createTime},#{updateUserId},#{updateTime})
</insert>
<!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_platform
(platformName,platformSn,sendMsgType,sendConfig,sendSwitch,platformRemark,createUserId,createTime,updateUserId,updateTime)
(platformName,platformSn,sendMsgType,sendUrl,callbackUrl,sendSwitch,homeUrl,platformRemark,createUserId,createTime,updateUserId,updateTime)
VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.platformName},#{item.platformSn},#{item.sendMsgType},#{item.sendConfig},#{item.sendSwitch},#{item.platformRemark},#{item.createUserId},#{item.createTime},#{item.updateUserId},#{item.updateTime})
(#{item.platformName},#{item.platformSn},#{item.sendMsgType},#{item.sendUrl},#{item.callbackUrl},#{item.sendSwitch},#{item.homeUrl},#{item.platformRemark},#{item.createUserId},#{item.createTime},#{item.updateUserId},#{item.updateTime})
</foreach>
</insert>
......@@ -94,8 +102,11 @@
<if test="(colPickMode==0 and data.containsKey('sendMsgTypeIncrement')) or (colPickMode==1 and !data.containsKey('sendMsgTypeIncrement'))">
a.sendMsgType=ifnull(a.sendMsgType,0) + #{data.sendMsgTypeIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('sendConfig')) or (colPickMode==1 and !data.containsKey('sendConfig'))">
a.sendConfig=#{data.sendConfig},
<if test="(colPickMode==0 and data.containsKey('sendUrl')) or (colPickMode==1 and !data.containsKey('sendUrl'))">
a.sendUrl=#{data.sendUrl},
</if>
<if test="(colPickMode==0 and data.containsKey('callbackUrl')) or (colPickMode==1 and !data.containsKey('callbackUrl'))">
a.callbackUrl=#{data.callbackUrl},
</if>
<if test="(colPickMode==0 and data.containsKey('sendSwitch')) or (colPickMode==1 and !data.containsKey('sendSwitch'))">
a.sendSwitch=#{data.sendSwitch},
......@@ -103,6 +114,9 @@
<if test="(colPickMode==0 and data.containsKey('sendSwitchIncrement')) or (colPickMode==1 and !data.containsKey('sendSwitchIncrement'))">
a.sendSwitch=ifnull(a.sendSwitch,0) + #{data.sendSwitchIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('homeUrl')) or (colPickMode==1 and !data.containsKey('homeUrl'))">
a.homeUrl=#{data.homeUrl},
</if>
<if test="(colPickMode==0 and data.containsKey('platformRemark')) or (colPickMode==1 and !data.containsKey('platformRemark'))">
a.platformRemark=#{data.platformRemark},
</if>
......@@ -136,96 +150,110 @@
<update id="updateBatch" parameterType="paramDto">
update mortals_xhx_platform as a
<trim prefix="set" suffixOverrides=",">
<trim prefix="platformName=(case" suffix="ELSE platformName end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('platformName')) or (colPickMode==1 and !item.containsKey('platformName'))">
when a.id=#{item.id} then #{item.platformName}
</if>
</foreach>
</trim>
<trim prefix="platformSn=(case" suffix="ELSE platformSn end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('platformSn')) or (colPickMode==1 and !item.containsKey('platformSn'))">
when a.id=#{item.id} then #{item.platformSn}
</if>
</foreach>
</trim>
<trim prefix="sendMsgType=(case" suffix="ELSE sendMsgType end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('sendMsgType')) or (colPickMode==1 and !item.containsKey('sendMsgType'))">
when a.id=#{item.id} then #{item.sendMsgType}
</when>
<when test="(colPickMode==0 and item.containsKey('sendMsgTypeIncrement')) or (colPickMode==1 and !item.containsKey('sendMsgTypeIncrement'))">
when a.id=#{item.id} then ifnull(a.sendMsgType,0) + #{item.sendMsgTypeIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="sendConfig=(case" suffix="ELSE sendConfig end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('sendConfig')) or (colPickMode==1 and !item.containsKey('sendConfig'))">
when a.id=#{item.id} then #{item.sendConfig}
</if>
</foreach>
</trim>
<trim prefix="sendSwitch=(case" suffix="ELSE sendSwitch end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('sendSwitch')) or (colPickMode==1 and !item.containsKey('sendSwitch'))">
when a.id=#{item.id} then #{item.sendSwitch}
</when>
<when test="(colPickMode==0 and item.containsKey('sendSwitchIncrement')) or (colPickMode==1 and !item.containsKey('sendSwitchIncrement'))">
when a.id=#{item.id} then ifnull(a.sendSwitch,0) + #{item.sendSwitchIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="platformRemark=(case" suffix="ELSE platformRemark end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('platformRemark')) or (colPickMode==1 and !item.containsKey('platformRemark'))">
when a.id=#{item.id} then #{item.platformRemark}
</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 prefix="platformName=(case" suffix="ELSE platformName end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('platformName')) or (colPickMode==1 and !item.containsKey('platformName'))">
when a.id=#{item.id} then #{item.platformName}
</if>
</foreach>
</trim>
<trim prefix="platformSn=(case" suffix="ELSE platformSn end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('platformSn')) or (colPickMode==1 and !item.containsKey('platformSn'))">
when a.id=#{item.id} then #{item.platformSn}
</if>
</foreach>
</trim>
<trim prefix="sendMsgType=(case" suffix="ELSE sendMsgType end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('sendMsgType')) or (colPickMode==1 and !item.containsKey('sendMsgType'))">
when a.id=#{item.id} then #{item.sendMsgType}
</when>
<when test="(colPickMode==0 and item.containsKey('sendMsgTypeIncrement')) or (colPickMode==1 and !item.containsKey('sendMsgTypeIncrement'))">
when a.id=#{item.id} then ifnull(a.sendMsgType,0) + #{item.sendMsgTypeIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="sendUrl=(case" suffix="ELSE sendUrl end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('sendUrl')) or (colPickMode==1 and !item.containsKey('sendUrl'))">
when a.id=#{item.id} then #{item.sendUrl}
</if>
</foreach>
</trim>
<trim prefix="callbackUrl=(case" suffix="ELSE callbackUrl end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('callbackUrl')) or (colPickMode==1 and !item.containsKey('callbackUrl'))">
when a.id=#{item.id} then #{item.callbackUrl}
</if>
</foreach>
</trim>
<trim prefix="sendSwitch=(case" suffix="ELSE sendSwitch end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('sendSwitch')) or (colPickMode==1 and !item.containsKey('sendSwitch'))">
when a.id=#{item.id} then #{item.sendSwitch}
</when>
<when test="(colPickMode==0 and item.containsKey('sendSwitchIncrement')) or (colPickMode==1 and !item.containsKey('sendSwitchIncrement'))">
when a.id=#{item.id} then ifnull(a.sendSwitch,0) + #{item.sendSwitchIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="homeUrl=(case" suffix="ELSE homeUrl end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('homeUrl')) or (colPickMode==1 and !item.containsKey('homeUrl'))">
when a.id=#{item.id} then #{item.homeUrl}
</if>
</foreach>
</trim>
<trim prefix="platformRemark=(case" suffix="ELSE platformRemark end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('platformRemark')) or (colPickMode==1 and !item.containsKey('platformRemark'))">
when a.id=#{item.id} then #{item.platformRemark}
</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=")">
......@@ -327,269 +355,309 @@
${_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')">
${_conditionType_} a.id in
<foreach collection="conditionParamRef.idList" 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 test="conditionParamRef.containsKey('id')">
<if test="conditionParamRef.id != null ">
${_conditionType_} a.id = #{${_conditionParam_}.id}
</if>
<if test="conditionParamRef.containsKey('idEnd') and conditionParamRef.idEnd != null">
${_conditionType_} a.id <![CDATA[ <= ]]> #{${_conditionParam_}.idEnd}
<if test="conditionParamRef.id == null">
${_conditionType_} a.id is null
</if>
</if>
<if test="conditionParamRef.containsKey('idList')">
${_conditionType_} a.id in
<foreach collection="conditionParamRef.idList" 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('platformName')">
<if test="conditionParamRef.platformName != null and conditionParamRef.platformName != ''">
${_conditionType_} a.platformName like #{${_conditionParam_}.platformName}
</if>
<if test="conditionParamRef.platformName == null">
${_conditionType_} a.platformName is null
</if>
<if test="conditionParamRef.containsKey('platformName')">
<if test="conditionParamRef.platformName != null and conditionParamRef.platformName != ''">
${_conditionType_} a.platformName like #{${_conditionParam_}.platformName}
</if>
<if test="conditionParamRef.containsKey('platformNameList')">
${_conditionType_} a.platformName in
<foreach collection="conditionParamRef.platformNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
<if test="conditionParamRef.platformName == null">
${_conditionType_} a.platformName is null
</if>
</if>
<if test="conditionParamRef.containsKey('platformNameList')">
${_conditionType_} a.platformName in
<foreach collection="conditionParamRef.platformNameList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('platformSn')">
<if test="conditionParamRef.platformSn != null and conditionParamRef.platformSn != ''">
${_conditionType_} a.platformSn like #{${_conditionParam_}.platformSn}
</if>
<if test="conditionParamRef.platformSn == null">
${_conditionType_} a.platformSn is null
</if>
<if test="conditionParamRef.containsKey('platformSn')">
<if test="conditionParamRef.platformSn != null and conditionParamRef.platformSn != ''">
${_conditionType_} a.platformSn like #{${_conditionParam_}.platformSn}
</if>
<if test="conditionParamRef.containsKey('platformSnList')">
${_conditionType_} a.platformSn in
<foreach collection="conditionParamRef.platformSnList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('sendMsgType')">
<if test="conditionParamRef.sendMsgType != null ">
${_conditionType_} a.sendMsgType = #{${_conditionParam_}.sendMsgType}
</if>
<if test="conditionParamRef.sendMsgType == null">
${_conditionType_} a.sendMsgType is null
</if>
</if>
<if test="conditionParamRef.containsKey('sendMsgTypeList')">
${_conditionType_} a.sendMsgType in
<foreach collection="conditionParamRef.sendMsgTypeList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
<if test="conditionParamRef.platformSn == null">
${_conditionType_} a.platformSn is null
</if>
<if test="conditionParamRef.containsKey('sendMsgTypeStart') and conditionParamRef.sendMsgTypeStart != null">
${_conditionType_} a.sendMsgType <![CDATA[ >= ]]> #{${_conditionParam_}.sendMsgTypeStart}
</if>
<if test="conditionParamRef.containsKey('platformSnList')">
${_conditionType_} a.platformSn in
<foreach collection="conditionParamRef.platformSnList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('sendMsgType')">
<if test="conditionParamRef.sendMsgType != null ">
${_conditionType_} a.sendMsgType = #{${_conditionParam_}.sendMsgType}
</if>
<if test="conditionParamRef.containsKey('sendMsgTypeEnd') and conditionParamRef.sendMsgTypeEnd != null">
${_conditionType_} a.sendMsgType <![CDATA[ <= ]]> #{${_conditionParam_}.sendMsgTypeEnd}
<if test="conditionParamRef.sendMsgType == null">
${_conditionType_} a.sendMsgType is null
</if>
</if>
<if test="conditionParamRef.containsKey('sendMsgTypeList')">
${_conditionType_} a.sendMsgType in
<foreach collection="conditionParamRef.sendMsgTypeList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('sendMsgTypeStart') and conditionParamRef.sendMsgTypeStart != null">
${_conditionType_} a.sendMsgType <![CDATA[ >= ]]> #{${_conditionParam_}.sendMsgTypeStart}
</if>
<if test="conditionParamRef.containsKey('sendMsgTypeEnd') and conditionParamRef.sendMsgTypeEnd != null">
${_conditionType_} a.sendMsgType <![CDATA[ <= ]]> #{${_conditionParam_}.sendMsgTypeEnd}
</if>
<if test="conditionParamRef.containsKey('sendConfig')">
<if test="conditionParamRef.sendConfig != null and conditionParamRef.sendConfig != ''">
${_conditionType_} a.sendConfig like #{${_conditionParam_}.sendConfig}
</if>
<if test="conditionParamRef.sendConfig == null">
${_conditionType_} a.sendConfig is null
</if>
<if test="conditionParamRef.containsKey('sendUrl')">
<if test="conditionParamRef.sendUrl != null and conditionParamRef.sendUrl != ''">
${_conditionType_} a.sendUrl like #{${_conditionParam_}.sendUrl}
</if>
<if test="conditionParamRef.containsKey('sendConfigList')">
${_conditionType_} a.sendConfig in
<foreach collection="conditionParamRef.sendConfigList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
<if test="conditionParamRef.sendUrl == null">
${_conditionType_} a.sendUrl is null
</if>
<if test="conditionParamRef.containsKey('sendSwitch')">
<if test="conditionParamRef.sendSwitch != null ">
${_conditionType_} a.sendSwitch = #{${_conditionParam_}.sendSwitch}
</if>
<if test="conditionParamRef.sendSwitch == null">
${_conditionType_} a.sendSwitch is null
</if>
</if>
<if test="conditionParamRef.containsKey('sendUrlList')">
${_conditionType_} a.sendUrl in
<foreach collection="conditionParamRef.sendUrlList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('callbackUrl')">
<if test="conditionParamRef.callbackUrl != null and conditionParamRef.callbackUrl != ''">
${_conditionType_} a.callbackUrl like #{${_conditionParam_}.callbackUrl}
</if>
<if test="conditionParamRef.containsKey('sendSwitchList')">
${_conditionType_} a.sendSwitch in
<foreach collection="conditionParamRef.sendSwitchList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
<if test="conditionParamRef.callbackUrl == null">
${_conditionType_} a.callbackUrl is null
</if>
<if test="conditionParamRef.containsKey('sendSwitchStart') and conditionParamRef.sendSwitchStart != null">
${_conditionType_} a.sendSwitch <![CDATA[ >= ]]> #{${_conditionParam_}.sendSwitchStart}
</if>
<if test="conditionParamRef.containsKey('callbackUrlList')">
${_conditionType_} a.callbackUrl in
<foreach collection="conditionParamRef.callbackUrlList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('sendSwitch')">
<if test="conditionParamRef.sendSwitch != null ">
${_conditionType_} a.sendSwitch = #{${_conditionParam_}.sendSwitch}
</if>
<if test="conditionParamRef.containsKey('sendSwitchEnd') and conditionParamRef.sendSwitchEnd != null">
${_conditionType_} a.sendSwitch <![CDATA[ <= ]]> #{${_conditionParam_}.sendSwitchEnd}
<if test="conditionParamRef.sendSwitch == null">
${_conditionType_} a.sendSwitch is null
</if>
</if>
<if test="conditionParamRef.containsKey('sendSwitchList')">
${_conditionType_} a.sendSwitch in
<foreach collection="conditionParamRef.sendSwitchList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('sendSwitchStart') and conditionParamRef.sendSwitchStart != null">
${_conditionType_} a.sendSwitch <![CDATA[ >= ]]> #{${_conditionParam_}.sendSwitchStart}
</if>
<if test="conditionParamRef.containsKey('sendSwitchEnd') and conditionParamRef.sendSwitchEnd != null">
${_conditionType_} a.sendSwitch <![CDATA[ <= ]]> #{${_conditionParam_}.sendSwitchEnd}
</if>
<if test="conditionParamRef.containsKey('platformRemark')">
<if test="conditionParamRef.platformRemark != null and conditionParamRef.platformRemark != ''">
${_conditionType_} a.platformRemark like #{${_conditionParam_}.platformRemark}
</if>
<if test="conditionParamRef.platformRemark == null">
${_conditionType_} a.platformRemark is null
</if>
<if test="conditionParamRef.containsKey('homeUrl')">
<if test="conditionParamRef.homeUrl != null and conditionParamRef.homeUrl != ''">
${_conditionType_} a.homeUrl like #{${_conditionParam_}.homeUrl}
</if>
<if test="conditionParamRef.containsKey('platformRemarkList')">
${_conditionType_} a.platformRemark in
<foreach collection="conditionParamRef.platformRemarkList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
<if test="conditionParamRef.homeUrl == null">
${_conditionType_} a.homeUrl is null
</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('homeUrlList')">
${_conditionType_} a.homeUrl in
<foreach collection="conditionParamRef.homeUrlList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('platformRemark')">
<if test="conditionParamRef.platformRemark != null and conditionParamRef.platformRemark != ''">
${_conditionType_} a.platformRemark like #{${_conditionParam_}.platformRemark}
</if>
<if test="conditionParamRef.containsKey('createUserIdList')">
${_conditionType_} a.createUserId in
<foreach collection="conditionParamRef.createUserIdList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
<if test="conditionParamRef.platformRemark == null">
${_conditionType_} a.platformRemark is null
</if>
<if test="conditionParamRef.containsKey('createUserIdStart') and conditionParamRef.createUserIdStart != null">
${_conditionType_} a.createUserId <![CDATA[ >= ]]> #{${_conditionParam_}.createUserIdStart}
</if>
<if test="conditionParamRef.containsKey('platformRemarkList')">
${_conditionType_} a.platformRemark in
<foreach collection="conditionParamRef.platformRemarkList" 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.containsKey('createUserIdEnd') and conditionParamRef.createUserIdEnd != null">
${_conditionType_} a.createUserId <![CDATA[ <= ]]> #{${_conditionParam_}.createUserIdEnd}
<if test="conditionParamRef.createUserId == null">
${_conditionType_} a.createUserId is null
</if>
</if>
<if test="conditionParamRef.containsKey('createUserIdList')">
${_conditionType_} a.createUserId in
<foreach collection="conditionParamRef.createUserIdList" 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 test="conditionParamRef.containsKey('createTime')">
<if test="conditionParamRef.createTime != null ">
${_conditionType_} a.createTime = #{${_conditionParam_}.createTime}
</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 test="conditionParamRef.createTime == null">
${_conditionType_} a.createTime is null
</if>
<if test="conditionParamRef.containsKey('updateUserIdList')">
${_conditionType_} a.updateUserId in
<foreach collection="conditionParamRef.updateUserIdList" 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('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.containsKey('updateUserIdEnd') and conditionParamRef.updateUserIdEnd != null">
${_conditionType_} a.updateUserId <![CDATA[ <= ]]> #{${_conditionParam_}.updateUserIdEnd}
<if test="conditionParamRef.updateUserId == null">
${_conditionType_} a.updateUserId is null
</if>
</if>
<if test="conditionParamRef.containsKey('updateUserIdList')">
${_conditionType_} a.updateUserId in
<foreach collection="conditionParamRef.updateUserIdList" 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 test="conditionParamRef.containsKey('updateTime')">
<if test="conditionParamRef.updateTime != null ">
${_conditionType_} a.updateTime = #{${_conditionParam_}.updateTime}
</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 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}
${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('platformName')">
a.platformName
<if test='orderCol.platformName != null and "DESC".equalsIgnoreCase(orderCol.platformName)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('platformSn')">
a.platformSn
<if test='orderCol.platformSn != null and "DESC".equalsIgnoreCase(orderCol.platformSn)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('sendMsgType')">
a.sendMsgType
<if test='orderCol.sendMsgType != null and "DESC".equalsIgnoreCase(orderCol.sendMsgType)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('sendConfig')">
a.sendConfig
<if test='orderCol.sendConfig != null and "DESC".equalsIgnoreCase(orderCol.sendConfig)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('sendSwitch')">
a.sendSwitch
<if test='orderCol.sendSwitch != null and "DESC".equalsIgnoreCase(orderCol.sendSwitch)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('platformRemark')">
a.platformRemark
<if test='orderCol.platformRemark != null and "DESC".equalsIgnoreCase(orderCol.platformRemark)'>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>
<if test="orderCol.containsKey('id')">
a.id
<if test='orderCol.id != null and "DESC".equalsIgnoreCase(orderCol.id)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('platformName')">
a.platformName
<if test='orderCol.platformName != null and "DESC".equalsIgnoreCase(orderCol.platformName)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('platformSn')">
a.platformSn
<if test='orderCol.platformSn != null and "DESC".equalsIgnoreCase(orderCol.platformSn)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('sendMsgType')">
a.sendMsgType
<if test='orderCol.sendMsgType != null and "DESC".equalsIgnoreCase(orderCol.sendMsgType)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('sendUrl')">
a.sendUrl
<if test='orderCol.sendUrl != null and "DESC".equalsIgnoreCase(orderCol.sendUrl)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('callbackUrl')">
a.callbackUrl
<if test='orderCol.callbackUrl != null and "DESC".equalsIgnoreCase(orderCol.callbackUrl)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('sendSwitch')">
a.sendSwitch
<if test='orderCol.sendSwitch != null and "DESC".equalsIgnoreCase(orderCol.sendSwitch)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('homeUrl')">
a.homeUrl
<if test='orderCol.homeUrl != null and "DESC".equalsIgnoreCase(orderCol.homeUrl)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('platformRemark')">
a.platformRemark
<if test='orderCol.platformRemark != null and "DESC".equalsIgnoreCase(orderCol.platformRemark)'>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>
......
......@@ -165,24 +165,38 @@ data|object|数据对象|-
```
### 获取平台产品列表
**请求URL:** m/api/getPlatformAndProduct
**请求方式:** GET
### 新增或更新设备
**请求URL:** m/api/saveOrUpdate
**请求方式:** POST
**鉴权头信息:** Authorization: {{token}}
**内容类型:** application/json;charset=utf-8
**简要描述:** 查询平台产品列表数据,用于设备新增提交
**简要描述:** 保存或更新设备,设备deviceCode存在更新,不存在新增,
请求需添加接口鉴权token信息,来源getToken接口
**请求参数:**
参数名称|类型|备注|必填|其它
---|---|---|---|---
deviceName|String|设备名称|否|-
deviceCode|String|设备编码,如MAC地址|是|-
platformCode|String|平台系统编码|是|见平台编码附录
productCode|String|产品编码|是|见产品编码附录
siteCode|String|站点编号,来源基础服务平台|是|-
siteName|String|站点名称|是|-
homeUrl|String|首页地址|否|-
deviceRemark|String|备注|是|-
**请求样例:**
```
{
}
```
**响应参数:**
......@@ -192,25 +206,16 @@ data|object|数据对象|-
code|Integer|结果码(-1.失败,1.成功)|-
msg|String|消息|-
data|object|数据对象|-
&emsp;platformList|array|平台列表|数组
&emsp;&emsp;id|Long|ID|-
&emsp;&emsp;platformName|String|平台名称,名称唯一|-
&emsp;&emsp;platformSn|String|平台编码,编码唯一|-
&emsp;productList|array|产品列表|数组
&emsp;&emsp;id|Long|ID|-
&emsp;&emsp;productName|String|产品名称,名称唯一|-
&emsp;&emsp;productCode|String|产品编码,编码唯一|-
**响应消息样例:**
```
```
```
### 新增或更新设备
### 激活设备
**请求URL:** m/api/saveOrUpdate
**请求URL:** m/api/active
**请求方式:** POST
......@@ -218,37 +223,20 @@ data|object|数据对象|-
**内容类型:** application/json;charset=utf-8
**简要描述:** 保存或更新设备,设备deviceCode存在更新,不存在新增,
请求需添加接口鉴权token信息,来源getToken接口
**简要描述:** 激活设备
请求需添加接口鉴权token信息,来源getToken接口
**请求参数:**
参数名称|类型|备注|必填|其它
---|---|---|---|---
deviceName|String|设备名称|否|-
deviceCode|String|设备编码|是|-
deviceMac|String|设备的MAC地址|否|-
platformId|Long|平台系统Id|是|来源接口获取平台产品列表
platformName|String|平台系统名称|是|-
productId|Long|产品Id|是|来源接口获取平台产品列表
productName|String|产品名称|是|-
siteCode|String|站点编号,来源基础服务平台|是|-
siteName|String|站点名称|是|-
deviceRemark|String|备注|是|-
**请求样例:**
```
{
"deviceName":"lmfrs8",
"deviceCode":"yte9s3",
"siteCode":"nmyc5u",
"siteName":"a4vxhg",
"deviceMac":"y9tuaw",
"platformId":3125,
"productId":362,
"deviceRemark":"ah98cp",
}
```
......@@ -266,9 +254,9 @@ data|object|数据对象|-
```
### 激活设备
### 删除设备
**请求URL:** m/api/active
**请求URL:** m/api/deviceDel
**请求方式:** POST
......@@ -276,7 +264,7 @@ data|object|数据对象|-
**内容类型:** application/json;charset=utf-8
**简要描述:** 激活设备
**简要描述:** 删除设备
请求需添加接口鉴权token信息,来源getToken接口
**请求参数:**
......@@ -307,7 +295,52 @@ data|object|数据对象|-
```
### 回调各个平台通知消息
**请求URL:** 各平台通知地址
**请求方式:** POST
**内容类型:** application/json;charset=utf-8
**简要描述:** 设备新增激活下线等消息通知各个平台,当配置了地址时候
**请求参数:**
参数名称|类型|备注|必填|其它
:---|:---|:---|:---|:---
code|Integer|结果码(-1.失败,1.成功)|是|-
msg|String|消息|否|-
type|Integer|消息类型|是|0:设备增删改查,data数据域封装具体设备消息,1:设备消息类,数据域透传设备上行消息体。|-
data|object|数据对象|是|-
&emsp;deviceStatus|Integer|状态,1:新增,2:修改,3:删除,4:激活,5:上线,6:下线|是|-
&emsp;deviceName|String|设备名称|否|-
&emsp;deviceCode|String|设备编码,如MAC地址|是|-
&emsp;platformCode|String|平台系统编码|是|见平台编码附录
&emsp;productCode|String|产品编码|是|见产品编码附录
&emsp;siteCode|String|站点编号,来源基础服务平台|是|-
&emsp;siteName|String|站点名称|是|-
&emsp;deviceRemark|String|备注|是|-
**请求样例:**
```
{
}
```
**响应参数:**
参数名称 |参数类型|备注|其它
---|---|---|---
code|Integer|结果码(-1.失败,1.成功)|-
msg|String|消息|-
data|object|数据对象|-
**响应消息样例:**
```
```
## 设备消息
......
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