|
@@ -2,20 +2,12 @@ package com.steerinfo.dil.service.impl;
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
-import com.google.gson.JsonObject;
|
|
|
-import com.steerinfo.dil.feign.JoinFeign;
|
|
|
-import com.steerinfo.dil.mapper.TmstruckLeaveFactoryResultMapper;
|
|
|
import com.steerinfo.dil.mapper.TmstruckSmsRusultMapper;
|
|
|
import com.steerinfo.dil.mapper.UtilsMapper;
|
|
|
import com.steerinfo.dil.model.TmstruckSmsRusult;
|
|
|
import com.steerinfo.dil.service.ITmstruckSmsRusultService;
|
|
|
import com.steerinfo.dil.util.HTTPRequestUtils;
|
|
|
import com.steerinfo.dil.util.MD5Util;
|
|
|
-import com.steerinfo.framework.mapper.IBaseMapper;
|
|
|
-import com.steerinfo.framework.service.impl.BaseServiceImpl;
|
|
|
-import okio.Utf8;
|
|
|
-import org.apache.http.ParseException;
|
|
|
-import org.junit.jupiter.api.Test;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
@@ -41,48 +33,35 @@ import java.util.Map;
|
|
|
* @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
|
|
|
*/
|
|
|
@Service(value = "tmstruckSmsRusultService")
|
|
|
-public class TmstruckSmsRusultServiceImpl extends BaseServiceImpl<TmstruckSmsRusult, BigDecimal> implements ITmstruckSmsRusultService {
|
|
|
+public class TmstruckSmsRusultServiceImpl implements ITmstruckSmsRusultService {
|
|
|
|
|
|
@Autowired
|
|
|
private TmstruckSmsRusultMapper tmstruckSmsRusultMapper;
|
|
|
@Autowired
|
|
|
private UtilsMapper utilsMapper;
|
|
|
- @Autowired
|
|
|
- JoinFeign joinFeign;
|
|
|
|
|
|
|
|
|
- @Override
|
|
|
- protected IBaseMapper<TmstruckSmsRusult, BigDecimal> getMapper() {
|
|
|
- return tmstruckSmsRusultMapper;
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
- * 销售物流通过点击确认新增短信实绩
|
|
|
- * @param map
|
|
|
+ * 新增短信实绩
|
|
|
+ * @param orderId
|
|
|
* @return
|
|
|
+ * @throws Exception
|
|
|
*/
|
|
|
- @Override
|
|
|
- public int addSmsResult(Map<String,Object> map) throws Exception {
|
|
|
-
|
|
|
- //获取订单号
|
|
|
- String orderNumber = map.get("orderNumber").toString();
|
|
|
+ public int addSmsResult(BigDecimal orderId) throws Exception {
|
|
|
//新增短信实绩
|
|
|
TmstruckSmsRusult tmstruckSmsRusult=new TmstruckSmsRusult();
|
|
|
tmstruckSmsRusult.setResultId(tmstruckSmsRusultMapper.selectMaxId());
|
|
|
//新增总实绩id
|
|
|
- BigDecimal resultTotalId = utilsMapper.getTotalIdByOrderNumber(orderNumber);
|
|
|
+ BigDecimal resultTotalId = utilsMapper.getTotalIdByOrderId(orderId);
|
|
|
tmstruckSmsRusult.setTotalResultId(resultTotalId);
|
|
|
tmstruckSmsRusult.setResultSendingTime(new Date());
|
|
|
//新增短信实绩
|
|
|
tmstruckSmsRusult.setInsertTime(new Date());
|
|
|
tmstruckSmsRusultMapper.insertSelective(tmstruckSmsRusult);
|
|
|
return 1;
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
|
|
|
- public int generaSendMessage(String mobile,String capacityNum) throws Exception {
|
|
|
+ public int generaSendMessage(String mobile,String capacityNum,BigDecimal orderId) throws Exception {
|
|
|
String url = "http://www.btom.cn:8080/simpleinter/sendSMS?appId=EUCP-EMY-SMS1-10QNI&";
|
|
|
String tmpTmp = MD5Util.formatTimeTmp();
|
|
|
String sign = MD5Util.sign("EUCP-EMY-SMS1-10QNI","EE20B0B28B75E567");
|
|
@@ -98,7 +77,7 @@ public class TmstruckSmsRusultServiceImpl extends BaseServiceImpl<TmstruckSmsRus
|
|
|
String code = (String) hashMap.get("code");
|
|
|
System.out.println(hashMap.get("code"));
|
|
|
if("SUCCESS".equals(code)){
|
|
|
- return 1;
|
|
|
+ return addSmsResult(orderId);
|
|
|
}else{
|
|
|
return 0;
|
|
|
}
|