diff --git a/epmet-auth/pom.xml b/epmet-auth/pom.xml index e0f97c1757..de5d22524a 100644 --- a/epmet-auth/pom.xml +++ b/epmet-auth/pom.xml @@ -80,6 +80,12 @@ 1.0.0 compile + + com.epmet + epmet-commons-tools-wx-mp + 1.0.0 + compile + com.epmet epmet-user-client @@ -104,6 +110,12 @@ 2.0.0 compile + + com.github.binarywang + weixin-java-mp + 3.6.0 + compile + @@ -154,10 +166,10 @@ - wx67fdf7da3fee1890 - ae15094f485af9e5c6b5a8a55945332a - 111 - 111 + wxcb6ce2ed0c5ae54c + c7f74941ee97fa9b2e1065772d34c397 + 12345678Yzm + jiKrJoPQsUIP9ayAwmuJQeAVPBjFOh5D1JxFDd7ZSU3 wx07674c23af51b521 a2fd0d29b007cbbcf8c8dda8c693d99b @@ -191,10 +203,10 @@ - wx67fdf7da3fee1890 - ae15094f485af9e5c6b5a8a55945332a - 111 - 111 + wxcb6ce2ed0c5ae54c + c7f74941ee97fa9b2e1065772d34c397 + 12345678Yzm + jiKrJoPQsUIP9ayAwmuJQeAVPBjFOh5D1JxFDd7ZSU3 wx07674c23af51b521 a2fd0d29b007cbbcf8c8dda8c693d99b @@ -228,10 +240,10 @@ - wx67fdf7da3fee1890 - ae15094f485af9e5c6b5a8a55945332a - 111 - 111 + wxcb6ce2ed0c5ae54c + c7f74941ee97fa9b2e1065772d34c397 + 12345678Yzm + jiKrJoPQsUIP9ayAwmuJQeAVPBjFOh5D1JxFDd7ZSU3 wx07674c23af51b521 a2fd0d29b007cbbcf8c8dda8c693d99b diff --git a/epmet-auth/src/main/java/com/epmet/controller/PublicUserLoginController.java b/epmet-auth/src/main/java/com/epmet/controller/PublicUserLoginController.java new file mode 100644 index 0000000000..9a48be046c --- /dev/null +++ b/epmet-auth/src/main/java/com/epmet/controller/PublicUserLoginController.java @@ -0,0 +1,42 @@ +package com.epmet.controller; + +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.dto.form.PaWxCodeFormDTO; +import com.epmet.service.PublicUserLoginService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.Map; + +/** + * 描述一下 + * + * @author yinzuomei@elink-cn.com + * @date 2020/7/8 18:29 + */ +@RestController +@RequestMapping("publicuser") +public class PublicUserLoginController { + + @Autowired + private PublicUserLoginService publicUserLoginService; + + /** + * @return com.epmet.commons.tools.utils.Result + * @param formDTO + * @author yinzuomei + * @description 测试是否能正常解析wxcode + * @Date 2020/7/9 17:00 + **/ + @PostMapping(value = "/testwxcode") + public Result loginByWxCode(@RequestBody PaWxCodeFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, PaWxCodeFormDTO.AddUserInternalGroup.class); + Map map = publicUserLoginService.loginByWxCode(formDTO); + return new Result().ok(map); + } + +} diff --git a/epmet-auth/src/main/java/com/epmet/dto/form/PaWxCodeFormDTO.java b/epmet-auth/src/main/java/com/epmet/dto/form/PaWxCodeFormDTO.java new file mode 100644 index 0000000000..33161e90c9 --- /dev/null +++ b/epmet-auth/src/main/java/com/epmet/dto/form/PaWxCodeFormDTO.java @@ -0,0 +1,23 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * 描述一下 + * + * @author yinzuomei@elink-cn.com + * @date 2020/7/8 18:32 + */ +@Data +public class PaWxCodeFormDTO implements Serializable { + private static final long serialVersionUID = -207861963128774742L; + public interface AddUserInternalGroup {} + /** + * wxCode + */ + @NotBlank(message = "wxCode不能为空",groups = {AddUserInternalGroup.class}) + private String wxCode; +} diff --git a/epmet-auth/src/main/java/com/epmet/service/PublicUserLoginService.java b/epmet-auth/src/main/java/com/epmet/service/PublicUserLoginService.java new file mode 100644 index 0000000000..20091381c0 --- /dev/null +++ b/epmet-auth/src/main/java/com/epmet/service/PublicUserLoginService.java @@ -0,0 +1,15 @@ +package com.epmet.service; + +import com.epmet.dto.form.PaWxCodeFormDTO; + +import java.util.Map; + +/** + * 描述一下 + * + * @author yinzuomei@elink-cn.com + * @date 2020/7/8 18:31 + */ +public interface PublicUserLoginService { + Map loginByWxCode(PaWxCodeFormDTO formDTO); +} diff --git a/epmet-auth/src/main/java/com/epmet/service/impl/PublicUserLoginServiceImpl.java b/epmet-auth/src/main/java/com/epmet/service/impl/PublicUserLoginServiceImpl.java new file mode 100644 index 0000000000..580e582888 --- /dev/null +++ b/epmet-auth/src/main/java/com/epmet/service/impl/PublicUserLoginServiceImpl.java @@ -0,0 +1,53 @@ +package com.epmet.service.impl; + +import com.epmet.commons.tools.exception.RenException; +import com.epmet.dto.form.PaWxCodeFormDTO; +import com.epmet.service.PublicUserLoginService; +import me.chanjar.weixin.common.error.WxErrorException; +import me.chanjar.weixin.mp.api.WxMpService; +import me.chanjar.weixin.mp.bean.result.WxMpOAuth2AccessToken; +import me.chanjar.weixin.mp.bean.result.WxMpUser; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.HashMap; +import java.util.Map; + +/** + * 描述一下 + * + * @author yinzuomei@elink-cn.com + * @date 2020/7/8 18:31 + */ +@Service +public class PublicUserLoginServiceImpl implements PublicUserLoginService { + private static final Logger logger = LoggerFactory.getLogger(PublicUserLoginServiceImpl.class); + @Autowired + private WxMpService wxMpService; + + + @Override + public Map loginByWxCode(PaWxCodeFormDTO formDTO) { + WxMpUser wxMpUser=this.getWxMpUser(formDTO.getWxCode()); + Map map =new HashMap(); + map.put("微信用户信息",wxMpUser); + return map; + } + + private WxMpUser getWxMpUser(String wxCode) { + WxMpUser wxMpUser = null; + try { + WxMpOAuth2AccessToken wxMpOAuth2AccessToken = wxMpService.oauth2getAccessToken(wxCode); + wxMpUser = wxMpService.oauth2getUserInfo(wxMpOAuth2AccessToken, null); + } catch (WxErrorException e) { + logger.error("->[getWxMpUser]::error[{}]", "解析微信用户信息失败"); + } + if (null == wxMpUser || StringUtils.isBlank(wxMpUser.getUnionId())) { + throw new RenException("解析微信用户信息失败"); + } + return wxMpUser; + } +} diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/CustomerMpDTO.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/CustomerMpDTO.java new file mode 100644 index 0000000000..fd7db9bb2d --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/CustomerMpDTO.java @@ -0,0 +1,96 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 客户小程序关系表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +@Data +public class CustomerMpDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * pa_customer的id + */ + private String customerId; + + /** + * resi,work + */ + private String client; + + /** + * 小程序的appId + */ + private Integer appId; + + /** + * 是否已经授权 + */ + private Integer authorizationFlag; + + /** + * 公众账号信息id + */ + private String authorizerInfoId; + + /** + * 删除标识:0.未删除 1.已删除 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/PaCustomerAgencyDTO.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/PaCustomerAgencyDTO.java new file mode 100644 index 0000000000..e659efc669 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/PaCustomerAgencyDTO.java @@ -0,0 +1,111 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 客户根组织信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +@Data +public class PaCustomerAgencyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户id,来源于customer.id + */ + private String customerId; + + /** + * 根组织名称 + */ + private String agencyName; + + /** + * 级别 + */ + private String level; + + /** + * 地区编码 + */ + private String areaCode; + + /** + * 省 + */ + private String province; + + /** + * 市 + */ + private String city; + + /** + * 区 + */ + private String district; + + /** + * 党支部数量 + */ + private Integer partybranchnum; + + /** + * 删除标识 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/PaCustomerDTO.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/PaCustomerDTO.java new file mode 100644 index 0000000000..2fed14154e --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/PaCustomerDTO.java @@ -0,0 +1,76 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 客户信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +@Data +public class PaCustomerDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 客户id,本主键和oper_crm.customer.id一致 + */ + private String id; + + /** + * 客户名称,默认是根组织名称 + */ + private String customerName; + + /** + * 删除标识:0.未删除 1.已删除 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/PaCustomerUserAgencyDTO.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/PaCustomerUserAgencyDTO.java new file mode 100644 index 0000000000..5bec4b8aa1 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/PaCustomerUserAgencyDTO.java @@ -0,0 +1,86 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 用户组织关系表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +@Data +public class PaCustomerUserAgencyDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户id,来源于pa_customer.id + */ + private String customerId; + + /** + * pa_customer_agency.id + */ + private String agencyId; + + /** + * pa_user.id + */ + private String userId; + + /** + * 删除标识 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/PaUserDTO.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/PaUserDTO.java new file mode 100644 index 0000000000..1491066d85 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/PaUserDTO.java @@ -0,0 +1,86 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 公众号用户信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +@Data +public class PaUserDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 本主键会用作customer_staff里的user_id,user表的id + */ + private Integer id; + + /** + * 手机号 + */ + private String phone; + + /** + * 姓 + */ + private String realName; + + /** + * 1男2女0未知 + */ + private String gender; + + /** + * 删除标识 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/PaUserVisitedDTO.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/PaUserVisitedDTO.java new file mode 100644 index 0000000000..7755dc1182 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/PaUserVisitedDTO.java @@ -0,0 +1,91 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 公众号登陆记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +@Data +public class PaUserVisitedDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 本主键会用作customer_staff里的user_id,user表的id + */ + private Integer id; + + /** + * 用户Id pa_user.id + */ + private String userId; + + /** + * 登陆手机号对应的openId【pa_user_wechat表手机号对应的openId】 + */ + private String wxOpenId; + + /** + * 登陆用户的openId + */ + private String openId; + + /** + * 登陆用户使用的登陆手机号 + */ + private String phone; + + /** + * 删除标识 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/PaUserWechatDTO.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/PaUserWechatDTO.java new file mode 100644 index 0000000000..9f11eab524 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/PaUserWechatDTO.java @@ -0,0 +1,131 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 公众号用户信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +@Data +public class PaUserWechatDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 本主键会用作customer_staff里的user_id,user表的id + */ + private Integer id; + + /** + * 用户Id user.id + */ + private String userId; + + /** + * 注册用户的微信openId + */ + private String wxOpenId; + + /** + * + */ + private String unionId; + + /** + * 手机号 + */ + private String phone; + + /** + * 1男2女0未知 + */ + private String gender; + + /** + * 昵称 + */ + private String nickname; + + /** + * 头像 + */ + private String headImgUrl; + + /** + * 国家 + */ + private String country; + + /** + * 省份 + */ + private String province; + + /** + * 城市 + */ + private String city; + + /** + * 用户特权信息,json 数组,如微信沃卡用户为(chinaunicom) + */ + private String privilege; + + /** + * 语言 + */ + private String language; + + /** + * 删除标识 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/CustomerMpController.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/CustomerMpController.java new file mode 100644 index 0000000000..fc1cfafafb --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/CustomerMpController.java @@ -0,0 +1,94 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.CustomerMpDTO; +import com.epmet.excel.CustomerMpExcel; +import com.epmet.service.CustomerMpService; +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 generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +@RestController +@RequestMapping("customermp") +public class CustomerMpController { + + @Autowired + private CustomerMpService customerMpService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = customerMpService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + CustomerMpDTO data = customerMpService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody CustomerMpDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + customerMpService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody CustomerMpDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + customerMpService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + customerMpService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = customerMpService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, CustomerMpExcel.class); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaCustomerAgencyController.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaCustomerAgencyController.java new file mode 100644 index 0000000000..f459d78524 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaCustomerAgencyController.java @@ -0,0 +1,94 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.PaCustomerAgencyDTO; +import com.epmet.excel.PaCustomerAgencyExcel; +import com.epmet.service.PaCustomerAgencyService; +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 generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +@RestController +@RequestMapping("pacustomeragency") +public class PaCustomerAgencyController { + + @Autowired + private PaCustomerAgencyService paCustomerAgencyService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = paCustomerAgencyService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + PaCustomerAgencyDTO data = paCustomerAgencyService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody PaCustomerAgencyDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + paCustomerAgencyService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody PaCustomerAgencyDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + paCustomerAgencyService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + paCustomerAgencyService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = paCustomerAgencyService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, PaCustomerAgencyExcel.class); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/pa/PaCustomerController.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaCustomerController.java similarity index 92% rename from epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/pa/PaCustomerController.java rename to epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaCustomerController.java index 92f8adcac7..7cc03af30e 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/pa/PaCustomerController.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaCustomerController.java @@ -1,4 +1,4 @@ -package com.epmet.controller.pa; +package com.epmet.controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaCustomerUserAgencyController.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaCustomerUserAgencyController.java new file mode 100644 index 0000000000..9906427507 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaCustomerUserAgencyController.java @@ -0,0 +1,94 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.PaCustomerUserAgencyDTO; +import com.epmet.excel.PaCustomerUserAgencyExcel; +import com.epmet.service.PaCustomerUserAgencyService; +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 generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +@RestController +@RequestMapping("pacustomeruseragency") +public class PaCustomerUserAgencyController { + + @Autowired + private PaCustomerUserAgencyService paCustomerUserAgencyService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = paCustomerUserAgencyService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + PaCustomerUserAgencyDTO data = paCustomerUserAgencyService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody PaCustomerUserAgencyDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + paCustomerUserAgencyService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody PaCustomerUserAgencyDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + paCustomerUserAgencyService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + paCustomerUserAgencyService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = paCustomerUserAgencyService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, PaCustomerUserAgencyExcel.class); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaUserController.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaUserController.java new file mode 100644 index 0000000000..8f447b191e --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaUserController.java @@ -0,0 +1,94 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.PaUserDTO; +import com.epmet.excel.PaUserExcel; +import com.epmet.service.PaUserService; +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 generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +@RestController +@RequestMapping("pauser") +public class PaUserController { + + @Autowired + private PaUserService paUserService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = paUserService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + PaUserDTO data = paUserService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody PaUserDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + paUserService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody PaUserDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + paUserService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + paUserService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = paUserService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, PaUserExcel.class); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaUserVisitedController.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaUserVisitedController.java new file mode 100644 index 0000000000..c89fee64a4 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaUserVisitedController.java @@ -0,0 +1,94 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.PaUserVisitedDTO; +import com.epmet.excel.PaUserVisitedExcel; +import com.epmet.service.PaUserVisitedService; +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 generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +@RestController +@RequestMapping("pauservisited") +public class PaUserVisitedController { + + @Autowired + private PaUserVisitedService paUserVisitedService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = paUserVisitedService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + PaUserVisitedDTO data = paUserVisitedService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody PaUserVisitedDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + paUserVisitedService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody PaUserVisitedDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + paUserVisitedService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + paUserVisitedService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = paUserVisitedService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, PaUserVisitedExcel.class); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaUserWechatController.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaUserWechatController.java new file mode 100644 index 0000000000..6a44a17cf7 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaUserWechatController.java @@ -0,0 +1,94 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.controller; + +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.PaUserWechatDTO; +import com.epmet.excel.PaUserWechatExcel; +import com.epmet.service.PaUserWechatService; +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 generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +@RestController +@RequestMapping("pauserwechat") +public class PaUserWechatController { + + @Autowired + private PaUserWechatService paUserWechatService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = paUserWechatService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + PaUserWechatDTO data = paUserWechatService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody PaUserWechatDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + paUserWechatService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody PaUserWechatDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + paUserWechatService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + paUserWechatService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = paUserWechatService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, PaUserWechatExcel.class); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/pa/PublicAccountCallBackController.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PublicAccountCallBackController.java similarity index 98% rename from epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/pa/PublicAccountCallBackController.java rename to epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PublicAccountCallBackController.java index c6ff436339..e1a47748a7 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/pa/PublicAccountCallBackController.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PublicAccountCallBackController.java @@ -1,4 +1,4 @@ -package com.epmet.controller.pa; +package com.epmet.controller; import com.epmet.commons.tools.utils.Result; import org.apache.commons.codec.digest.DigestUtils; diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/CustomerMpDao.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/CustomerMpDao.java new file mode 100644 index 0000000000..2c7d386261 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/CustomerMpDao.java @@ -0,0 +1,33 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.CustomerMpEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 客户小程序关系表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +@Mapper +public interface CustomerMpDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaCustomerAgencyDao.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaCustomerAgencyDao.java new file mode 100644 index 0000000000..cec7dcc514 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaCustomerAgencyDao.java @@ -0,0 +1,33 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.PaCustomerAgencyEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 客户根组织信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +@Mapper +public interface PaCustomerAgencyDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaCustomerDao.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaCustomerDao.java new file mode 100644 index 0000000000..7dc41a284b --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaCustomerDao.java @@ -0,0 +1,33 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.PaCustomerEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 客户信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +@Mapper +public interface PaCustomerDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaCustomerUserAgencyDao.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaCustomerUserAgencyDao.java new file mode 100644 index 0000000000..388091463d --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaCustomerUserAgencyDao.java @@ -0,0 +1,33 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.PaCustomerUserAgencyEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 用户组织关系表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +@Mapper +public interface PaCustomerUserAgencyDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaUserDao.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaUserDao.java new file mode 100644 index 0000000000..858ac17cb2 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaUserDao.java @@ -0,0 +1,33 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.PaUserEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 公众号用户信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +@Mapper +public interface PaUserDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaUserVisitedDao.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaUserVisitedDao.java new file mode 100644 index 0000000000..d1910601c7 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaUserVisitedDao.java @@ -0,0 +1,33 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.PaUserVisitedEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 公众号登陆记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +@Mapper +public interface PaUserVisitedDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaUserWechatDao.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaUserWechatDao.java new file mode 100644 index 0000000000..29e11cb876 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaUserWechatDao.java @@ -0,0 +1,33 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.PaUserWechatEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 公众号用户信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +@Mapper +public interface PaUserWechatDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/CustomerMpEntity.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/CustomerMpEntity.java new file mode 100644 index 0000000000..f5773ca85f --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/CustomerMpEntity.java @@ -0,0 +1,66 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 客户小程序关系表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("customer_mp") +public class CustomerMpEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * pa_customer的id + */ + private String customerId; + + /** + * resi,work + */ + private String client; + + /** + * 小程序的appId + */ + private Integer appId; + + /** + * 是否已经授权 + */ + private Integer authorizationFlag; + + /** + * 公众账号信息id + */ + private String authorizerInfoId; + +} diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/PaCustomerAgencyEntity.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/PaCustomerAgencyEntity.java new file mode 100644 index 0000000000..7b52b8ec2b --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/PaCustomerAgencyEntity.java @@ -0,0 +1,81 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 客户根组织信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("pa_customer_agency") +public class PaCustomerAgencyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id,来源于customer.id + */ + private String customerId; + + /** + * 根组织名称 + */ + private String agencyName; + + /** + * 级别 + */ + private String level; + + /** + * 地区编码 + */ + private String areaCode; + + /** + * 省 + */ + private String province; + + /** + * 市 + */ + private String city; + + /** + * 区 + */ + private String district; + + /** + * 党支部数量 + */ + private Integer partybranchnum; + +} diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/PaCustomerEntity.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/PaCustomerEntity.java new file mode 100644 index 0000000000..09c41932ca --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/PaCustomerEntity.java @@ -0,0 +1,46 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 客户信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("pa_customer") +public class PaCustomerEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户名称,默认是根组织名称 + */ + private String customerName; + +} diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/PaCustomerUserAgencyEntity.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/PaCustomerUserAgencyEntity.java new file mode 100644 index 0000000000..4f0c90ddfe --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/PaCustomerUserAgencyEntity.java @@ -0,0 +1,56 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 用户组织关系表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("pa_customer_user_agency") +public class PaCustomerUserAgencyEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id,来源于customer.id + */ + private String customerId; + + /** + * pa_customer_agency.id + */ + private String agencyId; + + /** + * pa_user.id + */ + private String userId; + +} diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/PaUserEntity.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/PaUserEntity.java new file mode 100644 index 0000000000..21565600a6 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/PaUserEntity.java @@ -0,0 +1,56 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 公众号用户信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("pa_user") +public class PaUserEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 手机号 + */ + private String phone; + + /** + * 姓 + */ + private String realName; + + /** + * 1男2女0未知 + */ + private String gender; + +} diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/PaUserVisitedEntity.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/PaUserVisitedEntity.java new file mode 100644 index 0000000000..4eb51375ba --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/PaUserVisitedEntity.java @@ -0,0 +1,61 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 公众号登陆记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("pa_user_visited") +public class PaUserVisitedEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 用户Id pa_user.id + */ + private String userId; + + /** + * 登陆手机号对应的openId【pa_user_wechat表手机号对应的openId】 + */ + private String wxOpenId; + + /** + * 登陆用户的openId + */ + private String openId; + + /** + * 登陆用户使用的登陆手机号 + */ + private String phone; + +} diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/PaUserWechatEntity.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/PaUserWechatEntity.java new file mode 100644 index 0000000000..61cb92e0b8 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/PaUserWechatEntity.java @@ -0,0 +1,101 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 公众号用户信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("pa_user_wechat") +public class PaUserWechatEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 用户Id user.id + */ + private String userId; + + /** + * 注册用户的微信openId + */ + private String wxOpenId; + + /** + * + */ + private String unionId; + + /** + * 手机号 + */ + private String phone; + + /** + * 1男2女0未知 + */ + private String gender; + + /** + * 昵称 + */ + private String nickname; + + /** + * 头像 + */ + private String headImgUrl; + + /** + * 国家 + */ + private String country; + + /** + * 省份 + */ + private String province; + + /** + * 城市 + */ + private String city; + + /** + * 用户特权信息,json 数组,如微信沃卡用户为(chinaunicom) + */ + private String privilege; + + /** + * 语言 + */ + private String language; + +} diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/excel/CustomerMpExcel.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/excel/CustomerMpExcel.java new file mode 100644 index 0000000000..b4f62eb57f --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/excel/CustomerMpExcel.java @@ -0,0 +1,71 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 客户小程序关系表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +@Data +public class CustomerMpExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "pa_customer的id") + private String customerId; + + @Excel(name = "resi,work") + private String client; + + @Excel(name = "小程序的appId") + private Integer appId; + + @Excel(name = "是否已经授权") + private Integer authorizationFlag; + + @Excel(name = "公众账号信息id") + private String authorizerInfoId; + + @Excel(name = "删除标识:0.未删除 1.已删除") + private Integer 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; + + +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/excel/PaCustomerAgencyExcel.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/excel/PaCustomerAgencyExcel.java new file mode 100644 index 0000000000..065b2203db --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/excel/PaCustomerAgencyExcel.java @@ -0,0 +1,80 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 客户根组织信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +@Data +public class PaCustomerAgencyExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "客户id,来源于customer.id") + private String customerId; + + @Excel(name = "根组织名称") + private String agencyName; + + @Excel(name = "级别") + private String level; + + @Excel(name = "地区编码") + private String areaCode; + + @Excel(name = "省") + private String province; + + @Excel(name = "市") + private String city; + + @Excel(name = "区") + private String district; + + @Excel(name = "党支部数量") + private Integer partybranchnum; + + @Excel(name = "删除标识") + private Integer 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; + + +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/excel/PaCustomerExcel.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/excel/PaCustomerExcel.java new file mode 100644 index 0000000000..b30999fe95 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/excel/PaCustomerExcel.java @@ -0,0 +1,59 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 客户信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +@Data +public class PaCustomerExcel { + + @Excel(name = "客户id,本主键和oper_crm.customer.id一致") + private String id; + + @Excel(name = "客户名称,默认是根组织名称") + private String customerName; + + @Excel(name = "删除标识:0.未删除 1.已删除") + private Integer 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; + + +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/excel/PaCustomerUserAgencyExcel.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/excel/PaCustomerUserAgencyExcel.java new file mode 100644 index 0000000000..889be75cb9 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/excel/PaCustomerUserAgencyExcel.java @@ -0,0 +1,65 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 用户组织关系表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +@Data +public class PaCustomerUserAgencyExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "客户id,来源于customer.id") + private String customerId; + + @Excel(name = "pa_customer_agency.id") + private String agencyId; + + @Excel(name = "pa_user.id") + private String userId; + + @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; + + +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/excel/PaUserExcel.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/excel/PaUserExcel.java new file mode 100644 index 0000000000..96c7263c1e --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/excel/PaUserExcel.java @@ -0,0 +1,65 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 公众号用户信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +@Data +public class PaUserExcel { + + @Excel(name = "本主键会用作customer_staff里的user_id,user表的id") + private Integer id; + + @Excel(name = "手机号") + private String phone; + + @Excel(name = "姓") + private String realName; + + @Excel(name = "1男2女0未知") + private String gender; + + @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; + + +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/excel/PaUserVisitedExcel.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/excel/PaUserVisitedExcel.java new file mode 100644 index 0000000000..03a908a88d --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/excel/PaUserVisitedExcel.java @@ -0,0 +1,68 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 公众号登陆记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +@Data +public class PaUserVisitedExcel { + + @Excel(name = "本主键会用作customer_staff里的user_id,user表的id") + private Integer id; + + @Excel(name = "用户Id pa_user.id") + private String userId; + + @Excel(name = "登陆手机号对应的openId【pa_user_wechat表手机号对应的openId】") + private String wxOpenId; + + @Excel(name = "登陆用户的openId") + private String openId; + + @Excel(name = "登陆用户使用的登陆手机号") + private String phone; + + @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; + + +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/excel/PaUserWechatExcel.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/excel/PaUserWechatExcel.java new file mode 100644 index 0000000000..2e7b5ba12d --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/excel/PaUserWechatExcel.java @@ -0,0 +1,92 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 公众号用户信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +@Data +public class PaUserWechatExcel { + + @Excel(name = "本主键会用作customer_staff里的user_id,user表的id") + private Integer id; + + @Excel(name = "用户Id user.id") + private String userId; + + @Excel(name = "注册用户的微信openId") + private String wxOpenId; + + @Excel(name = "") + private String unionId; + + @Excel(name = "手机号") + private String phone; + + @Excel(name = "1男2女0未知") + private String gender; + + @Excel(name = "昵称") + private String nickname; + + @Excel(name = "头像") + private String headImgUrl; + + @Excel(name = "国家") + private String country; + + @Excel(name = "省份") + private String province; + + @Excel(name = "城市") + private String city; + + @Excel(name = "用户特权信息,json 数组,如微信沃卡用户为(chinaunicom)") + private String privilege; + + @Excel(name = "语言") + private String language; + + @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; + + +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/redis/CustomerMpRedis.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/redis/CustomerMpRedis.java new file mode 100644 index 0000000000..0695487db2 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/redis/CustomerMpRedis.java @@ -0,0 +1,47 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 客户小程序关系表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +@Component +public class CustomerMpRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/redis/PaCustomerAgencyRedis.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/redis/PaCustomerAgencyRedis.java new file mode 100644 index 0000000000..b343ca7eae --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/redis/PaCustomerAgencyRedis.java @@ -0,0 +1,47 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 客户根组织信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +@Component +public class PaCustomerAgencyRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/redis/PaCustomerRedis.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/redis/PaCustomerRedis.java new file mode 100644 index 0000000000..f0169f57de --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/redis/PaCustomerRedis.java @@ -0,0 +1,47 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 客户信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +@Component +public class PaCustomerRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/redis/PaCustomerUserAgencyRedis.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/redis/PaCustomerUserAgencyRedis.java new file mode 100644 index 0000000000..074051791e --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/redis/PaCustomerUserAgencyRedis.java @@ -0,0 +1,47 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 用户组织关系表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +@Component +public class PaCustomerUserAgencyRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/redis/PaUserRedis.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/redis/PaUserRedis.java new file mode 100644 index 0000000000..d66da0300f --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/redis/PaUserRedis.java @@ -0,0 +1,47 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 公众号用户信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +@Component +public class PaUserRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/redis/PaUserVisitedRedis.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/redis/PaUserVisitedRedis.java new file mode 100644 index 0000000000..d74d8663aa --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/redis/PaUserVisitedRedis.java @@ -0,0 +1,47 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 公众号登陆记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +@Component +public class PaUserVisitedRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/redis/PaUserWechatRedis.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/redis/PaUserWechatRedis.java new file mode 100644 index 0000000000..171a852f3b --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/redis/PaUserWechatRedis.java @@ -0,0 +1,47 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 公众号用户信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +@Component +public class PaUserWechatRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/CustomerMpService.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/CustomerMpService.java new file mode 100644 index 0000000000..ba98b8b295 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/CustomerMpService.java @@ -0,0 +1,95 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.CustomerMpDTO; +import com.epmet.entity.CustomerMpEntity; + +import java.util.List; +import java.util.Map; + +/** + * 客户小程序关系表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +public interface CustomerMpService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-07-09 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-07-09 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return CustomerMpDTO + * @author generator + * @date 2020-07-09 + */ + CustomerMpDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-07-09 + */ + void save(CustomerMpDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-07-09 + */ + void update(CustomerMpDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-07-09 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/PaCustomerAgencyService.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/PaCustomerAgencyService.java new file mode 100644 index 0000000000..75d9445b5c --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/PaCustomerAgencyService.java @@ -0,0 +1,95 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.PaCustomerAgencyDTO; +import com.epmet.entity.PaCustomerAgencyEntity; + +import java.util.List; +import java.util.Map; + +/** + * 客户根组织信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +public interface PaCustomerAgencyService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-07-09 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-07-09 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return PaCustomerAgencyDTO + * @author generator + * @date 2020-07-09 + */ + PaCustomerAgencyDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-07-09 + */ + void save(PaCustomerAgencyDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-07-09 + */ + void update(PaCustomerAgencyDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-07-09 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/PaCustomerService.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/PaCustomerService.java new file mode 100644 index 0000000000..65586defbf --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/PaCustomerService.java @@ -0,0 +1,95 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.PaCustomerDTO; +import com.epmet.entity.PaCustomerEntity; + +import java.util.List; +import java.util.Map; + +/** + * 客户信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +public interface PaCustomerService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-07-09 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-07-09 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return PaCustomerDTO + * @author generator + * @date 2020-07-09 + */ + PaCustomerDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-07-09 + */ + void save(PaCustomerDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-07-09 + */ + void update(PaCustomerDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-07-09 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/PaCustomerUserAgencyService.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/PaCustomerUserAgencyService.java new file mode 100644 index 0000000000..279c16a5ce --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/PaCustomerUserAgencyService.java @@ -0,0 +1,95 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.PaCustomerUserAgencyDTO; +import com.epmet.entity.PaCustomerUserAgencyEntity; + +import java.util.List; +import java.util.Map; + +/** + * 用户组织关系表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +public interface PaCustomerUserAgencyService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-07-09 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-07-09 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return PaCustomerUserAgencyDTO + * @author generator + * @date 2020-07-09 + */ + PaCustomerUserAgencyDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-07-09 + */ + void save(PaCustomerUserAgencyDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-07-09 + */ + void update(PaCustomerUserAgencyDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-07-09 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/PaUserService.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/PaUserService.java new file mode 100644 index 0000000000..b55098f052 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/PaUserService.java @@ -0,0 +1,95 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.PaUserDTO; +import com.epmet.entity.PaUserEntity; + +import java.util.List; +import java.util.Map; + +/** + * 公众号用户信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +public interface PaUserService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-07-09 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-07-09 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return PaUserDTO + * @author generator + * @date 2020-07-09 + */ + PaUserDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-07-09 + */ + void save(PaUserDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-07-09 + */ + void update(PaUserDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-07-09 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/PaUserVisitedService.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/PaUserVisitedService.java new file mode 100644 index 0000000000..130e9d693c --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/PaUserVisitedService.java @@ -0,0 +1,95 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.PaUserVisitedDTO; +import com.epmet.entity.PaUserVisitedEntity; + +import java.util.List; +import java.util.Map; + +/** + * 公众号登陆记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +public interface PaUserVisitedService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-07-09 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-07-09 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return PaUserVisitedDTO + * @author generator + * @date 2020-07-09 + */ + PaUserVisitedDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-07-09 + */ + void save(PaUserVisitedDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-07-09 + */ + void update(PaUserVisitedDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-07-09 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/PaUserWechatService.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/PaUserWechatService.java new file mode 100644 index 0000000000..1a613c796d --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/PaUserWechatService.java @@ -0,0 +1,95 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.PaUserWechatDTO; +import com.epmet.entity.PaUserWechatEntity; + +import java.util.List; +import java.util.Map; + +/** + * 公众号用户信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +public interface PaUserWechatService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-07-09 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-07-09 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return PaUserWechatDTO + * @author generator + * @date 2020-07-09 + */ + PaUserWechatDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-07-09 + */ + void save(PaUserWechatDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-07-09 + */ + void update(PaUserWechatDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-07-09 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CustomerMpServiceImpl.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CustomerMpServiceImpl.java new file mode 100644 index 0000000000..5bb85272a0 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CustomerMpServiceImpl.java @@ -0,0 +1,104 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.CustomerMpDao; +import com.epmet.dto.CustomerMpDTO; +import com.epmet.entity.CustomerMpEntity; +import com.epmet.redis.CustomerMpRedis; +import com.epmet.service.CustomerMpService; +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.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 客户小程序关系表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +@Service +public class CustomerMpServiceImpl extends BaseServiceImpl implements CustomerMpService { + + @Autowired + private CustomerMpRedis customerMpRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, CustomerMpDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, CustomerMpDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public CustomerMpDTO get(String id) { + CustomerMpEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, CustomerMpDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(CustomerMpDTO dto) { + CustomerMpEntity entity = ConvertUtils.sourceToTarget(dto, CustomerMpEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(CustomerMpDTO dto) { + CustomerMpEntity entity = ConvertUtils.sourceToTarget(dto, CustomerMpEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/PaCustomerAgencyServiceImpl.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/PaCustomerAgencyServiceImpl.java new file mode 100644 index 0000000000..f3301377d0 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/PaCustomerAgencyServiceImpl.java @@ -0,0 +1,104 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.PaCustomerAgencyDao; +import com.epmet.dto.PaCustomerAgencyDTO; +import com.epmet.entity.PaCustomerAgencyEntity; +import com.epmet.redis.PaCustomerAgencyRedis; +import com.epmet.service.PaCustomerAgencyService; +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.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 客户根组织信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +@Service +public class PaCustomerAgencyServiceImpl extends BaseServiceImpl implements PaCustomerAgencyService { + + @Autowired + private PaCustomerAgencyRedis paCustomerAgencyRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, PaCustomerAgencyDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, PaCustomerAgencyDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public PaCustomerAgencyDTO get(String id) { + PaCustomerAgencyEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, PaCustomerAgencyDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(PaCustomerAgencyDTO dto) { + PaCustomerAgencyEntity entity = ConvertUtils.sourceToTarget(dto, PaCustomerAgencyEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(PaCustomerAgencyDTO dto) { + PaCustomerAgencyEntity entity = ConvertUtils.sourceToTarget(dto, PaCustomerAgencyEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/PaCustomerServiceImpl.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/PaCustomerServiceImpl.java new file mode 100644 index 0000000000..c1dc9b68f5 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/PaCustomerServiceImpl.java @@ -0,0 +1,104 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.PaCustomerDao; +import com.epmet.dto.PaCustomerDTO; +import com.epmet.entity.PaCustomerEntity; +import com.epmet.redis.PaCustomerRedis; +import com.epmet.service.PaCustomerService; +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.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 客户信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +@Service +public class PaCustomerServiceImpl extends BaseServiceImpl implements PaCustomerService { + + @Autowired + private PaCustomerRedis paCustomerRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, PaCustomerDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, PaCustomerDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public PaCustomerDTO get(String id) { + PaCustomerEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, PaCustomerDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(PaCustomerDTO dto) { + PaCustomerEntity entity = ConvertUtils.sourceToTarget(dto, PaCustomerEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(PaCustomerDTO dto) { + PaCustomerEntity entity = ConvertUtils.sourceToTarget(dto, PaCustomerEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/PaCustomerUserAgencyServiceImpl.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/PaCustomerUserAgencyServiceImpl.java new file mode 100644 index 0000000000..3ddecf4123 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/PaCustomerUserAgencyServiceImpl.java @@ -0,0 +1,104 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.PaCustomerUserAgencyDao; +import com.epmet.dto.PaCustomerUserAgencyDTO; +import com.epmet.entity.PaCustomerUserAgencyEntity; +import com.epmet.redis.PaCustomerUserAgencyRedis; +import com.epmet.service.PaCustomerUserAgencyService; +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.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 用户组织关系表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +@Service +public class PaCustomerUserAgencyServiceImpl extends BaseServiceImpl implements PaCustomerUserAgencyService { + + @Autowired + private PaCustomerUserAgencyRedis paCustomerUserAgencyRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, PaCustomerUserAgencyDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, PaCustomerUserAgencyDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public PaCustomerUserAgencyDTO get(String id) { + PaCustomerUserAgencyEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, PaCustomerUserAgencyDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(PaCustomerUserAgencyDTO dto) { + PaCustomerUserAgencyEntity entity = ConvertUtils.sourceToTarget(dto, PaCustomerUserAgencyEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(PaCustomerUserAgencyDTO dto) { + PaCustomerUserAgencyEntity entity = ConvertUtils.sourceToTarget(dto, PaCustomerUserAgencyEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/PaUserServiceImpl.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/PaUserServiceImpl.java new file mode 100644 index 0000000000..d902604396 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/PaUserServiceImpl.java @@ -0,0 +1,104 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.PaUserDao; +import com.epmet.dto.PaUserDTO; +import com.epmet.entity.PaUserEntity; +import com.epmet.redis.PaUserRedis; +import com.epmet.service.PaUserService; +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.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 公众号用户信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +@Service +public class PaUserServiceImpl extends BaseServiceImpl implements PaUserService { + + @Autowired + private PaUserRedis paUserRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, PaUserDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, PaUserDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public PaUserDTO get(String id) { + PaUserEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, PaUserDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(PaUserDTO dto) { + PaUserEntity entity = ConvertUtils.sourceToTarget(dto, PaUserEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(PaUserDTO dto) { + PaUserEntity entity = ConvertUtils.sourceToTarget(dto, PaUserEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/PaUserVisitedServiceImpl.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/PaUserVisitedServiceImpl.java new file mode 100644 index 0000000000..fd00039467 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/PaUserVisitedServiceImpl.java @@ -0,0 +1,104 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.PaUserVisitedDao; +import com.epmet.dto.PaUserVisitedDTO; +import com.epmet.entity.PaUserVisitedEntity; +import com.epmet.redis.PaUserVisitedRedis; +import com.epmet.service.PaUserVisitedService; +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.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 公众号登陆记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +@Service +public class PaUserVisitedServiceImpl extends BaseServiceImpl implements PaUserVisitedService { + + @Autowired + private PaUserVisitedRedis paUserVisitedRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, PaUserVisitedDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, PaUserVisitedDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public PaUserVisitedDTO get(String id) { + PaUserVisitedEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, PaUserVisitedDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(PaUserVisitedDTO dto) { + PaUserVisitedEntity entity = ConvertUtils.sourceToTarget(dto, PaUserVisitedEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(PaUserVisitedDTO dto) { + PaUserVisitedEntity entity = ConvertUtils.sourceToTarget(dto, PaUserVisitedEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/PaUserWechatServiceImpl.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/PaUserWechatServiceImpl.java new file mode 100644 index 0000000000..e5a4746faa --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/PaUserWechatServiceImpl.java @@ -0,0 +1,104 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.PaUserWechatDao; +import com.epmet.dto.PaUserWechatDTO; +import com.epmet.entity.PaUserWechatEntity; +import com.epmet.redis.PaUserWechatRedis; +import com.epmet.service.PaUserWechatService; +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.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 公众号用户信息 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-09 + */ +@Service +public class PaUserWechatServiceImpl extends BaseServiceImpl implements PaUserWechatService { + + @Autowired + private PaUserWechatRedis paUserWechatRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, PaUserWechatDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, PaUserWechatDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public PaUserWechatDTO get(String id) { + PaUserWechatEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, PaUserWechatDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(PaUserWechatDTO dto) { + PaUserWechatEntity entity = ConvertUtils.sourceToTarget(dto, PaUserWechatEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(PaUserWechatDTO dto) { + PaUserWechatEntity entity = ConvertUtils.sourceToTarget(dto, PaUserWechatEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/CustomerMpDao.xml b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/CustomerMpDao.xml new file mode 100644 index 0000000000..a348e795ed --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/CustomerMpDao.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PaCustomerAgencyDao.xml b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PaCustomerAgencyDao.xml new file mode 100644 index 0000000000..5867f5a86c --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PaCustomerAgencyDao.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PaCustomerDao.xml b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PaCustomerDao.xml new file mode 100644 index 0000000000..9358d53ab5 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PaCustomerDao.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PaCustomerUserAgencyDao.xml b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PaCustomerUserAgencyDao.xml new file mode 100644 index 0000000000..9efe156b41 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PaCustomerUserAgencyDao.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PaUserDao.xml b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PaUserDao.xml new file mode 100644 index 0000000000..505b33576c --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PaUserDao.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PaUserVisitedDao.xml b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PaUserVisitedDao.xml new file mode 100644 index 0000000000..9023e43184 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PaUserVisitedDao.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PaUserWechatDao.xml b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PaUserWechatDao.xml new file mode 100644 index 0000000000..a6e8b4ce94 --- /dev/null +++ b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/PaUserWechatDao.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file