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

Commit 2573ddf8 authored by jiangxiulong's avatar jiangxiulong

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

parents 5308cd66 aa1cffd1
...@@ -22,6 +22,11 @@ public class AdamRedisConst { ...@@ -22,6 +22,11 @@ public class AdamRedisConst {
public static final String INFO_ADDRESSES = PREFIX.concat("info:addresses:"); public static final String INFO_ADDRESSES = PREFIX.concat("info:addresses:");
public static final String INFO_CERTIFICATION = PREFIX.concat("info:certification:"); public static final String INFO_CERTIFICATION = PREFIX.concat("info:certification:");
/**
* {adam:info:certmeta:{idType+idNo},{idname,mobile}}
*/
public static final String INFO_CERTMETA = PREFIX.concat("info:certmeta:");
public static final String INFO_CERTMETA_JUNK = PREFIX.concat("info:certmeta:");
/** /**
* 认证失败标记 * 认证失败标记
*/ */
......
...@@ -21,9 +21,15 @@ public class AdamRealInfoVo implements Serializable, Cloneable { ...@@ -21,9 +21,15 @@ public class AdamRealInfoVo implements Serializable, Cloneable {
private String idCard; private String idCard;
@ApiModelProperty(position = 13, value = "类型[1-大陆身份证,2-港澳通行证,3-台胞证,4-护照,5-军官证]") @ApiModelProperty(position = 13, value = "类型[1-大陆身份证,2-港澳通行证,3-台胞证,4-护照,5-军官证]")
private Integer type; private Integer type;
@ApiModelProperty(position = 13, value = "认证节点[2-二要素|3-三要素]")
private Integer node;
@ApiModelProperty(position = 14, value = "状态:1-正常") @ApiModelProperty(position = 14, value = "状态:1-正常")
private Integer state; private Integer state;
public Integer getNode() {
return null == node ? 2 : node;
}
private static final AdamRealInfoVo obj = new AdamRealInfoVo(); private static final AdamRealInfoVo obj = new AdamRealInfoVo();
public static AdamRealInfoVo getNew() { public static AdamRealInfoVo getNew() {
...@@ -40,6 +46,7 @@ public class AdamRealInfoVo implements Serializable, Cloneable { ...@@ -40,6 +46,7 @@ public class AdamRealInfoVo implements Serializable, Cloneable {
this.setName(source.getName()); this.setName(source.getName());
this.setIdCard(source.getIdCard()); this.setIdCard(source.getIdCard());
this.setType(source.getType()); this.setType(source.getType());
this.setNode(source.getNode());
this.setState(source.getState()); this.setState(source.getState());
return this; return this;
} }
......
...@@ -67,5 +67,5 @@ public interface IAdamUserService { ...@@ -67,5 +67,5 @@ public interface IAdamUserService {
void close(String uid); void close(String uid);
AdamRealInfoVo identity(String uid, String name, String idCard); AdamRealInfoVo identity(String uid, String name, String idCard, String mobile);
} }
package com.liquidnet.service.goblin.dto.manage; package com.liquidnet.service.goblin.dto.manage;
import com.liquidnet.commons.lang.util.CollectionUtil;
import com.liquidnet.commons.lang.util.IDGenerator; import com.liquidnet.commons.lang.util.IDGenerator;
import com.liquidnet.service.goblin.dto.vo.GoblinGoodsInfoVo; import com.liquidnet.service.goblin.dto.vo.GoblinGoodsInfoVo;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
...@@ -90,6 +91,7 @@ public class GoblinStoreMgtDigitalGoodsAddParam implements Serializable { ...@@ -90,6 +91,7 @@ public class GoblinStoreMgtDigitalGoodsAddParam implements Serializable {
vo.setShelvesStatus("0"); vo.setShelvesStatus("0");
vo.setSpuAppear("1"); vo.setSpuAppear("1");
vo.setDelFlg("0"); vo.setDelFlg("0");
vo.setSkuIdList(CollectionUtil.linkedListString());
return vo; return vo;
} }
...@@ -101,6 +103,7 @@ public class GoblinStoreMgtDigitalGoodsAddParam implements Serializable { ...@@ -101,6 +103,7 @@ public class GoblinStoreMgtDigitalGoodsAddParam implements Serializable {
public GoblinGoodsInfoVo initEditGoodsInfoVo() { public GoblinGoodsInfoVo initEditGoodsInfoVo() {
GoblinGoodsInfoVo vo = GoblinGoodsInfoVo.getNew(); GoblinGoodsInfoVo vo = GoblinGoodsInfoVo.getNew();
vo.setSpuId(this.getSpuId()); vo.setSpuId(this.getSpuId());
vo.setSpuType(1);
vo.setName(this.getName()); vo.setName(this.getName());
vo.setIntro(this.getIntro()); vo.setIntro(this.getIntro());
vo.setCateFid(this.getCateFid()); vo.setCateFid(this.getCateFid());
......
package com.liquidnet.service.goblin.dto.manage;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.util.List;
@ApiModel(value = "GoblinStoreMgtGoodsActionParam", description = "商品管理:商品列表操作入参")
@Data
public class GoblinStoreMgtGoodsSkuActionParam implements Serializable {
private static final long serialVersionUID = 6564996671833040261L;
@ApiModelProperty(position = 10, required = true, value = "店铺ID[64]")
@NotBlank(message = "店铺ID不能为空")
private String storeId;
@ApiModelProperty(position = 11, required = true, value = "商品ID[64]")
@NotBlank(message = "商品ID不能为空")
private String spuId;
@ApiModelProperty(position = 12, required = true, value = "操作类型[ONSHELVES-上架|UNSHELVE-下架|REMOVE-删除]")
@Pattern(regexp = "\\b(ONSHELVES|UNSHELVE|REMOVE)\\b", message = "操作类型无效")
private String action;
@ApiModelProperty(position = 13, required = true, value = "单品ID列表")
private List<String> skuIdList;
}
...@@ -17,6 +17,8 @@ public class GoblinStoreMgtGoodsListVo implements Serializable, Cloneable { ...@@ -17,6 +17,8 @@ public class GoblinStoreMgtGoodsListVo implements Serializable, Cloneable {
private String spuId; private String spuId;
@ApiModelProperty(position = 12, value = "商品编码[45]") @ApiModelProperty(position = 12, value = "商品编码[45]")
private String spuNo; private String spuNo;
@ApiModelProperty(position = 12, value = "商品类型[0-常规|1-数字藏品]")
private int spuType;
@ApiModelProperty(position = 13, value = "封面图片地址[256]") @ApiModelProperty(position = 13, value = "封面图片地址[256]")
private String coverPic; private String coverPic;
@ApiModelProperty(position = 14, value = "商品名称[100]") @ApiModelProperty(position = 14, value = "商品名称[100]")
......
...@@ -11,9 +11,6 @@ import lombok.Data; ...@@ -11,9 +11,6 @@ import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List; import java.util.List;
@ApiModel(value = "GoblinGoodsInfoVo", description = "商品SPU详情[不包含具体SKU,SKU详情参见'GoblinGoobsSkuInfoVo']") @ApiModel(value = "GoblinGoodsInfoVo", description = "商品SPU详情[不包含具体SKU,SKU详情参见'GoblinGoobsSkuInfoVo']")
...@@ -28,7 +25,7 @@ public class GoblinGoodsInfoVo implements Serializable, Cloneable { ...@@ -28,7 +25,7 @@ public class GoblinGoodsInfoVo implements Serializable, Cloneable {
@ApiModelProperty(position = 12, value = "商品编码[默认为系统编码,也可手动输入商家自己的编码]") @ApiModelProperty(position = 12, value = "商品编码[默认为系统编码,也可手动输入商家自己的编码]")
private String spuNo; private String spuNo;
@ApiModelProperty(position = 12, value = "商品类型[0-常规|1-数字藏品]") @ApiModelProperty(position = 12, value = "商品类型[0-常规|1-数字藏品]")
private Integer spuType; private int spuType;
@ApiModelProperty(position = 13, value = "商品名称[100]") @ApiModelProperty(position = 13, value = "商品名称[100]")
private String name; private String name;
@ApiModelProperty(position = 14, value = "商品副标题[128]") @ApiModelProperty(position = 14, value = "商品副标题[128]")
......
...@@ -136,6 +136,16 @@ public interface IGoblinstoreMgtGoodsService { ...@@ -136,6 +136,16 @@ public interface IGoblinstoreMgtGoodsService {
*/ */
boolean goodsShelvesProcessing(GoblinStoreMgtGoodsActionParam mgtGoodsActionParam, String uid, boolean shelvesFlg, List<String> spuNoList); boolean goodsShelvesProcessing(GoblinStoreMgtGoodsActionParam mgtGoodsActionParam, String uid, boolean shelvesFlg, List<String> spuNoList);
/**
* 商品管理:上下架商品-单品
*
* @param mgtGoodsSkuActionParam GoblinStoreMgtGoodsSkuActionParam
* @param uid UID
* @param shelvesFlg true:上架|false:下架
* @return boolean
*/
boolean goodsSkuShelvesProcessing(GoblinStoreMgtGoodsSkuActionParam mgtGoodsSkuActionParam, String uid, boolean shelvesFlg);
/** /**
* 商品管理:删除商品 * 商品管理:删除商品
* *
...@@ -145,4 +155,13 @@ public interface IGoblinstoreMgtGoodsService { ...@@ -145,4 +155,13 @@ public interface IGoblinstoreMgtGoodsService {
* @return boolean * @return boolean
*/ */
boolean goodsRemove(GoblinStoreMgtGoodsActionParam mgtGoodsActionParam, String uid, List<String> spuNoList); boolean goodsRemove(GoblinStoreMgtGoodsActionParam mgtGoodsActionParam, String uid, List<String> spuNoList);
/**
* 商品管理:删除商品-单品
*
* @param mgtGoodsSkuActionParam GoblinStoreMgtGoodsSkuActionParam
* @param uid UID
* @return boolean
*/
boolean goodsSkuRemove(GoblinStoreMgtGoodsSkuActionParam mgtGoodsSkuActionParam, String uid);
} }
...@@ -8,15 +8,18 @@ import org.springframework.web.client.UnknownHttpStatusCodeException; ...@@ -8,15 +8,18 @@ import org.springframework.web.client.UnknownHttpStatusCodeException;
public class IdentityUtils { public class IdentityUtils {
private static final Logger log = LoggerFactory.getLogger(IdentityUtils.class); private static final Logger log = LoggerFactory.getLogger(IdentityUtils.class);
private static String aliThirdUrl = "https://1.api.apistore.cn/idcard3"; private static final String aliThirdUrl = "https://1.api.apistore.cn/idcard3";
private static String aliThirdAppCode = "cc29fa8cb494468289dec09df46922b5"; private static final String aliThirdAppCode = "cc29fa8cb494468289dec09df46922b5";
public static String aliThird(String realName,String cardNo){ private static final String ALI_MOBILE_CERT_HOST = "https://mobilecert.market.alicloudapi.com";
private static final String ALI_MOBILE_CERT3_META_URI = "/mobile3Meta";
public static String aliThird(String realName, String cardNo) {
MultiValueMap<String, String> params = new LinkedMultiValueMap<>(); MultiValueMap<String, String> params = new LinkedMultiValueMap<>();
params.add("realName",realName); params.add("realName", realName);
params.add("cardNo",cardNo); params.add("cardNo", cardNo);
MultiValueMap<String, String> header = new LinkedMultiValueMap<>(); MultiValueMap<String, String> header = new LinkedMultiValueMap<>();
header.add("Authorization","APPCODE "+aliThirdAppCode); header.add("Authorization", "APPCODE " + aliThirdAppCode);
try { try {
return HttpUtil.post(aliThirdUrl, params, header); return HttpUtil.post(aliThirdUrl, params, header);
} catch (Exception e) { } catch (Exception e) {
...@@ -29,4 +32,32 @@ public class IdentityUtils { ...@@ -29,4 +32,32 @@ public class IdentityUtils {
return null; return null;
} }
} }
/**
* 三要素认证
* eg:https://market.aliyun.com/products/57000002/cmapi029847.html
*
* @param realName
* @param cardNo
* @param mobile
* @return
*/
public static String ali3Meta(String realName, String cardNo, String mobile) {
LinkedMultiValueMap<String, String> headersMap = CollectionUtil.linkedMultiValueMapStringString();
headersMap.add("Authorization", "APPCODE ".concat(aliThirdAppCode));
LinkedMultiValueMap<String, String> paramsMap = CollectionUtil.linkedMultiValueMapStringString();
paramsMap.add("identifyNum", cardNo);
paramsMap.add("mobile", mobile);
paramsMap.add("userName", realName);
try {
return HttpUtil.get(ALI_MOBILE_CERT_HOST.concat(ALI_MOBILE_CERT3_META_URI), paramsMap, headersMap);
} catch (Exception e) {
log.error("###实名认证异常:{}", e.getLocalizedMessage(), e);
if (e instanceof UnknownHttpStatusCodeException) {
UnknownHttpStatusCodeException unknownHttpStatusCodeException = (UnknownHttpStatusCodeException) e;
return unknownHttpStatusCodeException.getMessage();
}
return null;
}
}
} }
...@@ -128,7 +128,7 @@ public class AdamMemberOrderController { ...@@ -128,7 +128,7 @@ public class AdamMemberOrderController {
if (StringUtils.isBlank(param.getName()) || StringUtils.isBlank(param.getIdCard())) { if (StringUtils.isBlank(param.getName()) || StringUtils.isBlank(param.getIdCard())) {
return ResponseDto.failure(ErrorMapping.get("10101")); return ResponseDto.failure(ErrorMapping.get("10101"));
} }
adamUserService.identity(currentUid, param.getName(), param.getIdCard()); adamUserService.identity(currentUid, param.getName(), param.getIdCard(), (String) CurrentUtil.getTokenClaims().get(CurrentUtil.TOKEN_MOBILE));
} }
return adamMemberOrderService.buyMemberOrMemberCode(currentUid, param); return adamMemberOrderService.buyMemberOrMemberCode(currentUid, param);
...@@ -247,7 +247,7 @@ public class AdamMemberOrderController { ...@@ -247,7 +247,7 @@ public class AdamMemberOrderController {
if (StringUtils.isBlank(param.getName()) || StringUtils.isBlank(param.getIdCard())) { if (StringUtils.isBlank(param.getName()) || StringUtils.isBlank(param.getIdCard())) {
return ResponseDto.failure(ErrorMapping.get("10101")); return ResponseDto.failure(ErrorMapping.get("10101"));
} }
AdamRealInfoVo vo = adamUserService.identity(currentUid, param.getName(), param.getIdCard()); AdamRealInfoVo vo = adamUserService.identity(currentUid, param.getName(), param.getIdCard(), (String) CurrentUtil.getTokenClaims().get(CurrentUtil.TOKEN_MOBILE));
if (null == vo) { if (null == vo) {
return ResponseDto.failure(ErrorMapping.get("10000")); return ResponseDto.failure(ErrorMapping.get("10000"));
} }
......
...@@ -262,17 +262,18 @@ public class AdamUserController { ...@@ -262,17 +262,18 @@ public class AdamUserController {
@RequestParam String code) { @RequestParam String code) {
log.debug("mobile:{},code:{}", mobile, code); log.debug("mobile:{},code:{}", mobile, code);
String currentUid = CurrentUtil.getCurrentUid(); // String currentUid = CurrentUtil.getCurrentUid();
//
String bindMobileExistUid = adamRdmService.getUidByMobile(mobile); // String bindMobileExistUid = adamRdmService.getUidByMobile(mobile);
if (StringUtils.isNotEmpty(bindMobileExistUid)) { // if (StringUtils.isNotEmpty(bindMobileExistUid)) {
return ResponseDto.failure(ErrorMapping.get("10009")); // return ResponseDto.failure(ErrorMapping.get("10009"));
} // }
//
ResponseDto<String> checkSmsCodeDto = this.checkSmsCode(mobile, code); // ResponseDto<String> checkSmsCodeDto = this.checkSmsCode(mobile, code);
if (!checkSmsCodeDto.isSuccess()) return checkSmsCodeDto; // if (!checkSmsCodeDto.isSuccess()) return checkSmsCodeDto;
//
return ResponseDto.success(adamUserInfoService.editMobile(currentUid, mobile)); // return ResponseDto.success(adamUserInfoService.editMobile(currentUid, mobile));
return ResponseDto.failure(ErrorMapping.get("10027"));
} }
@ApiOperationSupport(order = 5) @ApiOperationSupport(order = 5)
...@@ -297,7 +298,7 @@ public class AdamUserController { ...@@ -297,7 +298,7 @@ public class AdamUserController {
realInfoVoByUid.setIdCard(SensitizeUtil.custom(realInfoVoByUid.getIdCard(), 3, 2)); realInfoVoByUid.setIdCard(SensitizeUtil.custom(realInfoVoByUid.getIdCard(), 3, 2));
return ResponseDto.success(realInfoVoByUid); return ResponseDto.success(realInfoVoByUid);
} }
AdamRealInfoVo vo = adamUserService.identity(currentUid, name, idCard); AdamRealInfoVo vo = adamUserService.identity(currentUid, name, idCard, (String) CurrentUtil.getTokenClaims().get(CurrentUtil.TOKEN_MOBILE));
vo.setName(SensitizeUtil.chineseName(vo.getName())); vo.setName(SensitizeUtil.chineseName(vo.getName()));
vo.setIdCard(SensitizeUtil.custom(vo.getIdCard(), 3, 2)); vo.setIdCard(SensitizeUtil.custom(vo.getIdCard(), 3, 2));
return ResponseDto.success(vo); return ResponseDto.success(vo);
......
...@@ -17,11 +17,9 @@ import org.springframework.util.CollectionUtils; ...@@ -17,11 +17,9 @@ import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.time.Month;
import java.time.temporal.ChronoField; import java.time.temporal.ChronoField;
import java.time.temporal.ChronoUnit; import java.time.temporal.ChronoUnit;
import java.time.temporal.TemporalAdjusters; import java.time.temporal.TemporalAdjusters;
import java.time.temporal.TemporalField;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
...@@ -204,6 +202,15 @@ public class AdamRdmService { ...@@ -204,6 +202,15 @@ public class AdamRdmService {
return !StringUtils.isEmpty(o) && o.equals(idName); return !StringUtils.isEmpty(o) && o.equals(idName);
} }
public boolean setCertmetaJunk(int idType, String idNo, String idName, String mobile) {
return redisUtil.set(AdamRedisConst.INFO_CERTMETA_JUNK + idType + idNo, idName.concat(",").concat(mobile), 604800);
}
public boolean isCertmetaJunk(int idType, String idNo, String idName, String mobile) {
String val = (String) redisUtil.get(AdamRedisConst.INFO_CERTMETA_JUNK + idType + idNo);
return !StringUtils.isEmpty(val) && val.equals(idName.concat(",").concat(mobile));
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 认证成功的<ID_TYPE+ID_NO, ID_NAME> */ /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 认证成功的<ID_TYPE+ID_NO, ID_NAME> */
/** /**
...@@ -235,6 +242,8 @@ public class AdamRdmService { ...@@ -235,6 +242,8 @@ public class AdamRdmService {
// return !StringUtils.isEmpty(o) && o.equals(idName); // return !StringUtils.isEmpty(o) && o.equals(idName);
} }
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 认证处理 */
/** /**
* 身份证实名处理 * 身份证实名处理
* *
...@@ -276,6 +285,29 @@ public class AdamRdmService { ...@@ -276,6 +285,29 @@ public class AdamRdmService {
} }
} }
/**
* 身份证实名处理:三要素
*
* @param name
* @param idCard
* @param mobile
*/
public void identityHandler3(String name, String idCard, String mobile) {
if (this.isCertmetaJunk(1, idCard, name, mobile)) {
ErrorMapping.ErrorMessage errorMessage = ErrorMapping.get("10112");
throw new LiquidnetServiceException(errorMessage.getCode(), errorMessage.getMessage());
}
String respStr = IdentityUtils.ali3Meta(name, idCard, mobile);
JsonNode respJNode = JsonUtils.fromJson(respStr, JsonNode.class);
if (null == respJNode || !"200".equals(String.valueOf(respJNode.get("code")))
|| !String.valueOf(respJNode.get("data").get("bizCode")).equals("1")) {
log.warn("###实名认证失败[{}]", respStr);
this.setCertmetaJunk(1, idCard, name, mobile);
ErrorMapping.ErrorMessage errorMessage = ErrorMapping.get("10112");
throw new LiquidnetServiceException(errorMessage.getCode(), errorMessage.getMessage());
}
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | <UID, List<AdamThirdPartInfoVo>> */ /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | <UID, List<AdamThirdPartInfoVo>> */
public boolean setThirdPartVoListByUid(String uid, List<AdamThirdPartInfoVo> voList) { public boolean setThirdPartVoListByUid(String uid, List<AdamThirdPartInfoVo> voList) {
......
...@@ -39,6 +39,7 @@ public class AdamRealNameServiceImpl implements IAdamRealNameService { ...@@ -39,6 +39,7 @@ public class AdamRealNameServiceImpl implements IAdamRealNameService {
realName.getRealNameId(), realName.getRealNameId(),
realName.getUid(), realName.getUid(),
realName.getType(), realName.getType(),
realName.getNode(),
realName.getName(), realName.getName(),
realName.getIdCard(), realName.getIdCard(),
realName.getState(), realName.getState(),
......
...@@ -415,7 +415,7 @@ public class AdamUserServiceImpl implements IAdamUserService { ...@@ -415,7 +415,7 @@ public class AdamUserServiceImpl implements IAdamUserService {
@Override @Override
// @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) // @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
public AdamRealInfoVo identity(String uid, String name, String idCard) { public AdamRealInfoVo identity(String uid, String name, String idCard, String mobile) {
// if (!adamRdmService.isCertification(1, idCard, name)) { // if (!adamRdmService.isCertification(1, idCard, name)) {
// if (adamRdmService.isCertificationJunk(1, idCard, name)) { // if (adamRdmService.isCertificationJunk(1, idCard, name)) {
// ErrorMapping.ErrorMessage errorMessage = ErrorMapping.get("10102"); // ErrorMapping.ErrorMessage errorMessage = ErrorMapping.get("10102");
...@@ -432,12 +432,14 @@ public class AdamUserServiceImpl implements IAdamUserService { ...@@ -432,12 +432,14 @@ public class AdamUserServiceImpl implements IAdamUserService {
// } // }
// adamRdmService.setCertification(1, idCard, name); // adamRdmService.setCertification(1, idCard, name);
// } // }
adamRdmService.identityHandler1(uid, name, idCard); // adamRdmService.identityHandler1(uid, name, idCard);
adamRdmService.identityHandler3(name, idCard, mobile);
AdamRealName realName = new AdamRealName(); AdamRealName realName = new AdamRealName();
realName.setRealNameId(IDGenerator.nextSnowId() + ""); realName.setRealNameId(IDGenerator.nextSnowId() + "");
realName.setUid(uid); realName.setUid(uid);
realName.setType(1); realName.setType(1);
realName.setNode(3);
realName.setName(name); realName.setName(name);
realName.setIdCard(idCard); realName.setIdCard(idCard);
realName.setState(1); realName.setState(1);
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
10024=该账号已被主动注销 10024=该账号已被主动注销
10025=入场人已达上限 10025=入场人已达上限
10026=入场人今日操作已达上限 10026=入场人今日操作已达上限
10027=服务升级,暂不支持该操作
10101=姓名或身份证件号无效 10101=姓名或身份证件号无效
...@@ -43,6 +44,7 @@ ...@@ -43,6 +44,7 @@
10109=不支持中国大陆护照 10109=不支持中国大陆护照
10110=护照号码不合规 10110=护照号码不合规
10111=军官证号不合规 10111=军官证号不合规
10112=证件信息或手机号不一致
10200=仅限从未购买过会员的用户使用 10200=仅限从未购买过会员的用户使用
......
...@@ -11,7 +11,7 @@ adam_user_info.update_by_member=UPDATE adam_user_info SET birthday=?, area=? WHE ...@@ -11,7 +11,7 @@ adam_user_info.update_by_member=UPDATE adam_user_info SET birthday=?, area=? WHE
adam_user_info.update_qr_code=UPDATE adam_user_info SET qr_code=? WHERE uid=? adam_user_info.update_qr_code=UPDATE adam_user_info SET qr_code=? WHERE uid=?
# ---------------------------------------------------- # ----------------------------------------------------
adam_real_name.add=INSERT INTO adam_real_name (real_name_id, `uid`, `type`, `name`, id_card, `state`, created_at) VALUES (?,?,?,?,?,?,?) adam_real_name.add=INSERT INTO adam_real_name (real_name_id,`uid`,`type`,`node`,`name`,id_card,`state`,created_at) VALUES (?,?,?,?,?,?,?,?)
adam_real_name.close=UPDATE adam_real_name SET `state`=2, updated_at=?, comment='close' WHERE `uid`=? adam_real_name.close=UPDATE adam_real_name SET `state`=2, updated_at=?, comment='close' WHERE `uid`=?
# ---------------------------------------------------- # ----------------------------------------------------
......
...@@ -537,11 +537,11 @@ public class GoblinMongoUtils { ...@@ -537,11 +537,11 @@ public class GoblinMongoUtils {
return (List<GoblinGoodsSkuInfoVo>) mongoTemplate.insert(vos, GoblinGoodsSkuInfoVo.class.getSimpleName()); return (List<GoblinGoodsSkuInfoVo>) mongoTemplate.insert(vos, GoblinGoodsSkuInfoVo.class.getSimpleName());
} }
public boolean delGoodsSkuInfoVo(GoblinGoodsSkuInfoVo vo, List<String> skuIdList) { public boolean delGoodsSkuInfoVo(List<String> skuIdList, String operator, LocalDateTime time) {
return mongoTemplate.getCollection(GoblinGoodsSkuInfoVo.class.getSimpleName()).updateMany( return mongoTemplate.getCollection(GoblinGoodsSkuInfoVo.class.getSimpleName()).updateMany(
Query.query(Criteria.where("skuId").in(skuIdList).and("delFlg").is("0")).getQueryObject(), Query.query(Criteria.where("skuId").in(skuIdList).and("delFlg").is("0")).getQueryObject(),
Update.update("delFlg", "1").set("updatedBy", vo.getUpdatedBy()).set("updatedAt", vo.getUpdatedAt()) Update.update("delFlg", "1").set("updatedBy", operator).set("updatedAt", time)
.set("deletedBy", vo.getDeletedBy()).set("deletedAt", vo.getDeletedAt()).getUpdateObject() .set("deletedBy", operator).set("deletedAt", time).getUpdateObject()
).getModifiedCount() > 0; ).getModifiedCount() > 0;
} }
...@@ -639,6 +639,12 @@ public class GoblinMongoUtils { ...@@ -639,6 +639,12 @@ public class GoblinMongoUtils {
GoblinGoodsSkuInfoVo.class.getSimpleName()).getModifiedCount() > 0; GoblinGoodsSkuInfoVo.class.getSimpleName()).getModifiedCount() > 0;
} }
public boolean updateGoodsSkuInfoVoByShelvesSku(String storeId, List<String> skuIdList, boolean shelvesFlg, String uid, LocalDateTime time) {
return mongoTemplate.updateMulti(Query.query(Criteria.where("storeId").is(storeId).and("delFlg").is("0").and("skuId").in(skuIdList)),
Update.update("shelvesStatus", shelvesFlg ? "3" : "1").set("shelvesAt", time).set("updatedBy", uid).set("updatedAt", time),
GoblinGoodsSkuInfoVo.class.getSimpleName()).getModifiedCount() > 0;
}
/* ---------------------------------------- ---------------------------------------- */ /* ---------------------------------------- ---------------------------------------- */
/** /**
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
149004=身份认证失败,请核实 149004=身份认证失败,请核实
149005= 149005=
149006=添加商品失败,规格信息无效 149006=添加商品失败,规格信息无效
149007=添加商品失败,商品名称重复 149007=商品名称重复,请核实
149008=商品分类名称重复,请核实 149008=商品分类名称重复,请核实
149009=请点选商品后操作 149009=请点选商品后操作
149010=商品不存在或已删除,请核实 149010=商品不存在或已删除,请核实
......
...@@ -52,7 +52,7 @@ goblin_goods_sku.update_by_edit=UPDATE goblin_goods_sku SET name=?,sku_pic=?,sel ...@@ -52,7 +52,7 @@ goblin_goods_sku.update_by_edit=UPDATE goblin_goods_sku SET name=?,sku_pic=?,sel
goblin_goods_sku.update_by_edit_for_digital=UPDATE goblin_goods_sku SET hit_ratio=?,buy_factor=?,buy_roster=?,buy_limit=?,shelves_handle=?,shelves_time=?,sale_start_time=?,updated_by=?,updated_at=? WHERE sku_id=? AND del_flg='0' goblin_goods_sku.update_by_edit_for_digital=UPDATE goblin_goods_sku SET hit_ratio=?,buy_factor=?,buy_roster=?,buy_limit=?,shelves_handle=?,shelves_time=?,sale_start_time=?,updated_by=?,updated_at=? WHERE sku_id=? AND del_flg='0'
goblin_goods_sku.update_by_edit_box_digital=UPDATE goblin_goods_sku SET name=?,subtitle=?,sku_pic=?,sku_watch=?,watch_type=?,price=?,price_member=?,intro=?,details=?,shelves_handle=?,shelves_time=?,sale_start_time=?,opening_time=?,updated_by=?,updated_at=? WHERE sku_id=? AND del_flg='0' goblin_goods_sku.update_by_edit_box_digital=UPDATE goblin_goods_sku SET name=?,subtitle=?,sku_pic=?,sku_watch=?,watch_type=?,price=?,price_member=?,intro=?,details=?,shelves_handle=?,shelves_time=?,sale_start_time=?,opening_time=?,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_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 del_flg='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=? AND del_flg='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=? AND del_flg='0'
goblin_goods_sku.update_by_del_spu=UPDATE goblin_goods_sku SET del_flg='1',updated_by=?,updated_at=?,deleted_by=?,deleted_at=? WHERE spu_id=? AND del_flg='0' goblin_goods_sku.update_by_del_spu=UPDATE goblin_goods_sku SET del_flg='1',updated_by=?,updated_at=?,deleted_by=?,deleted_at=? WHERE spu_id=? AND del_flg='0'
goblin_goods_sku.update_by_del=UPDATE goblin_goods_sku SET del_flg='1',updated_by=?,updated_at=?,deleted_by=?,deleted_at=? WHERE sku_id=? AND del_flg='0' goblin_goods_sku.update_by_del=UPDATE goblin_goods_sku SET del_flg='1',updated_by=?,updated_at=?,deleted_by=?,deleted_at=? WHERE sku_id=? AND del_flg='0'
......
...@@ -41,7 +41,7 @@ public class PlatformGoblinGoodsService extends ServiceImpl<GoblinGoodsMapper, G ...@@ -41,7 +41,7 @@ public class PlatformGoblinGoodsService extends ServiceImpl<GoblinGoodsMapper, G
LambdaQueryWrapper<GoblinGoods> queryWrapper = Wrappers.lambdaQuery(GoblinGoods.class); LambdaQueryWrapper<GoblinGoods> queryWrapper = Wrappers.lambdaQuery(GoblinGoods.class);
queryWrapper.eq(GoblinGoods::getDelFlg, "0"); queryWrapper.eq(GoblinGoods::getDelFlg, "0");
queryWrapper.eq(GoblinGoods::getStatus, "3"); queryWrapper.eq(GoblinGoods::getStatus, "3");
// queryWrapper.eq(GoblinGoods::getSpuAppear, "0"); queryWrapper.eq(GoblinGoods::getSpuAppear, "0");
queryWrapper.eq(GoblinGoods::getShelvesHandle, "3"); queryWrapper.eq(GoblinGoods::getShelvesHandle, "3");
queryWrapper.le(GoblinGoods::getShelvesTime, now); queryWrapper.le(GoblinGoods::getShelvesTime, now);
// queryWrapper.eq(GoblinGoods::getShelvesStatus, "0"); // queryWrapper.eq(GoblinGoods::getShelvesStatus, "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