| | |
| | | import com.yeshi.fanli.entity.common.JumpDetailV2;
|
| | | import com.yeshi.fanli.entity.goods.CommonGoods;
|
| | | import com.yeshi.fanli.entity.push.DeviceActive;
|
| | | import com.yeshi.fanli.entity.push.DeviceTokenOPPO;
|
| | | import com.yeshi.fanli.entity.push.DeviceTokenVIVO;
|
| | | import com.yeshi.fanli.entity.push.PushGoods;
|
| | | import com.yeshi.fanli.entity.push.PushGoodsGroup;
|
| | | import com.yeshi.fanli.entity.push.PushGoodsRecord;
|
| | |
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | | import com.yeshi.fanli.service.inter.push.DeviceActiveService;
|
| | | import com.yeshi.fanli.service.inter.push.DeviceTokenHWService;
|
| | | import com.yeshi.fanli.service.inter.push.DeviceTokenOPPOService;
|
| | | import com.yeshi.fanli.service.inter.push.DeviceTokenVIVOService;
|
| | | import com.yeshi.fanli.service.inter.push.IOSPushService;
|
| | | import com.yeshi.fanli.service.inter.push.PushGoodsGroupService;
|
| | | import com.yeshi.fanli.service.inter.push.PushGoodsRecordService;
|
| | |
| | | @Controller
|
| | | @RequestMapping(value = "api/v1/push")
|
| | | public class PushController {
|
| | |
|
| | | @Resource
|
| | | private BusinessSystemService businessSystemService;
|
| | |
|
| | |
| | |
|
| | | @Resource(name = "taskExecutor")
|
| | | private TaskExecutor executor;
|
| | |
|
| | | @Resource
|
| | | private DeviceTokenOPPOService deviceTokenOPPOService;
|
| | |
|
| | | @Resource
|
| | | private DeviceTokenVIVOService deviceTokenVIVOService;
|
| | |
|
| | | @RequestMapping(value = "callback", method = RequestMethod.POST)
|
| | | public void callback(AcceptData acceptData, String pushId, PrintWriter out) {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | @RequestMapping("registerOppo")
|
| | | public void registerOppo(AcceptData acceptData, String registerId, Long uid, PrintWriter out) {
|
| | | DeviceActive deviceActive = deviceActiveService.getFirstActiveInfo(acceptData.getDevice());
|
| | | if (deviceActive != null) {
|
| | | DeviceTokenOPPO oppo = new DeviceTokenOPPO();
|
| | | oppo.setDeviceActiveId(deviceActive.getId());
|
| | | oppo.setRegisterId(registerId);
|
| | | oppo.setUid(uid);
|
| | | deviceTokenOPPOService.addDeviceTokenOPPO(oppo);
|
| | | }
|
| | | out.print(JsonUtil.loadTrueResult(""));
|
| | | }
|
| | |
|
| | | @RequestMapping("registerVivo")
|
| | | public void registerVivo(AcceptData acceptData, String regId, Long uid, PrintWriter out) {
|
| | | DeviceActive deviceActive = deviceActiveService.getFirstActiveInfo(acceptData.getDevice());
|
| | | if (deviceActive != null) {
|
| | | DeviceTokenVIVO vivo = new DeviceTokenVIVO();
|
| | | vivo.setDeviceActiveId(deviceActive.getId());
|
| | | vivo.setRegisterId(regId);
|
| | | vivo.setUid(uid);
|
| | | deviceTokenVIVOService.addDeviceTokenVIVO(vivo);
|
| | | }
|
| | | out.print(JsonUtil.loadTrueResult(""));
|
| | | }
|
| | |
|
| | | }
|