From 9c81dcc153b3e9e3663ac6d267f801e6a5ee5335 Mon Sep 17 00:00:00 2001 From: pikaqiudeshujia Date: Sun, 28 Apr 2024 08:52:40 +0800 Subject: [PATCH] =?UTF-8?q?release-=E6=96=B0=E5=A2=9E=E5=AD=97=E6=AE=B5cre?= =?UTF-8?q?ateTime=E5=92=8CmodifyTime?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/luoo/user/controller/ArtistController.java | 2 ++ .../main/java/com/luoo/user/dao/UserProcessDao.java | 2 +- .../main/java/com/luoo/user/pojo/UserProcess.java | 7 +++++++ .../java/com/luoo/user/service/ArtistService.java | 5 +++-- .../main/java/com/luoo/user/service/BandService.java | 5 +++-- luoo_user/src/main/resources/sql/20240428.sql | 12 +++++++----- 6 files changed, 23 insertions(+), 10 deletions(-) diff --git a/luoo_user/src/main/java/com/luoo/user/controller/ArtistController.java b/luoo_user/src/main/java/com/luoo/user/controller/ArtistController.java index 638e437..055f3fd 100644 --- a/luoo_user/src/main/java/com/luoo/user/controller/ArtistController.java +++ b/luoo_user/src/main/java/com/luoo/user/controller/ArtistController.java @@ -38,6 +38,8 @@ public class ArtistController { return Result.success(); } + + @ApiOperation(value = "音乐人-成员绑定", notes = "音乐人-成员绑定") @PostMapping("/bind") public Result memberBind(@ApiParam(value = "绑定对象",required = true) @Valid @RequestBody ArtistUserBindDto artistUserBindDto) { diff --git a/luoo_user/src/main/java/com/luoo/user/dao/UserProcessDao.java b/luoo_user/src/main/java/com/luoo/user/dao/UserProcessDao.java index 7232cd3..cbe2d15 100644 --- a/luoo_user/src/main/java/com/luoo/user/dao/UserProcessDao.java +++ b/luoo_user/src/main/java/com/luoo/user/dao/UserProcessDao.java @@ -16,6 +16,6 @@ import java.util.List; */ public interface UserProcessDao extends JpaRepository, JpaSpecificationExecutor { - public List findUserProcessByUserIdAndTypeAndStatus(String userId, Integer type, Integer status); + public List findUserProcessByUserIdAndTypeAndStatus(String userId, Integer type, Integer status); } diff --git a/luoo_user/src/main/java/com/luoo/user/pojo/UserProcess.java b/luoo_user/src/main/java/com/luoo/user/pojo/UserProcess.java index 1c1b4c1..3829005 100644 --- a/luoo_user/src/main/java/com/luoo/user/pojo/UserProcess.java +++ b/luoo_user/src/main/java/com/luoo/user/pojo/UserProcess.java @@ -7,6 +7,7 @@ import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Table; import java.io.Serializable; +import java.util.Date; /** * @Author: yawei.huang @@ -40,4 +41,10 @@ public class UserProcess implements Serializable { @ApiModelProperty("拒绝理由") private String content; + + @ApiModelProperty("创建时间") + private Date createTime; + + @ApiModelProperty("修改时间") + private Date modifyTime; } diff --git a/luoo_user/src/main/java/com/luoo/user/service/ArtistService.java b/luoo_user/src/main/java/com/luoo/user/service/ArtistService.java index 3659d49..c503274 100644 --- a/luoo_user/src/main/java/com/luoo/user/service/ArtistService.java +++ b/luoo_user/src/main/java/com/luoo/user/service/ArtistService.java @@ -102,11 +102,11 @@ public class ArtistService { artistResponsibleDao.save(artistResponsible); // 审核记录 - List successList = userProcessDao.findUserProcessByUserIdAndTypeAndStatus(userInfo.getId(), UserProcessTypeEnum.ARTIST.getCode(), UserProcessStatusEnum.SUCCESS.getCode()); + List successList = userProcessDao.findUserProcessByUserIdAndTypeAndStatus(userInfo.getId(), UserProcessTypeEnum.ARTIST.getCode(), UserProcessStatusEnum.SUCCESS.getCode()); if(!successList.isEmpty()) { throw new RuntimeException("该账号已审核通过,请勿重复申请"); } - List upApprovedList = userProcessDao.findUserProcessByUserIdAndTypeAndStatus(userInfo.getId(), UserProcessTypeEnum.ARTIST.getCode(), UserProcessStatusEnum.UNAPPROVED.getCode()); + List upApprovedList = userProcessDao.findUserProcessByUserIdAndTypeAndStatus(userInfo.getId(), UserProcessTypeEnum.ARTIST.getCode(), UserProcessStatusEnum.UNAPPROVED.getCode()); if(!upApprovedList.isEmpty()) { throw new RuntimeException("该账号正在审核中,请勿重复申请"); } @@ -116,6 +116,7 @@ public class ArtistService { .userId(userInfo.getId()) .type(UserProcessTypeEnum.ARTIST.getCode()) .status(UserProcessStatusEnum.UNAPPROVED.getCode()) + .createTime(new Date()) .build(); userProcessDao.save(userProcess); } diff --git a/luoo_user/src/main/java/com/luoo/user/service/BandService.java b/luoo_user/src/main/java/com/luoo/user/service/BandService.java index 8a94d83..f2b4133 100644 --- a/luoo_user/src/main/java/com/luoo/user/service/BandService.java +++ b/luoo_user/src/main/java/com/luoo/user/service/BandService.java @@ -86,11 +86,11 @@ public class BandService { bandOperatorDao.save(bandOperator); - List successList = userProcessDao.findUserProcessByUserIdAndTypeAndStatus(userInfo.getId(), UserProcessTypeEnum.BAND.getCode(), UserProcessStatusEnum.SUCCESS.getCode()); + List successList = userProcessDao.findUserProcessByUserIdAndTypeAndStatus(userInfo.getId(), UserProcessTypeEnum.BAND.getCode(), UserProcessStatusEnum.SUCCESS.getCode()); if(!successList.isEmpty()) { throw new RuntimeException("该账号已审核通过,请勿重复申请"); } - List upApprovedList = userProcessDao.findUserProcessByUserIdAndTypeAndStatus(userInfo.getId(), UserProcessTypeEnum.BAND.getCode(), UserProcessStatusEnum.UNAPPROVED.getCode()); + List upApprovedList = userProcessDao.findUserProcessByUserIdAndTypeAndStatus(userInfo.getId(), UserProcessTypeEnum.BAND.getCode(), UserProcessStatusEnum.UNAPPROVED.getCode()); if(!upApprovedList.isEmpty()) { throw new RuntimeException("该账号正在审核中,请勿重复申请"); } @@ -100,6 +100,7 @@ public class BandService { .userId(userInfo.getId()) .type(UserProcessTypeEnum.BAND.getCode()) .status(UserProcessStatusEnum.UNAPPROVED.getCode()) + .createTime(new Date()) .build(); userProcessDao.save(userProcess); diff --git a/luoo_user/src/main/resources/sql/20240428.sql b/luoo_user/src/main/resources/sql/20240428.sql index d7a4ec9..67ea312 100644 --- a/luoo_user/src/main/resources/sql/20240428.sql +++ b/luoo_user/src/main/resources/sql/20240428.sql @@ -1,11 +1,13 @@ create table tb_user_process ( - id varchar(20) not null + id varchar(20) not null primary key, - user_id varchar(20) null comment '用户id', - type int(5) null comment '申请类型 1-音乐人 2-厂牌', - status int(5) null comment '申请状态 0-待审批 1-审批通过 2-审批成功', - content longtext null comment '拒绝理由' + user_id varchar(20) null comment '用户id', + type int(5) null comment '申请类型 1-音乐人 2-厂牌', + status int(5) null comment '申请状态 0-待审批 1-审批通过 2-审批成功', + content longtext null comment '拒绝理由', + create_time datetime null comment '创建时间', + modify_time datetime null comment '修改时间' ) comment '人员注册审批表';