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

Commit 4fd42af4 authored by 胡佳晨's avatar 胡佳晨

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

parents 377d6e37 87649b99
...@@ -77,7 +77,7 @@ public class GoblinRedisConst { ...@@ -77,7 +77,7 @@ public class GoblinRedisConst {
public static final String FRONT_SECKILL = PREFIX.concat("front_seckill"); //前端 秒杀列表 public static final String FRONT_SECKILL = PREFIX.concat("front_seckill"); //前端 秒杀列表
public static final String SELECT_GOODS = PREFIX.concat("select_goods"); //配置的精选商品 public static final String SELECT_GOODS = PREFIX.concat("select_goods"); //配置的精选商品
public static final String SELECT_GOODS_PAGE1 = PREFIX.concat("select_goods_page1"); //精选商品 第一页 public static final String SELECT_GOODS_PAGE1 = PREFIX.concat("select_goods_page1"); //精选商品 第一页
public static final String SELECT_GOODS_SORT = PREFIX.concat("select_goods_sort"); //精选商品 第一页 public static final String SELECT_GOODS_SORT = PREFIX.concat("select_goods_sort"); //精选商品 排序规则
public static final String SELECT_GOODS_SPUIDS = PREFIX.concat("select_goods_SPUIDS"); //精选商品 spuids public static final String SELECT_GOODS_SPUIDS = PREFIX.concat("select_goods_SPUIDS"); //精选商品 spuids
public static final String MOUDLE_INDEX = PREFIX.concat("moudle_index"); //moudle_index 组件排序 public static final String MOUDLE_INDEX = PREFIX.concat("moudle_index"); //moudle_index 组件排序
public static final String COMPLIATIONS = PREFIX.concat("goblinFrontCompilations"); // 合集 public static final String COMPLIATIONS = PREFIX.concat("goblinFrontCompilations"); // 合集
......
...@@ -149,7 +149,7 @@ public class GoblinStoreMgtGoodsAddParam implements Serializable { ...@@ -149,7 +149,7 @@ public class GoblinStoreMgtGoodsAddParam implements Serializable {
// vo.setPriceLe(BigDecimal.ZERO); // vo.setPriceLe(BigDecimal.ZERO);
vo.setIntro(this.getIntro()); vo.setIntro(this.getIntro());
vo.setDetails(this.getDetails()); vo.setDetails(this.getDetails());
vo.setCoverPic(this.getCoverPic()); vo.setCoverPic(StringUtils.isBlank(this.getCoverPic()) ? this.getImageList().get(0) : this.getCoverPic());
vo.setVideo(this.getVideo()); vo.setVideo(this.getVideo());
vo.setSpecMode(this.getSpecMode()); vo.setSpecMode(this.getSpecMode());
vo.setCateFid(this.getCateFid()); vo.setCateFid(this.getCateFid());
...@@ -197,7 +197,7 @@ public class GoblinStoreMgtGoodsAddParam implements Serializable { ...@@ -197,7 +197,7 @@ public class GoblinStoreMgtGoodsAddParam implements Serializable {
vo.setSellPrice(this.getSellPrice()); vo.setSellPrice(this.getSellPrice());
vo.setIntro(this.getIntro()); vo.setIntro(this.getIntro());
vo.setDetails(this.getDetails()); vo.setDetails(this.getDetails());
vo.setCoverPic(this.getCoverPic()); vo.setCoverPic(StringUtils.isBlank(this.getCoverPic()) ? this.getImageList().get(0) : this.getCoverPic());
vo.setVideo(this.getVideo()); vo.setVideo(this.getVideo());
vo.setSpecMode(this.getSpecMode()); vo.setSpecMode(this.getSpecMode());
vo.setCateFid(this.getCateFid()); vo.setCateFid(this.getCateFid());
...@@ -288,7 +288,7 @@ public class GoblinStoreMgtGoodsAddParam implements Serializable { ...@@ -288,7 +288,7 @@ public class GoblinStoreMgtGoodsAddParam implements Serializable {
vos.add(skuInfoVo); vos.add(skuInfoVo);
skuIdList.add(skuInfoVo.getSkuId()); skuIdList.add(skuInfoVo.getSkuId());
priceGe = priceGe.compareTo(skuInfoVo.getPrice()) > 0 ? skuInfoVo.getPrice() : priceGe; priceGe = priceGe.compareTo(BigDecimal.ZERO) == 0 ? skuInfoVo.getPrice() : (priceGe.compareTo(skuInfoVo.getPrice()) > 0 ? skuInfoVo.getPrice() : priceGe);
priceLe = priceLe.compareTo(skuInfoVo.getPrice()) < 0 ? skuInfoVo.getPrice() : priceLe; priceLe = priceLe.compareTo(skuInfoVo.getPrice()) < 0 ? skuInfoVo.getPrice() : priceLe;
if (CollectionUtils.isEmpty(skuSpecList) || (skuSpecSize > 0 && skuSpecSize != skuSpecList.size())) { if (CollectionUtils.isEmpty(skuSpecList) || (skuSpecSize > 0 && skuSpecSize != skuSpecList.size())) {
......
...@@ -9,7 +9,10 @@ import io.swagger.annotations.ApiModelProperty; ...@@ -9,7 +9,10 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import javax.validation.Valid;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern; import javax.validation.constraints.Pattern;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
...@@ -29,6 +32,8 @@ public class GoblinStoreMgtGoodsEditSkuParam implements Serializable { ...@@ -29,6 +32,8 @@ public class GoblinStoreMgtGoodsEditSkuParam implements Serializable {
@ApiModelProperty(position = 13, required = true, value = "单品默认图片的url[256]") @ApiModelProperty(position = 13, required = true, value = "单品默认图片的url[256]")
private String skuPic; private String skuPic;
@ApiModelProperty(position = 14, required = true, value = "单品规格信息") @ApiModelProperty(position = 14, required = true, value = "单品规格信息")
@Valid
@NotNull(message = "规格信息不能为空")
private List<GoblinGoodsSpecDto> skuSpecList; private List<GoblinGoodsSpecDto> skuSpecList;
@ApiModelProperty(position = 15, required = false, value = "单品销售价-原价[20,2]") @ApiModelProperty(position = 15, required = false, value = "单品销售价-原价[20,2]")
private BigDecimal sellPrice; private BigDecimal sellPrice;
......
...@@ -8,6 +8,7 @@ import com.liquidnet.service.goblin.dto.vo.GoblinGoodsInfoVo; ...@@ -8,6 +8,7 @@ import com.liquidnet.service.goblin.dto.vo.GoblinGoodsInfoVo;
import com.liquidnet.service.goblin.dto.vo.GoblinGoodsSkuInfoVo; import com.liquidnet.service.goblin.dto.vo.GoblinGoodsSkuInfoVo;
import java.util.List; import java.util.List;
import java.util.Map;
public interface IGoblinstoreMgtGoodsService { public interface IGoblinstoreMgtGoodsService {
/** /**
...@@ -38,10 +39,11 @@ public interface IGoblinstoreMgtGoodsService { ...@@ -38,10 +39,11 @@ public interface IGoblinstoreMgtGoodsService {
/** /**
* 商品管理:商品编辑:SPU编辑 * 商品管理:商品编辑:SPU编辑
* *
* @param uid UID
* @param storeMgtGoodsAddParam GoblinStoreMgtGoodsAddParam * @param storeMgtGoodsAddParam GoblinStoreMgtGoodsAddParam
* @return boolean * @return boolean
*/ */
boolean goodsEditSpu(GoblinStoreMgtGoodsAddParam storeMgtGoodsAddParam); boolean goodsEditSpu(String uid, GoblinStoreMgtGoodsAddParam storeMgtGoodsAddParam);
/** /**
* 商品管理:商品编辑:SKU编辑 * 商品管理:商品编辑:SKU编辑
...@@ -49,35 +51,40 @@ public interface IGoblinstoreMgtGoodsService { ...@@ -49,35 +51,40 @@ public interface IGoblinstoreMgtGoodsService {
* @param uid UID * @param uid UID
* @param storeMgtGoodsEditSkuParam GoblinStoreMgtGoodsEditSkuParam * @param storeMgtGoodsEditSkuParam GoblinStoreMgtGoodsEditSkuParam
* @param goodsInfoVo GoblinGoodsInfoVo * @param goodsInfoVo GoblinGoodsInfoVo
* @param delSpuSpecMap Map<String, String>
* @param beUpdateSpuSpecFlg boolean
* @return boolean * @return boolean
*/ */
boolean goodsEditSku(String uid, GoblinStoreMgtGoodsEditSkuParam storeMgtGoodsEditSkuParam, GoblinGoodsInfoVo goodsInfoVo); boolean goodsEditSku(String uid, GoblinStoreMgtGoodsEditSkuParam storeMgtGoodsEditSkuParam,
GoblinGoodsInfoVo goodsInfoVo, Map<String, String> delSpuSpecMap, boolean beUpdateSpuSpecFlg);
/** /**
* 商品管理:商品编辑:SKU添加 * 商品管理:商品编辑:SKU添加
* *
* @param uid UID
* @param storeMgtGoodsEditSkuParam GoblinStoreMgtGoodsEditSkuParam * @param storeMgtGoodsEditSkuParam GoblinStoreMgtGoodsEditSkuParam
* @param goodsInfoVo GoblinGoodsInfoVo * @param goodsInfoVo GoblinGoodsInfoVo
*/ */
void goodsEditSkuAdd(GoblinStoreMgtGoodsEditSkuParam storeMgtGoodsEditSkuParam, GoblinGoodsInfoVo goodsInfoVo); void goodsEditSkuAdd(String uid, GoblinStoreMgtGoodsEditSkuParam storeMgtGoodsEditSkuParam, GoblinGoodsInfoVo goodsInfoVo);
/** /**
* 商品管理:商品编辑:SKU删除 * 商品管理:商品编辑:SKU删除
* *
* @param uid UID
* @param goodsSkuInfoVo GoblinGoodsSkuInfoVo * @param goodsSkuInfoVo GoblinGoodsSkuInfoVo
* @return boolean * @return boolean
*/ */
boolean goodsEditSkuDel(GoblinGoodsSkuInfoVo goodsSkuInfoVo); boolean goodsEditSkuDel(String uid, GoblinGoodsSkuInfoVo goodsSkuInfoVo);
/** // /**
* 商品管理:商品编辑:SKU批改 // * 商品管理:商品编辑:SKU批改
* // *
* @param spuId 商品ID // * @param spuId 商品ID
* @param batField 批量修改属性 // * @param batField 批量修改属性
* @param batFieldVal 批量修改属性值 // * @param batFieldVal 批量修改属性值
* @return boolean // * @return boolean
*/ // */
boolean goodsEditSkuBat(String spuId, String batField, String batFieldVal); // boolean goodsEditSkuBat(String spuId, String batField, String batFieldVal);
/** /**
* 商品管理:上下架商品 * 商品管理:上下架商品
......
...@@ -49,6 +49,8 @@ public class GoblinFrontCompilationsController extends BaseController { ...@@ -49,6 +49,8 @@ public class GoblinFrontCompilationsController extends BaseController {
public AjaxResult goodsList(@RequestParam(name = "name", required = false) String name) { public AjaxResult goodsList(@RequestParam(name = "name", required = false) String name) {
LambdaQueryWrapper<GoblinGoods> queryWrapper = Wrappers.lambdaQuery(GoblinGoods.class); LambdaQueryWrapper<GoblinGoods> queryWrapper = Wrappers.lambdaQuery(GoblinGoods.class);
queryWrapper.ne(GoblinGoods::getDelFlg,"1"); queryWrapper.ne(GoblinGoods::getDelFlg,"1");
queryWrapper.eq(GoblinGoods::getShelvesStatus,"3");
queryWrapper.eq(GoblinGoods::getSpuAppear,"0");
if(StringUtil.isNotBlank(name)){ if(StringUtil.isNotBlank(name)){
queryWrapper.like(GoblinGoods::getName,name); queryWrapper.like(GoblinGoods::getName,name);
} }
......
...@@ -179,6 +179,15 @@ ...@@ -179,6 +179,15 @@
} else { } else {
} }
promiseMethods('/front-index/list','post').then(res=>{
console.log(res, 'resp')
let { data } = res;
data.forEach(item => {
if (item.moudleName == "moFang") {
$("#sorting").val(item.indexs)
}
})
})
promiseMethods('/goblin-front-cube/list', 'post').then(res => { promiseMethods('/goblin-front-cube/list', 'post').then(res => {
let { data } = res; let { data } = res;
if (data && data.length > 0) { if (data && data.length > 0) {
...@@ -411,10 +420,9 @@ ...@@ -411,10 +420,9 @@
"status": 0 "status": 0
}; };
return promiseMethods('/front-index/update', 'post', JSON.stringify(data), 'application/json') return promiseMethods('/front-index/update', 'post', JSON.stringify(data), 'application/json')
}).then(() => { }).then((res) => {
layer.msg("保存成功!") layer.msg("保存成功!")
$.modal.close(); $.operate.successCallback(res);
refreshItem()
}) })
} }
......
...@@ -328,8 +328,7 @@ ...@@ -328,8 +328,7 @@
console.log(res, 'res') console.log(res, 'res')
if (res.code == 0) { if (res.code == 0) {
layer.msg('保存成功!') layer.msg('保存成功!')
$.modal.close(); $.operate.successCallback(res);
refreshItem()
} }
}) })
} }
......
...@@ -14,7 +14,13 @@ ...@@ -14,7 +14,13 @@
flex: 1; flex: 1;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: flex-start;
height: 100vh;
position: relative;
}
.gitHot {
position: fixed;
bottom: 40px;
} }
.left_title, .right_title { .left_title, .right_title {
margin-bottom: 12px; margin-bottom: 12px;
...@@ -147,11 +153,11 @@ ...@@ -147,11 +153,11 @@
<div class="function_btn"> <div class="function_btn">
<button type="button" class="btn btn-primary" onclick="goArea(1)">金刚位</button> <button type="button" class="btn btn-primary" onclick="goArea(1)">金刚位</button>
<button type="button" class="btn btn-warning" onclick="goArea(2)">活动banner</button> <button type="button" class="btn btn-warning" onclick="goArea(2)">活动banner</button>
<button type="button" class="btn btn-info" onclick="goArea(3)">限时秒杀</button>
<button type="button" class="btn btn-success" onclick="goArea(4)">魔方</button> <button type="button" class="btn btn-success" onclick="goArea(4)">魔方</button>
<button type="button" class="btn" onclick="goArea(7)">精选商品</button> <button type="button" class="btn btn-info" onclick="goArea(7)">精选商品</button>
<!-- <button type="button" class="btn" disabled onclick="goArea(3)">限时秒杀</button> -->
</div> </div>
<button type="button" class="btn" onclick="git()">上线</button> <button type="button" class="btn btn-danger gitHot" onclick="git()">上线</button>
</div> </div>
<div class="right_content"> <div class="right_content">
<div class="right_title"> <div class="right_title">
...@@ -170,7 +176,7 @@ ...@@ -170,7 +176,7 @@
<div> <div>
魔方位 魔方位
</div> </div>
<span class="mofangSp" onclick="delSp()">X</span> <span class="mofangSp" onclick="delSp(4)">X</span>
</div> </div>
<div class="jinGangWei" onclick="goArea(1)"> <div class="jinGangWei" onclick="goArea(1)">
<div> <div>
...@@ -183,8 +189,6 @@ ...@@ -183,8 +189,6 @@
活动BANNER 活动BANNER
</div> </div>
<span class="huDongBannerSp" onclick="delSp(2)">X</span> <span class="huDongBannerSp" onclick="delSp(2)">X</span>
</div> </div>
<!-- <iframe id="iframe" src="http://172.16.3.82:8080/#/goods/home?place=admin" width="375" height="1190" frameborder="0"></iframe> --> <!-- <iframe id="iframe" src="http://172.16.3.82:8080/#/goods/home?place=admin" width="375" height="1190" frameborder="0"></iframe> -->
</div> </div>
...@@ -209,32 +213,33 @@ ...@@ -209,32 +213,33 @@
switch(num) { switch(num) {
case 1: case 1:
// $.modal.open('添加用户', prefix2 + "/form", '900', '320', callback); // $.modal.open('添加用户', prefix2 + "/form", '900', '320', callback);
$.modal.open('金刚位', prefix2 + "/kingArea?id=" + 1212) $.modal.open('金刚位', prefix2 + "/kingArea?id=" + 1212,900,800, cancel)
break; break;
case 5: case 5:
$.modal.open('商品搜索', prefix2 + "/searchStore?id=" + 1212) $.modal.open('商品搜索', prefix2 + "/searchStore?id=" + 1212,900,800, cancel)
// $.modal.openTab('商品搜索', prefix2 + "/searchStore?id=" + 1212) // $.modal.openTab('商品搜索', prefix2 + "/searchStore?id=" + 1212)
break; break;
case 6: case 6:
$.modal.open('顶部banner', prefix2 + "/topBanner?id=" + num) $.modal.open('顶部banner', prefix2 + "/topBanner?id=" + num,900,800, cancel)
// $.modal.openTab('顶部banner', prefix2 + "/topBanner?id=" + num) // $.modal.openTab('顶部banner', prefix2 + "/topBanner?id=" + num)
break; break;
case 2: case 2:
$.modal.open('活动banner', prefix2 + "/topBanner?id=" + num) $.modal.open('活动banner', prefix2 + "/topBanner?id=" + num,900,800, cancel)
// $.modal.openTab('活动banner', prefix2 + "/topBanner?id=" + num) // $.modal.openTab('活动banner', prefix2 + "/topBanner?id=" + num)
break; break;
case 4: case 4:
$.modal.open('魔方位', prefix2 + "/RubikArea?id=" + num) $.modal.open('魔方位', prefix2 + "/RubikArea?id=" + num,900,800, cancel)
// $.modal.openTab('魔方位', prefix2 + "/RubikArea?id=" + num) // $.modal.openTab('魔方位', prefix2 + "/RubikArea?id=" + num)
break; break;
case 7: case 7:
$.modal.open('精选商品', prefix2 + "/carefullyGoods?id=" + num) $.modal.open('精选商品', prefix2 + "/carefullyGoods?id=" + num,900,800, cancel)
// $.modal.openTab('精选商品', prefix2 + "/carefullyGoods?id=" + num) // $.modal.openTab('精选商品', prefix2 + "/carefullyGoods?id=" + num)
break; break;
} }
} }
function delSp (num) { function delSp (num) {
console.log($('.goods-banner-props'), '有吗') event.stopPropagation()
console.log($('.goods-banner-props'), '有吗2')
let arr = [ let arr = [
{"mid":2,"moudleIndexId":"708754120962334729770775","moudleName":"jinGangWei","indexs":2,"updateTime":"2022-01-11 17:40:03","createTime":"2022-01-06 13:53:45","delTag":0,"status":0}, {"mid":2,"moudleIndexId":"708754120962334729770775","moudleName":"jinGangWei","indexs":2,"updateTime":"2022-01-11 17:40:03","createTime":"2022-01-06 13:53:45","delTag":0,"status":0},
{"mid":1,"moudleIndexId":"708753099180072962244503","moudleName":"huDongBanner","indexs":1,"updateTime":"2022-01-06 13:52:22","createTime":"2022-01-06 13:52:19","delTag":0,"status":0}, {"mid":1,"moudleIndexId":"708753099180072962244503","moudleName":"huDongBanner","indexs":1,"updateTime":"2022-01-06 13:52:22","createTime":"2022-01-06 13:52:19","delTag":0,"status":0},
...@@ -245,12 +250,17 @@ ...@@ -245,12 +250,17 @@
$.ajax({ $.ajax({
type: 'post', type: 'post',
url: '/front-index/update', url: '/front-index/update',
contentType: 'application/json',
data: JSON.stringify(arr[num-1]), data: JSON.stringify(arr[num-1]),
success:function (res) { success:function (res) {
console.log(res, 'res') console.log(res, 'res')
modalPx();
} }
}) })
} }
function cancel () {
modalPx()
}
function git () { function git () {
$.ajax({ $.ajax({
type: 'post', type: 'post',
......
...@@ -168,6 +168,15 @@ ...@@ -168,6 +168,15 @@
} else { } else {
} }
promiseMethods('/front-index/list','post').then(res=>{
console.log(res, 'resp')
let { data } = res;
data.forEach(item => {
if (item.moudleName == "jinGangWei") {
$("#sorting").val(item.indexs)
}
})
})
showDetail (1) showDetail (1)
}) })
function showDetail (numType) { function showDetail (numType) {
...@@ -429,8 +438,7 @@ ...@@ -429,8 +438,7 @@
}).then((res)=> { }).then((res)=> {
layer.msg('保存成功!') layer.msg('保存成功!')
// $.modal.closeTab(); // $.modal.closeTab();
$.modal.close(); $.operate.successCallback(res);
refreshItem()
}) })
} }
function common (num) { function common (num) {
......
...@@ -184,7 +184,7 @@ ...@@ -184,7 +184,7 @@
console.log(data, 'data222') console.log(data, 'data222')
promiseMethods('/hotWord/updateOrCreate', 'post', JSON.stringify(data), 'application/json').then(res => { promiseMethods('/hotWord/updateOrCreate', 'post', JSON.stringify(data), 'application/json').then(res => {
layer.msg('创建成功!') layer.msg('创建成功!')
$.modal.close(); // $.modal.close();
$.operate.successCallback(res); $.operate.successCallback(res);
}) })
// refreshItem() // refreshItem()
......
...@@ -171,6 +171,15 @@ ...@@ -171,6 +171,15 @@
} else { } else {
} }
promiseMethods('/front-index/list','post').then(res=>{
console.log(res, 'resp')
let { data } = res;
data.forEach(item => {
if (item.moudleName == "huDongBanner") {
$("#sorting").val(item.indexs)
}
})
})
let name = 'id'; let name = 'id';
var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)"); var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg); var r = window.location.search.substr(1).match(reg);
...@@ -387,8 +396,7 @@ ...@@ -387,8 +396,7 @@
} }
}).then(res => { }).then(res => {
layer.msg("保存成功!") layer.msg("保存成功!")
$.modal.close(); $.operate.successCallback(res);
refreshItem()
}) })
} }
......
...@@ -102,7 +102,7 @@ public class GoblinStoreMgtCategoryController { ...@@ -102,7 +102,7 @@ public class GoblinStoreMgtCategoryController {
} else {// 存在则判断,是否为已存在的父级分类 } else {// 存在则判断,是否为已存在的父级分类
if (storeGoodsCategoryVosCache.stream().anyMatch(r -> r.getName().equals(catename))) { if (storeGoodsCategoryVosCache.stream().anyMatch(r -> r.getName().equals(catename))) {
log.warn("店铺商品分类管理:添加:分类名称重复[UID={},storeId={},catefid={},catesid={},catename={}]", currentUid, storeId, catefid, catesid, catename); log.warn("店铺商品分类管理:添加:分类名称重复[UID={},storeId={},catefid={},catesid={},catename={}]", currentUid, storeId, catefid, catesid, catename);
return ResponseDto.failure(ErrorMapping.get("149007")); return ResponseDto.failure(ErrorMapping.get("149008"));
} }
Map<String, GoblinStoreGoodsCategoryVo> existFilterMap = storeGoodsCategoryVosCache.stream().filter(r -> catePidList.contains(r.getCateId())) Map<String, GoblinStoreGoodsCategoryVo> existFilterMap = storeGoodsCategoryVosCache.stream().filter(r -> catePidList.contains(r.getCateId()))
......
package com.liquidnet.service.goblin.controller.manage; package com.liquidnet.service.goblin.controller.manage;
import com.fasterxml.jackson.databind.JsonNode;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.github.xiaoymin.knife4j.annotations.ApiSupport; import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import com.liquidnet.commons.lang.util.CurrentUtil; import com.liquidnet.commons.lang.util.CurrentUtil;
import com.liquidnet.commons.lang.util.IdentityUtils;
import com.liquidnet.commons.lang.util.JsonUtils; import com.liquidnet.commons.lang.util.JsonUtils;
import com.liquidnet.service.base.ErrorMapping; import com.liquidnet.service.base.ErrorMapping;
import com.liquidnet.service.base.ResponseDto; import com.liquidnet.service.base.ResponseDto;
...@@ -46,13 +48,24 @@ public class GoblinStoreMgtCertificationController { ...@@ -46,13 +48,24 @@ public class GoblinStoreMgtCertificationController {
@ApiOperation(value = "店铺认证第一步:认证资料") @ApiOperation(value = "店铺认证第一步:认证资料")
@PostMapping("fstep") @PostMapping("fstep")
public ResponseDto<String> certificationFirstStep(@Valid @RequestBody GoblinStoreMgtCertificationParam certificationParam) { public ResponseDto<String> certificationFirstStep(@Valid @RequestBody GoblinStoreMgtCertificationParam certificationParam) {
GoblinStoreInfoVo storeInfoVo = goblinRedisUtils.getStoreInfoVoByUid(CurrentUtil.getCurrentUid()); String currentUid = CurrentUtil.getCurrentUid();
GoblinStoreInfoVo storeInfoVo = goblinRedisUtils.getStoreInfoVoByUid(currentUid);
if (null != storeInfoVo && !ENABLE_CERT_STATUS.contains(storeInfoVo.getStatus())) { if (null != storeInfoVo && !ENABLE_CERT_STATUS.contains(storeInfoVo.getStatus())) {
log.warn("店铺认证:无效请求:店铺已认证,无需再次认证[UID={},storeId={},storeStatus={}]", CurrentUtil.getCurrentUid(), storeInfoVo.getStoreId(), storeInfoVo.getStatus()); log.warn("店铺认证:无效请求:店铺已认证,无需再次认证[UID={},storeId={},storeStatus={}]", currentUid, storeInfoVo.getStoreId(), storeInfoVo.getStatus());
return ResponseDto.failure(ErrorMapping.get("149001")); return ResponseDto.failure(ErrorMapping.get("149001"));
} }
if (log.isDebugEnabled()) { if (log.isDebugEnabled()) {
log.debug("店铺认证[GoblinStoreMgtCertificationParam:{}]", JsonUtils.toJson(certificationParam)); log.debug("店铺认证[UID={},GoblinStoreMgtCertificationParam:{}]", currentUid, JsonUtils.toJson(certificationParam));
}
if (certificationParam.getPersonCertType().equals("1")) {
String personName = certificationParam.getPersonName();
String personCertCode = certificationParam.getPersonCertCode();
String respStr = IdentityUtils.aliThird(personName, personCertCode);
JsonNode respJNode = JsonUtils.fromJson(respStr, JsonNode.class);
if (null == respJNode || !"0".equals(String.valueOf(respJNode.get("error_code")))) {
log.info("###实名认证失败[UID={},name={},idcard={},respStr={}]", currentUid, personName, personCertCode, respStr);
return ResponseDto.failure(ErrorMapping.get("149004"));
}
} }
storeInfoVo = goblinStoreMgtCertificationService.certificationInformationProcessing(certificationParam, storeInfoVo); storeInfoVo = goblinStoreMgtCertificationService.certificationInformationProcessing(certificationParam, storeInfoVo);
return ResponseDto.success(storeInfoVo.getStoreId()); return ResponseDto.success(storeInfoVo.getStoreId());
...@@ -62,17 +75,18 @@ public class GoblinStoreMgtCertificationController { ...@@ -62,17 +75,18 @@ public class GoblinStoreMgtCertificationController {
@ApiOperation(value = "店铺认证第二步:完善信息") @ApiOperation(value = "店铺认证第二步:完善信息")
@PostMapping("sstep") @PostMapping("sstep")
public ResponseDto<Object> certificationSecondStep(@Valid @RequestBody GoblinStoreMgtCompleteParam completeParam) { public ResponseDto<Object> certificationSecondStep(@Valid @RequestBody GoblinStoreMgtCompleteParam completeParam) {
GoblinStoreInfoVo storeInfoVo = goblinRedisUtils.getStoreInfoVoByUid(CurrentUtil.getCurrentUid()); String currentUid = CurrentUtil.getCurrentUid();
GoblinStoreInfoVo storeInfoVo = goblinRedisUtils.getStoreInfoVoByUid(currentUid);
if (null == storeInfoVo) { if (null == storeInfoVo) {
log.warn("店铺认证:完善信息:店铺信息不存在,请按流程完成第一步:[UID={}]", CurrentUtil.getCurrentUid()); log.warn("店铺认证:完善信息:店铺信息不存在,请按流程完成第一步:[UID={}]", currentUid);
return ResponseDto.failure(ErrorMapping.get("149001")); return ResponseDto.failure(ErrorMapping.get("149001"));
} }
if (!ENABLE_CERT_STATUS.contains(storeInfoVo.getStatus())) { if (!ENABLE_CERT_STATUS.contains(storeInfoVo.getStatus())) {
log.warn("店铺认证:无效请求:店铺已认证,无需再次认证[UID={},storeId={},storeStatus={}]", CurrentUtil.getCurrentUid(), storeInfoVo.getStoreId(), storeInfoVo.getStatus()); log.warn("店铺认证:无效请求:店铺已认证,无需再次认证[UID={},storeId={},storeStatus={}]", currentUid, storeInfoVo.getStoreId(), storeInfoVo.getStatus());
return ResponseDto.failure(ErrorMapping.get("149001")); return ResponseDto.failure(ErrorMapping.get("149001"));
} }
if (log.isDebugEnabled()) { if (log.isDebugEnabled()) {
log.debug("店铺认证[GoblinStoreMgtCompleteParam:{}]", JsonUtils.toJson(completeParam)); log.debug("店铺认证[UID={},GoblinStoreMgtCompleteParam:{}]", currentUid, JsonUtils.toJson(completeParam));
} }
return ResponseDto.success(goblinStoreMgtCertificationService.certificationCompleteProcessing(completeParam, storeInfoVo)); return ResponseDto.success(goblinStoreMgtCertificationService.certificationCompleteProcessing(completeParam, storeInfoVo));
} }
...@@ -103,6 +117,10 @@ public class GoblinStoreMgtCertificationController { ...@@ -103,6 +117,10 @@ public class GoblinStoreMgtCertificationController {
if (!goblinRedisUtils.hasStoreId(currentUid, storeId)) { if (!goblinRedisUtils.hasStoreId(currentUid, storeId)) {
return ResponseDto.failure(ErrorMapping.get("149002")); return ResponseDto.failure(ErrorMapping.get("149002"));
} }
GoblinStoreInfoVo storeInfoVo = goblinRedisUtils.getStoreInfoVo(storeId);
if (null == storeInfoVo || Arrays.asList("3","4","5").contains(storeInfoVo.getStatus())) {
return ResponseDto.success();// 店铺认证通过后不允许删除
}
log.info("删除店铺[UID={},storeId={}]", currentUid, storeId); log.info("删除店铺[UID={},storeId={}]", currentUid, storeId);
return ResponseDto.success(goblinStoreMgtCertificationService.certificationCancelProcessing(storeId, currentUid)); return ResponseDto.success(goblinStoreMgtCertificationService.certificationCancelProcessing(storeId, currentUid));
} }
......
...@@ -309,9 +309,10 @@ public class GoblinFrontServiceImpl implements GoblinFrontService { ...@@ -309,9 +309,10 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
} }
public GoblinStoreInfoVo getStore(String storId){ public GoblinStoreInfoVo getStore(String storId){
Query query = new Query(); Query query = new Query();
query.addCriteria(Criteria.where("storeId").is(storId)); query.addCriteria(Criteria.where("storeId").is(storId).and("spuAppear").is("0").and("delFlg").is("0").and("shelvesStatus").is("3"));
long count = mongoTemplate.count(query, GoblinGoodsInfoVo.class, GoblinGoodsInfoVo.class.getSimpleName()); long count = mongoTemplate.count(query, GoblinGoodsInfoVo.class, GoblinGoodsInfoVo.class.getSimpleName());
GoblinStoreInfoVo goblinStoreInfoVo=goblinRedisUtils.getStoreInfoVo(storId); GoblinStoreInfoVo goblinStoreInfoVo=goblinRedisUtils.getStoreInfoVo(storId);
//GoblinStoreNoticeVo goblinStoreNoticeVo=goblinRedisUtils.getStoreNoticeVo(storId,LocalDateTime.now());
goblinStoreInfoVo.setCount((int) count); goblinStoreInfoVo.setCount((int) count);
return goblinStoreInfoVo; return goblinStoreInfoVo;
} }
...@@ -357,7 +358,7 @@ public class GoblinFrontServiceImpl implements GoblinFrontService { ...@@ -357,7 +358,7 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
public List<GoblinGoodsInfoVo> searchGoodesName(String name){ public List<GoblinGoodsInfoVo> searchGoodesName(String name){
Pattern pattern = Pattern.compile("^.*"+name+".*$", Pattern.CASE_INSENSITIVE); Pattern pattern = Pattern.compile("^.*"+name+".*$", Pattern.CASE_INSENSITIVE);
Query query = new Query(); Query query = new Query();
query.addCriteria(Criteria.where("name").regex(pattern)); query.addCriteria(Criteria.where("name").regex(pattern).and("spuAppear").is("0").and("delFlg").is("0").and("shelvesStatus").is("3"));
query.with(Sort.by( query.with(Sort.by(
Sort.Order.desc("count"), Sort.Order.desc("count"),
Sort.Order.desc("createdAt") Sort.Order.desc("createdAt")
...@@ -389,7 +390,7 @@ public class GoblinFrontServiceImpl implements GoblinFrontService { ...@@ -389,7 +390,7 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
public GoblinFrontCategoryListVo getStoreGoodes(String storeId,String categoryId,String name){ public GoblinFrontCategoryListVo getStoreGoodes(String storeId,String categoryId,String name){
// //
Query query = new Query(); Query query = new Query();
query.addCriteria(Criteria.where("storeId").is(storeId)); query.addCriteria(Criteria.where("storeId").is(storeId).and("spuAppear").is("0").and("delFlg").is("0").and("shelvesStatus").is("3"));
if(StringUtil.isNotBlank(categoryId)){ if(StringUtil.isNotBlank(categoryId)){
query.addCriteria(new Criteria().orOperator( query.addCriteria(new Criteria().orOperator(
Criteria.where("storeCateFid").is(categoryId), Criteria.where("storeCateFid").is(categoryId),
...@@ -401,6 +402,7 @@ public class GoblinFrontServiceImpl implements GoblinFrontService { ...@@ -401,6 +402,7 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
Pattern pattern = Pattern.compile("^.*"+name+".*$", Pattern.CASE_INSENSITIVE); Pattern pattern = Pattern.compile("^.*"+name+".*$", Pattern.CASE_INSENSITIVE);
query.addCriteria(Criteria.where("name").regex(pattern)); query.addCriteria(Criteria.where("name").regex(pattern));
} }
query.with(Sort.by(Sort.Direction.DESC, "count"));
// 查询总数 // 查询总数
List<GoblinGoodsInfoVo> list = mongoTemplate.find(query, GoblinGoodsInfoVo.class, GoblinGoodsInfoVo.class.getSimpleName()); List<GoblinGoodsInfoVo> list = mongoTemplate.find(query, GoblinGoodsInfoVo.class, GoblinGoodsInfoVo.class.getSimpleName());
if(list.size()>0){ if(list.size()>0){
...@@ -430,13 +432,13 @@ public class GoblinFrontServiceImpl implements GoblinFrontService { ...@@ -430,13 +432,13 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
// //
Query query = new Query(); Query query = new Query();
query.addCriteria(new Criteria().orOperator( query.addCriteria(new Criteria().orOperator(
Criteria.where("extagVoList.tagId").is(tagId) Criteria.where("extagVoList.tagId").is(tagId).and("spuAppear").is("0").and("delFlg").is("0").and("shelvesStatus").is("3")
)); ));
Pageable pageable=null; Pageable pageable=null;
// //
boolean isRe=false; boolean isRe=false;
if(type.equals("1")){ if(type.equals("1")){
isRe=true; pageable = PageRequest.of(page, pageSize, Sort.by(Sort.Direction.DESC, "count"));
}else if(type.equals("2")){ }else if(type.equals("2")){
pageable = PageRequest.of(page, pageSize, Sort.by(Sort.Direction.DESC, "shelvesAt")); pageable = PageRequest.of(page, pageSize, Sort.by(Sort.Direction.DESC, "shelvesAt"));
}else if(type.equals("3")){ }else if(type.equals("3")){
...@@ -449,11 +451,9 @@ public class GoblinFrontServiceImpl implements GoblinFrontService { ...@@ -449,11 +451,9 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
// 查询总数 // 查询总数
long count = mongoTemplate.count(query, GoblinGoodsInfoVo.class, GoblinGoodsInfoVo.class.getSimpleName()); long count = mongoTemplate.count(query, GoblinGoodsInfoVo.class, GoblinGoodsInfoVo.class.getSimpleName());
if(!isRe){ query.with(pageable);
query.with(pageable);
}
List<GoblinGoodsInfoVo> list = mongoTemplate.find(query, GoblinGoodsInfoVo.class, GoblinGoodsInfoVo.class.getSimpleName()); List<GoblinGoodsInfoVo> list = mongoTemplate.find(query, GoblinGoodsInfoVo.class, GoblinGoodsInfoVo.class.getSimpleName());
if(list.size()>0&&isRe){ /*if(list.size()>0&&isRe){
//找到 销量 //找到 销量
for(GoblinGoodsInfoVo goblinGoodsInfoVo:list){ for(GoblinGoodsInfoVo goblinGoodsInfoVo:list){
Integer counts=goblinRedisUtils.getSpuSaleCount(goblinGoodsInfoVo.getSpuId()); Integer counts=goblinRedisUtils.getSpuSaleCount(goblinGoodsInfoVo.getSpuId());
...@@ -467,7 +467,7 @@ public class GoblinFrontServiceImpl implements GoblinFrontService { ...@@ -467,7 +467,7 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
public int compare(GoblinGoodsInfoVo arg0, GoblinGoodsInfoVo arg1) { public int compare(GoblinGoodsInfoVo arg0, GoblinGoodsInfoVo arg1) {
return -(arg0.getCount().compareTo(arg1.getCount())); return -(arg0.getCount().compareTo(arg1.getCount()));
}}); }});
} }*/
GoblinFrontCategoryListVo goblinFrontCategoryListVo=GoblinFrontCategoryListVo.getNew(); GoblinFrontCategoryListVo goblinFrontCategoryListVo=GoblinFrontCategoryListVo.getNew();
goblinFrontCategoryListVo.setCount(count); goblinFrontCategoryListVo.setCount(count);
goblinFrontCategoryListVo.setSpuList(list); goblinFrontCategoryListVo.setSpuList(list);
...@@ -485,11 +485,11 @@ public class GoblinFrontServiceImpl implements GoblinFrontService { ...@@ -485,11 +485,11 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
Criteria.where("cateSid").is(categoryId), Criteria.where("cateSid").is(categoryId),
Criteria.where("cateTid").is(categoryId) Criteria.where("cateTid").is(categoryId)
)); ));
query.addCriteria(Criteria.where("spuAppear").is("0").and("delFlg").is("0").and("shelvesStatus").is("3"));
Pageable pageable=null; Pageable pageable=null;
// //
boolean isRe=false;
if(type.equals("1")){ if(type.equals("1")){
isRe=true; pageable = PageRequest.of(page, pageSize, Sort.by(Sort.Direction.DESC, "count"));
}else if(type.equals("2")){ }else if(type.equals("2")){
pageable = PageRequest.of(page, pageSize, Sort.by(Sort.Direction.DESC, "shelvesAt")); pageable = PageRequest.of(page, pageSize, Sort.by(Sort.Direction.DESC, "shelvesAt"));
}else if(type.equals("3")){ }else if(type.equals("3")){
...@@ -502,11 +502,9 @@ public class GoblinFrontServiceImpl implements GoblinFrontService { ...@@ -502,11 +502,9 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
// 查询总数 // 查询总数
long count = mongoTemplate.count(query, GoblinGoodsInfoVo.class, GoblinGoodsInfoVo.class.getSimpleName()); long count = mongoTemplate.count(query, GoblinGoodsInfoVo.class, GoblinGoodsInfoVo.class.getSimpleName());
if(!isRe){ query.with(pageable);
query.with(pageable);
}
List<GoblinGoodsInfoVo> list = mongoTemplate.find(query, GoblinGoodsInfoVo.class, GoblinGoodsInfoVo.class.getSimpleName()); List<GoblinGoodsInfoVo> list = mongoTemplate.find(query, GoblinGoodsInfoVo.class, GoblinGoodsInfoVo.class.getSimpleName());
if(list.size()>0&&isRe){ /* if(list.size()>0&&isRe){
//找到 销量 //找到 销量
for(GoblinGoodsInfoVo goblinGoodsInfoVo:list){ for(GoblinGoodsInfoVo goblinGoodsInfoVo:list){
Integer counts=goblinRedisUtils.getSpuSaleCount(goblinGoodsInfoVo.getSpuId()); Integer counts=goblinRedisUtils.getSpuSaleCount(goblinGoodsInfoVo.getSpuId());
...@@ -520,7 +518,7 @@ public class GoblinFrontServiceImpl implements GoblinFrontService { ...@@ -520,7 +518,7 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
public int compare(GoblinGoodsInfoVo arg0, GoblinGoodsInfoVo arg1) { public int compare(GoblinGoodsInfoVo arg0, GoblinGoodsInfoVo arg1) {
return -(arg0.getCount().compareTo(arg1.getCount())); return -(arg0.getCount().compareTo(arg1.getCount()));
}}); }});
} }*/
GoblinFrontCategoryListVo goblinFrontCategoryListVo=GoblinFrontCategoryListVo.getNew(); GoblinFrontCategoryListVo goblinFrontCategoryListVo=GoblinFrontCategoryListVo.getNew();
goblinFrontCategoryListVo.setCount(count); goblinFrontCategoryListVo.setCount(count);
goblinFrontCategoryListVo.setSpuList(list); goblinFrontCategoryListVo.setSpuList(list);
...@@ -536,7 +534,7 @@ public class GoblinFrontServiceImpl implements GoblinFrontService { ...@@ -536,7 +534,7 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
if(StringUtil.isNotBlank(spuids)){ if(StringUtil.isNotBlank(spuids)){
query.addCriteria(Criteria.where("spuId").nin(spuids.split(","))); query.addCriteria(Criteria.where("spuId").nin(spuids.split(",")));
} }
query.addCriteria(Criteria.where("delFlg").is("0").and("shelvesStatus").is("3")); query.addCriteria(Criteria.where("delFlg").is("0").and("shelvesStatus").is("3").and("spuAppear").is("0"));
//redis里面获取排序规则 1、上架时间2、销量3、价格高到低4、价格低到高 //redis里面获取排序规则 1、上架时间2、销量3、价格高到低4、价格低到高
int sortType=0; int sortType=0;
......
...@@ -54,8 +54,6 @@ public class GoblinStoreMgtCertificationServiceImpl implements IGoblinStoreMgtCe ...@@ -54,8 +54,6 @@ public class GoblinStoreMgtCertificationServiceImpl implements IGoblinStoreMgtCe
goblinMongoUtils.setStoreInfoVo(storeInfoVo); goblinMongoUtils.setStoreInfoVo(storeInfoVo);
goblinRedisUtils.addStoreId(uid, storeInfoVo.getStoreId()); goblinRedisUtils.addStoreId(uid, storeInfoVo.getStoreId());
// TODO: 2022/1/6 zhanggb redis
// goblinRedisUtils.setStoreInfoVo(storeInfoVo);
LinkedList<String> toMqSqls = CollectionUtil.linkedListString(); LinkedList<String> toMqSqls = CollectionUtil.linkedListString();
LinkedList<Object[]> initStoreInfoObjs = CollectionUtil.linkedListObjectArr(); LinkedList<Object[]> initStoreInfoObjs = CollectionUtil.linkedListObjectArr();
...@@ -89,9 +87,6 @@ public class GoblinStoreMgtCertificationServiceImpl implements IGoblinStoreMgtCe ...@@ -89,9 +87,6 @@ public class GoblinStoreMgtCertificationServiceImpl implements IGoblinStoreMgtCe
storeInfoVo.setCertificationVo(storeCertificationVo); storeInfoVo.setCertificationVo(storeCertificationVo);
if (goblinMongoUtils.updateStoreInfoVo(storeInfoVo)) { if (goblinMongoUtils.updateStoreInfoVo(storeInfoVo)) {
// TODO: 2022/1/6 zhanggb redis
// goblinRedisUtils.setStoreInfoVo(storeInfoVo);
LinkedList<String> toMqSqls = CollectionUtil.linkedListString(); LinkedList<String> toMqSqls = CollectionUtil.linkedListString();
LinkedList<Object[]> updateStoreInfoObjs = CollectionUtil.linkedListObjectArr(); LinkedList<Object[]> updateStoreInfoObjs = CollectionUtil.linkedListObjectArr();
toMqSqls.add(SqlMapping.get("goblin_store_info.update_by_cert1")); toMqSqls.add(SqlMapping.get("goblin_store_info.update_by_cert1"));
...@@ -124,8 +119,6 @@ public class GoblinStoreMgtCertificationServiceImpl implements IGoblinStoreMgtCe ...@@ -124,8 +119,6 @@ public class GoblinStoreMgtCertificationServiceImpl implements IGoblinStoreMgtCe
storeInfoVo.setUpdatedAt(LocalDateTime.now()); storeInfoVo.setUpdatedAt(LocalDateTime.now());
storeInfoVo.setUpdatedBy(CurrentUtil.getCurrentUid()); storeInfoVo.setUpdatedBy(CurrentUtil.getCurrentUid());
if (goblinMongoUtils.updateStoreInfoVo(param.completeStoreInfoVo(storeInfoVo))) { if (goblinMongoUtils.updateStoreInfoVo(param.completeStoreInfoVo(storeInfoVo))) {
// TODO: 2022/1/6 zhanggb redis
// LinkedList<String> toMqSqls = CollectionUtil.linkedListString(); // LinkedList<String> toMqSqls = CollectionUtil.linkedListString();
// LinkedList<Object[]> updateStoreInfoObjs = CollectionUtil.linkedListObjectArr(); // LinkedList<Object[]> updateStoreInfoObjs = CollectionUtil.linkedListObjectArr();
// toMqSqls.add(SqlMapping.get("goblin_store_info.update_by_cert2")); // toMqSqls.add(SqlMapping.get("goblin_store_info.update_by_cert2"));
......
...@@ -13,7 +13,7 @@ import org.springframework.util.CollectionUtils; ...@@ -13,7 +13,7 @@ import org.springframework.util.CollectionUtils;
import java.util.List; import java.util.List;
@Service @Service
public class GoblinStoreMgtExtraImpl implements IGoblinStoreMgtExtraService { public class GoblinStoreMgtExtraServiceImpl implements IGoblinStoreMgtExtraService {
@Autowired @Autowired
private GoblinRedisUtils goblinRedisUtils; private GoblinRedisUtils goblinRedisUtils;
@Autowired @Autowired
......
...@@ -66,19 +66,41 @@ public class GoblinStoreMgtServiceImpl implements IGoblinStoreMgtService { ...@@ -66,19 +66,41 @@ public class GoblinStoreMgtServiceImpl implements IGoblinStoreMgtService {
} }
} }
if (!CollectionUtils.isEmpty(updateStoreConfigVoList) && goblinMongoUtils.updateStoreConfigVos(updateStoreConfigVoList)) { if (!CollectionUtils.isEmpty(updateStoreConfigVoList) && goblinMongoUtils.updateStoreConfigVos(updateStoreConfigVoList)) {
// goblinRedisUtils.setStoreConfigVos(storeId, storeConfigVos);// TODO: 2022/1/17 zhanggb== // goblinRedisUtils.setStoreConfigVos(storeId, storeConfigVos);// TODO: 2022/1/17 zhanggb==redis
LinkedList<Object[]> updateStoreInfoObjs = CollectionUtil.linkedListObjectArr();
LinkedList<Object[]> updateGoodsInfoObjs = CollectionUtil.linkedListObjectArr();
if (toUpdateStoreStatusFlg) { if (toUpdateStoreStatusFlg) {
GoblinStoreInfoVo storeInfoVo = goblinRedisUtils.getStoreInfoVo(storeId); String status = confMap.get(GoblinStoreConf.BUSINESS_STATUS.name());
storeInfoVo.setStatus(confMap.get(GoblinStoreConf.BUSINESS_STATUS.name()));
goblinMongoUtils.updateStoreInfoVo(storeInfoVo); GoblinStoreInfoVo updateStoreInfoVo = goblinRedisUtils.getStoreInfoVo(storeId);
// goblinRedisUtils.setStoreInfoVo(storeInfoVo);// TODO: 2022/1/17 zhanggb== updateStoreInfoVo.setStatus(status);
updateStoreInfoVo.setUpdatedBy(uid);
updateStoreInfoVo.setUpdatedAt(now);
goblinMongoUtils.updateStoreInfoVo(updateStoreInfoVo);
// goblinRedisUtils.setStoreInfoVo(updateStoreInfoVo);// TODO: 2022/1/17 zhanggb==redis
goblinMongoUtils.updateGoodsInfoVoAppear(storeId, status, now, uid);
List<String> spuIdList = goblinMongoUtils.getMgtGoodsSpuIds(storeId);
spuIdList.forEach(spuId -> goblinRedisUtils.delGoodsInfoVo(spuId));
updateStoreInfoObjs.add(new Object[]{updateStoreInfoVo.getStatus(), uid, now, storeId});
updateGoodsInfoObjs.add(new Object[]{status, uid, now, storeId});
} }
LinkedList<String> toMqSqls = CollectionUtil.linkedListString();
toMqSqls.add(SqlMapping.get("goblin_store_config.update"));
LinkedList<Object[]> updateStoreConfigVoObjs = CollectionUtil.linkedListObjectArr(); LinkedList<Object[]> updateStoreConfigVoObjs = CollectionUtil.linkedListObjectArr();
updateStoreConfigVoList.forEach(uc -> updateStoreConfigVoObjs.add(new Object[]{uc.getConfigVal(), uc.getUpdatedBy(), uc.getUpdatedAt(), uc.getStoreId(), uc.getConfigKey()})); updateStoreConfigVoList.forEach(uc -> updateStoreConfigVoObjs.add(new Object[]{
uc.getConfigVal(), uc.getUpdatedBy(), uc.getUpdatedAt(), uc.getStoreId(), uc.getConfigKey()}));
toMqSqls.add(SqlMapping.get("goblin_store_info.update_by_setting"));
// LinkedList<Object[]> updateStoreInfoObjs = CollectionUtil.linkedListObjectArr();
toMqSqls.add(SqlMapping.get("goblin_goods.update_by_status"));
// LinkedList<Object[]> updateGoodsInfoObjs = CollectionUtil.linkedListObjectArr();
queueUtils.sendMsgByRedis(MQConst.GoblinQueue.SQL_STORE.getKey(), queueUtils.sendMsgByRedis(MQConst.GoblinQueue.SQL_STORE.getKey(),
SqlMapping.get("goblin_store_config.update", updateStoreConfigVoObjs)); SqlMapping.gets(toMqSqls, updateStoreConfigVoObjs, updateStoreInfoObjs, updateGoodsInfoObjs));
return true; return true;
} }
return false; return false;
......
...@@ -295,14 +295,14 @@ public class GoblinMongoUtils { ...@@ -295,14 +295,14 @@ public class GoblinMongoUtils {
public boolean delGoodsInfoVoBySpuIds(String storeId, List<String> spuIdList, String uid, LocalDateTime time) { public boolean delGoodsInfoVoBySpuIds(String storeId, List<String> spuIdList, String uid, LocalDateTime time) {
return mongoTemplate.updateMulti( return mongoTemplate.updateMulti(
Query.query(Criteria.where("store_id").is(storeId).and("spuId").in(spuIdList.toArray()).and("delFlg").is("0")), Query.query(Criteria.where("storeId").is(storeId).and("spuId").in(spuIdList.toArray()).and("delFlg").is("0")),
Update.update("delFlg", 1).set("updatedBy", uid).set("updatedAt", time).set("deletedBy", uid).set("deletedAt", time), Update.update("delFlg", 1).set("updatedBy", uid).set("updatedAt", time).set("deletedBy", uid).set("deletedAt", time),
GoblinGoodsInfoVo.class.getSimpleName() GoblinGoodsInfoVo.class.getSimpleName()
).getModifiedCount() > 0; ).getModifiedCount() > 0;
} }
public List<String> delGoodsInfoVoByStoreId(String storeId, String uid, LocalDateTime time) { public List<String> delGoodsInfoVoByStoreId(String storeId, String uid, LocalDateTime time) {
Query query = Query.query(Criteria.where("storeId").is(storeId).and("delFlg").is("0").and("shelves_status").is("3")); Query query = Query.query(Criteria.where("storeId").is(storeId).and("delFlg").is("0").and("shelvesStatus").is("3"));
query.fields().include("spuId"); query.fields().include("spuId");
List<GoblinGoodsInfoVo> storeSpus = mongoTemplate.find(query, GoblinGoodsInfoVo.class, GoblinGoodsInfoVo.class.getSimpleName()); List<GoblinGoodsInfoVo> storeSpus = mongoTemplate.find(query, GoblinGoodsInfoVo.class, GoblinGoodsInfoVo.class.getSimpleName());
...@@ -320,7 +320,7 @@ public class GoblinMongoUtils { ...@@ -320,7 +320,7 @@ public class GoblinMongoUtils {
} }
// SPU分页 // SPU分页
public PagedResult<GoblinStoreMgtGoodsListVo> getGoodsInfoVo(GoblinStoreMgtGoodsFilterParam filterParam) { public PagedResult<GoblinStoreMgtGoodsListVo> getMgtGoodsInfoVos(GoblinStoreMgtGoodsFilterParam filterParam) {
Criteria criteria = Criteria.where("delFlg").is("0").and("storeId").is(filterParam.getStoreId()).and("marketId").exists(false); Criteria criteria = Criteria.where("delFlg").is("0").and("storeId").is(filterParam.getStoreId()).and("marketId").exists(false);
if (StringUtils.isNotBlank(filterParam.getKeyword())) { if (StringUtils.isNotBlank(filterParam.getKeyword())) {
Pattern pattern = Pattern.compile("^.*" + filterParam.getKeyword() + ".*$", Pattern.CASE_INSENSITIVE); Pattern pattern = Pattern.compile("^.*" + filterParam.getKeyword() + ".*$", Pattern.CASE_INSENSITIVE);
...@@ -368,9 +368,27 @@ public class GoblinMongoUtils { ...@@ -368,9 +368,27 @@ public class GoblinMongoUtils {
return pagedResult.setList(goodsListVos).setTotal(count, filterParam.getPageSize()); return pagedResult.setList(goodsListVos).setTotal(count, filterParam.getPageSize());
} }
// SPU信息
public List<String> getMgtGoodsSpuIds(String storeId) {
Query query = Query.query(Criteria.where("storeId").is(storeId).and("delFlg").is("0"));
query.fields().include("spuId");
List<GoblinGoodsInfoVo> vos = mongoTemplate.find(query, GoblinGoodsInfoVo.class, GoblinGoodsInfoVo.class.getSimpleName());
return CollectionUtils.isEmpty(vos) ? CollectionUtil.arrayListString()
: vos.stream().map(GoblinGoodsInfoVo::getSpuId).collect(Collectors.toList());
}
// SKU信息
public List<String> getMgtGoodsSkuIds(String storeId, List<String> spuIdList) {
Query query = Query.query(Criteria.where("storeId").is(storeId).and("delFlg").is("0").and("spuId").in(spuIdList.toArray()));
query.fields().include("skuId");
List<GoblinGoodsSkuInfoVo> vos = mongoTemplate.find(query, GoblinGoodsSkuInfoVo.class, GoblinGoodsSkuInfoVo.class.getSimpleName());
return CollectionUtils.isEmpty(vos) ? CollectionUtil.arrayListString()
: vos.stream().map(GoblinGoodsSkuInfoVo::getSkuId).collect(Collectors.toList());
}
// SPU信息 // SPU信息
public GoblinGoodsInfoVo getGoodsInfoVo(String spuId) { public GoblinGoodsInfoVo getGoodsInfoVo(String spuId) {
return mongoTemplate.findOne(Query.query(Criteria.where("spuId").is(spuId).and("delFlg").is("0").and("shelvesStatus").is("3")), return mongoTemplate.findOne(Query.query(Criteria.where("spuId").is(spuId).and("delFlg").is("0").and("shelvesStatus").is("3").and("spuAppear").is("0")),
GoblinGoodsInfoVo.class, GoblinGoodsInfoVo.class.getSimpleName()); GoblinGoodsInfoVo.class, GoblinGoodsInfoVo.class.getSimpleName());
} }
...@@ -380,15 +398,28 @@ public class GoblinMongoUtils { ...@@ -380,15 +398,28 @@ public class GoblinMongoUtils {
GoblinGoodsInfoVo.class, GoblinGoodsInfoVo.class.getSimpleName()); GoblinGoodsInfoVo.class, GoblinGoodsInfoVo.class.getSimpleName());
} }
// SPU信息
public GoblinGoodsInfoVo getMgtGoodsInfoVo(String storeId, String name) {
return mongoTemplate.findOne(Query.query(Criteria.where("name").is(name).and("delFlg").is("0")),
GoblinGoodsInfoVo.class, GoblinGoodsInfoVo.class.getSimpleName());
}
// SPU信息 // SPU信息
public boolean updateGoodsInfoVo(GoblinGoodsInfoVo vo) { public boolean updateGoodsInfoVo(GoblinGoodsInfoVo vo) {
return mongoTemplate.getCollection(GoblinGoodsInfoVo.class.getSimpleName()) return mongoTemplate.getCollection(GoblinGoodsInfoVo.class.getSimpleName()).updateOne(
.updateOne(
Query.query(Criteria.where("spuId").is(vo.getSpuId()).and("delFlg").is("0")).getQueryObject(), Query.query(Criteria.where("spuId").is(vo.getSpuId()).and("delFlg").is("0")).getQueryObject(),
ObjectUtil.cloneBasicDBObject().append("$set", mongoConverter.convertToMongoType(vo)) ObjectUtil.cloneBasicDBObject().append("$set", mongoConverter.convertToMongoType(vo))
).getModifiedCount() > 0; ).getModifiedCount() > 0;
} }
// SPU信息
public boolean updateGoodsInfoVoAppear(String storeId, String spuAppear, LocalDateTime time, String uid) {
return mongoTemplate.getCollection(GoblinGoodsInfoVo.class.getSimpleName()).updateOne(
Query.query(Criteria.where("storeId").is(storeId).and("delFlg").is("0")).getQueryObject(),
Update.update("spuAppear", spuAppear).set("updatedBy", uid).set("updatedAt", time).getUpdateObject()
).getModifiedCount() > 0;
}
public boolean updateGoodsInfoVoByShelves(String storeId, List<String> spuIdList, boolean shelvesFlg, String uid, LocalDateTime time) { public boolean updateGoodsInfoVoByShelves(String storeId, List<String> spuIdList, boolean shelvesFlg, String uid, LocalDateTime time) {
return mongoTemplate.updateMulti(Query.query(Criteria.where("storeId").is(storeId).and("spuId").in(spuIdList.toArray())), return mongoTemplate.updateMulti(Query.query(Criteria.where("storeId").is(storeId).and("spuId").in(spuIdList.toArray())),
Update.update("shelvesStatus", shelvesFlg ? "3" : "1").set("shelvesAt", time).set("updatedBy", uid).set("updatedAt", time), Update.update("shelvesStatus", shelvesFlg ? "3" : "1").set("shelvesAt", time).set("updatedBy", uid).set("updatedAt", time),
...@@ -405,13 +436,16 @@ public class GoblinMongoUtils { ...@@ -405,13 +436,16 @@ public class GoblinMongoUtils {
return (List<GoblinGoodsSkuInfoVo>) mongoTemplate.insert(vos, GoblinGoodsSkuInfoVo.class.getSimpleName()); return (List<GoblinGoodsSkuInfoVo>) mongoTemplate.insert(vos, GoblinGoodsSkuInfoVo.class.getSimpleName());
} }
public boolean delGoodsSkuInfoVo(String skuId) { public boolean delGoodsSkuInfoVo(GoblinGoodsSkuInfoVo vo) {
return mongoTemplate.remove(Query.query(Criteria.where("skuId").is(skuId).and("delFlg").is("0")), return mongoTemplate.getCollection(GoblinGoodsSkuInfoVo.class.getSimpleName()).updateOne(
GoblinGoodsSkuInfoVo.class, GoblinGoodsSkuInfoVo.class.getSimpleName()).getDeletedCount() > 0; Query.query(Criteria.where("skuId").is(vo.getSkuId()).and("delFlg").is("0")).getQueryObject(),
Update.update("updatedBy", vo.getUpdatedBy()).set("updatedAt", vo.getUpdatedAt())
.set("deletedBy", vo.getDeletedBy()).set("deletedAt", vo.getDeletedAt()).getUpdateObject()
).getModifiedCount() > 0;
} }
public List<String> delGoodsSkuInfoVoByStoreId(String storeId, String uid, LocalDateTime time) { public List<String> delGoodsSkuInfoVoByStoreId(String storeId, String uid, LocalDateTime time) {
Query query = Query.query(Criteria.where("storeId").is(storeId).and("delFlg").is("0").and("shelves_status").is("3")); Query query = Query.query(Criteria.where("storeId").is(storeId).and("delFlg").is("0").and("shelvesStatus").is("3"));
query.fields().include("skuId"); query.fields().include("skuId");
List<GoblinGoodsSkuInfoVo> storeSkus = mongoTemplate.find(query, GoblinGoodsSkuInfoVo.class, GoblinGoodsSkuInfoVo.class.getSimpleName()); List<GoblinGoodsSkuInfoVo> storeSkus = mongoTemplate.find(query, GoblinGoodsSkuInfoVo.class, GoblinGoodsSkuInfoVo.class.getSimpleName());
......
...@@ -784,4 +784,9 @@ public class GoblinRedisUtils { ...@@ -784,4 +784,9 @@ public class GoblinRedisUtils {
list.add(backOrderId); list.add(backOrderId);
redisUtil.set(redisKey, list); redisUtil.set(redisKey, list);
} }
//商品上架、下架、删除 调用的方法
public void deleteKeyForSelectGoods(){
redisUtil.del(GoblinRedisConst.SELECT_GOODS_SPUIDS);
redisUtil.del(GoblinRedisConst.SELECT_GOODS_PAGE1);
}
} }
...@@ -18,11 +18,11 @@ ...@@ -18,11 +18,11 @@
149001=无效操作 149001=无效操作
149002=无权操作该店铺,请核实 149002=无权操作该店铺,请核实
149003=处理失败,请联系客服 149003=处理失败,请联系客服
149004= 149004=身份认证失败,请核实
149005= 149005=
149006=添加商品失败,规格信息无效 149006=添加商品失败,规格信息无效
149007=商品分类名称重复,请核实 149007=添加商品失败,商品名称重复
149008= 149008=商品分类名称重复,请核实
149009= 149009=
149010=商品不存在,请核实 149010=商品不存在,请核实
149011=SKU不存在,请核实 149011=SKU不存在,请核实
......
...@@ -4,6 +4,7 @@ goblin_store_info.update_by_cert1=UPDATE goblin_store_info SET store_type=?,cert ...@@ -4,6 +4,7 @@ goblin_store_info.update_by_cert1=UPDATE goblin_store_info SET store_type=?,cert
goblin_store_info.update_by_cert2=UPDATE goblin_store_info SET store_name=?,logo_pic=?,background_pic=?,introduce=?,status=?,store_type=?,updated_by=?,updated_at=? WHERE store_id=? goblin_store_info.update_by_cert2=UPDATE goblin_store_info SET store_name=?,logo_pic=?,background_pic=?,introduce=?,status=?,store_type=?,updated_by=?,updated_at=? WHERE store_id=?
goblin_store_info.update_by_del=UPDATE goblin_store_info SET del_flg=1,updated_by=?,updated_at=? WHERE store_id=? goblin_store_info.update_by_del=UPDATE goblin_store_info SET del_flg=1,updated_by=?,updated_at=? WHERE store_id=?
goblin_store_info.update_by_edit=UPDATE goblin_store_info SET store_name=?,logo_pic=?,background_pic=?,introduce=?,updated_by=?,updated_at=? WHERE store_id=? goblin_store_info.update_by_edit=UPDATE goblin_store_info SET store_name=?,logo_pic=?,background_pic=?,introduce=?,updated_by=?,updated_at=? WHERE store_id=?
goblin_store_info.update_by_setting=UPDATE goblin_store_info SET status=?,updated_by=?,updated_at=? WHERE store_id=? AND del_flg='0'
goblin_store_certification.insert_by_cert=INSERT INTO goblin_store_certification (store_id,person_cert_type,person_name,person_cert_code,person_cert_validity,person_cert_lasting,person_cert_fpic,person_cert_bpic,person_cert_spic,province_id,province_name,city_id,city_name,county_id,county_name,bus_address,bus_name,bus_cert_code,bus_cert_validity,bus_cert_lasting,bus_cert_pic,bus_quality_pic,created_by,created_at) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) goblin_store_certification.insert_by_cert=INSERT INTO goblin_store_certification (store_id,person_cert_type,person_name,person_cert_code,person_cert_validity,person_cert_lasting,person_cert_fpic,person_cert_bpic,person_cert_spic,province_id,province_name,city_id,city_name,county_id,county_name,bus_address,bus_name,bus_cert_code,bus_cert_validity,bus_cert_lasting,bus_cert_pic,bus_quality_pic,created_by,created_at) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
goblin_store_certification.update_by_cert=UPDATE goblin_store_certification SET person_cert_type=?,person_name=?,person_cert_code=?,person_cert_validity=?,person_cert_lasting=?,person_cert_fpic=?,person_cert_bpic=?,person_cert_spic=?,province_id=?,province_name=?,city_id=?,city_name=?,county_id=?,county_name=?,bus_address=?,bus_name=?,bus_cert_code=?,bus_cert_validity=?,bus_cert_lasting=?,bus_cert_pic=?,bus_quality_pic=?,updated_by=?,updated_at=? WHERE store_id=? goblin_store_certification.update_by_cert=UPDATE goblin_store_certification SET person_cert_type=?,person_name=?,person_cert_code=?,person_cert_validity=?,person_cert_lasting=?,person_cert_fpic=?,person_cert_bpic=?,person_cert_spic=?,province_id=?,province_name=?,city_id=?,city_name=?,county_id=?,county_name=?,bus_address=?,bus_name=?,bus_cert_code=?,bus_cert_validity=?,bus_cert_lasting=?,bus_cert_pic=?,bus_quality_pic=?,updated_by=?,updated_at=? WHERE store_id=?
...@@ -27,17 +28,28 @@ goblin_goods_spec.insert_by_ignore=INSERT IGNORE INTO goblin_goods_spec (spec_na ...@@ -27,17 +28,28 @@ goblin_goods_spec.insert_by_ignore=INSERT IGNORE INTO goblin_goods_spec (spec_na
goblin_goods_spec_value.insert_by_ignore=INSERT IGNORE INTO goblin_goods_spec_value (spec_name,spec_vname,created_by,created_at)VALUES(?,?,'-',?) goblin_goods_spec_value.insert_by_ignore=INSERT IGNORE INTO goblin_goods_spec_value (spec_name,spec_vname,created_by,created_at)VALUES(?,?,'-',?)
#---- 商品关联规格信息 #---- 商品关联规格信息
goblin_goods_spu_spec_value.insert_by_ignore=INSERT IGNORE INTO goblin_goods_spu_spec_value (spu_id,spec_name,spec_vname,sort)VALUES(?,?,?,?) goblin_goods_spu_spec_value.insert_by_ignore=INSERT IGNORE INTO goblin_goods_spu_spec_value (spu_id,spec_name,spec_vname,sort)VALUES(?,?,?,?)
goblin_goods_spu_spec_value.update_by_editdel=UPDATE goblin_goods_spu_spec_value SET del_flg='1' WHERE spu_id=? AND spec_name=? AND spec_vname=? AND del_flg='0'
goblin_goods_spu_spec_value.update_by_edit=UPDATE goblin_goods_spu_spec_value SET sort=? WHERE spu_id=? AND spec_name=? AND spec_vname=? AND del_flg='0'
goblin_goods_spu_spec_value.update_by_del_sku1=UPDATE goblin_goods_spu_spec_value SET del_flg='1' WHERE spu_id=? AND spec_name=? AND spec_vname=?
goblin_goods_spu_spec_value.update_by_del_sku2=UPDATE goblin_goods_spu_spec_value SET sort=? WHERE spu_id=? AND spec_name=? AND spec_vname=?
goblin_goods_sku_spec_value.insert_by_ignore=INSERT IGNORE INTO goblin_goods_sku_spec_value (spu_id,sku_id,spec_name,spec_vname)VALUES(?,?,?,?) goblin_goods_sku_spec_value.insert_by_ignore=INSERT IGNORE INTO goblin_goods_sku_spec_value (spu_id,sku_id,spec_name,spec_vname)VALUES(?,?,?,?)
goblin_goods_sku_spec_value.update_by_edit=UPDATE goblin_goods_sku_spec_value SET spec_vname=? WHERE sku_id=? AND spec_name=? AND del_flg='0'
goblin_goods_sku_spec_value.update_by_del=UPDATE goblin_goods_sku_spec_value SET del_flg='1' WHERE sku_id=? AND del_flg='0'
#---- 商品信息 #---- 商品信息
goblin_goods.insert=INSERT INTO goblin_goods (spu_id,spu_no,name,subtitle,sell_price, price_ge,price_le,intro,details,cover_pic, video,spec_mode,store_id,cate_fid,cate_sid, cate_tid,store_cate_fid,store_cate_sid,store_cate_tid,brand_id, shelves_handle,shelves_time,spu_validity,virtual_flg,status, shelves_status,spu_appear,shelves_at,created_by,created_at, logistics_template)VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) goblin_goods.insert=INSERT INTO goblin_goods (spu_id,spu_no,name,subtitle,sell_price, price_ge,price_le,intro,details,cover_pic, video,spec_mode,store_id,cate_fid,cate_sid, cate_tid,store_cate_fid,store_cate_sid,store_cate_tid,brand_id, shelves_handle,shelves_time,spu_validity,virtual_flg,status, shelves_status,spu_appear,shelves_at,created_by,created_at, logistics_template)VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
goblin_goods.update_by_edit=UPDATE goblin_goods SET spu_no=?,name=?,subtitle=?,sell_price=?,intro=?,details=?,cover_pic=?,video=?,spec_mode=?,cate_fid=?,cate_sid=?,cate_tid=?,shelves_handle=?,shelves_time=?,spu_validity=?,virtual_flg=?,logistics_template=?,updated_by=?,updated_at=? WHERE spu_id=? AND del_flg='0'
goblin_goods.update_by_shelves=UPDATE goblin_goods SET shelves_status=?,shelves_at=?,updated_by=?,updated_at=? WHERE spu_id=? AND store_id=? AND spu_appear='0' goblin_goods.update_by_shelves=UPDATE goblin_goods SET shelves_status=?,shelves_at=?,updated_by=?,updated_at=? WHERE spu_id=? AND store_id=? AND spu_appear='0'
goblin_goods.update_by_del_store=UPDATE goblin_goods SET del_flg=1,updated_by=?,updated_at=?,deleted_by=?,deleted_at=? WHERE store_id=? goblin_goods.update_by_status=UPDATE goblin_goods SET spu_appear=?,updated_by=?,updated_at=? WHERE store_id=? AND del_flg='0'
goblin_goods.update_by_del=UPDATE goblin_goods SET del_flg=1,updated_by=?,updated_at=?,deleted_by=?,deleted_at=? WHERE spu_id=? AND store_id=? goblin_goods.update_by_del_sku=UPDATE goblin_goods SET price_ge=?,price_le=?,updated_by=?,updated_at=? WHERE spu_id=? AND del_flg='0'
goblin_goods.update_by_del_store=UPDATE goblin_goods SET del_flg='1',updated_by=?,updated_at=?,deleted_by=?,deleted_at=? WHERE store_id=?
goblin_goods.update_by_del=UPDATE goblin_goods SET del_flg='1',updated_by=?,updated_at=?,deleted_by=?,deleted_at=? WHERE spu_id=? AND store_id=?
goblin_goods_sku.insert=INSERT INTO goblin_goods_sku (sku_id,spu_id,sku_no,name,subtitle, sell_price,sku_pic,sku_isbn,stock,sku_stock, warning_stock,price,price_member,weight,buy_factor, buy_roster,buy_limit,store_id,sku_validity,virtual_flg, status,shelves_status,sku_appear,shelves_at,created_by, created_at,logistics_template)VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) goblin_goods_sku.insert=INSERT INTO goblin_goods_sku (sku_id,spu_id,sku_no,name,subtitle, sell_price,sku_pic,sku_isbn,stock,sku_stock, warning_stock,price,price_member,weight,buy_factor, buy_roster,buy_limit,store_id,sku_validity,virtual_flg, status,shelves_status,sku_appear,shelves_at,created_by, created_at,logistics_template)VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
goblin_goods_sku.update_by_edit=UPDATE goblin_goods_sku SET sku_pic=?,sell_price=?,price=?,price_member=?,weight=?,stock=?,sku_stock=?,warning_stock=?,sku_appear=?,sku_isbn=?,buy_factor=?,buy_roster=?,buy_limit=?,sku_validity=?,updated_by=?,updated_at=? WHERE sku_id=? AND del_flg='0'
goblin_goods_sku.update_by_edit_spu=UPDATE goblin_goods_sku SET sku_no=?,virtual_flg=?,logistics_template=?,updated_by=?,updated_at=? WHERE spu_id=? AND del_flg='0'
goblin_goods_sku.update_by_shelves=UPDATE goblin_goods_sku SET shelves_status=?,shelves_at=?,updated_by=?,updated_at=? WHERE spu_id=? AND store_id=? AND sku_appear='0' goblin_goods_sku.update_by_shelves=UPDATE goblin_goods_sku SET shelves_status=?,shelves_at=?,updated_by=?,updated_at=? WHERE spu_id=? AND store_id=? AND sku_appear='0'
goblin_goods_sku.update_by_del_store=UPDATE goblin_goods_sku SET del_flg=1,updated_by=?,updated_at=?,deleted_by=?,deleted_at=? WHERE store_id=? goblin_goods_sku.update_by_del_store=UPDATE goblin_goods_sku SET del_flg='1',updated_by=?,updated_at=?,deleted_by=?,deleted_at=? WHERE store_id=?
goblin_goods_sku.update_by_del=UPDATE goblin_goods_sku SET del_flg=1,updated_by=?,updated_at=?,deleted_by=?,deleted_at=? WHERE spu_id=? AND store_id=? goblin_goods_sku.update_by_del=UPDATE goblin_goods_sku SET del_flg='1',updated_by=?,updated_at=?,deleted_by=?,deleted_at=? WHERE spu_id=? AND store_id=?
goblin_goods_image.insert=INSERT INTO goblin_goods_image (spu_id,url)VALUES(?,?) goblin_goods_image.insert=INSERT INTO goblin_goods_image (spu_id,url)VALUES(?,?)
goblin_goods_tag.insert=insert into goblin_goods_tag (spu_id,tag_id,sort,tag_belong)VALUES(?,?,?,?) goblin_goods_tag.insert=insert into goblin_goods_tag (spu_id,tag_id,sort,tag_belong)VALUES(?,?,?,?)
......
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