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

jackwang 部署微服务接口

上级 15a7098e
......@@ -37,11 +37,11 @@
git clone -b master $para2 ibizhumanresources/
export NODE_OPTIONS=--max-old-space-size=4096
cd ibizhumanresources/
mvn clean package -Ppim
cd humanresource-app/humanresource-app-pim
mvn -Ppim docker:build
mvn -Ppim docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/humanresource-app-pim.yaml iBizEE --with-registry-auth
mvn clean package -Phrapi
cd humanresource-provider/humanresource-provider-hrapi
mvn -Phrapi docker:build
mvn -Phrapi docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/humanresource-provider-hrapi.yaml iBizEE --with-registry-auth
</command>
</hudson.tasks.Shell>
</builders>
......
......@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /humanresource-app-pim.jar
EXPOSE 10327
EXPOSE 8080
ADD humanresource-app-pim.jar /humanresource-app-pim.jar
......@@ -3,25 +3,9 @@ services:
humanresource-app-pim:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/humanresource-app-pim:latest
ports:
- "10327:10327"
- "8080:8080"
networks:
- agent_network
environment:
- SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.240.110
- SERVER_PORT=10327
- SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.240.110:8848
- SPRING_REDIS_HOST=172.16.240.110
- 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&allowMultiQueries=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
- SEATA_REGISTRY_NACOS_SERVER-ADDR=172.16.240.110:8848
- SEATA_ENABLED=true
deploy:
resources:
limits:
......
......@@ -117,6 +117,21 @@ public class HROrgAddress extends EntityMP implements Serializable {
@JSONField(name = "mainaddress")
@JsonProperty("mainaddress")
private Integer mainaddress;
/**
* 组织
*/
@TableField(value = "hrorganizationid")
@JSONField(name = "hrorganizationid")
@JsonProperty("hrorganizationid")
private String hrorganizationid;
/**
* 组织
*/
@JsonIgnore
@JSONField(serialize = false)
@TableField(exist = false)
private cn.ibizlab.humanresource.core.base.domain.HROrganization hrorganization;
......@@ -160,6 +175,14 @@ public class HROrgAddress extends EntityMP implements Serializable {
this.modify("mainaddress",mainaddress);
}
/**
* 设置 [组织]
*/
public void setHrorganizationid(String hrorganizationid){
this.hrorganizationid = hrorganizationid ;
this.modify("hrorganizationid",hrorganizationid);
}
}
......
......@@ -110,6 +110,21 @@ public class HROrgContact extends EntityMP implements Serializable {
@JSONField(name = "maincontact")
@JsonProperty("maincontact")
private Integer maincontact;
/**
* 组织
*/
@TableField(value = "hrorganizationid")
@JSONField(name = "hrorganizationid")
@JsonProperty("hrorganizationid")
private String hrorganizationid;
/**
* 组织
*/
@JsonIgnore
@JSONField(serialize = false)
@TableField(exist = false)
private cn.ibizlab.humanresource.core.base.domain.HROrganization hrorganization;
......@@ -145,6 +160,14 @@ public class HROrgContact extends EntityMP implements Serializable {
this.modify("maincontact",maincontact);
}
/**
* 设置 [组织]
*/
public void setHrorganizationid(String hrorganizationid){
this.hrorganizationid = hrorganizationid ;
this.modify("hrorganizationid",hrorganizationid);
}
}
......
......@@ -41,6 +41,13 @@ public class HROrgAddressSearchContext extends QueryWrapperContext<HROrgAddress>
this.getSearchCond().eq("uses", n_uses_eq);
}
}
private String n_hrorganizationid_eq;//[组织]
public void setN_hrorganizationid_eq(String n_hrorganizationid_eq) {
this.n_hrorganizationid_eq = n_hrorganizationid_eq;
if(!ObjectUtils.isEmpty(this.n_hrorganizationid_eq)){
this.getSearchCond().eq("hrorganizationid", n_hrorganizationid_eq);
}
}
/**
* 启用快速搜索
......
......@@ -41,6 +41,13 @@ public class HROrgContactSearchContext extends QueryWrapperContext<HROrgContact>
this.getSearchCond().eq("contacttype", n_contacttype_eq);
}
}
private String n_hrorganizationid_eq;//[组织]
public void setN_hrorganizationid_eq(String n_hrorganizationid_eq) {
this.n_hrorganizationid_eq = n_hrorganizationid_eq;
if(!ObjectUtils.isEmpty(this.n_hrorganizationid_eq)){
this.getSearchCond().eq("hrorganizationid", n_hrorganizationid_eq);
}
}
/**
* 启用快速搜索
......
......@@ -62,4 +62,6 @@ public interface HROrgAddressMapper extends BaseMapper<HROrgAddress>{
@Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
List<HROrgAddress> selectByHrorganizationid(@Param("organizationid") Serializable organizationid) ;
}
......@@ -62,4 +62,6 @@ public interface HROrgContactMapper extends BaseMapper<HROrgContact>{
@Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
List<HROrgContact> selectByHrorganizationid(@Param("organizationid") Serializable organizationid) ;
}
......@@ -37,6 +37,8 @@ public interface IHROrgAddressService extends IService<HROrgAddress>{
boolean save(HROrgAddress et) ;
void saveBatch(List<HROrgAddress> list) ;
Page<HROrgAddress> searchDefault(HROrgAddressSearchContext context) ;
List<HROrgAddress> selectByHrorganizationid(String organizationid) ;
void removeByHrorganizationid(String organizationid) ;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
......
......@@ -37,6 +37,8 @@ public interface IHROrgContactService extends IService<HROrgContact>{
boolean save(HROrgContact et) ;
void saveBatch(List<HROrgContact> list) ;
Page<HROrgContact> searchDefault(HROrgContactSearchContext context) ;
List<HROrgContact> selectByHrorganizationid(String organizationid) ;
void removeByHrorganizationid(String organizationid) ;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
......
......@@ -45,6 +45,9 @@ import org.springframework.util.StringUtils;
@Service("HROrgAddressServiceImpl")
public class HROrgAddressServiceImpl extends ServiceImpl<HROrgAddressMapper, HROrgAddress> implements IHROrgAddressService {
@Autowired
@Lazy
protected cn.ibizlab.humanresource.core.base.service.IHROrganizationService hrorganizationService;
protected int batchSize = 500;
......@@ -140,6 +143,16 @@ public class HROrgAddressServiceImpl extends ServiceImpl<HROrgAddressMapper, HRO
}
@Override
public List<HROrgAddress> selectByHrorganizationid(String organizationid) {
return baseMapper.selectByHrorganizationid(organizationid);
}
@Override
public void removeByHrorganizationid(String organizationid) {
this.remove(new QueryWrapper<HROrgAddress>().eq("hrorganizationid",organizationid));
}
/**
* 查询集合 DEFAULT
......
......@@ -45,6 +45,9 @@ import org.springframework.util.StringUtils;
@Service("HROrgContactServiceImpl")
public class HROrgContactServiceImpl extends ServiceImpl<HROrgContactMapper, HROrgContact> implements IHROrgContactService {
@Autowired
@Lazy
protected cn.ibizlab.humanresource.core.base.service.IHROrganizationService hrorganizationService;
protected int batchSize = 500;
......@@ -140,6 +143,16 @@ public class HROrgContactServiceImpl extends ServiceImpl<HROrgContactMapper, HRO
}
@Override
public List<HROrgContact> selectByHrorganizationid(String organizationid) {
return baseMapper.selectByHrorganizationid(organizationid);
}
@Override
public void removeByHrorganizationid(String organizationid) {
this.remove(new QueryWrapper<HROrgContact>().eq("hrorganizationid",organizationid));
}
/**
* 查询集合 DEFAULT
......
......@@ -50,6 +50,12 @@ public class HROrganizationServiceImpl extends ServiceImpl<HROrganizationMapper,
protected cn.ibizlab.humanresource.core.humanresource.service.IHREmployeeService hremployeeService;
@Autowired
@Lazy
protected cn.ibizlab.humanresource.core.base.service.IHROrgAddressService hrorgaddressService;
@Autowired
@Lazy
protected cn.ibizlab.humanresource.core.base.service.IHROrgContactService hrorgcontactService;
@Autowired
@Lazy
protected cn.ibizlab.humanresource.core.base.service.IHROMHierarchyService hromhierarchyService;
protected int batchSize = 500;
......
......@@ -225,6 +225,8 @@
</column>
<column name="MAINADDRESS" remarks="" type="INT">
</column>
<column name="HRORGANIZATIONID" remarks="" type="VARCHAR(60)">
</column>
</createTable>
</changeSet>
......@@ -251,6 +253,8 @@
</column>
<column name="MAINCONTACT" remarks="" type="INT">
</column>
<column name="HRORGANIZATIONID" remarks="" type="VARCHAR(60)">
</column>
</createTable>
</changeSet>
......@@ -313,7 +317,13 @@
</changeSet>
<!--输出实体[HROPERATIONUNIT]外键关系 -->
<!--输出实体[HRORGADDRESS]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-hrorgaddress-27-19">
<addForeignKeyConstraint baseColumnNames="HRORGANIZATIONID" baseTableName="T_HRORGADDRESS" constraintName="DER1N_HRORGADDRESS_HRORGANIZAT" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ORGANIZATIONID" referencedTableName="ORGANIZATION" validate="true"/>
</changeSet>
<!--输出实体[HRORGCONTACT]外键关系 -->
<changeSet author="a_LAB01_e85d8801c" id="fk-hrorgcontact-23-20">
<addForeignKeyConstraint baseColumnNames="HRORGANIZATIONID" baseTableName="T_HRORGCONTACT" constraintName="DER1N_HRORGCONTACT_HRORGANIZAT" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ORGANIZATIONID" referencedTableName="ORGANIZATION" validate="true"/>
</changeSet>
<!--输出实体[HRORGANIZATION]外键关系 -->
</databaseChangeLog>
......@@ -5,16 +5,26 @@
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="HROrgAddressResultMap" databaseId="mysql">
<![CDATA[select t1.* from (SELECT t1.`ADDRESS`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`HRORGADDRESSID`, t1.`HRORGADDRESSNAME`, t1.`MAINADDRESS`, t1.`POSTCODE`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`USES` FROM `T_HRORGADDRESS` t1 ) t1 where hrorgaddressid=#{id}]]>
<![CDATA[select t1.* from (SELECT t1.`ADDRESS`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`HRORGADDRESSID`, t1.`HRORGADDRESSNAME`, t1.`HRORGANIZATIONID`, t1.`MAINADDRESS`, t1.`POSTCODE`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`USES` FROM `T_HRORGADDRESS` t1 ) t1 where hrorgaddressid=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap id="HROrgAddressResultMap" type="cn.ibizlab.humanresource.core.base.domain.HROrgAddress" autoMapping="true">
<id property="hrorgaddressid" column="hrorgaddressid" /><!--主键字段映射-->
<result property="hrorganizationid" column="hrorganizationid" />
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="hrorganization" javaType="cn.ibizlab.humanresource.core.base.domain.HROrganization" column="hrorganizationid" select="cn.ibizlab.humanresource.core.base.mapper.HROrganizationMapper.selectById" fetchType="lazy"></association>
</resultMap>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_HRORGADDRESS_HRORGANIZATION_HRORGANIZATIONID_6BD9DC] -->
<select id="selectByHrorganizationid" resultMap="HROrgAddressResultMap">
select t1.* from (
<include refid="Default" />
) t1
where hrorganizationid=#{organizationid}
</select>
<!--数据集合[Default]-->
<select id="searchDefault" parameterType="cn.ibizlab.humanresource.core.base.filter.HROrgAddressSearchContext" resultMap="HROrgAddressResultMap">
......@@ -27,12 +37,12 @@
<!--数据查询[Default]-->
<sql id="Default" databaseId="mysql">
<![CDATA[ SELECT t1.`ADDRESS`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`HRORGADDRESSID`, t1.`HRORGADDRESSNAME`, t1.`MAINADDRESS`, t1.`POSTCODE`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`USES` FROM `T_HRORGADDRESS` t1
<![CDATA[ SELECT t1.`ADDRESS`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`HRORGADDRESSID`, t1.`HRORGADDRESSNAME`, t1.`HRORGANIZATIONID`, t1.`MAINADDRESS`, t1.`POSTCODE`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`USES` FROM `T_HRORGADDRESS` t1
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="mysql">
<![CDATA[ SELECT t1.`ADDRESS`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`HRORGADDRESSID`, t1.`HRORGADDRESSNAME`, t1.`MAINADDRESS`, t1.`POSTCODE`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`USES` FROM `T_HRORGADDRESS` t1
<![CDATA[ SELECT t1.`ADDRESS`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`HRORGADDRESSID`, t1.`HRORGADDRESSNAME`, t1.`HRORGANIZATIONID`, t1.`MAINADDRESS`, t1.`POSTCODE`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`USES` FROM `T_HRORGADDRESS` t1
]]>
</sql>
</mapper>
......
......@@ -5,16 +5,26 @@
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="HROrgContactResultMap" databaseId="mysql">
<![CDATA[select t1.* from (SELECT t1.`CONTACTINFO`, t1.`CONTACTTYPE`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`HRORGCONTACTID`, t1.`HRORGCONTACTNAME`, t1.`MAINCONTACT`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_HRORGCONTACT` t1 ) t1 where hrorgcontactid=#{id}]]>
<![CDATA[select t1.* from (SELECT t1.`CONTACTINFO`, t1.`CONTACTTYPE`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`HRORGANIZATIONID`, t1.`HRORGCONTACTID`, t1.`HRORGCONTACTNAME`, t1.`MAINCONTACT`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_HRORGCONTACT` t1 ) t1 where hrorgcontactid=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap id="HROrgContactResultMap" type="cn.ibizlab.humanresource.core.base.domain.HROrgContact" autoMapping="true">
<id property="hrorgcontactid" column="hrorgcontactid" /><!--主键字段映射-->
<result property="hrorganizationid" column="hrorganizationid" />
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="hrorganization" javaType="cn.ibizlab.humanresource.core.base.domain.HROrganization" column="hrorganizationid" select="cn.ibizlab.humanresource.core.base.mapper.HROrganizationMapper.selectById" fetchType="lazy"></association>
</resultMap>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_HRORGCONTACT_HRORGANIZATION_HRORGANIZATIONID_6BD9DC] -->
<select id="selectByHrorganizationid" resultMap="HROrgContactResultMap">
select t1.* from (
<include refid="Default" />
) t1
where hrorganizationid=#{organizationid}
</select>
<!--数据集合[Default]-->
<select id="searchDefault" parameterType="cn.ibizlab.humanresource.core.base.filter.HROrgContactSearchContext" resultMap="HROrgContactResultMap">
......@@ -27,12 +37,12 @@
<!--数据查询[Default]-->
<sql id="Default" databaseId="mysql">
<![CDATA[ SELECT t1.`CONTACTINFO`, t1.`CONTACTTYPE`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`HRORGCONTACTID`, t1.`HRORGCONTACTNAME`, t1.`MAINCONTACT`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_HRORGCONTACT` t1
<![CDATA[ SELECT t1.`CONTACTINFO`, t1.`CONTACTTYPE`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`HRORGANIZATIONID`, t1.`HRORGCONTACTID`, t1.`HRORGCONTACTNAME`, t1.`MAINCONTACT`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_HRORGCONTACT` t1
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="mysql">
<![CDATA[ SELECT t1.`CONTACTINFO`, t1.`CONTACTTYPE`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`HRORGCONTACTID`, t1.`HRORGCONTACTNAME`, t1.`MAINCONTACT`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_HRORGCONTACT` t1
<![CDATA[ SELECT t1.`CONTACTINFO`, t1.`CONTACTTYPE`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`HRORGANIZATIONID`, t1.`HRORGCONTACTID`, t1.`HRORGCONTACTNAME`, t1.`MAINCONTACT`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `T_HRORGCONTACT` t1
]]>
</sql>
</mapper>
......
......@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /humanresource-provider-hrapi.jar
EXPOSE 8081
EXPOSE 10317
ADD humanresource-provider-hrapi.jar /humanresource-provider-hrapi.jar
......@@ -3,9 +3,25 @@ services:
humanresource-provider-hrapi:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/humanresource-provider-hrapi:latest
ports:
- "8081:8081"
- "10317:10317"
networks:
- agent_network
environment:
- SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.240.110
- SERVER_PORT=10317
- SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.240.110:8848
- SPRING_REDIS_HOST=172.16.240.110
- 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&allowMultiQueries=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
- SEATA_REGISTRY_NACOS_SERVER-ADDR=172.16.240.110:8848
- SEATA_ENABLED=true
deploy:
resources:
limits:
......
......@@ -105,6 +105,14 @@ public class HROrgAddressDTO extends DTOBase implements Serializable {
@JsonProperty("mainaddress")
private Integer mainaddress;
/**
* 属性 [HRORGANIZATIONID]
*
*/
@JSONField(name = "hrorganizationid")
@JsonProperty("hrorganizationid")
private String hrorganizationid;
/**
* 设置 [HRORGADDRESSNAME]
......@@ -146,6 +154,14 @@ public class HROrgAddressDTO extends DTOBase implements Serializable {
this.modify("mainaddress",mainaddress);
}
/**
* 设置 [HRORGANIZATIONID]
*/
public void setHrorganizationid(String hrorganizationid){
this.hrorganizationid = hrorganizationid ;
this.modify("hrorganizationid",hrorganizationid);
}
}
......@@ -97,6 +97,14 @@ public class HROrgContactDTO extends DTOBase implements Serializable {
@JsonProperty("maincontact")
private Integer maincontact;
/**
* 属性 [HRORGANIZATIONID]
*
*/
@JSONField(name = "hrorganizationid")
@JsonProperty("hrorganizationid")
private String hrorganizationid;
/**
* 设置 [HRORGCONTACTNAME]
......@@ -130,6 +138,14 @@ public class HROrgContactDTO extends DTOBase implements Serializable {
this.modify("maincontact",maincontact);
}
/**
* 设置 [HRORGANIZATIONID]
*/
public void setHrorganizationid(String hrorganizationid){
this.hrorganizationid = hrorganizationid ;
this.modify("hrorganizationid",hrorganizationid);
}
}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册