提交 f8481820 编写于 作者: ibizdev's avatar ibizdev

lab_gzf 部署微服务接口

上级 1a4bceff
...@@ -119,6 +119,10 @@ zuul: ...@@ -119,6 +119,10 @@ zuul:
path: /listleads/** path: /listleads/**
serviceId: ibizbusinesscentral-centralapi serviceId: ibizbusinesscentral-centralapi
stripPrefix: false stripPrefix: false
opportunitycompetitor:
path: /opportunitycompetitors/**
serviceId: ibizbusinesscentral-centralapi
stripPrefix: false
contact: contact:
path: /contacts/** path: /contacts/**
serviceId: ibizbusinesscentral-centralapi serviceId: ibizbusinesscentral-centralapi
......
...@@ -124,6 +124,49 @@ public class OpportunityCompetitor extends EntityMP implements Serializable { ...@@ -124,6 +124,49 @@ public class OpportunityCompetitor extends EntityMP implements Serializable {
@JSONField(name = "entity2name") @JSONField(name = "entity2name")
@JsonProperty("entity2name") @JsonProperty("entity2name")
private String entity2name; private String entity2name;
/**
* 潜在顾客
*/
@TableField(exist = false)
@JSONField(name = "originatingleadid")
@JsonProperty("originatingleadid")
private String originatingleadid;
/**
* 潜在顾客
*/
@TableField(exist = false)
@JSONField(name = "originatingleadname")
@JsonProperty("originatingleadname")
private String originatingleadname;
/**
* 状态
*/
@TableField(exist = false)
@JSONField(name = "statecode")
@JsonProperty("statecode")
private Integer statecode;
/**
* 预计收入
*/
@TableField(exist = false)
@JSONField(name = "estimatedvalue")
@JsonProperty("estimatedvalue")
private BigDecimal estimatedvalue;
/**
* 预计结束日期
*/
@TableField(exist = false)
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "estimatedclosedate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("estimatedclosedate")
private Timestamp estimatedclosedate;
/**
* 实际收入
*/
@TableField(exist = false)
@JSONField(name = "actualvalue")
@JsonProperty("actualvalue")
private BigDecimal actualvalue;
/** /**
* *
......
...@@ -210,6 +210,12 @@ public class OpportunityCompetitorServiceImpl extends ServiceImpl<OpportunityCom ...@@ -210,6 +210,12 @@ public class OpportunityCompetitorServiceImpl extends ServiceImpl<OpportunityCom
opportunity=majorEntity; opportunity=majorEntity;
} }
et.setEntityname(opportunity.getOpportunityname()); et.setEntityname(opportunity.getOpportunityname());
et.setOriginatingleadid(opportunity.getOriginatingleadid());
et.setOriginatingleadname(opportunity.getOriginatingleadname());
et.setStatecode(opportunity.getStatecode());
et.setEstimatedvalue(opportunity.getEstimatedvalue());
et.setEstimatedclosedate(opportunity.getEstimatedclosedate());
et.setActualvalue(opportunity.getActualvalue());
} }
} }
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性--> <!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="OpportunityCompetitorResultMap" databaseId="mysql"> <select id="selectById" resultMap="OpportunityCompetitorResultMap" databaseId="mysql">
<![CDATA[select t1.* from (SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`ENTITY2ID`, t1.`ENTITY2NAME`, t1.`ENTITYID`, t1.`ENTITYNAME`, t1.`RELATIONSHIPSID`, t1.`RELATIONSHIPSNAME`, t1.`RELATIONSHIPSTYPE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `RELATIONSHIPS` t1 ) t1 where relationshipsid=#{id}]]> <![CDATA[select t1.* from (SELECT t11.`ACTUALVALUE`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`ENTITY2ID`, t1.`ENTITY2NAME`, t1.`ENTITYID`, t1.`ENTITYNAME`, t11.`ESTIMATEDCLOSEDATE`, t11.`ESTIMATEDVALUE`, t11.`ORIGINATINGLEADID`, t11.`ORIGINATINGLEADNAME`, t1.`RELATIONSHIPSID`, t1.`RELATIONSHIPSNAME`, t1.`RELATIONSHIPSTYPE`, t11.`STATECODE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `RELATIONSHIPS` t1 LEFT JOIN OPPORTUNITY t11 ON t1.ENTITYID = t11.OPPORTUNITYID ) t1 where relationshipsid=#{id}]]>
</select> </select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 --> <!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
...@@ -47,13 +47,13 @@ ...@@ -47,13 +47,13 @@
<!--数据查询[Default]--> <!--数据查询[Default]-->
<sql id="Default" databaseId="mysql"> <sql id="Default" databaseId="mysql">
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`ENTITY2ID`, t1.`ENTITY2NAME`, t1.`ENTITYID`, t1.`ENTITYNAME`, t1.`RELATIONSHIPSID`, t1.`RELATIONSHIPSNAME`, t1.`RELATIONSHIPSTYPE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `RELATIONSHIPS` t1 <![CDATA[ SELECT t11.`ACTUALVALUE`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`ENTITY2ID`, t1.`ENTITY2NAME`, t1.`ENTITYID`, t1.`ENTITYNAME`, t11.`ESTIMATEDCLOSEDATE`, t11.`ESTIMATEDVALUE`, t11.`ORIGINATINGLEADID`, t11.`ORIGINATINGLEADNAME`, t1.`RELATIONSHIPSID`, t1.`RELATIONSHIPSNAME`, t1.`RELATIONSHIPSTYPE`, t11.`STATECODE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `RELATIONSHIPS` t1 LEFT JOIN OPPORTUNITY t11 ON t1.ENTITYID = t11.OPPORTUNITYID
WHERE ( t1.`RELATIONSHIPSTYPE` = 'OPPORTUNITYCOMPETITOR' ) WHERE ( t1.`RELATIONSHIPSTYPE` = 'OPPORTUNITYCOMPETITOR' )
]]> ]]>
</sql> </sql>
<!--数据查询[View]--> <!--数据查询[View]-->
<sql id="View" databaseId="mysql"> <sql id="View" databaseId="mysql">
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`ENTITY2ID`, t1.`ENTITY2NAME`, t1.`ENTITYID`, t1.`ENTITYNAME`, t1.`RELATIONSHIPSID`, t1.`RELATIONSHIPSNAME`, t1.`RELATIONSHIPSTYPE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `RELATIONSHIPS` t1 <![CDATA[ SELECT t11.`ACTUALVALUE`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`ENTITY2ID`, t1.`ENTITY2NAME`, t1.`ENTITYID`, t1.`ENTITYNAME`, t11.`ESTIMATEDCLOSEDATE`, t11.`ESTIMATEDVALUE`, t11.`ORIGINATINGLEADID`, t11.`ORIGINATINGLEADNAME`, t1.`RELATIONSHIPSID`, t1.`RELATIONSHIPSNAME`, t1.`RELATIONSHIPSTYPE`, t11.`STATECODE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `RELATIONSHIPS` t1 LEFT JOIN OPPORTUNITY t11 ON t1.ENTITYID = t11.OPPORTUNITYID
WHERE ( t1.`RELATIONSHIPSTYPE` = 'OPPORTUNITYCOMPETITOR' ) WHERE ( t1.`RELATIONSHIPSTYPE` = 'OPPORTUNITYCOMPETITOR' )
]]> ]]>
</sql> </sql>
......
...@@ -228,6 +228,14 @@ ...@@ -228,6 +228,14 @@
"datascope":[{"id":"all","name":"全部数据"}, {"id":"createman","name":"创建人"}] "datascope":[{"id":"all","name":"全部数据"}, {"id":"createman","name":"创建人"}]
} }
, { , {
"dename":"OpportunityCompetitor",
"delogicname":"商机对手",
"sysmoudle":{"id":"SALES","name":"Sales"},
"dedataset":[{"id":"Default" , "name":"DEFAULT"}],
"deaction":[{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" },{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" }],
"datascope":[{"id":"all","name":"全部数据"}, {"id":"createman","name":"创建人"}]
}
, {
"dename":"Contact", "dename":"Contact",
"delogicname":"联系人", "delogicname":"联系人",
"sysmoudle":{"id":"BASE","name":"Base"}, "sysmoudle":{"id":"BASE","name":"Base"},
......
...@@ -9,6 +9,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \ ...@@ -9,6 +9,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \ sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /businesscentral-provider-centralapi.jar java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /businesscentral-provider-centralapi.jar
EXPOSE 8081 EXPOSE 10310
ADD businesscentral-provider-centralapi.jar /businesscentral-provider-centralapi.jar ADD businesscentral-provider-centralapi.jar /businesscentral-provider-centralapi.jar
...@@ -3,9 +3,23 @@ services: ...@@ -3,9 +3,23 @@ services:
businesscentral-provider-centralapi: businesscentral-provider-centralapi:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/businesscentral-provider-centralapi:latest image: registry.cn-shanghai.aliyuncs.com/ibizsys/businesscentral-provider-centralapi:latest
ports: ports:
- "8081:8081" - "10310:10310"
networks: networks:
- agent_network - agent_network
environment:
- SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.240.110
- SERVER_PORT=10310
- SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.240.110:8848
- SPRING_REDIS_HOST=127.0.0.1
- SPRING_REDIS_PORT=6379
- SPRING_REDIS_DATABASE=0
- SPRING_DATASOURCE_USERNAME=a_LAB01_e85d8801c
- SPRING_DATASOURCE_PASSWORD=b1@@@772
- SPRING_DATASOURCE_URL=jdbc:mysql://172.16.186.185:3306/a_LAB01_e85d8801c?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true
- SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
- SPRING_DATASOURCE_DEFAULTSCHEMA=a_LAB01_e85d8801c
- CAS=https://passport.ibizlab.cn
- NACOS=172.16.240.110:8848
deploy: deploy:
resources: resources:
limits: limits:
......
package cn.ibizlab.businesscentral.centralapi.dto;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.math.BigInteger;
import java.util.Map;
import java.util.HashMap;
import java.io.Serializable;
import java.math.BigDecimal;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.fastjson.annotation.JSONField;
import cn.ibizlab.businesscentral.util.domain.DTOBase;
import lombok.Data;
/**
* 服务DTO对象[OpportunityCompetitorDTO]
*/
@Data
public class OpportunityCompetitorDTO extends DTOBase implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 属性 [CREATEDATE]
*
*/
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("createdate")
private Timestamp createdate;
/**
* 属性 [CREATEMAN]
*
*/
@JSONField(name = "createman")
@JsonProperty("createman")
private String createman;
/**
* 属性 [RELATIONSHIPSID]
*
*/
@JSONField(name = "relationshipsid")
@JsonProperty("relationshipsid")
private String relationshipsid;
/**
* 属性 [RELATIONSHIPSNAME]
*
*/
@JSONField(name = "relationshipsname")
@JsonProperty("relationshipsname")
private String relationshipsname;
/**
* 属性 [RELATIONSHIPSTYPE]
*
*/
@JSONField(name = "relationshipstype")
@JsonProperty("relationshipstype")
private String relationshipstype;
/**
* 属性 [UPDATEDATE]
*
*/
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("updatedate")
private Timestamp updatedate;
/**
* 属性 [UPDATEMAN]
*
*/
@JSONField(name = "updateman")
@JsonProperty("updateman")
private String updateman;
/**
* 属性 [ENTITYID]
*
*/
@JSONField(name = "entityid")
@JsonProperty("entityid")
private String entityid;
/**
* 属性 [ENTITY2ID]
*
*/
@JSONField(name = "entity2id")
@JsonProperty("entity2id")
private String entity2id;
/**
* 属性 [ENTITYNAME]
*
*/
@JSONField(name = "entityname")
@JsonProperty("entityname")
private String entityname;
/**
* 属性 [ENTITY2NAME]
*
*/
@JSONField(name = "entity2name")
@JsonProperty("entity2name")
private String entity2name;
/**
* 属性 [ORIGINATINGLEADID]
*
*/
@JSONField(name = "originatingleadid")
@JsonProperty("originatingleadid")
private String originatingleadid;
/**
* 属性 [ORIGINATINGLEADNAME]
*
*/
@JSONField(name = "originatingleadname")
@JsonProperty("originatingleadname")
private String originatingleadname;
/**
* 属性 [STATECODE]
*
*/
@JSONField(name = "statecode")
@JsonProperty("statecode")
private Integer statecode;
/**
* 属性 [ESTIMATEDVALUE]
*
*/
@JSONField(name = "estimatedvalue")
@JsonProperty("estimatedvalue")
private BigDecimal estimatedvalue;
/**
* 属性 [ESTIMATEDCLOSEDATE]
*
*/
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "estimatedclosedate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("estimatedclosedate")
private Timestamp estimatedclosedate;
/**
* 属性 [ACTUALVALUE]
*
*/
@JSONField(name = "actualvalue")
@JsonProperty("actualvalue")
private BigDecimal actualvalue;
/**
* 设置 [RELATIONSHIPSNAME]
*/
public void setRelationshipsname(String relationshipsname){
this.relationshipsname = relationshipsname ;
this.modify("relationshipsname",relationshipsname);
}
/**
* 设置 [RELATIONSHIPSTYPE]
*/
public void setRelationshipstype(String relationshipstype){
this.relationshipstype = relationshipstype ;
this.modify("relationshipstype",relationshipstype);
}
/**
* 设置 [ENTITYID]
*/
public void setEntityid(String entityid){
this.entityid = entityid ;
this.modify("entityid",entityid);
}
/**
* 设置 [ENTITY2ID]
*/
public void setEntity2id(String entity2id){
this.entity2id = entity2id ;
this.modify("entity2id",entity2id);
}
/**
* 设置 [ENTITYNAME]
*/
public void setEntityname(String entityname){
this.entityname = entityname ;
this.modify("entityname",entityname);
}
/**
* 设置 [ENTITY2NAME]
*/
public void setEntity2name(String entity2name){
this.entity2name = entity2name ;
this.modify("entity2name",entity2name);
}
}
package cn.ibizlab.businesscentral.centralapi.mapping;
import org.mapstruct.*;
import cn.ibizlab.businesscentral.core.sales.domain.OpportunityCompetitor;
import cn.ibizlab.businesscentral.centralapi.dto.OpportunityCompetitorDTO;
import cn.ibizlab.businesscentral.util.domain.MappingBase;
import org.mapstruct.factory.Mappers;
@Mapper(componentModel = "spring", uses = {},
nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface OpportunityCompetitorMapping extends MappingBase<OpportunityCompetitorDTO, OpportunityCompetitor> {
}
...@@ -37,6 +37,11 @@ ...@@ -37,6 +37,11 @@
git clone -b master $para2 ibizbusinesscentral/ git clone -b master $para2 ibizbusinesscentral/
export NODE_OPTIONS=--max-old-space-size=4096 export NODE_OPTIONS=--max-old-space-size=4096
cd ibizbusinesscentral/ cd ibizbusinesscentral/
mvn clean package -Pcentralapi
cd businesscentral-provider/businesscentral-provider-centralapi
mvn -Pcentralapi docker:build
mvn -Pcentralapi docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/businesscentral-provider-centralapi.yaml iBizEE --with-registry-auth
</command> </command>
</hudson.tasks.Shell> </hudson.tasks.Shell>
</builders> </builders>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册