记得上下班打卡 | git大法好,push需谨慎

Commit ea4f634a authored by zhangguobing's avatar zhangguobing

~api:券商品业务-添加/编辑券商品+创建/更新券模板;

parent f5dec7ba
......@@ -259,7 +259,7 @@ public class GoblinStoreMgtGoodsCouponAddParam implements Serializable {
skuInfoVo.setCouType(1);// 券类型暂时只支持代金券
skuInfoVo.setUseScope(addSkuParam.getUseScope());
skuInfoVo.setValFace(addSkuParam.getValFace());
skuInfoVo.setValidity(0);
skuInfoVo.setValidity(-1);
skuInfoVo.setEffectAt(DateUtil.Formatter.yyyyMMddHHmmss.parse(addSkuParam.getEffectTime()));
skuInfoVo.setExpireAt(DateUtil.Formatter.yyyyMMddHHmmss.parse(addSkuParam.getExpireTime()));
}
......
......@@ -40,6 +40,14 @@ public interface IGoblinstoreMgtGoodsService {
*/
void digitalGoodsAdd(GoblinGoodsInfoVo goodsInfoVo);
/**
* 商品管理:SPU添加-券类商品
*
* @param goodsInfoVo GoblinGoodsInfoVo
* @param goodsSkuInfoVoList List<GoblinGoodsSkuInfoVo>
*/
void couponGoodsAdd(GoblinGoodsInfoVo goodsInfoVo, List<GoblinGoodsSkuInfoVo> goodsSkuInfoVoList);
/**
* 商品管理:SPU详情
*
......
......@@ -109,21 +109,6 @@ public class CandyCoupon implements Serializable {
*/
private Integer isTrueName;
/**
* 关联人证件类型:1-大陆身份证,2-港澳通行证,3-台胞证,4-护照,5-军官证
*/
private Integer idType;
/**
* 关联人姓名
*/
private String idName;
/**
* 关联人证件号码
*/
private String idNo;
/**
* 兑换有效期(单位天)
*/
......
......@@ -183,12 +183,24 @@ create table candy_coupon_relate
create index idx_ccr_coupon_id on candy_coupon_relate (coupon_id);
# -- >>------------------------------------------------------------------------------------ |20240123 商品券业务
alter table candy_coupon add is_true_name smallint default 0 comment '是否实名[0-否|1-是,表示该券需要实名使用]' after validity;
alter table candy_coupon add id_type smallint default 0 comment '关联人证件类型:1-大陆身份证,2-港澳通行证,3-台胞证,4-护照,5-军官证' after is_true_name;
alter table candy_coupon add id_name varchar(30) default '' comment '关联人姓名' after id_type;
alter table candy_coupon add id_no varchar(30) default '' comment '关联人证件号码' after id_name;
alter table candy_coupon_rule modify use_scope smallint null comment '适用范围[101-音乐节|102-小型演出(livehouse演出)|103-巡演|100-全场|90-演出|91-场次|92-票|80-商品|81-款式]';
drop table if exists candy_user_coupon_assoc;
create table candy_user_coupon_assoc
(
mid bigint unsigned auto_increment primary key,
ucoupon_id varchar(64) not null comment '~candy_user_coupon.ucoupon_id',
id_type tinyint not null comment '关联人证件类型:1-大陆身份证,2-港澳通行证,3-台胞证,4-护照,5-军官证',
id_name varchar(30) not null comment '关联人姓名',
id_no varchar(30) not null comment '关联人证件号码',
comment text
) engine InnoDB comment '券关联适用人信息';
create index idx_cuca_ucoupon_id on candy_user_coupon_assoc (ucoupon_id);
drop table if exists candy_mgt_coupon_snapshot;
create table candy_mgt_coupon_snapshot
(
......
......@@ -635,7 +635,7 @@ public class GoblinStoreMgtGoodsController {
if (!CollectionUtils.isEmpty(ssidList)) {
goodsInfoVo.setServiceSupportVoList(goblinMongoUtils.getServiceSupportVos(ssidList));
}
goblinstoreMgtGoodsService.goodsAdd(goodsInfoVo, goodsSkuInfoVoList);
goblinstoreMgtGoodsService.couponGoodsAdd(goodsInfoVo, goodsSkuInfoVoList);
return ResponseDto.success(goodsInfoVo.getSpuId());
}
......@@ -1447,8 +1447,8 @@ public class GoblinStoreMgtGoodsController {
if (null == mgtGoodsSkuInfoVo || !mgtGoodsSkuInfoVo.getDelFlg().equals("0") || !mgtGoodsSkuInfoVo.getStoreId().equals(storeId)) {
return ResponseDto.failure(ErrorMapping.get("149011"));
}
if (mgtGoodsSkuInfoVo.getSkuType() == 1) {
return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "无效操作,该商品为数字藏品");
if (mgtGoodsSkuInfoVo.getSkuType() != 0) {
return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "无效操作,该商品非常规商品");
}
if (mgtGoodsSkuInfoVo.getShelvesStatus().equals("3")) {
return ResponseDto.failure(ErrorMapping.get("149016"));
......
......@@ -79,6 +79,11 @@ goblin_goods_sku_nft.insert_for_digital=INSERT INTO goblin_goods_sku_nft (sku_id
#goblin_goods_sku_nft.update_for_digital=UPDATE goblin_goods_sku_nft SET upchain=?,series_id=?,series_hash=?,nft_hash=?,declare_at=?,updated_at=? WHERE skuId=? AND upchain=9
goblin_goods_sku_coupon.insert=INSERT INTO goblin_goods_sku_coupon (sku_id,busi_type,cou_type,use_scope,val_face,is_true_name,validity,effect_at,expire_at)VALUES(?,?,?,?,?,?,?,?,?)
goblin_goods_sku_coupon.update=UPDATE goblin_goods_sku_coupon SET use_scope=?,val_face=?,is_true_name=?,effect_at=?,expire_at=? WHERE sku_id=? AND del_flg='0'
candy_coupon.goods_insert=INSERT INTO candy_coupon (coupon_id,state,title,notice,`exclusive`,busi_type,cou_type,bind_type,val_face,validity,is_true_name,effect_at,expire_at,operator,created_at) VALUES (?,1,?,?,0,?,?,1,?,?,?,?,?,?,?)
candy_coupon.goods_spu_update=UPDATE candy_coupon SET title=?,notice=?,operator=?,updated_at=? WHERE coupon_id=?
candy_coupon.goods_sku_update=UPDATE candy_coupon SET val_face=?,is_true_name=?,effect_at=?,expire_at=?,operator=?,updated_at=? WHERE coupon_id=?
candy_coupon_rule.goods_insert=INSERT INTO candy_coupon_rule (crule_id,coupon_id,use_scope,busi_name,busi_id,state) VALUES (?,?,?,?,?,1)
candy_coupon_rule.goods_sku_update=UPDATE candy_coupon_rule SET use_scope=?,busi_name=? WHERE coupon_id=?
goblin_goods_image.insert_byreplace=REPLACE INTO goblin_goods_image (spu_id,url,del_flg)VALUES(?,?,'0')
goblin_goods_image.delete=UPDATE goblin_goods_image SET del_flg='1' WHERE spu_id=? AND del_flg='0'
goblin_goods_tag.insert_byreplace=REPLACE INTO goblin_goods_tag (spu_id,tag_id,sort,tag_belong,del_flg)VALUES(?,?,?,?,'0')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment