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-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);
|
|
|
|
|
}
|
|
|
|
|
|
2024-11-18 16:41:48 +08:00
|
|
|
public void push(PushParam pushParam) {
|
|
|
|
|
getPushService(user).pushOneRecord(pushParam.getSalaryAcctRecordId());
|
|
|
|
|
}
|
2024-11-19 09:37:43 +08:00
|
|
|
|
2024-11-15 13:57:35 +08:00
|
|
|
}
|