| | |
| | |
|
| | | import com.google.gson.Gson;
|
| | | import com.google.gson.GsonBuilder;
|
| | | import com.yeshi.fanli.dao.dynamic.DynamicInfoDao;
|
| | | import com.yeshi.fanli.dao.mybatis.help.HelpCenterMapper;
|
| | | import com.yeshi.fanli.dto.jd.JDSearchResult;
|
| | | import com.yeshi.fanli.entity.bus.activity.ActivityShareResult;
|
| | | import com.yeshi.fanli.entity.bus.activity.RecommendActivity;
|
| | | import com.yeshi.fanli.entity.dynamic.DynamicInfo;
|
| | | import com.yeshi.fanli.entity.dynamic.GoodsPicture;
|
| | | import com.yeshi.fanli.entity.dynamic.InviteMaterial;
|
| | | import com.yeshi.fanli.entity.jd.JDGoods;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBriefExtra;
|
| | | import com.yeshi.fanli.exception.ActivityException;
|
| | | import com.yeshi.fanli.exception.share.UserShareGoodsRecordException;
|
| | | import com.yeshi.fanli.exception.taobao.TaobaoGoodsDownException;
|
| | |
| | |
|
| | | import net.sf.json.JSONArray;
|
| | | import net.sf.json.JSONObject;
|
| | | import redis.clients.jedis.JedisPool;
|
| | |
|
| | | @Controller
|
| | | @RequestMapping("test")
|
| | |
| | |
|
| | | @Resource
|
| | | private ConfigService configService;
|
| | | |
| | |
|
| | | @Resource
|
| | | private HongBaoManageService hongBaoManageService;
|
| | |
|
| | | @Resource
|
| | | private InviteMaterialService inviteMaterialService;
|
| | | |
| | | |
| | | @Resource
|
| | | private DynamicInfoDao dynamicInfoDao;
|
| | | |
| | | |
| | |
|
| | | @Resource
|
| | | private JedisPool jedisPool;
|
| | | |
| | |
|
| | | @RequestMapping(value = "testimg")
|
| | | public void testImg(HttpServletRequest request, PrintWriter out) {
|
| | |
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | /**
|
| | | * 插入邀请素材
|
| | | * |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "getJingFenList")
|
| | |
| | | Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
|
| | | .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
|
| | | for (JDGoods goods : goodsList) {
|
| | | GoodsDetailVO goodsDetailVO = GoodsDetailVOFactory.convertJDGoods(goods, null, fanLiRate,
|
| | | shareRate);
|
| | | GoodsDetailVO goodsDetailVO = GoodsDetailVOFactory.convertJDGoods(goods, fanLiRate, shareRate);
|
| | | array.add(gson.toJson(goodsDetailVO));
|
| | | }
|
| | | }
|
| | |
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | |
| | | |
| | | |
| | | /**
|
| | | * 插入邀请素材
|
| | | * |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "queryExistsId")
|
| | | public void queryExistsAuctionId(PrintWriter out) {
|
| | | try {
|
| | | List<DynamicInfo> list = dynamicInfoDao.queryExistsAuctionId();
|
| | | for (DynamicInfo dynamicInfo: list) {
|
| | | List<GoodsPicture> imgs = dynamicInfo.getImgs();
|
| | | if (imgs == null || imgs.size() == 0) {
|
| | | continue;
|
| | | }
|
| | | |
| | | boolean update = false;
|
| | | for (GoodsPicture goodsPicture: imgs) {
|
| | | TaoBaoGoodsBriefExtra goods = goodsPicture.getGoods();
|
| | | if (goods == null) {
|
| | | continue;
|
| | | }
|
| | | |
| | | if (goods.getAuctionId() == null) {
|
| | | update = true;
|
| | | goods.setAuctionId(goods.getId());
|
| | | }
|
| | | }
|
| | | |
| | | if (update) {
|
| | | dynamicInfo.setImgs(imgs);
|
| | | dynamicInfoDao.updateGoodInfo(dynamicInfo);
|
| | | }
|
| | | }
|
| | | JsonUtil.printMode(out, null, JsonUtil.loadTrueResult("操作成功"));
|
| | | // JsonUtil.printMode(out, null, JsonUtil.loadTrueResult(JsonUtil.getSimpleGson().toJson(list)));
|
| | | } catch (Exception e) {
|
| | | JsonUtil.printMode(out, null, JsonUtil.loadFalseResult("操作失败"));
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | @RequestMapping(value = "getWaitingThreadsCount")
|
| | | public void getWaitingThreadsCount(PrintWriter out) {
|
| | | out.print(Constant.waitingThreadSet.size());
|
| | | |
| | | }
|
| | | }
|