Commit a8d27793 authored by 曹盼盼's avatar 曹盼盼

修改登录接口

parent 8302d289
...@@ -3,16 +3,20 @@ package com.yeejoin.amos.boot.module.tzs.biz.controller; ...@@ -3,16 +3,20 @@ package com.yeejoin.amos.boot.module.tzs.biz.controller;
import com.yeejoin.amos.boot.biz.common.controller.BaseController; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.tzs.api.common.MobileLoginParam; import com.yeejoin.amos.boot.module.tzs.api.common.MobileLoginParam;
import com.yeejoin.amos.boot.module.tzs.api.service.ISafetyService; import com.yeejoin.amos.boot.module.tzs.api.service.ISafetyService;
import com.yeejoin.amos.component.feign.model.FeignClientResult;
import com.yeejoin.amos.feign.privilege.Privilege;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.context.RequestContext; import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.enumeration.UserType; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation; import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.util.Map;
/** /**
* @Author cpp * @Author cpp
...@@ -30,9 +34,9 @@ public class SafetyController extends BaseController { ...@@ -30,9 +34,9 @@ public class SafetyController extends BaseController {
@ApiOperation(value = "移动端登录", notes = "移动端登录") @ApiOperation(value = "移动端登录", notes = "移动端登录")
@PostMapping(value = "/mobile/login") @PostMapping(value = "/mobile/login")
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
public Object loginFromApp(@RequestBody MobileLoginParam param) { public ResponseModel<Map<String, Object>> loginFromApp(@RequestBody MobileLoginParam param) {
buildRequestContext(); buildRequestContext();
return iSafetyService.loginFromApp(param); return ResponseHelper.buildResponse(iSafetyService.loginFromApp(param));
} }
protected void buildRequestContext() { protected void buildRequestContext() {
String token = getToken(); String token = getToken();
......
...@@ -96,7 +96,7 @@ public class TzCylinderServiceImpl extends BaseService<TzCylinderInfoDto, Cylind ...@@ -96,7 +96,7 @@ public class TzCylinderServiceImpl extends BaseService<TzCylinderInfoDto, Cylind
tzCylinderInfoDto.setCylinderStatus(data3 != null ? data3.getName() : null); tzCylinderInfoDto.setCylinderStatus(data3 != null ? data3.getName() : null);
TzCylinderTagsDto tzCylinderTagsDto = tzCylinderMapper.getTzCylinderTagsDto(orgCode); TzCylinderTagsDto tzCylinderTagsDto = tzCylinderMapper.getTzCylinderTagsDto(orgCode);
if (!ValidationUtil.isEmpty(tzCylinderTagsDto.getGasCylinderStamp())) { if ( !ValidationUtil.isEmpty(tzCylinderTagsDto) && !ValidationUtil.isEmpty(tzCylinderTagsDto.getGasCylinderStamp())) {
tzCylinderTagsDto.setGasCylinderStamp(tzCylinderTagsDto.getGasCylinderStamp()); tzCylinderTagsDto.setGasCylinderStamp(tzCylinderTagsDto.getGasCylinderStamp());
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment