Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
2883a201fa
|
|
@ -14,6 +14,7 @@ import com.bonus.canteen.core.auth.user.dto.UserLoginDTO;
|
|||
import com.bonus.canteen.core.common.utils.TenantContextHolder;
|
||||
import com.bonus.canteen.core.config.*;
|
||||
import com.bonus.canteen.core.customer.model.PigxUser;
|
||||
import com.bonus.canteen.core.device.manage.model.DeviceInfo;
|
||||
import com.bonus.canteen.core.device.mq.MacMessageService;
|
||||
import com.bonus.canteen.core.merchant.entity.MercMerchant;
|
||||
import com.bonus.canteen.core.open.modules.auth.constants.CheckEnum;
|
||||
|
|
@ -162,14 +163,14 @@ public class AuthController {
|
|||
|
||||
@ApiOperation("设备认证")
|
||||
@PostMapping({"/device/login"})
|
||||
public AjaxResult deviceLogin(@RequestHeader Map<String, String> header, @RequestBody String request) {
|
||||
String deviceSn = SmUtils.decryptBySm2(request);
|
||||
public AjaxResult deviceLogin(@RequestHeader Map<String, String> header, @RequestParam String encryptedDeviceSn) {
|
||||
String deviceSn = SmUtils.decryptBySm2(encryptedDeviceSn);
|
||||
String encryptKey = HeaderFetchUtil.getValueFromHeadersIgnoreCase(header, this.secureProperties.getSecurity().getServerEncryptedClientKeyHeaderName());
|
||||
String clientKey = SmUtils.decryptBySm4WithServerKey(encryptKey);
|
||||
if (CharSequenceUtil.isEmpty(deviceSn)) {
|
||||
return AjaxResult.success();
|
||||
} else {
|
||||
DeviceInfoInSystem deviceInfo = this.deviceInfoService.getBySnInSys(deviceSn);
|
||||
DeviceInfo deviceInfo = this.deviceInfoService.getBySn(deviceSn);
|
||||
if (ObjectUtil.isNull(deviceInfo)) {
|
||||
return AjaxResult.success();
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue