Commit 480fbac0 authored by shiyu's avatar shiyu

拍卖出价被超越

parent 6532cc5e
...@@ -20,6 +20,8 @@ import org.slf4j.LoggerFactory; ...@@ -20,6 +20,8 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.Map; import java.util.Map;
...@@ -172,7 +174,7 @@ public class SendMsgServiceImpl implements SendMsgService { ...@@ -172,7 +174,7 @@ public class SendMsgServiceImpl implements SendMsgService {
OkHttpUtil okHttpUtil = OkHttpUtil.builder().url(url); OkHttpUtil okHttpUtil = OkHttpUtil.builder().url(url);
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
map.put("touser", openId); map.put("touser", openId);
map.put("template_id", "lO-SF3tbPEbC7bDZxRk-x6lcwp1FrNP7T3SGd160uYM"); map.put("template_id", "vvdxAS4r6xNuW7fPF7o6ukVfDw6wf_57AMtJbMFQFfQ");
Map<String, Object> miniprogramMap = new HashMap<>(); Map<String, Object> miniprogramMap = new HashMap<>();
miniprogramMap.put("appid", APPLET_APPID); miniprogramMap.put("appid", APPLET_APPID);
StringBuffer stringBuffer = new StringBuffer(AUCTION_MSG_URL); StringBuffer stringBuffer = new StringBuffer(AUCTION_MSG_URL);
...@@ -184,15 +186,19 @@ public class SendMsgServiceImpl implements SendMsgService { ...@@ -184,15 +186,19 @@ public class SendMsgServiceImpl implements SendMsgService {
map.put("miniprogram", miniprogramMap); map.put("miniprogram", miniprogramMap);
Map<String, Object> paramMap = new LinkedHashMap<>(); Map<String, Object> paramMap = new LinkedHashMap<>();
paramMap.put("thing4", new HashMap() {{ paramMap.put("thing2", new HashMap() {{
if (auctionOfferNoticeMsg.getItemName().length() > 20) { if (auctionOfferNoticeMsg.getItemName().length() > 12) {
put("value", auctionOfferNoticeMsg.getItemName().substring(0, 20)); put("value", "出价被超越," + auctionOfferNoticeMsg.getItemName().substring(0, 12));
} else { } else {
put("value", auctionOfferNoticeMsg.getItemName()); put("value", "出价被超越," + auctionOfferNoticeMsg.getItemName());
} }
}}); }});
paramMap.put("amount5", new HashMap() {{ paramMap.put("character_string1", new HashMap() {{
put("value", auctionOfferNoticeMsg.getCurrentPrice() + "元"); put("value", "¥" + auctionOfferNoticeMsg.getCurrentPrice());
}});
paramMap.put("time4", new HashMap() {{
put("value", DateUtils.toString(new Date()));
}}); }});
map.put("data", paramMap); map.put("data", paramMap);
logger.info("============ 拍卖出价被超越通知模板消息内容 : {}", JsonUtils.fromMap(map)); logger.info("============ 拍卖出价被超越通知模板消息内容 : {}", JsonUtils.fromMap(map));
......
...@@ -129,8 +129,6 @@ public class QdOfficialAccountCallbackController { ...@@ -129,8 +129,6 @@ public class QdOfficialAccountCallbackController {
logger.info("=============== 更新订阅公众号记录成功 =============="); logger.info("=============== 更新订阅公众号记录成功 ==============");
} else if (SUBSCRIBE_MSG_POPUP_EVENT.equals(event)) { } else if (SUBSCRIBE_MSG_POPUP_EVENT.equals(event)) {
//一次性订阅消息 //一次性订阅消息
} }
} catch (Exception e) { } catch (Exception e) {
logger.error("微信公众号通知回调接口 error : {}", e); logger.error("微信公众号通知回调接口 error : {}", e);
......
...@@ -22,7 +22,6 @@ import org.slf4j.LoggerFactory; ...@@ -22,7 +22,6 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.util.CollectionUtils;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
...@@ -89,12 +88,12 @@ public class WxPayServiceTest { ...@@ -89,12 +88,12 @@ public class WxPayServiceTest {
@Test @Test
public void refund() { public void refund() {
List<String> list = Arrays.asList("GM2411101240401270325"); List<String> list = Arrays.asList("OSC2503230051036110879");
list.forEach(orderId ->{ list.forEach(orderId ->{
DistributionOrderRequestDto dto = new DistributionOrderRequestDto(); DistributionOrderRequestDto dto = new DistributionOrderRequestDto();
dto.setDistributionOrderId(orderId); dto.setDistributionOrderId(orderId);
dto.setAmount("300"); dto.setAmount("100");
dto.setRefundPrice("300"); dto.setRefundPrice("100");
Result result = wxPayServiceApi.refund(dto); Result result = wxPayServiceApi.refund(dto);
logger.info("申请微信支付退款:{}", result); logger.info("申请微信支付退款:{}", result);
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment