40 changed files with 3742 additions and 9 deletions
@ -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.elink.esua.epdc.dto; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
|
|||
/** |
|||
* 拼团购 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-12-02 |
|||
*/ |
|||
@Data |
|||
public class GroupBuyInfoDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 标题 |
|||
*/ |
|||
private String groupBuyTitle; |
|||
|
|||
/** |
|||
* 联系电话 |
|||
*/ |
|||
private String groupBuyMobile; |
|||
|
|||
/** |
|||
* 发布内容 |
|||
*/ |
|||
private String groupBuyContent; |
|||
|
|||
/** |
|||
* 团购时间 |
|||
*/ |
|||
private Date groupBuyTime; |
|||
|
|||
/** |
|||
* 浏览数 |
|||
*/ |
|||
private Integer browseNum; |
|||
|
|||
/** |
|||
* 拨打次数 |
|||
*/ |
|||
private Integer callNum; |
|||
|
|||
/** |
|||
* 发布人姓名 |
|||
*/ |
|||
private String realName; |
|||
|
|||
/** |
|||
* 发布人ID |
|||
*/ |
|||
private String userId; |
|||
|
|||
/** |
|||
* 发布人昵称 |
|||
*/ |
|||
private String nickname; |
|||
|
|||
/** |
|||
* 头像 |
|||
*/ |
|||
private String faceImg; |
|||
|
|||
/** |
|||
* 发布人电话 |
|||
*/ |
|||
private String publishMobile; |
|||
|
|||
/** |
|||
* 所属网格ID |
|||
*/ |
|||
private Long gridId; |
|||
|
|||
/** |
|||
* 所属网格 |
|||
*/ |
|||
private String grid; |
|||
|
|||
/** |
|||
* 父所有部门 |
|||
*/ |
|||
private String parentDeptIds; |
|||
|
|||
/** |
|||
* 父所有部门名称 |
|||
*/ |
|||
private String parentDeptNames; |
|||
|
|||
/** |
|||
* 所有部门ID |
|||
*/ |
|||
private String allDeptIds; |
|||
|
|||
/** |
|||
* 所有部门名称 |
|||
*/ |
|||
private String allDeptNames; |
|||
|
|||
/** |
|||
* 屏蔽标识 |
|||
*/ |
|||
private String shieldFlag; |
|||
/** |
|||
* 屏蔽人ID |
|||
*/ |
|||
private String shieldUserId; |
|||
|
|||
/** |
|||
* 屏蔽人姓名 |
|||
*/ |
|||
private String shieldUserName; |
|||
|
|||
/** |
|||
* 屏蔽原因 |
|||
*/ |
|||
private String shieldReason; |
|||
|
|||
/** |
|||
* 删除标识 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
/** |
|||
* 排序 |
|||
*/ |
|||
private Integer sort; |
|||
|
|||
} |
@ -0,0 +1,191 @@ |
|||
/** |
|||
* 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.elink.esua.epdc.dto; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
|
|||
/** |
|||
* 顺道捎 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-12-02 |
|||
*/ |
|||
@Data |
|||
public class SdsInfoDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 出发地 |
|||
*/ |
|||
private String departure; |
|||
|
|||
/** |
|||
* 目的地 |
|||
*/ |
|||
private String destination; |
|||
|
|||
/** |
|||
* 出发时间 |
|||
*/ |
|||
private Date departureTime; |
|||
|
|||
/** |
|||
* 联系电话 |
|||
*/ |
|||
private String mobile; |
|||
|
|||
/** |
|||
* 捎带内容 |
|||
*/ |
|||
private String carryContent; |
|||
|
|||
/** |
|||
* 捎带状态 0:我需要捎 1:我可以捎 |
|||
*/ |
|||
private String carryStatus; |
|||
|
|||
/** |
|||
* 浏览数 |
|||
*/ |
|||
private Integer browseNum; |
|||
|
|||
/** |
|||
* 拨打次数 |
|||
*/ |
|||
private Integer callNum; |
|||
|
|||
/** |
|||
* 发布人姓名 |
|||
*/ |
|||
private String realName; |
|||
|
|||
/** |
|||
* 发布人ID |
|||
*/ |
|||
private String userId; |
|||
|
|||
/** |
|||
* 发布人昵称 |
|||
*/ |
|||
private String nickname; |
|||
|
|||
/** |
|||
* 头像 |
|||
*/ |
|||
private String faceImg; |
|||
|
|||
/** |
|||
* 发布人电话 |
|||
*/ |
|||
private String publishMobile; |
|||
|
|||
/** |
|||
* 所属网格ID |
|||
*/ |
|||
private Long gridId; |
|||
|
|||
/** |
|||
* 所属网格 |
|||
*/ |
|||
private String grid; |
|||
|
|||
/** |
|||
* 父所有部门 |
|||
*/ |
|||
private String parentDeptIds; |
|||
|
|||
/** |
|||
* 父所有部门名称 |
|||
*/ |
|||
private String parentDeptNames; |
|||
|
|||
/** |
|||
* 所有部门ID |
|||
*/ |
|||
private String allDeptIds; |
|||
|
|||
/** |
|||
* 所有部门名称 |
|||
*/ |
|||
private String allDeptNames; |
|||
|
|||
/** |
|||
* 屏蔽标识 |
|||
*/ |
|||
private String shieldFlag; |
|||
/** |
|||
* 屏蔽人ID |
|||
*/ |
|||
private String shieldUserId; |
|||
|
|||
/** |
|||
* 屏蔽人姓名 |
|||
*/ |
|||
private String shieldUserName; |
|||
|
|||
/** |
|||
* 删除标识 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
/** |
|||
* 屏蔽原因 |
|||
*/ |
|||
private String shieldReason; |
|||
|
|||
/** |
|||
* 排序 |
|||
*/ |
|||
private Integer sort; |
|||
|
|||
} |
@ -0,0 +1,128 @@ |
|||
/** |
|||
* 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.elink.esua.epdc.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import javax.validation.constraints.NotNull; |
|||
import javax.validation.constraints.Size; |
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
|
|||
/** |
|||
* 拼团购 新增或更新 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-12-02 |
|||
*/ |
|||
@Data |
|||
public class EpdcAddGroupBuyInfoFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 标题 |
|||
*/ |
|||
@NotBlank(message = "标题不能为空") |
|||
@Size(min = 1,max = 16,message = "标题在16字以内") |
|||
private String groupBuyTitle; |
|||
|
|||
/** |
|||
* 联系电话 |
|||
*/ |
|||
@NotBlank(message = "联系电话不能为空") |
|||
@Size(min = 1,max = 20,message = "联系电话在20字以内") |
|||
private String groupBuyMobile; |
|||
|
|||
/** |
|||
* 发布内容 |
|||
*/ |
|||
@NotBlank(message = "发布内容不能为空") |
|||
@Size(min = 1,max = 500,message = "发布内容在500字以内") |
|||
private String groupBuyContent; |
|||
/** |
|||
* 团购时间 |
|||
*/ |
|||
@NotNull(message = "团购时间不能为空") |
|||
private Date groupBuyTime; |
|||
|
|||
/** |
|||
* 发布人姓名 |
|||
*/ |
|||
private String realName; |
|||
|
|||
/** |
|||
* 发布人ID |
|||
*/ |
|||
private String userId; |
|||
|
|||
/** |
|||
* 发布人昵称 |
|||
*/ |
|||
private String nickname; |
|||
|
|||
/** |
|||
* 头像 |
|||
*/ |
|||
private String faceImg; |
|||
|
|||
/** |
|||
* 发布人电话 |
|||
*/ |
|||
private String publishMobile; |
|||
|
|||
/** |
|||
* 所属网格ID |
|||
*/ |
|||
private Long gridId; |
|||
|
|||
/** |
|||
* 所属网格 |
|||
*/ |
|||
private String grid; |
|||
|
|||
/** |
|||
* 父所有部门 |
|||
*/ |
|||
private String parentDeptIds; |
|||
|
|||
/** |
|||
* 父所有部门名称 |
|||
*/ |
|||
private String parentDeptNames; |
|||
|
|||
/** |
|||
* 所有部门ID |
|||
*/ |
|||
private String allDeptIds; |
|||
|
|||
/** |
|||
* 所有部门名称 |
|||
*/ |
|||
private String allDeptNames; |
|||
|
|||
private Boolean isConReview = false; |
|||
|
|||
} |
@ -0,0 +1,144 @@ |
|||
/** |
|||
* 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.elink.esua.epdc.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import javax.validation.constraints.NotNull; |
|||
import javax.validation.constraints.Size; |
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
|
|||
/** |
|||
* 拼团购 新增或更新 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-12-02 |
|||
*/ |
|||
@Data |
|||
public class EpdcAddSdsFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 出发地 |
|||
*/ |
|||
@NotBlank(message = "出发地不能为空") |
|||
@Size(min = 1,max = 100,message = "出发地在100字以内") |
|||
private String departure; |
|||
|
|||
/** |
|||
* 目的地 |
|||
*/ |
|||
@NotBlank(message = "目的地不能为空") |
|||
@Size(min = 1,max = 100,message = "目的地在100字以内") |
|||
private String destination; |
|||
|
|||
/** |
|||
* 出发时间 |
|||
*/ |
|||
@NotNull(message = "出发时间不能为空") |
|||
private Date departureTime; |
|||
|
|||
/** |
|||
* 联系电话 |
|||
*/ |
|||
@NotBlank(message = "联系电话不能为空") |
|||
@Size(min = 1,max = 20,message = "联系电话在20字以内") |
|||
private String mobile; |
|||
|
|||
/** |
|||
* 捎带内容 |
|||
*/ |
|||
@NotBlank(message = "捎带内容不能为空") |
|||
@Size(min = 1,max = 500,message = "捎带内容在500字以内") |
|||
private String carryContent; |
|||
|
|||
/** |
|||
* 捎带状态 0:我需要捎 1:我可以捎 |
|||
*/ |
|||
private String carryStatus; |
|||
|
|||
|
|||
/** |
|||
* 发布人姓名 |
|||
*/ |
|||
private String realName; |
|||
|
|||
/** |
|||
* 发布人ID |
|||
*/ |
|||
private String userId; |
|||
|
|||
/** |
|||
* 发布人昵称 |
|||
*/ |
|||
private String nickname; |
|||
|
|||
/** |
|||
* 头像 |
|||
*/ |
|||
private String faceImg; |
|||
|
|||
/** |
|||
* 发布人电话 |
|||
*/ |
|||
private String publishMobile; |
|||
|
|||
/** |
|||
* 所属网格ID |
|||
*/ |
|||
private Long gridId; |
|||
|
|||
/** |
|||
* 所属网格 |
|||
*/ |
|||
private String grid; |
|||
|
|||
/** |
|||
* 父所有部门 |
|||
*/ |
|||
private String parentDeptIds; |
|||
|
|||
/** |
|||
* 父所有部门名称 |
|||
*/ |
|||
private String parentDeptNames; |
|||
|
|||
/** |
|||
* 所有部门ID |
|||
*/ |
|||
private String allDeptIds; |
|||
|
|||
/** |
|||
* 所有部门名称 |
|||
*/ |
|||
private String allDeptNames; |
|||
|
|||
|
|||
private Boolean isConReview = false; |
|||
|
|||
|
|||
} |
@ -0,0 +1,57 @@ |
|||
/** |
|||
* 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.elink.esua.epdc.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.Min; |
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
|
|||
/** |
|||
* 拼团购 首页列表 表单dto |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-12-02 |
|||
*/ |
|||
@Data |
|||
public class EpdcSelectGroupBuyInfoListFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
|
|||
/** |
|||
* 页码 |
|||
*/ |
|||
@Min(value = 1, message = "页码必须大于0") |
|||
private Integer pageIndex; |
|||
|
|||
/** |
|||
* 页容量 |
|||
*/ |
|||
@Min(value = 1, message = "页容量必须大于0") |
|||
private Integer pageSize; |
|||
|
|||
|
|||
@NotBlank(message = "是否为我发布不能为空") |
|||
private String isMe; |
|||
|
|||
|
|||
private String userId; |
|||
} |
@ -0,0 +1,55 @@ |
|||
/** |
|||
* 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.elink.esua.epdc.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.Min; |
|||
import java.io.Serializable; |
|||
|
|||
|
|||
/** |
|||
* 拼团购 首页列表 表单dto |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-12-02 |
|||
*/ |
|||
@Data |
|||
public class EpdcSelectSdsInfoListFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
|
|||
/** |
|||
* 页码 |
|||
*/ |
|||
@Min(value = 1, message = "页码必须大于0") |
|||
private Integer pageIndex; |
|||
|
|||
/** |
|||
* 页容量 |
|||
*/ |
|||
@Min(value = 1, message = "页容量必须大于0") |
|||
private Integer pageSize; |
|||
|
|||
|
|||
private String type; |
|||
|
|||
|
|||
private String userId; |
|||
} |
@ -0,0 +1,62 @@ |
|||
/** |
|||
* 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.elink.esua.epdc.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
|
|||
/** |
|||
* 拼团购 首页列表 结果 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-12-02 |
|||
*/ |
|||
@Data |
|||
public class EpdcSelectGroupBuyDetailResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 标题 |
|||
*/ |
|||
private String groupBuyTitle; |
|||
|
|||
/** |
|||
* 联系电话 |
|||
*/ |
|||
private String groupBuyMobile; |
|||
|
|||
/** |
|||
* 发布内容 |
|||
*/ |
|||
private String groupBuyContent; |
|||
|
|||
/** |
|||
* 团购时间 |
|||
*/ |
|||
private Date groupBuyTime; |
|||
|
|||
} |
@ -0,0 +1,65 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
|
|||
/** |
|||
* 拼团购 首页列表 结果 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-12-02 |
|||
*/ |
|||
@Data |
|||
public class EpdcSelectGroupBuyInfoListResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* ID |
|||
*/ |
|||
private String id; |
|||
|
|||
|
|||
/** |
|||
* 标题 |
|||
*/ |
|||
private String groupBuyTitle; |
|||
|
|||
/** |
|||
* 联系电话 |
|||
*/ |
|||
private String groupBuyMobile; |
|||
|
|||
/** |
|||
* 发布内容 |
|||
*/ |
|||
private String groupBuyContent; |
|||
|
|||
/** |
|||
* 团购时间 |
|||
*/ |
|||
private Date groupBuyTime; |
|||
|
|||
|
|||
|
|||
} |
@ -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.elink.esua.epdc.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
|
|||
/** |
|||
* 顺道捎 - 首页列表结果返回 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-12-02 |
|||
*/ |
|||
@Data |
|||
public class EpdcSelectSdsInfoDetailResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 出发地 |
|||
*/ |
|||
private String departure; |
|||
|
|||
/** |
|||
* 目的地 |
|||
*/ |
|||
private String destination; |
|||
|
|||
/** |
|||
* 出发时间 |
|||
*/ |
|||
private Date departureTime; |
|||
|
|||
|
|||
/** |
|||
* 联系电话 |
|||
*/ |
|||
private String mobile; |
|||
|
|||
/** |
|||
* 捎带内容 |
|||
*/ |
|||
private String carryContent; |
|||
/** |
|||
* 类型 |
|||
*/ |
|||
private String carryStatus; |
|||
} |
@ -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.elink.esua.epdc.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
|
|||
/** |
|||
* 顺道捎 - 首页列表结果返回 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-12-02 |
|||
*/ |
|||
@Data |
|||
public class EpdcSelectSdsInfoListResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 出发地 |
|||
*/ |
|||
private String departure; |
|||
|
|||
/** |
|||
* 目的地 |
|||
*/ |
|||
private String destination; |
|||
|
|||
/** |
|||
* 出发时间 |
|||
*/ |
|||
private Date departureTime; |
|||
} |
@ -0,0 +1,108 @@ |
|||
/** |
|||
* 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.elink.esua.epdc.modules.groupbuy.controller; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.constant.Constant; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; |
|||
import com.elink.esua.epdc.dto.form.EpdcAddGroupBuyInfoFormDTO; |
|||
import com.elink.esua.epdc.dto.form.EpdcSelectGroupBuyInfoListFormDTO; |
|||
import com.elink.esua.epdc.dto.result.EpdcSelectGroupBuyDetailResultDTO; |
|||
import com.elink.esua.epdc.dto.result.EpdcSelectGroupBuyInfoListResultDTO; |
|||
import com.elink.esua.epdc.modules.groupbuy.service.GroupBuyInfoService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.List; |
|||
|
|||
|
|||
/** |
|||
* 拼团购 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-12-02 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping(Constant.EPDC_APP +"groupBuy") |
|||
public class EpdcAppGroupBuyInfoController { |
|||
|
|||
@Autowired |
|||
private GroupBuyInfoService groupBuyInfoService; |
|||
|
|||
|
|||
/** |
|||
* @Description 获取首页列表 |
|||
* @Author songyunpeng |
|||
* @Date 2020/12/2 |
|||
* @Param [formDTO] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.result.EpdcSelectGroupBuyInfoListResultDTO>> |
|||
**/ |
|||
@GetMapping("getGroupBuyList") |
|||
public Result<List<EpdcSelectGroupBuyInfoListResultDTO>> getGroupBuyList(@RequestBody EpdcSelectGroupBuyInfoListFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO); |
|||
return groupBuyInfoService.getGroupBuyList(formDTO); |
|||
} |
|||
|
|||
/** |
|||
* @Description 详情 |
|||
* @Author songyunpeng |
|||
* @Date 2020/12/2 |
|||
* @Param [id] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.result.EpdcSelectGroupBuyDetailResultDTO> |
|||
**/ |
|||
@GetMapping("getGroupBuyDetail/{id}") |
|||
public Result<EpdcSelectGroupBuyDetailResultDTO> getGroupBuyDetail(@PathVariable String id) { |
|||
return groupBuyInfoService.getGroupBuyDetail(id); |
|||
} |
|||
|
|||
/** |
|||
* @Description 发布或更新 |
|||
* @Author songyunpeng |
|||
* @Date 2020/12/2 |
|||
* @Param [formDTO] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
**/ |
|||
@PostMapping("publishOrUpdate") |
|||
public Result publishOrUpdate(@RequestBody EpdcAddGroupBuyInfoFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO); |
|||
return groupBuyInfoService.publishOrUpdate(formDTO); |
|||
} |
|||
|
|||
/** |
|||
* @Description 删除 |
|||
* @Author songyunpeng |
|||
* @Date 2020/12/2 |
|||
* @Param [id] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
**/ |
|||
@GetMapping("delete/{id}") |
|||
public Result deleteGroupBuy(@PathVariable String id) { |
|||
return groupBuyInfoService.deleteGroupBuy(id); |
|||
} |
|||
/** |
|||
* @Description 打电话计算次数 |
|||
* @Author songyunpeng |
|||
* @Date 2020/12/2 |
|||
* @Param [id] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
**/ |
|||
@GetMapping("callMobile/{id}") |
|||
public Result callMobile(@PathVariable String id) { |
|||
return groupBuyInfoService.callMobile(id); |
|||
} |
|||
} |
@ -0,0 +1,94 @@ |
|||
/** |
|||
* 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.elink.esua.epdc.modules.groupbuy.controller; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.page.PageData; |
|||
import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.commons.tools.validator.AssertUtils; |
|||
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; |
|||
import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; |
|||
import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; |
|||
import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; |
|||
import com.elink.esua.epdc.dto.GroupBuyInfoDTO; |
|||
import com.elink.esua.epdc.modules.groupbuy.excel.GroupBuyInfoExcel; |
|||
import com.elink.esua.epdc.modules.groupbuy.service.GroupBuyInfoService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.servlet.http.HttpServletResponse; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
|
|||
/** |
|||
* 拼团购 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-12-02 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("groupbuyinfo") |
|||
public class GroupBuyInfoController { |
|||
|
|||
@Autowired |
|||
private GroupBuyInfoService groupBuyInfoService; |
|||
|
|||
@GetMapping("page") |
|||
public Result<PageData<GroupBuyInfoDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<GroupBuyInfoDTO> page = groupBuyInfoService.page(params); |
|||
return new Result<PageData<GroupBuyInfoDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<GroupBuyInfoDTO> get(@PathVariable("id") String id){ |
|||
GroupBuyInfoDTO data = groupBuyInfoService.get(id); |
|||
return new Result<GroupBuyInfoDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
public Result save(@RequestBody GroupBuyInfoDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
groupBuyInfoService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PutMapping |
|||
public Result update(@RequestBody GroupBuyInfoDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
groupBuyInfoService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
groupBuyInfoService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
@GetMapping("export") |
|||
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<GroupBuyInfoDTO> list = groupBuyInfoService.list(params); |
|||
ExcelUtils.exportExcelToTarget(response, null, list, GroupBuyInfoExcel.class); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,70 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.modules.groupbuy.dao; |
|||
|
|||
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; |
|||
import com.elink.esua.epdc.dto.GroupBuyInfoDTO; |
|||
import com.elink.esua.epdc.dto.form.EpdcSelectGroupBuyInfoListFormDTO; |
|||
import com.elink.esua.epdc.dto.result.EpdcSelectGroupBuyDetailResultDTO; |
|||
import com.elink.esua.epdc.dto.result.EpdcSelectGroupBuyInfoListResultDTO; |
|||
import com.elink.esua.epdc.modules.groupbuy.entity.GroupBuyInfoEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 拼团购 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-12-02 |
|||
*/ |
|||
@Mapper |
|||
public interface GroupBuyInfoDao extends BaseDao<GroupBuyInfoEntity> { |
|||
/** |
|||
* @Description app - 获取首页列表 |
|||
* @Author songyunpeng |
|||
* @Date 2020/12/2 |
|||
* @Param [formDTO] |
|||
* @return java.util.List<com.elink.esua.epdc.dto.result.EpdcSelectGroupBuyInfoListResultDTO> |
|||
**/ |
|||
List<EpdcSelectGroupBuyInfoListResultDTO> getGroupBuyList(EpdcSelectGroupBuyInfoListFormDTO formDTO); |
|||
/** |
|||
* @Description 详情 |
|||
* @Author songyunpeng |
|||
* @Date 2020/12/2 |
|||
* @Param [id] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.result.EpdcSelectGroupBuyDetailResultDTO> |
|||
**/ |
|||
EpdcSelectGroupBuyDetailResultDTO getGroupBuyDetail(String id); |
|||
/** |
|||
* @Description 查询需要修改组织机构信息事件 |
|||
* @Author songyunpeng |
|||
* @Date 2020/11/25 |
|||
* @Param [toString] |
|||
* @return java.util.List<com.elink.esua.epdc.dto.GroupBuyInfoDTO> |
|||
**/ |
|||
List<GroupBuyInfoDTO> selectListOfOrganizationInfo(String toString); |
|||
/** |
|||
* @Description 更新部门名 |
|||
* @Author songyunpeng |
|||
* @Date 2020/11/25 |
|||
* @Param [newDeptName, deptId] |
|||
* @return void |
|||
**/ |
|||
void updateGridByDeptId(String newDeptName, Long deptId); |
|||
} |
@ -0,0 +1,148 @@ |
|||
/** |
|||
* 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.elink.esua.epdc.modules.groupbuy.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 拼团购 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-12-02 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("epdc_group_buy_info") |
|||
public class GroupBuyInfoEntity extends BaseEpdcEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 标题 |
|||
*/ |
|||
private String groupBuyTitle; |
|||
|
|||
/** |
|||
* 联系电话 |
|||
*/ |
|||
private String groupBuyMobile; |
|||
|
|||
/** |
|||
* 发布内容 |
|||
*/ |
|||
private String groupBuyContent; |
|||
|
|||
/** |
|||
* 团购时间 |
|||
*/ |
|||
private Date groupBuyTime; |
|||
|
|||
/** |
|||
* 浏览数 |
|||
*/ |
|||
private Integer browseNum; |
|||
|
|||
/** |
|||
* 拨打次数 |
|||
*/ |
|||
private Integer callNum; |
|||
|
|||
/** |
|||
* 发布人姓名 |
|||
*/ |
|||
private String realName; |
|||
|
|||
/** |
|||
* 发布人ID |
|||
*/ |
|||
private String userId; |
|||
|
|||
/** |
|||
* 发布人昵称 |
|||
*/ |
|||
private String nickname; |
|||
|
|||
/** |
|||
* 头像 |
|||
*/ |
|||
private String faceImg; |
|||
|
|||
/** |
|||
* 发布人电话 |
|||
*/ |
|||
private String publishMobile; |
|||
|
|||
/** |
|||
* 所属网格ID |
|||
*/ |
|||
private Long gridId; |
|||
|
|||
/** |
|||
* 所属网格 |
|||
*/ |
|||
private String grid; |
|||
|
|||
/** |
|||
* 父所有部门 |
|||
*/ |
|||
private String parentDeptIds; |
|||
|
|||
/** |
|||
* 父所有部门名称 |
|||
*/ |
|||
private String parentDeptNames; |
|||
|
|||
/** |
|||
* 所有部门ID |
|||
*/ |
|||
private String allDeptIds; |
|||
|
|||
/** |
|||
* 所有部门名称 |
|||
*/ |
|||
private String allDeptNames; |
|||
|
|||
/** |
|||
* 屏蔽标识 |
|||
*/ |
|||
private String shieldFlag; |
|||
/** |
|||
* 屏蔽人ID |
|||
*/ |
|||
private String shieldUserId; |
|||
|
|||
/** |
|||
* 屏蔽人姓名 |
|||
*/ |
|||
private String shieldUserName; |
|||
|
|||
/** |
|||
* 屏蔽原因 |
|||
*/ |
|||
private String shieldReason; |
|||
|
|||
/** |
|||
* 排序 |
|||
*/ |
|||
private Integer sort; |
|||
} |
@ -0,0 +1,113 @@ |
|||
/** |
|||
* 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.elink.esua.epdc.modules.groupbuy.excel; |
|||
|
|||
import cn.afterturn.easypoi.excel.annotation.Excel; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 拼团购 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-12-02 |
|||
*/ |
|||
@Data |
|||
public class GroupBuyInfoExcel { |
|||
|
|||
@Excel(name = "主键") |
|||
private String id; |
|||
|
|||
@Excel(name = "标题") |
|||
private String groupBuyTitle; |
|||
|
|||
@Excel(name = "联系电话") |
|||
private String groupBuyMobile; |
|||
|
|||
@Excel(name = "发布内容") |
|||
private String groupBuyContent; |
|||
|
|||
@Excel(name = "浏览数") |
|||
private Integer browseNum; |
|||
|
|||
@Excel(name = "拨打次数") |
|||
private Integer callNum; |
|||
|
|||
@Excel(name = "发布人姓名") |
|||
private String realName; |
|||
|
|||
@Excel(name = "发布人ID") |
|||
private String userId; |
|||
|
|||
@Excel(name = "发布人昵称") |
|||
private String nickname; |
|||
|
|||
@Excel(name = "头像") |
|||
private String faceImg; |
|||
|
|||
@Excel(name = "发布人电话") |
|||
private String publishMobile; |
|||
|
|||
@Excel(name = "所属网格ID") |
|||
private Long gridId; |
|||
|
|||
@Excel(name = "所属网格") |
|||
private String grid; |
|||
|
|||
@Excel(name = "父所有部门") |
|||
private String parentDeptIds; |
|||
|
|||
@Excel(name = "父所有部门名称") |
|||
private String parentDeptNames; |
|||
|
|||
@Excel(name = "所有部门ID") |
|||
private String allDeptIds; |
|||
|
|||
@Excel(name = "所有部门名称") |
|||
private String allDeptNames; |
|||
|
|||
@Excel(name = "屏蔽人ID") |
|||
private String shieldUserId; |
|||
|
|||
@Excel(name = "屏蔽人姓名") |
|||
private String shieldUserName; |
|||
|
|||
@Excel(name = "屏蔽原因") |
|||
private String shieldReason; |
|||
|
|||
@Excel(name = "删除标识") |
|||
private String delFlag; |
|||
|
|||
@Excel(name = "乐观锁") |
|||
private Integer revision; |
|||
|
|||
@Excel(name = "创建人") |
|||
private String createdBy; |
|||
|
|||
@Excel(name = "创建时间") |
|||
private Date createdTime; |
|||
|
|||
@Excel(name = "更新人") |
|||
private String updatedBy; |
|||
|
|||
@Excel(name = "更新时间") |
|||
private Date updatedTime; |
|||
|
|||
|
|||
} |
@ -0,0 +1,47 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.modules.groupbuy.redis; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.redis.RedisUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* 拼团购 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-12-02 |
|||
*/ |
|||
@Component |
|||
public class GroupBuyInfoRedis { |
|||
@Autowired |
|||
private RedisUtils redisUtils; |
|||
|
|||
public void delete(Object[] ids) { |
|||
|
|||
} |
|||
|
|||
public void set(){ |
|||
|
|||
} |
|||
|
|||
public String get(String id){ |
|||
return null; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,158 @@ |
|||
/** |
|||
* 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.elink.esua.epdc.modules.groupbuy.service; |
|||
|
|||
import com.elink.esua.epdc.commons.mybatis.service.BaseService; |
|||
import com.elink.esua.epdc.commons.tools.page.PageData; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.dto.GroupBuyInfoDTO; |
|||
import com.elink.esua.epdc.dto.form.EpdcAddGroupBuyInfoFormDTO; |
|||
import com.elink.esua.epdc.dto.form.EpdcSelectGroupBuyInfoListFormDTO; |
|||
import com.elink.esua.epdc.dto.result.EpdcSelectGroupBuyDetailResultDTO; |
|||
import com.elink.esua.epdc.dto.result.EpdcSelectGroupBuyInfoListResultDTO; |
|||
import com.elink.esua.epdc.modules.groupbuy.entity.GroupBuyInfoEntity; |
|||
import com.elink.esua.epdc.modules.rocketmq.dto.OrganizationModifyDTO; |
|||
import com.elink.esua.epdc.modules.rocketmq.dto.RejectRecordDTO; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 拼团购 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-12-02 |
|||
*/ |
|||
public interface GroupBuyInfoService extends BaseService<GroupBuyInfoEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<GroupBuyInfoDTO> |
|||
* @author generator |
|||
* @date 2020-12-02 |
|||
*/ |
|||
PageData<GroupBuyInfoDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<GroupBuyInfoDTO> |
|||
* @author generator |
|||
* @date 2020-12-02 |
|||
*/ |
|||
List<GroupBuyInfoDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return GroupBuyInfoDTO |
|||
* @author generator |
|||
* @date 2020-12-02 |
|||
*/ |
|||
GroupBuyInfoDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-12-02 |
|||
*/ |
|||
void save(GroupBuyInfoDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-12-02 |
|||
*/ |
|||
void update(GroupBuyInfoDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-12-02 |
|||
*/ |
|||
void delete(String[] ids); |
|||
/** |
|||
* @Description 获取首页列表 |
|||
* @Author songyunpeng |
|||
* @Date 2020/12/2 |
|||
* @Param [formDTO] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.result.EpdcSelectGroupBuyInfoListResultDTO>> |
|||
**/ |
|||
Result<List<EpdcSelectGroupBuyInfoListResultDTO>> getGroupBuyList(EpdcSelectGroupBuyInfoListFormDTO formDTO); |
|||
/** |
|||
* @Description 详情 |
|||
* @Author songyunpeng |
|||
* @Date 2020/12/2 |
|||
* @Param [id] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.result.EpdcSelectGroupBuyDetailResultDTO> |
|||
**/ |
|||
Result<EpdcSelectGroupBuyDetailResultDTO> getGroupBuyDetail(String id); |
|||
/** |
|||
* @Description 发布或更新 |
|||
* @Author songyunpeng |
|||
* @Date 2020/12/2 |
|||
* @Param [formDTO] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.result.EpdcSelectGroupBuyDetailResultDTO> |
|||
**/ |
|||
Result publishOrUpdate(EpdcAddGroupBuyInfoFormDTO formDTO); |
|||
/** |
|||
* @Description 删除 |
|||
* @Author songyunpeng |
|||
* @Date 2020/12/2 |
|||
* @Param [id] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
**/ |
|||
Result deleteGroupBuy(String id); |
|||
/** |
|||
* @Description 打电话计算次数 |
|||
* @Author songyunpeng |
|||
* @Date 2020/12/2 |
|||
* @Param [id] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
**/ |
|||
Result callMobile(String id); |
|||
/** |
|||
* @Description 删除拼团购信息 |
|||
* @Author songyunpeng |
|||
* @Date 2020/12/4 |
|||
* @Param [dto] |
|||
* @return void |
|||
**/ |
|||
void rejectActInfo(RejectRecordDTO dto); |
|||
/** |
|||
* @Description 修改组织机构信息 |
|||
* @Author songyunpeng |
|||
* @Date 2020/12/4 |
|||
* @Param [dto] |
|||
* @return void |
|||
**/ |
|||
void modifyOrganizationInfo(OrganizationModifyDTO dto); |
|||
} |
@ -0,0 +1,279 @@ |
|||
/** |
|||
* 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.elink.esua.epdc.modules.groupbuy.service.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.elink.esua.epdc.commons.tools.constant.FieldConstant; |
|||
import com.elink.esua.epdc.commons.tools.constant.NumConstant; |
|||
import com.elink.esua.epdc.commons.tools.page.PageData; |
|||
import com.elink.esua.epdc.commons.tools.security.content.CheckDataUtils; |
|||
import com.elink.esua.epdc.commons.tools.security.content.ModuleName; |
|||
import com.elink.esua.epdc.commons.tools.security.content.dto.form.ParentAndAllDeptDTO; |
|||
import com.elink.esua.epdc.commons.tools.security.content.dto.form.SaveCheckRecordsDTO; |
|||
import com.elink.esua.epdc.commons.tools.security.content.dto.result.CheckResultDTO; |
|||
import com.elink.esua.epdc.commons.tools.security.content.dto.result.CheckResultMessageDTO; |
|||
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.dto.GroupBuyInfoDTO; |
|||
import com.elink.esua.epdc.dto.form.EpdcAddGroupBuyInfoFormDTO; |
|||
import com.elink.esua.epdc.dto.form.EpdcSelectGroupBuyInfoListFormDTO; |
|||
import com.elink.esua.epdc.dto.result.EpdcSelectGroupBuyDetailResultDTO; |
|||
import com.elink.esua.epdc.dto.result.EpdcSelectGroupBuyInfoListResultDTO; |
|||
import com.elink.esua.epdc.modules.feign.AdminFeignClient; |
|||
import com.elink.esua.epdc.modules.feign.ContentSecurityFeignClient; |
|||
import com.elink.esua.epdc.modules.groupbuy.dao.GroupBuyInfoDao; |
|||
import com.elink.esua.epdc.modules.groupbuy.entity.GroupBuyInfoEntity; |
|||
import com.elink.esua.epdc.modules.groupbuy.redis.GroupBuyInfoRedis; |
|||
import com.elink.esua.epdc.modules.groupbuy.service.GroupBuyInfoService; |
|||
import com.elink.esua.epdc.modules.rocketmq.dto.OrganizationModifyDTO; |
|||
import com.elink.esua.epdc.modules.rocketmq.dto.RejectRecordDTO; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.*; |
|||
|
|||
/** |
|||
* 拼团购 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-12-02 |
|||
*/ |
|||
@Service |
|||
public class GroupBuyInfoServiceImpl extends BaseServiceImpl<GroupBuyInfoDao, GroupBuyInfoEntity> implements GroupBuyInfoService { |
|||
|
|||
@Autowired |
|||
private GroupBuyInfoRedis groupBuyInfoRedis; |
|||
|
|||
|
|||
@Autowired |
|||
private AdminFeignClient adminFeignClient; |
|||
|
|||
|
|||
@Autowired |
|||
private ContentSecurityFeignClient contentSecurityFeign; |
|||
|
|||
@Override |
|||
public PageData<GroupBuyInfoDTO> page(Map<String, Object> params) { |
|||
IPage<GroupBuyInfoEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, GroupBuyInfoDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<GroupBuyInfoDTO> list(Map<String, Object> params) { |
|||
List<GroupBuyInfoEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, GroupBuyInfoDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<GroupBuyInfoEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<GroupBuyInfoEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public GroupBuyInfoDTO get(String id) { |
|||
GroupBuyInfoEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, GroupBuyInfoDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(GroupBuyInfoDTO dto) { |
|||
GroupBuyInfoEntity entity = ConvertUtils.sourceToTarget(dto, GroupBuyInfoEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(GroupBuyInfoDTO dto) { |
|||
GroupBuyInfoEntity entity = ConvertUtils.sourceToTarget(dto, GroupBuyInfoEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
@Override |
|||
public Result<List<EpdcSelectGroupBuyInfoListResultDTO>> getGroupBuyList(EpdcSelectGroupBuyInfoListFormDTO formDTO) { |
|||
int pageIndex = (formDTO.getPageIndex() - NumConstant.ONE) * formDTO.getPageSize(); |
|||
formDTO.setPageIndex(pageIndex); |
|||
|
|||
List<EpdcSelectGroupBuyInfoListResultDTO> list = this.baseDao.getGroupBuyList(formDTO); |
|||
return new Result().ok(list); |
|||
} |
|||
|
|||
@Override |
|||
public Result<EpdcSelectGroupBuyDetailResultDTO> getGroupBuyDetail(String id) { |
|||
//查看详情 新增浏览次数
|
|||
GroupBuyInfoEntity groupBuyInfoEntity = selectById(id); |
|||
groupBuyInfoEntity.setBrowseNum(groupBuyInfoEntity.getBrowseNum()==null?1:groupBuyInfoEntity.getBrowseNum()+1); |
|||
updateById(groupBuyInfoEntity); |
|||
return new Result<EpdcSelectGroupBuyDetailResultDTO>().ok(this.baseDao.getGroupBuyDetail(id)); |
|||
} |
|||
|
|||
@Override |
|||
public Result publishOrUpdate(EpdcAddGroupBuyInfoFormDTO formDTO) { |
|||
//内容审核 - start
|
|||
Boolean isConReview = formDTO.getIsConReview(); |
|||
List<String> textList = new ArrayList<>(); |
|||
textList.add(formDTO.getGroupBuyContent()); |
|||
// 获取所有上级机构名称和ID拼接
|
|||
ParentAndAllDeptDTO deptDto = adminFeignClient.getParentAndAllDept(formDTO.getGridId()).getData(); |
|||
CheckResultDTO contentResult = CheckDataUtils.checkContent(textList); |
|||
if(!isConReview && |
|||
((contentResult != null && !contentResult.getAllPass()))){ |
|||
//组装要保存的信息
|
|||
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(formDTO.getUserId(), |
|||
formDTO.getNickname(), CheckDataUtils.cate_two, CheckDataUtils.decision_one, ModuleName.GROUP_BUY_CONTENT.getCode(), textList, |
|||
null, null,contentResult, null,null,formDTO.getGroupBuyMobile(),"0",deptDto); |
|||
contentSecurityFeign.insertViolationsRecord(record); |
|||
return new Result().error(CheckDataUtils.violations_code,CheckDataUtils.violations_message); |
|||
} |
|||
//内容审核 - end
|
|||
|
|||
if(formDTO.getGroupBuyTime().before(new Date())){ |
|||
return new Result().error("团购时间不能小于当前时间"); |
|||
} |
|||
GroupBuyInfoEntity groupBuyInfoEntity = ConvertUtils.sourceToTarget(formDTO,GroupBuyInfoEntity.class); |
|||
if(StringUtils.isNotBlank(formDTO.getId())){ |
|||
updateById(groupBuyInfoEntity); |
|||
}else { |
|||
//新增
|
|||
insert(groupBuyInfoEntity); |
|||
} |
|||
//内容审核 - start
|
|||
//接口异常,保存至待审核信息
|
|||
if((contentResult == null) && !isConReview) { |
|||
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(formDTO.getUserId(), |
|||
formDTO.getNickname(), CheckDataUtils.cate_two, null,ModuleName.GROUP_BUY_CONTENT.getCode(), textList, |
|||
null, groupBuyInfoEntity.getId(),null,null, null,formDTO.getGroupBuyMobile(),"1",deptDto); |
|||
contentSecurityFeign.insertRecords(record); |
|||
} |
|||
|
|||
//保存待审核记录
|
|||
if (contentResult != null) { |
|||
CheckResultMessageDTO twoTypes = null; |
|||
if(isConReview){ |
|||
twoTypes = CheckDataUtils.saveTwoTypes(contentResult, null); |
|||
}else{ |
|||
twoTypes = CheckDataUtils.checkTwoTypes(contentResult, null); |
|||
} |
|||
if (CheckDataUtils.review.equals(twoTypes.getSuggestion())) { |
|||
//组装要保存的信息
|
|||
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(formDTO.getUserId(), |
|||
formDTO.getNickname(), CheckDataUtils.cate_two, null, ModuleName.GROUP_BUY_CONTENT.getCode(), textList, |
|||
null, groupBuyInfoEntity.getId(), null, null, twoTypes, formDTO.getGroupBuyMobile(), "0",deptDto); |
|||
contentSecurityFeign.insertRecords(record); |
|||
} |
|||
} |
|||
//内容审核 - end
|
|||
return new Result(); |
|||
} |
|||
|
|||
@Override |
|||
public Result deleteGroupBuy(String id) { |
|||
this.deleteById(id); |
|||
return new Result(); |
|||
} |
|||
|
|||
@Override |
|||
public Result callMobile(String id) { |
|||
GroupBuyInfoEntity groupBuyInfoEntity = selectById(id); |
|||
if(groupBuyInfoEntity==null){ |
|||
return new Result(); |
|||
} |
|||
groupBuyInfoEntity.setCallNum(groupBuyInfoEntity.getCallNum()==null?1:groupBuyInfoEntity.getCallNum()+1); |
|||
updateById(groupBuyInfoEntity); |
|||
return new Result(); |
|||
} |
|||
|
|||
@Override |
|||
public void modifyOrganizationInfo(OrganizationModifyDTO dto) { |
|||
// 查询需要修改组织机构信息事件
|
|||
List<GroupBuyInfoDTO> eventsList = baseDao.selectListOfOrganizationInfo(dto.getDeptId().toString()); |
|||
if (null != eventsList && eventsList.size() > 0) { |
|||
// 组织机构信息处理
|
|||
List<GroupBuyInfoEntity> entities = handleOrganizationInfo(dto, eventsList); |
|||
// 更新事件组织机构信息
|
|||
updateBatchById(entities); |
|||
} |
|||
|
|||
// 更新网格名称
|
|||
baseDao.updateGridByDeptId(dto.getNewDeptName(), dto.getDeptId()); |
|||
} |
|||
|
|||
@Override |
|||
public void rejectActInfo(RejectRecordDTO dto) { |
|||
baseDao.deleteById(dto.getRelationId()); |
|||
} |
|||
|
|||
/** |
|||
* 组织机构信息处理 |
|||
* |
|||
* @return java.util.List<com.elink.esua.epdc.entity.UserEntity> |
|||
* @params [dto, userList] |
|||
* @author liuchuang |
|||
* @since 2020/3/7 15:22 |
|||
*/ |
|||
private List<GroupBuyInfoEntity> handleOrganizationInfo(OrganizationModifyDTO dto, List<GroupBuyInfoDTO> userList) { |
|||
List<GroupBuyInfoEntity> entities = new ArrayList<>(); |
|||
for (GroupBuyInfoDTO user : userList) { |
|||
GroupBuyInfoEntity entity = new GroupBuyInfoEntity(); |
|||
if (StringUtils.isNotEmpty(user.getParentDeptIds()) && StringUtils.isNotEmpty(user.getParentDeptNames())) { |
|||
List<String> parentDeptIds = Arrays.asList(user.getParentDeptIds().split(",")); |
|||
List<String> parentDeptNames = Arrays.asList(user.getParentDeptNames().split("-")); |
|||
int index = parentDeptIds.indexOf(dto.getDeptId().toString()); |
|||
if (index >= 0 && parentDeptNames.size() > index) { |
|||
parentDeptNames.set(index, dto.getNewDeptName()); |
|||
entity.setId(user.getId()); |
|||
entity.setParentDeptNames(StringUtils.join(parentDeptNames, "-")); |
|||
} |
|||
} |
|||
|
|||
if (StringUtils.isNotEmpty(user.getAllDeptIds()) && StringUtils.isNotEmpty(user.getAllDeptNames())) { |
|||
List<String> allDeptIds = Arrays.asList(user.getAllDeptIds().split(",")); |
|||
List<String> allDeptNames = Arrays.asList(user.getAllDeptNames().split("-")); |
|||
int index = allDeptIds.indexOf(dto.getDeptId().toString()); |
|||
if (index >= 0 && allDeptNames.size() > index) { |
|||
allDeptNames.set(index, dto.getNewDeptName()); |
|||
entity.setId(user.getId()); |
|||
entity.setAllDeptNames(StringUtils.join(allDeptNames, "-")); |
|||
} |
|||
} |
|||
|
|||
entities.add(entity); |
|||
} |
|||
|
|||
return entities; |
|||
} |
|||
} |
@ -0,0 +1,108 @@ |
|||
/** |
|||
* 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.elink.esua.epdc.modules.sds.controller; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.constant.Constant; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; |
|||
import com.elink.esua.epdc.dto.form.EpdcAddSdsFormDTO; |
|||
import com.elink.esua.epdc.dto.form.EpdcSelectSdsInfoListFormDTO; |
|||
import com.elink.esua.epdc.dto.result.EpdcSelectSdsInfoDetailResultDTO; |
|||
import com.elink.esua.epdc.dto.result.EpdcSelectSdsInfoListResultDTO; |
|||
import com.elink.esua.epdc.modules.sds.service.SdsInfoService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.List; |
|||
|
|||
|
|||
/** |
|||
* 拼团购 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-12-02 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping(Constant.EPDC_APP +"sds") |
|||
public class EpdcAppSdsInfoController { |
|||
|
|||
@Autowired |
|||
private SdsInfoService sdsInfoService; |
|||
|
|||
|
|||
/** |
|||
* @Description 获取首页列表 |
|||
* @Author songyunpeng |
|||
* @Date 2020/12/2 |
|||
* @Param [formDTO] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.result.EpdcSelectSdsInfoListResultDTO>> |
|||
**/ |
|||
@GetMapping("getSdsList") |
|||
public Result<List<EpdcSelectSdsInfoListResultDTO>> getSdsList(@RequestBody EpdcSelectSdsInfoListFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO); |
|||
return sdsInfoService.getSdsList(formDTO); |
|||
} |
|||
|
|||
/** |
|||
* @Description 详情 |
|||
* @Author songyunpeng |
|||
* @Date 2020/12/2 |
|||
* @Param [id] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.result.EpdcSelectSdsDetailResultDTO> |
|||
**/ |
|||
@GetMapping("getSdsDetail/{id}") |
|||
public Result<EpdcSelectSdsInfoDetailResultDTO> getSdsDetail(@PathVariable String id) { |
|||
return sdsInfoService.getSdsDetail(id); |
|||
} |
|||
|
|||
/** |
|||
* @Description 发布或更新 |
|||
* @Author songyunpeng |
|||
* @Date 2020/12/2 |
|||
* @Param [formDTO] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
**/ |
|||
@PostMapping("publishOrUpdate") |
|||
public Result publishOrUpdate(@RequestBody EpdcAddSdsFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO); |
|||
return sdsInfoService.publishOrUpdate(formDTO); |
|||
} |
|||
|
|||
/** |
|||
* @Description 删除 |
|||
* @Author songyunpeng |
|||
* @Date 2020/12/2 |
|||
* @Param [id] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
**/ |
|||
@GetMapping("delete/{id}") |
|||
public Result deleteSds(@PathVariable String id) { |
|||
return sdsInfoService.deleteSds(id); |
|||
} |
|||
/** |
|||
* @Description 打电话计算次数 |
|||
* @Author songyunpeng |
|||
* @Date 2020/12/2 |
|||
* @Param [id] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
**/ |
|||
@GetMapping("callMobile/{id}") |
|||
public Result callMobile(@PathVariable String id) { |
|||
return sdsInfoService.callMobile(id); |
|||
} |
|||
} |
@ -0,0 +1,94 @@ |
|||
/** |
|||
* 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.elink.esua.epdc.modules.sds.controller; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.page.PageData; |
|||
import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.commons.tools.validator.AssertUtils; |
|||
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; |
|||
import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; |
|||
import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; |
|||
import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; |
|||
import com.elink.esua.epdc.dto.SdsInfoDTO; |
|||
import com.elink.esua.epdc.modules.sds.excel.SdsInfoExcel; |
|||
import com.elink.esua.epdc.modules.sds.service.SdsInfoService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.servlet.http.HttpServletResponse; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
|
|||
/** |
|||
* 顺道捎 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-12-02 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("sdsinfo") |
|||
public class SdsInfoController { |
|||
|
|||
@Autowired |
|||
private SdsInfoService sdsInfoService; |
|||
|
|||
@GetMapping("page") |
|||
public Result<PageData<SdsInfoDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<SdsInfoDTO> page = sdsInfoService.page(params); |
|||
return new Result<PageData<SdsInfoDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<SdsInfoDTO> get(@PathVariable("id") String id){ |
|||
SdsInfoDTO data = sdsInfoService.get(id); |
|||
return new Result<SdsInfoDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
public Result save(@RequestBody SdsInfoDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
sdsInfoService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PutMapping |
|||
public Result update(@RequestBody SdsInfoDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
sdsInfoService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
sdsInfoService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
@GetMapping("export") |
|||
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<SdsInfoDTO> list = sdsInfoService.list(params); |
|||
ExcelUtils.exportExcelToTarget(response, null, list, SdsInfoExcel.class); |
|||
} |
|||
|
|||
} |
@ -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.elink.esua.epdc.modules.sds.dao; |
|||
|
|||
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; |
|||
import com.elink.esua.epdc.dto.SdsInfoDTO; |
|||
import com.elink.esua.epdc.dto.form.EpdcSelectSdsInfoListFormDTO; |
|||
import com.elink.esua.epdc.dto.result.EpdcSelectSdsInfoDetailResultDTO; |
|||
import com.elink.esua.epdc.dto.result.EpdcSelectSdsInfoListResultDTO; |
|||
import com.elink.esua.epdc.modules.sds.entity.SdsInfoEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 顺道捎 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-12-02 |
|||
*/ |
|||
@Mapper |
|||
public interface SdsInfoDao extends BaseDao<SdsInfoEntity> { |
|||
/** |
|||
* @Description 小程序-获取首页列表 |
|||
* @Author songyunpeng |
|||
* @Date 2020/12/3 |
|||
* @Param [formDTO] |
|||
* @return java.util.List<com.elink.esua.epdc.dto.result.EpdcSelectSdsInfoListResultDTO> |
|||
**/ |
|||
List<EpdcSelectSdsInfoListResultDTO> getSdsList(EpdcSelectSdsInfoListFormDTO formDTO); |
|||
/** |
|||
* @Description 小程序-获取列表详情 |
|||
* @Author songyunpeng |
|||
* @Date 2020/12/3 |
|||
* @Param [id] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.result.EpdcSelectSdsInfoDetailResultDTO> |
|||
**/ |
|||
EpdcSelectSdsInfoDetailResultDTO getSdsDetail(String id); |
|||
|
|||
/** |
|||
* @Description 查询需要修改组织机构信息事件 |
|||
* @Author songyunpeng |
|||
* @Date 2020/11/25 |
|||
* @Param [toString] |
|||
* @return java.util.List<com.elink.esua.epdc.dto.ArchivesDTO> |
|||
**/ |
|||
List<SdsInfoDTO> selectListOfOrganizationInfo(String toString); |
|||
/** |
|||
* @Description 更新部门名 |
|||
* @Author songyunpeng |
|||
* @Date 2020/11/25 |
|||
* @Param [newDeptName, deptId] |
|||
* @return void |
|||
**/ |
|||
void updateGridByDeptId(String newDeptName, Long deptId); |
|||
} |
@ -0,0 +1,158 @@ |
|||
/** |
|||
* 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.elink.esua.epdc.modules.sds.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 顺道捎 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-12-02 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("epdc_sds_info") |
|||
public class SdsInfoEntity extends BaseEpdcEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 出发地 |
|||
*/ |
|||
private String departure; |
|||
|
|||
/** |
|||
* 目的地 |
|||
*/ |
|||
private String destination; |
|||
|
|||
/** |
|||
* 出发时间 |
|||
*/ |
|||
private Date departureTime; |
|||
|
|||
/** |
|||
* 联系电话 |
|||
*/ |
|||
private String mobile; |
|||
|
|||
/** |
|||
* 捎带内容 |
|||
*/ |
|||
private String carryContent; |
|||
|
|||
/** |
|||
* 捎带状态 0:我需要捎 1:我可以捎 |
|||
*/ |
|||
private String carryStatus; |
|||
|
|||
/** |
|||
* 浏览数 |
|||
*/ |
|||
private Integer browseNum; |
|||
|
|||
/** |
|||
* 拨打次数 |
|||
*/ |
|||
private Integer callNum; |
|||
|
|||
/** |
|||
* 发布人姓名 |
|||
*/ |
|||
private String realName; |
|||
|
|||
/** |
|||
* 发布人ID |
|||
*/ |
|||
private String userId; |
|||
|
|||
/** |
|||
* 发布人昵称 |
|||
*/ |
|||
private String nickname; |
|||
|
|||
/** |
|||
* 头像 |
|||
*/ |
|||
private String faceImg; |
|||
|
|||
/** |
|||
* 发布人电话 |
|||
*/ |
|||
private String publishMobile; |
|||
|
|||
/** |
|||
* 所属网格ID |
|||
*/ |
|||
private Long gridId; |
|||
|
|||
/** |
|||
* 所属网格 |
|||
*/ |
|||
private String grid; |
|||
|
|||
/** |
|||
* 父所有部门 |
|||
*/ |
|||
private String parentDeptIds; |
|||
|
|||
/** |
|||
* 父所有部门名称 |
|||
*/ |
|||
private String parentDeptNames; |
|||
|
|||
/** |
|||
* 所有部门ID |
|||
*/ |
|||
private String allDeptIds; |
|||
|
|||
/** |
|||
* 所有部门名称 |
|||
*/ |
|||
private String allDeptNames; |
|||
|
|||
/** |
|||
* 屏蔽标识 |
|||
*/ |
|||
private String shieldFlag; |
|||
/** |
|||
* 屏蔽人ID |
|||
*/ |
|||
private String shieldUserId; |
|||
|
|||
/** |
|||
* 屏蔽人姓名 |
|||
*/ |
|||
private String shieldUserName; |
|||
|
|||
/** |
|||
* 屏蔽原因 |
|||
*/ |
|||
private String shieldReason; |
|||
/** |
|||
* 排序 |
|||
*/ |
|||
private Integer sort; |
|||
} |
@ -0,0 +1,122 @@ |
|||
/** |
|||
* 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.elink.esua.epdc.modules.sds.excel; |
|||
|
|||
import cn.afterturn.easypoi.excel.annotation.Excel; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 顺道捎 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-12-02 |
|||
*/ |
|||
@Data |
|||
public class SdsInfoExcel { |
|||
|
|||
@Excel(name = "主键") |
|||
private String id; |
|||
|
|||
@Excel(name = "出发地") |
|||
private String departure; |
|||
|
|||
@Excel(name = "目的地") |
|||
private String destination; |
|||
|
|||
@Excel(name = "出发时间") |
|||
private Date departureTime; |
|||
|
|||
@Excel(name = "联系电话") |
|||
private String mobile; |
|||
|
|||
@Excel(name = "捎带内容") |
|||
private String carryContent; |
|||
|
|||
@Excel(name = "捎带状态 0:我需要捎 1:我可以捎") |
|||
private String carryStatus; |
|||
|
|||
@Excel(name = "浏览数") |
|||
private Integer browseNum; |
|||
|
|||
@Excel(name = "拨打次数") |
|||
private Integer callNum; |
|||
|
|||
@Excel(name = "发布人姓名") |
|||
private String realName; |
|||
|
|||
@Excel(name = "发布人ID") |
|||
private String userId; |
|||
|
|||
@Excel(name = "发布人昵称") |
|||
private String nickname; |
|||
|
|||
@Excel(name = "头像") |
|||
private String faceImg; |
|||
|
|||
@Excel(name = "发布人电话") |
|||
private String publishMobile; |
|||
|
|||
@Excel(name = "所属网格ID") |
|||
private Long gridId; |
|||
|
|||
@Excel(name = "所属网格") |
|||
private String grid; |
|||
|
|||
@Excel(name = "父所有部门") |
|||
private String parentDeptIds; |
|||
|
|||
@Excel(name = "父所有部门名称") |
|||
private String parentDeptNames; |
|||
|
|||
@Excel(name = "所有部门ID") |
|||
private String allDeptIds; |
|||
|
|||
@Excel(name = "所有部门名称") |
|||
private String allDeptNames; |
|||
|
|||
@Excel(name = "屏蔽人ID") |
|||
private String shieldUserId; |
|||
|
|||
@Excel(name = "屏蔽人姓名") |
|||
private String shieldUserName; |
|||
|
|||
@Excel(name = "删除标识") |
|||
private String delFlag; |
|||
|
|||
@Excel(name = "乐观锁") |
|||
private Integer revision; |
|||
|
|||
@Excel(name = "创建人") |
|||
private String createdBy; |
|||
|
|||
@Excel(name = "创建时间") |
|||
private Date createdTime; |
|||
|
|||
@Excel(name = "更新人") |
|||
private String updatedBy; |
|||
|
|||
@Excel(name = "更新时间") |
|||
private Date updatedTime; |
|||
|
|||
@Excel(name = "屏蔽原因") |
|||
private String shieldReason; |
|||
|
|||
|
|||
} |
@ -0,0 +1,47 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.modules.sds.redis; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.redis.RedisUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* 顺道捎 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-12-02 |
|||
*/ |
|||
@Component |
|||
public class SdsInfoRedis { |
|||
@Autowired |
|||
private RedisUtils redisUtils; |
|||
|
|||
public void delete(Object[] ids) { |
|||
|
|||
} |
|||
|
|||
public void set(){ |
|||
|
|||
} |
|||
|
|||
public String get(String id){ |
|||
return null; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,158 @@ |
|||
/** |
|||
* 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.elink.esua.epdc.modules.sds.service; |
|||
|
|||
import com.elink.esua.epdc.commons.mybatis.service.BaseService; |
|||
import com.elink.esua.epdc.commons.tools.page.PageData; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.dto.SdsInfoDTO; |
|||
import com.elink.esua.epdc.dto.form.EpdcAddSdsFormDTO; |
|||
import com.elink.esua.epdc.dto.form.EpdcSelectSdsInfoListFormDTO; |
|||
import com.elink.esua.epdc.dto.result.EpdcSelectSdsInfoDetailResultDTO; |
|||
import com.elink.esua.epdc.dto.result.EpdcSelectSdsInfoListResultDTO; |
|||
import com.elink.esua.epdc.modules.rocketmq.dto.OrganizationModifyDTO; |
|||
import com.elink.esua.epdc.modules.rocketmq.dto.RejectRecordDTO; |
|||
import com.elink.esua.epdc.modules.sds.entity.SdsInfoEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 顺道捎 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-12-02 |
|||
*/ |
|||
public interface SdsInfoService extends BaseService<SdsInfoEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<SdsInfoDTO> |
|||
* @author generator |
|||
* @date 2020-12-02 |
|||
*/ |
|||
PageData<SdsInfoDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<SdsInfoDTO> |
|||
* @author generator |
|||
* @date 2020-12-02 |
|||
*/ |
|||
List<SdsInfoDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return SdsInfoDTO |
|||
* @author generator |
|||
* @date 2020-12-02 |
|||
*/ |
|||
SdsInfoDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-12-02 |
|||
*/ |
|||
void save(SdsInfoDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-12-02 |
|||
*/ |
|||
void update(SdsInfoDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-12-02 |
|||
*/ |
|||
void delete(String[] ids); |
|||
/** |
|||
* @Description 小程序-获取首页列表 |
|||
* @Author songyunpeng |
|||
* @Date 2020/12/3 |
|||
* @Param [formDTO] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.result.EpdcSelectSdsInfoListResultDTO>> |
|||
**/ |
|||
Result<List<EpdcSelectSdsInfoListResultDTO>> getSdsList(EpdcSelectSdsInfoListFormDTO formDTO); |
|||
/** |
|||
* @Description 小程序-获取列表详情 |
|||
* @Author songyunpeng |
|||
* @Date 2020/12/3 |
|||
* @Param [id] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.result.EpdcSelectSdsInfoDetailResultDTO> |
|||
**/ |
|||
Result<EpdcSelectSdsInfoDetailResultDTO> getSdsDetail(String id); |
|||
/** |
|||
* @Description 小程序- 发布或更新 |
|||
* @Author songyunpeng |
|||
* @Date 2020/12/3 |
|||
* @Param [formDTO] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
**/ |
|||
Result publishOrUpdate(EpdcAddSdsFormDTO formDTO); |
|||
/** |
|||
* @Description 小程序 - 删除 |
|||
* @Author songyunpeng |
|||
* @Date 2020/12/3 |
|||
* @Param [id] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
**/ |
|||
Result deleteSds(String id); |
|||
/** |
|||
* @Description 小程序 - 计算打电话次数 |
|||
* @Author songyunpeng |
|||
* @Date 2020/12/3 |
|||
* @Param [id] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
**/ |
|||
Result callMobile(String id); |
|||
/** |
|||
* @Description 删除顺道捎相关信息 |
|||
* @Author songyunpeng |
|||
* @Date 2020/12/4 |
|||
* @Param [dto] |
|||
* @return void |
|||
**/ |
|||
void rejectActInfo(RejectRecordDTO dto); |
|||
/** |
|||
* @Description 修改组织机构信息 |
|||
* @Author songyunpeng |
|||
* @Date 2020/12/4 |
|||
* @Param [dto] |
|||
* @return void |
|||
**/ |
|||
void modifyOrganizationInfo(OrganizationModifyDTO dto); |
|||
} |
@ -0,0 +1,278 @@ |
|||
/** |
|||
* 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.elink.esua.epdc.modules.sds.service.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.elink.esua.epdc.commons.tools.constant.FieldConstant; |
|||
import com.elink.esua.epdc.commons.tools.constant.NumConstant; |
|||
import com.elink.esua.epdc.commons.tools.page.PageData; |
|||
import com.elink.esua.epdc.commons.tools.security.content.CheckDataUtils; |
|||
import com.elink.esua.epdc.commons.tools.security.content.ModuleName; |
|||
import com.elink.esua.epdc.commons.tools.security.content.dto.form.ParentAndAllDeptDTO; |
|||
import com.elink.esua.epdc.commons.tools.security.content.dto.form.SaveCheckRecordsDTO; |
|||
import com.elink.esua.epdc.commons.tools.security.content.dto.result.CheckResultDTO; |
|||
import com.elink.esua.epdc.commons.tools.security.content.dto.result.CheckResultMessageDTO; |
|||
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.dto.SdsInfoDTO; |
|||
import com.elink.esua.epdc.dto.form.EpdcAddSdsFormDTO; |
|||
import com.elink.esua.epdc.dto.form.EpdcSelectSdsInfoListFormDTO; |
|||
import com.elink.esua.epdc.dto.result.EpdcSelectSdsInfoDetailResultDTO; |
|||
import com.elink.esua.epdc.dto.result.EpdcSelectSdsInfoListResultDTO; |
|||
import com.elink.esua.epdc.modules.feign.AdminFeignClient; |
|||
import com.elink.esua.epdc.modules.feign.ContentSecurityFeignClient; |
|||
import com.elink.esua.epdc.modules.rocketmq.dto.OrganizationModifyDTO; |
|||
import com.elink.esua.epdc.modules.rocketmq.dto.RejectRecordDTO; |
|||
import com.elink.esua.epdc.modules.sds.dao.SdsInfoDao; |
|||
import com.elink.esua.epdc.modules.sds.entity.SdsInfoEntity; |
|||
import com.elink.esua.epdc.modules.sds.redis.SdsInfoRedis; |
|||
import com.elink.esua.epdc.modules.sds.service.SdsInfoService; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.*; |
|||
|
|||
/** |
|||
* 顺道捎 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-12-02 |
|||
*/ |
|||
@Service |
|||
public class SdsInfoServiceImpl extends BaseServiceImpl<SdsInfoDao, SdsInfoEntity> implements SdsInfoService { |
|||
|
|||
@Autowired |
|||
private SdsInfoRedis sdsInfoRedis; |
|||
|
|||
@Autowired |
|||
private AdminFeignClient adminFeignClient; |
|||
|
|||
|
|||
@Autowired |
|||
private ContentSecurityFeignClient contentSecurityFeign; |
|||
|
|||
@Override |
|||
public PageData<SdsInfoDTO> page(Map<String, Object> params) { |
|||
IPage<SdsInfoEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, SdsInfoDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<SdsInfoDTO> list(Map<String, Object> params) { |
|||
List<SdsInfoEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, SdsInfoDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<SdsInfoEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<SdsInfoEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public SdsInfoDTO get(String id) { |
|||
SdsInfoEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, SdsInfoDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(SdsInfoDTO dto) { |
|||
SdsInfoEntity entity = ConvertUtils.sourceToTarget(dto, SdsInfoEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(SdsInfoDTO dto) { |
|||
SdsInfoEntity entity = ConvertUtils.sourceToTarget(dto, SdsInfoEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
@Override |
|||
public Result<List<EpdcSelectSdsInfoListResultDTO>> getSdsList(EpdcSelectSdsInfoListFormDTO formDTO) { |
|||
int pageIndex = (formDTO.getPageIndex() - NumConstant.ONE) * formDTO.getPageSize(); |
|||
formDTO.setPageIndex(pageIndex); |
|||
|
|||
List<EpdcSelectSdsInfoListResultDTO> list = this.baseDao.getSdsList(formDTO); |
|||
return new Result().ok(list); |
|||
} |
|||
|
|||
@Override |
|||
public Result<EpdcSelectSdsInfoDetailResultDTO> getSdsDetail(String id) { |
|||
//查看详情 新增浏览次数
|
|||
SdsInfoEntity sdsInfoEntity = selectById(id); |
|||
sdsInfoEntity.setBrowseNum(sdsInfoEntity.getBrowseNum()==null?1:sdsInfoEntity.getBrowseNum()+1); |
|||
updateById(sdsInfoEntity); |
|||
return new Result<EpdcSelectSdsInfoDetailResultDTO>().ok(this.baseDao.getSdsDetail(id)); |
|||
} |
|||
|
|||
@Override |
|||
public Result publishOrUpdate(EpdcAddSdsFormDTO formDTO) { |
|||
//内容审核 - start
|
|||
Boolean isConReview = formDTO.getIsConReview(); |
|||
List<String> textList = new ArrayList<>(); |
|||
textList.add(formDTO.getCarryContent()); |
|||
// 获取所有上级机构名称和ID拼接
|
|||
ParentAndAllDeptDTO deptDto = adminFeignClient.getParentAndAllDept(formDTO.getGridId()).getData(); |
|||
CheckResultDTO contentResult = CheckDataUtils.checkContent(textList); |
|||
if(!isConReview && |
|||
((contentResult != null && !contentResult.getAllPass()))){ |
|||
//组装要保存的信息
|
|||
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(formDTO.getUserId(), |
|||
formDTO.getNickname(), CheckDataUtils.cate_two, CheckDataUtils.decision_one, ModuleName.SDS_CONTENT.getCode(), textList, |
|||
null, null,contentResult, null,null,formDTO.getMobile(),"0",deptDto); |
|||
contentSecurityFeign.insertViolationsRecord(record); |
|||
return new Result().error(CheckDataUtils.violations_code,CheckDataUtils.violations_message); |
|||
} |
|||
//内容审核 - end
|
|||
if(formDTO.getDepartureTime().before(new Date())){ |
|||
return new Result().error("出发时间不能小于当前时间"); |
|||
} |
|||
SdsInfoEntity sdsInfoEntity = ConvertUtils.sourceToTarget(formDTO,SdsInfoEntity.class); |
|||
if(StringUtils.isNotBlank(formDTO.getId())){ |
|||
updateById(sdsInfoEntity); |
|||
}else { |
|||
//新增
|
|||
insert(sdsInfoEntity); |
|||
} |
|||
|
|||
//内容审核 - start
|
|||
//接口异常,保存至待审核信息
|
|||
if((contentResult == null) && !isConReview) { |
|||
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(formDTO.getUserId(), |
|||
formDTO.getNickname(), CheckDataUtils.cate_two, null,ModuleName.SDS_CONTENT.getCode(), textList, |
|||
null, sdsInfoEntity.getId(),null,null, null,formDTO.getMobile(),"1",deptDto); |
|||
contentSecurityFeign.insertRecords(record); |
|||
} |
|||
|
|||
//保存待审核记录
|
|||
if (contentResult != null) { |
|||
CheckResultMessageDTO twoTypes = null; |
|||
if(isConReview){ |
|||
twoTypes = CheckDataUtils.saveTwoTypes(contentResult, null); |
|||
}else{ |
|||
twoTypes = CheckDataUtils.checkTwoTypes(contentResult, null); |
|||
} |
|||
if (CheckDataUtils.review.equals(twoTypes.getSuggestion())) { |
|||
//组装要保存的信息
|
|||
SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(formDTO.getUserId(), |
|||
formDTO.getNickname(), CheckDataUtils.cate_two, null, ModuleName.SDS_CONTENT.getCode(), textList, |
|||
null, sdsInfoEntity.getId(), null, null, twoTypes, formDTO.getMobile(), "0",deptDto); |
|||
contentSecurityFeign.insertRecords(record); |
|||
} |
|||
} |
|||
//内容审核 - end
|
|||
return new Result(); |
|||
} |
|||
|
|||
@Override |
|||
public Result deleteSds(String id) { |
|||
this.deleteById(id); |
|||
return new Result(); |
|||
} |
|||
|
|||
@Override |
|||
public Result callMobile(String id) { |
|||
SdsInfoEntity sdsInfoEntity = selectById(id); |
|||
if(sdsInfoEntity==null){ |
|||
return new Result(); |
|||
} |
|||
sdsInfoEntity.setCallNum(sdsInfoEntity.getCallNum()==null?1:sdsInfoEntity.getCallNum()+1); |
|||
updateById(sdsInfoEntity); |
|||
return new Result(); |
|||
} |
|||
|
|||
@Override |
|||
public void modifyOrganizationInfo(OrganizationModifyDTO dto) { |
|||
// 查询需要修改组织机构信息事件
|
|||
List<SdsInfoDTO> eventsList = baseDao.selectListOfOrganizationInfo(dto.getDeptId().toString()); |
|||
if (null != eventsList && eventsList.size() > 0) { |
|||
// 组织机构信息处理
|
|||
List<SdsInfoEntity> entities = handleOrganizationInfo(dto, eventsList); |
|||
// 更新事件组织机构信息
|
|||
updateBatchById(entities); |
|||
} |
|||
|
|||
// 更新网格名称
|
|||
baseDao.updateGridByDeptId(dto.getNewDeptName(), dto.getDeptId()); |
|||
} |
|||
|
|||
@Override |
|||
public void rejectActInfo(RejectRecordDTO dto) { |
|||
baseDao.deleteById(dto.getRelationId()); |
|||
} |
|||
|
|||
/** |
|||
* 组织机构信息处理 |
|||
* |
|||
* @return java.util.List<com.elink.esua.epdc.entity.UserEntity> |
|||
* @params [dto, userList] |
|||
* @author liuchuang |
|||
* @since 2020/3/7 15:22 |
|||
*/ |
|||
private List<SdsInfoEntity> handleOrganizationInfo(OrganizationModifyDTO dto, List<SdsInfoDTO> userList) { |
|||
List<SdsInfoEntity> entities = new ArrayList<>(); |
|||
for (SdsInfoDTO user : userList) { |
|||
SdsInfoEntity entity = new SdsInfoEntity(); |
|||
if (StringUtils.isNotEmpty(user.getParentDeptIds()) && StringUtils.isNotEmpty(user.getParentDeptNames())) { |
|||
List<String> parentDeptIds = Arrays.asList(user.getParentDeptIds().split(",")); |
|||
List<String> parentDeptNames = Arrays.asList(user.getParentDeptNames().split("-")); |
|||
int index = parentDeptIds.indexOf(dto.getDeptId().toString()); |
|||
if (index >= 0 && parentDeptNames.size() > index) { |
|||
parentDeptNames.set(index, dto.getNewDeptName()); |
|||
entity.setId(user.getId()); |
|||
entity.setParentDeptNames(StringUtils.join(parentDeptNames, "-")); |
|||
} |
|||
} |
|||
|
|||
if (StringUtils.isNotEmpty(user.getAllDeptIds()) && StringUtils.isNotEmpty(user.getAllDeptNames())) { |
|||
List<String> allDeptIds = Arrays.asList(user.getAllDeptIds().split(",")); |
|||
List<String> allDeptNames = Arrays.asList(user.getAllDeptNames().split("-")); |
|||
int index = allDeptIds.indexOf(dto.getDeptId().toString()); |
|||
if (index >= 0 && allDeptNames.size() > index) { |
|||
allDeptNames.set(index, dto.getNewDeptName()); |
|||
entity.setId(user.getId()); |
|||
entity.setAllDeptNames(StringUtils.join(allDeptNames, "-")); |
|||
} |
|||
} |
|||
|
|||
entities.add(entity); |
|||
} |
|||
|
|||
return entities; |
|||
} |
|||
} |
@ -0,0 +1,82 @@ |
|||
<?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.elink.esua.epdc.modules.groupbuy.dao.GroupBuyInfoDao"> |
|||
|
|||
<resultMap type="com.elink.esua.epdc.modules.groupbuy.entity.GroupBuyInfoEntity" id="groupBuyInfoMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="groupBuyTitle" column="GROUP_BUY_TITLE"/> |
|||
<result property="groupBuyMobile" column="GROUP_BUY_MOBILE"/> |
|||
<result property="groupBuyContent" column="GROUP_BUY_CONTENT"/> |
|||
<result property="groupBuyTime" column="GROUP_BUY_TIME"/> |
|||
<result property="browseNum" column="BROWSE_NUM"/> |
|||
<result property="callNum" column="CALL_NUM"/> |
|||
<result property="realName" column="REAL_NAME"/> |
|||
<result property="userId" column="USER_ID"/> |
|||
<result property="nickname" column="NICKNAME"/> |
|||
<result property="faceImg" column="FACE_IMG"/> |
|||
<result property="publishMobile" column="PUBLISH_MOBILE"/> |
|||
<result property="gridId" column="GRID_ID"/> |
|||
<result property="grid" column="GRID"/> |
|||
<result property="parentDeptIds" column="PARENT_DEPT_IDS"/> |
|||
<result property="parentDeptNames" column="PARENT_DEPT_NAMES"/> |
|||
<result property="allDeptIds" column="ALL_DEPT_IDS"/> |
|||
<result property="allDeptNames" column="ALL_DEPT_NAMES"/> |
|||
<result property="shieldFlag" column="SHIELD_FLAG"/> |
|||
<result property="shieldUserId" column="SHIELD_USER_ID"/> |
|||
<result property="shieldUserName" column="SHIELD_USER_NAME"/> |
|||
<result property="shieldReason" column="SHIELD_REASON"/> |
|||
<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"/> |
|||
<result property="sort" column="SORT"/> |
|||
</resultMap> |
|||
<select id="getGroupBuyList" |
|||
resultType="com.elink.esua.epdc.dto.result.EpdcSelectGroupBuyInfoListResultDTO"> |
|||
select |
|||
t.ID, |
|||
t.GROUP_BUY_TITLE, |
|||
t.GROUP_BUY_MOBILE, |
|||
t.GROUP_BUY_CONTENT, |
|||
t.GROUP_BUY_TIME |
|||
from epdc_group_buy_info t |
|||
where t.DEL_FLAG = '0' and t.SHIELD_FLAG = '0' |
|||
<if test="isMe != '' and isMe != null and isMe == 1"> |
|||
and t.USER_ID = #{userId} |
|||
</if> |
|||
order by sort,CREATED_TIME desc |
|||
LIMIT #{pageIndex},#{pageSize} |
|||
</select> |
|||
<select id="getGroupBuyDetail" |
|||
resultType="com.elink.esua.epdc.dto.result.EpdcSelectGroupBuyDetailResultDTO"> |
|||
select |
|||
ID, |
|||
GROUP_BUY_TITLE, |
|||
GROUP_BUY_MOBILE, |
|||
GROUP_BUY_CONTENT, |
|||
GROUP_BUY_TIME |
|||
from epdc_group_buy_info t |
|||
where t.DEL_FLAG = '0' and t.SHIELD_FLAG = '0' |
|||
and t.ID = #{id} |
|||
</select> |
|||
<select id="selectListOfOrganizationInfo" resultType="com.elink.esua.epdc.dto.GroupBuyInfoDTO"> |
|||
SELECT |
|||
ID, |
|||
PARENT_DEPT_IDS, |
|||
PARENT_DEPT_NAMES, |
|||
ALL_DEPT_IDS, |
|||
ALL_DEPT_NAMES |
|||
FROM |
|||
epdc_group_buy_info |
|||
WHERE |
|||
FIND_IN_SET( #{deptId}, ALL_DEPT_IDS ) |
|||
</select> |
|||
|
|||
<update id="updateGridByDeptId"> |
|||
UPDATE epdc_group_buy_info SET GRID = #{newDeptName}, UPDATED_TIME = NOW() WHERE GRID_ID = #{deptId} |
|||
</update> |
|||
|
|||
</mapper> |
@ -0,0 +1,84 @@ |
|||
<?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.elink.esua.epdc.modules.sds.dao.SdsInfoDao"> |
|||
|
|||
<resultMap type="com.elink.esua.epdc.modules.sds.entity.SdsInfoEntity" id="sdsInfoMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="departure" column="DEPARTURE"/> |
|||
<result property="destination" column="DESTINATION"/> |
|||
<result property="departureTime" column="DEPARTURE_TIME"/> |
|||
<result property="mobile" column="MOBILE"/> |
|||
<result property="carryContent" column="CARRY_CONTENT"/> |
|||
<result property="carryStatus" column="CARRY_STATUS"/> |
|||
<result property="browseNum" column="BROWSE_NUM"/> |
|||
<result property="callNum" column="CALL_NUM"/> |
|||
<result property="realName" column="REAL_NAME"/> |
|||
<result property="userId" column="USER_ID"/> |
|||
<result property="nickname" column="NICKNAME"/> |
|||
<result property="faceImg" column="FACE_IMG"/> |
|||
<result property="publishMobile" column="PUBLISH_MOBILE"/> |
|||
<result property="gridId" column="GRID_ID"/> |
|||
<result property="grid" column="GRID"/> |
|||
<result property="parentDeptIds" column="PARENT_DEPT_IDS"/> |
|||
<result property="parentDeptNames" column="PARENT_DEPT_NAMES"/> |
|||
<result property="allDeptIds" column="ALL_DEPT_IDS"/> |
|||
<result property="allDeptNames" column="ALL_DEPT_NAMES"/> |
|||
<result property="shieldUserId" column="SHIELD_USER_ID"/> |
|||
<result property="shieldUserName" column="SHIELD_USER_NAME"/> |
|||
<result property="delFlag" column="DEL_FLAG"/> |
|||
<result property="revision" column="REVISION"/> |
|||
<result property="createdBy" column="CREATED_BY"/> |
|||
<result property="createdTime" column="CREATED_TIME"/> |
|||
<result property="updatedBy" column="UPDATED_BY"/> |
|||
<result property="updatedTime" column="UPDATED_TIME"/> |
|||
<result property="shieldReason" column="SHIELD_REASON"/> |
|||
<result property="shieldFlag" column="SHIELD_FLAG"/> |
|||
</resultMap> |
|||
<select id="getSdsList" resultType="com.elink.esua.epdc.dto.result.EpdcSelectSdsInfoListResultDTO"> |
|||
select |
|||
t.ID, |
|||
t.DEPARTURE, |
|||
t.DESTINATION, |
|||
t.DEPARTURE_TIME |
|||
from epdc_sds_info t |
|||
where t.DEL_FLAG = '0' and t.SHIELD_FLAG = '0' |
|||
<if test="type!=null and type!='' and type == '0'.toString()"> |
|||
and t.CARRY_STATUS = '0' |
|||
</if> |
|||
<if test="type!=null and type!='' and type == '1'.toString()"> |
|||
and t.CARRY_STATUS = '1' |
|||
</if> <if test="type!=null and type!='' and type == '2'.toString()"> |
|||
and t.USER_ID = #{userId} |
|||
</if> |
|||
order by sort,CREATED_TIME desc |
|||
LIMIT #{pageIndex},#{pageSize} |
|||
</select> |
|||
<select id="getSdsDetail" resultType="com.elink.esua.epdc.dto.result.EpdcSelectSdsInfoDetailResultDTO"> |
|||
select t.ID, |
|||
t.DEPARTURE, |
|||
t.DESTINATION, |
|||
t.DEPARTURE_TIME, |
|||
t.MOBILE, |
|||
t.CARRY_CONTENT, |
|||
t.CARRY_STATUS |
|||
from epdc_sds_info t |
|||
where t.DEL_FLAG = '0' and t.SHIELD_FLAG = '0' and t.ID = #{id} |
|||
</select> |
|||
<select id="selectListOfOrganizationInfo" resultType="com.elink.esua.epdc.dto.SdsInfoDTO"> |
|||
SELECT |
|||
ID, |
|||
PARENT_DEPT_IDS, |
|||
PARENT_DEPT_NAMES, |
|||
ALL_DEPT_IDS, |
|||
ALL_DEPT_NAMES |
|||
FROM |
|||
epdc_sds_info |
|||
WHERE |
|||
FIND_IN_SET( #{deptId}, ALL_DEPT_IDS ) |
|||
</select> |
|||
|
|||
<update id="updateGridByDeptId"> |
|||
UPDATE epdc_sds_info SET GRID = #{newDeptName}, UPDATED_TIME = NOW() WHERE GRID_ID = #{deptId} |
|||
</update> |
|||
</mapper> |
Loading…
Reference in new issue