Browse Source

积分记录

feature/dangjian
wanggongfeng 4 years ago
parent
commit
93aa44cb28
  1. 11
      esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/controller/ActivePointLogController.java
  2. 9
      esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/dao/ActivePointLogDao.java
  3. 7
      esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/service/ActivePointLogService.java
  4. 13
      esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/service/impl/ActivePointLogServiceImpl.java
  5. 29
      esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/resources/mapper/ActivePointLogDao.xml

11
esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/controller/ActivePointLogController.java

@ -120,4 +120,15 @@ public class ActivePointLogController {
public Result<String> getIsSignIn(@RequestBody PointLogFormDTO pointLogFormDTO) {
return new Result<String>().ok(activePointLogService.getIsSignIn(pointLogFormDTO));
}
/**
* 获取积分总数
* @param params
* @return
*/
@GetMapping("getTotal")
public Result<Integer> getTotal(@RequestParam Map<String, Object> params) {
Integer total = activePointLogService.getTotal(params);
return new Result<Integer>().ok(total);
}
}

9
esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/dao/ActivePointLogDao.java

@ -73,4 +73,13 @@ public interface ActivePointLogDao extends BaseDao<ActivePointLogEntity> {
* @date 2021/9/29 16:31
*/
Integer selectIsSignIn(PointLogFormDTO pointLogFormDTO);
/**
* 获取积分总数
*
* @param params
* @return
*/
Integer getTotal(Map<String, Object> params);
}

7
esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/service/ActivePointLogService.java

@ -118,4 +118,11 @@ public interface ActivePointLogService extends BaseService<ActivePointLogEntity>
* @date 2021/9/29 16:30
*/
String getIsSignIn(PointLogFormDTO pointLogFormDTO);
/**
* 获取积分总数
* @param params
* @return
*/
Integer getTotal(Map<String, Object> params);
}

13
esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/service/impl/ActivePointLogServiceImpl.java

@ -216,4 +216,17 @@ public class ActivePointLogServiceImpl extends BaseServiceImpl<ActivePointLogDao
return "0";
}
}
/**
* 获取积分总数
*
* @param params
* @return
*/
@Override
public Integer getTotal(Map<String, Object> params) {
Integer total = baseDao.getTotal(params);
return total;
}
}

29
esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/resources/mapper/ActivePointLogDao.xml

@ -56,6 +56,12 @@
<if test="deptId != null and deptId != ''">
and FIND_IN_SET( #{deptId}, ALL_DEPT_IDS )
</if>
<if test="mobile != null and mobile != ''">
and MOBILE like '%' #{mobile} '%'
</if>
<if test="operationDesc != null and operationDesc != ''">
and OPERATION_DESC like '%' #{operationDesc} '%'
</if>
order by UPDATED_TIME desc
</select>
@ -102,5 +108,28 @@
AND lg.DEL_FLAG = '0'
AND DATE_FORMAT(lg.CREATED_TIME, '%Y%m%d') =DATE_FORMAT(NOW(), '%Y%m%d')
</select>
<select id="getTotal" resultType="java.lang.Integer">
select
sum(POINTS) total
from epdc_active_point_log
where DEL_FLAG = '0'
<if test="operationType != null and operationType != ''">
and OPERATION_TYPE = #{operationType}
</if>
<if test="userName != null and userName != ''">
and USER_NAME like '%' #{userName} '%'
</if>
<if test="deptId != null and deptId != ''">
and FIND_IN_SET( #{deptId}, ALL_DEPT_IDS )
</if>
<if test="mobile != null and mobile != ''">
and MOBILE like '%' #{mobile} '%'
</if>
<if test="operationDesc != null and operationDesc != ''">
and OPERATION_DESC like '%' #{operationDesc} '%'
</if>
</select>
</mapper>

Loading…
Cancel
Save