bigTypeID, typeSort, `name`, bigTypeCode, wwwValidFlag, crmValidFlag, wwwIcon, crmIcon, addTime, sortIndex smallTypeID, bigTypeID, `name`, smallTypeCode, wwwValidFlag, crmValidFlag, wwwIcon, crmIcon, addTime, sortIndex tinyTypeID, smallTypeID, `name`, tinyTypeCode, wwwValidFlag, crmValidFlag, wwwIcon, crmIcon, addTime, sortIndex productID, brandID,bigTypeID,smallTypeID, tinyTypeID,productCategory, preferredFlag, selfTypeID, shopID, `name`, aliasName, searchKey, productRemarks, normalPrice, price, highestUserLevelPrice, lowestUserLevelPrice, lowestUserLevelID, price0, price0Grade, price0Text, price0TextFlag, price1, price1Grade, price1Text, price1TextFlag, price8, price8Grade, price8Text, price8Text as beautyActFlag, price8TextFlag, ladderPriceFlag, price2, price3, price4, price5, price6, price7, fee, stock, hasSkuFlag, mainImage, propertiesInfo, addTime, updateTime, sellNumber, weekSellNumber, beforeValidFlag, validFlag, favoriteTimes, commentScore, commentTimes, selfRecommendFlag, sysRecommendFlag, sortIndex, featuredFlag, featuredSortIndex, productCode, rate1, rate2, unit, synToERPFlag, allAreaFlag, provinceIDs, serviceNumber, maxBuyNumber, virtualFlag, minBuyNumber, packageCount, byFlag, normalProductFlag, wholeSaleProductFlag, promotionProductFlag, groupBuyProductFlag, step, speCommisionFlag, speCommision, videourl, props, providers, serviceCommissionRatio, reCommissionRatio, pushToERPName, prodBeans, useBeansFlag, privateFlag, invisibleServiceProviderIDs, displayOnCRMFlag, needServiceFlag, actFlag, actStatus, actSort, actPrice0, actPrice1, actPrice2, actPrice3, actPrice4, actPrice5, actPrice6, actPrice7, actType, actCreateTime, beginTime, endTime, shopIndexModuleID, onlineTime, downlineTime, freePostFlag, crmBigTypeId, crmSmallTypeId, costPrice, costProportional, costCheckFlag, precisehKey, docBoost, cmbeanFlag, cmbeanPrice, cmbeanSort, actBuyGiftNum, actFullGiftAmount, actFullReduceAmount, actReduceAmount, visibility, surplusTime, priceType, tags, recommendType, machineType, taxPoint, supplierTaxPoint, includedTax, invoiceType,commodityType productDetailInfoID, productID, propValueAlias, propValueImages, detailInfo, detailInfoTxt, seoTitle, seoKeyword, seoDes, serviceInfo, orderInfo id, productId, userType, ladderNum, buyNum, buyPrice, createBy, createDate, updateBy, updateDate, delFlag productImageID, productID, shopID, addTime, image, mainFlag, sortIndex s.shopID, s.userID, s.`name`, s.sname, s.nameEn, s.site, s.ledgerNo, s.logo, s.rebateAmount, s.`level`, s.score, s.productCount, s.legalPerson, s.businessLicense, s.businessLicenseImage, s.taxCertificate, s.taxCertificateImage, s.provinceID, s.cityID, s.townID, s.address, s.registeredCapital, s.nature, s.turnover, s.linkMan, s.contractPhone, s.contractMobile, s.fax, s.zipCode, s.linkMan1, s.duty1, s.contractPhone1, s.contractMobile1, s.contractQQ1, s.wechat1, s.contractEmail1, s.linkMan2, s.duty2, s.contractPhone2, s.contractMobile2, s.contractQQ2, s.wechat2, s.contractEmail2, s.`scope`, s.info, s.productDesc, s.lng, s.lat, s.addTime, s.auditStatus, s.auditTime, s.auditNote, s.favoriteTimes, s.validFlag, s.payFlag1, s.auditFlag1, s.payFlag2, s.auditFlag2, s.payFlag3, s.auditFlag3, s.note, s.`status`, s.sortIndex, s.rate1, s.rate2, s.masterFlag, s.erpFlag, s.shopSecret, s.masterLogo, s.cooperateFlag, s.bail, s.businessScope, s.socialCreditCode, s.mainpro, s.firstShopType, s.secondShopType, s.medicalPracticeLicenseImg1, s.medicalPracticeLicenseImg2, s.medicalPracticeLicenseImg3, s.bankAccount, s.bankAccountName, s.bankName, s.ableRebateAmount,s.authorizationCertificateImage update user_search_history userId = #{userId,jdbcType=BIGINT}, searchWord = #{searchWord,jdbcType=VARCHAR}, searchDate = #{searchDate,jdbcType=TIMESTAMP}, delFlag = #{delFlag,jdbcType=VARCHAR}, where id = #{id,jdbcType=BIGINT} UPDATE cm_second_hand_detail SET viewingNum = #{viewingNum} WHERE productID = #{productID} UPDATE cm_second_hand_detail SET sold = 1 where productID = #{productID} UPDATE product SET validFlag = #{validFlag} where productID = #{productID} insert into user_search_history userId, searchWord, searchDate, delFlag, #{userId,jdbcType=BIGINT}, #{searchWord,jdbcType=VARCHAR}, #{searchDate,jdbcType=TIMESTAMP}, #{delFlag,jdbcType=VARCHAR}, INSERT INTO cm_second_hand_detail( productID, sold, secondHandType, instrumentType, fixedYears, maturityYears, companyName, detailTalkFlag, originalPrice, contactName, contactMobile, dockingPeopleName, dockingPeopleMobile, secondProductType, townId, brandName, provinceCityDistrict, address, productQuality, productDetails, viewingNum, payStatus, payAmount, payFormData, payType, payDate, submitDate, reviewedDate, onLineDate, source, publisher ) VALUES ( #{productID}, #{sold}, #{secondHandType}, #{instrumentType}, #{fixedYears}, #{maturityYears}, #{companyName}, #{detailTalkFlag}, #{originalPrice}, #{contactName}, #{contactMobile}, #{dockingPeopleName}, #{dockingPeopleMobile}, #{secondProductType}, #{townId}, #{brandName}, #{provinceCityDistrict}, #{address}, #{productQuality}, #{productDetails}, #{viewingNum}, #{payStatus}, #{payAmount}, #{payFormData}, #{payType}, #{payDate}, #{submitDate}, #{reviewedDate}, #{onLineDate}, #{source}, #{publisher} ) DELETE FROM user_search_history WHERE userId=#{userId} AND id NOT IN ( SELECT temp.id FROM ( SELECT id FROM user_search_history WHERE userId=#{userId} ORDER BY id DESC LIMIT 10 ) AS temp ) DELETE FROM user_search_history WHERE userId=#{userId}