update code
parent
3564e8926d
commit
7a4f736b2d
|
@ -0,0 +1,34 @@
|
||||||
|
package com.yanzhu.jh.bigscreen.web.controller;
|
||||||
|
|
||||||
|
import com.ruoyi.common.constant.Constants;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.core.redis.RedisCache;
|
||||||
|
import com.yanzhu.jh.video.domain.SurProjectPhotography;
|
||||||
|
import com.yanzhu.jh.video.service.ISurProjectPhotographyService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/bgscreen/photography")
|
||||||
|
public class ProjectPhotographyController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
ISurProjectPhotographyService photographyService;
|
||||||
|
@Autowired
|
||||||
|
private RedisCache redisCache;
|
||||||
|
public AjaxResult listPhotography(SurProjectPhotography where){
|
||||||
|
String key="bgscreen_photography_listPhotography_"+where.getProjectId();
|
||||||
|
Object obj=redisCache.getCacheObject(key);
|
||||||
|
if(obj!=null){
|
||||||
|
return AjaxResult.success(obj);
|
||||||
|
}
|
||||||
|
List<SurProjectPhotography> list=photographyService.selectSurProjectPhotographyList(where);
|
||||||
|
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
|
||||||
|
return AjaxResult.success(list);
|
||||||
|
}
|
||||||
|
}
|
|
@ -35,6 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="createDate != null "> and create_date = #{createDate}</if>
|
<if test="createDate != null "> and create_date = #{createDate}</if>
|
||||||
<if test="updateDate != null "> and update_date = #{updateDate}</if>
|
<if test="updateDate != null "> and update_date = #{updateDate}</if>
|
||||||
</where>
|
</where>
|
||||||
|
order by video_date
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectSurProjectPhotographyById" parameterType="Long" resultMap="SurProjectPhotographyResult">
|
<select id="selectSurProjectPhotographyById" parameterType="Long" resultMap="SurProjectPhotographyResult">
|
||||||
|
|
Loading…
Reference in New Issue