Merge branch 'ww-分享' into test

This commit is contained in:
wangw 2024-11-07 09:57:58 +08:00
commit 66ccea37cd
2 changed files with 5 additions and 6 deletions

View File

@ -1,20 +1,16 @@
package cn.ysk.cashier.controller;
import cn.ysk.cashier.annotation.AnonymousAccess;
import cn.ysk.cashier.annotation.Log;
import cn.ysk.cashier.mybatis.entity.TbShopShare;
import cn.ysk.cashier.mybatis.service.TbShopShareService;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.*;
import io.swagger.annotations.ApiOperation;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.io.Serializable;
import java.util.Arrays;
import java.util.List;
/**
* 店铺分享(TbShopShare)表控制层

View File

@ -4,7 +4,9 @@ import java.util.Date;
import cn.hutool.core.collection.CollectionUtil;
import cn.ysk.cashier.utils.JSONUtil;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;
@ -22,6 +24,7 @@ import java.util.List;
@SuppressWarnings("serial")
public class TbShopShare extends Model<TbShopShare> {
@TableId(type = IdType.AUTO)
private Integer id;
//店铺Id
private Integer shopId;
@ -64,7 +67,7 @@ public class TbShopShare extends Model<TbShopShare> {
public void setRewardCoupon(String rewardCoupon) {
this.rewardCoupon = rewardCoupon;
if(StringUtils.isNotBlank(rewardCoupon)){
this.newCoupons = JSONUtil.parseJSONStrTList(rewardCoupon,ShareCoupons.class);
this.rewardCoupons = JSONUtil.parseJSONStrTList(rewardCoupon,ShareCoupons.class);
}
}