91 changed files with 2641 additions and 371 deletions
@ -1,4 +1,4 @@ |
|||
package com.epmet.dto.stats; |
|||
package com.epmet.dto.voice; |
|||
/** |
|||
* @author jianjun liu |
|||
* @email liujianjun@yunzongnet.com |
@ -0,0 +1,44 @@ |
|||
package com.epmet.dto.voice; |
|||
/** |
|||
* @author jianjun liu |
|||
* @email liujianjun@yunzongnet.com |
|||
* @date 2020-06-17 16:43 |
|||
**/ |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* desc:每个发布者发布的文章数 返回结果 dto |
|||
* |
|||
* @author liujianjun |
|||
* @date 2020/6/19 10:43 |
|||
*/ |
|||
@Data |
|||
public class PublisherPublishedCountDTO implements Serializable { |
|||
private static final long serialVersionUID = 6755654148306711602L; |
|||
|
|||
/** |
|||
* 客户id |
|||
*/ |
|||
private String customerId; |
|||
/** |
|||
* 机关id |
|||
*/ |
|||
private String agencyId; |
|||
/** |
|||
* 网格Id |
|||
*/ |
|||
private String gridId; |
|||
/** |
|||
* 发布者Id publish_type类型为 部门时 是部门id;类型为 机关时 是机关Id |
|||
*/ |
|||
private String publisherId; |
|||
|
|||
/** |
|||
* 发布文章数 |
|||
*/ |
|||
private Integer publishedCount; |
|||
|
|||
} |
@ -0,0 +1,46 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dao.voice; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.voice.ArticleTagsEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 文章标签表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-17 |
|||
*/ |
|||
@Mapper |
|||
public interface ArticleTagsDao extends BaseDao<ArticleTagsEntity> { |
|||
|
|||
/** |
|||
* desc:根据客户id 创建时间 获取文章标签数据 |
|||
* |
|||
* @param customerId |
|||
* @param startTime |
|||
* @param endTime |
|||
* @return |
|||
*/ |
|||
List<ArticleTagsEntity> getArticleTagsByDay(@Param("customerId") String customerId, @Param("startTime") Date startTime, @Param("endTime") Date endTime); |
|||
} |
@ -0,0 +1,58 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.entity.voice; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
/** |
|||
* 文章标签表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-17 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("article_tags") |
|||
public class ArticleTagsEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 文章ID |
|||
*/ |
|||
private String articleId; |
|||
|
|||
/** |
|||
* 标签ID |
|||
*/ |
|||
private String tagId; |
|||
|
|||
/** |
|||
* 标签名称 |
|||
*/ |
|||
private String tagName; |
|||
|
|||
} |
@ -0,0 +1,50 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service.stats; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.entity.stats.FactTagUsedAgencyDailyEntity; |
|||
import com.epmet.entity.stats.FactTagUsedGridDailyEntity; |
|||
|
|||
import java.util.Collection; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 标签【机关】日统计表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-18 |
|||
*/ |
|||
public interface FactTagUsedAgencyDailyService extends BaseService<FactTagUsedAgencyDailyEntity> { |
|||
/** |
|||
* desc:删除并插入数据 |
|||
* @param customerId |
|||
* @param dateId |
|||
* @param values |
|||
* @return |
|||
*/ |
|||
boolean deleteAndInsertBatch(String customerId, String dateId, Collection<FactTagUsedAgencyDailyEntity> values); |
|||
|
|||
/** |
|||
* desc:根据月份获取 机关汇总数据 |
|||
* @param customerId |
|||
* @param monthId |
|||
* @return |
|||
*/ |
|||
List<FactTagUsedGridDailyEntity> getTagUsedCountByMonth(String customerId, String monthId); |
|||
} |
@ -0,0 +1,39 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service.stats; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.entity.stats.FactTagUsedAgencyMonthlyEntity; |
|||
import com.epmet.entity.stats.FactTagUsedGridMonthlyEntity; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 标签【机关】月统计表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-18 |
|||
*/ |
|||
public interface FactTagUsedAgencyMonthlyService extends BaseService<FactTagUsedAgencyMonthlyEntity> { |
|||
|
|||
List<FactTagUsedGridMonthlyEntity> getTagUsedCountByYearId(String customerId, String monthId); |
|||
|
|||
List<FactTagUsedGridMonthlyEntity> getTagUsedCountByQuarterId(String customerId, String quarterId); |
|||
|
|||
Boolean deleteAndInsertByMonthId(String customerId, String monthId, List<FactTagUsedAgencyMonthlyEntity> agencyMonthlyList); |
|||
} |
@ -0,0 +1,35 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service.stats; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.entity.stats.FactTagUsedAgencyQuarterlyEntity; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 标签【机关】季度统计表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-18 |
|||
*/ |
|||
public interface FactTagUsedAgencyQuarterlyService extends BaseService<FactTagUsedAgencyQuarterlyEntity> { |
|||
|
|||
|
|||
boolean deleteAndInsertByQuarterId(String customerId, String quarterId, List<FactTagUsedAgencyQuarterlyEntity> agencyQuarterlyList); |
|||
} |
@ -0,0 +1,33 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service.stats; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.entity.stats.FactTagUsedAgencyYearlyEntity; |
|||
|
|||
/** |
|||
* 标签【机关】年度统计表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-18 |
|||
*/ |
|||
public interface FactTagUsedAgencyYearlyService extends BaseService<FactTagUsedAgencyYearlyEntity> { |
|||
|
|||
int deleteByYearId(String customerId,String yearId); |
|||
|
|||
} |
@ -0,0 +1,49 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service.stats; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.entity.stats.FactTagUsedDepartmentDailyEntity; |
|||
|
|||
import java.util.Collection; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 标签【部门】日统计表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-18 |
|||
*/ |
|||
public interface FactTagUsedDepartmentDailyService extends BaseService<FactTagUsedDepartmentDailyEntity> { |
|||
/** |
|||
* desc:删除并插入数据 |
|||
* @param customerId |
|||
* @param dateId |
|||
* @param values |
|||
* @return |
|||
*/ |
|||
boolean deleteAndInsertBatch(String customerId, String dateId, Collection<FactTagUsedDepartmentDailyEntity> values); |
|||
|
|||
/** |
|||
* desc:根据客户Id,月份Id 按照部门Id 标签Id分组 |
|||
* @param customerId |
|||
* @param monthId |
|||
* @return |
|||
*/ |
|||
List<FactTagUsedDepartmentDailyEntity> getTagUsedCountByMonth(String customerId, String monthId); |
|||
} |
@ -0,0 +1,38 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service.stats; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.entity.stats.FactTagUsedDepartmentMonthlyEntity; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 标签【部门】月统计表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-18 |
|||
*/ |
|||
public interface FactTagUsedDepartmentMonthlyService extends BaseService<FactTagUsedDepartmentMonthlyEntity> { |
|||
|
|||
List<FactTagUsedDepartmentMonthlyEntity> getTagUsedCountByYearId(String customerId, String monthId); |
|||
|
|||
List<FactTagUsedDepartmentMonthlyEntity> getTagUsedCountByQuarterId(String customerId, String quarterId); |
|||
|
|||
Boolean deleteAndInsertByMonthId(String customerId, String monthId, List<FactTagUsedDepartmentMonthlyEntity> gridMonthlyList); |
|||
} |
@ -0,0 +1,35 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service.stats; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.entity.stats.FactTagUsedDepartmentQuarterlyEntity; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 标签【部门】季度统计表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-18 |
|||
*/ |
|||
public interface FactTagUsedDepartmentQuarterlyService extends BaseService<FactTagUsedDepartmentQuarterlyEntity> { |
|||
|
|||
|
|||
Boolean deleteAndInsertByQuarterId(String customerId, String quarterId, List<FactTagUsedDepartmentQuarterlyEntity> deptQuarterlyList); |
|||
} |
@ -0,0 +1,33 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service.stats; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.entity.stats.FactTagUsedDepartmentYearlyEntity; |
|||
|
|||
/** |
|||
* 标签【部门】年度统计表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-18 |
|||
*/ |
|||
public interface FactTagUsedDepartmentYearlyService extends BaseService<FactTagUsedDepartmentYearlyEntity> { |
|||
|
|||
|
|||
Integer deleteByYearId(String customerId, String yearId); |
|||
} |
@ -0,0 +1,50 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service.stats; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.entity.stats.FactTagUsedGridDailyEntity; |
|||
|
|||
import java.util.Collection; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 标签【网格】日统计表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-18 |
|||
*/ |
|||
public interface FactTagUsedGridDailyService extends BaseService<FactTagUsedGridDailyEntity> { |
|||
|
|||
/** |
|||
* desc:删除并插入数据 |
|||
* @param customerId |
|||
* @param dateId |
|||
* @param values |
|||
* @return |
|||
*/ |
|||
boolean deleteAndInsertBatch(String customerId, String dateId, Collection<FactTagUsedGridDailyEntity> values); |
|||
|
|||
/** |
|||
* desc:根据客户Id 获取网格 某月数据,按照网格分组 |
|||
* @param customerId |
|||
* @param monthId |
|||
* @return |
|||
*/ |
|||
List<FactTagUsedGridDailyEntity> getTagUsedCountByMonth(String customerId, String monthId); |
|||
} |
@ -0,0 +1,38 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service.stats; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.entity.stats.FactTagUsedGridMonthlyEntity; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 标签【网格】月统计表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-18 |
|||
*/ |
|||
public interface FactTagUsedGridMonthlyService extends BaseService<FactTagUsedGridMonthlyEntity> { |
|||
|
|||
List<FactTagUsedGridMonthlyEntity> getTagUsedCountByYearId(String customerId, String monthId); |
|||
|
|||
List<FactTagUsedGridMonthlyEntity> getTagUsedCountByQuarterId(String customerId, String quarterId); |
|||
|
|||
Boolean deleteAndInsertByMonthId(String customerId, String monthId, List<FactTagUsedGridMonthlyEntity> gridMonthlyList); |
|||
} |
@ -0,0 +1,34 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service.stats; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.entity.stats.FactTagUsedGridQuarterlyEntity; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 标签【网格】季度统计表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-18 |
|||
*/ |
|||
public interface FactTagUsedGridQuarterlyService extends BaseService<FactTagUsedGridQuarterlyEntity> { |
|||
|
|||
Boolean deleteAndInsertByQuarterId(String customerId, String quarterId, List<FactTagUsedGridQuarterlyEntity> gridQuarterlyList); |
|||
} |
@ -0,0 +1,32 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service.stats; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.entity.stats.FactTagUsedGridYearlyEntity; |
|||
|
|||
/** |
|||
* 标签【网格】年度统计表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-18 |
|||
*/ |
|||
public interface FactTagUsedGridYearlyService extends BaseService<FactTagUsedGridYearlyEntity> { |
|||
|
|||
Integer deleteByYearId(String customerId, String yearId); |
|||
} |
@ -0,0 +1,32 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service.stats; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.entity.stats.FactTagViewedAgencyDailyEntity; |
|||
|
|||
/** |
|||
* 文章引用标签阅读数量【机关】日统计表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-18 |
|||
*/ |
|||
public interface FactTagViewedAgencyDailyService extends BaseService<FactTagViewedAgencyDailyEntity> { |
|||
|
|||
|
|||
} |
@ -0,0 +1,31 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service.stats; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.entity.stats.FactTagViewedAgencyMonthlyEntity; |
|||
|
|||
/** |
|||
* 文章引用标签阅读数量【机关】月统计表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-18 |
|||
*/ |
|||
public interface FactTagViewedAgencyMonthlyService extends BaseService<FactTagViewedAgencyMonthlyEntity> { |
|||
|
|||
} |
@ -0,0 +1,31 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service.stats; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.entity.stats.FactTagViewedAgencyQuarterlyEntity; |
|||
|
|||
/** |
|||
* 文章引用标签阅读数量【机关】季度统计表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-18 |
|||
*/ |
|||
public interface FactTagViewedAgencyQuarterlyService extends BaseService<FactTagViewedAgencyQuarterlyEntity> { |
|||
|
|||
} |
@ -0,0 +1,32 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service.stats; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.entity.stats.FactTagViewedAgencyYearlyEntity; |
|||
|
|||
/** |
|||
* 文章引用标签阅读数量【机关】年度统计表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-18 |
|||
*/ |
|||
public interface FactTagViewedAgencyYearlyService extends BaseService<FactTagViewedAgencyYearlyEntity> { |
|||
|
|||
|
|||
} |
@ -0,0 +1,31 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service.stats; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.entity.stats.FactTagViewedGridDailyEntity; |
|||
|
|||
/** |
|||
* 文章引用标签阅读数量【网格】日统计表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-18 |
|||
*/ |
|||
public interface FactTagViewedGridDailyService extends BaseService<FactTagViewedGridDailyEntity> { |
|||
|
|||
} |
@ -0,0 +1,31 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service.stats; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.entity.stats.FactTagViewedGridMonthlyEntity; |
|||
|
|||
/** |
|||
* 文章引用标签阅读数量【网格】月统计表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-18 |
|||
*/ |
|||
public interface FactTagViewedGridMonthlyService extends BaseService<FactTagViewedGridMonthlyEntity> { |
|||
|
|||
} |
@ -0,0 +1,31 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service.stats; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.entity.stats.FactTagViewedGridQuarterlyEntity; |
|||
|
|||
/** |
|||
* 文章引用标签阅读数量【网格】季度统计表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-18 |
|||
*/ |
|||
public interface FactTagViewedGridQuarterlyService extends BaseService<FactTagViewedGridQuarterlyEntity> { |
|||
|
|||
} |
@ -0,0 +1,31 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service.stats; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.entity.stats.FactTagViewedGridYearlyEntity; |
|||
|
|||
/** |
|||
* 文章引用标签阅读数量【网格】年度统计表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-18 |
|||
*/ |
|||
public interface FactTagViewedGridYearlyService extends BaseService<FactTagViewedGridYearlyEntity> { |
|||
|
|||
} |
@ -0,0 +1,65 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service.stats.impl; |
|||
|
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|||
import com.epmet.commons.tools.exception.RenException; |
|||
import com.epmet.dao.stats.FactTagUsedAgencyDailyDao; |
|||
import com.epmet.entity.stats.FactTagUsedAgencyDailyEntity; |
|||
import com.epmet.entity.stats.FactTagUsedGridDailyEntity; |
|||
import com.epmet.service.stats.FactTagUsedAgencyDailyService; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
import org.springframework.util.CollectionUtils; |
|||
|
|||
import java.util.Collection; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 标签【机关】日统计表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-18 |
|||
*/ |
|||
@Slf4j |
|||
@Service |
|||
public class FactTagUsedAgencyDailyServiceImpl extends BaseServiceImpl<FactTagUsedAgencyDailyDao, FactTagUsedAgencyDailyEntity> implements FactTagUsedAgencyDailyService { |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public boolean deleteAndInsertBatch(String customerId, String dateId, Collection<FactTagUsedAgencyDailyEntity> values) { |
|||
if (CollectionUtils.isEmpty(values)){ |
|||
return false; |
|||
} |
|||
int i = baseDao.deleteByDateId(customerId, dateId); |
|||
log.debug("deleteAndInsertBatch delete customerId:{},rows:{}", customerId, i); |
|||
this.insertBatch(values, 100); |
|||
return true; |
|||
} |
|||
|
|||
@Override |
|||
public List<FactTagUsedGridDailyEntity> getTagUsedCountByMonth(String customerId, String monthId) { |
|||
if (StringUtils.isBlank(customerId) || StringUtils.isBlank(monthId)){ |
|||
throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); |
|||
} |
|||
return baseDao.getTagUsedCountByMonth(customerId,monthId); |
|||
} |
|||
} |
@ -0,0 +1,70 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service.stats.impl; |
|||
|
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|||
import com.epmet.commons.tools.exception.RenException; |
|||
import com.epmet.dao.stats.FactTagUsedAgencyMonthlyDao; |
|||
import com.epmet.entity.stats.FactTagUsedAgencyMonthlyEntity; |
|||
import com.epmet.entity.stats.FactTagUsedGridMonthlyEntity; |
|||
import com.epmet.service.stats.FactTagUsedAgencyMonthlyService; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
import org.springframework.util.CollectionUtils; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 标签【机关】月统计表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-18 |
|||
*/ |
|||
@Slf4j |
|||
@Service |
|||
public class FactTagUsedAgencyMonthlyServiceImpl extends BaseServiceImpl<FactTagUsedAgencyMonthlyDao, FactTagUsedAgencyMonthlyEntity> implements FactTagUsedAgencyMonthlyService { |
|||
|
|||
@Override |
|||
public List<FactTagUsedGridMonthlyEntity> getTagUsedCountByYearId(String customerId, String monthId) { |
|||
if (StringUtils.isBlank(customerId) || StringUtils.isBlank(monthId)){ |
|||
throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); |
|||
} |
|||
return baseDao.getTagUsedCountByYearId(customerId,monthId); |
|||
} |
|||
|
|||
@Override |
|||
public List<FactTagUsedGridMonthlyEntity> getTagUsedCountByQuarterId(String customerId, String quarterId) { |
|||
if (StringUtils.isBlank(customerId) || StringUtils.isBlank(quarterId)){ |
|||
throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); |
|||
} |
|||
return baseDao.getTagUsedCountByQuarterId(customerId,quarterId); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public Boolean deleteAndInsertByMonthId(String customerId, String monthId, List<FactTagUsedAgencyMonthlyEntity> agencyMonthlyList) { |
|||
if (StringUtils.isBlank(customerId) || StringUtils.isBlank(monthId) || CollectionUtils.isEmpty(agencyMonthlyList)){ |
|||
throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); |
|||
} |
|||
baseDao.deleteByMonthId(customerId,monthId); |
|||
return this.insertBatch(agencyMonthlyList, 100); |
|||
} |
|||
} |
@ -0,0 +1,53 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service.stats.impl; |
|||
|
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|||
import com.epmet.commons.tools.exception.RenException; |
|||
import com.epmet.dao.stats.FactTagUsedAgencyQuarterlyDao; |
|||
import com.epmet.entity.stats.FactTagUsedAgencyQuarterlyEntity; |
|||
import com.epmet.service.stats.FactTagUsedAgencyQuarterlyService; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
import org.springframework.util.CollectionUtils; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 标签【机关】季度统计表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-18 |
|||
*/ |
|||
@Slf4j |
|||
@Service |
|||
public class FactTagUsedAgencyQuarterlyServiceImpl extends BaseServiceImpl<FactTagUsedAgencyQuarterlyDao, FactTagUsedAgencyQuarterlyEntity> implements FactTagUsedAgencyQuarterlyService { |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public boolean deleteAndInsertByQuarterId(String customerId, String quarterId, List<FactTagUsedAgencyQuarterlyEntity> agencyQuarterlyList) { |
|||
if (StringUtils.isBlank(customerId) || StringUtils.isBlank(quarterId) || CollectionUtils.isEmpty(agencyQuarterlyList)){ |
|||
throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); |
|||
} |
|||
baseDao.deleteByQuarterId(customerId,quarterId); |
|||
return this.insertBatch(agencyQuarterlyList, 100); |
|||
} |
|||
} |
@ -0,0 +1,47 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service.stats.impl; |
|||
|
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|||
import com.epmet.commons.tools.exception.RenException; |
|||
import com.epmet.dao.stats.FactTagUsedAgencyYearlyDao; |
|||
import com.epmet.entity.stats.FactTagUsedAgencyYearlyEntity; |
|||
import com.epmet.service.stats.FactTagUsedAgencyYearlyService; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
/** |
|||
* 标签【机关】年度统计表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-18 |
|||
*/ |
|||
@Slf4j |
|||
@Service |
|||
public class FactTagUsedAgencyYearlyServiceImpl extends BaseServiceImpl<FactTagUsedAgencyYearlyDao, FactTagUsedAgencyYearlyEntity> implements FactTagUsedAgencyYearlyService { |
|||
|
|||
@Override |
|||
public int deleteByYearId(String customerId, String yearId) { |
|||
if (StringUtils.isBlank(customerId) || StringUtils.isBlank(yearId)){ |
|||
throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); |
|||
} |
|||
return baseDao.deleteByYearId(customerId,yearId); |
|||
} |
|||
} |
@ -0,0 +1,64 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service.stats.impl; |
|||
|
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|||
import com.epmet.commons.tools.exception.RenException; |
|||
import com.epmet.dao.stats.FactTagUsedDepartmentDailyDao; |
|||
import com.epmet.entity.stats.FactTagUsedDepartmentDailyEntity; |
|||
import com.epmet.service.stats.FactTagUsedDepartmentDailyService; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
import org.springframework.util.CollectionUtils; |
|||
|
|||
import java.util.Collection; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 标签【部门】日统计表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-18 |
|||
*/ |
|||
@Slf4j |
|||
@Service |
|||
public class FactTagUsedDepartmentDailyServiceImpl extends BaseServiceImpl<FactTagUsedDepartmentDailyDao, FactTagUsedDepartmentDailyEntity> implements FactTagUsedDepartmentDailyService { |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public boolean deleteAndInsertBatch(String customerId, String dateId, Collection<FactTagUsedDepartmentDailyEntity> values) { |
|||
if (CollectionUtils.isEmpty(values)){ |
|||
return false; |
|||
} |
|||
int i = baseDao.deleteByDateId(customerId, dateId); |
|||
log.debug("deleteAndInsertBatch delete customerId:{},rows:{}", customerId,i); |
|||
this.insertBatch(values, 100); |
|||
return true; |
|||
} |
|||
|
|||
@Override |
|||
public List<FactTagUsedDepartmentDailyEntity> getTagUsedCountByMonth(String customerId, String monthId) { |
|||
if (StringUtils.isBlank(customerId) || StringUtils.isBlank(monthId)){ |
|||
throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); |
|||
} |
|||
return baseDao.getTagUsedCountByMonthId(customerId,monthId); |
|||
} |
|||
} |
@ -0,0 +1,70 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service.stats.impl; |
|||
|
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|||
import com.epmet.commons.tools.exception.RenException; |
|||
import com.epmet.dao.stats.FactTagUsedDepartmentMonthlyDao; |
|||
import com.epmet.entity.stats.FactTagUsedDepartmentMonthlyEntity; |
|||
import com.epmet.service.stats.FactTagUsedDepartmentMonthlyService; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
import org.springframework.util.CollectionUtils; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 标签【部门】月统计表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-18 |
|||
*/ |
|||
@Slf4j |
|||
@Service |
|||
public class FactTagUsedDepartmentMonthlyServiceImpl extends BaseServiceImpl<FactTagUsedDepartmentMonthlyDao, FactTagUsedDepartmentMonthlyEntity> implements FactTagUsedDepartmentMonthlyService { |
|||
|
|||
|
|||
@Override |
|||
public List<FactTagUsedDepartmentMonthlyEntity> getTagUsedCountByYearId(String customerId, String yearId) { |
|||
if (StringUtils.isBlank(customerId) || StringUtils.isBlank(yearId)){ |
|||
throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); |
|||
} |
|||
return baseDao.getTagUsedCountByYearId(customerId,yearId); |
|||
} |
|||
|
|||
@Override |
|||
public List<FactTagUsedDepartmentMonthlyEntity> getTagUsedCountByQuarterId(String customerId, String quarterId) { |
|||
if (StringUtils.isBlank(customerId) || StringUtils.isBlank(quarterId)){ |
|||
throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); |
|||
} |
|||
return baseDao.getTagUsedCountByQuarterId(customerId,quarterId); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public Boolean deleteAndInsertByMonthId(String customerId, String monthId, List<FactTagUsedDepartmentMonthlyEntity> gridMonthlyList) { |
|||
if (StringUtils.isBlank(customerId) || StringUtils.isBlank(monthId) || CollectionUtils.isEmpty(gridMonthlyList)){ |
|||
throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); |
|||
} |
|||
baseDao.deleteByMonthId(customerId,monthId); |
|||
return this.insertBatch(gridMonthlyList, 100); |
|||
} |
|||
} |
@ -0,0 +1,51 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service.stats.impl; |
|||
|
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|||
import com.epmet.commons.tools.exception.RenException; |
|||
import com.epmet.dao.stats.FactTagUsedDepartmentQuarterlyDao; |
|||
import com.epmet.entity.stats.FactTagUsedDepartmentQuarterlyEntity; |
|||
import com.epmet.service.stats.FactTagUsedDepartmentQuarterlyService; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
import org.springframework.util.CollectionUtils; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 标签【部门】季度统计表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-18 |
|||
*/ |
|||
@Service |
|||
public class FactTagUsedDepartmentQuarterlyServiceImpl extends BaseServiceImpl<FactTagUsedDepartmentQuarterlyDao, FactTagUsedDepartmentQuarterlyEntity> implements FactTagUsedDepartmentQuarterlyService { |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public Boolean deleteAndInsertByQuarterId(String customerId, String quarterId, List<FactTagUsedDepartmentQuarterlyEntity> deptQuarterlyList) { |
|||
if (StringUtils.isBlank(customerId) || StringUtils.isBlank(quarterId) || CollectionUtils.isEmpty(deptQuarterlyList)){ |
|||
throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); |
|||
} |
|||
baseDao.deleteByQuarterId(customerId,quarterId); |
|||
return this.insertBatch(deptQuarterlyList, 100); |
|||
} |
|||
} |
@ -0,0 +1,47 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service.stats.impl; |
|||
|
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|||
import com.epmet.commons.tools.exception.RenException; |
|||
import com.epmet.dao.stats.FactTagUsedDepartmentYearlyDao; |
|||
import com.epmet.entity.stats.FactTagUsedDepartmentYearlyEntity; |
|||
import com.epmet.service.stats.FactTagUsedDepartmentYearlyService; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
/** |
|||
* 标签【部门】年度统计表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-18 |
|||
*/ |
|||
@Slf4j |
|||
@Service |
|||
public class FactTagUsedDepartmentYearlyServiceImpl extends BaseServiceImpl<FactTagUsedDepartmentYearlyDao, FactTagUsedDepartmentYearlyEntity> implements FactTagUsedDepartmentYearlyService { |
|||
|
|||
@Override |
|||
public Integer deleteByYearId(String customerId, String yearId) { |
|||
if (StringUtils.isBlank(customerId) || StringUtils.isBlank(yearId)){ |
|||
throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); |
|||
} |
|||
return baseDao.deleteByYearId(customerId,yearId); |
|||
} |
|||
} |
@ -0,0 +1,65 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service.stats.impl; |
|||
|
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|||
import com.epmet.commons.tools.exception.RenException; |
|||
import com.epmet.dao.stats.FactTagUsedGridDailyDao; |
|||
import com.epmet.entity.stats.FactTagUsedGridDailyEntity; |
|||
import com.epmet.service.stats.FactTagUsedGridDailyService; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
import org.springframework.util.CollectionUtils; |
|||
|
|||
import java.util.Collection; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 标签【网格】日统计表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-18 |
|||
*/ |
|||
@Slf4j |
|||
@Service |
|||
public class FactTagUsedGridDailyServiceImpl extends BaseServiceImpl<FactTagUsedGridDailyDao, FactTagUsedGridDailyEntity> implements FactTagUsedGridDailyService { |
|||
|
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public boolean deleteAndInsertBatch(String customerId, String dateId, Collection<FactTagUsedGridDailyEntity> values) { |
|||
if (CollectionUtils.isEmpty(values)){ |
|||
return false; |
|||
} |
|||
int i = baseDao.deleteByDateId(customerId, dateId); |
|||
log.debug("deleteAndInsertBatch delete customerId:{},rows:{}", customerId,i); |
|||
this.insertBatch(values, 100); |
|||
return true; |
|||
} |
|||
|
|||
@Override |
|||
public List<FactTagUsedGridDailyEntity> getTagUsedCountByMonth(String customerId, String monthId) { |
|||
if (StringUtils.isBlank(customerId) || StringUtils.isBlank(monthId)){ |
|||
throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); |
|||
} |
|||
return baseDao.getTagUsedCountByMonthId(customerId,monthId); |
|||
} |
|||
} |
@ -0,0 +1,67 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service.stats.impl; |
|||
|
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|||
import com.epmet.commons.tools.exception.RenException; |
|||
import com.epmet.dao.stats.FactTagUsedGridMonthlyDao; |
|||
import com.epmet.entity.stats.FactTagUsedGridMonthlyEntity; |
|||
import com.epmet.service.stats.FactTagUsedGridMonthlyService; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
import org.springframework.util.CollectionUtils; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 标签【网格】月统计表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-18 |
|||
*/ |
|||
@Service |
|||
public class FactTagUsedGridMonthlyServiceImpl extends BaseServiceImpl<FactTagUsedGridMonthlyDao, FactTagUsedGridMonthlyEntity> implements FactTagUsedGridMonthlyService { |
|||
|
|||
@Override |
|||
public List<FactTagUsedGridMonthlyEntity> getTagUsedCountByYearId(String customerId, String yearId) { |
|||
if (StringUtils.isBlank(customerId) || StringUtils.isBlank(yearId)){ |
|||
throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); |
|||
} |
|||
return baseDao.getTagUsedCountByYearId(customerId,yearId); |
|||
} |
|||
|
|||
@Override |
|||
public List<FactTagUsedGridMonthlyEntity> getTagUsedCountByQuarterId(String customerId, String quarterId) { |
|||
if (StringUtils.isBlank(customerId) || StringUtils.isBlank(quarterId)){ |
|||
throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); |
|||
} |
|||
return baseDao.getTagUsedCountByQuarterId(customerId,quarterId); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public Boolean deleteAndInsertByMonthId(String customerId, String monthId, List<FactTagUsedGridMonthlyEntity> gridMonthlyList) { |
|||
if (StringUtils.isBlank(customerId) || StringUtils.isBlank(monthId) || CollectionUtils.isEmpty(gridMonthlyList)){ |
|||
throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); |
|||
} |
|||
baseDao.deleteByMonthId(customerId,monthId); |
|||
return this.insertBatch(gridMonthlyList, 100); |
|||
} |
|||
} |
@ -0,0 +1,52 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service.stats.impl; |
|||
|
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|||
import com.epmet.commons.tools.exception.RenException; |
|||
import com.epmet.dao.stats.FactTagUsedGridQuarterlyDao; |
|||
import com.epmet.entity.stats.FactTagUsedGridQuarterlyEntity; |
|||
import com.epmet.service.stats.FactTagUsedGridQuarterlyService; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
import org.springframework.util.CollectionUtils; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 标签【网格】季度统计表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-18 |
|||
*/ |
|||
@Service |
|||
public class FactTagUsedGridQuarterlyServiceImpl extends BaseServiceImpl<FactTagUsedGridQuarterlyDao, FactTagUsedGridQuarterlyEntity> implements FactTagUsedGridQuarterlyService { |
|||
|
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public Boolean deleteAndInsertByQuarterId(String customerId, String quarterId, List<FactTagUsedGridQuarterlyEntity> gridQuarterlyList) { |
|||
if (StringUtils.isBlank(customerId) || StringUtils.isBlank(quarterId) || CollectionUtils.isEmpty(gridQuarterlyList)){ |
|||
throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); |
|||
} |
|||
baseDao.deleteByQuarterId(customerId,quarterId); |
|||
return this.insertBatch(gridQuarterlyList, 100); |
|||
} |
|||
} |
@ -0,0 +1,46 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service.stats.impl; |
|||
|
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|||
import com.epmet.commons.tools.exception.RenException; |
|||
import com.epmet.dao.stats.FactTagUsedGridYearlyDao; |
|||
import com.epmet.entity.stats.FactTagUsedGridYearlyEntity; |
|||
import com.epmet.service.stats.FactTagUsedGridYearlyService; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
/** |
|||
* 标签【网格】年度统计表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-18 |
|||
*/ |
|||
@Service |
|||
public class FactTagUsedGridYearlyServiceImpl extends BaseServiceImpl<FactTagUsedGridYearlyDao, FactTagUsedGridYearlyEntity> implements FactTagUsedGridYearlyService { |
|||
|
|||
@Override |
|||
public Integer deleteByYearId(String customerId, String yearId) { |
|||
|
|||
if (StringUtils.isBlank(customerId) || StringUtils.isBlank(yearId)){ |
|||
throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(),EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); |
|||
} |
|||
return baseDao.deleteByYearId(customerId,yearId); |
|||
} |
|||
} |
@ -0,0 +1,42 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service.voice; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.entity.voice.ArticleTagsEntity; |
|||
|
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 文章标签表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-17 |
|||
*/ |
|||
public interface ArticleTagsService extends BaseService<ArticleTagsEntity> { |
|||
|
|||
/** |
|||
* desc:根据客户Id 创建时间获取 文章便签数据 |
|||
* @param customerId |
|||
* @param startTime |
|||
* @param endTime |
|||
* @return |
|||
*/ |
|||
List<ArticleTagsEntity> getArticleTagsByCreateTime(String customerId, Date startTime, Date endTime); |
|||
} |
@ -0,0 +1,56 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service.voice.impl; |
|||
|
|||
import com.epmet.commons.dynamic.datasource.annotation.DataSource; |
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|||
import com.epmet.commons.tools.exception.RenException; |
|||
import com.epmet.constant.DataSourceConstant; |
|||
import com.epmet.dao.voice.ArticleTagsDao; |
|||
import com.epmet.entity.voice.ArticleTagsEntity; |
|||
import com.epmet.service.voice.ArticleTagsService; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 文章标签表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-06-17 |
|||
*/ |
|||
@Slf4j |
|||
@Service |
|||
@DataSource(DataSourceConstant.GOV_VOICE) |
|||
public class ArticleTagsServiceImpl extends BaseServiceImpl<ArticleTagsDao, ArticleTagsEntity> implements ArticleTagsService { |
|||
|
|||
@Override |
|||
public List<ArticleTagsEntity> getArticleTagsByCreateTime(String customerId, Date startTime, Date endTime) { |
|||
this.checkParam(customerId,endTime,endTime); |
|||
return baseDao.getArticleTagsByDay(customerId,startTime, endTime); |
|||
} |
|||
private void checkParam(String customerId, Date starTime,Date endTime) { |
|||
if (StringUtils.isBlank(customerId) || starTime == null || endTime == null) { |
|||
throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(), EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,32 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.epmet.dao.voice.ArticleTagsDao"> |
|||
|
|||
<resultMap type="com.epmet.entity.voice.ArticleTagsEntity" id="articleTagsMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="customerId" column="CUSTOMER_ID"/> |
|||
<result property="articleId" column="ARTICLE_ID"/> |
|||
<result property="tagId" column="TAG_ID"/> |
|||
<result property="tagName" column="TAG_NAME"/> |
|||
<result property="delFlag" column="DEL_FLAG"/> |
|||
<result property="revision" column="REVISION"/> |
|||
<result property="createdBy" column="CREATED_BY"/> |
|||
<result property="createdTime" column="CREATED_TIME"/> |
|||
<result property="updatedBy" column="UPDATED_BY"/> |
|||
<result property="updatedTime" column="UPDATED_TIME"/> |
|||
</resultMap> |
|||
<select id="getArticleTagsByDay" resultMap="articleTagsMap"> |
|||
SELECT |
|||
TAG_ID, |
|||
TAG_NAME, |
|||
CUSTOMER_ID, |
|||
ARTICLE_ID |
|||
FROM |
|||
article_tags |
|||
WHERE |
|||
DEL_FLAG = 0 |
|||
AND CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} |
|||
AND CREATED_TIME BETWEEN #{startTime,jdbcType=TIMESTAMP} AND #{endTime,jdbcType=TIMESTAMP} |
|||
</select> |
|||
</mapper> |
Loading…
Reference in new issue