Browse Source

修改统计的sql

master
yujt 5 years ago
parent
commit
8b7bc5c667
  1. 6
      epdc-cloud-points/doc/db/update.sql
  2. 11
      epdc-cloud-points/src/main/java/com/elink/esua/epdc/controller/PointsController.java
  3. 4
      epdc-cloud-points/src/main/resources/mapper/PointsLogsDao.xml

6
epdc-cloud-points/doc/db/update.sql

@ -42,10 +42,14 @@ INSERT INTO `yushan_esua_epdc_admin`.`sys_menu`(`id`, `pid`, `url`, `type`, `ico
INSERT INTO `yushan_esua_epdc_admin`.`sys_menu`(`id`, `pid`, `url`, `type`, `icon`, `permissions`, `sort`, `del_flag`, `creator`, `create_date`, `updater`, `update_date`, `menu_code`) VALUES (1269822121383952385, 1206897458051846146, 'api/residentconfig', 0, 'icon-project', '', 5, 0, 1257845225805033473, '2020-06-08 10:42:41', 1257845225805033473, '2020-06-08 10:42:41', '');
INSERT INTO `yushan_esua_epdc_admin`.`sys_language`(`table_name`, `table_id`, `field_name`, `field_value`, `language`) VALUES ('sys_menu', 1269822121383952385, 'name', '居民端配置', 'zh-CN');
--- 通知模块
--- 新闻通知模块
ALTER TABLE epdc_notice ADD COLUMN `EXTEND_FLAG` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '通知扩展标记 0普通通知 1模块规则';
---- 用户模块
ALTER TABLE epdc_user ADD COLUMN `POINTS_TOTLE` int(11) NULL DEFAULT NULL COMMENT '用户累计积分';

11
epdc-cloud-points/src/main/java/com/elink/esua/epdc/controller/PointsController.java

@ -1,19 +1,8 @@
package com.elink.esua.epdc.controller;
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
import com.elink.esua.epdc.dto.PointsLogsDTO;
import com.elink.esua.epdc.dto.form.PointsLogsAddFormDTO;
import com.elink.esua.epdc.dto.form.PointsLogsFormDTO;
import com.elink.esua.epdc.dto.result.BehaviorResultDto;
import com.elink.esua.epdc.dto.result.PointsLogsResultDTO;
import com.elink.esua.epdc.dto.result.PointsLogsSumResultDTO;
import com.elink.esua.epdc.dto.result.PointsRuleResultDTO;
import com.elink.esua.epdc.entity.PointsLogsEntity;
import com.elink.esua.epdc.service.PointsBehaviorService;
import com.elink.esua.epdc.service.PointsLogsService;
import com.elink.esua.epdc.service.PointsRuleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

4
epdc-cloud-points/src/main/resources/mapper/PointsLogsDao.xml

@ -60,10 +60,10 @@
and OPERATION_TIME between date_add(now() , interval -1 hour ) and now()
</if>
<if test="operationFlag == 2">
and date_format(OPERATION_TIME,'%d') = date_format(now(),'%d')
and date_format(OPERATION_TIME,'%Y-%m-%d') = date_format(now(),'%Y-%m-%d')
</if>
<if test="operationFlag == 3">
and date_format(OPERATION_TIME,'%m') = date_format(now(),'%m')
and date_format(OPERATION_TIME,'%Y-%m') = date_format(now(),'%Y-%m')
</if>
<if test="operationFlag == 4">
and date_format(OPERATION_TIME,'%Y') = date_format(now(),'%Y')

Loading…
Cancel
Save