mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-03 17:40:13 +08:00
update 平台测试员状态
This commit is contained in:
@@ -9,6 +9,7 @@ import com.jsowell.common.core.domain.AjaxResult;
|
||||
import com.jsowell.common.core.page.TableDataInfo;
|
||||
import com.jsowell.common.enums.BusinessType;
|
||||
import com.jsowell.common.enums.uniapp.BalanceChangesEnum;
|
||||
import com.jsowell.common.enums.ykc.ReturnCodeEnum;
|
||||
import com.jsowell.common.exception.BusinessException;
|
||||
import com.jsowell.common.util.StringUtils;
|
||||
import com.jsowell.pile.domain.MemberBasicInfo;
|
||||
@@ -193,6 +194,9 @@ public class MemberBasicInfoController extends BaseController {
|
||||
public AjaxResult updatePlatformTester(@RequestBody PlatformTesterDTO dto) {
|
||||
AjaxResult result;
|
||||
try {
|
||||
if (StringUtils.isBlank(dto.getMemberId()) || StringUtils.isBlank(dto.getStatus())) {
|
||||
throw new BusinessException(ReturnCodeEnum.CODE_PARAM_NOT_NULL_ERROR);
|
||||
}
|
||||
memberBasicInfoService.updatePlatformTester(dto);
|
||||
result = AjaxResult.success();
|
||||
} catch (BusinessException e) {
|
||||
@@ -210,7 +214,10 @@ public class MemberBasicInfoController extends BaseController {
|
||||
public AjaxResult selectPlatformTesterStatus(@RequestBody PlatformTesterDTO dto) {
|
||||
AjaxResult result;
|
||||
try {
|
||||
PlatformTesterVO platformTesterVO = memberBasicInfoService.selectPlatformTesterStatus(dto);
|
||||
if (StringUtils.isBlank(dto.getMemberId())) {
|
||||
throw new BusinessException(ReturnCodeEnum.CODE_PARAM_NOT_NULL_ERROR);
|
||||
}
|
||||
PlatformTesterVO platformTesterVO = memberBasicInfoService.selectPlatformTesterStatus(dto.getMemberId());
|
||||
result = AjaxResult.success(platformTesterVO);
|
||||
} catch (BusinessException e) {
|
||||
logger.error("查询平台测试员状态error param:{}", JSON.toJSONString(dto), e);
|
||||
|
||||
@@ -120,5 +120,5 @@ public interface IMemberBasicInfoService {
|
||||
|
||||
void updatePlatformTester(PlatformTesterDTO dto);
|
||||
|
||||
PlatformTesterVO selectPlatformTesterStatus(PlatformTesterDTO dto);
|
||||
PlatformTesterVO selectPlatformTesterStatus(String memberId);
|
||||
}
|
||||
|
||||
@@ -307,16 +307,16 @@ public class MemberBasicInfoServiceImpl implements IMemberBasicInfoService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlatformTesterVO selectPlatformTesterStatus(PlatformTesterDTO dto) {
|
||||
public PlatformTesterVO selectPlatformTesterStatus(String memberId) {
|
||||
PlatformTesterVO vo = new PlatformTesterVO();
|
||||
String redisKey = CacheConstants.PLATFORM_TESTER + dto.getMemberId();
|
||||
String redisKey = CacheConstants.PLATFORM_TESTER + memberId;
|
||||
String status = redisCache.getCacheObject(redisKey);
|
||||
if (StringUtils.isNotBlank(status)) {
|
||||
vo.setStatus(status);
|
||||
} else {
|
||||
vo.setStatus(Constants.ZERO);
|
||||
}
|
||||
vo.setMemberId(dto.getMemberId());
|
||||
vo.setMemberId(memberId);
|
||||
return vo;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user