Merge remote-tracking branch 'origin/test' into test
This commit is contained in:
commit
be097e8b2d
|
|
@ -57,8 +57,7 @@ public class TbShopInfo implements Serializable {
|
|||
@ApiModelProperty(value = "商户Id")
|
||||
private String merchantId;
|
||||
|
||||
@Column(name = "`shop_name`",nullable = false)
|
||||
@NotBlank
|
||||
@Column(name = "`shop_name`")
|
||||
@ApiModelProperty(value = "店铺名称")
|
||||
private String shopName;
|
||||
|
||||
|
|
@ -190,8 +189,7 @@ public class TbShopInfo implements Serializable {
|
|||
@ApiModelProperty(value = "到期时间")
|
||||
private Long expireAt;
|
||||
|
||||
@Column(name = "`status`",nullable = false)
|
||||
@NotNull
|
||||
@Column(name = "`status`")
|
||||
@ApiModelProperty(value = "门店状态")
|
||||
private Integer status;
|
||||
|
||||
|
|
@ -282,6 +280,6 @@ public class TbShopInfo implements Serializable {
|
|||
private String paymentQrcode;
|
||||
|
||||
public void copy(TbShopInfo source){
|
||||
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(false));
|
||||
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -239,7 +239,7 @@ public class TbShopInfoServiceImpl implements TbShopInfoService {
|
|||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(TbShopInfo resources) {
|
||||
TbShopInfo tbShopInfo = tbShopInfoRepository.findById(resources.getId()).orElseGet(TbShopInfo::new);
|
||||
if (!resources.getShopName().equals(tbShopInfo.getShopName())) {
|
||||
if (StringUtils.isNotBlank(resources.getShopName()) && !resources.getShopName().equals(tbShopInfo.getShopName())) {
|
||||
shopStaffRepository.updateNameById(resources.getShopName(),resources.getId().toString());
|
||||
userRepository.updateNickName(resources.getAccount(),resources.getShopName());
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue