|
@@ -9,6 +9,7 @@ import com.huaxu.model.AjaxMessage;
|
|
import com.huaxu.model.LoginUser;
|
|
import com.huaxu.model.LoginUser;
|
|
import com.huaxu.model.ResultStatus;
|
|
import com.huaxu.model.ResultStatus;
|
|
import com.huaxu.util.UserUtil;
|
|
import com.huaxu.util.UserUtil;
|
|
|
|
+import org.apache.ibatis.annotations.Param;
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
@@ -40,7 +41,7 @@ public class SceneService extends ServiceImpl<SceneMapper, SceneEntity> {
|
|
/**
|
|
/**
|
|
* 自定义分页查询,含关联实体对像
|
|
* 自定义分页查询,含关联实体对像
|
|
*/
|
|
*/
|
|
- public IPage<SceneEntity> findPage(IPage<SceneEntity> page,SceneEntity sceneEntity) {
|
|
|
|
|
|
+ public IPage<SceneEntity> findPage(IPage<SceneEntity> page, SceneEntity sceneEntity) {
|
|
LoginUser currentUser = UserUtil.getCurrentUser();
|
|
LoginUser currentUser = UserUtil.getCurrentUser();
|
|
sceneEntity.setTenantId(currentUser.getTenantId());
|
|
sceneEntity.setTenantId(currentUser.getTenantId());
|
|
sceneEntity.setProgramItems(currentUser.getProgramItemList());
|
|
sceneEntity.setProgramItems(currentUser.getProgramItemList());
|
|
@@ -80,6 +81,7 @@ public class SceneService extends ServiceImpl<SceneMapper, SceneEntity> {
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 查列表
|
|
* 查列表
|
|
*/
|
|
*/
|
|
@@ -141,6 +143,8 @@ public class SceneService extends ServiceImpl<SceneMapper, SceneEntity> {
|
|
* 修改根居ID
|
|
* 修改根居ID
|
|
*/
|
|
*/
|
|
public boolean updateSceneById(SceneEntity scene) {
|
|
public boolean updateSceneById(SceneEntity scene) {
|
|
|
|
+ LoginUser currentUser = UserUtil.getCurrentUser();
|
|
|
|
+ scene.setUpdateBy(currentUser.getName());
|
|
if (this.updateById(scene)) {
|
|
if (this.updateById(scene)) {
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
@@ -153,4 +157,8 @@ public class SceneService extends ServiceImpl<SceneMapper, SceneEntity> {
|
|
public SceneEntity findSceneById(Long id) {
|
|
public SceneEntity findSceneById(Long id) {
|
|
return sceneMapper.findSceneById(id);
|
|
return sceneMapper.findSceneById(id);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ public List<SceneEntity> findBySceneTypeIds(Long[] Ids) {
|
|
|
|
+ return sceneMapper.findBySceneTypeIds(Ids);
|
|
|
|
+ }
|
|
}
|
|
}
|