| | |
| | |
|
| | | // 获取浏览记录
|
| | | @RequestMapping(value = "getscanhistory", method = RequestMethod.POST) |
| | | public void getScanHistory(AcceptData acceptData, String uid, int page, Integer goodsType, PrintWriter out) {
|
| | | public void getScanHistory(AcceptData acceptData, String uid, int page, PrintWriter out) {
|
| | | |
| | | if (page < 0) {
|
| | | out.print(JsonUtil.loadFalseResult(1, "page不小于0"));
|
| | |
| | | return;
|
| | | }
|
| | | List<ScanHistoryV2> list = scanHistoryV2Service.getScanHistoryByDeviceOrUid( |
| | | StringUtil.isNullOrEmpty(uid) ? null : Long.parseLong(uid), acceptData.getDevice(), page, 20, goodsType); |
| | | StringUtil.isNullOrEmpty(uid) ? null : Long.parseLong(uid), acceptData.getDevice(), page, 20, Constant.SOURCE_TYPE_TAOBAO); |
| | | long count = scanHistoryV2Service.getCountByDeviceOrUid( |
| | | StringUtil.isNullOrEmpty(uid) ? null : Long.parseLong(uid), acceptData.getDevice(), goodsType);
|
| | | StringUtil.isNullOrEmpty(uid) ? null : Long.parseLong(uid), acceptData.getDevice(), Constant.SOURCE_TYPE_TAOBAO);
|
| | |
|
| | |
|
| | | |
| | |
| | | }
|
| | |
|
| | | @RequestMapping(value = "deletescanhistory", method = RequestMethod.POST)
|
| | | public void deleteScanHistory(AcceptData acceptData, String type, String uid, String ids, |
| | | Integer goodsType, PrintWriter out) {
|
| | | public void deleteScanHistory(AcceptData acceptData, String type, String uid, String ids, PrintWriter out) {
|
| | | BusinessSystem sys = businessSystemService.getBusinessSystem(acceptData.getPlatform(),
|
| | | acceptData.getPackages());
|
| | | if (sys == null) {
|
| | |
| | | for (String auctionIdStr : idStr) {
|
| | | scanHistoryV2Service.deleteByAuctionIdAndDeviceOrUid(
|
| | | StringUtil.isNullOrEmpty(uid) ? null : Long.parseLong(uid), acceptData.getDevice(),
|
| | | Long.parseLong(auctionIdStr), goodsType);
|
| | | Long.parseLong(auctionIdStr));
|
| | | }
|
| | | } else {
|
| | | scanHistoryV2Service.deleteByDeviceOrUid(StringUtil.isNullOrEmpty(uid) ? null : Long.parseLong(uid),
|
| | | acceptData.getDevice(), goodsType);
|
| | | acceptData.getDevice());
|
| | | }
|
| | | out.print(JsonUtil.loadTrueResult(""));
|
| | |
|
| | |
| | | }
|
| | |
|
| | | String token = "";
|
| | | if (!StringUtil.isNullOrEmpty(tb.getCouponLink())) {
|
| | | if (!StringUtil.isNullOrEmpty(tb.getCouponLink())
|
| | | && VersionUtil.greaterThan_1_5_60(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | token = redisManager.getCommonTaoToken(tb.getAuctionId());
|
| | | if (StringUtil.isNullOrEmpty(token)) {
|
| | | token = TaoKeApiUtil.getTKToken(tb.getPictUrl(), tb.getTitle(), tb.getCouponLink());
|