| | |
| | |
|
| | | import java.io.BufferedReader;
|
| | | import java.io.IOException;
|
| | | import java.io.InputStream;
|
| | | import java.io.InputStreamReader;
|
| | | import java.io.PrintWriter;
|
| | | import java.math.BigDecimal;
|
| | | import java.security.SignatureException;
|
| | | import java.util.ArrayList;
|
| | | import java.util.Date;
|
| | | import java.util.HashMap;
|
| | | import java.util.Iterator;
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | |
|
| | |
| | |
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.springframework.web.multipart.MultipartFile;
|
| | | import org.springframework.web.multipart.MultipartHttpServletRequest;
|
| | | import org.yeshi.utils.taobao.TbImgUtil;
|
| | | import org.yeshi.utils.wx.WXUtil;
|
| | |
|
| | |
| | | JSONObject data = JSONObject.fromObject(contentDecode).optJSONObject("data");
|
| | |
|
| | | JSONArray array = data.optJSONObject("recommend").optJSONArray("resultList");
|
| | | |
| | | long startTime=System.currentTimeMillis();
|
| | | |
| | |
|
| | | long startTime = System.currentTimeMillis();
|
| | |
|
| | | for (int i = array.size() - 1; i >= 0; i--) {
|
| | | JSONObject item = array.optJSONObject(i);
|
| | | String title = item.optString("itemName");
|
| | |
| | |
|
| | | ActivityUser user = ruleList.get((int) (ruleList.size() * Math.random())).getActivityUser();
|
| | | try {
|
| | | goodsEvaluateService.addGoodsEvaluate(itemId + "", imageList, user, doc, null, new Date(startTime-1000*60*20L*i));
|
| | | goodsEvaluateService.addGoodsEvaluate(itemId + "", imageList, user, doc, null,
|
| | | new Date(startTime - 1000 * 60 * 20L * i));
|
| | | } catch (GoodsEvaluateException e) {
|
| | | e.printStackTrace();
|
| | | }catch(Exception e){
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | @RequestMapping(value = "yhg/groupmsg")
|
| | | public void groupMsg(HttpServletRequest request, PrintWriter out) {
|
| | | StringBuilder stringBuilder = new StringBuilder();
|
| | | try {
|
| | | byte[] buffer = new byte[2048];
|
| | | int readBytes = 0;
|
| | | while ((readBytes = request.getInputStream().read(buffer)) > 0) {
|
| | | stringBuilder.append(new String(buffer, 0, readBytes));
|
| | | }
|
| | | } catch (IOException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | LogHelper.test("云发单回调内容:"+stringBuilder.toString());
|
| | | }
|
| | |
|
| | | }
|