Browse Source

Merge remote-tracking branch 'origin/feature/points' into feature/points

feature/syp_points
liuchuang 5 years ago
parent
commit
fa6a02bc61
  1. 8
      esua-epdc/epdc-module/epdc-news/epdc-news-server/src/main/resources/mapper/NewsCategoryDao.xml
  2. 13
      esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/dao/PointsLogsDao.java
  3. 8
      esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/service/impl/PointsLogsServiceImpl.java
  4. 21
      esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/resources/mapper/PointsLogsDao.xml

8
esua-epdc/epdc-module/epdc-news/epdc-news-server/src/main/resources/mapper/NewsCategoryDao.xml

@ -20,7 +20,7 @@
SELECT
COUNT(CATEGORY_CODE) AS codeCount
FROM
esua_epdc_news.epdc_news_category
epdc_news_category
WHERE
CATEGORY_CODE = #{categoryCode}
<if test="id!=null and id!=''">
@ -32,7 +32,7 @@
SELECT
COUNT(CATEGORY_NAME) AS codeCount
FROM
esua_epdc_news.epdc_news_category
epdc_news_category
WHERE
CATEGORY_NAME = #{categoryName}
<if test="id!=null and id!=''">
@ -41,6 +41,6 @@
AND DEL_FLAG= '0'
</select>
<select id="selectListCategory" resultType="Map">
SELECT ID as id,CATEGORY_NAME as name FROM esua_epdc_news.epdc_news_category where DEL_FLAG= '0'
SELECT ID as id,CATEGORY_NAME as name FROM epdc_news_category where DEL_FLAG= '0'
</select>
</mapper>
</mapper>

13
esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/dao/PointsLogsDao.java

@ -18,9 +18,9 @@
package com.elink.esua.epdc.dao;
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
import com.elink.esua.epdc.dto.PointsLogsDTO;
import com.elink.esua.epdc.dto.form.PointsLogsFormDTO;
import com.elink.esua.epdc.dto.result.PointsLogsResultDTO;
import com.elink.esua.epdc.dto.result.PointsLogsSumResultDTO;
import com.elink.esua.epdc.dto.form.EpdcAppPointsRankingFormDTO;
import com.elink.esua.epdc.dto.form.EpdcAppPointsRecordFormDTO;
import com.elink.esua.epdc.dto.result.EpdcAppPointsRankingResultDTO;
@ -29,6 +29,7 @@ import com.elink.esua.epdc.entity.PointsLogsEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import java.util.Map;
/**
* 积分记录表 积分记录表
@ -90,4 +91,14 @@ public interface PointsLogsDao extends BaseDao<PointsLogsEntity> {
* @Date: 2020-04-30
*/
List<EpdcAppPointsRankingResultDTO> selectListPointsRanking(EpdcAppPointsRankingFormDTO formDto);
/**
* 志愿者管理 积分记录页面分页查询
* @param params
* param userId 必选 用户ID
* @return java.util.List<com.elink.esua.epdc.dto.PointsLogsDTO>
* @Author zhangyong
* @Date 15:31 2020-05-12
**/
List<PointsLogsDTO> selectListVolunteerPointsLog(Map<String, Object> params);
}

8
esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/service/impl/PointsLogsServiceImpl.java

@ -77,11 +77,9 @@ public class PointsLogsServiceImpl extends BaseServiceImpl<PointsLogsDao, Points
@Override
public PageData<PointsLogsDTO> page(Map<String, Object> params) {
IPage<PointsLogsEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, PointsLogsDTO.class);
IPage<PointsLogsDTO> page = getPage(params);
List<PointsLogsDTO> list = baseDao.selectListVolunteerPointsLog(params);
return new PageData<>(list, page.getTotal());
}
@Override

21
esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/resources/mapper/PointsLogsDao.xml

@ -107,4 +107,25 @@
) tab ORDER BY (tab.totalPointsAdd - tab.totalPointsDeducted) DESC
LIMIT #{pageIndex}, #{pageSize}
</select>
<select id="selectListVolunteerPointsLog" resultType="com.elink.esua.epdc.dto.PointsLogsDTO">
SELECT
l.OPERATION_DESC operationDesc,
b.BEHAVIOR_DESC behaviorCode,
l.OPERATION_TIME operationTime,
l.POINTS points,
l.OPERATION_TYPE operationType,
l.LAVE_POINTS lavePoints
FROM
epdc_points_logs l
LEFT JOIN epdc_points_behavior b ON l.BEHAVIOR_CODE = b.BEHAVIOR_CODE AND b.DEL_FLAG = 0
WHERE
l.DEL_FLAG = 0
AND l.USER_ID = #{userId}
<if test="behaviorCode != null and behaviorCode != ''">
AND l.BEHAVIOR_CODE = #{behaviorCode}
</if>
ORDER BY
l.CREATED_TIME DESC
</select>
</mapper>

Loading…
Cancel
Save