From 71fec41e32d5de04a5f70e48ae6928c920ba3248 Mon Sep 17 00:00:00 2001 From: cheney <1251790704@qq.com> Date: Fri, 15 Dec 2023 19:11:44 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E8=AE=A4=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/huoran/common/entity/UserAccount.java | 2 + .../com/huoran/common/entity/UserInfo.java | 2 +- .../huoran/common}/utils/HttpClientUtils.java | 2 +- gateway/src/main/resources/jwt.properties | 4 +- .../huoran/nakadai/NakadaiApplication.java | 2 +- .../PlatformTeamAccountController.java | 213 +++++++++++++++++ .../PlatformTeamClassificationController.java | 23 ++ .../controller/PlatformTeamController.java | 23 ++ .../huoran/nakadai/entity/PlatformTeam.java | 41 ++++ .../nakadai/entity/PlatformTeamAccount.java | 47 ++++ .../entity/PlatformTeamClassification.java | 85 +++++++ .../huoran/nakadai/entity/UserAccount.java | 8 +- .../entity/req/AccountRegisterReq.java | 47 ++++ .../nakadai/entity/req/AppletCallbackReq.java | 28 +++ .../req/PlatformTeamAccountListReq.java | 39 +++ .../entity/res/PlatformTeamAccountResp.java | 97 ++++++++ .../nakadai/entity/res/TeamAccountResp.java | 98 ++++++++ .../huoran/nakadai/mapper/HrStaffMapper.java | 2 + .../mapper/PartnerClassificationMapper.java | 2 + .../nakadai/mapper/PartnerTeamMapper.java | 2 + .../mapper/PlatformTeamAccountMapper.java | 39 +++ .../PlatformTeamClassificationMapper.java | 20 ++ .../nakadai/mapper/PlatformTeamMapper.java | 18 ++ .../mapper/xml/PlatformTeamAccountMapper.xml | 136 +++++++++++ .../xml/PlatformTeamClassificationMapper.xml | 29 +++ .../nakadai/mapper/xml/PlatformTeamMapper.xml | 5 + .../service/PlatformTeamAccountService.java | 34 +++ .../PlatformTeamClassificationService.java | 16 ++ .../nakadai/service/PlatformTeamService.java | 16 ++ .../impl/PlatformTeamAccountServiceImpl.java | 223 ++++++++++++++++++ ...PlatformTeamClassificationServiceImpl.java | 20 ++ .../service/impl/PlatformTeamServiceImpl.java | 20 ++ .../nakadai/utils/WeChatPropertiesUtil.java | 18 ++ .../src/main/resources/bootstrap.properties | 26 +- .../huoran/nakadai/code/CodeGenerator.java | 8 +- .../users/config/WeChatPropertiesUtil.java | 16 ++ .../users/controller/UserLoginController.java | 22 ++ .../users/entity/req/AccountRegisterReq.java | 44 ++++ .../users/entity/req/AppletCallbackReq.java | 9 + .../com/huoran/users/entity/vo/LoginVo.java | 2 +- .../huoran/users/mapper/HrUserInfoMapper.java | 8 + .../com/huoran/users/mapper/RoleMapper.java | 2 + .../users/mapper/xml/HrUserInfoMapper.xml | 21 ++ .../users/service/IHrUserInfoService.java | 5 + .../service/impl/HrUserInfoServiceImpl.java | 98 +++++++- users/src/main/resources/bootstrap.properties | 7 +- 46 files changed, 1604 insertions(+), 25 deletions(-) rename {users/src/main/java/com/huoran/users => common/src/main/java/com/huoran/common}/utils/HttpClientUtils.java (98%) create mode 100644 nakadai/src/main/java/com/huoran/nakadai/controller/PlatformTeamAccountController.java create mode 100644 nakadai/src/main/java/com/huoran/nakadai/controller/PlatformTeamClassificationController.java create mode 100644 nakadai/src/main/java/com/huoran/nakadai/controller/PlatformTeamController.java create mode 100644 nakadai/src/main/java/com/huoran/nakadai/entity/PlatformTeam.java create mode 100644 nakadai/src/main/java/com/huoran/nakadai/entity/PlatformTeamAccount.java create mode 100644 nakadai/src/main/java/com/huoran/nakadai/entity/PlatformTeamClassification.java create mode 100644 nakadai/src/main/java/com/huoran/nakadai/entity/req/AccountRegisterReq.java create mode 100644 nakadai/src/main/java/com/huoran/nakadai/entity/req/AppletCallbackReq.java create mode 100644 nakadai/src/main/java/com/huoran/nakadai/entity/req/PlatformTeamAccountListReq.java create mode 100644 nakadai/src/main/java/com/huoran/nakadai/entity/res/PlatformTeamAccountResp.java create mode 100644 nakadai/src/main/java/com/huoran/nakadai/entity/res/TeamAccountResp.java create mode 100644 nakadai/src/main/java/com/huoran/nakadai/mapper/PlatformTeamAccountMapper.java create mode 100644 nakadai/src/main/java/com/huoran/nakadai/mapper/PlatformTeamClassificationMapper.java create mode 100644 nakadai/src/main/java/com/huoran/nakadai/mapper/PlatformTeamMapper.java create mode 100644 nakadai/src/main/java/com/huoran/nakadai/mapper/xml/PlatformTeamAccountMapper.xml create mode 100644 nakadai/src/main/java/com/huoran/nakadai/mapper/xml/PlatformTeamClassificationMapper.xml create mode 100644 nakadai/src/main/java/com/huoran/nakadai/mapper/xml/PlatformTeamMapper.xml create mode 100644 nakadai/src/main/java/com/huoran/nakadai/service/PlatformTeamAccountService.java create mode 100644 nakadai/src/main/java/com/huoran/nakadai/service/PlatformTeamClassificationService.java create mode 100644 nakadai/src/main/java/com/huoran/nakadai/service/PlatformTeamService.java create mode 100644 nakadai/src/main/java/com/huoran/nakadai/service/impl/PlatformTeamAccountServiceImpl.java create mode 100644 nakadai/src/main/java/com/huoran/nakadai/service/impl/PlatformTeamClassificationServiceImpl.java create mode 100644 nakadai/src/main/java/com/huoran/nakadai/service/impl/PlatformTeamServiceImpl.java create mode 100644 users/src/main/java/com/huoran/users/entity/req/AccountRegisterReq.java diff --git a/common/src/main/java/com/huoran/common/entity/UserAccount.java b/common/src/main/java/com/huoran/common/entity/UserAccount.java index 2fd415c..489bfe4 100644 --- a/common/src/main/java/com/huoran/common/entity/UserAccount.java +++ b/common/src/main/java/com/huoran/common/entity/UserAccount.java @@ -81,6 +81,8 @@ public class UserAccount implements Serializable { @TableField(exist = false) private String userName; + @ApiModelProperty(value = "小程序id") + private String appOpenId; @ApiModelProperty(value = "绑定时间") private String phoneBindingTime; diff --git a/common/src/main/java/com/huoran/common/entity/UserInfo.java b/common/src/main/java/com/huoran/common/entity/UserInfo.java index 1b14b1b..7f37218 100644 --- a/common/src/main/java/com/huoran/common/entity/UserInfo.java +++ b/common/src/main/java/com/huoran/common/entity/UserInfo.java @@ -76,7 +76,7 @@ public class UserInfo implements Serializable { private Integer isDel; @ApiModelProperty(value = "最后登陆时间") - private String lastLoginTime; + private Date lastLoginTime; @ApiModelProperty(value = "绑定多个角色id") private String roleId; diff --git a/users/src/main/java/com/huoran/users/utils/HttpClientUtils.java b/common/src/main/java/com/huoran/common/utils/HttpClientUtils.java similarity index 98% rename from users/src/main/java/com/huoran/users/utils/HttpClientUtils.java rename to common/src/main/java/com/huoran/common/utils/HttpClientUtils.java index 74892a9..edabca4 100644 --- a/users/src/main/java/com/huoran/users/utils/HttpClientUtils.java +++ b/common/src/main/java/com/huoran/common/utils/HttpClientUtils.java @@ -1,4 +1,4 @@ -package com.huoran.users.utils; +package com.huoran.common.utils; import org.apache.http.NameValuePair; import org.apache.http.client.config.RequestConfig; diff --git a/gateway/src/main/resources/jwt.properties b/gateway/src/main/resources/jwt.properties index 0743393..4540c90 100644 --- a/gateway/src/main/resources/jwt.properties +++ b/gateway/src/main/resources/jwt.properties @@ -99,4 +99,6 @@ jwt.ignoreUrlList=/users/users/user/captcha,\ /nakadai/nakadai/subject/subjectCategoryCited,\ /nakadai/productType/productTypeList,\ /nakadai/tags/tagsList,\ - /nakadai/nakadai/partner/schemeManagement/schemeList + /nakadai/nakadai/partner/schemeManagement/schemeList,\ + /nakadai/kindergarten/platformTeamAccount/weChatAppletCallbackByKindergarten,\ + /nakadai/kindergarten/platformTeamAccount/kindergartenWeChatApplication diff --git a/nakadai/src/main/java/com/huoran/nakadai/NakadaiApplication.java b/nakadai/src/main/java/com/huoran/nakadai/NakadaiApplication.java index b3be7f9..90d47c2 100644 --- a/nakadai/src/main/java/com/huoran/nakadai/NakadaiApplication.java +++ b/nakadai/src/main/java/com/huoran/nakadai/NakadaiApplication.java @@ -17,7 +17,7 @@ import org.springframework.scheduling.annotation.EnableScheduling; //@EnableRabbit//开启rabbitmq @EnableFeignClients(basePackages = "com.huoran.api") @MapperScan(basePackages = "com.huoran.nakadai.mapper") -@ComponentScan(basePackages = {"com.huoran","com.huoran.nakadai.config.interceptor"}) +@ComponentScan(basePackages = {"com.huoran"}) public class NakadaiApplication { public static void main(String[] args) { diff --git a/nakadai/src/main/java/com/huoran/nakadai/controller/PlatformTeamAccountController.java b/nakadai/src/main/java/com/huoran/nakadai/controller/PlatformTeamAccountController.java new file mode 100644 index 0000000..668b269 --- /dev/null +++ b/nakadai/src/main/java/com/huoran/nakadai/controller/PlatformTeamAccountController.java @@ -0,0 +1,213 @@ +package com.huoran.nakadai.controller; + + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.huoran.common.exception.CustomException; +import com.huoran.common.exception.ExceptionEnum; +import com.huoran.common.response.R; +import com.huoran.common.utils.TokenUtils; +import com.huoran.nakadai.entity.*; +import com.huoran.nakadai.entity.req.*; +import com.huoran.nakadai.entity.res.PartnerAccountResp; +import com.huoran.nakadai.entity.res.PlatformTeamAccountResp; +import com.huoran.nakadai.entity.vo.TeamMemberVo; +import com.huoran.nakadai.service.*; +import com.huoran.nakadai.utils.GenerateCodeUtil; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; +import java.util.Map; +import java.util.Objects; +import java.util.concurrent.TimeUnit; + +/** + *
+ * 幼教产业平台团队账号表 + *
+ * + * @author chen + * @since 2023-12-12 + */ +@Api(tags = "幼教产业平台幼儿园与供应商团队账号管理") +@RestController +@RequestMapping("/kindergarten/platformTeamAccount") +public class PlatformTeamAccountController { + + @Autowired + public PlatformTeamAccountService platformTeamAccountService; + + @Autowired + public PlatformTeamService platformTeamService; + + @Autowired + public PlatformTeamClassificationService platformTeamClassificationService; + + @Autowired + private RedisTemplate+ * 幼教产业平台团队分类表 前端控制器 + *
+ * + * @author chen + * @since 2023-12-12 + */ +@Api(tags = "幼教产业平台幼儿园与供应商团队分类管理") +@RestController +@RequestMapping("/kindergarten/platformTeamClassification") +public class PlatformTeamClassificationController { + +} + diff --git a/nakadai/src/main/java/com/huoran/nakadai/controller/PlatformTeamController.java b/nakadai/src/main/java/com/huoran/nakadai/controller/PlatformTeamController.java new file mode 100644 index 0000000..02d944a --- /dev/null +++ b/nakadai/src/main/java/com/huoran/nakadai/controller/PlatformTeamController.java @@ -0,0 +1,23 @@ +package com.huoran.nakadai.controller; + + +import io.swagger.annotations.Api; +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; + +/** + *+ * 幼教产业团队账号与分类中间表 前端控制器 + *
+ * + * @author chen + * @since 2023-12-12 + */ +@Api(tags = "幼教产业平台幼儿园与供应商团队管理") +@RestController +@RequestMapping("/kindergarten/platformTeam") +public class PlatformTeamController { + +} + diff --git a/nakadai/src/main/java/com/huoran/nakadai/entity/PlatformTeam.java b/nakadai/src/main/java/com/huoran/nakadai/entity/PlatformTeam.java new file mode 100644 index 0000000..098d9a2 --- /dev/null +++ b/nakadai/src/main/java/com/huoran/nakadai/entity/PlatformTeam.java @@ -0,0 +1,41 @@ +package com.huoran.nakadai.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import java.io.Serializable; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +/** + *+ * 幼教产业团队账号与分类中间表 + *
+ * + * @author chen + * @since 2023-12-12 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("k_platform_team") +@ApiModel(value="PlatformTeam对象", description="幼教产业团队账号与分类中间表") +public class PlatformTeam implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "团队主键id") + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + + @ApiModelProperty(value = "团队账号主键id") + private Integer manageId; + + @ApiModelProperty(value = "团队分类id") + private Integer classificationId; + + +} diff --git a/nakadai/src/main/java/com/huoran/nakadai/entity/PlatformTeamAccount.java b/nakadai/src/main/java/com/huoran/nakadai/entity/PlatformTeamAccount.java new file mode 100644 index 0000000..ce2e146 --- /dev/null +++ b/nakadai/src/main/java/com/huoran/nakadai/entity/PlatformTeamAccount.java @@ -0,0 +1,47 @@ +package com.huoran.nakadai.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import java.io.Serializable; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +/** + *+ * 幼教产业平台团队账号表 + *
+ * + * @author chen + * @since 2023-12-12 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("k_platform_team_account") +@ApiModel(value="PlatformTeamAccount对象", description="幼教产业平台团队账号表") +public class PlatformTeamAccount implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "主键ID") + @TableId(value = "manage_id", type = IdType.AUTO) + private Integer manageId; + + @ApiModelProperty(value = "绑定账号id") + private Integer accountId; + + @ApiModelProperty(value = "邀请账号") + private String invitationAccount; + + @ApiModelProperty(value = "是否删除(0、未删除 1、已删除)") + private Integer isDel; + + @ApiModelProperty(value = "平台id") + private Integer platformId; + + +} diff --git a/nakadai/src/main/java/com/huoran/nakadai/entity/PlatformTeamClassification.java b/nakadai/src/main/java/com/huoran/nakadai/entity/PlatformTeamClassification.java new file mode 100644 index 0000000..d3ed032 --- /dev/null +++ b/nakadai/src/main/java/com/huoran/nakadai/entity/PlatformTeamClassification.java @@ -0,0 +1,85 @@ +package com.huoran.nakadai.entity; + +import com.baomidou.mybatisplus.annotation.*; + +import java.util.Date; +import java.io.Serializable; +import java.util.List; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +/** + *+ * 幼教产业平台团队分类表 + *
+ * + * @author chen + * @since 2023-12-12 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("k_platform_team_classification") +@ApiModel(value="PlatformTeamClassification对象", description="幼教产业平台团队分类表") +public class PlatformTeamClassification implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "主键") + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + + @ApiModelProperty(value = "团队分类名称") + private String classificationName; + + @ApiModelProperty(value = "父id 一级为0", example = "0", name = "parentId") + private Integer parentId; + + @ApiModelProperty(value = "层级") + private Integer level; + + @ApiModelProperty(value = "子级") + @TableField(exist = false) + private List+ * 幼教产业平台团队账号表 Mapper 接口 + *
+ * + * @author chen + * @since 2023-12-12 + */ +@Mapper +public interface PlatformTeamAccountMapper extends BaseMapper+ * 幼教产业平台团队分类表 Mapper 接口 + *
+ * + * @author chen + * @since 2023-12-12 + */ +@Mapper +public interface PlatformTeamClassificationMapper extends BaseMapper+ * 幼教产业团队账号与分类中间表 Mapper 接口 + *
+ * + * @author chen + * @since 2023-12-12 + */ +@Mapper +public interface PlatformTeamMapper extends BaseMapper+ * 幼教产业平台团队账号表 服务类 + *
+ * + * @author chen + * @since 2023-12-12 + */ +public interface PlatformTeamAccountService extends IService+ * 幼教产业平台团队分类表 服务类 + *
+ * + * @author chen + * @since 2023-12-12 + */ +public interface PlatformTeamClassificationService extends IService+ * 幼教产业团队账号与分类中间表 服务类 + *
+ * + * @author chen + * @since 2023-12-12 + */ +public interface PlatformTeamService extends IService+ * 幼教产业平台团队账号表 服务实现类 + *
+ * + * @author chen + * @since 2023-12-12 + */ +@Service +public class PlatformTeamAccountServiceImpl extends ServiceImpl+ * 幼教产业平台团队分类表 服务实现类 + *
+ * + * @author chen + * @since 2023-12-12 + */ +@Service +public class PlatformTeamClassificationServiceImpl extends ServiceImpl+ * 幼教产业团队账号与分类中间表 服务实现类 + *
+ * + * @author chen + * @since 2023-12-12 + */ +@Service +public class PlatformTeamServiceImpl extends ServiceImpl
@@ -11,6 +12,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @author chen
* @since 2021-09-29
*/
+@Mapper
public interface RoleMapper extends BaseMapper