update code
parent
c470afad2a
commit
423d77a86c
|
@ -36,4 +36,19 @@ public class ProjectPhotographyController extends BaseController {
|
||||||
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
|
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
|
||||||
return AjaxResult.success(list);
|
return AjaxResult.success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/selectLastPhotography")
|
||||||
|
public AjaxResult getLast(long projectId){
|
||||||
|
SurProjectPhotography where =new SurProjectPhotography();
|
||||||
|
where.setProjectId(projectId);
|
||||||
|
where.setIsDel(0l);
|
||||||
|
String key="bgscreen_selectLastPhotography_listPhotography_"+where.getProjectId();
|
||||||
|
Object obj=redisCache.getCacheObject(key);
|
||||||
|
if(obj!=null){
|
||||||
|
return AjaxResult.success(obj);
|
||||||
|
}
|
||||||
|
List<SurProjectPhotography> list=photographyService.selectLastPhotography(where);
|
||||||
|
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
|
||||||
|
return AjaxResult.success(list);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ import com.ruoyi.common.constant.Constants;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.domain.entity.SysDictData;
|
import com.ruoyi.common.core.domain.entity.SysDictData;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.core.redis.RedisCache;
|
import com.ruoyi.common.core.redis.RedisCache;
|
||||||
import com.ruoyi.common.utils.SecurityUtils;
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
import com.yanzhu.jh.project.domain.SurProjectStandard;
|
import com.yanzhu.jh.project.domain.SurProjectStandard;
|
||||||
|
@ -38,6 +39,20 @@ public class ProjectStandardController extends BaseController {
|
||||||
return AjaxResult.success(list);
|
return AjaxResult.success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/selectList")
|
||||||
|
public TableDataInfo selectList(@RequestBody SurProjectStandard where){
|
||||||
|
startPage();
|
||||||
|
Long deptId= where.getDeptId();
|
||||||
|
if(deptId==null || deptId<=0){
|
||||||
|
if (SecurityUtils.isUserB()) {
|
||||||
|
where.setPrjIds(getProjectIds());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
List<SurProjectStandard> list=standardService.selectList(where);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("/groupByType")
|
@PostMapping("/groupByType")
|
||||||
public AjaxResult groupByType(@RequestBody SurProjectStandard where){
|
public AjaxResult groupByType(@RequestBody SurProjectStandard where){
|
||||||
|
|
|
@ -63,5 +63,7 @@ public interface SurProjectStandardMapper
|
||||||
|
|
||||||
public List<SysDictData> groupByType(SurProjectStandard where);
|
public List<SysDictData> groupByType(SurProjectStandard where);
|
||||||
|
|
||||||
List<SurProjectStandard> groupByProject();
|
public List<SurProjectStandard> groupByProject();
|
||||||
|
|
||||||
|
public List<SurProjectStandard> selectList(SurProjectStandard where);
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,4 +66,6 @@ public interface ISurProjectStandardService
|
||||||
public List<SysDictData> groupByType(SurProjectStandard where);
|
public List<SysDictData> groupByType(SurProjectStandard where);
|
||||||
|
|
||||||
public List<SurProjectStandard> groupByProject();
|
public List<SurProjectStandard> groupByProject();
|
||||||
|
|
||||||
|
public List<SurProjectStandard> selectList(SurProjectStandard where);
|
||||||
}
|
}
|
||||||
|
|
|
@ -123,4 +123,9 @@ public class SurProjectStandardServiceImpl implements ISurProjectStandardService
|
||||||
public List<SurProjectStandard> groupByProject() {
|
public List<SurProjectStandard> groupByProject() {
|
||||||
return surProjectStandardMapper.groupByProject();
|
return surProjectStandardMapper.groupByProject();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SurProjectStandard> selectList(SurProjectStandard where) {
|
||||||
|
return surProjectStandardMapper.selectList(where);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,4 +58,6 @@ public interface SurProjectPhotographyMapper
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteSurProjectPhotographyByIds(Long[] ids);
|
public int deleteSurProjectPhotographyByIds(Long[] ids);
|
||||||
|
|
||||||
|
public List<SurProjectPhotography> selectLastPhotography(SurProjectPhotography where);
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,4 +58,6 @@ public interface ISurProjectPhotographyService
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteSurProjectPhotographyById(Long id);
|
public int deleteSurProjectPhotographyById(Long id);
|
||||||
|
|
||||||
|
public List<SurProjectPhotography> selectLastPhotography(SurProjectPhotography where);
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,4 +92,9 @@ public class SurProjectPhotographyServiceImpl implements ISurProjectPhotographyS
|
||||||
{
|
{
|
||||||
return surProjectPhotographyMapper.deleteSurProjectPhotographyById(id);
|
return surProjectPhotographyMapper.deleteSurProjectPhotographyById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SurProjectPhotography> selectLastPhotography(SurProjectPhotography where) {
|
||||||
|
return surProjectPhotographyMapper.selectLastPhotography(where);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -128,4 +128,19 @@
|
||||||
order by a.cnt desc
|
order by a.cnt desc
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectList" parameterType="SurProjectStandard" resultMap="SurProjectStandardResult">
|
||||||
|
<include refid="selectSurProjectStandardVo"/>
|
||||||
|
where is_del =0
|
||||||
|
<if test="projectId!=null and projectId>0"> and project_id=#{projectId}</if>
|
||||||
|
<if test="deptId!=null and deptId>0">
|
||||||
|
and project_id in (SELECT id FROM sur_project WHERE deptid= #{deptId})
|
||||||
|
</if>
|
||||||
|
<if test="prjIds !=null and prjIds.size()>0">
|
||||||
|
and project_id in
|
||||||
|
<foreach collection="prjIds" item="item" index="index" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="standardType!=null and standardType>0"> and standard_type=#{standardType}</if>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
|
@ -43,6 +43,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectLastPhotography" parameterType="SurProjectPhotography" resultMap="SurProjectPhotographyResult">
|
||||||
|
<include refid="selectSurProjectPhotographyVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="projectId != null "> and project_id = #{projectId}</if>
|
||||||
|
<if test="isDel != null "> and is_del = #{isDel}</if>
|
||||||
|
</where>
|
||||||
|
ORDER BY video_date DESC LIMIT 0,1
|
||||||
|
</select>
|
||||||
|
|
||||||
<insert id="insertSurProjectPhotography" parameterType="SurProjectPhotography" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insertSurProjectPhotography" parameterType="SurProjectPhotography" useGeneratedKeys="true" keyProperty="id">
|
||||||
insert into sur_project_photography
|
insert into sur_project_photography
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
|
Loading…
Reference in New Issue