|
@@ -45,7 +45,8 @@ import java.util.Map;
|
|
|
@Slf4j
|
|
|
@RestController
|
|
|
@RequestMapping(value = "/user")
|
|
|
-public class TerminalUserController {
|
|
|
+public class TerminalUserController
|
|
|
+{
|
|
|
|
|
|
@Autowired
|
|
|
private TerminalUserService terminalUserService;
|
|
@@ -66,24 +67,31 @@ public class TerminalUserController {
|
|
|
private TerminalDeviceService terminalDeviceService;
|
|
|
|
|
|
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
|
|
- public APIResult<Page<TerminalUser>> search(TerminalUserSearchDTO terminalUserSearchDTO) {
|
|
|
+ public APIResult<Page<TerminalUser>> search(TerminalUserSearchDTO terminalUserSearchDTO)
|
|
|
+ {
|
|
|
TerminalUser terminalUser = new TerminalUser();
|
|
|
|
|
|
String code = terminalUserSearchDTO.getCode();
|
|
|
String campusId = terminalUserSearchDTO.getCampusId();
|
|
|
- if (!StringUtils.isEmpty(code)) {
|
|
|
+ if (!StringUtils.isEmpty(code))
|
|
|
+ {
|
|
|
terminalUser.setCode("%" + code + "%");
|
|
|
- }else if (!StringUtils.isEmpty(campusId)) {
|
|
|
+ }
|
|
|
+ else if (!StringUtils.isEmpty(campusId))
|
|
|
+ {
|
|
|
terminalUser.setCampusId(campusId);
|
|
|
}
|
|
|
|
|
|
String merchantId = terminalUserSearchDTO.getMerchantId();
|
|
|
- if (!StringUtils.isEmpty(merchantId)) {
|
|
|
+ log.info("merchantId:" + merchantId);
|
|
|
+ if (!StringUtils.isEmpty(merchantId))
|
|
|
+ {
|
|
|
terminalUser.setMerchantId(merchantId);
|
|
|
}
|
|
|
|
|
|
BaseStatusEnum status = terminalUserSearchDTO.getStatus();
|
|
|
- if (status != null) {
|
|
|
+ if (status != null)
|
|
|
+ {
|
|
|
terminalUser.setStatus(status);
|
|
|
}
|
|
|
|
|
@@ -91,7 +99,8 @@ public class TerminalUserController {
|
|
|
sort.put("gmtModified", BaseOrderEnum.DESC);
|
|
|
|
|
|
APIResult<Page<TerminalUser>> result = terminalUserService.search(terminalUser, terminalUserSearchDTO.getPageNo(), terminalUserSearchDTO.getPageSize(), sort);
|
|
|
- if (result.getSuccess()) {
|
|
|
+ if (result.getSuccess())
|
|
|
+ {
|
|
|
List<TerminalUser> terminalUserList = result.getData().getList();
|
|
|
setUserInfo(terminalUserList);
|
|
|
setDeciceInfo(terminalUserList);
|
|
@@ -102,19 +111,24 @@ public class TerminalUserController {
|
|
|
|
|
|
|
|
|
@RequestMapping(method = RequestMethod.GET)
|
|
|
- public APIResult<List<TerminalUser>> findByCondition(TerminalUserSearchDTO terminalUserSearchDTO) {
|
|
|
+ public APIResult<List<TerminalUser>> findByCondition(TerminalUserSearchDTO terminalUserSearchDTO)
|
|
|
+ {
|
|
|
TerminalUser terminalUser = new TerminalUser();
|
|
|
|
|
|
String code = terminalUserSearchDTO.getCode();
|
|
|
String campusId = terminalUserSearchDTO.getCampusId();
|
|
|
- if (!StringUtils.isEmpty(code)) {
|
|
|
+ if (!StringUtils.isEmpty(code))
|
|
|
+ {
|
|
|
terminalUser.setCode("%" + code + "%");
|
|
|
- } else if (!StringUtils.isEmpty(campusId)) {
|
|
|
+ }
|
|
|
+ else if (!StringUtils.isEmpty(campusId))
|
|
|
+ {
|
|
|
terminalUser.setCampusId(campusId);
|
|
|
}
|
|
|
|
|
|
String merchantId = terminalUserSearchDTO.getMerchantId();
|
|
|
- if (!StringUtils.isEmpty(merchantId)) {
|
|
|
+ if (!StringUtils.isEmpty(merchantId))
|
|
|
+ {
|
|
|
terminalUser.setMerchantId(merchantId);
|
|
|
}
|
|
|
|
|
@@ -127,12 +141,14 @@ public class TerminalUserController {
|
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "/auth", method = RequestMethod.POST)
|
|
|
- public APIResult updateAuth(@RequestBody AuthDTO dto) {
|
|
|
+ public APIResult updateAuth(@RequestBody AuthDTO dto)
|
|
|
+ {
|
|
|
return remoteAuthProxy.saveOrUpdateAuth(dto);
|
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "/auth/list", method = RequestMethod.GET)
|
|
|
- public Page<TerminalUserAuthVo> findAuthListByCondition(TerminalUserSearchDTO terminalUserSearchDTO) {
|
|
|
+ public Page<TerminalUserAuthVo> findAuthListByCondition(TerminalUserSearchDTO terminalUserSearchDTO)
|
|
|
+ {
|
|
|
Page<TerminalUserAuthVo> pageResult = new Page<>();
|
|
|
pageResult.setPageNo(terminalUserSearchDTO.getPageNo());
|
|
|
pageResult.setPageSize(terminalUserSearchDTO.getPageSize());
|
|
@@ -143,72 +159,109 @@ public class TerminalUserController {
|
|
|
AuthQueryDTO authQueryDTO = new AuthQueryDTO();
|
|
|
authQueryDTO.setPageNo(terminalUserSearchDTO.getPageNo());
|
|
|
authQueryDTO.setPageSize(terminalUserSearchDTO.getPageSize());
|
|
|
+ authQueryDTO.setFastExpired(terminalUserSearchDTO.getFastExpired());
|
|
|
|
|
|
|
|
|
TerminalUser terminalUser = new TerminalUser();
|
|
|
String code = terminalUserSearchDTO.getCode();
|
|
|
- if (!StringUtils.isEmpty(code)) {
|
|
|
- log.info("/user/auth/list | request code={}",code);
|
|
|
+ if (!StringUtils.isEmpty(code))
|
|
|
+ {
|
|
|
+ log.info("/user/auth/list | request code={}", code);
|
|
|
terminalUser.setCode(code);
|
|
|
}
|
|
|
+
|
|
|
+ String merchantId = terminalUserSearchDTO.getMerchantId();
|
|
|
+ if (!StringUtils.isEmpty(merchantId))
|
|
|
+ {
|
|
|
+ log.info("/user/auth/list | request merchantId={}", merchantId);
|
|
|
+ terminalUser.setMerchantId(merchantId);
|
|
|
+ }
|
|
|
+
|
|
|
+ String campusId = terminalUserSearchDTO.getCampusId();
|
|
|
+ if (!StringUtils.isEmpty(campusId))
|
|
|
+ {
|
|
|
+ log.info("/user/auth/list | request campusId={}", campusId);
|
|
|
+ terminalUser.setCampusId(campusId);
|
|
|
+ }
|
|
|
+
|
|
|
LinkedHashMap<String, BaseOrderEnum> sort = new LinkedHashMap<>();
|
|
|
sort.put("gmtModified", BaseOrderEnum.DESC);
|
|
|
|
|
|
List<TerminalUser> terminalUserList = terminalUserService.find(terminalUser, sort);
|
|
|
|
|
|
-
|
|
|
-
|
|
|
- if(CollectionUtils.isEmpty(terminalUserList)){
|
|
|
+ if (CollectionUtils.isEmpty(terminalUserList))
|
|
|
+ {
|
|
|
log.info("terminalUserList is empty!");
|
|
|
return pageResult;
|
|
|
- }else if(terminalUserList.size() == 1){
|
|
|
+ }
|
|
|
+ else if (terminalUserList.size() == 1)
|
|
|
+ {
|
|
|
//查询到唯一用户时,设置资源库查询条件 | 其他情况默认查询全部
|
|
|
TerminalUser user = terminalUserList.get(0);
|
|
|
authQueryDTO.setUid(user.getId());
|
|
|
}
|
|
|
+ else
|
|
|
+ {
|
|
|
+ String uids = "";
|
|
|
+ for (TerminalUser obj : terminalUserList)
|
|
|
+ {
|
|
|
+ uids += obj.getId()+"#";
|
|
|
+ }
|
|
|
+ uids = uids.substring(0,uids.length()-1);
|
|
|
+ authQueryDTO.setUids(uids);
|
|
|
+ }
|
|
|
|
|
|
Page<AuthVo> authPage = remoteAuthProxy.findAuthList(authQueryDTO);
|
|
|
|
|
|
List<AuthVo> authList = authPage.getList();
|
|
|
- if(CollectionUtils.isEmpty(authList)){
|
|
|
+ if (CollectionUtils.isEmpty(authList))
|
|
|
+ {
|
|
|
log.info("authList is empty!");
|
|
|
return pageResult;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
Map<String, TerminalUser> terminalUserMap = ListUtil.convert(terminalUserList, "id", TerminalUser.class);
|
|
|
|
|
|
- authList.forEach(authVo -> {
|
|
|
+ authList.forEach(authVo ->
|
|
|
+ {
|
|
|
TerminalUser termianlUser = terminalUserMap.get(authVo.getUid());
|
|
|
- TerminalUserAuthVo vo = Converter.getTerminalUserAuthVo(termianlUser,authVo);
|
|
|
- terminalUserAuthVos.add(vo);
|
|
|
+ if (termianlUser != null)
|
|
|
+ {
|
|
|
+ TerminalUserAuthVo vo = Converter.getTerminalUserAuthVo(termianlUser, authVo);
|
|
|
+ terminalUserAuthVos.add(vo);
|
|
|
+ }
|
|
|
});
|
|
|
|
|
|
//设置分页数据
|
|
|
- pageResult.setTotalSize((int)authPage.getTotalSize());
|
|
|
+ pageResult.setTotalSize((int) authPage.getTotalSize());
|
|
|
pageResult.setList(terminalUserAuthVos);
|
|
|
|
|
|
return pageResult;
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
@Transactional
|
|
|
@RequestMapping(method = RequestMethod.POST)
|
|
|
- public APIResult<TerminalUser> create(HttpServletRequest request, @RequestBody @Valid TerminalUserDTO terminalUserDTO) {
|
|
|
+ public APIResult<TerminalUser> create(HttpServletRequest request, @RequestBody @Valid TerminalUserDTO terminalUserDTO)
|
|
|
+ {
|
|
|
String campusId = terminalUserDTO.getCampusId();
|
|
|
- if (StringUtils.isEmpty(campusId)) {
|
|
|
+ if (StringUtils.isEmpty(campusId))
|
|
|
+ {
|
|
|
return APIResult.error(UserServiceAPICode.PARAMETER_ERROR);
|
|
|
}
|
|
|
|
|
|
Campus campus = campusService.findOne(campusId);
|
|
|
- if (campus == null) {
|
|
|
+ if (campus == null)
|
|
|
+ {
|
|
|
return APIResult.error(UserServiceAPICode.NOT_EXISTS);
|
|
|
}
|
|
|
|
|
|
String merchantId = campus.getMerchantId();
|
|
|
Merchant merchant = merchantService.findOne(merchantId);
|
|
|
|
|
|
- if (merchant == null) {
|
|
|
+ if (merchant == null)
|
|
|
+ {
|
|
|
return APIResult.error(UserServiceAPICode.NOT_EXISTS);
|
|
|
}
|
|
|
|
|
@@ -223,17 +276,21 @@ public class TerminalUserController {
|
|
|
|
|
|
// 设置名字
|
|
|
String name = terminalUserDTO.getName();
|
|
|
- if (StringUtils.isEmpty(name)) {
|
|
|
+ if (StringUtils.isEmpty(name))
|
|
|
+ {
|
|
|
terminalUserDTO.setName(StudentNumberUtil.toChinese(serialNo, "教室"));
|
|
|
}
|
|
|
|
|
|
// 远程注册
|
|
|
String password = terminalUserDTO.getPassword();
|
|
|
APIResult<RemoteUser> remoteUserAPIResult = remoteUserProxy.register(code, password, HttpUtil.getClientIp(request), "0");
|
|
|
- if (!remoteUserAPIResult.getSuccess()) {
|
|
|
+ if (!remoteUserAPIResult.getSuccess())
|
|
|
+ {
|
|
|
log.error(JSON.toJSONString(remoteUserAPIResult));
|
|
|
return APIResult.error(UserServiceAPICode.REMOTE_USER_REGISTER_ERROR);
|
|
|
- }else {
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
// 设置资源中心id为本地用户id
|
|
|
RemoteUser remoteUser = remoteUserAPIResult.getData();
|
|
|
terminalUserDTO.setId(remoteUser.getUid());
|
|
@@ -241,7 +298,8 @@ public class TerminalUserController {
|
|
|
|
|
|
// 存储数据库
|
|
|
APIResult<TerminalUser> result = terminalUserService.create(terminalUserDTO);
|
|
|
- if (!result.getSuccess()) {
|
|
|
+ if (!result.getSuccess())
|
|
|
+ {
|
|
|
return result;
|
|
|
}
|
|
|
|
|
@@ -252,30 +310,37 @@ public class TerminalUserController {
|
|
|
}
|
|
|
|
|
|
@RequestMapping(method = RequestMethod.PUT)
|
|
|
- public APIResult<TerminalUser> update(HttpServletRequest request, @RequestBody TerminalUserDTO terminalUserDTO) {
|
|
|
+ public APIResult<TerminalUser> update(HttpServletRequest request, @RequestBody TerminalUserDTO terminalUserDTO)
|
|
|
+ {
|
|
|
String id = terminalUserDTO.getId();
|
|
|
- if (StringUtils.isEmpty(id)) {
|
|
|
+ if (StringUtils.isEmpty(id))
|
|
|
+ {
|
|
|
return APIResult.error(UserServiceAPICode.PARAMETER_ERROR);
|
|
|
}
|
|
|
|
|
|
TerminalUser terminalUser = terminalUserService.find(id);
|
|
|
- if (terminalUser == null) {
|
|
|
+ if (terminalUser == null)
|
|
|
+ {
|
|
|
return APIResult.error(UserServiceAPICode.NOT_EXISTS);
|
|
|
}
|
|
|
|
|
|
String newPassword = terminalUserDTO.getPassword();
|
|
|
- if (!StringUtils.isEmpty(newPassword)) {
|
|
|
+ if (!StringUtils.isEmpty(newPassword))
|
|
|
+ {
|
|
|
String prePassword = terminalUser.getPassword();
|
|
|
- if (!prePassword.equals(newPassword)) {
|
|
|
+ if (!prePassword.equals(newPassword))
|
|
|
+ {
|
|
|
APIResult result = remoteUserProxy.changePassword(terminalUser, newPassword, HttpUtil.getClientIp(request), "0");
|
|
|
- if (!result.getSuccess()) {
|
|
|
+ if (!result.getSuccess())
|
|
|
+ {
|
|
|
return result;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
APIResult<TerminalUser> result = terminalUserService.update(terminalUserDTO);
|
|
|
- if (result.getSuccess()) {
|
|
|
+ if (result.getSuccess())
|
|
|
+ {
|
|
|
setUserInfo(result.getData());
|
|
|
}
|
|
|
|
|
@@ -283,9 +348,11 @@ public class TerminalUserController {
|
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
|
|
|
- public APIResult<TerminalUser> getUser(@PathVariable("id") String id) {
|
|
|
+ public APIResult<TerminalUser> getUser(@PathVariable("id") String id)
|
|
|
+ {
|
|
|
TerminalUser terminalUser = terminalUserService.find(id);
|
|
|
- if (terminalUser == null) {
|
|
|
+ if (terminalUser == null)
|
|
|
+ {
|
|
|
return APIResult.error(UserServiceAPICode.NOT_EXISTS);
|
|
|
}
|
|
|
|
|
@@ -294,9 +361,11 @@ public class TerminalUserController {
|
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "/code/{code}", method = RequestMethod.GET)
|
|
|
- public APIResult<TerminalUser> loadUser(@PathVariable("code") String code) {
|
|
|
+ public APIResult<TerminalUser> loadUser(@PathVariable("code") String code)
|
|
|
+ {
|
|
|
TerminalUser terminalUser = terminalUserService.loadUserByCode(code);
|
|
|
- if (terminalUser == null) {
|
|
|
+ if (terminalUser == null)
|
|
|
+ {
|
|
|
return APIResult.error(UserServiceAPICode.NOT_EXISTS);
|
|
|
}
|
|
|
|
|
@@ -305,14 +374,16 @@ public class TerminalUserController {
|
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "/campus/ids", method = RequestMethod.GET)
|
|
|
- public APIResult<List<TerminalUser>> findByCampusIds(@RequestParam("id") List<String> campusIds) {
|
|
|
+ public APIResult<List<TerminalUser>> findByCampusIds(@RequestParam("id") List<String> campusIds)
|
|
|
+ {
|
|
|
List<TerminalUser> terminalUserList = terminalUserService.findByCampusIds(campusIds);
|
|
|
setUserInfo(terminalUserList);
|
|
|
return APIResult.ok(terminalUserList);
|
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "/ids", method = RequestMethod.GET)
|
|
|
- public APIResult<List<TerminalUser>> findByIds(@RequestParam("id") List<String> ids) {
|
|
|
+ public APIResult<List<TerminalUser>> findByIds(@RequestParam("id") List<String> ids)
|
|
|
+ {
|
|
|
List<TerminalUser> terminalUserList = terminalUserService.findByIds(ids);
|
|
|
setUserInfo(terminalUserList);
|
|
|
return APIResult.ok(terminalUserList);
|
|
@@ -320,17 +391,21 @@ public class TerminalUserController {
|
|
|
|
|
|
// 禁用终端用户
|
|
|
@RequestMapping(value = "/{id}", method = RequestMethod.DELETE)
|
|
|
- public APIResult<Boolean> delete(@PathVariable("id") String id) {
|
|
|
+ public APIResult<Boolean> delete(@PathVariable("id") String id)
|
|
|
+ {
|
|
|
return terminalUserService.delete(id);
|
|
|
}
|
|
|
|
|
|
|
|
|
- public static void setUserInfo(TerminalUser terminalUser, Campus campus, Merchant merchant) {
|
|
|
- if (terminalUser == null) {
|
|
|
+ public static void setUserInfo(TerminalUser terminalUser, Campus campus, Merchant merchant)
|
|
|
+ {
|
|
|
+ if (terminalUser == null)
|
|
|
+ {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- if (campus != null) {
|
|
|
+ if (campus != null)
|
|
|
+ {
|
|
|
terminalUser.setContactName(campus.getContactName());
|
|
|
terminalUser.setMobile(campus.getMobile());
|
|
|
terminalUser.setCityName(campus.getCityName());
|
|
@@ -338,20 +413,24 @@ public class TerminalUserController {
|
|
|
terminalUser.setProvinceName(ProvinceUtil.get(campus.getProvinceCode()));
|
|
|
}
|
|
|
|
|
|
- if (merchant != null) {
|
|
|
+ if (merchant != null)
|
|
|
+ {
|
|
|
terminalUser.setMerchantName(merchant.getName());
|
|
|
terminalUser.setMerchantContactMobile(merchant.getMobile());
|
|
|
terminalUser.setMerchantContactName(merchant.getContactName());
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- public void setUserInfo(TerminalUser terminalUser) {
|
|
|
- if (terminalUser == null) {
|
|
|
+ public void setUserInfo(TerminalUser terminalUser)
|
|
|
+ {
|
|
|
+ if (terminalUser == null)
|
|
|
+ {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
Campus campus = campusService.findOne(terminalUser.getCampusId());
|
|
|
- if (campus != null) {
|
|
|
+ if (campus != null)
|
|
|
+ {
|
|
|
terminalUser.setContactName(campus.getContactName());
|
|
|
terminalUser.setMobile(campus.getMobile());
|
|
|
terminalUser.setCityName(campus.getCityName());
|
|
@@ -360,7 +439,8 @@ public class TerminalUserController {
|
|
|
}
|
|
|
|
|
|
Merchant merchant = merchantService.findOne(campus.getMerchantId());
|
|
|
- if (merchant != null) {
|
|
|
+ if (merchant != null)
|
|
|
+ {
|
|
|
terminalUser.setMerchantSimple(merchant.getSimple());
|
|
|
terminalUser.setMerchantName(merchant.getName());
|
|
|
terminalUser.setMerchantContactMobile(merchant.getMobile());
|
|
@@ -368,15 +448,18 @@ public class TerminalUserController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- public void setUserInfo(List<TerminalUser> terminalUserList) {
|
|
|
- if (CollectionUtils.isEmpty(terminalUserList)) {
|
|
|
+ public void setUserInfo(List<TerminalUser> terminalUserList)
|
|
|
+ {
|
|
|
+ if (CollectionUtils.isEmpty(terminalUserList))
|
|
|
+ {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
List<String> campusIdList = new ArrayList<>();
|
|
|
List<String> merchantIdList = new ArrayList<>();
|
|
|
|
|
|
- terminalUserList.forEach(terminalUser -> {
|
|
|
+ terminalUserList.forEach(terminalUser ->
|
|
|
+ {
|
|
|
campusIdList.add(terminalUser.getCampusId());
|
|
|
merchantIdList.add(terminalUser.getMerchantId());
|
|
|
});
|
|
@@ -384,9 +467,11 @@ public class TerminalUserController {
|
|
|
Map<String, Campus> campusMap = campusService.getCampusMap(campusIdList);
|
|
|
Map<String, Merchant> merchantMap = merchantService.getMerchantMap(merchantIdList);
|
|
|
|
|
|
- for (TerminalUser terminalUser : terminalUserList) {
|
|
|
+ for (TerminalUser terminalUser : terminalUserList)
|
|
|
+ {
|
|
|
Campus campus = campusMap.get(terminalUser.getCampusId());
|
|
|
- if (campus != null) {
|
|
|
+ if (campus != null)
|
|
|
+ {
|
|
|
terminalUser.setContactName(campus.getContactName());
|
|
|
terminalUser.setMobile(campus.getMobile());
|
|
|
terminalUser.setCityName(campus.getCityName());
|
|
@@ -396,7 +481,8 @@ public class TerminalUserController {
|
|
|
}
|
|
|
|
|
|
Merchant merchant = merchantMap.get(terminalUser.getMerchantId());
|
|
|
- if (merchant != null) {
|
|
|
+ if (merchant != null)
|
|
|
+ {
|
|
|
terminalUser.setMerchantName(merchant.getName());
|
|
|
terminalUser.setMerchantContactMobile(merchant.getMobile());
|
|
|
terminalUser.setMerchantContactName(merchant.getContactName());
|
|
@@ -406,25 +492,30 @@ public class TerminalUserController {
|
|
|
|
|
|
/**
|
|
|
* 设置绑定设备信息
|
|
|
+ *
|
|
|
* @param terminalUserList
|
|
|
*/
|
|
|
- private void setDeciceInfo(List<TerminalUser> terminalUserList) {
|
|
|
- if (CollectionUtils.isEmpty(terminalUserList)) {
|
|
|
+ private void setDeciceInfo(List<TerminalUser> terminalUserList)
|
|
|
+ {
|
|
|
+ if (CollectionUtils.isEmpty(terminalUserList))
|
|
|
+ {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- terminalUserList.forEach(terminalUser ->{
|
|
|
+ terminalUserList.forEach(terminalUser ->
|
|
|
+ {
|
|
|
TerminalDevice terminalDevice = terminalDeviceService.findByUserId(terminalUser.getId());
|
|
|
- if(null != terminalDevice){
|
|
|
+ if (null != terminalDevice)
|
|
|
+ {
|
|
|
//1 已绑定设备
|
|
|
terminalUser.setDeviceStatus(1);
|
|
|
- }else{
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
terminalUser.setDeviceStatus(0);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
}
|