You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
1.4 KiB
Java
65 lines
1.4 KiB
Java
3 years ago
|
package com.engine.organization.wrapper;
|
||
|
|
||
|
import com.engine.common.util.ServiceUtil;
|
||
|
import com.engine.core.impl.Service;
|
||
|
import com.engine.organization.entity.post.po.PostPO;
|
||
|
import com.engine.organization.service.PostService;
|
||
|
import com.engine.organization.service.impl.PostServiceImpl;
|
||
|
import org.apache.ibatis.annotations.Param;
|
||
|
import weaver.hrm.User;
|
||
|
|
||
|
import java.util.Collection;
|
||
|
import java.util.Map;
|
||
|
|
||
|
/**
|
||
|
* @description: TODO
|
||
|
* @author:dxfeng
|
||
|
* @createTime: 2022/05/13
|
||
|
* @version: 1.0
|
||
|
*/
|
||
|
public class PostWrapper extends Service {
|
||
|
private PostService getPostService(User user) {
|
||
|
return ServiceUtil.getService(PostServiceImpl.class, user);
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 新增职务分类
|
||
|
*
|
||
|
* @param postPO
|
||
|
* @return
|
||
|
*/
|
||
|
public int savePost(PostPO postPO) {
|
||
|
return getPostService(user).savePost(postPO);
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 更新职务分类
|
||
|
*
|
||
|
* @param postPO
|
||
|
* @return
|
||
|
*/
|
||
|
public int updatePost(PostPO postPO) {
|
||
|
return getPostService(user).updatePost(postPO);
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 根据ID批量删除
|
||
|
*
|
||
|
* @param ids
|
||
|
*/
|
||
|
public int deleteByIds(@Param("ids") Collection<Long> ids) {
|
||
|
return getPostService(user).deleteByIds(ids);
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 获取新增表单
|
||
|
*
|
||
|
* @param params
|
||
|
* @return
|
||
|
*/
|
||
|
public Map<String, Object> getPostForm(Map<String, Object> params) {
|
||
|
return getPostService(user).getPostForm(params);
|
||
|
}
|
||
|
|
||
|
}
|