|
|
|
@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSONObject; |
|
|
|
|
import com.hfkj.common.exception.ErrorCode; |
|
|
|
|
import com.hfkj.common.exception.ErrorHelp; |
|
|
|
|
import com.hfkj.common.exception.SysCode; |
|
|
|
|
import com.hfkj.config.CommonSysConst; |
|
|
|
|
import com.hfkj.dao.BsStoreCidMapper; |
|
|
|
|
import com.hfkj.dao.BsStorePushRecordMapper; |
|
|
|
|
import com.hfkj.entity.BsStoreCid; |
|
|
|
@ -21,7 +20,6 @@ import org.slf4j.LoggerFactory; |
|
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource; |
|
|
|
|
import java.util.Date; |
|
|
|
|
import java.util.HashMap; |
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.Map; |
|
|
|
@ -101,15 +99,10 @@ public class BsStoreCidServiceImpl implements BsStoreCidService { |
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "生成语音失败"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
BsStorePushRecord storePushRecord = new BsStorePushRecord(); |
|
|
|
|
storePushRecord.setStoreId(bsStoreCid.getStoreId()); |
|
|
|
|
storePushRecord.setCreateTime(new Date()); |
|
|
|
|
storePushRecord.setUpdateTime(new Date()); |
|
|
|
|
storePushRecord.setStatus(2); |
|
|
|
|
storePushRecord.setVoiceUrl(CommonSysConst.getSysConfig().getDomainName() + auditPath); |
|
|
|
|
object.put("cid", bsStoreCid.getCid()); |
|
|
|
|
object.put("body", auditPath); |
|
|
|
|
UniPushService.pushToSingleByCid(object); |
|
|
|
|
|
|
|
|
|
storePushRecordMapper.insert(storePushRecord); |
|
|
|
|
getPushRecord(bsStoreCid.getStoreId()); |
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
log.info("请求超时:" + e); |
|
|
|
@ -117,8 +110,7 @@ public class BsStoreCidServiceImpl implements BsStoreCidService { |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void getPushRecord(Long storeId) { |
|
|
|
|
private void getPushRecord(Long storeId) { |
|
|
|
|
|
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
map.put("storeId", storeId); |
|
|
|
@ -145,14 +137,17 @@ public class BsStoreCidServiceImpl implements BsStoreCidService { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void voiceSucceed(Long storeId) { |
|
|
|
|
public void voiceSucceed(Long storeId , String taskNo) { |
|
|
|
|
Map<String , Object> pushMap = new HashMap<>(); |
|
|
|
|
pushMap.put("storeId" , storeId); |
|
|
|
|
pushMap.put("ext1" , storeId); |
|
|
|
|
pushMap.put("status" , 2); |
|
|
|
|
BsStorePushRecord storePushRecord = findPushRecordByMap(pushMap); |
|
|
|
|
|
|
|
|
|
storePushRecord.setStatus(1); |
|
|
|
|
storePushRecordMapper.updateByPrimaryKey(storePushRecord); |
|
|
|
|
|
|
|
|
|
getPushRecord(storeId); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|