店铺修改 参数问题
This commit is contained in:
parent
7e29627bf6
commit
0a3b50ef6f
|
|
@ -57,8 +57,7 @@ public class TbShopInfo implements Serializable {
|
||||||
@ApiModelProperty(value = "商户Id")
|
@ApiModelProperty(value = "商户Id")
|
||||||
private String merchantId;
|
private String merchantId;
|
||||||
|
|
||||||
@Column(name = "`shop_name`",nullable = false)
|
@Column(name = "`shop_name`")
|
||||||
@NotBlank
|
|
||||||
@ApiModelProperty(value = "店铺名称")
|
@ApiModelProperty(value = "店铺名称")
|
||||||
private String shopName;
|
private String shopName;
|
||||||
|
|
||||||
|
|
@ -282,6 +281,6 @@ public class TbShopInfo implements Serializable {
|
||||||
private String paymentQrcode;
|
private String paymentQrcode;
|
||||||
|
|
||||||
public void copy(TbShopInfo source){
|
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)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void update(TbShopInfo resources) {
|
public void update(TbShopInfo resources) {
|
||||||
TbShopInfo tbShopInfo = tbShopInfoRepository.findById(resources.getId()).orElseGet(TbShopInfo::new);
|
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());
|
shopStaffRepository.updateNameById(resources.getShopName(),resources.getId().toString());
|
||||||
userRepository.updateNickName(resources.getAccount(),resources.getShopName());
|
userRepository.updateNickName(resources.getAccount(),resources.getShopName());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue