Browse Source

启动页管理新加排序 接口返回列表

feature/syp_points
songyunpeng 5 years ago
parent
commit
ab30fb1668
  1. 4
      esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/StartupPageDTO.java
  2. 8
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/StartupController.java
  3. 2
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/dao/StartupPageDao.java
  4. 5
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/entity/StartupPageEntity.java
  5. 2
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/StartupPageService.java
  6. 2
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/StartupPageServiceImpl.java
  7. 7
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/resources/mapper/StartupPageDao.xml

4
esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/StartupPageDTO.java

@ -48,6 +48,10 @@ public class StartupPageDTO implements Serializable {
* 图片地址 - 前台展示使用
*/
private List<String> imgUrlList;
/**
* 排序
*/
private Integer sort;
/**
* 停留时长 单位

8
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/StartupController.java

@ -25,6 +25,8 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* @Description 启动页管理 启动页管理
* @Author songyunpeng
@ -45,8 +47,8 @@ public class StartupController {
* @Param []
**/
@GetMapping("getStartupPage")
public Result<StartupPageResultDTO> getStartupPage() {
StartupPageResultDTO data = startupPageService.getStartupPage();
return new Result<StartupPageResultDTO>().ok(data);
public Result<List<StartupPageResultDTO>> getStartupPage() {
List<StartupPageResultDTO> data = startupPageService.getStartupPage();
return new Result<List<StartupPageResultDTO>>().ok(data);
}
}

2
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/dao/StartupPageDao.java

@ -49,5 +49,5 @@ public interface StartupPageDao extends BaseDao<StartupPageEntity> {
* @Param []
* @return com.elink.esua.dto.StartupPageDTO
**/
StartupPageResultDTO getStartupPage();
List<StartupPageResultDTO> getStartupPage();
}

5
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/entity/StartupPageEntity.java

@ -34,6 +34,11 @@ public class StartupPageEntity extends BaseEpdcEntity {
private static final long serialVersionUID = 1L;
/**
* 排序
*/
private Integer sort;
/**
* 图片地址
*/

2
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/StartupPageService.java

@ -109,5 +109,5 @@ public interface StartupPageService extends BaseService<StartupPageEntity> {
* @Date 2020/3/24
* @Param []
**/
StartupPageResultDTO getStartupPage();
List<StartupPageResultDTO> getStartupPage();
}

2
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/StartupPageServiceImpl.java

@ -111,7 +111,7 @@ public class StartupPageServiceImpl extends BaseServiceImpl<StartupPageDao, Star
}
@Override
public StartupPageResultDTO getStartupPage() {
public List<StartupPageResultDTO> getStartupPage() {
return baseDao.getStartupPage();
}

7
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/resources/mapper/StartupPageDao.xml

@ -18,17 +18,16 @@
</resultMap>
<select id="selectListOfStartupPageDTO" resultType="com.elink.esua.epdc.dto.StartupPageDTO">
select ID,IMG_URL,DURATION,ENABLE_FLAG,REMARK,CREATED_TIME,UPDATED_TIME
select ID,IMG_URL,DURATION,ENABLE_FLAG,REMARK,SORT,CREATED_TIME,UPDATED_TIME
from epdc_startup_page
where DEL_FLAG = '0'
order by CREATED_TIME desc
order by SORT asc ,CREATED_TIME desc
</select>
<select id="getStartupPage" resultType="com.elink.esua.epdc.dto.result.StartupPageResultDTO">
select ID,IMG_URL,DURATION
from epdc_startup_page
where ENABLE_FLAG = '1' and DEL_FLAG = '0'
order by UPDATED_TIME desc
limit 1
order by SORT asc, UPDATED_TIME desc
</select>
</mapper>
Loading…
Cancel
Save