|
|
|
@@ -61,11 +61,20 @@ public class WxPosController extends BaseController { |
|
|
|
|
|
|
|
@ApiOperation(value = "商户POS用户/B端用户登录检查") |
|
|
|
@PostMapping("checkUserPassword") |
|
|
|
public ResultData checkUserPassword() { |
|
|
|
public ResultData checkUserPassword(@RequestBody Map<String, String> params) { |
|
|
|
WxMerchantBUser user = getUser(); |
|
|
|
String phone = params.get("phone"); |
|
|
|
String password = params.get("password"); |
|
|
|
//登录凭证不能为空 |
|
|
|
if (StringUtils.isBlank(phone)) { |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "手机号不能为空"); |
|
|
|
} |
|
|
|
if (StringUtils.isBlank(password)) { |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "密码不能为空"); |
|
|
|
} |
|
|
|
try { |
|
|
|
String resStr = posUtil.checkUserPassword(posUrl, posDevId, posReqKey, |
|
|
|
user.getTenantId(), user.getPhone(), user.getUserPwd()); |
|
|
|
user.getTenantId(), phone, password); |
|
|
|
if (resStr != null) { |
|
|
|
JSONObject retObj = JSON.parseObject(resStr); |
|
|
|
Map options = retObj; |
|
|
|
|