修改支付宝小程序授权

This commit is contained in:
yuyang 2022-02-14 17:51:52 +08:00
parent 50e5af7b22
commit e51e1f748d
4 changed files with 9 additions and 7 deletions

View File

@ -76,8 +76,8 @@ public class XhpcChargeOrderController extends BaseController {
*/ */
@GetMapping("/startUp") @GetMapping("/startUp")
public AjaxResult startUp(HttpServletRequest request, @RequestParam Long userId, @RequestParam String serialNumber, @RequestParam Integer type){ public AjaxResult startUp(HttpServletRequest request, @RequestParam Long userId, @RequestParam String serialNumber, @RequestParam Integer type){
logger.info("<<<<<<<<<<<<<<<<<<<<<<<<启动充电>>>>>>>>>>>>>>>>>"); logger.info("<<<<<<<<<<<<<<<<<<<<<<<<启动充电>>>>>>>>>>>>>>>>>"+serialNumber);
logger.info("<<<<<<<<<<<<<<<<<<<<<<<<启动充电>>>>>>>>>>>>>>>>>"); logger.info("<<<<<<<<<<<<<<<<<<<<<<<<启动充电>>>>>>>>>>>>>>>>>"+serialNumber);
return iXhpcChargeOrderService.startUp(request,userId, serialNumber, type); return iXhpcChargeOrderService.startUp(request,userId, serialNumber, type);
} }

View File

@ -199,12 +199,13 @@ public class XhpcChargeOrderServiceImpl extends BaseService implements IXhpcChar
} }
} }
} }
logger.info("<<<<<<<<<<<<<<<<<<<<<<<<无效的终端编号>>>>"+terminalSerialNumber+">>>>>>>>>>>>>"+tenantId);
//终端信息 //终端信息
XhpcTerminal xhpcTerminal = xhpcChargeOrderMapper.getXhpcTerminalSerialNumber(terminalSerialNumber,tenantId); XhpcTerminal xhpcTerminal = xhpcChargeOrderMapper.getXhpcTerminalSerialNumber(terminalSerialNumber,tenantId);
if (xhpcTerminal == null || xhpcTerminal.getTerminalId() == null || xhpcTerminal.getChargingPileId() == null || xhpcTerminal.getPileSerialNumber() == null) { if (xhpcTerminal == null || xhpcTerminal.getTerminalId() == null || xhpcTerminal.getChargingPileId() == null || xhpcTerminal.getPileSerialNumber() == null) {
return AjaxResult.error(1104, "无效的终端编号"); return AjaxResult.error(1104, "无效的终端编号");
} }
logger.info("<<<<<<<<<<<<<<<<<<<<<<<<无效的终端编号>>>>666666>>>>>>>>>>>>>");
//余额 //余额
String balance = new BigDecimal(userMessage.get("balance").toString()).multiply(new BigDecimal(100)).toString(); String balance = new BigDecimal(userMessage.get("balance").toString()).multiply(new BigDecimal(100)).toString();

View File

@ -245,8 +245,8 @@ public class XhpcAppUserController extends BaseController {
* 支付宝授权 * 支付宝授权
*/ */
@ApiOperation("支付宝授权") @ApiOperation("支付宝授权")
@PostMapping("/alipayEmpowerYu") @PostMapping("/alipayEmpower")
public AjaxResult alipayEmpowerYu(@RequestParam String code,String tenantId) throws Exception { public AjaxResult alipayEmpower(@RequestParam String code,String tenantId) throws Exception {
if("".equals(tenantId) || null==tenantId){ if("".equals(tenantId) || null==tenantId){
tenantId="000000"; tenantId="000000";
} }
@ -296,8 +296,8 @@ public class XhpcAppUserController extends BaseController {
* 支付宝授权 * 支付宝授权
*/ */
@ApiOperation("支付宝授权") @ApiOperation("支付宝授权")
@PostMapping("/alipayEmpower") @PostMapping("/alipayEmpowerYu")
public AjaxResult alipayEmpower(@RequestParam String code) throws Exception { public AjaxResult alipayEmpowerYu(@RequestParam String code) throws Exception {
/** 初始化 **/ /** 初始化 **/
CertAlipayRequest certAlipayRequest = new CertAlipayRequest(); CertAlipayRequest certAlipayRequest = new CertAlipayRequest();

View File

@ -190,6 +190,7 @@ public class XhpcAppUserServiceImpl extends BaseService implements IXhpcAppUserU
String type = StringUtils.valueOf(map.get("type")); String type = StringUtils.valueOf(map.get("type"));
String tenantId = StringUtils.valueOf(map.get("tenantId")); String tenantId = StringUtils.valueOf(map.get("tenantId"));
logger.info("<<<<<<<<<<code>>>>>>>>>>>>"+code); logger.info("<<<<<<<<<<code>>>>>>>>>>>>"+code);
logger.info("<<<<<<<<<<tenantId>>>>>>>>>>>>"+tenantId);
if("18123374652".equals(phone) && "123456".equals(code)){ if("18123374652".equals(phone) && "123456".equals(code)){
if("1".equals(type)){ if("1".equals(type)){
return appLogin(phone, "1", "ot6ul4nlSC5ZZOC4rTLS5hedFTGk", tenantId); return appLogin(phone, "1", "ot6ul4nlSC5ZZOC4rTLS5hedFTGk", tenantId);