Merge remote-tracking branch 'origin/test' into test

This commit is contained in:
张松 2024-11-22 15:43:16 +08:00
commit 03562b61e3
3 changed files with 15 additions and 14 deletions

View File

@ -16,6 +16,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
@ -54,7 +55,7 @@ public class TbShopInfoController {
put("token", properties.getTokenStartWith() + token);
if (shopInfo != null) {
put("shopId", shopInfo.getId());
put("mainId", shopInfo.getMainId());
put("mainId", StringUtils.isNotBlank(shopInfo.getMainId())?shopInfo.getId():shopInfo.getMainId());
put("loginType", "merchant");
put("shopName", shopInfo.getShopName());
put("logo", shopInfo.getLogo());

View File

@ -179,7 +179,7 @@ public class TbShopInfo implements Serializable {
@Column(name = "`on_sale`")
@ApiModelProperty(value = "0停业1正常营业,网上售卖")
private Integer onSale;
private Integer onSale = 1;
@Column(name = "`settle_type`")
@ApiModelProperty(value = "0今日1次日")
@ -252,25 +252,25 @@ public class TbShopInfo implements Serializable {
@Column(name = "is_custom")
@ApiModelProperty(value = "是否允许用户自定义金额")
private String isCustom;
private String isCustom = "0";
@Column(name = "is_return")
@ApiModelProperty(value = "是否允许用户自定义金额")
private String isReturn;
@ApiModelProperty(value = "是否开启退款密码 ")
private String isReturn = "0";
@Column(name = "is_member_in")
@ApiModelProperty(value = "是否允许用户自定义金额")
private String isMemberIn;
@ApiModelProperty(value = "是否开启会员充值密码 ")
private String isMemberIn = "0";
@Column(name = "is_member_return")
@ApiModelProperty(value = "是否允许用户自定义金额")
private String isMemberReturn;
@ApiModelProperty(value = "是否开启会员退款密码 ")
private String isMemberReturn = "0";
@Column(name = "is_member_price")
@ApiModelProperty(value = "是否启用会员价 0否1是")
private Integer isMemberPrice;
private Integer isMemberPrice = 0;
@Column(name = "consume_colony")
@ApiModelProperty(value = "积分群体 all-所有 vip-仅针对会员")
@ -278,7 +278,7 @@ public class TbShopInfo implements Serializable {
@Column(name = "is_table_fee")
@ApiModelProperty(value = "是否免除桌位费 0否1是")
private Integer isTableFee;
private Integer isTableFee = 1;
@Column(name = "table_fee")
@ApiModelProperty(value = "桌位费")

View File

@ -1,5 +1,7 @@
package cn.ysk.cashier.service.impl.shopimpl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import cn.ysk.cashier.dto.BindingDto;
import cn.ysk.cashier.dto.shop.TbShopInfoDto;
import cn.ysk.cashier.dto.shop.TbShopInfoQueryCriteria;
@ -181,12 +183,10 @@ public class TbShopInfoServiceImpl implements TbShopInfoService {
}
TbShopInfo tbShopInfo = new TbShopInfo();
BeanUtils.copyProperties(resources,tbShopInfo);
BeanUtil.copyProperties(resources,tbShopInfo, CopyOptions.create().setIgnoreNullValue(true));
tbShopInfo.setCreatedAt(Instant.now().toEpochMilli());
tbShopInfo.setUpdatedAt(Instant.now().toEpochMilli());
tbShopInfo.setOnSale(1);
tbShopInfo.setIsOpenYhq(resources.getIsOpenYhq());
tbShopInfo.setConsumeColony("all");
//激活码
TbMerchantRegister tbMerchantRegister = new TbMerchantRegister();
if (resources.getRegisterCode() != null){