23 changed files with 760 additions and 2 deletions
@ -1 +1 @@ |
|||||
Subproject commit 0684de84eb7aeec1f3d6b9cbd53b7fd104f27242 |
Subproject commit 89bb48135eb0db7b1682b1e7d51b0bd5c8d02a0f |
@ -0,0 +1,136 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.elink.esua.epdc.dto; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 部门管理 |
||||
|
* |
||||
|
* @author elink elink@elink-cn.com |
||||
|
* @since v1.0.0 2022-10-17 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class MetaSysDeptDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* id |
||||
|
*/ |
||||
|
private Long id; |
||||
|
|
||||
|
/** |
||||
|
* 第三方平台编码 |
||||
|
*/ |
||||
|
private String infoCode; |
||||
|
|
||||
|
/** |
||||
|
* 上级ID |
||||
|
*/ |
||||
|
private Long pid; |
||||
|
|
||||
|
/** |
||||
|
* 所有上级ID,用逗号分开 |
||||
|
*/ |
||||
|
private String pids; |
||||
|
|
||||
|
/** |
||||
|
* 部门名称 |
||||
|
*/ |
||||
|
private String name; |
||||
|
|
||||
|
/** |
||||
|
* 排序 |
||||
|
*/ |
||||
|
private Integer sort; |
||||
|
|
||||
|
/** |
||||
|
* 删除标识 0:未删除 1:删除 |
||||
|
*/ |
||||
|
private Integer delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 创建者 |
||||
|
*/ |
||||
|
private Long creator; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createDate; |
||||
|
|
||||
|
/** |
||||
|
* 更新者 |
||||
|
*/ |
||||
|
private Long updater; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updateDate; |
||||
|
|
||||
|
/** |
||||
|
* 机构类型键值 |
||||
|
*/ |
||||
|
private String typeKey; |
||||
|
|
||||
|
/** |
||||
|
* 党委编码 |
||||
|
*/ |
||||
|
private String partyCode; |
||||
|
|
||||
|
/** |
||||
|
* 地址 |
||||
|
*/ |
||||
|
private String address; |
||||
|
|
||||
|
/** |
||||
|
* 联系方式 |
||||
|
*/ |
||||
|
private String mobile; |
||||
|
|
||||
|
/** |
||||
|
* 经度 |
||||
|
*/ |
||||
|
private String longitude; |
||||
|
|
||||
|
/** |
||||
|
* 纬度 |
||||
|
*/ |
||||
|
private String latitude; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
*/ |
||||
|
private String caBindId; |
||||
|
|
||||
|
/** |
||||
|
* 所属地区码(所属组织地区码) |
||||
|
*/ |
||||
|
private String areaCode; |
||||
|
|
||||
|
/** |
||||
|
* 市中心区划编码 |
||||
|
*/ |
||||
|
private String disCenterZoningCode; |
||||
|
|
||||
|
} |
@ -0,0 +1,35 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.elink.esua.epdc.modules.screen.dao; |
||||
|
|
||||
|
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; |
||||
|
import com.elink.esua.epdc.modules.screen.entity.MetaSysDeptEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
/** |
||||
|
* 部门管理 |
||||
|
* |
||||
|
* @author elink elink@elink-cn.com |
||||
|
* @since v1.0.0 2022-10-17 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface MetaSysDeptDao extends BaseDao<MetaSysDeptEntity> { |
||||
|
|
||||
|
void truncate(); |
||||
|
|
||||
|
} |
@ -0,0 +1,142 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.elink.esua.epdc.modules.screen.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
|
||||
|
import com.elink.esua.epdc.commons.mybatis.entity.BaseEntity; |
||||
|
import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 部门管理 |
||||
|
* |
||||
|
* @author elink elink@elink-cn.com |
||||
|
* @since v1.0.0 2022-10-17 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("meta_sys_dept") |
||||
|
public class MetaSysDeptEntity extends BaseEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* id |
||||
|
*/ |
||||
|
private Long id; |
||||
|
|
||||
|
/** |
||||
|
* 第三方平台编码 |
||||
|
*/ |
||||
|
private String infoCode; |
||||
|
|
||||
|
/** |
||||
|
* 上级ID |
||||
|
*/ |
||||
|
private Long pid; |
||||
|
|
||||
|
/** |
||||
|
* 所有上级ID,用逗号分开 |
||||
|
*/ |
||||
|
private String pids; |
||||
|
|
||||
|
/** |
||||
|
* 部门名称 |
||||
|
*/ |
||||
|
private String name; |
||||
|
|
||||
|
/** |
||||
|
* 排序 |
||||
|
*/ |
||||
|
private Integer sort; |
||||
|
|
||||
|
/** |
||||
|
* 删除标识 0:未删除 1:删除 |
||||
|
*/ |
||||
|
private Integer delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 创建者 |
||||
|
*/ |
||||
|
private Long creator; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createDate; |
||||
|
|
||||
|
/** |
||||
|
* 更新者 |
||||
|
*/ |
||||
|
private Long updater; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updateDate; |
||||
|
|
||||
|
/** |
||||
|
* 机构类型键值 |
||||
|
*/ |
||||
|
private String typeKey; |
||||
|
|
||||
|
/** |
||||
|
* 党委编码 |
||||
|
*/ |
||||
|
private String partyCode; |
||||
|
|
||||
|
/** |
||||
|
* 地址 |
||||
|
*/ |
||||
|
private String address; |
||||
|
|
||||
|
/** |
||||
|
* 联系方式 |
||||
|
*/ |
||||
|
private String mobile; |
||||
|
|
||||
|
/** |
||||
|
* 经度 |
||||
|
*/ |
||||
|
private String longitude; |
||||
|
|
||||
|
/** |
||||
|
* 纬度 |
||||
|
*/ |
||||
|
private String latitude; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
*/ |
||||
|
private String caBindId; |
||||
|
|
||||
|
/** |
||||
|
* 所属地区码(所属组织地区码) |
||||
|
*/ |
||||
|
private String areaCode; |
||||
|
|
||||
|
/** |
||||
|
* 市中心区划编码 |
||||
|
*/ |
||||
|
private String disCenterZoningCode; |
||||
|
|
||||
|
} |
@ -0,0 +1,95 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.elink.esua.epdc.modules.screen.excel; |
||||
|
|
||||
|
import cn.afterturn.easypoi.excel.annotation.Excel; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 部门管理 |
||||
|
* |
||||
|
* @author elink elink@elink-cn.com |
||||
|
* @since v1.0.0 2022-10-17 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class MetaSysDeptExcel { |
||||
|
|
||||
|
@Excel(name = "id") |
||||
|
private Long id; |
||||
|
|
||||
|
@Excel(name = "第三方平台编码") |
||||
|
private String infoCode; |
||||
|
|
||||
|
@Excel(name = "上级ID") |
||||
|
private Long pid; |
||||
|
|
||||
|
@Excel(name = "所有上级ID,用逗号分开") |
||||
|
private String pids; |
||||
|
|
||||
|
@Excel(name = "部门名称") |
||||
|
private String name; |
||||
|
|
||||
|
@Excel(name = "排序") |
||||
|
private Integer sort; |
||||
|
|
||||
|
@Excel(name = "删除标识 0:未删除 1:删除") |
||||
|
private Integer delFlag; |
||||
|
|
||||
|
@Excel(name = "创建者") |
||||
|
private Long creator; |
||||
|
|
||||
|
@Excel(name = "创建时间") |
||||
|
private Date createDate; |
||||
|
|
||||
|
@Excel(name = "更新者") |
||||
|
private Long updater; |
||||
|
|
||||
|
@Excel(name = "更新时间") |
||||
|
private Date updateDate; |
||||
|
|
||||
|
@Excel(name = "机构类型键值") |
||||
|
private String typeKey; |
||||
|
|
||||
|
@Excel(name = "党委编码") |
||||
|
private String partyCode; |
||||
|
|
||||
|
@Excel(name = "地址") |
||||
|
private String address; |
||||
|
|
||||
|
@Excel(name = "联系方式") |
||||
|
private String mobile; |
||||
|
|
||||
|
@Excel(name = "经度") |
||||
|
private String longitude; |
||||
|
|
||||
|
@Excel(name = "纬度") |
||||
|
private String latitude; |
||||
|
|
||||
|
@Excel(name = "") |
||||
|
private String caBindId; |
||||
|
|
||||
|
@Excel(name = "所属地区码(所属组织地区码)") |
||||
|
private String areaCode; |
||||
|
|
||||
|
@Excel(name = "市中心区划编码") |
||||
|
private String disCenterZoningCode; |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,47 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.elink.esua.epdc.modules.screen.redis; |
||||
|
|
||||
|
import com.elink.esua.epdc.commons.tools.redis.RedisUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
/** |
||||
|
* 部门管理 |
||||
|
* |
||||
|
* @author elink elink@elink-cn.com |
||||
|
* @since v1.0.0 2022-10-17 |
||||
|
*/ |
||||
|
@Component |
||||
|
public class MetaSysDeptRedis { |
||||
|
@Autowired |
||||
|
private RedisUtils redisUtils; |
||||
|
|
||||
|
public void delete(Object[] ids) { |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public void set(){ |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public String get(String id){ |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,67 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.elink.esua.epdc.modules.screen.service; |
||||
|
|
||||
|
import com.elink.esua.epdc.commons.mybatis.service.BaseService; |
||||
|
import com.elink.esua.epdc.commons.tools.page.PageData; |
||||
|
import com.elink.esua.epdc.dto.MetaSysDeptDTO; |
||||
|
import com.elink.esua.epdc.modules.screen.entity.MetaSysDeptEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 部门管理 |
||||
|
* |
||||
|
* @author elink elink@elink-cn.com |
||||
|
* @since v1.0.0 2022-10-17 |
||||
|
*/ |
||||
|
public interface MetaSysDeptService extends BaseService<MetaSysDeptEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-10-17 |
||||
|
*/ |
||||
|
void save(MetaSysDeptDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-10-17 |
||||
|
*/ |
||||
|
void update(MetaSysDeptDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-10-17 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
|
||||
|
void truncate(); |
||||
|
} |
@ -0,0 +1,73 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.elink.esua.epdc.modules.screen.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; |
||||
|
import com.elink.esua.epdc.commons.tools.constant.FieldConstant; |
||||
|
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; |
||||
|
import com.elink.esua.epdc.dto.MetaSysDeptDTO; |
||||
|
import com.elink.esua.epdc.modules.screen.dao.MetaSysDeptDao; |
||||
|
import com.elink.esua.epdc.modules.screen.entity.MetaSysDeptEntity; |
||||
|
import com.elink.esua.epdc.modules.screen.redis.MetaSysDeptRedis; |
||||
|
import com.elink.esua.epdc.modules.screen.service.MetaSysDeptService; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
import java.util.Arrays; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 部门管理 |
||||
|
* |
||||
|
* @author elink elink@elink-cn.com |
||||
|
* @since v1.0.0 2022-10-17 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class MetaSysDeptServiceImpl extends BaseServiceImpl<MetaSysDeptDao, MetaSysDeptEntity> implements MetaSysDeptService { |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(MetaSysDeptDTO dto) { |
||||
|
MetaSysDeptEntity entity = ConvertUtils.sourceToTarget(dto, MetaSysDeptEntity.class); |
||||
|
insert(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void update(MetaSysDeptDTO dto) { |
||||
|
MetaSysDeptEntity entity = ConvertUtils.sourceToTarget(dto, MetaSysDeptEntity.class); |
||||
|
updateById(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String[] ids) { |
||||
|
// 逻辑删除(@TableLogic 注解)
|
||||
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void truncate() { |
||||
|
baseDao.truncate(); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,33 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
|
||||
|
<mapper namespace="com.elink.esua.epdc.modules.screen.dao.MetaSysDeptDao"> |
||||
|
|
||||
|
<resultMap type="com.elink.esua.epdc.modules.screen.entity.MetaSysDeptEntity" id="metaSysDeptMap"> |
||||
|
<result property="id" column="id"/> |
||||
|
<result property="infoCode" column="info_code"/> |
||||
|
<result property="pid" column="pid"/> |
||||
|
<result property="pids" column="pids"/> |
||||
|
<result property="name" column="name"/> |
||||
|
<result property="sort" column="sort"/> |
||||
|
<result property="delFlag" column="del_flag"/> |
||||
|
<result property="creator" column="creator"/> |
||||
|
<result property="createDate" column="create_date"/> |
||||
|
<result property="updater" column="updater"/> |
||||
|
<result property="updateDate" column="update_date"/> |
||||
|
<result property="typeKey" column="type_key"/> |
||||
|
<result property="partyCode" column="party_code"/> |
||||
|
<result property="address" column="address"/> |
||||
|
<result property="mobile" column="mobile"/> |
||||
|
<result property="longitude" column="longitude"/> |
||||
|
<result property="latitude" column="latitude"/> |
||||
|
<result property="caBindId" column="ca_bind_id"/> |
||||
|
<result property="areaCode" column="area_code"/> |
||||
|
<result property="disCenterZoningCode" column="dis_center_zoning_code"/> |
||||
|
</resultMap> |
||||
|
|
||||
|
<delete id="truncate"> |
||||
|
truncate table meta_sys_dept; |
||||
|
</delete> |
||||
|
|
||||
|
</mapper> |
@ -0,0 +1,43 @@ |
|||||
|
package com.elink.esua.epdc.task.screen; |
||||
|
|
||||
|
import com.alibaba.fastjson.JSON; |
||||
|
import com.elink.esua.epdc.commons.tools.utils.Result; |
||||
|
import com.elink.esua.epdc.dto.screen.form.DataStatisticsFormDTO; |
||||
|
import com.elink.esua.epdc.feign.ItemFeignClient; |
||||
|
import com.elink.esua.epdc.task.ITask; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
import javax.annotation.Resource; |
||||
|
|
||||
|
/** |
||||
|
* 同步组织部门信息 |
||||
|
* |
||||
|
* @author zhy |
||||
|
* @date 2022/10/17 15:24 |
||||
|
*/ |
||||
|
@Component("eventDeptTask") |
||||
|
@Slf4j |
||||
|
public class EventDeptTask implements ITask { |
||||
|
|
||||
|
@Resource |
||||
|
private ItemFeignClient itemFeignClient; |
||||
|
|
||||
|
/** |
||||
|
* 执行定时任务接口 |
||||
|
* |
||||
|
* @param params 参数,多参数使用JSON数据 |
||||
|
*/ |
||||
|
@Override |
||||
|
public void run(String params) { |
||||
|
|
||||
|
Result result = itemFeignClient.metaDept(); |
||||
|
if (result.success()) { |
||||
|
log.info("{}定时任务执行成功,{}", getClass().getSimpleName(), params); |
||||
|
} else { |
||||
|
log.error("{}定时任务执行失败:{},param:{}", getClass().getSimpleName(), result.getMsg(), params); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
} |
Loading…
Reference in new issue