Browse Source

临时处置

master
jianjun 3 years ago
parent
commit
3c12af0ee8
  1. 8
      epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/grid/controller/ResiMineGridController.java

8
epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/grid/controller/ResiMineGridController.java

@ -7,6 +7,7 @@ import com.epmet.dto.form.LatestGridInfoFormDTO;
import com.epmet.dto.result.AllGridsByUserIdResultDTO; import com.epmet.dto.result.AllGridsByUserIdResultDTO;
import com.epmet.dto.result.LatestGridInfoResultDTO; import com.epmet.dto.result.LatestGridInfoResultDTO;
import com.epmet.modules.grid.service.ResiMineGridService; import com.epmet.modules.grid.service.ResiMineGridService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
@ -63,7 +64,12 @@ public class ResiMineGridController {
//formDTO.setAppId(appId); //formDTO.setAppId(appId);
formDTO.setCustomerId(token.getCustomerId()); formDTO.setCustomerId(token.getCustomerId());
formDTO.setUserId(token.getUserId()); formDTO.setUserId(token.getUserId());
return new Result<LatestGridInfoResultDTO>().ok(resiMineGridService.latestGridInfo(formDTO)); LatestGridInfoResultDTO data = resiMineGridService.latestGridInfo(formDTO);
//todo 兼容 一个老的 等删除这个if就行
if ((data == null || StringUtils.isBlank(data.getGridId())&&"c2527f3d5cb8958583cc1348c328a784".equals(token.getCustomerId()))){
return new Result<LatestGridInfoResultDTO>().ok(null);
}
return new Result<LatestGridInfoResultDTO>().ok(data);
} }
/** /**

Loading…
Cancel
Save