release-新增字段createTime和modifyTime

release-2024-08-08
pikaqiudeshujia 7 months ago
parent cd9298e89f
commit 9c81dcc153

@ -38,6 +38,8 @@ public class ArtistController {
return Result.success(); return Result.success();
} }
@ApiOperation(value = "音乐人-成员绑定", notes = "音乐人-成员绑定") @ApiOperation(value = "音乐人-成员绑定", notes = "音乐人-成员绑定")
@PostMapping("/bind") @PostMapping("/bind")
public Result<Void> memberBind(@ApiParam(value = "绑定对象",required = true) @Valid @RequestBody ArtistUserBindDto artistUserBindDto) { public Result<Void> memberBind(@ApiParam(value = "绑定对象",required = true) @Valid @RequestBody ArtistUserBindDto artistUserBindDto) {

@ -16,6 +16,6 @@ import java.util.List;
*/ */
public interface UserProcessDao extends JpaRepository<UserProcess,String>, JpaSpecificationExecutor<UserProcess> { public interface UserProcessDao extends JpaRepository<UserProcess,String>, JpaSpecificationExecutor<UserProcess> {
public List<UserProcessDao> findUserProcessByUserIdAndTypeAndStatus(String userId, Integer type, Integer status); public List<UserProcess> findUserProcessByUserIdAndTypeAndStatus(String userId, Integer type, Integer status);
} }

@ -7,6 +7,7 @@ import javax.persistence.Entity;
import javax.persistence.Id; import javax.persistence.Id;
import javax.persistence.Table; import javax.persistence.Table;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date;
/** /**
* @Author: yawei.huang * @Author: yawei.huang
@ -40,4 +41,10 @@ public class UserProcess implements Serializable {
@ApiModelProperty("拒绝理由") @ApiModelProperty("拒绝理由")
private String content; private String content;
@ApiModelProperty("创建时间")
private Date createTime;
@ApiModelProperty("修改时间")
private Date modifyTime;
} }

@ -102,11 +102,11 @@ public class ArtistService {
artistResponsibleDao.save(artistResponsible); artistResponsibleDao.save(artistResponsible);
// 审核记录 // 审核记录
List<UserProcessDao> successList = userProcessDao.findUserProcessByUserIdAndTypeAndStatus(userInfo.getId(), UserProcessTypeEnum.ARTIST.getCode(), UserProcessStatusEnum.SUCCESS.getCode()); List<UserProcess> successList = userProcessDao.findUserProcessByUserIdAndTypeAndStatus(userInfo.getId(), UserProcessTypeEnum.ARTIST.getCode(), UserProcessStatusEnum.SUCCESS.getCode());
if(!successList.isEmpty()) { if(!successList.isEmpty()) {
throw new RuntimeException("该账号已审核通过,请勿重复申请"); throw new RuntimeException("该账号已审核通过,请勿重复申请");
} }
List<UserProcessDao> upApprovedList = userProcessDao.findUserProcessByUserIdAndTypeAndStatus(userInfo.getId(), UserProcessTypeEnum.ARTIST.getCode(), UserProcessStatusEnum.UNAPPROVED.getCode()); List<UserProcess> upApprovedList = userProcessDao.findUserProcessByUserIdAndTypeAndStatus(userInfo.getId(), UserProcessTypeEnum.ARTIST.getCode(), UserProcessStatusEnum.UNAPPROVED.getCode());
if(!upApprovedList.isEmpty()) { if(!upApprovedList.isEmpty()) {
throw new RuntimeException("该账号正在审核中,请勿重复申请"); throw new RuntimeException("该账号正在审核中,请勿重复申请");
} }
@ -116,6 +116,7 @@ public class ArtistService {
.userId(userInfo.getId()) .userId(userInfo.getId())
.type(UserProcessTypeEnum.ARTIST.getCode()) .type(UserProcessTypeEnum.ARTIST.getCode())
.status(UserProcessStatusEnum.UNAPPROVED.getCode()) .status(UserProcessStatusEnum.UNAPPROVED.getCode())
.createTime(new Date())
.build(); .build();
userProcessDao.save(userProcess); userProcessDao.save(userProcess);
} }

@ -86,11 +86,11 @@ public class BandService {
bandOperatorDao.save(bandOperator); bandOperatorDao.save(bandOperator);
List<UserProcessDao> successList = userProcessDao.findUserProcessByUserIdAndTypeAndStatus(userInfo.getId(), UserProcessTypeEnum.BAND.getCode(), UserProcessStatusEnum.SUCCESS.getCode()); List<UserProcess> successList = userProcessDao.findUserProcessByUserIdAndTypeAndStatus(userInfo.getId(), UserProcessTypeEnum.BAND.getCode(), UserProcessStatusEnum.SUCCESS.getCode());
if(!successList.isEmpty()) { if(!successList.isEmpty()) {
throw new RuntimeException("该账号已审核通过,请勿重复申请"); throw new RuntimeException("该账号已审核通过,请勿重复申请");
} }
List<UserProcessDao> upApprovedList = userProcessDao.findUserProcessByUserIdAndTypeAndStatus(userInfo.getId(), UserProcessTypeEnum.BAND.getCode(), UserProcessStatusEnum.UNAPPROVED.getCode()); List<UserProcess> upApprovedList = userProcessDao.findUserProcessByUserIdAndTypeAndStatus(userInfo.getId(), UserProcessTypeEnum.BAND.getCode(), UserProcessStatusEnum.UNAPPROVED.getCode());
if(!upApprovedList.isEmpty()) { if(!upApprovedList.isEmpty()) {
throw new RuntimeException("该账号正在审核中,请勿重复申请"); throw new RuntimeException("该账号正在审核中,请勿重复申请");
} }
@ -100,6 +100,7 @@ public class BandService {
.userId(userInfo.getId()) .userId(userInfo.getId())
.type(UserProcessTypeEnum.BAND.getCode()) .type(UserProcessTypeEnum.BAND.getCode())
.status(UserProcessStatusEnum.UNAPPROVED.getCode()) .status(UserProcessStatusEnum.UNAPPROVED.getCode())
.createTime(new Date())
.build(); .build();
userProcessDao.save(userProcess); userProcessDao.save(userProcess);

@ -5,7 +5,9 @@ create table tb_user_process
user_id varchar(20) null comment '用户id', user_id varchar(20) null comment '用户id',
type int(5) null comment '申请类型 1-音乐人 2-厂牌', type int(5) null comment '申请类型 1-音乐人 2-厂牌',
status int(5) null comment '申请状态 0-待审批 1-审批通过 2-审批成功', status int(5) null comment '申请状态 0-待审批 1-审批通过 2-审批成功',
content longtext null comment '拒绝理由' content longtext null comment '拒绝理由',
create_time datetime null comment '创建时间',
modify_time datetime null comment '修改时间'
) )
comment '人员注册审批表'; comment '人员注册审批表';

Loading…
Cancel
Save