|
@@ -662,9 +662,17 @@ public class PageServiceImpl implements PageService {
|
|
|
* @param equipmentId 项目仪器Id
|
|
|
*/
|
|
|
@Override
|
|
|
- public ResponseJson<PageDetailVo> getEquipmentDetails(Integer equipmentId) {
|
|
|
- if (equipmentId == null) {
|
|
|
- return ResponseJson.error("参数异常:项目仪器Id不能为空!", null);
|
|
|
+ public ResponseJson<PageDetailVo> getEquipmentDetails(Integer equipmentId, Integer userId) {
|
|
|
+ // 项目仪器详情只针对资质机构开放
|
|
|
+ Integer identity = 0;
|
|
|
+ if (null != userId && userId > 0) {
|
|
|
+ // 用户身份:0个人,1协销,2会员机构,3供应商,4普通机构
|
|
|
+ identity = shopMapper.getUserIdentityById(userId);
|
|
|
+ identity = null == identity ? 0 : identity;
|
|
|
+ }
|
|
|
+ boolean flag = (identity == 1 || identity == 2 || identity == 3);
|
|
|
+ if (!flag) {
|
|
|
+ return ResponseJson.success(1, "没有权限查看该项目仪器", new PageDetailVo());
|
|
|
}
|
|
|
//仪器详情
|
|
|
PageDetailVo equipment = pageMapper.getPageDetails(equipmentId, 2);
|