forked from rongchao/epmet-cloud-rizhao
130 changed files with 7260 additions and 23 deletions
@ -0,0 +1,46 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import com.epmet.commons.tools.constant.NumConstant; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.Min; |
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2021/9/6 3:13 下午 |
|||
* @DESC |
|||
*/ |
|||
@Data |
|||
public class AllPartyFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -600409785611581009L; |
|||
|
|||
|
|||
/** |
|||
* 页码 |
|||
**/ |
|||
private Integer pageNo = NumConstant.ONE; |
|||
|
|||
/** |
|||
* 每页数据条数 |
|||
**/ |
|||
private Integer pageSize = NumConstant.TEN; |
|||
|
|||
/** |
|||
* 本月 monthly 总排行 all; |
|||
* */ |
|||
private String type; |
|||
|
|||
/** |
|||
* 认证成功的党员 的用户ID |
|||
* */ |
|||
private List<String> userIds; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
} |
@ -0,0 +1,49 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import com.epmet.commons.tools.constant.NumConstant; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2021/9/6 3:12 下午 |
|||
* @DESC |
|||
*/ |
|||
@Data |
|||
public class AllPartyResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -5889648842876122793L; |
|||
|
|||
/** |
|||
* 排序 |
|||
**/ |
|||
private Integer ranking; |
|||
|
|||
/** |
|||
* 积分 |
|||
**/ |
|||
private Integer point; |
|||
|
|||
/** |
|||
* 头像 |
|||
**/ |
|||
private String userHeadPhoto; |
|||
|
|||
/** |
|||
* 名称 |
|||
**/ |
|||
private String realName; |
|||
|
|||
/** |
|||
* 用户id |
|||
**/ |
|||
private String userId; |
|||
|
|||
public AllPartyResultDTO() { |
|||
this.point = NumConstant.ZERO; |
|||
this.userHeadPhoto = ""; |
|||
this.realName = ""; |
|||
this.userId = ""; |
|||
} |
|||
} |
@ -0,0 +1,21 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/10 14:11 |
|||
*/ |
|||
@NoArgsConstructor |
|||
@Data |
|||
public class GridPointRankResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 3288606889536923166L; |
|||
private String gridName; |
|||
private String agencyRank; |
|||
private String customerRank; |
|||
} |
@ -0,0 +1,21 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/10 13:44 |
|||
*/ |
|||
@NoArgsConstructor |
|||
@Data |
|||
public class MyPointRankResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -2438231097029179782L; |
|||
private String headPhoto; |
|||
private String gridRank; |
|||
private String customerRank; |
|||
} |
@ -0,0 +1,18 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2021/9/13 3:20 下午 |
|||
* @DESC |
|||
*/ |
|||
@Data |
|||
public class GetAgencyListFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -5846836779036328298L; |
|||
|
|||
private String customerId; |
|||
} |
@ -0,0 +1,17 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/7 15:41 |
|||
*/ |
|||
@Data |
|||
public class OrgFormDTO implements Serializable { |
|||
private static final long serialVersionUID = -5975063766883885089L; |
|||
private String orgId; |
|||
private String orgType; |
|||
} |
@ -0,0 +1,31 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/8 15:06 |
|||
*/ |
|||
@Data |
|||
public class AgencyTreeResultDTO implements Serializable { |
|||
private static final long serialVersionUID = -311212619121062367L; |
|||
/** |
|||
* 机关组织Id |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 机关组织名称 |
|||
*/ |
|||
private String agencyName; |
|||
|
|||
private String pid; |
|||
/** |
|||
* 下级机关组织 |
|||
*/ |
|||
private List<AgencyTreeResultDTO> subAgencyList; |
|||
} |
@ -0,0 +1,27 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/8 15:11 |
|||
*/ |
|||
@Data |
|||
public class StaffOrgListResultDTO implements Serializable { |
|||
private static final long serialVersionUID = -7717333635633000120L; |
|||
/** |
|||
* 组织ID |
|||
*/ |
|||
private String orgId; |
|||
/** |
|||
* 组织名称 |
|||
*/ |
|||
private String orgName; |
|||
/** |
|||
* 组织类型机关agency 网格grid 部门dept |
|||
*/ |
|||
private String orgType; |
|||
} |
@ -0,0 +1,22 @@ |
|||
package com.epmet.dto; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/7 16:21 |
|||
*/ |
|||
@Data |
|||
public class AttachmentDTO implements Serializable { |
|||
private static final long serialVersionUID = 6505979559566901869L; |
|||
private String name; |
|||
private String format; |
|||
private String type; |
|||
private String url; |
|||
private Integer size; |
|||
private Integer duration; |
|||
|
|||
} |
@ -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.dto; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
|
|||
/** |
|||
* 指南外链表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-09-06 |
|||
*/ |
|||
@Data |
|||
public class ExternalLinkDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 链接说明 |
|||
*/ |
|||
private String description; |
|||
|
|||
/** |
|||
* 外部链接 |
|||
*/ |
|||
private String externalLink; |
|||
|
|||
/** |
|||
* 外部链接 |
|||
*/ |
|||
private Integer sort; |
|||
|
|||
} |
@ -0,0 +1,117 @@ |
|||
/** |
|||
* 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.dto; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
|
|||
/** |
|||
* 办事指南附件 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-09-06 |
|||
*/ |
|||
@Data |
|||
public class GuideAttachmentDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 唯一标识 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 办事指南ID |
|||
*/ |
|||
private String guideId; |
|||
|
|||
/** |
|||
* 附件名 |
|||
*/ |
|||
private String attachmentName; |
|||
|
|||
/** |
|||
* 文件大小 单位byte |
|||
*/ |
|||
private Integer attachmentSize; |
|||
|
|||
/** |
|||
* 文件格式 word、excel、pdf |
|||
*/ |
|||
private String attachmentFormat; |
|||
|
|||
/** |
|||
* 类型 |
|||
*/ |
|||
private String attachmentType; |
|||
|
|||
/** |
|||
* 附件地址 |
|||
*/ |
|||
private String attachmentUrl; |
|||
|
|||
/** |
|||
* 语音或视频时长,秒 |
|||
*/ |
|||
private Integer duration; |
|||
|
|||
/** |
|||
* 排序 |
|||
*/ |
|||
private Integer sort; |
|||
|
|||
/** |
|||
* 删除标识 0.未删除 1.已删除 |
|||
*/ |
|||
private Integer delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,104 @@ |
|||
/** |
|||
* 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.dto; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonIgnore; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
|
|||
/** |
|||
* 指南分类 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-09-08 |
|||
*/ |
|||
@Data |
|||
public class GuideCategoryDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户id,产品默认配置此列存储default |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 分类名,客户内唯一 |
|||
*/ |
|||
private String categoryName; |
|||
|
|||
/** |
|||
* 分类编码:分类名的全拼; eg:gongjijin |
|||
*/ |
|||
private String categoryCode; |
|||
|
|||
/** |
|||
* 排序 |
|||
*/ |
|||
private Integer sort; |
|||
|
|||
/** |
|||
* 状态 禁用disable 启用enable |
|||
*/ |
|||
private String status; |
|||
|
|||
/** |
|||
* 删除标识 0未删除、1已删除 |
|||
*/ |
|||
@JsonIgnore |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
@JsonIgnore |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
@JsonIgnore |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
@JsonIgnore |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
@JsonIgnore |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
@JsonIgnore |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,91 @@ |
|||
/** |
|||
* 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.dto; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 指南收藏表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-09-06 |
|||
*/ |
|||
@Data |
|||
public class GuideCollectionDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 指南ID |
|||
*/ |
|||
private String guideId; |
|||
|
|||
/** |
|||
* 用户ID |
|||
*/ |
|||
private String userId; |
|||
|
|||
/** |
|||
* 用户所属客户端 居民端resi 工作端gov |
|||
*/ |
|||
private String app; |
|||
|
|||
/** |
|||
* 删除标识 0未删除、1已删除 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,112 @@ |
|||
/** |
|||
* 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.dto; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
|
|||
/** |
|||
* 办事指南表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-09-06 |
|||
*/ |
|||
@Data |
|||
public class GuideDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* ID 唯一标识 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 发布单位类型 机关agency 网格grid 部门dept |
|||
*/ |
|||
private String orgType; |
|||
|
|||
/** |
|||
* 发布单位ID |
|||
*/ |
|||
private String orgId; |
|||
|
|||
/** |
|||
* 发布单位名称 |
|||
*/ |
|||
private String orgName; |
|||
|
|||
/** |
|||
* 所属组织机构ID(customer_agency.id) |
|||
*/ |
|||
private String pid; |
|||
|
|||
/** |
|||
* 所有上级组织ID,英文:隔开 |
|||
*/ |
|||
private String pids; |
|||
|
|||
/** |
|||
* 标题 |
|||
*/ |
|||
private String title; |
|||
|
|||
/** |
|||
* 分类ID |
|||
*/ |
|||
private String categoryCode; |
|||
|
|||
/** |
|||
* 删除标识:0.未删除 1.已删除 |
|||
*/ |
|||
private Integer delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,96 @@ |
|||
/** |
|||
* 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.dto; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 指南外链表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-09-06 |
|||
*/ |
|||
@Data |
|||
public class GuideExternalLinkDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 指南ID |
|||
*/ |
|||
private String guideId; |
|||
|
|||
/** |
|||
* 链接说明 |
|||
*/ |
|||
private String description; |
|||
|
|||
/** |
|||
* 外部链接 |
|||
*/ |
|||
private String externalLink; |
|||
|
|||
/** |
|||
* 排序 |
|||
*/ |
|||
private Integer sort; |
|||
|
|||
/** |
|||
* 删除标识 0未删除、1已删除 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,91 @@ |
|||
/** |
|||
* 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.dto; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 指南模块关联表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-09-06 |
|||
*/ |
|||
@Data |
|||
public class GuideModuleDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 指南ID |
|||
*/ |
|||
private String guideId; |
|||
|
|||
/** |
|||
* 模块ID |
|||
*/ |
|||
private String moduleId; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String moduleContent; |
|||
|
|||
/** |
|||
* 删除标识 0未删除、1已删除 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,96 @@ |
|||
/** |
|||
* 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.dto; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 指南模块字典表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-09-06 |
|||
*/ |
|||
@Data |
|||
public class GuideModuleDictDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 模块key |
|||
*/ |
|||
private String moduleValue; |
|||
|
|||
/** |
|||
* 模块名 |
|||
*/ |
|||
private String moduleName; |
|||
|
|||
/** |
|||
* 排序 |
|||
*/ |
|||
private Integer sort; |
|||
|
|||
/** |
|||
* 状态 禁用disable 启用enable |
|||
*/ |
|||
private String status; |
|||
|
|||
/** |
|||
* 删除标识 0未删除、1已删除 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,91 @@ |
|||
/** |
|||
* 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.dto; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 指南模块默认字典表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-09-06 |
|||
*/ |
|||
@Data |
|||
public class GuideModuleDictDefaultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 模块key |
|||
*/ |
|||
private String moduleValue; |
|||
|
|||
/** |
|||
* 模块名 |
|||
*/ |
|||
private String moduleName; |
|||
|
|||
/** |
|||
* 排序 |
|||
*/ |
|||
private Integer sort; |
|||
|
|||
/** |
|||
* 状态 禁用disable 启用enable |
|||
*/ |
|||
private String status; |
|||
|
|||
/** |
|||
* 删除标识 0未删除、1已删除 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -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.dto; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
|
|||
/** |
|||
* 指南模块字典表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-09-06 |
|||
*/ |
|||
@Data |
|||
public class ModuleDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String guideModuleId; |
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String moduleId; |
|||
|
|||
/** |
|||
* 模块key |
|||
*/ |
|||
private String moduleValue; |
|||
|
|||
/** |
|||
* 模块名 |
|||
*/ |
|||
private String moduleName; |
|||
|
|||
/** |
|||
* 模块内容 |
|||
*/ |
|||
private String moduleContent; |
|||
} |
@ -0,0 +1,49 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; |
|||
import lombok.Data; |
|||
import org.hibernate.validator.constraints.Length; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description 编辑、禁用、删除统一入参 |
|||
* @Author yinzuomei |
|||
* @Date 2021/9/8 4:15 下午 |
|||
*/ |
|||
@Data |
|||
public class EditGuideCategoryFormDTO implements Serializable { |
|||
private static final long serialVersionUID = -6853534660181580456L; |
|||
|
|||
public interface AddUserInternalGroup { |
|||
} |
|||
|
|||
public interface StatusGroup { |
|||
} |
|||
|
|||
public interface UpdateInfoGroup extends CustomerClientShowGroup { |
|||
} |
|||
public interface SaveInfoGroup extends CustomerClientShowGroup { |
|||
} |
|||
|
|||
public interface DelGroup { |
|||
} |
|||
@NotBlank(message = "当前操作人id不能为空", groups = AddUserInternalGroup.class) |
|||
private String staffId; |
|||
|
|||
@NotBlank(message = "客户id不能为空",groups = {DelGroup.class,UpdateInfoGroup.class,SaveInfoGroup.class}) |
|||
private String customerId; |
|||
|
|||
@NotBlank(message = "id不能为空", groups = {StatusGroup.class,DelGroup.class,UpdateInfoGroup.class}) |
|||
private String id; |
|||
|
|||
@NotBlank(message = "status不能为空", groups = StatusGroup.class) |
|||
private String status; |
|||
|
|||
@NotBlank(message = "分类名称不能为空不能为空", groups = {UpdateInfoGroup.class,SaveInfoGroup.class}) |
|||
@Length(max = 10, message = "分类名称最多填入10个字", groups = {UpdateInfoGroup.class,SaveInfoGroup.class}) |
|||
private String categoryName; |
|||
|
|||
} |
|||
|
@ -0,0 +1,61 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import com.epmet.dto.AttachmentDTO; |
|||
import com.epmet.dto.ExternalLinkDTO; |
|||
import com.epmet.dto.ModuleDTO; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/7 10:24 |
|||
*/ |
|||
@NoArgsConstructor |
|||
@Data |
|||
public class GuideAddFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -7750999102010191460L; |
|||
/** |
|||
* 标题 |
|||
*/ |
|||
@NotBlank(message = "标题不能为空") |
|||
private String title; |
|||
/** |
|||
* 标题 |
|||
*/ |
|||
@NotBlank(message = "分类不能为空") |
|||
private String categoryCode; |
|||
/** |
|||
* 机关类型 机关agency 网格grid 部门dept |
|||
*/ |
|||
@NotBlank(message = "所属机关类型不能为空") |
|||
private String orgType; |
|||
/** |
|||
* 所属机关 |
|||
*/ |
|||
@NotBlank(message = "所属机关ID不能为空") |
|||
private String orgId; |
|||
/** |
|||
* 所属机关 |
|||
*/ |
|||
@NotBlank(message = "所属机关名不能为空") |
|||
private String orgName; |
|||
/** |
|||
* 外部链接 |
|||
*/ |
|||
private List<ExternalLinkDTO> externalLinks; |
|||
/** |
|||
* 内容模块 |
|||
*/ |
|||
private List<ModuleDTO> moduleList; |
|||
/** |
|||
* 附件 |
|||
*/ |
|||
private List<AttachmentDTO> attachmentList; |
|||
|
|||
} |
@ -0,0 +1,56 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import javax.validation.constraints.NotEmpty; |
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Description 分类排序入参DTO |
|||
* @Author yinzuomei |
|||
* @Date 2021/9/8 4:03 下午 |
|||
*/ |
|||
@Data |
|||
public class GuideCateOrderFormDTO implements Serializable { |
|||
private static final long serialVersionUID = 8671295475212569124L; |
|||
|
|||
public interface AddUserInternalGroup { |
|||
} |
|||
|
|||
@NotBlank(message = "当前操作人id不能为空", groups = AddUserInternalGroup.class) |
|||
private String staffId; |
|||
|
|||
|
|||
@NotEmpty(message = "顺序不能为空", groups = {AddUserInternalGroup.class}) |
|||
private List<OrderIndexDTO> orderList; |
|||
|
|||
/** |
|||
* 排序索引号dto |
|||
*/ |
|||
public static class OrderIndexDTO { |
|||
private String id; |
|||
private Integer orderIndex; |
|||
|
|||
public OrderIndexDTO() { |
|||
} |
|||
|
|||
public String getId() { |
|||
return id; |
|||
} |
|||
|
|||
public void setId(String id) { |
|||
this.id = id; |
|||
} |
|||
|
|||
public Integer getOrderIndex() { |
|||
return orderIndex; |
|||
} |
|||
|
|||
public void setOrderIndex(Integer orderIndex) { |
|||
this.orderIndex = orderIndex; |
|||
} |
|||
} |
|||
} |
|||
|
@ -0,0 +1,28 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description 发布指南、编辑指南、查询指南列表 分类下拉框 |
|||
* @Author yinzuomei |
|||
* @Date 2021/9/8 2:57 下午 |
|||
*/ |
|||
@Data |
|||
public class GuideCategoryDropDownFormDTO implements Serializable { |
|||
private static final long serialVersionUID = 9122708701080412461L; |
|||
public interface AddUserInternalGroup { |
|||
} |
|||
/** |
|||
* 新增指南:saveorupdate;查询指南列表:query |
|||
*/ |
|||
@NotBlank(message = "新增指南:saveorupdate;查询指南列表:query",groups = AddUserInternalGroup.class) |
|||
private String queryOrigin; |
|||
|
|||
@NotBlank(message = "当前工作人员所属客户id不能为空",groups = AddUserInternalGroup.class) |
|||
private String customerId; |
|||
|
|||
} |
|||
|
@ -0,0 +1,21 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description 工作端PC或者运营端分页 |
|||
* @Author yinzuomei |
|||
* @Date 2021/9/8 1:35 下午 |
|||
*/ |
|||
@Data |
|||
public class GuideCategoryPageFormDTO implements Serializable { |
|||
private static final long serialVersionUID = -7551388716349439643L; |
|||
public interface AddUserInternalGroup { |
|||
} |
|||
@NotBlank(message = "客户id不能为空,运营端传default", groups = AddUserInternalGroup.class) |
|||
private String customerId; |
|||
} |
|||
|
@ -0,0 +1,70 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import com.epmet.dto.AttachmentDTO; |
|||
import com.epmet.dto.ExternalLinkDTO; |
|||
import com.epmet.dto.ModuleDTO; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/7 10:24 |
|||
*/ |
|||
@NoArgsConstructor |
|||
@Data |
|||
public class GuideEditFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -7750999102010191460L; |
|||
/** |
|||
* 工作人员ID |
|||
*/ |
|||
private String staffId; |
|||
/** |
|||
* 指南ID |
|||
*/ |
|||
@NotBlank(message = "指南id不能为空") |
|||
private String guideId; |
|||
/** |
|||
* 标题 |
|||
*/ |
|||
@NotBlank(message = "标题不能为空") |
|||
private String title; |
|||
/** |
|||
* 标题 |
|||
*/ |
|||
@NotBlank(message = "分类不能为空") |
|||
private String categoryCode; |
|||
/** |
|||
* 机关类型 机关agency 网格grid 部门dept |
|||
*/ |
|||
@NotBlank(message = "所属机关类型不能为空") |
|||
private String orgType; |
|||
/** |
|||
* 所属机关 |
|||
*/ |
|||
@NotBlank(message = "所属机关ID不能为空") |
|||
private String orgId; |
|||
/** |
|||
* 所属机关 |
|||
*/ |
|||
@NotBlank(message = "所属机关名不能为空") |
|||
private String orgName; |
|||
/** |
|||
* 外部链接 |
|||
*/ |
|||
private List<ExternalLinkDTO> externalLinks; |
|||
/** |
|||
* 内容模块 |
|||
*/ |
|||
private List<ModuleDTO> moduleList; |
|||
/** |
|||
* 附件 |
|||
*/ |
|||
private List<AttachmentDTO> attachmentList; |
|||
|
|||
} |
@ -0,0 +1,39 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import com.epmet.dto.ExternalLinkDTO; |
|||
import com.epmet.dto.GuideAttachmentDTO; |
|||
import com.epmet.dto.ModuleDTO; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/7 10:24 |
|||
*/ |
|||
@NoArgsConstructor |
|||
@Data |
|||
public class GuideFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -7750999102010191460L; |
|||
/** |
|||
* 标题 |
|||
*/ |
|||
@NotBlank(message = "指南id不能为空") |
|||
private String guideId; |
|||
|
|||
/** |
|||
* 工作人员 |
|||
*/ |
|||
private String staffId; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
} |
@ -0,0 +1,32 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import com.epmet.commons.tools.dto.form.PageFormDTO; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/7 9:38 |
|||
*/ |
|||
@NoArgsConstructor |
|||
@Data |
|||
public class GuideListFormDTO extends PageFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -4471422632936288213L; |
|||
private String customerId; |
|||
/** |
|||
* 组织ID |
|||
*/ |
|||
private String agencyId; |
|||
/** |
|||
* 分类 |
|||
*/ |
|||
private String categoryCode; |
|||
/** |
|||
* 标题 |
|||
*/ |
|||
private String guideTitle; |
|||
} |
@ -0,0 +1,17 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/7 10:52 |
|||
*/ |
|||
@Data |
|||
public class GetCategoryResultDTO implements Serializable { |
|||
private static final long serialVersionUID = 3527239091132653541L; |
|||
private String categoryId; |
|||
private String categoryName; |
|||
} |
@ -0,0 +1,67 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import com.epmet.dto.AttachmentDTO; |
|||
import com.epmet.dto.ExternalLinkDTO; |
|||
import com.epmet.dto.ModuleDTO; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/7 10:24 |
|||
*/ |
|||
@NoArgsConstructor |
|||
@Data |
|||
public class GuideDetailResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -7750999102010191460L; |
|||
/** |
|||
* 标题 |
|||
*/ |
|||
private String guideId; |
|||
/** |
|||
* 标题 |
|||
*/ |
|||
private String title; |
|||
/** |
|||
* 分类ID |
|||
*/ |
|||
private String categoryCode; |
|||
/** |
|||
* 分类名 |
|||
*/ |
|||
private String categoryName; |
|||
/** |
|||
* 机关类型 机关agency 网格grid 部门dept |
|||
*/ |
|||
private String orgType; |
|||
/** |
|||
* 所属机关 |
|||
*/ |
|||
private String orgId; |
|||
/** |
|||
* 所属机关名 |
|||
*/ |
|||
private String orgName; |
|||
/** |
|||
* 是否收藏 1是, 0否 |
|||
*/ |
|||
private String collectionFlag; |
|||
/** |
|||
* 外部链接 |
|||
*/ |
|||
private List<ExternalLinkDTO> externalLinks; |
|||
/** |
|||
* 内容模块 |
|||
*/ |
|||
private List<ModuleDTO> moduleList; |
|||
/** |
|||
* 附件 |
|||
*/ |
|||
private List<AttachmentDTO> attachmentList; |
|||
|
|||
} |
@ -0,0 +1,39 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonIgnore; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description 办事指南】可用分类列表 新增、编辑指南时的下拉框:展示未禁用的分类; 查询指南列表:如果禁用的分类下存在指南列表,则展示,不存在直接不展示 |
|||
* @Author yinzuomei |
|||
* @Date 2021/9/8 2:44 下午 |
|||
*/ |
|||
@Data |
|||
public class GuideDictResDTO implements Serializable { |
|||
|
|||
/** |
|||
* 分类名,客户内唯一 |
|||
*/ |
|||
private String categoryName; |
|||
|
|||
/** |
|||
* 分类编码:分类名的全拼; eg:gongjijin |
|||
*/ |
|||
private String categoryCode; |
|||
|
|||
/** |
|||
* 排序 |
|||
*/ |
|||
@JsonIgnore |
|||
private Integer sort; |
|||
|
|||
/** |
|||
* 状态 禁用disable 启用enable |
|||
*/ |
|||
@JsonIgnore |
|||
private String status; |
|||
} |
|||
|
|||
|
@ -0,0 +1,35 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @author Administrator |
|||
*/ |
|||
@Data |
|||
public class GuideListResultDTO implements Serializable { |
|||
private static final long serialVersionUID = -1360741408368601140L; |
|||
private String guideId; |
|||
/** |
|||
* 标题 |
|||
*/ |
|||
private String title; |
|||
/** |
|||
* 分类 |
|||
*/ |
|||
private String categoryName; |
|||
/** |
|||
* 创建人ID |
|||
*/ |
|||
private String createdId; |
|||
/** |
|||
* 创建人姓名 |
|||
*/ |
|||
private String createdName; |
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
} |
@ -0,0 +1,171 @@ |
|||
/** |
|||
* 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.controller; |
|||
|
|||
import com.epmet.commons.tools.annotation.LoginUser; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.dto.GuideCategoryDTO; |
|||
import com.epmet.dto.form.EditGuideCategoryFormDTO; |
|||
import com.epmet.dto.form.GuideCateOrderFormDTO; |
|||
import com.epmet.dto.form.GuideCategoryDropDownFormDTO; |
|||
import com.epmet.dto.form.GuideCategoryPageFormDTO; |
|||
import com.epmet.dto.result.GuideDictResDTO; |
|||
import com.epmet.service.GuideCategoryService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import java.util.List; |
|||
|
|||
|
|||
/** |
|||
* 指南分类 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-09-06 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("guidecategory") |
|||
public class GuideCategoryController { |
|||
|
|||
@Autowired |
|||
private GuideCategoryService guideCategoryService; |
|||
|
|||
/** |
|||
* 【办事指南】分类列表-工作端PC和运营端用不分页 |
|||
* |
|||
* @param formDTO |
|||
* @return com.epmet.commons.tools.utils.Result<com.epmet.commons.tools.page.PageData<com.epmet.dto.GuideCategoryDTO>> |
|||
* @author yinzuomei |
|||
* @date 2021/9/8 1:33 下午 |
|||
*/ |
|||
@PostMapping("page") |
|||
public Result<PageData<GuideCategoryDTO>> page(@RequestBody GuideCategoryPageFormDTO formDTO){ |
|||
ValidatorUtils.validateEntity(formDTO, GuideCategoryPageFormDTO.AddUserInternalGroup.class); |
|||
PageData<GuideCategoryDTO> page = guideCategoryService.page(formDTO); |
|||
return new Result<PageData<GuideCategoryDTO>>().ok(page); |
|||
} |
|||
|
|||
/** |
|||
* 办事指南】可用分类列表 新增、编辑指南时的下拉框:展示未禁用的分类; 查询指南列表:如果禁用的分类下存在指南列表,则展示,不存在直接不展示 |
|||
* |
|||
* @param tokenDto |
|||
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.result.GuideDictResDTO>> |
|||
* @author yinzuomei |
|||
* @date 2021/9/8 2:47 下午 |
|||
*/ |
|||
@PostMapping("getcategory") |
|||
public Result<List<GuideDictResDTO>> getCategory(@LoginUser TokenDto tokenDto,@RequestBody GuideCategoryDropDownFormDTO formDTO){ |
|||
formDTO.setCustomerId(tokenDto.getCustomerId()); |
|||
ValidatorUtils.validateEntity(formDTO,GuideCategoryDropDownFormDTO.AddUserInternalGroup.class); |
|||
return new Result<List<GuideDictResDTO>>().ok(guideCategoryService.getCategory(formDTO)); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 保存排序 |
|||
* |
|||
* @param tokenDto |
|||
* @param formDTO |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
* @author yinzuomei |
|||
* @date 2021/9/8 4:09 下午 |
|||
*/ |
|||
@PostMapping("saveorder") |
|||
public Result saveOrder(@LoginUser TokenDto tokenDto,@RequestBody GuideCateOrderFormDTO formDTO){ |
|||
formDTO.setStaffId(tokenDto.getUserId()); |
|||
ValidatorUtils.validateEntity(formDTO,GuideCateOrderFormDTO.AddUserInternalGroup.class); |
|||
guideCategoryService.saveOrder(formDTO); |
|||
return new Result(); |
|||
} |
|||
|
|||
/** |
|||
* 禁用或者启用分类 |
|||
* |
|||
* @param tokenDto |
|||
* @param formDTO |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
* @author yinzuomei |
|||
* @date 2021/9/8 4:19 下午 |
|||
*/ |
|||
@PostMapping("disable") |
|||
public Result disable(@LoginUser TokenDto tokenDto,@RequestBody EditGuideCategoryFormDTO formDTO){ |
|||
formDTO.setStaffId(tokenDto.getUserId()); |
|||
ValidatorUtils.validateEntity(formDTO,EditGuideCategoryFormDTO.StatusGroup.class,EditGuideCategoryFormDTO.AddUserInternalGroup.class); |
|||
guideCategoryService.disableGuideCategory(formDTO); |
|||
return new Result(); |
|||
} |
|||
|
|||
/** |
|||
* 删除分类,已经存在指南的不允许删除,给予提示 |
|||
* |
|||
* @param tokenDto |
|||
* @param formDTO |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
* @author yinzuomei |
|||
* @date 2021/9/8 4:45 下午 |
|||
*/ |
|||
@PostMapping("delete") |
|||
public Result delete(@LoginUser TokenDto tokenDto,@RequestBody EditGuideCategoryFormDTO formDTO){ |
|||
formDTO.setStaffId(tokenDto.getUserId()); |
|||
ValidatorUtils.validateEntity(formDTO,EditGuideCategoryFormDTO.AddUserInternalGroup.class,EditGuideCategoryFormDTO.DelGroup.class); |
|||
guideCategoryService.delete(formDTO); |
|||
return new Result(); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 新增分类,名称和编码客户内唯一 |
|||
* |
|||
* @param tokenDto |
|||
* @param formDTO |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
* @author yinzuomei |
|||
* @date 2021/9/8 5:11 下午 |
|||
*/ |
|||
@PostMapping("save") |
|||
public Result<GuideCategoryDTO> save(@LoginUser TokenDto tokenDto,@RequestBody EditGuideCategoryFormDTO formDTO){ |
|||
formDTO.setStaffId(tokenDto.getUserId()); |
|||
ValidatorUtils.validateEntity(formDTO,EditGuideCategoryFormDTO.AddUserInternalGroup.class,EditGuideCategoryFormDTO.SaveInfoGroup.class); |
|||
return new Result<GuideCategoryDTO>().ok(guideCategoryService.save(formDTO)); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 编辑名称 |
|||
* |
|||
* @param tokenDto |
|||
* @param formDTO |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
* @author yinzuomei |
|||
* @date 2021/9/8 5:37 下午 |
|||
*/ |
|||
@PostMapping("update") |
|||
public Result<GuideCategoryDTO> update(@LoginUser TokenDto tokenDto,@RequestBody EditGuideCategoryFormDTO formDTO){ |
|||
formDTO.setStaffId(tokenDto.getUserId()); |
|||
ValidatorUtils.validateEntity(formDTO,EditGuideCategoryFormDTO.AddUserInternalGroup.class,EditGuideCategoryFormDTO.UpdateInfoGroup.class); |
|||
return new Result<GuideCategoryDTO>().ok(guideCategoryService.update(formDTO)); |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,102 @@ |
|||
/** |
|||
* 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.controller; |
|||
|
|||
import com.epmet.commons.tools.annotation.LoginUser; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.AssertUtils; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.commons.tools.validator.group.AddGroup; |
|||
import com.epmet.commons.tools.validator.group.DefaultGroup; |
|||
import com.epmet.commons.tools.validator.group.UpdateGroup; |
|||
import com.epmet.dto.GuideCollectionDTO; |
|||
import com.epmet.dto.form.GuideFormDTO; |
|||
import com.epmet.service.GuideCollectionService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.Map; |
|||
|
|||
|
|||
/** |
|||
* 指南收藏表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-09-06 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("guidecollection") |
|||
public class GuideCollectionController { |
|||
|
|||
@Autowired |
|||
private GuideCollectionService guideCollectionService; |
|||
|
|||
@GetMapping("page") |
|||
public Result<PageData<GuideCollectionDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<GuideCollectionDTO> page = guideCollectionService.page(params); |
|||
return new Result<PageData<GuideCollectionDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<GuideCollectionDTO> get(@PathVariable("id") String id){ |
|||
GuideCollectionDTO data = guideCollectionService.get(id); |
|||
return new Result<GuideCollectionDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
public Result save(@RequestBody GuideCollectionDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
guideCollectionService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PutMapping |
|||
public Result update(@RequestBody GuideCollectionDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
guideCollectionService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
guideCollectionService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
/** |
|||
* @Description 收藏指南 |
|||
* @Param tokenDto |
|||
* @Param formDTO |
|||
* @Return {@link Result} |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/9 9:46 |
|||
*/ |
|||
@PostMapping("collection") |
|||
public Result collection(@LoginUser TokenDto tokenDto, @RequestBody GuideFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO); |
|||
guideCollectionService.collection(tokenDto, formDTO); |
|||
return new Result(); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,180 @@ |
|||
/** |
|||
* 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.controller; |
|||
|
|||
import com.epmet.commons.tools.annotation.LoginUser; |
|||
import com.epmet.commons.tools.dto.form.PageFormDTO; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.AssertUtils; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.commons.tools.validator.group.AddGroup; |
|||
import com.epmet.commons.tools.validator.group.DefaultGroup; |
|||
import com.epmet.commons.tools.validator.group.UpdateGroup; |
|||
import com.epmet.dto.GuideDTO; |
|||
import com.epmet.dto.form.GuideAddFormDTO; |
|||
import com.epmet.dto.form.GuideEditFormDTO; |
|||
import com.epmet.dto.form.GuideFormDTO; |
|||
import com.epmet.dto.form.GuideListFormDTO; |
|||
import com.epmet.dto.result.GuideDetailResultDTO; |
|||
import com.epmet.dto.result.GuideListResultDTO; |
|||
import com.epmet.service.GuideService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.Map; |
|||
|
|||
|
|||
/** |
|||
* 办事指南表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-09-06 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("guide") |
|||
public class GuideController { |
|||
|
|||
@Autowired |
|||
private GuideService guideService; |
|||
|
|||
@GetMapping("page") |
|||
public Result<PageData<GuideDTO>> page(@RequestParam Map<String, Object> params) { |
|||
PageData<GuideDTO> page = guideService.page(params); |
|||
return new Result<PageData<GuideDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<GuideDTO> get(@PathVariable("id") String id) { |
|||
GuideDTO data = guideService.get(id); |
|||
return new Result<GuideDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
public Result save(@RequestBody GuideDTO dto) { |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
guideService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PutMapping |
|||
public Result update(@RequestBody GuideDTO dto) { |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
guideService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
public Result delete(@RequestBody String[] ids) { |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
guideService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
/** |
|||
* @Description 办事指南列表 |
|||
* @Param formDTO |
|||
* @Return {@link Result< PageData< GuideListResultDTO>>} |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/7 13:59 |
|||
*/ |
|||
@PostMapping("list") |
|||
public Result<PageData<GuideListResultDTO>> guideList(@LoginUser TokenDto tokenDto, @RequestBody GuideListFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO, PageFormDTO.AddUserInternalGroup.class); |
|||
PageData<GuideListResultDTO> page = guideService.guideList(tokenDto, formDTO); |
|||
return new Result<PageData<GuideListResultDTO>>().ok(page); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* @Description 添加指南 |
|||
* @Param tokenDto |
|||
* @Param formDTO |
|||
* @Return {@link Result} |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/7 14:13 |
|||
*/ |
|||
@PostMapping("add") |
|||
public Result guideAdd(@LoginUser TokenDto tokenDto, @RequestBody GuideAddFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO); |
|||
guideService.guideAdd(tokenDto, formDTO); |
|||
return new Result(); |
|||
} |
|||
|
|||
/** |
|||
* @Description 修改指南 |
|||
* @Param tokenDto |
|||
* @Param formDTO |
|||
* @Return {@link Result} |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/7 14:13 |
|||
*/ |
|||
@PostMapping("edit") |
|||
public Result guideEdit(@LoginUser TokenDto tokenDto, @RequestBody GuideEditFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO); |
|||
formDTO.setStaffId(tokenDto.getUserId()); |
|||
guideService.guideEdit(formDTO); |
|||
return new Result(); |
|||
} |
|||
|
|||
/** |
|||
* @Description 删除指南 |
|||
* @Param tokenDto |
|||
* @Param formDTO |
|||
* @Return {@link Result} |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/7 14:13 |
|||
*/ |
|||
@PostMapping("del") |
|||
public Result guideDel(@LoginUser TokenDto tokenDto, @RequestBody GuideFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO); |
|||
formDTO.setStaffId(tokenDto.getUserId()); |
|||
guideService.guideDel(formDTO); |
|||
return new Result(); |
|||
} |
|||
|
|||
/** |
|||
* @Description 指南详情 |
|||
* @Param tokenDto |
|||
* @Param formDTO |
|||
* @Return {@link Result< GuideDetailResultDTO>} |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/7 14:13 |
|||
*/ |
|||
@PostMapping("detail") |
|||
public Result<GuideDetailResultDTO> guideDetail(@LoginUser TokenDto tokenDto, @RequestBody GuideFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO); |
|||
formDTO.setCustomerId(tokenDto.getCustomerId()); |
|||
GuideDetailResultDTO result = guideService.guideDetail(tokenDto, formDTO); |
|||
return new Result<GuideDetailResultDTO>().ok(result); |
|||
} |
|||
|
|||
|
|||
@PostMapping("collectionlist") |
|||
public Result<PageData<GuideListResultDTO>> collectionList(@LoginUser TokenDto tokenDto, @RequestBody PageFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO, PageFormDTO.AddUserInternalGroup.class); |
|||
PageData<GuideListResultDTO> page = guideService.collectionList(tokenDto, formDTO); |
|||
return new Result<PageData<GuideListResultDTO>>().ok(page); |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,93 @@ |
|||
/** |
|||
* 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.controller; |
|||
|
|||
import com.epmet.commons.tools.annotation.LoginUser; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.AssertUtils; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.commons.tools.validator.group.AddGroup; |
|||
import com.epmet.commons.tools.validator.group.DefaultGroup; |
|||
import com.epmet.commons.tools.validator.group.UpdateGroup; |
|||
import com.epmet.dto.GuideModuleDTO; |
|||
import com.epmet.dto.ModuleDTO; |
|||
import com.epmet.service.GuideModuleService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
|
|||
/** |
|||
* 指南模块关联表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-09-06 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("guidemodule") |
|||
public class GuideModuleController { |
|||
|
|||
@Autowired |
|||
private GuideModuleService guideModuleService; |
|||
|
|||
@GetMapping("page") |
|||
public Result<PageData<GuideModuleDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<GuideModuleDTO> page = guideModuleService.page(params); |
|||
return new Result<PageData<GuideModuleDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<GuideModuleDTO> get(@PathVariable("id") String id){ |
|||
GuideModuleDTO data = guideModuleService.get(id); |
|||
return new Result<GuideModuleDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
public Result save(@RequestBody GuideModuleDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
guideModuleService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PutMapping |
|||
public Result update(@RequestBody GuideModuleDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
guideModuleService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
guideModuleService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PostMapping("list") |
|||
public Result<List<ModuleDTO>> getModuleList(@LoginUser TokenDto tokenDto) { |
|||
return new Result<List<ModuleDTO>>().ok(guideModuleService.getModuleList(tokenDto.getCustomerId())); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,84 @@ |
|||
/** |
|||
* 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.controller; |
|||
|
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.AssertUtils; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.commons.tools.validator.group.AddGroup; |
|||
import com.epmet.commons.tools.validator.group.DefaultGroup; |
|||
import com.epmet.commons.tools.validator.group.UpdateGroup; |
|||
import com.epmet.dto.GuideModuleDictDTO; |
|||
import com.epmet.service.GuideModuleDictService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.Map; |
|||
|
|||
|
|||
/** |
|||
* 指南模块字典表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-09-06 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("guidemoduledict") |
|||
public class GuideModuleDictController { |
|||
|
|||
@Autowired |
|||
private GuideModuleDictService guideModuleDictService; |
|||
|
|||
@GetMapping("page") |
|||
public Result<PageData<GuideModuleDictDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<GuideModuleDictDTO> page = guideModuleDictService.page(params); |
|||
return new Result<PageData<GuideModuleDictDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<GuideModuleDictDTO> get(@PathVariable("id") String id){ |
|||
GuideModuleDictDTO data = guideModuleDictService.get(id); |
|||
return new Result<GuideModuleDictDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
public Result save(@RequestBody GuideModuleDictDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
guideModuleDictService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PutMapping |
|||
public Result update(@RequestBody GuideModuleDictDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
guideModuleDictService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
guideModuleDictService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
} |
@ -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.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.GuideAttachmentEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 办事指南附件 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-09-06 |
|||
*/ |
|||
@Mapper |
|||
public interface GuideAttachmentDao extends BaseDao<GuideAttachmentEntity> { |
|||
|
|||
} |
@ -0,0 +1,98 @@ |
|||
/** |
|||
* 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; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.dto.GuideCategoryDTO; |
|||
import com.epmet.dto.result.GuideDictResDTO; |
|||
import com.epmet.entity.GuideCategoryEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 指南分类 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-09-06 |
|||
*/ |
|||
@Mapper |
|||
public interface GuideCategoryDao extends BaseDao<GuideCategoryEntity> { |
|||
|
|||
/** |
|||
* 工作端PC或者运营端分类列表查询,不分页 |
|||
* |
|||
* @param customerId |
|||
* @return java.util.List<com.epmet.dto.GuideCategoryDTO> |
|||
* @author yinzuomei |
|||
* @date 2021/9/8 1:57 下午 |
|||
*/ |
|||
List<GuideCategoryDTO> selectPageByCid(String customerId); |
|||
|
|||
/** |
|||
* 办事指南】可用分类列表 新增、编辑指南时的下拉框:展示未禁用的分类; 查询指南列表:如果禁用的分类下存在指南列表,则展示,不存在直接不展示 |
|||
* |
|||
* @param customerId |
|||
* @param queryOrigin |
|||
* @return java.util.List<com.epmet.dto.result.GuideDictResDTO> |
|||
* @author yinzuomei |
|||
* @date 2021/9/8 3:15 下午 |
|||
*/ |
|||
List<GuideDictResDTO> selectCategoryDict(@Param("customerId") String customerId, @Param("queryOrigin") String queryOrigin); |
|||
|
|||
/** |
|||
* 保存排序 |
|||
* |
|||
* @param id |
|||
* @param orderIndex |
|||
* @param staffId |
|||
* @return int |
|||
* @author yinzuomei |
|||
* @date 2021/9/8 4:11 下午 |
|||
*/ |
|||
int updateOrder(@Param("id") String id, @Param("orderIndex") Integer orderIndex, @Param("staffId") String staffId); |
|||
|
|||
/** |
|||
* 启用或者禁用 |
|||
* |
|||
* @param id |
|||
* @param status |
|||
* @param staffId |
|||
* @return int |
|||
* @author yinzuomei |
|||
* @date 2021/9/8 4:22 下午 |
|||
*/ |
|||
int updateStatus(@Param("id") String id, @Param("status")String status, @Param("staffId")String staffId); |
|||
|
|||
/** |
|||
* 查询这个分类下的项目数 |
|||
* |
|||
* @param id |
|||
* @return int |
|||
* @author yinzuomei |
|||
* @date 2021/9/8 4:36 下午 |
|||
*/ |
|||
int selectGuideTotal(@Param("id") String id,@Param("customerId") String customerId); |
|||
|
|||
int selectCategoryName(@Param("categoryName") String categoryName, @Param("customerId")String customerId, @Param("excludeId") String excludeId); |
|||
|
|||
int selectCurrentOrder(String customerId); |
|||
|
|||
int selectCategoryCode(@Param("categoryCode") String categoryCode, @Param("customerId")String customerId, @Param("excludeId") String excludeId); |
|||
} |
@ -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.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.GuideCollectionEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 指南收藏表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-09-06 |
|||
*/ |
|||
@Mapper |
|||
public interface GuideCollectionDao extends BaseDao<GuideCollectionEntity> { |
|||
|
|||
} |
@ -0,0 +1,71 @@ |
|||
/** |
|||
* 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; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.dto.form.GuideListFormDTO; |
|||
import com.epmet.dto.result.GuideDetailResultDTO; |
|||
import com.epmet.dto.result.GuideListResultDTO; |
|||
import com.epmet.entity.GuideEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 办事指南表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-09-06 |
|||
*/ |
|||
@Mapper |
|||
public interface GuideDao extends BaseDao<GuideEntity> { |
|||
|
|||
/** |
|||
* 指南列表 |
|||
* |
|||
* @Param formDTO |
|||
* @Return {@link List<GuideListResultDTO>} |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/7 14:21 |
|||
*/ |
|||
List<GuideListResultDTO> getGuideList(GuideListFormDTO formDTO); |
|||
|
|||
/** |
|||
* 指南详情 |
|||
* |
|||
* @Param customerId |
|||
* @Param guideId |
|||
* @Return {@link GuideDetailResultDTO} |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/8 9:59 |
|||
*/ |
|||
GuideDetailResultDTO getGuideDetail(@Param("customerId") String customerId, @Param("guideId") String guideId); |
|||
|
|||
/** |
|||
* 收藏列表 |
|||
* |
|||
* @Param tokenDto |
|||
* @Return {@link List< GuideListResultDTO>} |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/9 10:09 |
|||
*/ |
|||
List<GuideListResultDTO> getCollectionList(TokenDto tokenDto); |
|||
|
|||
} |
@ -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.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.GuideExternalLinkEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 指南外链表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-09-06 |
|||
*/ |
|||
@Mapper |
|||
public interface GuideExternalLinkDao extends BaseDao<GuideExternalLinkEntity> { |
|||
|
|||
} |
@ -0,0 +1,45 @@ |
|||
/** |
|||
* 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; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.dto.ModuleDTO; |
|||
import com.epmet.entity.GuideModuleEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 指南模块关联表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-09-06 |
|||
*/ |
|||
@Mapper |
|||
public interface GuideModuleDao extends BaseDao<GuideModuleEntity> { |
|||
/** |
|||
* @Description 获取指南的内容模块 |
|||
* @Param guideId |
|||
* @Return {@link List< ModuleDTO>} |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/8 10:18 |
|||
*/ |
|||
List<ModuleDTO> selectByGuideId(@Param("customerId") String customerId, @Param("guideId") String guideId); |
|||
|
|||
} |
@ -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.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.GuideModuleDictEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 指南模块字典表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-09-06 |
|||
*/ |
|||
@Mapper |
|||
public interface GuideModuleDictDao extends BaseDao<GuideModuleDictEntity> { |
|||
|
|||
} |
@ -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.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.GuideModuleDictDefaultEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 指南模块默认字典表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-09-06 |
|||
*/ |
|||
@Mapper |
|||
public interface GuideModuleDictDefaultDao extends BaseDao<GuideModuleDictDefaultEntity> { |
|||
|
|||
} |
@ -0,0 +1,83 @@ |
|||
/** |
|||
* 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; |
|||
|
|||
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 2021-09-06 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("guide_attachment") |
|||
public class GuideAttachmentEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 办事指南ID |
|||
*/ |
|||
private String guideId; |
|||
|
|||
/** |
|||
* 附件名 |
|||
*/ |
|||
private String attachmentName; |
|||
|
|||
/** |
|||
* 文件大小 单位byte |
|||
*/ |
|||
private Integer attachmentSize; |
|||
|
|||
/** |
|||
* 文件格式 word、excel、pdf |
|||
*/ |
|||
private String attachmentFormat; |
|||
|
|||
/** |
|||
* 类型 |
|||
*/ |
|||
private String attachmentType; |
|||
|
|||
/** |
|||
* 附件地址 |
|||
*/ |
|||
private String attachmentUrl; |
|||
|
|||
/** |
|||
* 语音或视频时长,秒 |
|||
*/ |
|||
private Integer duration; |
|||
|
|||
/** |
|||
* 排序 |
|||
*/ |
|||
private Integer sort; |
|||
|
|||
} |
@ -0,0 +1,63 @@ |
|||
/** |
|||
* 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; |
|||
|
|||
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 2021-09-08 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("guide_category") |
|||
public class GuideCategoryEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户id,产品默认配置此列存储default |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 分类名,客户内唯一 |
|||
*/ |
|||
private String categoryName; |
|||
|
|||
/** |
|||
* 分类编码:分类名的全拼; eg:gongjijin |
|||
*/ |
|||
private String categoryCode; |
|||
|
|||
/** |
|||
* 排序 |
|||
*/ |
|||
private Integer sort; |
|||
|
|||
/** |
|||
* 状态 禁用disable 启用enable |
|||
*/ |
|||
private String status; |
|||
|
|||
} |
@ -0,0 +1,61 @@ |
|||
/** |
|||
* 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; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 指南收藏表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-09-06 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("guide_collection") |
|||
public class GuideCollectionEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 指南ID |
|||
*/ |
|||
private String guideId; |
|||
|
|||
/** |
|||
* 用户ID |
|||
*/ |
|||
private String userId; |
|||
|
|||
/** |
|||
* 用户所属客户端 居民端resi 工作端gov |
|||
*/ |
|||
private String app; |
|||
|
|||
} |
@ -0,0 +1,78 @@ |
|||
/** |
|||
* 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; |
|||
|
|||
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 2021-09-06 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("guide") |
|||
public class GuideEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 发布单位类型 机关agency 网格grid 部门dept |
|||
*/ |
|||
private String orgType; |
|||
|
|||
/** |
|||
* 发布单位ID |
|||
*/ |
|||
private String orgId; |
|||
|
|||
/** |
|||
* 发布单位名称 |
|||
*/ |
|||
private String orgName; |
|||
|
|||
/** |
|||
* 所属组织机构ID(customer_agency.id) |
|||
*/ |
|||
private String pid; |
|||
|
|||
/** |
|||
* 所有上级组织ID,英文:隔开 |
|||
*/ |
|||
private String pids; |
|||
|
|||
/** |
|||
* 标题 |
|||
*/ |
|||
private String title; |
|||
|
|||
/** |
|||
* 分类ID |
|||
*/ |
|||
private String categoryCode; |
|||
|
|||
} |
@ -0,0 +1,63 @@ |
|||
/** |
|||
* 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; |
|||
|
|||
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 2021-09-06 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("guide_external_link") |
|||
public class GuideExternalLinkEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 指南ID |
|||
*/ |
|||
private String guideId; |
|||
|
|||
/** |
|||
* 链接说明 |
|||
*/ |
|||
private String description; |
|||
|
|||
/** |
|||
* 外部链接 |
|||
*/ |
|||
private String externalLink; |
|||
|
|||
/** |
|||
* 排序 |
|||
*/ |
|||
private Integer sort; |
|||
|
|||
} |
@ -0,0 +1,61 @@ |
|||
/** |
|||
* 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; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 指南模块默认字典表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-09-06 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("guide_module_dict_default") |
|||
public class GuideModuleDictDefaultEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 模块key |
|||
*/ |
|||
private String moduleValue; |
|||
|
|||
/** |
|||
* 模块名 |
|||
*/ |
|||
private String moduleName; |
|||
|
|||
/** |
|||
* 排序 |
|||
*/ |
|||
private Integer sort; |
|||
|
|||
/** |
|||
* 状态 禁用disable 启用enable |
|||
*/ |
|||
private String status; |
|||
|
|||
} |
@ -0,0 +1,66 @@ |
|||
/** |
|||
* 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; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 指南模块字典表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-09-06 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("guide_module_dict") |
|||
public class GuideModuleDictEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 模块key |
|||
*/ |
|||
private String moduleValue; |
|||
|
|||
/** |
|||
* 模块名 |
|||
*/ |
|||
private String moduleName; |
|||
|
|||
/** |
|||
* 排序 |
|||
*/ |
|||
private Integer sort; |
|||
|
|||
/** |
|||
* 状态 禁用disable 启用enable |
|||
*/ |
|||
private String status; |
|||
|
|||
} |
@ -0,0 +1,61 @@ |
|||
/** |
|||
* 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; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 指南模块关联表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-09-06 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("guide_module") |
|||
public class GuideModuleEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 指南ID |
|||
*/ |
|||
private String guideId; |
|||
|
|||
/** |
|||
* 模块ID |
|||
*/ |
|||
private String moduleId; |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private String moduleContent; |
|||
|
|||
} |
@ -0,0 +1,114 @@ |
|||
/** |
|||
* 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; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.dto.AttachmentDTO; |
|||
import com.epmet.dto.GuideAttachmentDTO; |
|||
import com.epmet.entity.GuideAttachmentEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 办事指南附件 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-09-06 |
|||
*/ |
|||
public interface GuideAttachmentService extends BaseService<GuideAttachmentEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<GuideAttachmentDTO> |
|||
* @author generator |
|||
* @date 2021-09-06 |
|||
*/ |
|||
PageData<GuideAttachmentDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<GuideAttachmentDTO> |
|||
* @author generator |
|||
* @date 2021-09-06 |
|||
*/ |
|||
List<GuideAttachmentDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return GuideAttachmentDTO |
|||
* @author generator |
|||
* @date 2021-09-06 |
|||
*/ |
|||
GuideAttachmentDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2021-09-06 |
|||
*/ |
|||
void save(GuideAttachmentDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2021-09-06 |
|||
*/ |
|||
void update(GuideAttachmentDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2021-09-06 |
|||
*/ |
|||
void delete(String[] ids); |
|||
|
|||
/** |
|||
* @Description 删除指南附件 |
|||
* @Param guideId |
|||
* @Return |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/7 17:16 |
|||
*/ |
|||
void deleteByGuideId(String guideId); |
|||
|
|||
/** |
|||
* @Description 获取指南附件 |
|||
* @Param guideId |
|||
* @Return {@link List< AttachmentDTO>} |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/8 10:49 |
|||
*/ |
|||
List<AttachmentDTO> getByGuideId(String guideId); |
|||
} |
@ -0,0 +1,110 @@ |
|||
/** |
|||
* 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; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.dto.GuideCategoryDTO; |
|||
import com.epmet.dto.form.EditGuideCategoryFormDTO; |
|||
import com.epmet.dto.form.GuideCateOrderFormDTO; |
|||
import com.epmet.dto.form.GuideCategoryDropDownFormDTO; |
|||
import com.epmet.dto.form.GuideCategoryPageFormDTO; |
|||
import com.epmet.dto.result.GuideDictResDTO; |
|||
import com.epmet.entity.GuideCategoryEntity; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 指南分类 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-09-06 |
|||
*/ |
|||
public interface GuideCategoryService extends BaseService<GuideCategoryEntity> { |
|||
|
|||
/** |
|||
* 【办事指南】分类列表-工作端PC和运营端用不分页 |
|||
* |
|||
* @param formDTO |
|||
* @return com.epmet.commons.tools.utils.Result<com.epmet.commons.tools.page.PageData<com.epmet.dto.GuideCategoryDTO>> |
|||
* @author yinzuomei |
|||
* @date 2021/9/8 1:33 下午 |
|||
*/ |
|||
PageData<GuideCategoryDTO> page(GuideCategoryPageFormDTO formDTO); |
|||
|
|||
/** |
|||
* 办事指南】可用分类列表 新增、编辑指南时的下拉框:展示未禁用的分类; 查询指南列表:如果禁用的分类下存在指南列表,则展示,不存在直接不展示 |
|||
* |
|||
* @param formDTO |
|||
* @return java.util.List<com.epmet.dto.result.GuideDictResDTO> |
|||
* @author yinzuomei |
|||
* @date 2021/9/8 3:06 下午 |
|||
*/ |
|||
List<GuideDictResDTO> getCategory(GuideCategoryDropDownFormDTO formDTO); |
|||
|
|||
/** |
|||
* 保存排序 |
|||
* |
|||
* @param formDTO |
|||
* @return void |
|||
* @author yinzuomei |
|||
* @date 2021/9/8 4:09 下午 |
|||
*/ |
|||
void saveOrder(GuideCateOrderFormDTO formDTO); |
|||
|
|||
|
|||
/** |
|||
* 启用或者禁用分类 |
|||
* |
|||
* @param formDTO |
|||
* @return int |
|||
* @author yinzuomei |
|||
* @date 2021/9/8 4:20 下午 |
|||
*/ |
|||
void disableGuideCategory(EditGuideCategoryFormDTO formDTO); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2021-09-06 |
|||
*/ |
|||
GuideCategoryDTO save(EditGuideCategoryFormDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2021-09-06 |
|||
*/ |
|||
GuideCategoryDTO update(EditGuideCategoryFormDTO dto); |
|||
|
|||
/** |
|||
* 删除分类,存在办事指南的不允许删除,给予提示 |
|||
* |
|||
* @param formDTO |
|||
* @return void |
|||
* @author yinzuomei |
|||
* @date 2021/9/8 4:34 下午 |
|||
*/ |
|||
void delete(EditGuideCategoryFormDTO formDTO); |
|||
} |
@ -0,0 +1,117 @@ |
|||
/** |
|||
* 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; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.dto.GuideCollectionDTO; |
|||
import com.epmet.dto.form.GuideFormDTO; |
|||
import com.epmet.entity.GuideCollectionEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 指南收藏表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-09-06 |
|||
*/ |
|||
public interface GuideCollectionService extends BaseService<GuideCollectionEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<GuideCollectionDTO> |
|||
* @author generator |
|||
* @date 2021-09-06 |
|||
*/ |
|||
PageData<GuideCollectionDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<GuideCollectionDTO> |
|||
* @author generator |
|||
* @date 2021-09-06 |
|||
*/ |
|||
List<GuideCollectionDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return GuideCollectionDTO |
|||
* @author generator |
|||
* @date 2021-09-06 |
|||
*/ |
|||
GuideCollectionDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2021-09-06 |
|||
*/ |
|||
void save(GuideCollectionDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2021-09-06 |
|||
*/ |
|||
void update(GuideCollectionDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2021-09-06 |
|||
*/ |
|||
void delete(String[] ids); |
|||
|
|||
/** |
|||
* @Description 收藏指南 |
|||
* @Param tokenDto |
|||
* @Param formDTO |
|||
* @Return |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/9 9:46 |
|||
*/ |
|||
void collection(TokenDto tokenDto, GuideFormDTO formDTO); |
|||
|
|||
/** |
|||
* @Description 获取收藏信息 |
|||
* @Param tokenDto |
|||
* @Param guideId |
|||
* @Return {@link GuideCollectionDTO} |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/10 9:52 |
|||
*/ |
|||
GuideCollectionDTO getCollection(TokenDto tokenDto, String guideId); |
|||
} |
@ -0,0 +1,114 @@ |
|||
/** |
|||
* 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; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.dto.ExternalLinkDTO; |
|||
import com.epmet.dto.GuideExternalLinkDTO; |
|||
import com.epmet.entity.GuideExternalLinkEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 指南外链表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-09-06 |
|||
*/ |
|||
public interface GuideExternalLinkService extends BaseService<GuideExternalLinkEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<GuideExternalLinkDTO> |
|||
* @author generator |
|||
* @date 2021-09-06 |
|||
*/ |
|||
PageData<GuideExternalLinkDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<GuideExternalLinkDTO> |
|||
* @author generator |
|||
* @date 2021-09-06 |
|||
*/ |
|||
List<GuideExternalLinkDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return GuideExternalLinkDTO |
|||
* @author generator |
|||
* @date 2021-09-06 |
|||
*/ |
|||
GuideExternalLinkDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2021-09-06 |
|||
*/ |
|||
void save(GuideExternalLinkDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2021-09-06 |
|||
*/ |
|||
void update(GuideExternalLinkDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2021-09-06 |
|||
*/ |
|||
void delete(String[] ids); |
|||
|
|||
/** |
|||
* @Description 删除指南外链 |
|||
* @Param guideId |
|||
* @Return |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/7 17:20 |
|||
*/ |
|||
void deleteByGuideId(String guideId); |
|||
|
|||
/** |
|||
* @Description 获取指南外链 |
|||
* @Param guideId |
|||
* @Return {@link List< ExternalLinkDTO>} |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/8 11:05 |
|||
*/ |
|||
List<ExternalLinkDTO> getByGuideId(String guideId); |
|||
} |
@ -0,0 +1,104 @@ |
|||
/** |
|||
* 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; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.dto.GuideModuleDictDefaultDTO; |
|||
import com.epmet.entity.GuideModuleDictDefaultEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 指南模块默认字典表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-09-06 |
|||
*/ |
|||
public interface GuideModuleDictDefaultService extends BaseService<GuideModuleDictDefaultEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<GuideModuleDictDefaultDTO> |
|||
* @author generator |
|||
* @date 2021-09-06 |
|||
*/ |
|||
PageData<GuideModuleDictDefaultDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<GuideModuleDictDefaultDTO> |
|||
* @author generator |
|||
* @date 2021-09-06 |
|||
*/ |
|||
List<GuideModuleDictDefaultDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return GuideModuleDictDefaultDTO |
|||
* @author generator |
|||
* @date 2021-09-06 |
|||
*/ |
|||
GuideModuleDictDefaultDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2021-09-06 |
|||
*/ |
|||
void save(GuideModuleDictDefaultDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2021-09-06 |
|||
*/ |
|||
void update(GuideModuleDictDefaultDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2021-09-06 |
|||
*/ |
|||
void delete(String[] ids); |
|||
|
|||
/** |
|||
* 获取默认配置 |
|||
* @Param |
|||
* @Return {@link List< GuideModuleDictDefaultDTO>} |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/8 17:44 |
|||
*/ |
|||
List<GuideModuleDictDefaultDTO> getList(); |
|||
} |
@ -0,0 +1,105 @@ |
|||
/** |
|||
* 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; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.dto.GuideModuleDictDTO; |
|||
import com.epmet.dto.ModuleDTO; |
|||
import com.epmet.entity.GuideModuleDictEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 指南模块字典表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-09-06 |
|||
*/ |
|||
public interface GuideModuleDictService extends BaseService<GuideModuleDictEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<GuideModuleDictDTO> |
|||
* @author generator |
|||
* @date 2021-09-06 |
|||
*/ |
|||
PageData<GuideModuleDictDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<GuideModuleDictDTO> |
|||
* @author generator |
|||
* @date 2021-09-06 |
|||
*/ |
|||
List<GuideModuleDictDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return GuideModuleDictDTO |
|||
* @author generator |
|||
* @date 2021-09-06 |
|||
*/ |
|||
GuideModuleDictDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2021-09-06 |
|||
*/ |
|||
void save(GuideModuleDictDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2021-09-06 |
|||
*/ |
|||
void update(GuideModuleDictDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2021-09-06 |
|||
*/ |
|||
void delete(String[] ids); |
|||
|
|||
/** |
|||
* @Description 获取模块列表 |
|||
* @Param customerId |
|||
* @Return {@link List< ModuleDTO>} |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/8 17:50 |
|||
*/ |
|||
List<ModuleDTO> getModuleList(String customerId); |
|||
} |
@ -0,0 +1,124 @@ |
|||
/** |
|||
* 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; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.dto.GuideModuleDTO; |
|||
import com.epmet.dto.ModuleDTO; |
|||
import com.epmet.entity.GuideModuleEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 指南模块关联表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-09-06 |
|||
*/ |
|||
public interface GuideModuleService extends BaseService<GuideModuleEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<GuideModuleDTO> |
|||
* @author generator |
|||
* @date 2021-09-06 |
|||
*/ |
|||
PageData<GuideModuleDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<GuideModuleDTO> |
|||
* @author generator |
|||
* @date 2021-09-06 |
|||
*/ |
|||
List<GuideModuleDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return GuideModuleDTO |
|||
* @author generator |
|||
* @date 2021-09-06 |
|||
*/ |
|||
GuideModuleDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2021-09-06 |
|||
*/ |
|||
void save(GuideModuleDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2021-09-06 |
|||
*/ |
|||
void update(GuideModuleDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2021-09-06 |
|||
*/ |
|||
void delete(String[] ids); |
|||
|
|||
/** |
|||
* @Description 删除指南的内容模块 |
|||
* @Param guideId |
|||
* @Return |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/7 17:01 |
|||
*/ |
|||
void deleteByGuideId(String guideId); |
|||
|
|||
/** |
|||
* @Description |
|||
* @Param customerId |
|||
* @Param guideId |
|||
* @Return {@link ModuleDTO} |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/8 10:13 |
|||
*/ |
|||
List<ModuleDTO> getByGuideId(String customerId, String guideId); |
|||
|
|||
/** |
|||
* @Description 获取模块列表 |
|||
* @Param customerId |
|||
* @Return {@link List< ModuleDTO>} |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/9 14:46 |
|||
*/ |
|||
List<ModuleDTO> getModuleList(String customerId); |
|||
} |
@ -0,0 +1,165 @@ |
|||
/** |
|||
* 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; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.commons.tools.dto.form.PageFormDTO; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.dto.GuideDTO; |
|||
import com.epmet.dto.form.GuideAddFormDTO; |
|||
import com.epmet.dto.form.GuideEditFormDTO; |
|||
import com.epmet.dto.form.GuideFormDTO; |
|||
import com.epmet.dto.form.GuideListFormDTO; |
|||
import com.epmet.dto.result.GuideDetailResultDTO; |
|||
import com.epmet.dto.result.GuideListResultDTO; |
|||
import com.epmet.entity.GuideEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 办事指南表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-09-06 |
|||
*/ |
|||
public interface GuideService extends BaseService<GuideEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<GuideDTO> |
|||
* @author generator |
|||
* @date 2021-09-06 |
|||
*/ |
|||
PageData<GuideDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<GuideDTO> |
|||
* @author generator |
|||
* @date 2021-09-06 |
|||
*/ |
|||
List<GuideDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return GuideDTO |
|||
* @author generator |
|||
* @date 2021-09-06 |
|||
*/ |
|||
GuideDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2021-09-06 |
|||
*/ |
|||
void save(GuideDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2021-09-06 |
|||
*/ |
|||
void update(GuideDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2021-09-06 |
|||
*/ |
|||
void delete(String[] ids); |
|||
|
|||
/** |
|||
* 办事指南列表 |
|||
* |
|||
* @Param formDTO |
|||
* @Return {@link PageData<GuideListResultDTO>} |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/7 14:00 |
|||
*/ |
|||
PageData<GuideListResultDTO> guideList(TokenDto tokenDto, GuideListFormDTO formDTO); |
|||
|
|||
/** |
|||
* 添加指南 |
|||
* |
|||
* @Param tokenDto |
|||
* @Param formDTO |
|||
* @Return |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/7 14:12 |
|||
*/ |
|||
void guideAdd(TokenDto tokenDto, GuideAddFormDTO formDTO); |
|||
|
|||
/** |
|||
* 修改指南 |
|||
* |
|||
* @Param formDTO |
|||
* @Return |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/7 14:12 |
|||
*/ |
|||
void guideEdit(GuideEditFormDTO formDTO); |
|||
|
|||
/** |
|||
* 删除指南 |
|||
* |
|||
* @Param formDTO |
|||
* @Return |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/7 14:12 |
|||
*/ |
|||
void guideDel(GuideFormDTO formDTO); |
|||
|
|||
/** |
|||
* 指南详情 |
|||
* |
|||
* @Param tokenDto |
|||
* @Param formDTO |
|||
* @Return {@link GuideDetailResultDTO} |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/7 14:12 |
|||
*/ |
|||
GuideDetailResultDTO guideDetail(TokenDto tokenDto, GuideFormDTO formDTO); |
|||
|
|||
/** |
|||
* @Description 收藏列表 |
|||
* @Param tokenDto |
|||
* @Param formDTO |
|||
* @Return {@link PageData< GuideListResultDTO>} |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/9 10:07 |
|||
*/ |
|||
PageData<GuideListResultDTO> collectionList(TokenDto tokenDto, PageFormDTO formDTO); |
|||
} |
@ -0,0 +1,149 @@ |
|||
/** |
|||
* 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.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.constant.FieldConstant; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.dao.GuideAttachmentDao; |
|||
import com.epmet.dto.AttachmentDTO; |
|||
import com.epmet.dto.GuideAttachmentDTO; |
|||
import com.epmet.entity.GuideAttachmentEntity; |
|||
import com.epmet.service.GuideAttachmentService; |
|||
import org.apache.commons.collections4.CollectionUtils; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.Arrays; |
|||
import java.util.Collections; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
import java.util.stream.Collectors; |
|||
|
|||
/** |
|||
* 办事指南附件 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-09-06 |
|||
*/ |
|||
@Service |
|||
public class GuideAttachmentServiceImpl extends BaseServiceImpl<GuideAttachmentDao, GuideAttachmentEntity> implements GuideAttachmentService { |
|||
|
|||
|
|||
@Override |
|||
public PageData<GuideAttachmentDTO> page(Map<String, Object> params) { |
|||
IPage<GuideAttachmentEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, GuideAttachmentDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<GuideAttachmentDTO> list(Map<String, Object> params) { |
|||
List<GuideAttachmentEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, GuideAttachmentDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<GuideAttachmentEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<GuideAttachmentEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public GuideAttachmentDTO get(String id) { |
|||
GuideAttachmentEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, GuideAttachmentDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(GuideAttachmentDTO dto) { |
|||
GuideAttachmentEntity entity = ConvertUtils.sourceToTarget(dto, GuideAttachmentEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(GuideAttachmentDTO dto) { |
|||
GuideAttachmentEntity entity = ConvertUtils.sourceToTarget(dto, GuideAttachmentEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
/** |
|||
* @param guideId |
|||
* @Description 删除指南附件 |
|||
* @Param guideId |
|||
* @Return |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/7 17:16 |
|||
*/ |
|||
@Override |
|||
public void deleteByGuideId(String guideId) { |
|||
LambdaQueryWrapper<GuideAttachmentEntity> wrapper = new LambdaQueryWrapper<>(); |
|||
wrapper.eq(GuideAttachmentEntity::getGuideId, guideId); |
|||
baseDao.delete(wrapper); |
|||
} |
|||
|
|||
/** |
|||
* @param guideId |
|||
* @Description 获取指南附件 |
|||
* @Param guideId |
|||
* @Return {@link List< AttachmentDTO >} |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/8 10:49 |
|||
*/ |
|||
@Override |
|||
public List<AttachmentDTO> getByGuideId(String guideId) { |
|||
LambdaQueryWrapper<GuideAttachmentEntity> wrapper = new LambdaQueryWrapper<>(); |
|||
wrapper.eq(GuideAttachmentEntity::getGuideId, guideId); |
|||
wrapper.orderByAsc(GuideAttachmentEntity::getSort); |
|||
List<GuideAttachmentEntity> list = baseDao.selectList(wrapper); |
|||
if (CollectionUtils.isEmpty(list)) { |
|||
return Collections.emptyList(); |
|||
} |
|||
return list.stream().map(item -> { |
|||
AttachmentDTO dto = new AttachmentDTO(); |
|||
dto.setName(item.getAttachmentName()); |
|||
dto.setType(item.getAttachmentType()); |
|||
dto.setUrl(item.getAttachmentUrl()); |
|||
dto.setSize(item.getAttachmentSize()); |
|||
dto.setFormat(item.getAttachmentFormat()); |
|||
dto.setDuration(item.getDuration()); |
|||
return dto; |
|||
}).collect(Collectors.toList()); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,225 @@ |
|||
/** |
|||
* 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.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.constant.Constant; |
|||
import com.epmet.commons.tools.constant.FieldConstant; |
|||
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|||
import com.epmet.commons.tools.exception.RenException; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.commons.tools.utils.Pinyin4jUtil; |
|||
import com.epmet.dao.GuideCategoryDao; |
|||
import com.epmet.dto.GuideCategoryDTO; |
|||
import com.epmet.dto.form.EditGuideCategoryFormDTO; |
|||
import com.epmet.dto.form.GuideCateOrderFormDTO; |
|||
import com.epmet.dto.form.GuideCategoryDropDownFormDTO; |
|||
import com.epmet.dto.form.GuideCategoryPageFormDTO; |
|||
import com.epmet.dto.result.GuideDictResDTO; |
|||
import com.epmet.entity.GuideCategoryEntity; |
|||
import com.epmet.service.GuideCategoryService; |
|||
import com.github.pagehelper.PageInfo; |
|||
import org.apache.commons.collections4.CollectionUtils; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 指南分类 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-09-06 |
|||
*/ |
|||
@Service |
|||
public class GuideCategoryServiceImpl extends BaseServiceImpl<GuideCategoryDao, GuideCategoryEntity> implements GuideCategoryService { |
|||
|
|||
|
|||
/** |
|||
* 【办事指南】分类列表-工作端PC和运营端用不分页 |
|||
* |
|||
* @param formDTO |
|||
* @return com.epmet.commons.tools.utils.Result<com.epmet.commons.tools.page.PageData<com.epmet.dto.GuideCategoryDTO>> |
|||
* @author yinzuomei |
|||
* @date 2021/9/8 1:33 下午 |
|||
*/ |
|||
@Transactional(rollbackFor = Exception.class) |
|||
@Override |
|||
public PageData<GuideCategoryDTO> page(GuideCategoryPageFormDTO formDTO) { |
|||
List<GuideCategoryDTO> list = baseDao.selectPageByCid(formDTO.getCustomerId()); |
|||
if (CollectionUtils.isEmpty(list) && !formDTO.getCustomerId().equals(Constant.DEFAULT_CUSTOMER)) { |
|||
//初始化默认的给客户
|
|||
initCustomerGuideCategory(formDTO.getCustomerId()); |
|||
list = baseDao.selectPageByCid(formDTO.getCustomerId()); |
|||
} |
|||
PageInfo<GuideCategoryDTO> pageInfo = new PageInfo<>(list); |
|||
return new PageData<>(list, pageInfo.getTotal()); |
|||
} |
|||
|
|||
/** |
|||
* 产品默认分类同步给客户,已经禁用的不同步 |
|||
* |
|||
* @param customerId |
|||
* @return void |
|||
* @author yinzuomei |
|||
* @date 2021/9/8 2:17 下午 |
|||
*/ |
|||
private void initCustomerGuideCategory(String customerId) { |
|||
List<GuideCategoryDTO> list = baseDao.selectPageByCid(Constant.DEFAULT_CUSTOMER); |
|||
int sort = 0; |
|||
for (GuideCategoryDTO dto : list) { |
|||
// 已经禁用的,不同步给客户
|
|||
if (Constant.DISABLE.equals(dto.getStatus())) { |
|||
continue; |
|||
} |
|||
dto.setCustomerId(customerId); |
|||
//清空主键
|
|||
dto.setId(null); |
|||
dto.setSort(sort); |
|||
GuideCategoryEntity entity = ConvertUtils.sourceToTarget(dto, GuideCategoryEntity.class); |
|||
insert(entity); |
|||
sort++; |
|||
} |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 办事指南】可用分类列表 新增、编辑指南时的下拉框:展示未禁用的分类; 查询指南列表:如果禁用的分类下存在指南列表,则展示,不存在直接不展示 |
|||
* |
|||
* @param formDTO |
|||
* @return java.util.List<com.epmet.dto.result.GuideDictResDTO> |
|||
* @author yinzuomei |
|||
* @date 2021/9/8 3:06 下午 |
|||
*/ |
|||
@Override |
|||
public List<GuideDictResDTO> getCategory(GuideCategoryDropDownFormDTO formDTO) { |
|||
List<GuideDictResDTO> list=baseDao.selectCategoryDict(formDTO.getCustomerId(),formDTO.getQueryOrigin()); |
|||
if (CollectionUtils.isEmpty(list) && !formDTO.getCustomerId().equals(Constant.DEFAULT_CUSTOMER)) { |
|||
//初始化默认的给客户
|
|||
initCustomerGuideCategory(formDTO.getCustomerId()); |
|||
list=baseDao.selectCategoryDict(formDTO.getCustomerId(),formDTO.getQueryOrigin()); |
|||
} |
|||
return list; |
|||
} |
|||
|
|||
/** |
|||
* 保存排序 |
|||
* |
|||
* @param formDTO |
|||
* @return void |
|||
* @author yinzuomei |
|||
* @date 2021/9/8 4:09 下午 |
|||
*/ |
|||
@Transactional |
|||
@Override |
|||
public void saveOrder(GuideCateOrderFormDTO formDTO) { |
|||
for (GuideCateOrderFormDTO.OrderIndexDTO idx : formDTO.getOrderList()) { |
|||
baseDao.updateOrder(idx.getId(), idx.getOrderIndex(),formDTO.getStaffId()); |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* 启用或者禁用分类 |
|||
* |
|||
* @param formDTO |
|||
* @return int |
|||
* @author yinzuomei |
|||
* @date 2021/9/8 4:20 下午 |
|||
*/ |
|||
@Override |
|||
public void disableGuideCategory(EditGuideCategoryFormDTO formDTO) { |
|||
baseDao.updateStatus(formDTO.getId(), formDTO.getStatus(),formDTO.getStaffId()); |
|||
} |
|||
|
|||
private QueryWrapper<GuideCategoryEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<GuideCategoryEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
/** |
|||
* 新增分类,名称和编码客户内唯一 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author yinzuomei |
|||
* @date 2021/9/8 5:12 下午 |
|||
*/ |
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public GuideCategoryDTO save(EditGuideCategoryFormDTO dto) { |
|||
if (baseDao.selectCategoryName(dto.getCategoryName().trim(), dto.getCustomerId(), null) > 0) { |
|||
throw new RenException(EpmetErrorCode.GUIDE_CATEGORY_NAME_EXITS.getCode(), EpmetErrorCode.GUIDE_CATEGORY_NAME_EXITS.getMsg()); |
|||
} |
|||
String categoryCode = Pinyin4jUtil.getFirstSpellPinYin(dto.getCategoryName(), true); |
|||
if (baseDao.selectCategoryCode(categoryCode, dto.getCustomerId(), null) > 0) { |
|||
throw new RenException(EpmetErrorCode.GUIDE_CATEGORY_NAME_EXITS.getCode(), EpmetErrorCode.GUIDE_CATEGORY_NAME_EXITS.getMsg()); |
|||
} |
|||
GuideCategoryEntity entity = new GuideCategoryEntity(); |
|||
entity.setCustomerId(dto.getCustomerId()); |
|||
entity.setCategoryName(dto.getCategoryName()); |
|||
entity.setCategoryCode(categoryCode); |
|||
int currentMax = baseDao.selectCurrentOrder(dto.getCustomerId()); |
|||
entity.setSort(currentMax == 0 ? currentMax : currentMax + 1); |
|||
entity.setStatus(Constant.ENABLE); |
|||
insert(entity); |
|||
return ConvertUtils.sourceToTarget(entity,GuideCategoryDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public GuideCategoryDTO update(EditGuideCategoryFormDTO dto) { |
|||
if (baseDao.selectCategoryName(dto.getCategoryName().trim(), dto.getCustomerId(), dto.getId()) > 0) { |
|||
throw new RenException(EpmetErrorCode.GUIDE_CATEGORY_NAME_EXITS.getCode(), EpmetErrorCode.GUIDE_CATEGORY_NAME_EXITS.getMsg()); |
|||
} |
|||
String categoryCode = Pinyin4jUtil.getFirstSpellPinYin(dto.getCategoryName(), true); |
|||
if (baseDao.selectCategoryCode(categoryCode, dto.getCustomerId(), dto.getId()) > 0) { |
|||
throw new RenException(EpmetErrorCode.GUIDE_CATEGORY_NAME_EXITS.getCode(), EpmetErrorCode.GUIDE_CATEGORY_NAME_EXITS.getMsg()); |
|||
} |
|||
GuideCategoryEntity origin=baseDao.selectById(dto.getId()); |
|||
origin.setCategoryCode(categoryCode); |
|||
origin.setCategoryName(dto.getCategoryName()); |
|||
updateById(origin); |
|||
return ConvertUtils.sourceToTarget(origin,GuideCategoryDTO.class); |
|||
} |
|||
/** |
|||
* 删除分类,存在办事指南的不允许删除,给予提示 |
|||
* |
|||
* @param formDTO |
|||
* @return void |
|||
* @author yinzuomei |
|||
* @date 2021/9/8 4:34 下午 |
|||
*/ |
|||
@Override |
|||
public void delete(EditGuideCategoryFormDTO formDTO) { |
|||
// 存在指南的分类不允许删除
|
|||
if(baseDao.selectGuideTotal(formDTO.getId(),formDTO.getCustomerId())>0){ |
|||
throw new RenException(EpmetErrorCode.HAVE_GUIDE_CANNOT_DEL.getCode(),EpmetErrorCode.HAVE_GUIDE_CANNOT_DEL.getMsg()); |
|||
} |
|||
baseDao.deleteById(formDTO.getId()); |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,157 @@ |
|||
/** |
|||
* 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.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.constant.FieldConstant; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.dao.GuideCollectionDao; |
|||
import com.epmet.dto.GuideCollectionDTO; |
|||
import com.epmet.dto.form.GuideFormDTO; |
|||
import com.epmet.entity.GuideCollectionEntity; |
|||
import com.epmet.service.GuideCollectionService; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.Arrays; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 指南收藏表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-09-06 |
|||
*/ |
|||
@Service |
|||
public class GuideCollectionServiceImpl extends BaseServiceImpl<GuideCollectionDao, GuideCollectionEntity> implements GuideCollectionService { |
|||
|
|||
|
|||
@Override |
|||
public PageData<GuideCollectionDTO> page(Map<String, Object> params) { |
|||
IPage<GuideCollectionEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, GuideCollectionDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<GuideCollectionDTO> list(Map<String, Object> params) { |
|||
List<GuideCollectionEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, GuideCollectionDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<GuideCollectionEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<GuideCollectionEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public GuideCollectionDTO get(String id) { |
|||
GuideCollectionEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, GuideCollectionDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(GuideCollectionDTO dto) { |
|||
GuideCollectionEntity entity = ConvertUtils.sourceToTarget(dto, GuideCollectionEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(GuideCollectionDTO dto) { |
|||
GuideCollectionEntity entity = ConvertUtils.sourceToTarget(dto, GuideCollectionEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
/** |
|||
* @param tokenDto |
|||
* @param formDTO |
|||
* @Description 收藏指南 |
|||
* @Param tokenDto |
|||
* @Param formDTO |
|||
* @Return |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/9 9:46 |
|||
*/ |
|||
@Override |
|||
public void collection(TokenDto tokenDto, GuideFormDTO formDTO) { |
|||
//获取指南收藏信息
|
|||
LambdaQueryWrapper<GuideCollectionEntity> wrapper = new LambdaQueryWrapper<>(); |
|||
wrapper.eq(GuideCollectionEntity::getGuideId, formDTO.getGuideId()); |
|||
wrapper.eq(GuideCollectionEntity::getUserId, tokenDto.getUserId()); |
|||
wrapper.eq(GuideCollectionEntity::getApp, tokenDto.getApp()); |
|||
wrapper.eq(GuideCollectionEntity::getCustomerId, tokenDto.getCustomerId()); |
|||
GuideCollectionEntity entity = baseDao.selectOne(wrapper); |
|||
//如果没有收藏记录,则添加收藏,有就删除收藏
|
|||
if (null == entity) { |
|||
entity = new GuideCollectionEntity(); |
|||
entity.setCustomerId(tokenDto.getCustomerId()); |
|||
entity.setUserId(tokenDto.getUserId()); |
|||
entity.setGuideId(formDTO.getGuideId()); |
|||
entity.setApp(tokenDto.getApp()); |
|||
insert(entity); |
|||
} else { |
|||
deleteById(entity.getId()); |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* @param tokenDto |
|||
* @param guideId |
|||
* @Description 获取收藏信息 |
|||
* @Param tokenDto |
|||
* @Param guideId |
|||
* @Return {@link GuideCollectionDTO} |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/10 9:52 |
|||
*/ |
|||
@Override |
|||
public GuideCollectionDTO getCollection(TokenDto tokenDto, String guideId) { |
|||
//获取指南收藏信息
|
|||
LambdaQueryWrapper<GuideCollectionEntity> wrapper = new LambdaQueryWrapper<>(); |
|||
wrapper.eq(GuideCollectionEntity::getGuideId, guideId); |
|||
wrapper.eq(GuideCollectionEntity::getUserId, tokenDto.getUserId()); |
|||
wrapper.eq(GuideCollectionEntity::getApp, tokenDto.getApp()); |
|||
wrapper.eq(GuideCollectionEntity::getCustomerId, tokenDto.getCustomerId()); |
|||
GuideCollectionEntity entity = baseDao.selectOne(wrapper); |
|||
return ConvertUtils.sourceToTarget(entity, GuideCollectionDTO.class); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,145 @@ |
|||
/** |
|||
* 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.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.constant.FieldConstant; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.dao.GuideExternalLinkDao; |
|||
import com.epmet.dto.ExternalLinkDTO; |
|||
import com.epmet.dto.GuideExternalLinkDTO; |
|||
import com.epmet.entity.GuideExternalLinkEntity; |
|||
import com.epmet.service.GuideExternalLinkService; |
|||
import org.apache.commons.collections4.CollectionUtils; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.Arrays; |
|||
import java.util.Collections; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
import java.util.stream.Collectors; |
|||
|
|||
/** |
|||
* 指南外链表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-09-06 |
|||
*/ |
|||
@Service |
|||
public class GuideExternalLinkServiceImpl extends BaseServiceImpl<GuideExternalLinkDao, GuideExternalLinkEntity> implements GuideExternalLinkService { |
|||
|
|||
|
|||
@Override |
|||
public PageData<GuideExternalLinkDTO> page(Map<String, Object> params) { |
|||
IPage<GuideExternalLinkEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, GuideExternalLinkDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<GuideExternalLinkDTO> list(Map<String, Object> params) { |
|||
List<GuideExternalLinkEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, GuideExternalLinkDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<GuideExternalLinkEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<GuideExternalLinkEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public GuideExternalLinkDTO get(String id) { |
|||
GuideExternalLinkEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, GuideExternalLinkDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(GuideExternalLinkDTO dto) { |
|||
GuideExternalLinkEntity entity = ConvertUtils.sourceToTarget(dto, GuideExternalLinkEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(GuideExternalLinkDTO dto) { |
|||
GuideExternalLinkEntity entity = ConvertUtils.sourceToTarget(dto, GuideExternalLinkEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
/** |
|||
* @param guideId |
|||
* @Description 删除指南外链 |
|||
* @Param guideId |
|||
* @Return |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/7 17:20 |
|||
*/ |
|||
@Override |
|||
public void deleteByGuideId(String guideId) { |
|||
LambdaQueryWrapper<GuideExternalLinkEntity> wrapper = new LambdaQueryWrapper<>(); |
|||
wrapper.eq(GuideExternalLinkEntity::getGuideId, guideId); |
|||
baseDao.delete(wrapper); |
|||
} |
|||
|
|||
/** |
|||
* @param guideId |
|||
* @Description 获取指南外链 |
|||
* @Param guideId |
|||
* @Return {@link List< ExternalLinkDTO >} |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/8 11:05 |
|||
*/ |
|||
@Override |
|||
public List<ExternalLinkDTO> getByGuideId(String guideId) { |
|||
LambdaQueryWrapper<GuideExternalLinkEntity> wrapper = new LambdaQueryWrapper<>(); |
|||
wrapper.eq(GuideExternalLinkEntity::getGuideId, guideId); |
|||
wrapper.orderByAsc(GuideExternalLinkEntity::getSort); |
|||
List<GuideExternalLinkEntity> list = baseDao.selectList(wrapper); |
|||
if (CollectionUtils.isEmpty(list)) { |
|||
return Collections.emptyList(); |
|||
} |
|||
return list.stream().map(item -> { |
|||
ExternalLinkDTO dto = new ExternalLinkDTO(); |
|||
dto.setExternalLink(item.getExternalLink()); |
|||
dto.setDescription(item.getDescription()); |
|||
return dto; |
|||
}).collect(Collectors.toList()); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,114 @@ |
|||
/** |
|||
* 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.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.constant.FieldConstant; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.dao.GuideModuleDictDefaultDao; |
|||
import com.epmet.dto.GuideModuleDictDefaultDTO; |
|||
import com.epmet.entity.GuideModuleDictDefaultEntity; |
|||
import com.epmet.service.GuideModuleDictDefaultService; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.Arrays; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 指南模块默认字典表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-09-06 |
|||
*/ |
|||
@Service |
|||
public class GuideModuleDictDefaultServiceImpl extends BaseServiceImpl<GuideModuleDictDefaultDao, GuideModuleDictDefaultEntity> implements GuideModuleDictDefaultService { |
|||
|
|||
|
|||
@Override |
|||
public PageData<GuideModuleDictDefaultDTO> page(Map<String, Object> params) { |
|||
IPage<GuideModuleDictDefaultEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, GuideModuleDictDefaultDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<GuideModuleDictDefaultDTO> list(Map<String, Object> params) { |
|||
List<GuideModuleDictDefaultEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, GuideModuleDictDefaultDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<GuideModuleDictDefaultEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<GuideModuleDictDefaultEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public GuideModuleDictDefaultDTO get(String id) { |
|||
GuideModuleDictDefaultEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, GuideModuleDictDefaultDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(GuideModuleDictDefaultDTO dto) { |
|||
GuideModuleDictDefaultEntity entity = ConvertUtils.sourceToTarget(dto, GuideModuleDictDefaultEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(GuideModuleDictDefaultDTO dto) { |
|||
GuideModuleDictDefaultEntity entity = ConvertUtils.sourceToTarget(dto, GuideModuleDictDefaultEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
/** |
|||
* 获取默认配置 |
|||
* |
|||
* @Param |
|||
* @Return {@link List< GuideModuleDictDefaultDTO>} |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/8 17:44 |
|||
*/ |
|||
@Override |
|||
public List<GuideModuleDictDefaultDTO> getList() { |
|||
QueryWrapper<GuideModuleDictDefaultEntity> wrapper = new QueryWrapper<>(); |
|||
return ConvertUtils.sourceToTarget(baseDao.selectList(wrapper), GuideModuleDictDefaultDTO.class); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,143 @@ |
|||
/** |
|||
* 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.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.constant.FieldConstant; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.dao.GuideModuleDictDao; |
|||
import com.epmet.dto.GuideModuleDictDTO; |
|||
import com.epmet.dto.GuideModuleDictDefaultDTO; |
|||
import com.epmet.dto.ModuleDTO; |
|||
import com.epmet.entity.GuideModuleDictEntity; |
|||
import com.epmet.service.GuideModuleDictDefaultService; |
|||
import com.epmet.service.GuideModuleDictService; |
|||
import org.apache.commons.collections4.CollectionUtils; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import javax.annotation.Resource; |
|||
import java.util.Arrays; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
import java.util.stream.Collectors; |
|||
|
|||
/** |
|||
* 指南模块字典表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-09-06 |
|||
*/ |
|||
@Service |
|||
public class GuideModuleDictServiceImpl extends BaseServiceImpl<GuideModuleDictDao, GuideModuleDictEntity> implements GuideModuleDictService { |
|||
|
|||
@Resource |
|||
private GuideModuleDictDefaultService guideModuleDictDefaultService; |
|||
|
|||
@Override |
|||
public PageData<GuideModuleDictDTO> page(Map<String, Object> params) { |
|||
IPage<GuideModuleDictEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, GuideModuleDictDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<GuideModuleDictDTO> list(Map<String, Object> params) { |
|||
List<GuideModuleDictEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, GuideModuleDictDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<GuideModuleDictEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<GuideModuleDictEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public GuideModuleDictDTO get(String id) { |
|||
GuideModuleDictEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, GuideModuleDictDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(GuideModuleDictDTO dto) { |
|||
GuideModuleDictEntity entity = ConvertUtils.sourceToTarget(dto, GuideModuleDictEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(GuideModuleDictDTO dto) { |
|||
GuideModuleDictEntity entity = ConvertUtils.sourceToTarget(dto, GuideModuleDictEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
/** |
|||
* @param customerId |
|||
* @Description 获取模块列表 |
|||
* @Param customerId |
|||
* @Return {@link List< ModuleDTO >} |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/8 17:50 |
|||
*/ |
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public List<ModuleDTO> getModuleList(String customerId) { |
|||
LambdaQueryWrapper<GuideModuleDictEntity> wrapper = new LambdaQueryWrapper<>(); |
|||
wrapper.eq(GuideModuleDictEntity::getCustomerId, customerId); |
|||
wrapper.orderByAsc(GuideModuleDictEntity::getSort); |
|||
List<GuideModuleDictEntity> list = baseDao.selectList(wrapper); |
|||
//结果为空,初始化默认配置
|
|||
if (CollectionUtils.isEmpty(list)) { |
|||
List<GuideModuleDictDefaultDTO> defaultList = guideModuleDictDefaultService.getList(); |
|||
List<GuideModuleDictEntity> moduleList = ConvertUtils.sourceToTarget(defaultList, GuideModuleDictEntity.class); |
|||
moduleList.forEach(item -> { |
|||
item.setCustomerId(customerId); |
|||
}); |
|||
insertBatch(moduleList); |
|||
list = baseDao.selectList(wrapper); |
|||
} |
|||
return list.stream().map(item -> { |
|||
ModuleDTO dto = new ModuleDTO(); |
|||
dto.setModuleId(item.getId()); |
|||
dto.setModuleValue(item.getModuleValue()); |
|||
dto.setModuleName(item.getModuleName()); |
|||
return dto; |
|||
}).collect(Collectors.toList()); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,147 @@ |
|||
/** |
|||
* 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.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.constant.FieldConstant; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.dao.GuideModuleDao; |
|||
import com.epmet.dto.GuideModuleDTO; |
|||
import com.epmet.dto.ModuleDTO; |
|||
import com.epmet.entity.GuideModuleEntity; |
|||
import com.epmet.service.GuideModuleDictService; |
|||
import com.epmet.service.GuideModuleService; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import javax.annotation.Resource; |
|||
import java.util.Arrays; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 指南模块关联表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-09-06 |
|||
*/ |
|||
@Service |
|||
public class GuideModuleServiceImpl extends BaseServiceImpl<GuideModuleDao, GuideModuleEntity> implements GuideModuleService { |
|||
|
|||
@Resource |
|||
private GuideModuleDictService guideModuleDictService; |
|||
|
|||
@Override |
|||
public PageData<GuideModuleDTO> page(Map<String, Object> params) { |
|||
IPage<GuideModuleEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, GuideModuleDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<GuideModuleDTO> list(Map<String, Object> params) { |
|||
List<GuideModuleEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, GuideModuleDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<GuideModuleEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<GuideModuleEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public GuideModuleDTO get(String id) { |
|||
GuideModuleEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, GuideModuleDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(GuideModuleDTO dto) { |
|||
GuideModuleEntity entity = ConvertUtils.sourceToTarget(dto, GuideModuleEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(GuideModuleDTO dto) { |
|||
GuideModuleEntity entity = ConvertUtils.sourceToTarget(dto, GuideModuleEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
/** |
|||
* @param guideId |
|||
* @Description 删除指南的内容模块 |
|||
* @Param guideId |
|||
* @Return |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/7 17:01 |
|||
*/ |
|||
@Override |
|||
public void deleteByGuideId(String guideId) { |
|||
LambdaQueryWrapper<GuideModuleEntity> wrapper = new LambdaQueryWrapper<>(); |
|||
wrapper.eq(GuideModuleEntity::getGuideId, guideId); |
|||
baseDao.delete(wrapper); |
|||
} |
|||
|
|||
/** |
|||
* @param guideId |
|||
* @Description 获取指南的内容模块 |
|||
* @Param guideId |
|||
* @Return {@link ModuleDTO} |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/8 10:13 |
|||
*/ |
|||
@Override |
|||
public List<ModuleDTO> getByGuideId(String customerId, String guideId) { |
|||
return baseDao.selectByGuideId(customerId, guideId); |
|||
} |
|||
|
|||
/** |
|||
* @param customerId |
|||
* @Description 获取模块列表 |
|||
* @Param customerId |
|||
* @Return {@link List< ModuleDTO>} |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/9 14:46 |
|||
*/ |
|||
@Override |
|||
public List<ModuleDTO> getModuleList(String customerId) { |
|||
return guideModuleDictService.getModuleList(customerId); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,423 @@ |
|||
/** |
|||
* 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.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.constant.FieldConstant; |
|||
import com.epmet.commons.tools.constant.NumConstant; |
|||
import com.epmet.commons.tools.dto.form.PageFormDTO; |
|||
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |
|||
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|||
import com.epmet.commons.tools.exception.RenException; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.redis.common.CustomerStaffRedis; |
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.constant.OrgInfoConstant; |
|||
import com.epmet.dao.GuideDao; |
|||
import com.epmet.dto.GuideDTO; |
|||
import com.epmet.dto.form.*; |
|||
import com.epmet.dto.result.GuideDetailResultDTO; |
|||
import com.epmet.dto.result.GuideListResultDTO; |
|||
import com.epmet.dto.result.OrgResultDTO; |
|||
import com.epmet.entity.GuideAttachmentEntity; |
|||
import com.epmet.entity.GuideEntity; |
|||
import com.epmet.entity.GuideExternalLinkEntity; |
|||
import com.epmet.entity.GuideModuleEntity; |
|||
import com.epmet.feign.GovOrgOpenFeignClient; |
|||
import com.epmet.service.*; |
|||
import com.github.pagehelper.PageHelper; |
|||
import com.github.pagehelper.PageInfo; |
|||
import org.apache.commons.collections4.CollectionUtils; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import javax.annotation.Resource; |
|||
import java.util.Arrays; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
import java.util.concurrent.atomic.AtomicInteger; |
|||
import java.util.stream.Collectors; |
|||
|
|||
/** |
|||
* 办事指南表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-09-06 |
|||
*/ |
|||
@Service |
|||
public class GuideServiceImpl extends BaseServiceImpl<GuideDao, GuideEntity> implements GuideService { |
|||
|
|||
@Resource |
|||
private GovOrgOpenFeignClient govOrgOpenFeignClient; |
|||
@Resource |
|||
private GuideModuleService guideModuleService; |
|||
@Resource |
|||
private GuideAttachmentService guideAttachmentService; |
|||
@Resource |
|||
private GuideExternalLinkService guideExternalLinkService; |
|||
@Resource |
|||
private GuideCollectionService guideCollectionService; |
|||
|
|||
@Override |
|||
public PageData<GuideDTO> page(Map<String, Object> params) { |
|||
IPage<GuideEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, GuideDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<GuideDTO> list(Map<String, Object> params) { |
|||
List<GuideEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, GuideDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<GuideEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<GuideEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public GuideDTO get(String id) { |
|||
GuideEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, GuideDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(GuideDTO dto) { |
|||
GuideEntity entity = ConvertUtils.sourceToTarget(dto, GuideEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(GuideDTO dto) { |
|||
GuideEntity entity = ConvertUtils.sourceToTarget(dto, GuideEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
/** |
|||
* 办事指南列表 |
|||
* |
|||
* @param formDTO |
|||
* @Param formDTO |
|||
* @Return {@link PageData< GuideListResultDTO >} |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/7 14:00 |
|||
*/ |
|||
@Override |
|||
public PageData<GuideListResultDTO> guideList(TokenDto tokenDto, GuideListFormDTO formDTO) { |
|||
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); |
|||
formDTO.setCustomerId(tokenDto.getCustomerId()); |
|||
List<GuideListResultDTO> list = baseDao.getGuideList(formDTO); |
|||
if (CollectionUtils.isNotEmpty(list)) { |
|||
list.forEach(item -> { |
|||
CustomerStaffInfoCacheResult staffInfoCache = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), item.getCreatedId()); |
|||
if (null == staffInfoCache) { |
|||
item.setCategoryName(""); |
|||
} else { |
|||
item.setCreatedName(staffInfoCache.getRealName()); |
|||
} |
|||
}); |
|||
} |
|||
PageInfo<GuideListResultDTO> pageInfo = new PageInfo<>(list); |
|||
return new PageData<>(list, pageInfo.getTotal()); |
|||
} |
|||
|
|||
/** |
|||
* 添加指南 |
|||
* |
|||
* @param tokenDto |
|||
* @Param formDTO |
|||
* @Return |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/7 14:12 |
|||
*/ |
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void guideAdd(TokenDto tokenDto, GuideAddFormDTO formDTO) { |
|||
if (CollectionUtils.isEmpty(formDTO.getModuleList()) && CollectionUtils.isEmpty(formDTO.getAttachmentList()) && |
|||
CollectionUtils.isEmpty(formDTO.getExternalLinks())) { |
|||
throw new RenException(EpmetErrorCode.GUIDE_IS_NULL.getCode()); |
|||
} |
|||
//保存办事指南表
|
|||
GuideEntity guideDTO = new GuideEntity(); |
|||
guideDTO.setCustomerId(tokenDto.getCustomerId()); |
|||
guideDTO.setOrgId(formDTO.getOrgId()); |
|||
guideDTO.setOrgType(formDTO.getOrgType()); |
|||
guideDTO.setOrgName(formDTO.getOrgName()); |
|||
guideDTO.setCategoryCode(formDTO.getCategoryCode()); |
|||
guideDTO.setTitle(formDTO.getTitle()); |
|||
OrgFormDTO orgFormDTO = new OrgFormDTO(); |
|||
orgFormDTO.setOrgId(formDTO.getOrgId()); |
|||
orgFormDTO.setOrgType(formDTO.getOrgType()); |
|||
//获取组织的pId和pIds
|
|||
Result<OrgResultDTO> result = govOrgOpenFeignClient.getAgencyInfo(orgFormDTO); |
|||
if (!result.success() || null == result.getData()) { |
|||
throw new RenException(result.getCode(), result.getMsg()); |
|||
} |
|||
if (OrgInfoConstant.AGENCY.equals(formDTO.getOrgType())) { |
|||
guideDTO.setPid(result.getData().getPid()); |
|||
} else { |
|||
guideDTO.setPid(result.getData().getAgencyId()); |
|||
} |
|||
guideDTO.setPids(result.getData().getPids().concat(":").concat(result.getData().getAgencyId())); |
|||
insert(guideDTO); |
|||
//保存办事指南内容模块
|
|||
if (CollectionUtils.isNotEmpty(formDTO.getModuleList())) { |
|||
List<GuideModuleEntity> guideModuleList = formDTO.getModuleList().stream().map(item -> { |
|||
GuideModuleEntity entity = new GuideModuleEntity(); |
|||
entity.setCustomerId(tokenDto.getCustomerId()); |
|||
entity.setGuideId(guideDTO.getId()); |
|||
entity.setModuleId(item.getModuleId()); |
|||
entity.setModuleContent(item.getModuleContent()); |
|||
return entity; |
|||
}).collect(Collectors.toList()); |
|||
guideModuleService.insertBatch(guideModuleList); |
|||
} |
|||
//保存附件
|
|||
if (CollectionUtils.isNotEmpty(formDTO.getAttachmentList())) { |
|||
AtomicInteger i = new AtomicInteger(1); |
|||
List<GuideAttachmentEntity> attachmentList = formDTO.getAttachmentList().stream().map(item -> { |
|||
GuideAttachmentEntity entity = new GuideAttachmentEntity(); |
|||
entity.setCustomerId(tokenDto.getCustomerId()); |
|||
entity.setGuideId(guideDTO.getId()); |
|||
entity.setAttachmentName(item.getName()); |
|||
entity.setAttachmentFormat(item.getFormat()); |
|||
entity.setAttachmentSize(item.getSize()); |
|||
entity.setAttachmentType(item.getType()); |
|||
entity.setAttachmentUrl(item.getUrl()); |
|||
entity.setDuration(item.getDuration()); |
|||
entity.setSort(i.getAndIncrement()); |
|||
return entity; |
|||
}).collect(Collectors.toList()); |
|||
guideAttachmentService.insertBatch(attachmentList); |
|||
} |
|||
//保存外链地址
|
|||
if (CollectionUtils.isNotEmpty(formDTO.getExternalLinks())) { |
|||
AtomicInteger i = new AtomicInteger(1); |
|||
List<GuideExternalLinkEntity> linkList = formDTO.getExternalLinks().stream().map(item -> { |
|||
GuideExternalLinkEntity entity = new GuideExternalLinkEntity(); |
|||
entity.setCustomerId(tokenDto.getCustomerId()); |
|||
entity.setGuideId(guideDTO.getId()); |
|||
entity.setExternalLink(item.getExternalLink()); |
|||
entity.setDescription(item.getDescription()); |
|||
entity.setSort(i.getAndIncrement()); |
|||
return entity; |
|||
|
|||
}).collect(Collectors.toList()); |
|||
guideExternalLinkService.insertBatch(linkList); |
|||
} |
|||
|
|||
} |
|||
|
|||
/** |
|||
* 修改指南 |
|||
* |
|||
* @param formDTO |
|||
* @Param formDTO |
|||
* @Return |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/7 14:12 |
|||
*/ |
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void guideEdit(GuideEditFormDTO formDTO) { |
|||
if (CollectionUtils.isEmpty(formDTO.getModuleList()) && CollectionUtils.isEmpty(formDTO.getAttachmentList()) && |
|||
CollectionUtils.isEmpty(formDTO.getExternalLinks())) { |
|||
throw new RenException(EpmetErrorCode.GUIDE_IS_NULL.getCode()); |
|||
} |
|||
//保存办事指南表
|
|||
GuideDTO guideDTO = get(formDTO.getGuideId()); |
|||
if (!formDTO.getStaffId().equals(guideDTO.getCreatedBy())) { |
|||
throw new RenException(EpmetErrorCode.GUIDE_IS_NOT_YOURS.getCode()); |
|||
} |
|||
guideDTO.setOrgId(formDTO.getOrgId()); |
|||
guideDTO.setOrgType(formDTO.getOrgType()); |
|||
guideDTO.setCategoryCode(formDTO.getCategoryCode()); |
|||
guideDTO.setTitle(formDTO.getTitle()); |
|||
OrgFormDTO orgFormDTO = new OrgFormDTO(); |
|||
orgFormDTO.setOrgId(formDTO.getOrgId()); |
|||
orgFormDTO.setOrgType(formDTO.getOrgType()); |
|||
guideDTO.setOrgName(formDTO.getOrgName()); |
|||
//获取组织的pId和pIds
|
|||
Result<OrgResultDTO> result = govOrgOpenFeignClient.getAgencyInfo(orgFormDTO); |
|||
if (!result.success() || null == result.getData()) { |
|||
throw new RenException(result.getCode(), result.getMsg()); |
|||
} |
|||
if (OrgInfoConstant.AGENCY.equals(formDTO.getOrgType())) { |
|||
guideDTO.setPid(result.getData().getPid()); |
|||
} else { |
|||
guideDTO.setPid(result.getData().getAgencyId()); |
|||
} |
|||
guideDTO.setPids(result.getData().getPids().concat(":").concat(result.getData().getAgencyId())); |
|||
update(guideDTO); |
|||
//保存办事指南内容模块
|
|||
if (CollectionUtils.isNotEmpty(formDTO.getModuleList())) { |
|||
List<GuideModuleEntity> guideModuleList = formDTO.getModuleList().stream().map(item -> { |
|||
GuideModuleEntity entity = new GuideModuleEntity(); |
|||
entity.setCustomerId(guideDTO.getCustomerId()); |
|||
entity.setId(item.getGuideModuleId()); |
|||
entity.setGuideId(guideDTO.getId()); |
|||
entity.setModuleId(item.getModuleId()); |
|||
entity.setModuleContent(item.getModuleContent()); |
|||
return entity; |
|||
}).collect(Collectors.toList()); |
|||
guideModuleService.insertBatch(guideModuleList.stream().filter(item -> null == item.getId()).collect(Collectors.toList())); |
|||
guideModuleService.updateBatchById(guideModuleList.stream().filter(item -> null != item.getId()).collect(Collectors.toList())); |
|||
} |
|||
//保存附件
|
|||
guideAttachmentService.deleteByGuideId(formDTO.getGuideId()); |
|||
if (CollectionUtils.isNotEmpty(formDTO.getAttachmentList())) { |
|||
AtomicInteger i = new AtomicInteger(1); |
|||
List<GuideAttachmentEntity> attachmentList = formDTO.getAttachmentList().stream().map(item -> { |
|||
GuideAttachmentEntity entity = new GuideAttachmentEntity(); |
|||
entity.setCustomerId(guideDTO.getCustomerId()); |
|||
entity.setGuideId(guideDTO.getId()); |
|||
entity.setAttachmentName(item.getName()); |
|||
entity.setAttachmentFormat(item.getFormat()); |
|||
entity.setAttachmentSize(item.getSize()); |
|||
entity.setAttachmentType(item.getType()); |
|||
entity.setAttachmentUrl(item.getUrl()); |
|||
entity.setDuration(item.getDuration()); |
|||
entity.setSort(i.getAndIncrement()); |
|||
return entity; |
|||
}).collect(Collectors.toList()); |
|||
guideAttachmentService.insertBatch(attachmentList); |
|||
} |
|||
//保存外链地址
|
|||
guideExternalLinkService.deleteByGuideId(formDTO.getGuideId()); |
|||
if (CollectionUtils.isNotEmpty(formDTO.getExternalLinks())) { |
|||
AtomicInteger i = new AtomicInteger(1); |
|||
List<GuideExternalLinkEntity> linkList = formDTO.getExternalLinks().stream().map(item -> { |
|||
GuideExternalLinkEntity entity = new GuideExternalLinkEntity(); |
|||
entity.setCustomerId(guideDTO.getCustomerId()); |
|||
entity.setGuideId(guideDTO.getId()); |
|||
entity.setExternalLink(item.getExternalLink()); |
|||
entity.setDescription(item.getDescription()); |
|||
entity.setSort(i.getAndIncrement()); |
|||
return entity; |
|||
|
|||
}).collect(Collectors.toList()); |
|||
guideExternalLinkService.insertBatch(linkList); |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* 删除指南 |
|||
* |
|||
* @param formDTO |
|||
* @Param formDTO |
|||
* @Return |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/7 14:12 |
|||
*/ |
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void guideDel(GuideFormDTO formDTO) { |
|||
GuideDTO guide = get(formDTO.getGuideId()); |
|||
if (!formDTO.getStaffId().equals(guide.getCreatedBy())) { |
|||
throw new RenException(EpmetErrorCode.GUIDE_IS_NOT_YOURS.getCode()); |
|||
} |
|||
//删除主表
|
|||
baseDao.deleteById(formDTO.getGuideId()); |
|||
//删除内容模块
|
|||
guideModuleService.deleteByGuideId(formDTO.getGuideId()); |
|||
//删除附件
|
|||
guideAttachmentService.deleteByGuideId(formDTO.getGuideId()); |
|||
//删除外链
|
|||
guideExternalLinkService.deleteByGuideId(formDTO.getGuideId()); |
|||
} |
|||
|
|||
/** |
|||
* 指南详情 |
|||
* |
|||
* @param formDTO |
|||
* @Param formDTO |
|||
* @Return {@link GuideDetailResultDTO} |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/7 14:12 |
|||
*/ |
|||
@Override |
|||
public GuideDetailResultDTO guideDetail(TokenDto tokenDto, GuideFormDTO formDTO) { |
|||
//获取指南详情
|
|||
GuideDetailResultDTO result = baseDao.getGuideDetail(formDTO.getCustomerId(), formDTO.getGuideId()); |
|||
if (null == result) { |
|||
result = new GuideDetailResultDTO(); |
|||
} |
|||
//获取指南内容模块
|
|||
result.setModuleList(guideModuleService.getByGuideId(formDTO.getCustomerId(), formDTO.getGuideId())); |
|||
//获取指南附件
|
|||
result.setAttachmentList(guideAttachmentService.getByGuideId(formDTO.getGuideId())); |
|||
//获取指南外链地址
|
|||
result.setExternalLinks(guideExternalLinkService.getByGuideId(formDTO.getGuideId())); |
|||
//是否收藏
|
|||
result.setCollectionFlag(NumConstant.ZERO_STR); |
|||
if (null != guideCollectionService.getCollection(tokenDto, formDTO.getGuideId())) { |
|||
result.setCollectionFlag(NumConstant.ONE_STR); |
|||
} |
|||
return result; |
|||
} |
|||
|
|||
/** |
|||
* @param tokenDto |
|||
* @Description 收藏列表 |
|||
* @Param tokenDto |
|||
* @Param formDTO |
|||
* @Return {@link PageData< GuideListResultDTO>} |
|||
* @Author zhaoqifeng |
|||
* @Date 2021/9/9 10:03 |
|||
*/ |
|||
@Override |
|||
public PageData<GuideListResultDTO> collectionList(TokenDto tokenDto, PageFormDTO formDTO) { |
|||
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); |
|||
List<GuideListResultDTO> list = baseDao.getCollectionList(tokenDto); |
|||
if (CollectionUtils.isNotEmpty(list)) { |
|||
list.forEach(item -> { |
|||
CustomerStaffInfoCacheResult staffInfoCache = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), item.getCreatedId()); |
|||
if (null == staffInfoCache) { |
|||
item.setCategoryName(""); |
|||
} else { |
|||
item.setCreatedName(staffInfoCache.getRealName()); |
|||
} |
|||
}); |
|||
} |
|||
PageInfo<GuideListResultDTO> pageInfo = new PageInfo<>(list); |
|||
return new PageData<>(list, pageInfo.getTotal()); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,139 @@ |
|||
CREATE TABLE `guide` ( |
|||
`ID` varchar(64) NOT NULL COMMENT 'ID 唯一标识', |
|||
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', |
|||
`ORG_TYPE` varchar(255) DEFAULT NULL COMMENT '机关agency 网格grid 部门dept', |
|||
`ORG_ID` varchar(64) NOT NULL COMMENT '发布单位ID', |
|||
`ORG_NAME` varchar(128) DEFAULT NULL COMMENT '发布单位名', |
|||
`PID` varchar(64) NOT NULL COMMENT '所属组织机构ID(customer_agency.id)', |
|||
`PIDS` varchar(1024) NOT NULL COMMENT '所有上级组织ID,英文:隔开', |
|||
`TITLE` varchar(128) NOT NULL COMMENT '标题', |
|||
`CATEGORY_CODE` varchar(32) NOT NULL COMMENT '分类ID', |
|||
`DEL_FLAG` int(11) NOT NULL COMMENT '删除标识:0.未删除 1.已删除', |
|||
`REVISION` int(11) NOT NULL COMMENT '乐观锁', |
|||
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', |
|||
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
|||
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', |
|||
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
|||
PRIMARY KEY (`ID`) USING BTREE |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='办事指南表 '; |
|||
|
|||
|
|||
CREATE TABLE `guide_attachment` ( |
|||
`ID` varchar(64) NOT NULL COMMENT '唯一标识', |
|||
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', |
|||
`GUIDE_ID` varchar(64) NOT NULL COMMENT '办事指南ID', |
|||
`ATTACHMENT_NAME` varchar(128) DEFAULT NULL COMMENT '附件名', |
|||
`ATTACHMENT_SIZE` int(11) DEFAULT NULL COMMENT '文件大小 单位byte', |
|||
`ATTACHMENT_FORMAT` varchar(32) DEFAULT NULL COMMENT '文件格式 word、excel、pdf', |
|||
`ATTACHMENT_TYPE` varchar(32) DEFAULT NULL COMMENT '类型 ', |
|||
`ATTACHMENT_URL` varchar(256) DEFAULT NULL COMMENT '附件地址', |
|||
`DURATION` int(11) DEFAULT NULL COMMENT '语音或视频时长,秒', |
|||
`SORT` int(11) NOT NULL COMMENT '排序', |
|||
`DEL_FLAG` int(1) NOT NULL COMMENT '删除标识 0.未删除 1.已删除', |
|||
`REVISION` int(11) NOT NULL COMMENT '乐观锁', |
|||
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', |
|||
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
|||
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', |
|||
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
|||
PRIMARY KEY (`ID`) USING BTREE |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='办事指南附件'; |
|||
|
|||
|
|||
CREATE TABLE `guide_category` ( |
|||
`ID` varchar(64) NOT NULL COMMENT '主键', |
|||
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id,产品默认配置此列存储default', |
|||
`CATEGORY_NAME` varchar(64) NOT NULL COMMENT '分类名,客户内唯一', |
|||
`CATEGORY_CODE` varchar(64) NOT NULL COMMENT '分类编码:分类名的全拼; eg:gongjijin', |
|||
`SORT` int(11) NOT NULL COMMENT '排序', |
|||
`STATUS` varchar(10) NOT NULL COMMENT '状态 禁用disable 启用enable', |
|||
`DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除、1已删除', |
|||
`REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', |
|||
`CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', |
|||
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
|||
`UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', |
|||
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
|||
PRIMARY KEY (`ID`) USING BTREE |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='指南分类'; |
|||
|
|||
|
|||
CREATE TABLE `guide_collection` ( |
|||
`ID` varchar(64) NOT NULL COMMENT '主键', |
|||
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id', |
|||
`GUIDE_ID` varchar(64) NOT NULL COMMENT '指南ID', |
|||
`USER_ID` varchar(64) NOT NULL COMMENT '用户ID', |
|||
`APP` varchar(64) NOT NULL COMMENT '用户所属客户端 居民端resi 工作端gov', |
|||
`DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除、1已删除', |
|||
`REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', |
|||
`CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', |
|||
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
|||
`UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', |
|||
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
|||
PRIMARY KEY (`ID`) USING BTREE |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='指南收藏表'; |
|||
|
|||
|
|||
CREATE TABLE `guide_external_link` ( |
|||
`ID` varchar(64) NOT NULL COMMENT '主键', |
|||
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id', |
|||
`GUIDE_ID` varchar(64) NOT NULL COMMENT '指南ID', |
|||
`DESCRIPTION` varchar(64) NOT NULL COMMENT '链接说明', |
|||
`EXTERNAL_LINK` varchar(255) NOT NULL COMMENT '外部链接', |
|||
`SORT` int(11) NOT NULL COMMENT '排序', |
|||
`DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除、1已删除', |
|||
`REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', |
|||
`CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', |
|||
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
|||
`UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', |
|||
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
|||
PRIMARY KEY (`ID`) USING BTREE |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='指南外链表'; |
|||
|
|||
|
|||
CREATE TABLE `guide_module` ( |
|||
`ID` varchar(64) NOT NULL COMMENT '主键', |
|||
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id', |
|||
`GUIDE_ID` varchar(64) NOT NULL COMMENT '指南ID', |
|||
`MODULE_ID` varchar(64) NOT NULL COMMENT '模块ID', |
|||
`MODULE_CONTENT` longtext, |
|||
`DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除、1已删除', |
|||
`REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', |
|||
`CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', |
|||
`CREATED_TIME` datetime DEFAULT NULL COMMENT '创建时间', |
|||
`UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', |
|||
`UPDATED_TIME` datetime DEFAULT NULL COMMENT '更新时间', |
|||
PRIMARY KEY (`ID`) USING BTREE |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='指南模块关联表'; |
|||
|
|||
|
|||
CREATE TABLE `guide_module_dict` ( |
|||
`ID` varchar(64) NOT NULL COMMENT '主键', |
|||
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id', |
|||
`MODULE_VALUE` varchar(64) NOT NULL COMMENT '模块key', |
|||
`MODULE_NAME` varchar(64) NOT NULL COMMENT '模块名', |
|||
`SORT` int(11) NOT NULL COMMENT '排序', |
|||
`STATUS` varchar(10) NOT NULL COMMENT '状态 禁用disable 启用enable', |
|||
`DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除、1已删除', |
|||
`REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', |
|||
`CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', |
|||
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
|||
`UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', |
|||
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
|||
PRIMARY KEY (`ID`) USING BTREE |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='指南模块字典表'; |
|||
|
|||
|
|||
CREATE TABLE `guide_module_dict_default` ( |
|||
`ID` varchar(64) NOT NULL COMMENT '主键', |
|||
`MODULE_VALUE` varchar(64) NOT NULL COMMENT '模块key', |
|||
`MODULE_NAME` varchar(64) NOT NULL COMMENT '模块名', |
|||
`SORT` int(11) NOT NULL COMMENT '排序', |
|||
`STATUS` varchar(10) NOT NULL COMMENT '状态 禁用disable 启用enable', |
|||
`DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除、1已删除', |
|||
`REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', |
|||
`CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', |
|||
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
|||
`UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', |
|||
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
|||
PRIMARY KEY (`ID`) USING BTREE |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='指南模块默认字典表'; |
|||
|
@ -0,0 +1,12 @@ |
|||
INSERT INTO `epmet_gov_voice`.`guide_category` (`ID`, `CUSTOMER_ID`, `CATEGORY_NAME`, `CATEGORY_CODE`, `SORT`, `STATUS`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1', 'default', '社保', 'shebao', 0, 'enable', '0', 0, 'default', '2021-09-08 14:21:09', 'default', '2021-09-08 14:21:19'); |
|||
INSERT INTO `epmet_gov_voice`.`guide_category` (`ID`, `CUSTOMER_ID`, `CATEGORY_NAME`, `CATEGORY_CODE`, `SORT`, `STATUS`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('2', 'default', '驾驶行驶', 'jiashixingshi', 1, 'enable', '0', 0, 'default', '2021-09-08 14:21:09', 'default', '2021-09-08 14:21:19'); |
|||
INSERT INTO `epmet_gov_voice`.`guide_category` (`ID`, `CUSTOMER_ID`, `CATEGORY_NAME`, `CATEGORY_CODE`, `SORT`, `STATUS`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('3', 'default', '公积金', 'gongjijin', 2, 'enable', '0', 0, 'default', '2021-09-08 14:21:09', 'default', '2021-09-08 14:21:19'); |
|||
INSERT INTO `epmet_gov_voice`.`guide_category` (`ID`, `CUSTOMER_ID`, `CATEGORY_NAME`, `CATEGORY_CODE`, `SORT`, `STATUS`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('4', 'default', '出入境', 'churujing', 3, 'enable', '0', 0, 'default', '2021-09-08 14:21:09', 'default', '2021-09-08 14:21:19'); |
|||
INSERT INTO `epmet_gov_voice`.`guide_category` (`ID`, `CUSTOMER_ID`, `CATEGORY_NAME`, `CATEGORY_CODE`, `SORT`, `STATUS`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5', 'default', '婚育收养', 'hunyushouyang', 4, 'enable', '0', 0, 'default', '2021-09-08 14:21:09', 'default', '2021-09-08 14:21:19'); |
|||
INSERT INTO `epmet_gov_voice`.`guide_category` (`ID`, `CUSTOMER_ID`, `CATEGORY_NAME`, `CATEGORY_CODE`, `SORT`, `STATUS`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('6', 'default', '户政', 'huzheng', 5, 'enable', '0', 0, 'default', '2021-09-08 14:21:09', 'default', '2021-09-08 14:21:19'); |
|||
INSERT INTO `epmet_gov_voice`.`guide_category` (`ID`, `CUSTOMER_ID`, `CATEGORY_NAME`, `CATEGORY_CODE`, `SORT`, `STATUS`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('7', 'default', '教育培训', 'jiaoyupeixun', 6, 'enable', '0', 0, 'default', '2021-09-08 14:21:09', 'default', '2021-09-08 14:21:19'); |
|||
INSERT INTO `epmet_gov_voice`.`guide_category` (`ID`, `CUSTOMER_ID`, `CATEGORY_NAME`, `CATEGORY_CODE`, `SORT`, `STATUS`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('8', 'default', '劳动就业', 'laodongjiuye', 7, 'enable', '0', 0, 'default', '2021-09-08 14:21:09', 'default', '2021-09-08 14:21:19'); |
|||
INSERT INTO `epmet_gov_voice`.`guide_category` (`ID`, `CUSTOMER_ID`, `CATEGORY_NAME`, `CATEGORY_CODE`, `SORT`, `STATUS`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('9', 'default', '办税指南', 'banshuizhinan', 8, 'enable', '0', 0, 'default', '2021-09-08 14:21:09', 'default', '2021-09-08 14:21:19'); |
|||
INSERT INTO `epmet_gov_voice`.`guide_category` (`ID`, `CUSTOMER_ID`, `CATEGORY_NAME`, `CATEGORY_CODE`, `SORT`, `STATUS`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('10', 'default', '人才', 'rencai', 9, 'enable', '0', 0, 'default', '2021-09-08 14:21:09', 'default', '2021-09-08 14:21:19'); |
|||
INSERT INTO `epmet_gov_voice`.`guide_category` (`ID`, `CUSTOMER_ID`, `CATEGORY_NAME`, `CATEGORY_CODE`, `SORT`, `STATUS`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('11', 'default', '职业资格', 'zhiyezige', 10, 'enable', '0', 0, 'default', '2021-09-08 14:21:09', 'default', '2021-09-08 14:21:19'); |
|||
INSERT INTO `epmet_gov_voice`.`guide_category` (`ID`, `CUSTOMER_ID`, `CATEGORY_NAME`, `CATEGORY_CODE`, `SORT`, `STATUS`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('12', 'default', '医疗健康', 'yiliaojiankang', 11, 'enable', '0', 0, 'default', '2021-09-08 14:21:09', 'default', '2021-09-08 14:21:19'); |
@ -0,0 +1,26 @@ |
|||
<?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.GuideAttachmentDao"> |
|||
|
|||
<resultMap type="com.epmet.entity.GuideAttachmentEntity" id="guideAttachmentMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="customerId" column="CUSTOMER_ID"/> |
|||
<result property="guideId" column="GUIDE_ID"/> |
|||
<result property="attachmentName" column="ATTACHMENT_NAME"/> |
|||
<result property="attachmentSize" column="ATTACHMENT_SIZE"/> |
|||
<result property="attachmentFormat" column="ATTACHMENT_FORMAT"/> |
|||
<result property="attachmentType" column="ATTACHMENT_TYPE"/> |
|||
<result property="attachmentUrl" column="ATTACHMENT_URL"/> |
|||
<result property="duration" column="DURATION"/> |
|||
<result property="sort" column="SORT"/> |
|||
<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> |
|||
|
|||
|
|||
</mapper> |
@ -0,0 +1,130 @@ |
|||
<?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.GuideCategoryDao"> |
|||
|
|||
<!-- 工作端PC或者运营端分类列表查询,不分页 --> |
|||
<select id="selectPageByCid" parameterType="java.lang.String" resultType="com.epmet.dto.GuideCategoryDTO"> |
|||
SELECT |
|||
gc.ID, |
|||
gc.CUSTOMER_ID, |
|||
gc.CATEGORY_NAME, |
|||
gc.category_code, |
|||
gc.SORT, |
|||
gc.`STATUS` |
|||
FROM |
|||
guide_category gc |
|||
WHERE |
|||
gc.DEL_FLAG = '0' |
|||
AND gc.CUSTOMER_ID =#{customerId} |
|||
ORDER BY |
|||
gc.SORT ASC |
|||
</select> |
|||
|
|||
<!-- 新增指南:saveorupdate;查询指南列表:query --> |
|||
<select id="selectCategoryDict" parameterType="map" resultType="com.epmet.dto.result.GuideDictResDTO"> |
|||
SELECT |
|||
* |
|||
FROM |
|||
( |
|||
SELECT |
|||
gc.CATEGORY_NAME, |
|||
gc.category_code, |
|||
gc.`STATUS`, |
|||
gc.sort, |
|||
( SELECT count( g.id ) FROM guide g WHERE g.CUSTOMER_ID = #{customerId} AND g.DEL_FLAG = '0' AND g.CATEGORY_CODE = gc.CATEGORY_CODE ) AS guideTotal |
|||
FROM |
|||
guide_category gc |
|||
WHERE |
|||
gc.DEL_FLAG = '0' |
|||
AND CUSTOMER_ID = #{customerId} |
|||
) temp |
|||
<if test="queryOrigin == 'saveorupdate' "> |
|||
WHERE temp.`STATUS` = 'enable' |
|||
</if> |
|||
<if test="queryOrigin == 'query' "> |
|||
WHERE temp.`STATUS` = 'enable' |
|||
OR ( temp.`STATUS` = 'disable' AND temp.guideTotal > 0 ) |
|||
</if> |
|||
ORDER BY |
|||
temp.sort ASC |
|||
</select> |
|||
|
|||
|
|||
<!-- 保存排序--> |
|||
<update id="updateOrder" parameterType="map"> |
|||
update guide_category |
|||
set SORT=#{orderIndex}, |
|||
UPDATED_BY=#{staffId}, |
|||
UPDATED_TIME=NOW() |
|||
where id=#{id} |
|||
and del_flag='0' |
|||
</update> |
|||
|
|||
<!-- 启用或者禁用--> |
|||
<update id="updateStatus" parameterType="map"> |
|||
update guide_category |
|||
set status=#{status}, |
|||
UPDATED_BY=#{staffId}, |
|||
UPDATED_TIME=NOW() |
|||
where id=#{id} |
|||
and del_flag='0' |
|||
</update> |
|||
|
|||
<!-- 查询分类下的办事指南数量--> |
|||
<select id="selectGuideTotal" parameterType="map" resultType="int"> |
|||
SELECT |
|||
count( id ) AS total |
|||
FROM |
|||
guide g |
|||
WHERE |
|||
g.DEL_FLAG = '0' |
|||
AND g.CUSTOMER_ID = #{customerId} |
|||
AND g.CATEGORY_CODE =( |
|||
SELECT |
|||
gc.CATEGORY_CODE |
|||
FROM |
|||
guide_category gc |
|||
WHERE |
|||
gc.DEL_FLAG = '0' |
|||
AND gc.id = #{id} |
|||
) |
|||
</select> |
|||
|
|||
<select id="selectCategoryName" parameterType="map" resultType="int"> |
|||
SELECT |
|||
count( gc.id ) |
|||
FROM |
|||
guide_category gc |
|||
WHERE |
|||
gc.DEL_FLAG = '0' |
|||
AND gc.CUSTOMER_ID = #{customerId} |
|||
AND gc.CATEGORY_NAME = #{categoryName} |
|||
<if test='null != excludeId and excludeId != ""'> |
|||
AND gc.id !=#{excludeId} |
|||
</if> |
|||
</select> |
|||
|
|||
<select id="selectCategoryCode" parameterType="map" resultType="int"> |
|||
SELECT |
|||
count( gc.id ) |
|||
FROM |
|||
guide_category gc |
|||
WHERE |
|||
gc.DEL_FLAG = '0' |
|||
AND gc.CUSTOMER_ID = #{customerId} |
|||
AND gc.CATEGORY_CODE = #{categoryCode} |
|||
<if test='null != excludeId and excludeId != ""'> |
|||
AND gc.id !=#{excludeId} |
|||
</if> |
|||
</select> |
|||
<select id="selectCurrentOrder" parameterType="java.lang.String" resultType="int"> |
|||
SELECT |
|||
ifnull(max(gc.SORT),0) as num |
|||
FROM |
|||
guide_category gc |
|||
WHERE |
|||
gc.DEL_FLAG = '0' |
|||
AND gc.CUSTOMER_ID =#{customerId} |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,21 @@ |
|||
<?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.GuideCollectionDao"> |
|||
|
|||
<resultMap type="com.epmet.entity.GuideCollectionEntity" id="guideCollectionMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="customerId" column="CUSTOMER_ID"/> |
|||
<result property="guideId" column="GUIDE_ID"/> |
|||
<result property="userId" column="USER_ID"/> |
|||
<result property="app" column="APP"/> |
|||
<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> |
|||
|
|||
|
|||
</mapper> |
@ -0,0 +1,78 @@ |
|||
<?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.GuideDao"> |
|||
|
|||
<resultMap type="com.epmet.entity.GuideEntity" id="guideMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="customerId" column="CUSTOMER_ID"/> |
|||
<result property="orgType" column="ORG_TYPE"/> |
|||
<result property="orgId" column="ORG_ID"/> |
|||
<result property="pid" column="PID"/> |
|||
<result property="pids" column="PIDS"/> |
|||
<result property="title" column="TITLE"/> |
|||
<result property="categoryCode" column="CATEGORY_CODE"/> |
|||
<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="getGuideList" resultType="com.epmet.dto.result.GuideListResultDTO"> |
|||
SELECT |
|||
g.ID AS "guideId", |
|||
g.TITLE AS "title", |
|||
gc.CATEGORY_NAME AS "categoryName", |
|||
g.CREATED_BY AS "createdId", |
|||
g.UPDATED_TIME AS "updatedTime" |
|||
FROM |
|||
guide g |
|||
INNER JOIN guide_category gc ON g.CATEGORY_CODE = gc.CATEGORY_CODE AND gc.DEL_FLAG = 0 AND gc.CUSTOMER_ID = #{customerId} |
|||
WHERE g.DEL_FLAG = 0 |
|||
AND g.CUSTOMER_ID = #{customerId} |
|||
<if test='null != agencyId and "" != agencyId'> |
|||
AND g.PIDS LIKE CONCAT( '%', #{agencyId}, '%' ) |
|||
</if> |
|||
<if test='null != guideTitle and "" != guideTitle'> |
|||
AND g.TITLE LIKE CONCAT( '%', #{guideTitle}, '%' ) |
|||
</if> |
|||
<if test='null != categoryCode and "" != categoryCode'> |
|||
AND g.CATEGORY_CODE = #{categoryCode} |
|||
</if> |
|||
ORDER BY g.CREATED_TIME DESC |
|||
</select> |
|||
<select id="getGuideDetail" resultType="com.epmet.dto.result.GuideDetailResultDTO"> |
|||
SELECT |
|||
g.ID AS "guideId", |
|||
g.ORG_TYPE, |
|||
g.ORG_ID, |
|||
g.ORG_NAME, |
|||
g.TITLE, |
|||
g.CATEGORY_CODE, |
|||
gc.CATEGORY_NAME |
|||
FROM |
|||
guide g |
|||
INNER JOIN guide_category gc ON g.CATEGORY_CODE = gc.CATEGORY_CODE AND gc.CUSTOMER_ID = #{customerId} |
|||
WHERE |
|||
g.ID = #{guideId} |
|||
</select> |
|||
<select id="getCollectionList" resultType="com.epmet.dto.result.GuideListResultDTO"> |
|||
SELECT |
|||
g.ID AS "guideId", |
|||
g.TITLE AS "title", |
|||
gc.CATEGORY_NAME AS categoryName, |
|||
g.CREATED_BY AS createdId, |
|||
g.UPDATED_TIME AS updatedTime |
|||
FROM |
|||
guide g |
|||
INNER JOIN guide_category gc ON g.CATEGORY_CODE = gc.CATEGORY_CODE AND gc.DEL_FLAG = 0 AND gc.CUSTOMER_ID = #{customerId} |
|||
INNER JOIN guide_collection gco ON g.ID = gco.GUIDE_ID AND gco.USER_ID = #{userId} AND gco.APP = #{app} AND gco.DEL_FLAG = 0 |
|||
WHERE g.DEL_FLAG = 0 |
|||
AND g.CUSTOMER_ID = #{customerId} |
|||
ORDER BY gco.CREATED_TIME DESC |
|||
</select> |
|||
|
|||
|
|||
</mapper> |
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue