Merge remote-tracking branch 'origin/master'
| | |
| | | import java.util.Date;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | | import javax.servlet.http.HttpServletRequest;
|
| | | import javax.servlet.http.HttpServletResponse;
|
| | |
|
| | | import org.springframework.stereotype.Controller;
|
| | |
| | |
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoUnionAuthRecord;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.service.inter.taobao.TaoBaoUnionAuthRecordService;
|
| | | import com.yeshi.fanli.service.inter.user.UserExtraTaoBaoInfoService;
|
| | | import com.yeshi.fanli.util.AESUtil;
|
| | |
| | | private TaoBaoUnionAuthRecordService taoBaoUnionAuthRecordService;
|
| | |
|
| | | @RequestMapping(value = "tb")
|
| | | public void tb(String code, String state, HttpServletResponse response) {
|
| | | if (StringUtil.isNullOrEmpty(code) || StringUtil.isNullOrEmpty(state))
|
| | | {
|
| | | public void tb(String code, String state, HttpServletRequest request, HttpServletResponse response) {
|
| | | LogHelper.test("淘宝授权回调:" + request.getRequestURI());
|
| | | if (StringUtil.isNullOrEmpty(code) || StringUtil.isNullOrEmpty(state)) {
|
| | | try {
|
| | | response.sendRedirect("http://apph5.yeshitv.com/apppage/flq_bonusState.html?code=1");
|
| | | } catch (IOException e1) {
|
| | |
| | | import com.yeshi.fanli.service.inter.lable.QualityGoodsService;
|
| | | import com.yeshi.fanli.service.inter.monitor.MonitorService;
|
| | | import com.yeshi.fanli.service.inter.order.OrderService;
|
| | | import com.yeshi.fanli.service.inter.order.ShareGoodsActivityOrderService;
|
| | | import com.yeshi.fanli.service.inter.taobao.TaoBaoGoodsUpdateService;
|
| | | import com.yeshi.fanli.service.inter.taobao.TaoBaoUnionConfigService;
|
| | | import com.yeshi.fanli.service.inter.user.ShamUserService;
|
| | |
| | |
|
| | | @Resource
|
| | | private UserCustomSettingsService userCustomSettingsService;
|
| | |
|
| | | @Resource
|
| | | private ShareGoodsActivityOrderService shareGoodsActivityOrderService;
|
| | |
|
| | | @RequestMapping(value = "getrecommendsection")
|
| | | public void getRecommendSection(AcceptData acceptData, int index, PrintWriter out) {
|
| | |
| | | new BigDecimal(hongBaoManageService.get("share_activity_proportion"))));
|
| | | shareActivity.put("ruleDescPicture", "http://img.flqapp.com/resource/share_activity_img.png");
|
| | |
|
| | | data.put("shareActivity", shareActivity);
|
| | | if (!StringUtil.isNullOrEmpty(uid)
|
| | | && shareGoodsActivityOrderService.countShareGoodsActivityOrder(Long.parseLong(uid)) > 0) {
|
| | | } else
|
| | | data.put("shareActivity", shareActivity);
|
| | |
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | |
|
| | |
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | | import org.yeshi.utils.encrypt.DESUtil;
|
| | |
|
| | | import com.alipay.api.AlipayApiException;
|
| | | import com.yeshi.fanli.entity.accept.AcceptData;
|
| | |
| | | }
|
| | |
|
| | | redisManager.clearSMSFrequencyLimit(phone, SMSHistory.TYPE_LOGIN);
|
| | | }
|
| | |
|
| | | if (!StringUtil.isNullOrEmpty(tbSession)) {
|
| | | try {
|
| | | tbSession = DESUtil.decode(tbSession.replace("\n", ""), StringUtil.getBase64String("YeShiFANLI889*+"),
|
| | | StringUtil.getBase64String("*M#34f?,"));
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | JSONObject tbs = JSONObject.fromObject(tbSession);
|
| | | tbOpenid = tbs.optString("openId");
|
| | | tbNickName = tbs.optString("nick");
|
| | | tbPortrait = tbs.optString("avatarUrl");
|
| | | }
|
| | |
|
| | | UserInfo tbUserInfo = new UserInfo();
|
| | |
| | | }
|
| | |
|
| | | if (!StringUtil.isNullOrEmpty(tbSession)) {
|
| | | try {
|
| | | tbSession = DESUtil.decode(tbSession.replace("\n", ""), StringUtil.getBase64String("YeShiFANLI889*+"),
|
| | | StringUtil.getBase64String("*M#34f?,"));
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | JSONObject session = JSONObject.fromObject(tbSession);
|
| | | tbOpenid = session.optString("openId");
|
| | | tbNickName = session.optString("nick");
|
| | |
| | | out.print(JsonUtil.loadFalseResult(1, "暂不开放申请"));
|
| | | return;
|
| | | }
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | |
|
| | | //
|
| | | UserExtraTaoBaoInfo user = userExtraTaoBaoInfoService.getByUid(uid);
|
| | |
| | | if (first)
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | else
|
| | | out.print(JsonUtil.loadTrue(0, data, "绑定淘宝失败"));
|
| | | out.print(JsonUtil.loadTrue(0, data, "淘宝授权未成功,请稍后再试"));
|
| | | }
|
| | | }
|
| | |
| | | import java.util.Set;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | | import javax.servlet.http.HttpSession;
|
| | |
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "getHomeMsgList", method = RequestMethod.POST)
|
| | | public void getHomeMsgList(AcceptData acceptData, Long uid, int page, PrintWriter out) {
|
| | | public void getHomeMsgList(AcceptData acceptData, Long uid, int page, HttpSession session, PrintWriter out) {
|
| | | if (uid == null) {
|
| | | out.print(JsonUtil.loadFalseResult(1, "用户未登录"));
|
| | | return;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | if (canAdd) {
|
| | | if (canAdd && session.getAttribute("recommendgoods") == null) {
|
| | | session.setAttribute("recommendgoods", 1);
|
| | | if (hour < 12)
|
| | | addRecommendGoods(uid);
|
| | | else
|
| | | addRecommendGoods(uid, acceptData.getImei(), acceptData.getIdfa());
|
| | | session.removeAttribute("recommendgoods");
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | out.print(JsonUtil.loadFalseResult(1, "用户未登录"));
|
| | | return;
|
| | | }
|
| | | userMsgReadStateService.setAllMsgRead(uid);
|
| | |
|
| | | UserMsgUnReadNum num = userMsgReadStateService.getReadStateByUid(uid);
|
| | | int totalNum = num.getTypeAccount() + num.getTypeInvite() + num.getTypeMoney() + num.getTypeOrder()
|
| | | + num.getTypeScore() + num.getTypeSystem();
|
| | | if (totalNum == 0) {
|
| | | out.print(JsonUtil.loadFalseResult(1, "没有未读消息"));
|
| | | return;
|
| | | } else
|
| | | userMsgReadStateService.setAllMsgRead(uid);
|
| | | out.print(JsonUtil.loadTrueResult(""));
|
| | | }
|
| | |
|
| | |
| | | if (!StringUtil.isNullOrEmpty(orderId) && orderId.length() > 6) {
|
| | | orderId = orderId.substring(orderId.length() - 6, orderId.length());
|
| | | UserExtraTaoBaoInfo info = userExtraTaoBaoInfoService.getByUid(uid);
|
| | | if (info != null && !StringUtil.isNullOrEmpty(info.getTaoBaoUid())) {
|
| | | userExtraTaoBaoInfoService.bindTaoBaoOrderEnd6Num(info.getTaoBaoUid(), orderId);
|
| | | if (info != null) {
|
| | | UserExtraTaoBaoInfo update=new UserExtraTaoBaoInfo();
|
| | | update.setId(info.getId());
|
| | | update.setTaoBaoOrderEnd6Num(orderId);
|
| | | userExtraTaoBaoInfoService.updateSelective(update);
|
| | | }
|
| | | }
|
| | | out.print(JsonUtil.loadTrueResult(""));
|
| | |
| | | import com.yeshi.fanli.service.inter.msg.UserAccountMsgNotificationService;
|
| | | import com.yeshi.fanli.service.inter.user.SpreadUserImgService;
|
| | | import com.yeshi.fanli.service.inter.user.UserAccountService;
|
| | | import com.yeshi.fanli.service.inter.user.UserExtraTaoBaoInfoService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.FileUtil;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
| | |
|
| | | @Resource
|
| | | private UserAccountMsgNotificationService userAccountMsgNotificationService;
|
| | | |
| | | @Resource
|
| | | private UserExtraTaoBaoInfoService userExtraTaoBaoInfoService;
|
| | |
|
| | | @Transactional
|
| | | @Override
|
| | |
| | | }
|
| | |
|
| | | userInfoMapper.updateByPrimaryKeySelective(update);
|
| | | |
| | | userExtraTaoBaoInfoService.unBindUid(uid);
|
| | |
|
| | | userAccountMsgNotificationService.unBindingSuccess(uid, MsgAccountDetailFactory.TYPE_TB);
|
| | | }
|