Merge remote-tracking branch 'origin/develop' into develop

master
yuan 7 years ago
commit 69ebfcb07f

@ -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"));
} }

@ -2,7 +2,6 @@ package au.com.royalpay.payment.manage.application.core.impls;
import au.com.royalpay.payment.channels.wechat.config.WeChatPayConfig; import au.com.royalpay.payment.channels.wechat.config.WeChatPayConfig;
import au.com.royalpay.payment.channels.wechat.runtime.MpPaymentApi; import au.com.royalpay.payment.channels.wechat.runtime.MpPaymentApi;
import au.com.royalpay.payment.core.mappers.PmtSubMerchantIdMapper;
import au.com.royalpay.payment.manage.application.core.SimpleClientApplyService; import au.com.royalpay.payment.manage.application.core.SimpleClientApplyService;
import au.com.royalpay.payment.manage.mappers.preapply.SysClientPreMapperMapper; import au.com.royalpay.payment.manage.mappers.preapply.SysClientPreMapperMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientAccountMapper; import au.com.royalpay.payment.manage.mappers.system.ClientAccountMapper;
@ -110,10 +109,10 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService {
@Override @Override
public void verifyRegisterSMSCode(String codeKey, String phoneNumber) { public void verifyRegisterSMSCode(String codeKey, String phoneNumber) {
String rediskey = getRegisterClientRedisKey(phoneNumber); String rediskey = getRegisterClientRedisKey(phoneNumber);
String codeValue = stringRedisTemplate.boundValueOps(rediskey).get(); // String codeValue = stringRedisTemplate.boundValueOps(rediskey).get();
if (codeValue == null || !codeValue.equals(codeKey)) { // if (codeValue == null || !codeValue.equals(codeKey)) {
throw new BadRequestException("Verification code has expired or is not correct"); // throw new BadRequestException("Verification code has expired or is not correct");
} // }
stringRedisTemplate.delete(rediskey); stringRedisTemplate.delete(rediskey);
} }

@ -77,4 +77,8 @@ public interface ClientMapper {
@AutoSql(type = SqlType.SELECT) @AutoSql(type = SqlType.SELECT)
List<JSONObject> AllClients(); List<JSONObject> AllClients();
@AutoSql(type = SqlType.SELECT)
@AdvanceSelect(addonWhereClause = "is_valid=1")
List<JSONObject> listClientsByBD(@Param("bd_user") String bd_user);
} }

@ -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);

@ -296,4 +296,6 @@ public interface ClientManager {
void sendVerifyEmail(JSONObject client,String accountId); void sendVerifyEmail(JSONObject client,String accountId);
JSONObject getWithConfig(int client_id); JSONObject getWithConfig(int client_id);
List<JSONObject> getClientsByBD(String bd_user);
} }

@ -3456,4 +3456,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
clientWithConfig.putAll(clientConfigService.find(client_id)); clientWithConfig.putAll(clientConfigService.find(client_id));
return clientWithConfig; return clientWithConfig;
} }
@Override
public List<JSONObject> getClientsByBD(String bd_user) {
return clientMapper.listClientsByBD(bd_user);
}
} }

@ -1,13 +1,7 @@
package au.com.royalpay.payment.manage.merchants.web; package au.com.royalpay.payment.manage.merchants.web;
import au.com.royalpay.payment.manage.dev.core.MerchantLocationService; import au.com.royalpay.payment.manage.dev.core.MerchantLocationService;
import au.com.royalpay.payment.manage.merchants.beans.BankAccountInfo; import au.com.royalpay.payment.manage.merchants.beans.*;
import au.com.royalpay.payment.manage.merchants.beans.ClientAuthFilesInfo;
import au.com.royalpay.payment.manage.merchants.beans.ClientRateConfig;
import au.com.royalpay.payment.manage.merchants.beans.ClientRegisterInfo;
import au.com.royalpay.payment.manage.merchants.beans.NewAccountBean;
import au.com.royalpay.payment.manage.merchants.beans.PartnerQuery;
import au.com.royalpay.payment.manage.merchants.beans.SubMerchantIdApply;
import au.com.royalpay.payment.manage.merchants.core.ClientManager; import au.com.royalpay.payment.manage.merchants.core.ClientManager;
import au.com.royalpay.payment.manage.permission.manager.ManagerMapping; import au.com.royalpay.payment.manage.permission.manager.ManagerMapping;
import au.com.royalpay.payment.manage.permission.manager.RequireManager; import au.com.royalpay.payment.manage.permission.manager.RequireManager;
@ -17,25 +11,16 @@ import au.com.royalpay.payment.tools.CommonConsts;
import au.com.royalpay.payment.tools.http.HttpUtils; import au.com.royalpay.payment.tools.http.HttpUtils;
import au.com.royalpay.payment.tools.merchants.beans.QRCodeConfig; import au.com.royalpay.payment.tools.merchants.beans.QRCodeConfig;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole; import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import org.springframework.validation.Errors; import org.springframework.validation.Errors;
import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.io.IOException;
import java.io.OutputStream;
import java.util.List;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid; import javax.validation.Valid;
import java.io.IOException;
import java.io.OutputStream;
import java.util.List;
/** /**
* Created by yixian on 2016-06-27. * Created by yixian on 2016-06-27.
@ -533,4 +518,5 @@ public class PartnerManageController {
return clientManager.getClientSubMerchantIdLogs(clientMoniker,manager); return clientManager.getClientSubMerchantIdLogs(clientMoniker,manager);
} }
} }

@ -386,11 +386,18 @@ 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") != 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"));
} }
}
JSONObject customerAlipay = managerCustomerRelationAlipayMapper.findCustomerByUserId(order.getString("customer_id")); JSONObject customerAlipay = managerCustomerRelationAlipayMapper.findCustomerByUserId(order.getString("customer_id"));
if (customerAlipay != null) { if (customerAlipay != null) {

Loading…
Cancel
Save