提交
This commit is contained in:
parent
4f27b7dd5a
commit
159c8544e7
@ -13,6 +13,7 @@ import com.cm.common.result.SuccessResult;
|
||||
import com.cm.common.result.SuccessResultData;
|
||||
import com.cm.common.result.SuccessResultList;
|
||||
import com.cm.partybuilding.pojo.dtos.threemeetlesson.ThreeMeetLessonDTO;
|
||||
import com.cm.partybuilding.pojo.dtos.threemeetlesson.ThreeMeetLessonEChartsDTO;
|
||||
import com.cm.partybuilding.pojo.vos.threemeetlesson.ThreeMeetLessonVO;
|
||||
import com.cm.partybuilding.service.threemeetlesson.IThreeMeetLessonService;
|
||||
import io.swagger.annotations.*;
|
||||
@ -111,6 +112,14 @@ public class ThreeMeetLessonController extends AbstractController {
|
||||
return threeMeetLessonService.countThreeMeetLesson(params);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "三会一课数量降序统计", notes = "三会一课数量降序统计接口")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("countthreemeetlessondesc")
|
||||
SuccessResultData<List<ThreeMeetLessonDTO>> countThreeMeetLessonDesc() throws SearchException {
|
||||
Map<String, Object> params = requestParams();
|
||||
return threeMeetLessonService.countThreeMeetLessonDesc(params);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "当前用户id信息", notes = "当前用户id信息接口")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("getcurrentuseridinfo")
|
||||
|
@ -6,6 +6,7 @@ import com.cm.common.exception.SearchException;
|
||||
import com.cm.common.exception.UpdateException;
|
||||
import com.cm.common.result.SuccessResultList;
|
||||
import com.cm.partybuilding.pojo.dtos.threemeetlesson.ThreeMeetLessonDTO;
|
||||
import com.cm.partybuilding.pojo.dtos.threemeetlesson.ThreeMeetLessonEChartsDTO;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
@ -80,4 +81,10 @@ public interface IThreeMeetLessonDao {
|
||||
*/
|
||||
Integer countThreeMeetLesson(Map<String, Object> params) throws SearchException;
|
||||
|
||||
/**
|
||||
* 三会一课图表
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
List<ThreeMeetLessonDTO> countThreeMeetLessonDesc(Map<String, Object> params);
|
||||
}
|
@ -36,6 +36,8 @@ public class ThreeMeetLessonDTO {
|
||||
private String category;
|
||||
@ApiModelProperty(name = "categoryName", value = "类别名称")
|
||||
private String categoryName;
|
||||
@ApiModelProperty(name = "counts", value = "数量")
|
||||
private Integer counts;
|
||||
|
||||
public String getThreeMeetLessonId() {
|
||||
return threeMeetLessonId == null ? "" : threeMeetLessonId;
|
||||
@ -124,4 +126,12 @@ public class ThreeMeetLessonDTO {
|
||||
public void setCategoryName(String categoryName) {
|
||||
this.categoryName = categoryName;
|
||||
}
|
||||
|
||||
public Integer getCounts() {
|
||||
return counts;
|
||||
}
|
||||
|
||||
public void setCounts(Integer counts) {
|
||||
this.counts = counts;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,43 @@
|
||||
package com.cm.partybuilding.pojo.dtos.threemeetlesson;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author xwangs
|
||||
* @create 2020-10-23 16:43
|
||||
* @description
|
||||
*/
|
||||
@ApiModel
|
||||
public class ThreeMeetLessonEChartsDTO {
|
||||
|
||||
@ApiModelProperty(name = "categoryNames", value = "三会一课课程名字")
|
||||
private List<String> categoryNames;
|
||||
@ApiModelProperty(name = "counts", value = "开展会议的数量")
|
||||
private List<Integer> counts;
|
||||
|
||||
public List<String> getCategoryNames() {
|
||||
if (categoryNames == null) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return categoryNames;
|
||||
}
|
||||
|
||||
public void setCategoryNames(List<String> categoryNames) {
|
||||
this.categoryNames = categoryNames;
|
||||
}
|
||||
|
||||
public List<Integer> getCounts() {
|
||||
if (counts == null) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return counts;
|
||||
}
|
||||
|
||||
public void setCounts(List<Integer> counts) {
|
||||
this.counts = counts;
|
||||
}
|
||||
}
|
@ -8,6 +8,7 @@ import com.cm.common.result.SuccessResult;
|
||||
import com.cm.common.result.SuccessResultData;
|
||||
import com.cm.common.result.SuccessResultList;
|
||||
import com.cm.partybuilding.pojo.dtos.threemeetlesson.ThreeMeetLessonDTO;
|
||||
import com.cm.partybuilding.pojo.dtos.threemeetlesson.ThreeMeetLessonEChartsDTO;
|
||||
import com.cm.partybuilding.pojo.vos.threemeetlesson.ThreeMeetLessonVO;
|
||||
|
||||
import java.util.List;
|
||||
@ -153,4 +154,10 @@ public interface IThreeMeetLessonService {
|
||||
*/
|
||||
SuccessResultData<Integer> countThreeMeetLesson(Map<String, Object> params) throws SearchException;
|
||||
|
||||
/**
|
||||
* 三会一课图表
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
SuccessResultData<List<ThreeMeetLessonDTO>> countThreeMeetLessonDesc(Map<String, Object> params);
|
||||
}
|
@ -11,6 +11,7 @@ import com.cm.common.utils.HashMapUtil;
|
||||
import com.cm.common.utils.UUIDUtil;
|
||||
import com.cm.partybuilding.dao.threemeetlesson.IThreeMeetLessonDao;
|
||||
import com.cm.partybuilding.pojo.dtos.threemeetlesson.ThreeMeetLessonDTO;
|
||||
import com.cm.partybuilding.pojo.dtos.threemeetlesson.ThreeMeetLessonEChartsDTO;
|
||||
import com.cm.partybuilding.pojo.vos.threemeetlesson.ThreeMeetLessonVO;
|
||||
import com.cm.partybuilding.service.threemeetlesson.IThreeMeetLessonService;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
@ -18,6 +19,7 @@ import com.github.pagehelper.PageInfo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -183,6 +185,12 @@ public class ThreeMeetLessonServiceImpl extends AbstractService implements IThre
|
||||
return count == null ? 0 : count;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SuccessResultData<List<ThreeMeetLessonDTO>> countThreeMeetLessonDesc(Map<String, Object> params) {
|
||||
List<ThreeMeetLessonDTO> dtos = threeMeetLessonDao.countThreeMeetLessonDesc(params);
|
||||
return new SuccessResultData<>(dtos);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SuccessResultData<Integer> countThreeMeetLesson(Map<String, Object> params) throws SearchException {
|
||||
return new SuccessResultData<>(countNumberThreeMeetLesson(params));
|
||||
|
@ -14,6 +14,7 @@
|
||||
<result column="files" property="files"/>
|
||||
<result column="category" property="category"/>
|
||||
<result column="category_name" property="categoryName"/>
|
||||
<result column="counts" property="counts"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 新增 -->
|
||||
@ -195,4 +196,20 @@
|
||||
t1.is_delete = 0
|
||||
</select>
|
||||
|
||||
<!--三会一课降序-->
|
||||
<select id="countThreeMeetLessonDesc" parameterType="map" resultMap="threeMeetLessonDTO">
|
||||
SELECT
|
||||
t1.category_name,
|
||||
count(t1.category) counts
|
||||
FROM
|
||||
gen_three_meet_lesson t1
|
||||
WHERE
|
||||
t1.is_delete = '0'
|
||||
<if test="category !=null and category != ''">
|
||||
AND t1.category = #{category}
|
||||
</if>
|
||||
GROUP BY
|
||||
t1.category
|
||||
ORDER BY counts DESC
|
||||
</select>
|
||||
</mapper>
|
Loading…
Reference in New Issue
Block a user