Commit 24873c9d 24873c9d90aef0272277a2221d654e4fcff0b82f by xianghan

1.优化

1 parent c2cb5d73
......@@ -35,7 +35,7 @@ public class Member implements Serializable {
/** 主键 */
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE)
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "id")
@NotNull(message = "id can't be null!!",groups = {UpdateGroup.class})
private Long id;
......
......@@ -37,7 +37,7 @@ public class MemberProfile implements Serializable {
/** 主键 */
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE)
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id")
@NotNull(message = "id not be null!!" , groups = UpdateGroup.class)
private Long id;
......
......@@ -24,6 +24,7 @@ import java.sql.Timestamp;
public class Points implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id")
private Long id;
......
......@@ -37,7 +37,7 @@ public class UserTv extends AsyncMqModule implements Serializable {
/** ID */
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE)
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "id")
private Long id;
......
......@@ -29,7 +29,7 @@ public class UserWeixin extends AsyncMqModule implements Serializable {
/** ID */
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE)
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id")
private Long id;
......
package com.topdraw.business.process.service.dto;
import com.topdraw.business.module.member.service.dto.MemberDTO;
import com.topdraw.business.module.user.iptv.service.dto.UserTvDTO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @author :
* @description:
* @function :
* @date :Created in 2022/3/23 9:48
* @version: :
* @modified By:
* @since : modified in 2022/3/23 9:48
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class MemberAndUserTvDTO implements Serializable {
private MemberDTO memberDTO;
private UserTvDTO userTvDTO;
}
package com.topdraw.business.process.service.dto;
import com.topdraw.business.module.member.service.dto.MemberDTO;
import com.topdraw.business.module.user.weixin.service.dto.UserWeixinDTO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @author :
* @description:
* @function :
* @date :Created in 2022/3/23 9:48
* @version: :
* @modified By:
* @since : modified in 2022/3/23 9:48
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class MemberAndWeixinUserDTO implements Serializable {
private MemberDTO memberDTO;
private UserWeixinDTO userWeixinDTO;
}
......@@ -11,6 +11,8 @@ import com.topdraw.business.module.user.weixin.domain.UserWeixin;
import com.topdraw.business.module.user.weixin.service.UserWeixinService;
import com.topdraw.business.module.user.weixin.service.dto.UserWeixinDTO;
import com.topdraw.business.process.service.UserOperationService;
import com.topdraw.business.process.service.dto.MemberAndUserTvDTO;
import com.topdraw.business.process.service.dto.MemberAndWeixinUserDTO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -31,9 +33,9 @@ public class UserOperationServiceImpl implements UserOperationService {
private UserWeixinService userWeixinService;
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
public void asyncWeixinMemberAndUserWeixin4Iptv(MemberDTO memberDTO, UserWeixinDTO weixinDTO) {
this.saveMember(memberDTO);
this.saveWeixin(weixinDTO);
public void asyncMemberAndUserWeixin4Iptv(MemberAndWeixinUserDTO memberAndWeixinUserDTO) {
this.saveMember(memberAndWeixinUserDTO.getMemberDTO());
this.saveWeixin(memberAndWeixinUserDTO.getUserWeixinDTO());
}
private void saveMember(MemberDTO memberDTO){
......@@ -43,9 +45,9 @@ public class UserOperationServiceImpl implements UserOperationService {
}
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
public void asyncMemberAndUserTv4Iptv(MemberDTO memberDTO, UserTvDTO userTvDTO) {
this.saveMember(memberDTO);
this.saveUserTv(userTvDTO);
public void asyncMemberAndUserTv4Iptv(MemberAndUserTvDTO memberAndUserTvDTO) {
this.saveMember(memberAndUserTvDTO.getMemberDTO());
this.saveUserTv(memberAndUserTvDTO.getUserTvDTO());
}
public void asyncWeixin(UserWeixinDTO weixinDTO) {
......