weaver-hrm-salary/src/com/engine/salary/wrapper/PushWrapper.java

84 lines
2.5 KiB
Java
Raw Normal View History

2024-11-15 13:57:35 +08:00
package com.engine.salary.wrapper;
import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service;
2024-11-29 09:14:04 +08:00
import com.engine.salary.entity.push.dto.PushRecordDTO;
import com.engine.salary.entity.push.dto.PushRecordDetailDTO;
2024-11-19 09:37:43 +08:00
import com.engine.salary.entity.push.dto.PushSettingDTO;
2024-11-20 17:03:41 +08:00
import com.engine.salary.entity.push.dto.PushSettingItemDTO;
2024-11-19 09:37:43 +08:00
import com.engine.salary.entity.push.param.*;
2024-11-15 13:57:35 +08:00
import com.engine.salary.entity.push.po.PushSettingItemPO;
import com.engine.salary.entity.push.po.PushSettingPO;
2024-11-21 10:25:37 +08:00
import com.engine.salary.remote.mode.cmd.GetModeList;
2024-11-15 13:57:35 +08:00
import com.engine.salary.service.PushService;
import com.engine.salary.service.impl.PushServiceImpl;
2024-11-19 09:37:43 +08:00
import com.engine.salary.util.page.PageInfo;
2024-11-15 13:57:35 +08:00
import weaver.hrm.User;
2024-11-21 10:25:37 +08:00
import java.util.HashMap;
import java.util.Map;
2024-11-15 13:57:35 +08:00
public class PushWrapper extends Service {
private PushService getPushService(User user) {
return ServiceUtil.getService(PushServiceImpl.class, user);
}
2024-11-21 11:54:47 +08:00
public Object modeList() {
Map<String, Object> map = new HashMap<>();
map.put("appid", 1);
map.put("appidForAppname", 2);
map.put("aLLorCurrentKey", 1);
Map<String, Object> execute = commandExecutor.execute(new GetModeList(map, user));
return execute;
}
2024-11-19 09:37:43 +08:00
public PageInfo<PushSettingDTO> settingList(PushSettingQueryParam param) {
return getPushService(user).settingList(param);
}
2024-11-15 13:57:35 +08:00
public PushSettingPO save(PushSettingSaveParam param) {
return getPushService(user).save(param);
}
2024-11-19 09:37:43 +08:00
public void delete(Long id) {
getPushService(user).delete(id);
}
2024-11-20 17:03:41 +08:00
public PageInfo<PushSettingItemDTO> itemList(PushSettingItemQueryParam param) {
2024-11-19 09:37:43 +08:00
return getPushService(user).itemList(param);
}
2024-11-15 13:57:35 +08:00
public PushSettingItemPO saveItem(PushSettingItemSaveParam param) {
return getPushService(user).saveItem(param);
}
2024-11-18 16:41:48 +08:00
2024-11-19 09:37:43 +08:00
public void deleteItem(Long id) {
getPushService(user).deleteItem(id);
}
public void createPushRecord(CreatePushParam param) {
param.getSalaryAcctRecordIds().forEach(id -> {
getPushService(user).createPushRecord(id);
});
}
2024-11-18 16:41:48 +08:00
public void push(PushParam pushParam) {
getPushService(user).push(pushParam.getId());
2024-11-18 16:41:48 +08:00
}
2024-11-19 09:37:43 +08:00
2024-11-29 09:14:04 +08:00
public PageInfo<PushRecordDTO> recordList(RecordListQueryParam param) {
return getPushService(user).recordList(param);
2024-11-29 09:14:04 +08:00
}
public PageInfo<PushRecordDetailDTO> recordDetailList(RecordDetailListQueryParam param) {
return getPushService(user).recordDetailList(param);
}
2024-11-15 13:57:35 +08:00
}