fix nap 订单 用户头像

master
eason.qian 7 years ago
parent a85861aa30
commit e3d90debbb

@ -575,8 +575,13 @@ public class RetailAppServiceImp implements RetailAppService {
}
break;
case "Wechat":
JSONObject weUser = customerMapper.findCustomerByOpenId(customer_id);
if (weUser != null) {
JSONObject weUser = new JSONObject();
if (customer_id.startsWith("olH")){
weUser = customerMapper.findCustomerGlobalpayByOpenId(customer_id);
}else {
weUser = customerMapper.findCustomerByOpenId(customer_id);
}
if (weUser != null && !weUser.isEmpty()) {
order.put("nickname", weUser.getString("nickname"));
order.put("headimg", weUser.getString("headimg"));
}

@ -22,6 +22,9 @@ public interface CustomerMapper {
@AutoSql(type = SqlType.SELECT)
JSONObject findCustomerByOpenId(@Param("wechat_openid") String openId);
@AutoSql(type = SqlType.SELECT)
JSONObject findCustomerGlobalpayByOpenId(@Param("globalpay_openid") String openId);
@AutoSql(type = SqlType.SELECT)
@AdvanceSelect(addonWhereClause = "wechat_openid like 'o32%'")
JSONObject findCustomerBykangaOpenid(@Param("kanga_openid") String openId);

@ -386,8 +386,13 @@ public class TradeLogServiceImpl implements TradeLogService {
TimeZoneUtils.switchTimeZone(order, timezone, "create_time", "confirm_time", "transaction_time");
}
JSONObject customer = customerMapper.findCustomerByOpenId(order.getString("customer_id"));
if (customer != null) {
JSONObject customer = new JSONObject();
if (order.getString("customer_id").startsWith("olH")){
customer = customerMapper.findCustomerGlobalpayByOpenId(order.getString("customer_id"));
}else {
customer = customerMapper.findCustomerByOpenId(order.getString("customer_id"));
}
if (customer != null && !customer.isEmpty()) {
order.put("headimg", customer.getString("headimg"));
order.put("nickname", customer.getString("nickname"));
}

Loading…
Cancel
Save