|
|
@@ -1,88 +0,0 @@
|
|
|
-//package com.zd.laboratory.mqtt.service.impl;
|
|
|
-//
|
|
|
-//import com.alibaba.fastjson.JSONObject;
|
|
|
-//import com.zd.laboratory.mqtt.MqttProducer;
|
|
|
-//import com.zd.laboratory.mqtt.constants.MqttConstants;
|
|
|
-//import com.zd.laboratory.mqtt.service.MessageSendService;
|
|
|
-//import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-//import org.springframework.stereotype.Service;
|
|
|
-//
|
|
|
-//@Service
|
|
|
-//public class MessageSendServiceImpl implements MessageSendService {
|
|
|
-//
|
|
|
-// @Autowired
|
|
|
-// private MqttProducer mqttProducer;
|
|
|
-//
|
|
|
-// @Override
|
|
|
-// public void SendPaySuccess(String orderNo,Integer trackX,Integer trackY,String macNo,Integer type,Integer number) {
|
|
|
-// JSONObject json=new JSONObject();
|
|
|
-// if(null!=type && type==1){
|
|
|
-// JSONObject jsonObject=new JSONObject();
|
|
|
-// jsonObject.put("orderNo",orderNo);
|
|
|
-// jsonObject.put("number",number);
|
|
|
-// jsonObject.put("trackX",trackY);
|
|
|
-// jsonObject.put("trackY",trackX);
|
|
|
-// json.put("code",1);
|
|
|
-// json.put("msg","支付成功!");
|
|
|
-// json.put("data",jsonObject);
|
|
|
-// }else{
|
|
|
-// json.put("code",0);
|
|
|
-// json.put("msg", MqttConstants.MSG);
|
|
|
-// json.put("data",new JSONObject());
|
|
|
-// }
|
|
|
-// mqttProducer.send(MqttConstants.PAY_SUCESS_SEND+macNo,2,json.toJSONString());
|
|
|
-// }
|
|
|
-//
|
|
|
-// @Override
|
|
|
-// //@Async
|
|
|
-// public void ApkVersionChange(String macNo,String url,int versionCode) {
|
|
|
-// JSONObject Json=new JSONObject();
|
|
|
-// Json.put("macno",macNo);
|
|
|
-// Json.put("url",url);
|
|
|
-// Json.put("versionCode",versionCode);
|
|
|
-// mqttProducer.send(MqttConstants.APK_VERSION+macNo,2,Json.toJSONString());
|
|
|
-// }
|
|
|
-//
|
|
|
-// @Override
|
|
|
-// //@Async
|
|
|
-// public void BannerChange(Integer advicePosition,String macNo) {
|
|
|
-// JSONObject jsonObject=new JSONObject();
|
|
|
-// jsonObject.put("position",advicePosition);
|
|
|
-// mqttProducer.send(MqttConstants.ADVICE_+macNo,2,jsonObject.toJSONString());
|
|
|
-// }
|
|
|
-//
|
|
|
-// @Override
|
|
|
-// public void login(String token) {
|
|
|
-// JSONObject jsonObject=new JSONObject();
|
|
|
-// jsonObject.put("token",token);
|
|
|
-// mqttProducer.send(MqttConstants.LOGIN_SCAN,2,jsonObject.toJSONString());
|
|
|
-// }
|
|
|
-//
|
|
|
-// @Override
|
|
|
-// //@Async
|
|
|
-// public void init(String macNo) {
|
|
|
-// JSONObject Json=new JSONObject();
|
|
|
-// mqttProducer.send(MqttConstants.INIT+macNo,2,Json.toJSONString());
|
|
|
-// }
|
|
|
-//
|
|
|
-// @Override
|
|
|
-// //@Async
|
|
|
-// public void userScanQrcode(String macNo, Long userId, String openId, Integer type) {
|
|
|
-// //不是补货员
|
|
|
-// JSONObject Json=new JSONObject();
|
|
|
-// if(type==2){
|
|
|
-// Json.put("code",0);
|
|
|
-// Json.put("msg","你不是该设备的补货员!");
|
|
|
-// Json.put("data", new JSONObject());
|
|
|
-// }else{
|
|
|
-// JSONObject jsonObject=new JSONObject();
|
|
|
-// jsonObject.put("macNo",macNo);
|
|
|
-// jsonObject.put("userId",userId);
|
|
|
-// jsonObject.put("openId",openId);
|
|
|
-// Json.put("code",1);
|
|
|
-// Json.put("msg","登录成功!");
|
|
|
-// Json.put("data", jsonObject);
|
|
|
-// }
|
|
|
-// mqttProducer.send(MqttConstants.LOGIN_SCAN+macNo,2,Json.toJSONString());
|
|
|
-// }
|
|
|
-//}
|