|
|
@@ -20,6 +20,7 @@ import com.yami.shop.dao.ShopDetailMapper;
|
|
|
import com.yami.shop.service.RefundAddrService;
|
|
|
import com.yami.shop.service.hb.IStoreManagementService;
|
|
|
import com.yami.shop.utils.HBSignUtil;
|
|
|
+import com.yami.shop.utils.SmqjhUtil;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.ObjectUtils;
|
|
|
@@ -49,15 +50,8 @@ public class StoreManagementService implements IStoreManagementService {
|
|
|
private final HBSignUtil hbSignUtil;
|
|
|
private final HBTransport2Mapper transport2Mapper;
|
|
|
private final RefundAddrService refundAddrService;
|
|
|
+ private final SmqjhUtil smqjhUtil;
|
|
|
|
|
|
- /**
|
|
|
- * 市民请集合门店修改和新增调用
|
|
|
- */
|
|
|
- private static String smqjhMdUrlAddAndUpdate="http://47.109.84.152:8081/smqjh-pms/api/v1/shopDetail/save";
|
|
|
- /**
|
|
|
- * 市民请集合门店状态修改调用
|
|
|
- */
|
|
|
- private static String smqjhMdUrlUpdateStatus="http://47.109.84.152:8081/smqjh-pms/api/v1/shopDetail/updateStatus";
|
|
|
|
|
|
/**
|
|
|
* 获取海博门店基础信息
|
|
|
@@ -224,22 +218,22 @@ public class StoreManagementService implements IStoreManagementService {
|
|
|
refundAddr.setUpdateTime(new Date());
|
|
|
refundAddrService.save(refundAddr);
|
|
|
}
|
|
|
-// resultData.put("thirdPartyId",shopDetailInfo.getShopId());//推送第三方id
|
|
|
-// String post =null;
|
|
|
-// try {
|
|
|
-// post = HttpUtil.post(smqjhMdUrlAddAndUpdate, goodsInfoJson);
|
|
|
-// JSONObject jsonObject = JSONObject.parseObject(post);
|
|
|
-// Object code = jsonObject.get("code");
|
|
|
-// if (!ObjectUtils.isEmpty(code)&&"00000".equals(code.toString())){
|
|
|
-// log.info("市民请集合推送门店成功");
|
|
|
-// }else {
|
|
|
-// log.error("市民请集合推送门店失败返回"+post);
|
|
|
-// }
|
|
|
-// } catch (Exception e) {
|
|
|
-// log.error("市民请集合推送门店失败异常"+e.getMessage());
|
|
|
-// log.error("市民请集合推送门店失败1"+post);
|
|
|
-// }
|
|
|
-// log.info("修改门店信息成功");
|
|
|
+ resultData.put("thirdPartyId",shopDetailInfo.getShopId());//推送第三方id
|
|
|
+ String post =null;
|
|
|
+ try {
|
|
|
+ post = HttpUtil.post(smqjhUtil.getSmqjhPmsUrl()+SmqjhUtil.smqjhMdUrlAddAndUpdate, goodsInfoJson);
|
|
|
+ JSONObject jsonObject = JSONObject.parseObject(post);
|
|
|
+ Object code = jsonObject.get("code");
|
|
|
+ if (!ObjectUtils.isEmpty(code)&&"00000".equals(code.toString())){
|
|
|
+ log.info("市民请集合推送门店成功");
|
|
|
+ }else {
|
|
|
+ log.error("市民请集合推送门店失败返回"+post);
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("市民请集合推送门店失败异常"+e.getMessage());
|
|
|
+ log.error("市民请集合推送门店失败1"+post);
|
|
|
+ }
|
|
|
+ log.info("修改门店信息成功");
|
|
|
return HBR.success();
|
|
|
} catch (Exception e) {
|
|
|
log.error("门店变更失败:{}", e.getMessage(), e);
|
|
|
@@ -303,22 +297,22 @@ public class StoreManagementService implements IStoreManagementService {
|
|
|
}else {
|
|
|
log.error("不存在门店{}", stationId);
|
|
|
}
|
|
|
-// String post =null;
|
|
|
-// try {
|
|
|
-// goodsInfoJson.put("stationId",stationId);
|
|
|
-// post = HttpUtil.post(smqjhMdUrlUpdateStatus, goodsInfoJson);
|
|
|
-// JSONObject jsonObject = JSONObject.parseObject(post);
|
|
|
-// Object code = jsonObject.get("code");
|
|
|
-// if (!ObjectUtils.isEmpty(code)&&"00000".equals(code.toString())){
|
|
|
-// log.info("市民请集合推送门店状态成功");
|
|
|
-// }else {
|
|
|
-// log.error("市民请集合推送门店状态失败返回"+post);
|
|
|
-// }
|
|
|
-// } catch (Exception e) {
|
|
|
-// log.error("市民请集合推送门店失败状态异常"+e.getMessage());
|
|
|
-// log.error("市民请集合推送门店状态失败1"+post);
|
|
|
-// }
|
|
|
-// log.info("修改门店信息状态成功");
|
|
|
+ String post =null;
|
|
|
+ try {
|
|
|
+ goodsInfoJson.put("stationId",stationId);
|
|
|
+ post = HttpUtil.post(smqjhUtil.getSmqjhPmsUrl()+SmqjhUtil.smqjhMdUrlUpdateStatus, goodsInfoJson);
|
|
|
+ JSONObject jsonObject = JSONObject.parseObject(post);
|
|
|
+ Object code = jsonObject.get("code");
|
|
|
+ if (!ObjectUtils.isEmpty(code)&&"00000".equals(code.toString())){
|
|
|
+ log.info("市民请集合推送门店状态成功");
|
|
|
+ }else {
|
|
|
+ log.error("市民请集合推送门店状态失败返回"+post);
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("市民请集合推送门店失败状态异常"+e.getMessage());
|
|
|
+ log.error("市民请集合推送门店状态失败1"+post);
|
|
|
+ }
|
|
|
+ log.info("修改门店信息状态成功");
|
|
|
|
|
|
}
|
|
|
}
|