fix nap 订单 用户头像

master
eason.qian 6 years ago
parent a85861aa30
commit e3d90debbb

@ -575,8 +575,13 @@ public class RetailAppServiceImp implements RetailAppService {
} }
break; break;
case "Wechat": case "Wechat":
JSONObject weUser = customerMapper.findCustomerByOpenId(customer_id); JSONObject weUser = new JSONObject();
if (weUser != null) { 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("nickname", weUser.getString("nickname"));
order.put("headimg", weUser.getString("headimg")); order.put("headimg", weUser.getString("headimg"));
} }

@ -22,6 +22,9 @@ public interface CustomerMapper {
@AutoSql(type = SqlType.SELECT) @AutoSql(type = SqlType.SELECT)
JSONObject findCustomerByOpenId(@Param("wechat_openid") String openId); JSONObject findCustomerByOpenId(@Param("wechat_openid") String openId);
@AutoSql(type = SqlType.SELECT)
JSONObject findCustomerGlobalpayByOpenId(@Param("globalpay_openid") String openId);
@AutoSql(type = SqlType.SELECT) @AutoSql(type = SqlType.SELECT)
@AdvanceSelect(addonWhereClause = "wechat_openid like 'o32%'") @AdvanceSelect(addonWhereClause = "wechat_openid like 'o32%'")
JSONObject findCustomerBykangaOpenid(@Param("kanga_openid") String openId); 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"); TimeZoneUtils.switchTimeZone(order, timezone, "create_time", "confirm_time", "transaction_time");
} }
JSONObject customer = customerMapper.findCustomerByOpenId(order.getString("customer_id")); JSONObject customer = new JSONObject();
if (customer != null) { 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("headimg", customer.getString("headimg"));
order.put("nickname", customer.getString("nickname")); order.put("nickname", customer.getString("nickname"));
} }

Loading…
Cancel
Save