checkSknValidity.md 2.28 KB

检查SKN的合法性并且获得其下的所有SKU

接口名: /limitCode/checkSknValidity

方法

POST JSONRAW

入参


属性名称 类型 例子 说明 是否必填 长度限制
skn String 50000204 指定商品SKN 1~14
id String 34 限购码Id 0~14

对应SQL的操作库表

 <select id="selectProductIdBySkn" resultType="java.lang.Integer" parameterType="java.lang.Integer">
        select id from product where erp_product_id = #{productSkn}
    </select>
 <select id="selectProductBySkn" resultMap="productBaseResultMap" parameterType="java.lang.Integer">
        select
        <include refid="Base_Column_List"/>
        from product where erp_product_id=#{productSkn,jdbcType=INTEGER}
    </select>
  <select id="getLimitCodeBySkn" resultMap="BaseResultMap" >
    select  
    <include refid="Base_Column_List" /> 
    from limit_code 
    where 1=1
    <if test="skn != null and skn != ''" >
      and limit_skn = #{skn,jdbcType=VARCHAR}
    </if>
  </select>
<select id="selectProductIdBySkn" resultType="java.lang.Integer" parameterType="java.lang.Integer">
        select id from product where erp_product_id = #{productSkn}
    </select>
<select id="getLimitCodeBySkn" resultMap="BaseResultMap" >
    select  
    <include refid="Base_Column_List" /> 
    from limit_code 
    where 1=1
    <if test="skn != null and skn != ''" >
      and limit_skn = #{skn,jdbcType=VARCHAR}
    </if>
    <if test="id != null and id != ''" >
      and id != #{id,jdbcType=INTEGER}
    </if>
  </select>

响应码


响应码code 消息 说明
200 SKN检查成功
400 入口参数Skn不能为空.

返回

{
    "code": 200,
    "data": {
        "isConflict": false,
        "isExist": true,
        "isOnSales": false,
        "skuList": [
            "102002",
            "102003",
            "102004",
            "102005",
            "102006",
            "102007"
        ]
    },
    "md5": "225c5807a9d7777ed8c4bc8eee010728",
    "message": "SKN检查成功"
}