接口中的xml报文和实体类的之间转换
需求:湖南保险行业意健险承保风险预警平台数据接口
平台提供HTTPServlet服务,接受保险公司的数据请求,并在处理后返回给保险公司相应的处理结果。数据接口格式为XML数据报文,在每次接口的交易中,都包含了请求的XML数据与平台返回的XML数据。
直接操作xml格式的报文是不太方便的,最好是将xml格式的报文转换成对应的实体类,再进行操作会变得清晰方便许多。
接下来的代码是xml和实体类之间的相互转化。
package com.sinosoft.serviceclient.bj; import com.sinosoft.lis.pubfun.PubFun;
import com.sinosoft.serviceclient.ServiceClient;
import com.sinosoft.tech.log.Logger;
import com.sinosoft.tech.log.LoggerFactory;
import com.sinosoft.tools.xmltools.framework.XmlConvertor;
import com.sinosoft.utility.SSRS;
import com.sinosoft.webservice.DTO.hnRiskWarning.contUpload.ContUpload_Body_Req;
import com.sinosoft.webservice.DTO.hnRiskWarning.contUpload.ContUpload_Body_Rsp;
import com.sinosoft.webservice.DTO.hnRiskWarning.contUpload.ContUpload_Constantly_Req;
import com.sinosoft.webservice.DTO.hnRiskWarning.contUpload.ContUpload_Head_Req;
import com.sinosoft.webservice.DTO.hnRiskWarning.contUpload.ContUpload_Head_Rsp;
import com.sinosoft.webservice.DTO.hnRiskWarning.contUpload.ContUpload_Packet_Req;
import com.sinosoft.webservice.DTO.hnRiskWarning.contUpload.ContUpload_Packet_Rsp;
import com.sinosoft.webservice.DTO.hnRiskWarning.edorUpload.EdorUpload_Body_Req;
import com.sinosoft.webservice.DTO.hnRiskWarning.edorUpload.EdorUpload_Constantly_Req;
import com.sinosoft.webservice.DTO.hnRiskWarning.edorUpload.EdorUpload_Head_Req;
import com.sinosoft.webservice.DTO.hnRiskWarning.edorUpload.EdorUpload_Packet_Req;
import com.sinosoft.webservice.DTO.hnRiskWarning.edorUpload.EdorUpload_Packet_Rsp;
import com.sinosoft.webservice.DTO.hnRiskWarning.registerUpload.RegisterUpload_Body_Req;
import com.sinosoft.webservice.DTO.hnRiskWarning.registerUpload.RegisterUpload_Constantly_Req;
import com.sinosoft.webservice.DTO.hnRiskWarning.registerUpload.RegisterUpload_Head_Req;
import com.sinosoft.webservice.DTO.hnRiskWarning.registerUpload.RegisterUpload_Packet_Req;
import com.sinosoft.webservice.DTO.hnRiskWarning.registerUpload.RegisterUpload_Packet_Rsp;
import com.sinosoft.webservice.DTO.hnRiskWarning.settleUpload.SettleUpload_Body_Req;
import com.sinosoft.webservice.DTO.hnRiskWarning.settleUpload.SettleUpload_Constantly_Req;
import com.sinosoft.webservice.DTO.hnRiskWarning.settleUpload.SettleUpload_Head_Req;
import com.sinosoft.webservice.DTO.hnRiskWarning.settleUpload.SettleUpload_Packet_Req;
import com.sinosoft.webservice.DTO.hnRiskWarning.settleUpload.SettleUpload_Packet_Rsp; /**
* 湖南风险预警平台-客户端
*
* @author 赵永强
*/
public class HNRiskWarningClient {
static final Logger logger = LoggerFactory.getLogger(HNRiskWarningClient.class);
// 系统当前日期
private String mCurrentDate;
// 系统当前时间
private String mCurrentTime;
// 转换器
private XmlConvertor convertor = new XmlConvertor();
// 发送请求
ServiceClient serviceClient = new ServiceClient(); public HNRiskWarningClient() {
mCurrentTime = PubFun.getCurrentTime();
mCurrentDate = PubFun.getCurrentDate();
} // 需要在select * from ldinterfaceconfig l where makeoperator='' for update;
// 表中进行配置
// 接口的环节,分为:承保环节 理赔环节 // 承保环节-保单上传
public boolean contUpload(SSRS tSSRS) { // 封装报文
ContUpload_Packet_Req tContUpload_Packet_Req = new ContUpload_Packet_Req();
ContUpload_Head_Req tContUpload_Head_Req = new ContUpload_Head_Req();
// 先给报文头附上默认值,后期需要改动再改动
tContUpload_Head_Req.setRecordType("V02");
tContUpload_Head_Req.setCompanyCode("C1");
tContUpload_Head_Req.setUptime(mCurrentDate + " " + mCurrentTime);
tContUpload_Head_Req.setSign("FC9AAD2CD4C8992D8E6D484BC0FF5C40");
tContUpload_Head_Req.setUpNumber("100"); ContUpload_Body_Req tContUpload_Body_Req = new ContUpload_Body_Req();
// 创建对象数组
ContUpload_Constantly_Req[] tUpload_Constantly_Reqs = new ContUpload_Constantly_Req[tSSRS.getMaxRow()]; for (int i = 1; i <= tSSRS.getMaxRow(); i++) {
ContUpload_Constantly_Req tContUpload_Constantly_Req = new ContUpload_Constantly_Req();
tContUpload_Constantly_Req.setNumber(tSSRS.GetText(i, 1));
tContUpload_Constantly_Req.setItemKind(tSSRS.GetText(i, 2));
tContUpload_Constantly_Req.setPolicyNo(tSSRS.GetText(i, 3));
tContUpload_Constantly_Req.setInsuredName(tSSRS.GetText(i, 4));
tContUpload_Constantly_Req.setInsuredIdType(tSSRS.GetText(i, 5));
tContUpload_Constantly_Req.setInsuredIdCard(tSSRS.GetText(i, 6));
tContUpload_Constantly_Req.setSellChannel(tSSRS.GetText(i, 7));
tContUpload_Constantly_Req.setStartDate(tSSRS.GetText(i, 8));
tContUpload_Constantly_Req.setEndDate(tSSRS.GetText(i, 9));
tContUpload_Constantly_Req.setEnterTime(tSSRS.GetText(i, 10));
tContUpload_Constantly_Req.setAmount(tSSRS.GetText(i, 11));
tContUpload_Constantly_Req.setAreaId(tSSRS.GetText(i, 12)); tUpload_Constantly_Reqs[i - 1] = tContUpload_Constantly_Req; } tContUpload_Body_Req.setContUpload_Constantly(tUpload_Constantly_Reqs);
tContUpload_Packet_Req.setBody(tContUpload_Body_Req);
tContUpload_Packet_Req.setHead(tContUpload_Head_Req);
// 调用webService接口发送数据,并获取返回的xml数据
byte[] requestXML = convertor.convertToXml(tContUpload_Packet_Req, "");
String mStr = new String(requestXML);
logger.info(" 承保环节-保单上传-请求报文:" + mStr);
String returnXML = "";// 接收预警平台传过来的返回报文
try {
// TODO callService方法中参数,需后续配置
returnXML = serviceClient.callService("", "", mStr);
// 对湖南预警平台返回的报文进行解析并正确和错误结果
ContUpload_Packet_Rsp tContUpload_Packet_Rsp = convertor.convertToObject(returnXML, ContUpload_Packet_Rsp.class);
if ("0".equals(tContUpload_Packet_Rsp.getHead().getErrorNumber())) {
logger.info("推送数据-[承保环节-保单上传]-完成,调用接口成功");
return true;
}
if ("2".equals(tContUpload_Packet_Rsp.getHead().getErrorNumber())) {
logger.info("推送数据-[承保环节-保单上传]-失败,调用接口失败");
return false;
} } catch (Exception e1) {
logger.error("调用湖南保险行业意健险承保风险预警平台数据接口-[承保环节-保单上传]-报错了!", e1);
logger.info("调用湖南保险行业意健险承保风险预警平台数据接口-[承保环节-保单上传]-结束!");
e1.printStackTrace();
return false;
}
return true; } // 承保环节-批单上传
public boolean edorUpload(SSRS tSSRS) { // 封装报文
EdorUpload_Packet_Req tEdorUpload_Packet_Req = new EdorUpload_Packet_Req();
EdorUpload_Head_Req tEdorUpload_Head_Req = new EdorUpload_Head_Req();
// 先给报文头附上默认值,后期需要改动再改动
tEdorUpload_Head_Req.setRecordType("V03");
tEdorUpload_Head_Req.setCompanyCode("C1");
tEdorUpload_Head_Req.setUptime(mCurrentDate + " " + mCurrentTime);
tEdorUpload_Head_Req.setSign("FC9AAD2CD4C8992D8E6D484BC0FF5C40");
tEdorUpload_Head_Req.setUpNumber("100"); EdorUpload_Body_Req tEdorUpload_Body_Req = new EdorUpload_Body_Req();
// 创建对象数组
EdorUpload_Constantly_Req[] tEdorUpload_Constantly_Reqs = new EdorUpload_Constantly_Req[tSSRS.getMaxRow()]; for (int i = 1; i <= tSSRS.getMaxRow(); i++) {
EdorUpload_Constantly_Req tEdorUpload_Constantly_Req = new EdorUpload_Constantly_Req();
tEdorUpload_Constantly_Req.setNumber(tSSRS.GetText(i, 1));
tEdorUpload_Constantly_Req.setItemKind(tSSRS.GetText(i, 2));
tEdorUpload_Constantly_Req.setEndorseNo(tSSRS.GetText(i, 3));
tEdorUpload_Constantly_Req.setPolicyNo(tSSRS.GetText(i, 4));
tEdorUpload_Constantly_Req.setIniInsuredName(tSSRS.GetText(i, 5));
tEdorUpload_Constantly_Req.setIniInsuredIdType(tSSRS.GetText(i, 6));
tEdorUpload_Constantly_Req.setIniInsuredIdCard(tSSRS.GetText(i, 7));
tEdorUpload_Constantly_Req.setInsuredName(tSSRS.GetText(i, 8));
tEdorUpload_Constantly_Req.setInsuredIdType(tSSRS.GetText(i, 9));
tEdorUpload_Constantly_Req.setInsuredIdCard(tSSRS.GetText(i, 10));
tEdorUpload_Constantly_Req.setSellChannel(tSSRS.GetText(i, 11));
tEdorUpload_Constantly_Req.setStartDate(tSSRS.GetText(i, 12));
tEdorUpload_Constantly_Req.setEndDate(tSSRS.GetText(i, 13));
tEdorUpload_Constantly_Req.setEnterTime(tSSRS.GetText(i, 14));
tEdorUpload_Constantly_Req.setAmount(tSSRS.GetText(i, 15));
tEdorUpload_Constantly_Req.setAreaId(tSSRS.GetText(i, 16)); tEdorUpload_Constantly_Reqs[i - 1] = tEdorUpload_Constantly_Req; } tEdorUpload_Body_Req.setEdorUpload_Constantly_Req(tEdorUpload_Constantly_Reqs);
tEdorUpload_Packet_Req.setBody(tEdorUpload_Body_Req);
tEdorUpload_Packet_Req.setHead(tEdorUpload_Head_Req);
// 调用webService接口发送数据,并获取返回的xml数据
byte[] requestXML = convertor.convertToXml(tEdorUpload_Packet_Req, "");
String mStr = new String(requestXML);
logger.info(" 承保环节-批单-请求报文:" + mStr);
String returnXML = "";// 接收预警平台传过来的返回报文
try {
// TODO callService方法中参数,需后续配置
returnXML = serviceClient.callService("", "", mStr);
// 对湖南预警平台返回的报文进行解析并正确和错误结果
EdorUpload_Packet_Rsp tEdorUpload_Packet_Rsp = convertor.convertToObject(returnXML, EdorUpload_Packet_Rsp.class);
if ("0".equals(tEdorUpload_Packet_Rsp.getHead().getErrorNumber())) {
logger.info("推送数据-[承保环节-批单上传]-完成,调用接口成功");
return true;
}
if ("2".equals(tEdorUpload_Packet_Rsp.getHead().getErrorNumber())) {
logger.info("推送数据-[承保环节-批单上传]-失败,调用接口失败");
return false;
} } catch (Exception e1) {
logger.error("调用湖南保险行业意健险承保风险预警平台数据接口-[承保环节-批单上传]-报错了!", e1);
logger.info("调用湖南保险行业意健险承保风险预警平台数据接口-[承保环节-批单上传]-结束!");
e1.printStackTrace();
return false;
}
return true; } // 理赔部分-立案上传
public boolean registerUpload(SSRS tSSRS) { // 封装报文
RegisterUpload_Packet_Req tRegisterUpload_Packet_Req = new RegisterUpload_Packet_Req();
RegisterUpload_Head_Req tRegisterUpload_Head_Req = new RegisterUpload_Head_Req();
// 先给报文头附上默认值,后期需要改动再改动
tRegisterUpload_Head_Req.setRecordType("V04");
tRegisterUpload_Head_Req.setCompanyCode("C1");
tRegisterUpload_Head_Req.setUptime(mCurrentDate + " " + mCurrentTime);
tRegisterUpload_Head_Req.setSign("FC9AAD2CD4C8992D8E6D484BC0FF5C40");
tRegisterUpload_Head_Req.setUpNumber("100"); RegisterUpload_Body_Req tRegisterUpload_Body_Req = new RegisterUpload_Body_Req();
// 创建对象数组
RegisterUpload_Constantly_Req[] tRegisterUpload_Constantly_Reqs = new RegisterUpload_Constantly_Req[tSSRS.getMaxRow()]; for (int i = 1; i <= tSSRS.getMaxRow(); i++) {
RegisterUpload_Constantly_Req tRegisterUpload_Constantly_Req = new RegisterUpload_Constantly_Req();
tRegisterUpload_Constantly_Req.setNumber(tSSRS.GetText(i, 1));
tRegisterUpload_Constantly_Req.setItemKind(tSSRS.GetText(i, 2));
tRegisterUpload_Constantly_Req.setReportNo(tSSRS.GetText(i, 3));
tRegisterUpload_Constantly_Req.setPolicyNo(tSSRS.GetText(i, 4));
tRegisterUpload_Constantly_Req.setInsuredName(tSSRS.GetText(i, 5));
tRegisterUpload_Constantly_Req.setInsuredIdType(tSSRS.GetText(i, 6));
tRegisterUpload_Constantly_Req.setInsuredIdCard(tSSRS.GetText(i, 7));
tRegisterUpload_Constantly_Req.setReportDate(tSSRS.GetText(i, 8));
tRegisterUpload_Constantly_Req.setLossDate(tSSRS.GetText(i, 9));
tRegisterUpload_Constantly_Req.setClaimDate(tSSRS.GetText(i, 10));
tRegisterUpload_Constantly_Req.setLossAmount(tSSRS.GetText(i, 11));
tRegisterUpload_Constantly_Req.setLossAddress(tSSRS.GetText(i, 12));
tRegisterUpload_Constantly_Reqs[i - 1] = tRegisterUpload_Constantly_Req; } tRegisterUpload_Body_Req.setRegisterUpload_Constantly_Req(tRegisterUpload_Constantly_Reqs);
tRegisterUpload_Packet_Req.setBody(tRegisterUpload_Body_Req);
tRegisterUpload_Packet_Req.setHead(tRegisterUpload_Head_Req);
// 调用webService接口发送数据,并获取返回的xml数据
byte[] requestXML = convertor.convertToXml(tRegisterUpload_Packet_Req, "");
String mStr = new String(requestXML);
logger.info(" 理赔环节-立案上传-请求报文:" + mStr);
String returnXML = "";// 接收预警平台传过来的返回报文
try {
// TODO callService方法中参数,需后续配置
returnXML = serviceClient.callService("", "", mStr);
// 对湖南预警平台返回的报文进行解析并正确和错误结果
RegisterUpload_Packet_Rsp tRegisterUpload_Packet_Rsp = convertor.convertToObject(returnXML, RegisterUpload_Packet_Rsp.class);
if ("0".equals(tRegisterUpload_Packet_Rsp.getHead().getErrorNumber())) {
logger.info("推送数据-[理赔环节-立案上传]-完成,调用接口成功");
return true;
}
if ("2".equals(tRegisterUpload_Packet_Rsp.getHead().getErrorNumber())) {
logger.info("推送数据-[理赔环节-立案上传]-失败,调用接口失败");
return false;
}
} catch (Exception e1) {
logger.error("调用湖南保险行业意健险承保风险预警平台数据接口-[理赔环节-立案上传]-报错了!", e1);
logger.info("调用湖南保险行业意健险承保风险预警平台数据接口-[理赔环节-立案上传]-结束!");
e1.printStackTrace();
return false;
}
return true;
} // 理赔部分-结案上传
public boolean settleUpload(SSRS tSSRS) {
// 封装报文
SettleUpload_Packet_Req tSettleUpload_Packet_Req = new SettleUpload_Packet_Req();
SettleUpload_Head_Req tSettleUpload_Head_Req = new SettleUpload_Head_Req();
// 先给报文头附上默认值,后期需要改动再改动
tSettleUpload_Head_Req.setRecordType("V05");
tSettleUpload_Head_Req.setCompanyCode("C1");
// tSettleUpload_Head_Req.setUptime("2016-12-19 10:47:50");
tSettleUpload_Head_Req.setUptime(mCurrentDate + " " + mCurrentTime);
tSettleUpload_Head_Req.setSign("FC9AAD2CD4C8992D8E6D484BC0FF5C40");
tSettleUpload_Head_Req.setUpNumber("100"); SettleUpload_Body_Req tSettleUpload_Body_Req = new SettleUpload_Body_Req();
// 创建对象数组
SettleUpload_Constantly_Req[] tSettleUpload_Constantly_Reqs = new SettleUpload_Constantly_Req[tSSRS.getMaxRow()]; for (int i = 1; i <= tSSRS.getMaxRow(); i++) {
SettleUpload_Constantly_Req tSettleUpload_Constantly_Req = new SettleUpload_Constantly_Req();
tSettleUpload_Constantly_Req.setNumber(tSSRS.GetText(i, 1));
tSettleUpload_Constantly_Req.setItemKind(tSSRS.GetText(i, 2));
tSettleUpload_Constantly_Req.setReportNo(tSSRS.GetText(i, 3));
tSettleUpload_Constantly_Req.setPolicyNo(tSSRS.GetText(i, 4));
tSettleUpload_Constantly_Req.setInsuredName(tSSRS.GetText(i, 5));
tSettleUpload_Constantly_Req.setInsuredIdType(tSSRS.GetText(i, 6));
tSettleUpload_Constantly_Req.setInsuredIdCard(tSSRS.GetText(i, 7));
tSettleUpload_Constantly_Req.setEndCaseDate(tSSRS.GetText(i, 8));
tSettleUpload_Constantly_Req.setPayAmount(tSSRS.GetText(i, 9)); tSettleUpload_Constantly_Reqs[i - 1] = tSettleUpload_Constantly_Req; } tSettleUpload_Body_Req.setSettleUpload_Constantly_Req(tSettleUpload_Constantly_Reqs);
tSettleUpload_Packet_Req.setBody(tSettleUpload_Body_Req);
tSettleUpload_Packet_Req.setHead(tSettleUpload_Head_Req);
// 调用webService接口发送数据,并获取返回的xml数据
byte[] requestXML = convertor.convertToXml(tSettleUpload_Packet_Req, "");
String mStr = new String(requestXML);
logger.info(" 理赔环节-结案上传-请求报文:" + mStr);
String returnXML = "";// 接收预警平台传过来的返回报文
try {
// TODO callService方法中参数,需后续配置
returnXML = serviceClient.callService("", "", mStr);
SettleUpload_Packet_Rsp tSettleUpload_Packet_Rsp = convertor.convertToObject(returnXML, SettleUpload_Packet_Rsp.class);
if ("0".equals(tSettleUpload_Packet_Rsp.getHead().getErrorNumber())) {
logger.info("推送数据-[理赔环节-结案上传]-完成,调用接口成功");
return true;
}
if ("2".equals(tSettleUpload_Packet_Rsp.getHead().getErrorNumber())) {
logger.info("推送数据-[理赔环节-结案上传]-失败,调用接口失败");
return false;
}
} catch (Exception e1) {
logger.error("调用湖南保险行业意健险承保风险预警平台数据接口-[理赔环节-结案上传]-报错了!", e1);
logger.info("调用湖南保险行业意健险承保风险预警平台数据接口-[理赔环节-结案上传]-结束!");
e1.printStackTrace();
return false;
}
return true;
} /**
* 测试方法
*
* @param args
*/
public static void main(String[] args) {
// HNRiskWarningClient hnRiskWarningClient=new HNRiskWarningClient();
// InsureQuery_Packet_Req req=new InsureQuery_Packet_Req();
// hnRiskWarningClient.queryInsurance(req);
XmlConvertor convertor = new XmlConvertor();
ContUpload_Packet_Rsp tContUpload_Packet_Rsp = new ContUpload_Packet_Rsp();
ContUpload_Body_Rsp tUpload_Body_Rsp = new ContUpload_Body_Rsp();
ContUpload_Head_Rsp tUpload_Head_Rsp = new ContUpload_Head_Rsp();
tUpload_Head_Rsp.setErrorNumber("2");
tUpload_Head_Rsp.setUpNumber("100");
tUpload_Head_Rsp.setRecordType("V02");
tContUpload_Packet_Rsp.setBody(tUpload_Body_Rsp);
tContUpload_Packet_Rsp.setHead(tUpload_Head_Rsp);
byte[] convertToXml = convertor.convertToXml(tContUpload_Packet_Rsp, "gbk");
String str = new String(convertToXml);
System.out.println("请求参数:" + str);
tContUpload_Packet_Rsp = convertor.convertToObject(str, ContUpload_Packet_Rsp.class);
if ("0".equals(tContUpload_Packet_Rsp.getHead().getErrorNumber())) {
logger.info("推送数据-[承保环节-保单上传]-完成,调用接口成功"); }
if ("2".equals(tContUpload_Packet_Rsp.getHead().getErrorNumber())) {
logger.info("推送数据-[承保环节-保单上传]-失败,调用接口失败");
}
String currentTime = PubFun.getCurrentTime();
System.out.println("currentTime:" + currentTime);
} }
接口中的xml报文和实体类的之间转换的更多相关文章
- XML文件与实体类的互相转换
XML文件与实体类的互相转换 一.将XML文件反序列化为实体类对象 1. 通常程序的配置信息都保存在程序或者网站的专门的配置文件中(App.config/web.config).但是现在为了演示XML ...
- XML格式与实体类的转换
背景 本人头一回写博客,请大家多多关照.通过读取XML文件获取用户管理权限,其中涉及三部分: 1.XML文件的生成: 2.XML文件的读取: 3.XML文件的保存: 如何做 第一步:自己先将XML文件 ...
- .net 实体类与json转换(.net自带类库实现)更新
上一篇文章中写到在.net中实体类跟json格式的相互转换,今天在做具体转换时候,发现之前版本的jsonhelp对于日期类型的转换不全面.之前版本的jsonhelp中从实体类转换成json格式时候,将 ...
- .net 实体类与json转换(.net自带类库实现)
注意要点. 1.jsonhelp编写时候添加的引用.System.Runtime.Serialization.Json; 2.实体类需声明为public jsonhelp代码: using Syste ...
- 复杂xml格式报文和实体类之间的转化
pom.xml中引入如下依赖: <dependency> <groupId>org.eclipse.persistence</groupId> <artifa ...
- Mybatis Generator生成Mybatis Dao接口层*Mapper.xml以及对应实体类
[前言] 使用Mybatis-Generator自动生成Dao.Model.Mapping相关文件,Mybatis-Generator的作用就是充当了一个代码生成器的角色,使用代码生成器不仅可以简化我 ...
- 自动将String类型的XML解析成实体类
package com.mooc.freemarker2dto; public class BaseDto { } package com.mooc.freemarker2dto; public cl ...
- generatorConfig.xml自动生成实体类,dao和xml
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE generatorConfiguration ...
- 利用Xml架构生成实体访问类
由xml生成xsd及实体类 xmldataset工具 使用VS2005工具XSD.exe(SDK/v2.0/Bin/xsd.exe)自动生成实体类: xsd /c /namespace:myCom ...
随机推荐
- Kafka Streams | 流,实时处理和功能
1.目标 在我们之前的Kafka教程中,我们讨论了Kafka中的ZooKeeper.今天,在这个Kafka Streams教程中,我们将学习Kafka中Streams的实际含义.此外,我们将看到Kaf ...
- Wireshark 抓包过滤器学习
Wireshark 抓包过滤器学习 wireshark中,分为两种过滤器:捕获过滤器 和 显示过滤器 捕获过滤器 是指wireshark一开始在抓包时,就确定要抓取哪些类型的包:对于不需要的,不进行抓 ...
- OSGI.NET插件方式开发你的应用
之前一直从事C# WEB开发.基本都是业务开发,性能优化. 体力活占比90%吧.模块真的很多很多,每次部署经常出先各种问题.发布经常加班. 今年开始接触winform 开发.发现C# 的事件 委托 ...
- CF627E Orchestra [矩阵计数]
也许更好的阅读体验 \(\mathcal{Description}\) 题目大意 有一个\(r * c\)的矩阵上有\(n\)个点,问有多少个子矩阵里包含至少\(k\)个点 输入格式 第一行四个数\( ...
- [高清] Excel函数速记手册
------ 郑重声明 --------- 资源来自网络,纯粹共享交流, 如果喜欢,请您务必支持正版!! --------------------------------------------- 下 ...
- ABP 基于DDD的.NET开发框架 学习(六)创建新动态Api
我们想要这个服务暴露成一个Web API控制器,以方便客户端调用.ASP.NET Boilerplate能够自动且动态地为这个应用服务创建Web API 控制器,只需要一行配置代码即可完成. Dyna ...
- Web Api 转
GET:生到数据列表(默认),或者得到一条实体数据 POST:添加服务端添加一条记录,记录实体为Form对象 PUT:添加或修改服务端的一条记录,记录实体的Form对象,记录主键以GET方式进行传输 ...
- MySQL事务和事务隔离级别
1.概述 事务就是对数据库数据进行更改(包括insert.update.delete等)操作的一个执行单元,通常有一条或多条更改语句组成.在同一个事务中的更改操作要么同时成功,要么同时失败. 事务具有 ...
- [C#]DataTable转string[]
来源:https://zhidao.baidu.com/question/1754089856824824548.html string[] ary = Array.ConvertAll<Dat ...
- xcode 4 制作通用静态库
参考:http://blog.csdn.net/pjk1129/article/details/7255163 最近在做Apple的IOS开发,有开发静态库的需求,本身IOS的开发,只允许静态库或者F ...