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

Commit ae5bfd01 authored by 胡佳晨's avatar 胡佳晨

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

parents 066e3d23 61410a88
......@@ -45,9 +45,9 @@ public class GoblinStoreMgtGoodsAddParam implements Serializable {
* ---------------------------- 基本信息 ----------------------------
**/
@ApiModelProperty(position = 12, required = true, value = "商品名称[128]")
@ApiModelProperty(position = 12, required = true, value = "商品名称[36]")
@NotBlank(message = "商品名称不能为空")
@Size(max = 128, message = "商品名称长度超限")
@Size(max = 36, message = "商品名称长度超限")
private String name;
@ApiModelProperty(position = 13, required = false, value = "商品名称[128]")
@Size(max = 128, message = "商品副名称长度超限")
......
......@@ -40,15 +40,15 @@ public class TestAdam {
"adam:info:member:code:GMRGBUQB30",
"adam:info:certification:1141181199209160192",
"adam:identity:mobile:18548596019",
"adam:identity:mobile:15124771442",
"adam:identity:sso:882883",
"adam:info:user:809406",
"adam:info:user:922833055536291845022973",
"adam:info:user:926221815868989446709775",
"adam:morder:2283655",
"adam:info:umember:1957341",
"adam:info:umember:926221815868989446709775",
"adam:info:umember:926280978917662724119825",
"adam:info:umember:926280978917662724119825",
"adam:info:morder:331587681810022407979836",
"adam:info:morder:926221815868989446709775",
"adam:info:member:simple",
"adam:info:member:joinus",
......@@ -62,7 +62,7 @@ public class TestAdam {
"adam:info:morder:2292617",
"adam:info:certification_junk:1510827199912020821",
"kylin:member:uid:926280978917662724119825",
"kylin:member:uid:926221815868989446709775",
"kylin:member:uid:925802662655180800214832",
"candy:basic:coupon_code:0Jxko0wLWQdoTTF4",
......
......@@ -259,8 +259,8 @@ public class GoblinStoreMgtGoodsController {
// return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "商品三级分类无效");
// }
}
GoblinGoodsInfoVo mgtGoodsInfoVo = goblinMongoUtils.getMgtGoodsInfoVo(storeId, storeMgtGoodsAddParam.getName());
if (null != mgtGoodsInfoVo) {
// GoblinGoodsInfoVo mgtGoodsInfoVo = goblinMongoUtils.getMgtGoodsInfoVo(storeId, storeMgtGoodsAddParam.getName());
if (goblinMongoUtils.countMgtGoodsInfoVo(storeMgtGoodsAddParam.getName()) > 0) {
return ResponseDto.failure(ErrorMapping.get("149007"));
}
if (storeMgtGoodsAddParam.getShelvesHandle().equals("3") && null == storeMgtGoodsAddParam.getShelvesTime()) {
......@@ -364,12 +364,14 @@ public class GoblinStoreMgtGoodsController {
return ResponseDto.failure(ErrorMapping.get("149010"));
}
if (!mgtGoodsInfoVo.getName().equals(mgtGoodsAddParam.getName())
&& null != goblinMongoUtils.getMgtGoodsInfoVo(storeId, mgtGoodsAddParam.getName())) {
// && null != goblinMongoUtils.getMgtGoodsInfoVo(storeId, mgtGoodsAddParam.getName())) {
&& goblinMongoUtils.countMgtGoodsInfoVo(mgtGoodsAddParam.getName()) > 0) {
return ResponseDto.failure(ErrorMapping.get("149007"));
}
if (!mgtGoodsAddParam.getShelvesHandle().equals(mgtGoodsInfoVo.getShelvesHandle())
&& mgtGoodsInfoVo.getShelvesStatus().equals("3")) {
return ResponseDto.failure(ErrorMapping.get("149016"));
// return ResponseDto.failure(ErrorMapping.get("149016"));
return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "上架处理方式只限商品未上架时变更");
}
List<String> skuIdList = mgtGoodsInfoVo.getSkuIdList();
......
......@@ -74,7 +74,6 @@ public class GoblinCouponImpl implements GoblinCouponService {
LocalDateTime now = LocalDateTime.now();
GoblinUserCouponBasicVo receiveUserCouponBasicVo = GoblinUserCouponBasicVo.getNew().initByStoreCouponVo(storeCouponVo);
receiveUserCouponBasicVo.setUid(uid);
receiveUserCouponBasicVo.setStoreId(storeCouponVo.getStoreId());
receiveUserCouponBasicVo.setBindAt(now);
receiveUserCouponBasicVo.setOperator(uid);
receiveUserCouponBasicVo.setCreatedAt(now);
......
......@@ -445,6 +445,10 @@ public class GoblinMongoUtils {
return mongoTemplate.findOne(Query.query(Criteria.where("storeId").is(storeId).and("name").is(name).and("delFlg").is("0")),
GoblinGoodsInfoVo.class, GoblinGoodsInfoVo.class.getSimpleName());
}
public long countMgtGoodsInfoVo(String name) {
return mongoTemplate.count(Query.query(Criteria.where("name").is(name).and("delFlg").is("0")),
GoblinGoodsInfoVo.class.getSimpleName());
}
// SPU信息
public boolean updateGoodsInfoVo(GoblinGoodsInfoVo vo) {
......
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