7 changed files with 377 additions and 3 deletions
@ -0,0 +1,97 @@ |
|||
package com.epmet.dto; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
|
|||
/** |
|||
* |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-09-14 |
|||
*/ |
|||
@Data |
|||
public class OpenSyncBizDataDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 第三方企业应用的suiteid加下划线0 |
|||
*/ |
|||
private String subscribeId; |
|||
|
|||
/** |
|||
* 第三方企业应用的corpid |
|||
*/ |
|||
private String corpId; |
|||
|
|||
/** |
|||
* 第三方企业应用的suiteid |
|||
*/ |
|||
private String bizId; |
|||
|
|||
/** |
|||
* 数据为Json格式 |
|||
*/ |
|||
private String bizData; |
|||
|
|||
/** |
|||
* 2:第三方企业应用票据; |
|||
4:企业授权变更,包含授权、解除授权、授权变更; |
|||
7:第三方企业应用变更,包含停用、启用、删除(删除保留授权); |
|||
13:企业用户变更,包含用户添加、修改、删除; |
|||
14:企业部门变更,包含部门添加、修改、删除; |
|||
15:企业角色变更,包含角色添加、修改、删除; |
|||
16:企业变更,包含企业修改、删除; |
|||
17:市场订单; |
|||
20:企业外部联系人变更,包含添加、修改、删除; |
|||
22:ISV自定义审批; |
|||
25:家校通讯录1.0(Deprecated)信息变更。家校通讯录升级,请查看家校通讯录2.0数据推送; |
|||
32:智能硬件绑定类型; |
|||
37:因订单到期或者用户退款等导致的服务关闭,目前仅推送因退款等导致的服务关闭; |
|||
50:家校通讯录2.0,部门信息变更; |
|||
51:家校通讯录2.0,人员信息变更; |
|||
63:应用试用记录回调信息; |
|||
66:工作台组件变更回调事件; |
|||
67:钉钉假期相关回调事件; |
|||
133:CRM客户动态相关数据回调事件; |
|||
137:人事平台员工异动V2相关数据回调事件; |
|||
139:异步转译通讯录id任务完成通知; |
|||
165:人事平台员工档案变动事件相关数据的回调事件; |
|||
175:人事解决方案变更事件; |
|||
*/ |
|||
private String bizType; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private Integer delFlag; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
} |
@ -0,0 +1,16 @@ |
|||
package com.epmet.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.OpenSyncBizDataEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-09-14 |
|||
*/ |
|||
@Mapper |
|||
public interface OpenSyncBizDataDao extends BaseDao<OpenSyncBizDataEntity> { |
|||
|
|||
} |
@ -0,0 +1,68 @@ |
|||
package com.epmet.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
/** |
|||
* |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-09-14 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("open_sync_biz_data") |
|||
public class OpenSyncBizDataEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 第三方企业应用的suiteid加下划线0 |
|||
*/ |
|||
private String subscribeId; |
|||
|
|||
/** |
|||
* 第三方企业应用的corpid |
|||
*/ |
|||
private String corpId; |
|||
|
|||
/** |
|||
* 第三方企业应用的suiteid |
|||
*/ |
|||
private String bizId; |
|||
|
|||
/** |
|||
* 数据为Json格式 |
|||
*/ |
|||
private String bizData; |
|||
|
|||
/** |
|||
* 2:第三方企业应用票据; |
|||
4:企业授权变更,包含授权、解除授权、授权变更; |
|||
7:第三方企业应用变更,包含停用、启用、删除(删除保留授权); |
|||
13:企业用户变更,包含用户添加、修改、删除; |
|||
14:企业部门变更,包含部门添加、修改、删除; |
|||
15:企业角色变更,包含角色添加、修改、删除; |
|||
16:企业变更,包含企业修改、删除; |
|||
17:市场订单; |
|||
20:企业外部联系人变更,包含添加、修改、删除; |
|||
22:ISV自定义审批; |
|||
25:家校通讯录1.0(Deprecated)信息变更。家校通讯录升级,请查看家校通讯录2.0数据推送; |
|||
32:智能硬件绑定类型; |
|||
37:因订单到期或者用户退款等导致的服务关闭,目前仅推送因退款等导致的服务关闭; |
|||
50:家校通讯录2.0,部门信息变更; |
|||
51:家校通讯录2.0,人员信息变更; |
|||
63:应用试用记录回调信息; |
|||
66:工作台组件变更回调事件; |
|||
67:钉钉假期相关回调事件; |
|||
133:CRM客户动态相关数据回调事件; |
|||
137:人事平台员工异动V2相关数据回调事件; |
|||
139:异步转译通讯录id任务完成通知; |
|||
165:人事平台员工档案变动事件相关数据的回调事件; |
|||
175:人事解决方案变更事件; |
|||
*/ |
|||
private String bizType; |
|||
|
|||
} |
@ -0,0 +1,78 @@ |
|||
package com.epmet.service; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.dto.OpenSyncBizDataDTO; |
|||
import com.epmet.entity.OpenSyncBizDataEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-09-14 |
|||
*/ |
|||
public interface OpenSyncBizDataService extends BaseService<OpenSyncBizDataEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<OpenSyncBizDataDTO> |
|||
* @author generator |
|||
* @date 2022-09-14 |
|||
*/ |
|||
PageData<OpenSyncBizDataDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<OpenSyncBizDataDTO> |
|||
* @author generator |
|||
* @date 2022-09-14 |
|||
*/ |
|||
List<OpenSyncBizDataDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return OpenSyncBizDataDTO |
|||
* @author generator |
|||
* @date 2022-09-14 |
|||
*/ |
|||
OpenSyncBizDataDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-09-14 |
|||
*/ |
|||
void save(OpenSyncBizDataDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-09-14 |
|||
*/ |
|||
void update(OpenSyncBizDataDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-09-14 |
|||
*/ |
|||
void delete(String[] ids); |
|||
} |
@ -0,0 +1,82 @@ |
|||
package com.epmet.service.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.constant.FieldConstant; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.dao.OpenSyncBizDataDao; |
|||
import com.epmet.dto.OpenSyncBizDataDTO; |
|||
import com.epmet.entity.OpenSyncBizDataEntity; |
|||
import com.epmet.service.OpenSyncBizDataService; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.Arrays; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-09-14 |
|||
*/ |
|||
@Service |
|||
public class OpenSyncBizDataServiceImpl extends BaseServiceImpl<OpenSyncBizDataDao, OpenSyncBizDataEntity> implements OpenSyncBizDataService { |
|||
|
|||
@Override |
|||
public PageData<OpenSyncBizDataDTO> page(Map<String, Object> params) { |
|||
IPage<OpenSyncBizDataEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, OpenSyncBizDataDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<OpenSyncBizDataDTO> list(Map<String, Object> params) { |
|||
List<OpenSyncBizDataEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, OpenSyncBizDataDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<OpenSyncBizDataEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<OpenSyncBizDataEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public OpenSyncBizDataDTO get(String id) { |
|||
OpenSyncBizDataEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, OpenSyncBizDataDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(OpenSyncBizDataDTO dto) { |
|||
OpenSyncBizDataEntity entity = ConvertUtils.sourceToTarget(dto, OpenSyncBizDataEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(OpenSyncBizDataDTO dto) { |
|||
OpenSyncBizDataEntity entity = ConvertUtils.sourceToTarget(dto, OpenSyncBizDataEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,6 @@ |
|||
<?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.epmet.dao.OpenSyncBizDataDao"> |
|||
|
|||
</mapper> |
Loading…
Reference in new issue