Commit 88af3e85 by 潘诗林

fix:预学习门店获取方式修改

1 parent 8077cba9
......@@ -26,6 +26,7 @@ import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.Objects;
import java.util.Optional;
import java.util.stream.Collectors;
......@@ -58,8 +59,15 @@ public class PreLearnController {
}
private Integer getShopMerchantId() {
return Optional.ofNullable(CommonUtil.getLoginUserInfo())
.map(LoginUserInfoResponse::getMerchantId).orElse(null);
//取4s店id
Integer merchantId = Optional.ofNullable(CommonUtil.getLoginUserInfo())
.map(LoginUserInfoResponse::getShopMerchantId).orElse(null);
if(Objects.isNull(merchantId)){
//取园区店Id
return Optional.ofNullable(CommonUtil.getLoginUserInfo())
.map(LoginUserInfoResponse::getMerchantId).orElse(null);
}
return merchantId;
}
// ==================== 首页弹窗 ====================
......@@ -188,6 +196,7 @@ public class PreLearnController {
resp.setCaseId(dto.getCaseId());
resp.setAiStatus(dto.getAiStatus());
resp.setTipMessage(dto.getTipMessage());
resp.setStaffLearnStatus(dto.getStaffLearnStatus());
if (dto.getPackageInfo() != null) {
resp.setPackageInfo(BeanUtil.copyProperties(dto.getPackageInfo(),
PreLearnScriptBoardResponse.PackageInfoVO.class));
......
......@@ -30,6 +30,9 @@ public class PreLearnScriptBoardResponse implements Serializable {
@ApiModelProperty(name = "tipMessage", notes = "提示信息")
private String tipMessage;
@ApiModelProperty(value = "员工学习状态")
private Integer staffLearnStatus;
@Data
@ApiModel("套餐信息")
public static class PackageInfoVO implements Serializable {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!