动态/品牌商品添加到重要商品更新库,推荐记录列表返回结果跳转任意更改
| | |
| | | // 统计商品数量
|
| | | long totalgoods = 0;
|
| | | // 商品id
|
| | | Long auctionId = null;
|
| | | CommonGoods commonGoods = null;
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(picture)) {
|
| | | try {
|
| | | List<PushGoodsGroup> listGroup = pushGoodsGroupService.getAllInfoByPushId(pushId);
|
| | |
| | |
|
| | | PushGoodsGroup pushGoodsGroup = listGroup.get(0);
|
| | | if (pushGoodsGroup != null) {
|
| | | CommonGoods commonGoods = pushGoodsGroup.getCommonGoods();
|
| | | commonGoods = pushGoodsGroup.getCommonGoods();
|
| | | if (commonGoods != null) {
|
| | | picture = commonGoods.getPicture();
|
| | | auctionId = commonGoods.getGoodsId();
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | JumpDetailV2 jumpDetail = null;
|
| | | if (totalgoods == 1) {
|
| | |
|
| | | params = JumpDetailParamsFactory.createGoodsParams(auctionId);
|
| | | params = JumpDetailParamsFactory.createGoodsParams(commonGoods.getGoodsId(),
|
| | | commonGoods.getGoodsType());
|
| | | // 单个商品跳转商品详情
|
| | | jumpDetail = jumpDetailV2Service.getByTypeCache("goodsdetail",
|
| | | Constant.getPlatformCode(acceptData.getPlatform()),
|
| | |
| | | import com.yeshi.fanli.service.inter.brand.TaoBaoShopHistoryService;
|
| | | import com.yeshi.fanli.service.inter.goods.TaoBaoGoodsBriefService;
|
| | | import com.yeshi.fanli.service.inter.hongbao.HongBaoManageService;
|
| | | import com.yeshi.fanli.service.inter.taobao.TaoBaoGoodsUpdateService;
|
| | | import com.yeshi.fanli.service.inter.taobao.TaoBaoShopService;
|
| | | import com.yeshi.fanli.service.inter.taobao.dataoke.DaTaoKeGoodsService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | |
| | | @Resource
|
| | | private DaTaoKeGoodsService daTaoKeGoodsService;
|
| | |
|
| | | @Resource
|
| | | private TaoBaoGoodsUpdateService taoBaoGoodsUpdateService;
|
| | |
|
| | | /**
|
| | | * 店铺列表
|
| | | *
|
| | |
| | | * 店铺足迹
|
| | | *
|
| | | * @param acceptData
|
| | | * @param type 精选1, 足迹列表2
|
| | | * @param type
|
| | | * 精选1, 足迹列表2
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "getHistory", method = RequestMethod.POST)
|
| | |
| | | data.put("count", array.size());
|
| | | data.put("list", array);
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | // 添加到更新列表
|
| | | taoBaoGoodsUpdateService.addUpdateQueueAsync(listGoodsBrief);
|
| | | }
|
| | |
|
| | | }
|
| | |
| | |
|
| | | List<TaoBaoGoodsBrief> updateGoodsList = new ArrayList<>();
|
| | |
|
| | | // 精选库数据为空时,网络进行查询
|
| | | if (listQuery == null || listQuery.size() == 0) {
|
| | | // 精选库数据小于10时,网络进行查询
|
| | | if (listQuery == null || listQuery.size() < 10) {
|
| | | long count = qualityGoodsService.countQueryClassId(gcid);
|
| | | int totalPage = (int) (count % pageSize == 0 ? count / pageSize : count / pageSize + 1);
|
| | | page = page - totalPage;
|
| | |
| | | // 去除前后空格
|
| | | text = text.trim();
|
| | |
|
| | | if (text.length() > 256) {
|
| | | out.print(JsonUtil.loadFalseResult("值过长"));
|
| | | return;
|
| | | }
|
| | | |
| | |
|
| | | TaoBaoGoodsBrief tb = null;
|
| | | String URL_REGEX = "(((http|https)://)|(www\\.))[a-zA-Z0-9\\._-]+\\.[a-zA-Z]{2,6}(:[0-9]{1,4})?(/[a-zA-Z0-9\\&%_\\./-~-]*)?";
|
| | |
| | | Pattern p = Pattern.compile(URL_REGEX);
|
| | | Matcher matcher = p.matcher(text);
|
| | | if (!matcher.find()) {// 不包含链接
|
| | | if (text.length() > 256) {
|
| | | out.print(JsonUtil.loadFalseResult("值过长"));
|
| | | return;
|
| | | }
|
| | | String pattern = "^[A-Za-z0-9-]+$";
|
| | | if (Pattern.matches(pattern, text.replace(" ", ""))) {//删除空格
|
| | | out.println(JsonUtil.loadFalseResult("不支持推荐"));
|
| | |
| | | FROM (SELECT ho.`ho_id` FROM yeshi_ec_hongbao_order ho |
| | | LEFT JOIN ( |
| | | SELECT * FROM yeshi_ec_hongbao_v2 v2 |
| | | WHERE v2.`hb_uid`= ${uid} AND (v2.`hb_type` = 1 OR v2.`hb_type` = 2) |
| | | WHERE v2.`hb_uid`= ${uid} and v2.hb_state!=4 AND (v2.`hb_type` = 1 OR v2.`hb_type` = 2) |
| | | ) hb ON hb.hb_id=ho.`ho_hongbao_id` <!-- 自购订单 --> |
| | | LEFT JOIN yeshi_ec_common_order co ON co.`co_id`=ho.`ho_order_id` |
| | | WHERE hb.hb_id IS NOT NULL |
| | |
| | | FROM (SELECT ho.`ho_id` FROM yeshi_ec_hongbao_order ho |
| | | LEFT JOIN ( |
| | | SELECT * FROM yeshi_ec_hongbao_v2 v2 |
| | | WHERE v2.`hb_uid`= ${uid} AND v2.`hb_type` = 20 |
| | | WHERE v2.`hb_uid`= ${uid} AND v2.`hb_type` = 20 and v2.hb_state!=4 |
| | | ) hb ON hb.hb_id=ho.`ho_hongbao_id` <!-- 分享订单 --> |
| | | |
| | | LEFT JOIN yeshi_ec_common_order co ON co.`co_id`=ho.`ho_order_id` |
| | | WHERE hb.hb_id IS NOT NULL |
| | | WHERE hb.hb_id IS NOT NULL and hb.hb_state!=4 |
| | | <if test="state != null"> |
| | | AND co.`co_state` = ${state} |
| | | </if> |
| | |
| | | SELECT * FROM yeshi_ec_hongbao_v2 v2 |
| | | WHERE v2.`hb_uid`= ${uid} |
| | | AND (v2.`hb_type` = 5 OR v2.`hb_type` = 6 OR v2.`hb_type` = 7 |
| | | OR v2.`hb_type` = 21 OR v2.`hb_type` = 22 ) |
| | | OR v2.`hb_type` = 21 OR v2.`hb_type` = 22 ) and v2.hb_state!=4 |
| | | ) hbp ON hbp.hb_pid=ho.`ho_hongbao_id` |
| | | LEFT JOIN yeshi_ec_common_order co ON co.`co_id`=ho.`ho_order_id` |
| | | WHERE hbp.hb_id IS NOT NULL |
| | | WHERE hbp.hb_id IS NOT NULL and hbp.hb_state!=4 |
| | | <if test="state != null"> |
| | | AND co.`co_state` = ${state} |
| | | </if> |
| | |
| | | hb.hb_id=ho.`ho_hongbao_id` |
| | | <!-- 自购订单 --> |
| | | LEFT JOIN yeshi_ec_common_order co ON co.`co_id`=ho.`ho_order_id` |
| | | WHERE hb.hb_id IS NOT NULL |
| | | WHERE hb.hb_id IS NOT NULL and hb.hb_state!=4 |
| | | <if test="day != null and day == 1"> |
| | | <!-- 今天 --> |
| | | AND TO_DAYS(co.`co_third_create_time`) = TO_DAYS(NOW()) |
| | |
| | | = 20 ) hb ON hb.hb_id=ho.`ho_hongbao_id` |
| | | <!-- 分享订单 --> |
| | | LEFT JOIN yeshi_ec_common_order co ON co.`co_id`=ho.`ho_order_id` |
| | | WHERE hb.hb_id IS NOT NULL |
| | | WHERE hb.hb_id IS NOT NULL and hb.hb_state!=4 |
| | | <if test="day != null and day == 1"> |
| | | <!-- 今天 --> |
| | | AND TO_DAYS(co.`co_third_create_time`) = TO_DAYS(NOW()) |
| | |
| | | (v2.`hb_type` = 5 OR v2.`hb_type` = 6 OR v2.`hb_type` = 7 OR |
| | | v2.`hb_type` = 21 OR v2.`hb_type` = 22 ) ) hbp ON |
| | | hbp.hb_pid=ho.`ho_hongbao_id` LEFT JOIN yeshi_ec_common_order co ON |
| | | co.`co_id`=ho.`ho_order_id` WHERE hbp.hb_id IS NOT NULL |
| | | co.`co_id`=ho.`ho_order_id` WHERE hbp.hb_id IS NOT NULL and hbp.hb_state!=4 |
| | | <if test="day != null and day == 1"> |
| | | <!-- 今天 --> |
| | | AND TO_DAYS(co.`co_third_create_time`) = TO_DAYS(NOW()) |
| | |
| | | import com.yeshi.fanli.service.inter.goods.TaoBaoGoodsBriefService;
|
| | | import com.yeshi.fanli.service.inter.hongbao.HongBaoManageService;
|
| | | import com.yeshi.fanli.service.inter.lable.QualityGoodsService;
|
| | | import com.yeshi.fanli.service.inter.taobao.TaoBaoGoodsUpdateService;
|
| | | import com.yeshi.fanli.service.inter.taobao.TaoBaoShopService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
| | |
|
| | | @Resource
|
| | | private TaoBaoGoodsBriefService taoBaoGoodsBriefService;
|
| | |
|
| | | @Resource
|
| | | private TaoBaoGoodsUpdateService taoBaoGoodsUpdateService;
|
| | |
|
| | | @Override
|
| | | public List<BrandClassShop> getExistByShopIds(List<Long> list) {
|
| | |
| | |
|
| | | @Override
|
| | | @Transactional
|
| | | public void changeShopInfo(MultipartFile file, Long id, Long cid, String shopName, Integer state, Integer top,String key)
|
| | | throws BrandClassShopException {
|
| | | public void changeShopInfo(MultipartFile file, Long id, Long cid, String shopName, Integer state, Integer top,
|
| | | String key) throws BrandClassShopException {
|
| | |
|
| | | if (id == null) {
|
| | | throw new BrandClassShopException(1, "数据为空:请选择店铺");
|
| | |
| | | for (BrandClassShop brandClassShop : listQuery) {
|
| | | TaoBaoShop shop = brandClassShop.getShop();
|
| | | if (shop != null) {
|
| | | long couponNum = commonGoodsService.countBySellerIdAndHasCoupon(shop.getId(), Constant.SOURCE_TYPE_TAOBAO);
|
| | | long couponNum = commonGoodsService.countBySellerIdAndHasCoupon(shop.getId(),
|
| | | Constant.SOURCE_TYPE_TAOBAO);
|
| | | brandClassShop.setCouponNum(couponNum);
|
| | |
|
| | | String shopLink = shop.getShopLink();
|
| | |
| | | return data;
|
| | | }
|
| | |
|
| | | |
| | | |
| | | @Override
|
| | | @Cacheable(value = "brandCache", key = "'listEffectiveCacheV2-'+#page+'-'+#cid")
|
| | | public JSONObject listEffectiveCacheV2(int page, Long cid) {
|
| | |
| | |
|
| | | List<GoodsDetailVO> listGoods = new ArrayList<GoodsDetailVO>();
|
| | | List<TaoBaoGoodsBrief> listGoodsBrief = taoBaoShopVO.getListGoodsBrief();
|
| | | // 商品添加到更新队列
|
| | | taoBaoGoodsUpdateService.addUpdateQueueAsync(listGoodsBrief);
|
| | | for (TaoBaoGoodsBrief taoBaoGoodsBrief : listGoodsBrief) {
|
| | | GoodsDetailVO goodsDetailVO = GoodsDetailVOFactory.convertTaoBao(taoBaoGoodsBrief, null, fanLiRate, shareRate);
|
| | | GoodsDetailVO goodsDetailVO = GoodsDetailVOFactory.convertTaoBao(taoBaoGoodsBrief, null, fanLiRate,
|
| | | shareRate);
|
| | | listGoods.add(goodsDetailVO);
|
| | | }
|
| | | taoBaoShopVO.setListGoodsVO(listGoods);
|
| | |
| | |
|
| | | return data;
|
| | | }
|
| | | |
| | | |
| | |
|
| | | @Override
|
| | | public void addClick(Long shopId) {
|
| | |
| | |
|
| | | TaoBaoGoodsBrief taoBaoGoodsBrief = TaoBaoUtil.convert(daTaoKe);
|
| | | BigDecimal proportion = hongBaoManageService.getFanLiRate();
|
| | | TaoBaoGoodsBriefExtra goodsExtra = TaoBaoUtil.getTaoBaoGoodsBriefExtra(taoBaoGoodsBrief,
|
| | | proportion.toString(), null);
|
| | | TaoBaoGoodsBriefExtra goodsExtra = TaoBaoUtil.getTaoBaoGoodsBriefExtra(taoBaoGoodsBrief, proportion.toString(),
|
| | | null);
|
| | |
|
| | | if (!goodsExtra.isCoupon() || (goodsExtra.getState() != null && goodsExtra.getState() == 1)) {
|
| | | return addSuccess; // 已下架 、无券 不加入
|
| | |
| | | return list;
|
| | | }
|
| | |
|
| | | |
| | | @Override
|
| | | @Cacheable(value = "dynamicCache", key = "'queryV2-'+#platform+'-'+#version+'-'+#start+'-'+#count+'-'+#cid+'-'+#subId")
|
| | | public List<DynamicInfo> queryV2(int platform, int version, int start, int count, Long cid, Long subId) {
|
| | | List<DynamicInfo> listNew = new ArrayList<DynamicInfo>();
|
| | | List<DynamicInfo> list = dynamicInfoDao.query(start, count, cid, subId);
|
| | | // 需要更新的商品
|
| | | List<TaoBaoGoodsBrief> taoBaoGoodsUpdateList = new ArrayList<>();
|
| | | if (list != null && list.size() > 0) {
|
| | | BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
|
| | | BigDecimal shareRate = hongBaoManageService.getShareRate();
|
| | |
| | | continue;
|
| | | }
|
| | |
|
| | | taoBaoGoodsUpdateList.add(goods);
|
| | |
|
| | | GoodsPicture goodsNew = new GoodsPicture();
|
| | | try {
|
| | | PropertyUtils.copyProperties(goodsNew, goodsPicture);
|
| | |
| | | continue;
|
| | | }
|
| | |
|
| | | GoodsDetailVO detailVO = GoodsDetailVOFactory.convertTaoBaoGoodsBriefExtra(goods, fanLiRate, shareRate);
|
| | | GoodsDetailVO detailVO = GoodsDetailVOFactory.convertTaoBaoGoodsBriefExtra(goods, fanLiRate,
|
| | | shareRate);
|
| | | goodsNew.setGoodsVO(detailVO);
|
| | | goodsNew.setGoods(null);
|
| | |
|
| | | JumpDetailV2 jumpDetail = goodsNew.getJumpDetail();
|
| | | if (jumpDetail != null) {
|
| | | JumpDetailV2 jumpDetailV2 = jumpDetailV2Service.getByTypeCache(jumpDetail.getType(), platform, version);
|
| | | JumpDetailV2 jumpDetailV2 = jumpDetailV2Service.getByTypeCache(jumpDetail.getType(),
|
| | | platform, version);
|
| | | if (jumpDetailV2 != null) {
|
| | | goodsNew.setJumpDetail(jumpDetailV2);
|
| | | }
|
| | |
| | | updateGoodInfo(list);
|
| | | }
|
| | | });
|
| | |
|
| | | taoBaoGoodsUpdateService.addUpdateQueueAsync(taoBaoGoodsUpdateList);
|
| | | return listNew;
|
| | | }
|
| | | |
| | |
|
| | | /**
|
| | | * 更新商品信息
|
| | |
| | | @Resource
|
| | | private AppVersionService appVersionService;
|
| | |
|
| | | |
| | | @Override
|
| | | public void pushGoods(Long uid, String title, String content, String url, List<String> listIOS,
|
| | | List<String> listAndroid) throws PushException {
|
| | |
| | | throw new PushException(1, "请填写推送标题");
|
| | | if (StringUtil.isNullOrEmpty(content))
|
| | | throw new PushException(1, "请填写推送内容");
|
| | | |
| | |
|
| | | /* IOS端推送 (注明:list等于 'null' 时全推, size等于0 不做推送) */
|
| | | if (listIOS == null || listIOS.size() > 0) {
|
| | |
| | | if(listAndroid == null || (listAndroid.size() > 0 && versions != null && versions.trim().length() > 0)) {
|
| | | xmPushService.pushGoods(uid, Long.parseLong(gid), title, content, versions);
|
| | | }
|
| | | // 华为推送
|
| | | if (listAndroid == null || listAndroid.size() > 0) {
|
| | | List<Integer> versionCodeList = null;
|
| | | if (listAndroid != null)
|
| | | versionCodeList = appVersionService.listVersionCodeByVersions("android", listAndroid);
|
| | | hwPushService.pushGoods(uid, Long.parseLong(gid), title, content, versionCodeList);
|
| | | }
|
| | | |
| | | }
|
| | |
|
| | | PushRecord pushRecord = new PushRecord();
|
| | | pushRecord.setUid(uid);
|
| | |
| | | pushRecordMapper.insertSelective(pushRecord);
|
| | | }
|
| | |
|
| | | |
| | | @Override
|
| | | public void pushUrl(Long uid, String title, String content, String url, List<String> listIOS,
|
| | | List<String> listAndroid) throws PushException {
|
| | |
| | | throw new PushException(1, "无推送标题");
|
| | | if (StringUtil.isNullOrEmpty(content))
|
| | | throw new PushException(1, "无推送内容");
|
| | | |
| | |
|
| | | /* IOS端推送 (注明:list等于 'null' 时全推, size等于0 不做推送) */
|
| | | if (listIOS == null || listIOS.size() > 0) {
|
| | |
| | | if(listAndroid == null || (listAndroid.size() > 0 && versions != null && versions.trim().length() > 0)) {
|
| | | xmPushService.pushUrl(uid, url, title, content, versions);
|
| | | }
|
| | | }
|
| | |
|
| | | // 华为推送
|
| | | if (listAndroid == null || listAndroid.size() > 0) {
|
| | | List<Integer> versionCodeList = null;
|
| | | if (listAndroid != null)
|
| | | versionCodeList = appVersionService.listVersionCodeByVersions("android", listAndroid);
|
| | | hwPushService.pushUrl(uid, url, title, content, versionCodeList);
|
| | | }
|
| | | }
|
| | |
|
| | | PushRecord pushRecord = new PushRecord();
|
| | | pushRecord.setUid(uid);
|
| | |
| | | pushRecordMapper.insertSelective(pushRecord);
|
| | | }
|
| | |
|
| | | |
| | | @Override
|
| | | public void pushZNX(Long uId, String title, String content, List<String> listIOS,
|
| | | List<String> listAndroid) throws PushException {
|
| | | public void pushZNX(Long uId, String title, String content, List<String> listIOS, List<String> listAndroid)
|
| | | throws PushException {
|
| | | if (StringUtil.isNullOrEmpty(title))
|
| | | throw new PushException(1, "无推送标题");
|
| | | if (StringUtil.isNullOrEmpty(content))
|
| | |
| | | accountMessageMapper.insertSelective(accountMessage);
|
| | | }
|
| | |
|
| | | |
| | | /* IOS端推送 (注明:list等于 'null' 时全推, size等于0 不做推送) */
|
| | | if (listIOS == null || listIOS.size() > 0) {
|
| | | // 限制推送版本号:0
|
| | |
| | | if(listAndroid == null || (listAndroid.size() > 0 && versions != null && versions.trim().length() > 0)) {
|
| | | xmPushService.pushZNX(uId, accountMessage, systemZnx, versions);
|
| | | }
|
| | | }
|
| | |
|
| | | // 华为推送
|
| | | if (listAndroid == null || listAndroid.size() > 0) {
|
| | | List<Integer> versionCodeList = null;
|
| | | if (listAndroid != null)
|
| | | versionCodeList = appVersionService.listVersionCodeByVersions("android", listAndroid);
|
| | | hwPushService.pushZNX(uId, title, content, versionCodeList);
|
| | | }
|
| | | }
|
| | |
|
| | | // 插入推送记录
|
| | | PushRecord pushRecord = new PushRecord();
|
| | |
| | | pushRecord.setCreatetime(java.lang.System.currentTimeMillis());
|
| | | pushRecordMapper.insertSelective(pushRecord);
|
| | | }
|
| | |
|
| | |
|
| | | @Override
|
| | | public void pushWEEX(Long uid, String title, String content, String weexUrl, List<String> listIOS,
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | // 华为推送
|
| | | if (listAndroid == null || listAndroid.size() > 0) {
|
| | | List<Integer> versionCodeList = null;
|
| | | if (listAndroid != null)
|
| | | versionCodeList = appVersionService.listVersionCodeByVersions("android", listAndroid);
|
| | | hwPushService.pushWEEX(uid, title, content, weexUrl, versionCodeList);
|
| | | }
|
| | |
|
| | | // 插入推送记录
|
| | | PushRecord pushRecord = new PushRecord();
|
| | |
| | | pushRecord.setCreatetime(java.lang.System.currentTimeMillis());
|
| | | pushRecordMapper.insertSelective(pushRecord);
|
| | | }
|
| | |
|
| | |
|
| | | @Override
|
| | | public void pushBaiChuanUrl(Long uid, String title, String content, String url, List<String> listIOS,
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | // 华为推送
|
| | | if (listAndroid == null || listAndroid.size() > 0) {
|
| | | List<Integer> versionCodeList = null;
|
| | | if (listAndroid != null)
|
| | | versionCodeList = appVersionService.listVersionCodeByVersions("android", listAndroid);
|
| | | hwPushService.pushBaiChuanUrl(uid, title, content, url, versionCodeList);
|
| | | }
|
| | |
|
| | | // 插入推送记录
|
| | | PushRecord pushRecord = new PushRecord();
|
| | |
| | | pushRecordMapper.insertSelective(pushRecord);
|
| | | }
|
| | |
|
| | | |
| | | @Override
|
| | | public void pushWelfareCenter(Long uid, String title, String content, List<String> listIOS,
|
| | | List<String> listAndroid) throws PushException {
|
| | |
| | | throw new PushException(1, "无推送标题");
|
| | | if (StringUtil.isNullOrEmpty(content))
|
| | | throw new PushException(1, "无推送内容");
|
| | | |
| | |
|
| | | /* IOS端推送 (注明:list等于 'null' 时全推, size等于0 不做推送) */
|
| | | if (listIOS == null || listIOS.size() > 0) {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | // 华为推送
|
| | | if (listAndroid == null || listAndroid.size() > 0) {
|
| | | List<Integer> versionCodeList = null;
|
| | | if (listAndroid != null)
|
| | | versionCodeList = appVersionService.listVersionCodeByVersions("android", listAndroid);
|
| | | hwPushService.pushWelfareCenter(uid, title, content, versionCodeList);
|
| | | }
|
| | |
|
| | | // 插入推送记录
|
| | | PushRecord pushRecord = new PushRecord();
|
| | |
| | | pushRecordMapper.insertSelective(pushRecord);
|
| | | }
|
| | |
|
| | | |
| | | |
| | | /**
|
| | | * 查询能推送版本号
|
| | | * |
| | | * @param versionCode
|
| | | * @param listVersion
|
| | | * @return
|
| | |
| | | return versions;
|
| | | }
|
| | |
|
| | | |
| | | /**
|
| | | * 查询能推送版本号code
|
| | | * |
| | | * @param versionCode
|
| | | * @param listVersion
|
| | | * @return
|
| | |
| | | * @param auctionId
|
| | | * @return
|
| | | */
|
| | | public static String createGoodsParams(Long auctionId) {
|
| | | public static String createGoodsParams(Long auctionId, Integer goodsType) {
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("id", auctionId);
|
| | | if (goodsType != null)
|
| | | data.put("goodsType", goodsType);
|
| | | return data.toString();
|
| | | }
|
| | |
|
| | |
| | | ca.setTime(time);
|
| | | ca.add(Calendar.MONTH, -1);
|
| | |
|
| | | String timeF = TimeUtil.getGernalTime(ca.getTimeInMillis(), "yyyy年MM月");
|
| | | String timeF = TimeUtil.getGernalTime(ca.getTimeInMillis(), "yyyy.M");
|
| | |
|
| | | UserMoneyDetail detail = new UserMoneyDetail();
|
| | | detail.setCreateTime(new Date());
|
| | |
| | | ca.setTime(time);
|
| | | ca.add(Calendar.MONTH, -1);
|
| | |
|
| | | String timeF = TimeUtil.getGernalTime(ca.getTimeInMillis(), "yyyy年MM月");
|
| | | String timeF = TimeUtil.getGernalTime(ca.getTimeInMillis(), "yyyy.M");
|
| | |
|
| | | UserMoneyDetail detail = new UserMoneyDetail();
|
| | | detail.setCreateTime(new Date());
|
| | |
| | | }
|
| | |
|
| | | static String jdGoodsJs = null;
|
| | |
|
| | | public static String getJDGoodsId(String url) {
|
| | | static ScriptEngine engine = null;
|
| | | static {
|
| | | if (jdGoodsJs == null)
|
| | | jdGoodsJs = getJDGoodsJS();
|
| | | ScriptEngineManager manager = new ScriptEngineManager();
|
| | | ScriptEngine engine = manager.getEngineByName("javascript");
|
| | | engine = manager.getEngineByName("javascript");
|
| | | try {
|
| | | engine.eval(jdGoodsJs);
|
| | | } catch (Exception e) {
|
| | | }
|
| | | }
|
| | |
|
| | | public static String getJDGoodsId(String url) {
|
| | | try {
|
| | | if (engine instanceof Invocable) {
|
| | | Invocable in = (Invocable) engine;
|
| | | String goodsId = in.invokeFunction("getGoodsId", url).toString();
|
| | |
| | | import javax.script.Invocable;
|
| | | import javax.script.ScriptEngine;
|
| | | import javax.script.ScriptEngineManager;
|
| | | import javax.script.ScriptException;
|
| | |
|
| | | import org.apache.commons.httpclient.HttpClient;
|
| | | import org.apache.commons.httpclient.methods.PostMethod;
|
| | |
| | | }
|
| | |
|
| | | static String jdGoodsJs = null;
|
| | |
|
| | | public static String getPDDGoodsId(String url) {
|
| | | static ScriptEngine engine = null;
|
| | | static {
|
| | | if (jdGoodsJs == null)
|
| | | jdGoodsJs = getJDGoodsJS();
|
| | | ScriptEngineManager manager = new ScriptEngineManager();
|
| | | ScriptEngine engine = manager.getEngineByName("javascript");
|
| | | engine = manager.getEngineByName("javascript");
|
| | | try {
|
| | | engine.eval(jdGoodsJs);
|
| | | } catch (ScriptException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | public static String getPDDGoodsId(String url) {
|
| | |
|
| | | try {
|
| | | if (engine instanceof Invocable) {
|
| | | Invocable in = (Invocable) engine;
|
| | | String goodsId = in.invokeFunction("getGoodsId", url).toString();
|