Commit 88af3e85 by 潘诗林

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

1 parent 8077cba9
...@@ -26,6 +26,7 @@ import lombok.RequiredArgsConstructor; ...@@ -26,6 +26,7 @@ import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import java.util.Objects;
import java.util.Optional; import java.util.Optional;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -58,8 +59,15 @@ public class PreLearnController { ...@@ -58,8 +59,15 @@ public class PreLearnController {
} }
private Integer getShopMerchantId() { private Integer getShopMerchantId() {
return Optional.ofNullable(CommonUtil.getLoginUserInfo()) //取4s店id
.map(LoginUserInfoResponse::getMerchantId).orElse(null); 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 { ...@@ -188,6 +196,7 @@ public class PreLearnController {
resp.setCaseId(dto.getCaseId()); resp.setCaseId(dto.getCaseId());
resp.setAiStatus(dto.getAiStatus()); resp.setAiStatus(dto.getAiStatus());
resp.setTipMessage(dto.getTipMessage()); resp.setTipMessage(dto.getTipMessage());
resp.setStaffLearnStatus(dto.getStaffLearnStatus());
if (dto.getPackageInfo() != null) { if (dto.getPackageInfo() != null) {
resp.setPackageInfo(BeanUtil.copyProperties(dto.getPackageInfo(), resp.setPackageInfo(BeanUtil.copyProperties(dto.getPackageInfo(),
PreLearnScriptBoardResponse.PackageInfoVO.class)); PreLearnScriptBoardResponse.PackageInfoVO.class));
......
...@@ -30,6 +30,9 @@ public class PreLearnScriptBoardResponse implements Serializable { ...@@ -30,6 +30,9 @@ public class PreLearnScriptBoardResponse implements Serializable {
@ApiModelProperty(name = "tipMessage", notes = "提示信息") @ApiModelProperty(name = "tipMessage", notes = "提示信息")
private String tipMessage; private String tipMessage;
@ApiModelProperty(value = "员工学习状态")
private Integer staffLearnStatus;
@Data @Data
@ApiModel("套餐信息") @ApiModel("套餐信息")
public static class PackageInfoVO implements Serializable { 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!