| | |
| | |
|
| | | import javax.servlet.http.HttpServletRequest;
|
| | |
|
| | | import com.yeshi.fanli.entity.accept.AcceptData;
|
| | | import com.yeshi.fanli.util.SystemInfoUtil;
|
| | | import org.aspectj.lang.ProceedingJoinPoint;
|
| | | import org.aspectj.lang.Signature;
|
| | | import org.aspectj.lang.annotation.Around;
|
| | |
| | | import com.yeshi.fanli.util.annotation.RequestNoSignValidate;
|
| | |
|
| | | import net.sf.json.JSONObject;
|
| | | import org.yeshi.utils.SystemUtil;
|
| | |
|
| | | //客户端接口签名验证
|
| | | @Component
|
| | |
| | |
|
| | | @Around(EDP)
|
| | | public Object appH5Around(ProceedingJoinPoint joinPoint) throws IOException {
|
| | |
|
| | | Object[] args = joinPoint.getArgs();
|
| | | ServletRequestAttributes servletContainer = (ServletRequestAttributes) RequestContextHolder
|
| | | .getRequestAttributes();
|
| | | HttpServletRequest request = servletContainer.getRequest();
|
| | |
|
| | | AcceptData acceptData = null;
|
| | | for (Object obj : args) {
|
| | | if (obj instanceof AcceptData) {
|
| | | acceptData = (AcceptData) obj;
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | Signature signature = joinPoint.getSignature();
|
| | | MethodSignature methodSignature = (MethodSignature) signature;
|
| | |
| | | e2.printStackTrace();
|
| | | }
|
| | |
|
| | | Object[] args = joinPoint.getArgs();
|
| | | // 判断是否有忽略验证的注解
|
| | | if (realMethod != null && realMethod.isAnnotationPresent(RequestNoSignValidate.class)) {
|
| | | if(acceptData!=null){
|
| | | acceptData.setSystem(SystemInfoUtil.getSystem(acceptData));
|
| | | }
|
| | |
|
| | | try {
|
| | | return joinPoint.proceed(args);
|
| | | } catch (Throwable e) {
|
| | |
| | |
|
| | | // 签名是否正确
|
| | | if (isRight) {
|
| | | if(acceptData!=null){
|
| | | acceptData.setSystem(SystemInfoUtil.getSystem(acceptData));
|
| | | }
|
| | | Object obj = null;
|
| | | try {
|
| | | obj = joinPoint.proceed(args);
|
| | |
| | | package com.yeshi.fanli.controller;
|
| | |
|
| | | import java.io.IOException;
|
| | | import java.io.PrintWriter;
|
| | | import java.io.UnsupportedEncodingException;
|
| | | import java.net.URLDecoder;
|
| | | import java.util.Date;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | | import javax.servlet.http.HttpServletRequest;
|
| | | import javax.servlet.http.HttpServletResponse;
|
| | |
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.user.UserActiveLog;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfoModifyRecord.ModifyTypeEnum;
|
| | |
| | | import com.yeshi.fanli.service.inter.user.msg.UserAccountMsgNotificationService;
|
| | | import com.yeshi.fanli.service.inter.user.tb.TaoBaoUnionAuthRecordService;
|
| | | import com.yeshi.fanli.service.inter.user.tb.UserExtraTaoBaoInfoService;
|
| | | import com.yeshi.fanli.util.AESUtil;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.RedisKeyEnum;
|
| | | import com.yeshi.fanli.util.RedisManager;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.TaoBaoConstant;
|
| | | import com.yeshi.fanli.util.ThreadUtil;
|
| | | import com.yeshi.fanli.util.VersionUtil;
|
| | | import com.yeshi.fanli.util.*;
|
| | | import com.yeshi.fanli.util.taobao.TaoKeApiUtil;
|
| | |
|
| | | import net.sf.json.JSONObject;
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | | import javax.servlet.http.HttpServletRequest;
|
| | | import javax.servlet.http.HttpServletResponse;
|
| | | import java.io.IOException;
|
| | | import java.io.PrintWriter;
|
| | | import java.io.UnsupportedEncodingException;
|
| | | import java.net.URLDecoder;
|
| | | import java.util.Date;
|
| | |
|
| | | /**
|
| | | * 授权回调
|
| | |
| | | // 计入记录
|
| | |
|
| | | try {
|
| | | //
|
| | | String result = TaoKeApiUtil.getAccessToken(code, TaoBaoConstant.TAOBAO_AUTH_APPKEY,
|
| | | TaoBaoConstant.TAOBAO_AUTH_APPSECRET);
|
| | | JSONObject data = JSONObject.fromObject(result);
|
| | |
| | | final String relationId2 = relationId;
|
| | | // 异步申请会员ID
|
| | | final Long fuid = uid;
|
| | | ThreadUtil.run(new Runnable() {
|
| | |
|
| | | @Override
|
| | | public void run() {
|
| | | String specialId = null;
|
| | | try {
|
| | | specialId = TaoKeApiUtil.getSpecialId(accessToken, TaoBaoConstant.TAOBAO_AUTH_APPKEY,
|
| | | TaoBaoConstant.TAOBAO_AUTH_APPSECRET);
|
| | | } catch (TaoBaoAuthException e1) {
|
| | | LogManager.getLogger(LogType.taobaoAuth).error(fuid + "会员备案失败:" + e1.getMessage());
|
| | | }
|
| | |
|
| | | try {
|
| | | userExtraTaoBaoInfoService.addSpecialId(fuid, specialId, taoBaoUid, name, true);
|
| | |
|
| | | if (!StringUtil.isNullOrEmpty(specialId) && !StringUtil.isNullOrEmpty(relationId2))
|
| | | userInfoModifyRecordService.addModifyRecord(fuid, ModifyTypeEnum.bindTaoBao, taoBaoUid);
|
| | | } catch (UserExtraTaoBaoInfoException e) {
|
| | | LogHelper.test(e.getMsg());
|
| | | }
|
| | | }
|
| | | });
|
| | | // ThreadUtil.run(new Runnable() {
|
| | | //
|
| | | // @Override
|
| | | // public void run() {
|
| | | // String specialId = null;
|
| | | // try {
|
| | | // specialId = TaoKeApiUtil.getSpecialId(accessToken, TaoBaoConstant.TAOBAO_AUTH_APPKEY,
|
| | | // TaoBaoConstant.TAOBAO_AUTH_APPSECRET);
|
| | | // } catch (TaoBaoAuthException e1) {
|
| | | // LogManager.getLogger(LogType.taobaoAuth).error(fuid + "会员备案失败:" + e1.getMessage());
|
| | | // }
|
| | | //
|
| | | // try {
|
| | | // userExtraTaoBaoInfoService.addSpecialId(fuid, specialId, taoBaoUid, name, true);
|
| | | //
|
| | | // if (!StringUtil.isNullOrEmpty(specialId) && !StringUtil.isNullOrEmpty(relationId2))
|
| | | // userInfoModifyRecordService.addModifyRecord(fuid, ModifyTypeEnum.bindTaoBao, taoBaoUid);
|
| | | // } catch (UserExtraTaoBaoInfoException e) {
|
| | | // LogHelper.test(e.getMsg());
|
| | | // }
|
| | | // }
|
| | | // });
|
| | |
|
| | | // 稍作延迟
|
| | | Thread.sleep(50);
|
| | |
| | | if (e.getCode() == TaoBaoAuthException.CODE_NOT_REAL_NAME)
|
| | | userAccountMsgNotificationService.taoBaoAuthFail(uid, name, "淘宝账号未实名");
|
| | | LogManager.getLogger(LogType.taobaoAuth).error(uid + "会员备案失败:" + e.getMessage());
|
| | |
|
| | | LogHelper.test("淘宝授权:"+uid + "会员备案失败:" + e.getMessage());
|
| | | }
|
| | |
|
| | | LogHelper.test("淘宝授权:"+specialId);
|
| | |
|
| | | try {
|
| | | userExtraTaoBaoInfoService.addSpecialId(uid, specialId, taoBaoUid, nickName, true);
|
| | |
| | |
|
| | | final String specialId2 = specialId;
|
| | | // 异步申请渠道ID
|
| | | ThreadUtil.run(new Runnable() {
|
| | |
|
| | | @Override
|
| | | public void run() {
|
| | | String relationId = null;
|
| | | try {
|
| | | relationId = TaoKeApiUtil.getRelationId(accessToken, TaoBaoConstant.TAOBAO_AUTH_APPKEY,
|
| | | TaoBaoConstant.TAOBAO_AUTH_APPSECRET);
|
| | | } catch (TaoBaoAuthException e1) {
|
| | | LogManager.getLogger(LogType.taobaoAuth).error(fuid + "渠道备案失败:" + e1.getMessage());
|
| | | }
|
| | | try {
|
| | | userExtraTaoBaoInfoService.addRelationId(fuid, relationId, taoBaoUid, name, true);
|
| | |
|
| | | if (!StringUtil.isNullOrEmpty(specialId2) && !StringUtil.isNullOrEmpty(relationId))
|
| | | userInfoModifyRecordService.addModifyRecord(fuid, ModifyTypeEnum.bindTaoBao, taoBaoUid);
|
| | | } catch (UserExtraTaoBaoInfoException e) {
|
| | | LogHelper.test(e.getMsg());
|
| | | }
|
| | | }
|
| | | });
|
| | | // ThreadUtil.run(new Runnable() {
|
| | | //
|
| | | // @Override
|
| | | // public void run() {
|
| | | // String relationId = null;
|
| | | // try {
|
| | | // relationId = TaoKeApiUtil.getRelationId(accessToken, TaoBaoConstant.TAOBAO_AUTH_APPKEY,
|
| | | // TaoBaoConstant.TAOBAO_AUTH_APPSECRET);
|
| | | // } catch (TaoBaoAuthException e1) {
|
| | | // LogManager.getLogger(LogType.taobaoAuth).error(fuid + "渠道备案失败:" + e1.getMessage());
|
| | | // }
|
| | | // try {
|
| | | // userExtraTaoBaoInfoService.addRelationId(fuid, relationId, taoBaoUid, name, true);
|
| | | //
|
| | | // if (!StringUtil.isNullOrEmpty(specialId2) && !StringUtil.isNullOrEmpty(relationId))
|
| | | // userInfoModifyRecordService.addModifyRecord(fuid, ModifyTypeEnum.bindTaoBao, taoBaoUid);
|
| | | // } catch (UserExtraTaoBaoInfoException e) {
|
| | | // LogHelper.test(e.getMsg());
|
| | | // }
|
| | | // }
|
| | | // });
|
| | | // 稍作延迟
|
| | | Thread.sleep(50);
|
| | |
|
| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | |
| | | @RequestMapping(value = "query")
|
| | | public void query(String callback, AcceptData acceptData, Long pageId, Integer pageSize, String key, Long cid,
|
| | | PrintWriter out) {
|
| | | //其他APP无帮助中心列表
|
| | | acceptData.setSystem(SystemEnum.blks);
|
| | | try {
|
| | | if (pageSize == null)
|
| | | pageSize = Constant.PAGE_SIZE;
|
| | |
| | | public void getRecommendIndex(AcceptData acceptData, Long uid, PrintWriter out) {
|
| | | try {
|
| | | // 获取设备定义性别
|
| | | int deviceSex = deviceSexService.getDeviceSex(acceptData.getDevice());
|
| | | int deviceSex = deviceSexService.getDeviceSex(acceptData.getDevice(),acceptData.getSystem());
|
| | |
|
| | | // 1、专题模块
|
| | | JSONObject root = specialService.listCacheSpecialToIndex(acceptData, deviceSex,acceptData.getSystem());
|
| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemFunction;
|
| | | import com.yeshi.fanli.util.SystemInfoUtil;
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | if(SystemInfoUtil.hasFunctions(acceptData.getSystem(), SystemFunction.threeSale)) {
|
| | | String inviteCode = userInfoExtraService.getInviteCodeByUid(uid);
|
| | | if (StringUtil.isNullOrEmpty(inviteCode)) {
|
| | | out.print(JsonUtil.loadFalseResult(3, "请激活邀请码"));
|
| | | return;
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | UserExtraTaoBaoInfo user = userExtraTaoBaoInfoService.getByUid(uid);
|
| | |
| | | import javax.annotation.Resource;
|
| | | import javax.servlet.http.HttpServletRequest;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import com.yeshi.fanli.entity.SystemFunction;
|
| | | import com.yeshi.fanli.util.*;
|
| | | import org.apache.commons.beanutils.PropertyUtils;
|
| | | import org.springframework.stereotype.Controller;
|
| | |
| | | data.put("welfareCenterNews", welfareCenterNews);// 福利中心消息
|
| | | data.put("vipLink", userVipConfigService.getValueByKey("vip_link"));// 超级会员升级链接
|
| | |
|
| | | if(SystemInfoUtil.hasFunctions(acceptData.getSystem(), SystemFunction.bindPhone)) {
|
| | | // 2.0.1之后绑定手机号
|
| | | if (VersionUtil.greaterThan_2_0_1(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | boolean bindPhone = false;
|
| | |
| | | bindPhone = bindRemindService.bindRemind(uid, BindRemind.TYPE_PHONE);
|
| | | data.put("bindPhone", bindPhone);
|
| | | }
|
| | | }
|
| | |
|
| | | if (!StringUtil.isNullOrEmpty(invitCode)) {
|
| | | // 2.0.6 返回邀请人
|
| | |
| | | import javax.annotation.Resource;
|
| | | import javax.servlet.http.HttpSession;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.springframework.web.bind.annotation.RequestMethod;
|
| | |
| | | @RequestMapping("api/v1/user/msg")
|
| | | public class UserMsgController {
|
| | |
|
| | | @Resource
|
| | | private BusinessSystemService businessSystemService;
|
| | |
|
| | | @Resource
|
| | | private MsgOrderDetailService msgOrderDetailService;
|
| | |
|
| | |
| | |
|
| | | @Resource
|
| | | private UserInfoExtraService userInfoExtraService;
|
| | |
|
| | | @Resource
|
| | | private ConfigService configService;
|
| | |
|
| | | // 消息的类型
|
| | | final static String MSG_TYPE_ORDER = "order";
|
| | |
| | | // 创建时间在28号后的才有新人欢迎
|
| | | if ((time > TimeUtil.convertToTimeTemp("2019-01-28", "yyyy-MM-dd") || uid == null)) {
|
| | | UserHomeMsgVO vo = new UserHomeMsgVO();
|
| | | vo.setContent(String.format("恭喜你,成为%s的用户\n独家优惠券帮你省钱;\n参与奖金活动帮你赚钱;\n让%s成为你的省钱助手吧!",
|
| | | Constant.getAppName(acceptData.getPlatform(), acceptData.getVersion()),
|
| | | Constant.getAppName(acceptData.getPlatform(), acceptData.getVersion())));
|
| | | vo.setContent(configService.getValue(ConfigKeyEnum.welcomeMsg, acceptData.getSystem()));
|
| | | if (acceptData.getSystem() == SystemEnum.blks)
|
| | | vo.setTitle("新人欢迎");
|
| | | else
|
| | | vo.setTitle("欢迎新人");
|
| | | vo.setCreateTime(getTimeDesc(now, new Date(time)));
|
| | | vo.setType(UserHomeMsgVO.TYPE_WELCOME);
|
| | | volist.add(vo);
|
| | |
| | | }
|
| | |
|
| | | // 人工客服
|
| | | if (acceptData.getSystem() == SystemEnum.blks)
|
| | | commonMsgList.add(getKeFuMsg(acceptData));
|
| | |
|
| | | // 推荐记录
|
| | |
| | | // 创建时间在28号后的才有新人欢迎
|
| | | if ((time > TimeUtil.convertToTimeTemp("2019-01-28", "yyyy-MM-dd") || uid == null)) {
|
| | | Map<String, Object> map = new HashMap<String, Object>();
|
| | | if (acceptData.getSystem() == SystemEnum.blks)
|
| | | map.put("title", "新人欢迎");
|
| | | else
|
| | | map.put("title", "欢迎新人");
|
| | | map.put("content",
|
| | | String.format("恭喜你,成为%s的用户\n独家优惠券帮你省钱;\n参与奖金活动帮你赚钱;\n让%s成为你的省钱助手吧!",
|
| | | Constant.getAppName(acceptData.getPlatform(), acceptData.getVersion()),
|
| | | Constant.getAppName(acceptData.getPlatform(), acceptData.getVersion())));
|
| | | configService.getValue(ConfigKeyEnum.welcomeMsg, acceptData.getSystem()));
|
| | | map.put("createTime", new Date(time));
|
| | | UserMsgCenter msgCenternre = new UserMsgCenter();
|
| | | msgCenternre.setWelcomeMsg(map);
|
| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.yeshi.fanli.util.SystemInfoUtil;
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | |
| | |
|
| | | @RequestMapping("getMianDanGoodsList")
|
| | | public void getMianDanGoodsList(AcceptData acceptData, PrintWriter out, int page, int pageSize, String callback) {
|
| | | if (acceptData.getSystem() == null)
|
| | | acceptData.setSystem(SystemInfoUtil.getSystem(acceptData));
|
| | |
|
| | | List<QualityFactory> listQuery = qualityGoodsService.listFreeGoods((page - 1) * pageSize, pageSize);
|
| | | if (listQuery == null || listQuery.size() == 0) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(2, "没有更多了"));
|
| | |
| | |
|
| | | @RequestMapping("getMianDanInfo")
|
| | | public void getMianDanInfo(AcceptData acceptData, PrintWriter out, Long uid, String callback) {
|
| | | if (acceptData.getSystem() == null)
|
| | | acceptData.setSystem(SystemInfoUtil.getSystem(acceptData));
|
| | | if (uid == null) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("用户未登录"));
|
| | | return;
|
| | |
| | | */
|
| | | @RequestMapping("getRewardCouponInfo")
|
| | | public void getRewardCouponInfo(AcceptData acceptData, PrintWriter out, Long uid, String callback) {
|
| | | if (acceptData.getSystem() == null)
|
| | | acceptData.setSystem(SystemInfoUtil.getSystem(acceptData));
|
| | | if (uid == null) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("用户未登录"));
|
| | | return;
|
| | |
| | | @RequestMapping("getFreeGoodsList")
|
| | | public void getFreeGoodsList(AcceptData acceptData, String callback, Long uid, int page, int goodsType,
|
| | | PrintWriter out) {
|
| | | if (acceptData.getSystem() == null)
|
| | | acceptData.setSystem(SystemInfoUtil.getSystem(acceptData));
|
| | | if (uid == null) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("用户未登录"));
|
| | | return;
|
| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.yeshi.fanli.util.SystemInfoUtil;
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.yeshi.utils.DateUtil;
|
| | |
| | | */
|
| | | @RequestMapping("getGoodsList")
|
| | | public void getGoodsList(AcceptData acceptData, String callback, Long uid, Integer page, PrintWriter out) {
|
| | | if (acceptData.getSystem() == null)
|
| | | acceptData.setSystem(SystemInfoUtil.getSystem(acceptData));
|
| | | JSONArray array = new JSONArray();
|
| | | List<PullNewGoods> list = pullNewGoodsService.listQuery((page-1)*Constant.PAGE_SIZE, Constant.PAGE_SIZE);
|
| | | if (list != null && list.size() > 0) {
|
| | |
| | | */
|
| | | @RequestMapping("getRankList")
|
| | | public void getRankList(AcceptData acceptData, String callback, Long uid, PrintWriter out) {
|
| | | if (acceptData.getSystem() == null)
|
| | | acceptData.setSystem(SystemInfoUtil.getSystem(acceptData));
|
| | | JSONArray array = new JSONArray();
|
| | | List<UserRankings> list = userRankingsService.getRankList(0, 10);
|
| | | if (list != null && list.size() > 0) {
|
| | |
| | | */
|
| | | @RequestMapping("getShareImg")
|
| | | public void getShareImg(AcceptData acceptData, String callback, Long uid, PrintWriter out) {
|
| | | if (acceptData.getSystem() == null)
|
| | | acceptData.setSystem(SystemInfoUtil.getSystem(acceptData));
|
| | | if (uid == null) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("用户未登录"));
|
| | | return;
|
| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.yeshi.fanli.util.SystemInfoUtil;
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | |
| | |
|
| | | @RequestMapping("getTLJBuyGoods")
|
| | | public void getTLJBuyGoods(AcceptData acceptData, PrintWriter out, String callback) {
|
| | | if (acceptData.getSystem() == null)
|
| | | acceptData.setSystem(SystemInfoUtil.getSystem(acceptData));
|
| | | //
|
| | | List<TLJBuyGoods> goodsList = tljBuyGoodsService
|
| | | .listByDay(TimeUtil.getGernalTime(System.currentTimeMillis(), "yyyy-MM-dd"));
|
| | |
| | | */
|
| | | @RequestMapping("getShareHotGoods")
|
| | | public void getShareHotGoods(AcceptData acceptData, PrintWriter out, String callback) {
|
| | | if (acceptData.getSystem() == null)
|
| | | acceptData.setSystem(SystemInfoUtil.getSystem(acceptData));
|
| | | List<ShareHotGoods> goodsList = shareHotGoodsService
|
| | | .listByDay(TimeUtil.getGernalTime(System.currentTimeMillis(), "yyyy-MM-dd"));
|
| | | int count = goodsList.size();
|
| | |
| | | * 动态
|
| | | *
|
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | @Controller
|
| | | @RequestMapping("api/v2/config")
|
| | |
| | | }
|
| | |
|
| | | /**
|
| | | * |
| | | * @Title: getElemeLinkNew
|
| | | * @Description: |
| | | * @param acceptData
|
| | | * @param uid
|
| | | * @param activityId 活动ID
|
| | | * @param share -是否为分享
|
| | | * @param callback
|
| | | * @param out |
| | | * void 返回类型
|
| | | * @param out void 返回类型
|
| | | * @throws
|
| | | * @Title: getElemeLinkNew
|
| | | * @Description:
|
| | | */
|
| | | @RequestMapping(value = "getElemeLinkNew")
|
| | | public void getElemeLinkNew(AcceptData acceptData, Long uid, String activityId, boolean share, boolean shareImg,
|
| | |
| | |
|
| | | /**
|
| | | * 是否显示广告
|
| | | * @Title: showAd
|
| | | * @Description: |
| | | *
|
| | | * @param acceptData
|
| | | * @param uid
|
| | | * @param out |
| | | * void 返回类型
|
| | | * @param out void 返回类型
|
| | | * @throws
|
| | | * @Title: showAd
|
| | | * @Description:
|
| | | */
|
| | | @RequestMapping(value = "getShowAd")
|
| | | public void showAd(AcceptData acceptData, Long uid, PrintWriter out) {
|
| | |
| | | if ("0".equalsIgnoreCase(value.trim())) {
|
| | | data.put("show", false);
|
| | | } else {
|
| | | if (huaweiShowAd)
|
| | | if (huaweiShowAd) {
|
| | | data.put("show", true);
|
| | | else
|
| | | //加载广告数据
|
| | | data.put("ad", configService.getValue(ConfigKeyEnum.gdtAdInfo, acceptData.getSystem()));
|
| | | } else
|
| | | data.put("show", false);
|
| | | }
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | |
| | |
|
| | | /**
|
| | | * 获取注销协议
|
| | | *
|
| | | * @param acceptData
|
| | | * @param out
|
| | | */
|
| | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.yeshi.fanli.entity.SystemEnum; |
| | | import com.yeshi.fanli.entity.SystemFunction; |
| | | import com.yeshi.fanli.exception.taobao.TaoBaoConvertLinkException; |
| | | import com.yeshi.fanli.service.manger.goods.TaoBaoLinkManager; |
| | | import com.yeshi.fanli.util.*; |
| | |
| | | * 动态 |
| | | * |
| | | * @author Administrator |
| | | * |
| | | */ |
| | | @Controller |
| | | @RequestMapping("api/v2/dynamic") |
| | |
| | | |
| | | if (VersionUtil.greaterThan_2_0_7(acceptData.getPlatform(), acceptData.getVersion())) { |
| | | // 2.0.7返回发圈+活动+学院+素材 |
| | | if (acceptData.getSystem() == SystemEnum.blks) { |
| | | list.add(map.get(TYPE_FAQUAN)); |
| | | list.add(map.get(TYPE_HUODONG)); |
| | | // list.add(map.get(TYPE_XUEYUAN)); |
| | | list.add(map.get(TYPE_SUCAI)); |
| | | } else { |
| | | list.add(map.get(TYPE_FAQUAN)); |
| | | } |
| | | } else if (VersionUtil.greaterThan_2_0_6(acceptData.getPlatform(), acceptData.getVersion())) { |
| | | // 2.0.6返回热销+活动+推荐+学院+邀请 |
| | | list.add(map.get(TYPE_REXIAO)); |
| | |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * @param acceptData |
| | | * @param uid |
| | | * @param id |
| | | * @param type |
| | | * 1-放大 2-保存 3-分享 |
| | | * @param type 1-放大 2-保存 3-分享 |
| | | * @param goodsId |
| | | * @param goodsType |
| | | * @param out |
| | |
| | | out.print(JsonUtil.loadFalseResult(2, "淘宝未授权,请前往\"我的\"绑定淘宝账号")); |
| | | return; |
| | | } |
| | | |
| | | String inviteCode = userInfoExtraService.getInviteCodeByUid(uid); |
| | | if (SystemInfoUtil.hasFunctions(acceptData.getSystem(), SystemFunction.threeSale)) { |
| | | inviteCode = userInfoExtraService.getInviteCodeByUid(uid); |
| | | if (StringUtil.isNullOrEmpty(inviteCode)) { |
| | | out.print(JsonUtil.loadFalseResult(1, "邀请码未激活")); |
| | | return; |
| | | } |
| | | } |
| | | |
| | | List<ImgInfo> imgs = goodsEvaluate.getImgList(); |
| | |
| | | * |
| | | * @param acceptData |
| | | * @param id |
| | | * @param cid |
| | | * 评论id |
| | | * @param cid 评论id |
| | | * @param out |
| | | */ |
| | | @RequestMapping(value = "evaluateComment", method = RequestMethod.POST) |
| | |
| | | |
| | | /** |
| | | * 活动分享绘图 |
| | | * @Title: createActivityShareImg |
| | | * @Description: |
| | | * |
| | | * @param type |
| | | * @param id |
| | | * @param erCodeContent |
| | | * @return |
| | | * String 返回类型 |
| | | * @return String 返回类型 |
| | | * @throws |
| | | * @Title: createActivityShareImg |
| | | * @Description: |
| | | */ |
| | | private String createActivityShareImg(String type, String id, String erCodeContent) { |
| | | |
| | |
| | | * 获取导航栏内容
|
| | | * @param acceptData
|
| | | * @param uid
|
| | | * @param sex 0通用 1男 2女
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "getHomeItems", method = RequestMethod.POST)
|
| | | public void getHomeItems(AcceptData acceptData, Long uid, PrintWriter out) {
|
| | | // 获取设备定义性别
|
| | | int deviceSex = deviceSexService.getDeviceSex(acceptData.getDevice());
|
| | | List<HomeNavbar> listNavbar = homeNavbarUserService.listEffectiveNavbar(uid, acceptData.getDevice(), deviceSex);
|
| | | int deviceSex = deviceSexService.getDeviceSex(acceptData.getDevice(),acceptData.getSystem());
|
| | | List<HomeNavbar> listNavbar = homeNavbarUserService.listEffectiveNavbar(uid, acceptData.getDevice(), deviceSex,acceptData.getSystem());
|
| | |
|
| | | List<HomeNavbar> list = new ArrayList<HomeNavbar>();
|
| | | if (listNavbar != null) {
|
| | |
| | | package com.yeshi.fanli.controller.client.v2;
|
| | |
|
| | | import java.io.PrintWriter;
|
| | | import java.math.BigDecimal;
|
| | | import java.util.ArrayList;
|
| | | import java.util.Calendar;
|
| | | import java.util.Collections;
|
| | | import java.util.List;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | | import javax.servlet.http.HttpServletRequest;
|
| | |
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | |
|
| | | import com.google.gson.Gson;
|
| | | import com.google.gson.GsonBuilder;
|
| | | import com.yeshi.fanli.dto.ConfigParamsDTO;
|
| | |
| | | import com.yeshi.fanli.dto.pdd.PDDGoodsResult;
|
| | | import com.yeshi.fanli.entity.accept.AcceptData;
|
| | | import com.yeshi.fanli.entity.bus.homemodule.Special;
|
| | | import com.yeshi.fanli.entity.bus.homemodule.SwiperPicture;
|
| | | import com.yeshi.fanli.entity.bus.user.vip.UserLevelEnum;
|
| | | import com.yeshi.fanli.entity.common.JumpDetailV2;
|
| | | import com.yeshi.fanli.entity.jd.JDGoods;
|
| | |
| | | import com.yeshi.fanli.service.inter.taobao.dataoke.DaTaoKeGoodsDetailV2Service;
|
| | | import com.yeshi.fanli.service.inter.taobao.dataoke.DaTaoKeGoodsService;
|
| | | import com.yeshi.fanli.tag.PageEntity;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.RedisKeyEnum;
|
| | | import com.yeshi.fanli.util.RedisManager;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.TaoBaoConstant;
|
| | | import com.yeshi.fanli.util.TimeUtil;
|
| | | import com.yeshi.fanli.util.VersionUtil;
|
| | | import com.yeshi.fanli.util.*;
|
| | | import com.yeshi.fanli.util.factory.MonitorFactory;
|
| | | import com.yeshi.fanli.util.factory.goods.GoodsDetailVOFactory;
|
| | | import com.yeshi.fanli.util.taobao.DaTaoKeUtil;
|
| | |
| | | import com.yeshi.fanli.vo.search.SearchKeyTOPVO;
|
| | | import com.yeshi.fanli.vo.search.SearchKeyVO;
|
| | | import com.yeshi.fanli.vo.tlj.ReduceHongBao;
|
| | |
|
| | | import net.sf.json.JSONArray;
|
| | | import net.sf.json.JSONObject;
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | | import javax.servlet.http.HttpServletRequest;
|
| | | import java.io.PrintWriter;
|
| | | import java.math.BigDecimal;
|
| | | import java.util.ArrayList;
|
| | | import java.util.Calendar;
|
| | | import java.util.Collections;
|
| | | import java.util.List;
|
| | |
|
| | | @Controller
|
| | | @RequestMapping("api/v2/recommend")
|
| | |
| | | public void getRecommendIndex(AcceptData acceptData, Long uid, PrintWriter out) {
|
| | | try {
|
| | | // 获取设备定义性别
|
| | | int deviceSex = deviceSexService.getDeviceSex(acceptData.getDevice());
|
| | | int deviceSex = deviceSexService.getDeviceSex(acceptData.getDevice(),acceptData.getSystem());
|
| | |
|
| | | // 1、专题模块
|
| | | JSONObject root = specialService.listCacheSpecialToIndex(acceptData, deviceSex,acceptData.getSystem());
|
| | |
| | | import javax.annotation.Resource;
|
| | | import javax.servlet.http.HttpServletRequest;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import com.yeshi.fanli.entity.SystemFunction;
|
| | | import com.yeshi.fanli.util.*;
|
| | | import com.yeshi.fanli.vo.taobao.TaoBaoUser;
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.springframework.web.bind.annotation.RequestMethod;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | /**
|
| | | * 淘宝登录(子APP)
|
| | | *
|
| | | * @param acceptData
|
| | | * @param userData
|
| | | * @param request
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "loginTB", method = RequestMethod.POST)
|
| | | public void loginTB(AcceptData acceptData, String userData,
|
| | | HttpServletRequest request, PrintWriter out) {
|
| | | if (acceptData.getSystem() == SystemEnum.blks) {
|
| | | out.print(JsonUtil.loadFalseResult("暂不支持此种登录方式"));
|
| | | return;
|
| | | }
|
| | | TaoBaoUser taoBaoUser = new Gson().fromJson(userData, TaoBaoUser.class);
|
| | | BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(),
|
| | | acceptData.getPackages(), acceptData.getSystem());
|
| | | if (system == null) {
|
| | | out.print(JsonUtil.loadFalseResult("系统不存在"));
|
| | | return;
|
| | | }
|
| | |
|
| | | UserInfo userInfo = null;
|
| | | try {
|
| | | userInfo = userAccountService.loginTB(new ProxyIP(request.getRemoteHost(), request.getRemotePort()), taoBaoUser, system);
|
| | | } catch (UserAccountException e) {
|
| | | out.print(JsonUtil.loadFalseResult(e.getMsg()));
|
| | | }
|
| | |
|
| | | if (userInfo == null) {
|
| | | out.print(JsonUtil.loadFalseResult("登录失败"));
|
| | | } else {
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("userInfo", UserUtil.filterForClientUser(userInfo));
|
| | | data.put("inviteCode", userInfoExtraService.getInviteCodeByUid(userInfo.getId()));
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | * 绑定电话号码 V2.0.1 微信登录
|
| | | *
|
| | |
| | | vo.setTotalInviteMoney(
|
| | | userMoneyDetailService.statisticUserTypeMoneyWithDate(uid, typeList, minDate, maxDate).abs());
|
| | |
|
| | | //累计所有
|
| | | typeList.clear();
|
| | | typeList.add(UserMoneyDetailTypeEnum.fanli);
|
| | | typeList.add(UserMoneyDetailTypeEnum.fanliNew);
|
| | | typeList.add(UserMoneyDetailTypeEnum.fanliWeiQuan);
|
| | | typeList.add(UserMoneyDetailTypeEnum.fanliWeiQuanNew);
|
| | | typeList.add(UserMoneyDetailTypeEnum.orderReward);
|
| | | typeList.add(UserMoneyDetailTypeEnum.orderRewardNew);
|
| | | typeList.add(UserMoneyDetailTypeEnum.share);
|
| | | typeList.add(UserMoneyDetailTypeEnum.shareNew);
|
| | | typeList.add(UserMoneyDetailTypeEnum.shareWeiQuan);
|
| | | vo.setTotalMoney(
|
| | | userMoneyDetailService.statisticUserTypeMoneyWithDate(uid, typeList, minDate, maxDate).abs());
|
| | |
|
| | |
|
| | |
|
| | | if (VersionUtil.greaterThan_2_1_2(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | vo.setMoneyArrivalDesc("尽早确认收货可以促使资金尽早到账");
|
| | |
| | | // 根据获WXUnionId有效用户
|
| | | UserInfo getEffectiveUserInfoByWXUnionId(@Param("unionId") String unionId, @Param("system") SystemEnum system);
|
| | |
|
| | | //根据淘宝openId获取有效用户
|
| | | UserInfo getEffectiveUserInfoByOpenId(@Param("openId") String openId, @Param("system") SystemEnum system);
|
| | |
|
| | |
|
| | |
|
| | | //根据微信openid查询
|
| | | UserInfo getEffectiveUserInfoByWXOpenId(@Param("wxOpenId") String wxOpenId, @Param("system") SystemEnum system);
|
| | |
|
| | |
| | | */ |
| | | public enum SystemEnum { |
| | | blks("com.yeshi.ec.rebate", "com.xyj.ec.fanli-ios", new String[]{}, new SystemFunction[]{ |
| | | SystemFunction.bindPhone, SystemFunction.threeSale, SystemFunction.cloudOrder, SystemFunction.godenCorn, SystemFunction.redPack |
| | | SystemFunction.bindPhone, SystemFunction.threeSale, SystemFunction.cloudOrder, SystemFunction.godenCorn, SystemFunction.redPack,SystemFunction.faQuan |
| | | }, 1, "板栗快省"), |
| | | flq("com.yeshi.ec.flq", "com.xyj.ec.flq-ios", new String[]{}, new SystemFunction[]{}, 2, "返利券"); |
| | | flq("com.fanliunion.android", "com.xyj.ec.flq-ios", new String[]{}, new SystemFunction[]{SystemFunction.faQuan}, 2, "返利联盟"); |
| | | private String packageName; |
| | | private String bundleId; |
| | | private int systemId; |
| | |
| | | godenCorn("金币"), |
| | | cloudOrder("云发单"), |
| | | redPack("红包"), |
| | | faQuan("发圈"), |
| | | vip("超级会员"); |
| | | |
| | | private SystemFunction(String desc) { |
| | |
| | | cloudAlipayJumpLink("cloud_alipay_jump_link","云发单支付跳转地址"), |
| | | cloudAlipayReturnLink("cloud_alipay_return_link","云发单支付成功后返回哪个前端页面"), |
| | | cloudAlipayNotifyLink("cloud_alipay_notify_link","云发单支付成功后回调地址"), |
| | | |
| | | clipboardRecommendGoodsMakeMore("clipboard_recommend_goods_make_more_link","根据粘贴板推荐商品赚更多链接") |
| | | ; |
| | | |
| | | |
| | | clipboardRecommendGoodsMakeMore("clipboard_recommend_goods_make_more_link", "根据粘贴板推荐商品赚更多链接"), |
| | | welcomeMsg("welcome_message", "消息页面的欢迎消息"), |
| | | gdtAdInfo("gdt_ad_info", "广点通广告信息"); |
| | | |
| | | |
| | | private final String key; |
| | |
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import com.yeshi.fanli.entity.SystemFunction;
|
| | | import com.yeshi.fanli.util.SystemInfoUtil;
|
| | | import org.apache.commons.lang.StringEscapeUtils;
|
| | | import org.springframework.scheduling.annotation.Scheduled;
|
| | | import org.springframework.stereotype.Component;
|
| | |
| | | */
|
| | | @XxlJob("dynamic-insertEvaluate")
|
| | | public ReturnT<String> insertEvaluate(String param) throws Exception {
|
| | |
|
| | | for (SystemEnum system : SystemEnum.values()) {
|
| | | if (!SystemInfoUtil.hasFunctions(system, SystemFunction.faQuan))
|
| | | continue;
|
| | | // 好单库
|
| | | boolean addResult = addHDKListSelected();
|
| | | boolean addResult = addHDKListSelected(system);
|
| | | // 大淘客备用
|
| | | if (!addResult) {
|
| | | addDTKFriendsFircleList();
|
| | | addDTKFriendsFircleList(system);
|
| | | }
|
| | | }
|
| | | return ReturnT.SUCCESS;
|
| | | }
|
| | |
| | | *
|
| | | * @return
|
| | | */
|
| | | private boolean addHDKListSelected() {
|
| | | private boolean addHDKListSelected(SystemEnum system) {
|
| | | boolean addResult = false;
|
| | | Integer minId = 1;
|
| | | while (minId != null) {
|
| | |
| | | List<ActivityRuleUser> ruleList = activityUserService.listByRuleCode(ActivityRuleUser.RULE_HAOHUO, 1, 20);
|
| | | ActivityUser user = ruleList.get((int) (ruleList.size() * Math.random())).getActivityUser();
|
| | |
|
| | | int addProcess = goodsEvaluateService.addGoodsEvaluate(TaoBaoGoodsFactory.create(hdkGoods), pics, user, showtitle, SystemEnum.blks);
|
| | | int addProcess = goodsEvaluateService.addGoodsEvaluate(TaoBaoGoodsFactory.create(hdkGoods), pics, user, showtitle, system);
|
| | | if (addProcess == 0) {
|
| | | addResult = true;
|
| | | break;
|
| | |
| | | *
|
| | | * @return
|
| | | */
|
| | | private boolean addDTKFriendsFircleList() {
|
| | | private boolean addDTKFriendsFircleList(SystemEnum system) {
|
| | | boolean addResult = false;
|
| | | try {
|
| | | DaTaoKeGoodsResult result = DaTaoKeApiUtil.getFriendsFircleList("1", 100);
|
| | |
| | | user = ruleList.get((int) (ruleList.size() * Math.random())).getActivityUser();
|
| | | }
|
| | |
|
| | | int addProcess = goodsEvaluateService.addGoodsEvaluate(TaoBaoUtil.convert(tkGoods), null, user, showtitle, SystemEnum.blks);
|
| | | int addProcess = goodsEvaluateService.addGoodsEvaluate(TaoBaoUtil.convert(tkGoods), null, user, showtitle, system);
|
| | | if (addProcess == 0) {
|
| | | addResult = true;
|
| | | break;
|
| | |
| | | private BrandInfoMapper brandInfoMapper;
|
| | |
|
| | | @Resource
|
| | | private HongBaoManageService hongBaoManageService;
|
| | | |
| | | @Resource
|
| | | private OrderHongBaoMoneyComputeService orderHongBaoMoneyComputeService;
|
| | |
|
| | | @Resource
|
| | | private QualityGoodsService qualityGoodsService;
|
| | |
|
| | | @Resource
|
| | | private TaoBaoGoodsBriefService taoBaoGoodsBriefService;
|
| | |
|
| | | @Resource
|
| | | private TaoBaoGoodsUpdateService taoBaoGoodsUpdateService;
|
| | |
|
| | | @Resource
|
| | | private BrandClassShopService brandClassShopService;
|
| | |
|
| | | @Resource
|
| | | private BrandShopCaheDao brandShopCaheDao;
|
| | |
|
| | | @Resource
|
| | | private BrandGoodsCaheService brandGoodsCaheService;
|
| | |
| | | return value;
|
| | | }
|
| | |
|
| | | @Override
|
| | | @Cacheable(value = "config", key = "'getValueByKey-'+#key+'-'+#system")
|
| | | public String getValue(ConfigKeyEnum key, SystemEnum system) {
|
| | | List<Config> list = configMapper.listByKey(key.getKey(), null, null,system);
|
| | | if (list.size() == 0) {
|
| | | return null;
|
| | | }
|
| | | String value = list.get(0).getValue();
|
| | | return value;
|
| | | }
|
| | |
|
| | |
|
| | | @Cacheable(value = "config", key = "'getByVersion'+'-'+#key+'-'+#platform+'-'+#version+'-'+#system ")
|
| | | public String getByVersion(String key, String platform, int version, SystemEnum system) {
|
| | | Integer minAndroidVersion = null;
|
| | |
| | | } |
| | | |
| | | @Override |
| | | @Cacheable(value = "dynamicCache", key = "'queryMaterialsCache-'+#start+'-'+#type") |
| | | @Cacheable(value = "dynamicCache", key = "'queryMaterialsCache-'+#start+'-'+#type+'-'+#system") |
| | | public List<GoodsEvaluate> queryMaterialsCache(int start, int count, int type, SystemEnum system) throws Exception { |
| | | List<GoodsEvaluate> list = goodsEvaluateDao.queryValid(start, count, type, system); |
| | | if (list == null) { |
| | |
| | | goodsEvaluate.setLineNum(lineNum); |
| | | goodsEvaluate.setImgList(imgList); |
| | | goodsEvaluate.setComments(commentsNew); |
| | | goodsEvaluate.setSystem(system); |
| | | goodsEvaluateDao.save(goodsEvaluate); |
| | | } |
| | | |
| | |
| | | goodsEvaluate.setLineNum(lineNum); |
| | | goodsEvaluate.setImgList(imgList); |
| | | goodsEvaluate.setComments(commentsNew); |
| | | goodsEvaluate.setSystem(system); |
| | | goodsEvaluateDao.save(goodsEvaluate); |
| | | return result; |
| | | } |
| | |
| | | goodsEvaluate.setPublishTime(new Date()); |
| | | goodsEvaluate.setCreateTime(new Date()); |
| | | goodsEvaluate.setUpdateTime(new Date()); |
| | | goodsEvaluate.setSystem(system); |
| | | |
| | | List<String> goodsimgs = goodsBrief.getImgList(); |
| | | |
| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import com.yeshi.fanli.dao.user.DeviceSexDao;
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public int getDeviceSex(String device) {
|
| | | public int getDeviceSex(String device, SystemEnum system) {
|
| | | if (system != SystemEnum.blks)
|
| | | return 0;
|
| | | String key = RedisKeyEnum.getRedisKey(RedisKeyEnum.deviceSex, device);
|
| | | String result = redisManager.getCommonString(key);
|
| | | if (!StringUtil.isNullOrEmpty(result)) {
|
| | |
| | | @Resource
|
| | | private UserInfoExtraService userInfoExtraService;
|
| | |
|
| | | @Resource
|
| | | private UserInfoService userInfoService;
|
| | |
|
| | |
|
| | | @Override
|
| | | public List<HomeNavbar> listEffectiveNavbar(Long uid, String device, Integer sex) {
|
| | | public List<HomeNavbar> listEffectiveNavbar(Long uid, String device, Integer sex,SystemEnum system) {
|
| | | List<HomeNavbar> list = new ArrayList<HomeNavbar>();
|
| | |
|
| | | SystemEnum system = userInfoService.getUserSystem(uid);
|
| | |
|
| | | if (sex == null || sex == 0) {
|
| | | if (uid != null || !StringUtil.isNullOrEmpty(device)) {
|
| | | if (uid != null) {
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | @Cacheable(value = "bannerCache", key = "'getByBannerCard-'+#card+'-'+system")
|
| | | @Cacheable(value = "bannerCache", key = "'getByBannerCard-'+#card+'-'+#system")
|
| | | public List<BannerVO> getByBannerCard(String card,SystemEnum system) {
|
| | | List<SwiperPicture> list = swiperPictureMapper.getByBannerCard(card,system);
|
| | | if (list != null && list.size() > 0) {
|
| | |
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import com.yeshi.fanli.entity.system.BusinessSystem;
|
| | | import com.yeshi.fanli.util.*;
|
| | | import com.yeshi.fanli.vo.taobao.TaoBaoUser;
|
| | | import org.springframework.context.annotation.Lazy;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
| | |
|
| | | /**
|
| | | * 根据系统与unionid寻找用户
|
| | | *
|
| | | * @param system
|
| | | * @param unionId
|
| | | * @return
|
| | |
| | |
|
| | | /**
|
| | | *根据系统和淘宝的Openid寻找用户
|
| | | *
|
| | | * @param system
|
| | | * @param openId
|
| | | * @return
|
| | |
| | |
|
| | | /**
|
| | | * 根据系统和电话号码寻找用户
|
| | | *
|
| | | * @param system
|
| | | * @param phone
|
| | | * @return
|
| | |
| | | throw new UserAccountException(10, "请稍后再试");
|
| | | }
|
| | |
|
| | | @Override
|
| | | public UserInfo loginTB(ProxyIP ipInfo, TaoBaoUser taoBaoUser, BusinessSystem businessSystem) throws UserAccountException {
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(taoBaoUser.getUserid()))
|
| | | throw new UserAccountException(1, "淘宝授权信息不完整");
|
| | |
|
| | | UserInfo userInfo = userInfoService.getEffectiveUserInfoByOpenId(taoBaoUser.getOpenId(), businessSystem.getSystem());
|
| | | if (userInfo != null) {
|
| | | // 更新账户登录信息
|
| | | updateLonginInfo(userInfo, 1, ipInfo);
|
| | | } else {
|
| | | userInfo = new UserInfo();
|
| | | userInfo.setNickName(taoBaoUser.getNick());
|
| | | userInfo.setPortrait(taoBaoUser.getAvatarUrl());
|
| | | userInfo.setAppId(businessSystem.getAppid());
|
| | | userInfo.setTaoBaoUid(taoBaoUser.getUserid());
|
| | | userInfo.setOpenid(taoBaoUser.getOpenId());
|
| | | userInfo.setLoginType(1);
|
| | | userInfo.setState(UserInfo.STATE_NORMAL);
|
| | | userInfo.setSystem(businessSystem.getSystem());
|
| | | // 创建用户
|
| | | addUser(userInfo);
|
| | | try {
|
| | | // 第一次登录时创建用户额外信息
|
| | | userInfoExtraService.createUserInfoExtra(userInfo.getId());
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | return userInfo;
|
| | | }
|
| | |
|
| | |
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | @Override
|
| | | public UserInfo loginPhoneNew(ProxyIP ipInfo, AcceptData acceptData, int loginType, String vcode, String phone, String appId)
|
| | | public UserInfo loginPhoneNew(ProxyIP ipInfo, AcceptData acceptData, int loginType, String vcode, String
|
| | | phone, String appId)
|
| | | throws UserAccountException {
|
| | | // 空额清理
|
| | | if (phone == null || phone.trim().length() == 0) {
|
| | |
| | |
|
| | |
|
| | | @Override
|
| | | public UserInfo bindWXToLogin(ProxyIP ipInfo, AcceptData acceptData, String code, String appId, String key) throws UserAccountException {
|
| | | public UserInfo bindWXToLogin(ProxyIP ipInfo, AcceptData acceptData, String code, String appId, String key) throws
|
| | | UserAccountException {
|
| | | // 日志信息
|
| | | JSONObject logInfo = new JSONObject();
|
| | | logInfo.put("appId", appId);
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public UserInfo getEffectiveUserInfoByOpenId(String openId, SystemEnum sysetm) {
|
| | | return userInfoMapper.getEffectiveUserInfoByOpenId(openId,sysetm);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public UserInfo getUserInfo(Long uid) throws UserInfoException {
|
| | | if (uid == null) {
|
| | | throw new UserInfoException(1, "请求参数为空");
|
| | |
| | | }
|
| | |
|
| | | //清除该用户的授权信息
|
| | | userExtraTaoBaoInfoMapper.clearUid(uid);
|
| | | // userExtraTaoBaoInfoMapper.clearUid(uid);
|
| | | SystemEnum system = userInfoService.getUserSystem(uid);
|
| | | List<UserExtraTaoBaoInfo> list = userExtraTaoBaoInfoMapper.listByTaoBaoUid(taoBaoUid,system);
|
| | | UserExtraTaoBaoInfo existInfo = null;
|
| | |
| | | throw new UserExtraTaoBaoInfoException(Constant.CODE_FORBIDDEN_USER, Constant.FORBIDDEN_USER_REASON_DESC);
|
| | | }
|
| | |
|
| | | userExtraTaoBaoInfoMapper.clearUid(uid);
|
| | | // userExtraTaoBaoInfoMapper.clearUid(uid);
|
| | | SystemEnum system = userInfoService.getUserSystem(uid);
|
| | |
|
| | | UserExtraTaoBaoInfo taoBaoInfo = new UserExtraTaoBaoInfo();
|
| | |
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import org.yeshi.utils.entity.ProxyIP;
|
| | |
|
| | | import com.yeshi.fanli.entity.common.Config;
|
| | |
| | |
|
| | | String getValue(String string,SystemEnum system);
|
| | |
|
| | | String getValue(ConfigKeyEnum key, SystemEnum system);
|
| | | |
| | | String getByVersion(String key,String platform,int version,SystemEnum system);
|
| | |
|
| | | Config getConfig(String key,SystemEnum system);
|
| | |
| | | package com.yeshi.fanli.service.inter.homemodule;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | |
|
| | | public interface DeviceSexService {
|
| | |
|
| | | /**
|
| | |
| | | * @param device
|
| | | * @return
|
| | | */
|
| | | public int getDeviceSex(String device);
|
| | | public int getDeviceSex(String device,SystemEnum system);
|
| | |
|
| | |
|
| | | }
|
| | |
| | | * 查询导航栏
|
| | | * @return
|
| | | */
|
| | | public List<HomeNavbar> listEffectiveNavbar(Long uid, String device, Integer sex);
|
| | | public List<HomeNavbar> listEffectiveNavbar(Long uid, String device, Integer sex,SystemEnum system);
|
| | |
|
| | | /**
|
| | | * 保存用户自定义
|
| | |
| | | import com.yeshi.fanli.entity.bus.user.WeiXinUser;
|
| | | import com.yeshi.fanli.entity.system.BusinessSystem;
|
| | | import com.yeshi.fanli.exception.user.UserAccountException;
|
| | | import com.yeshi.fanli.vo.taobao.TaoBaoUser;
|
| | | import org.yeshi.utils.entity.ProxyIP;
|
| | |
|
| | | import javax.servlet.http.HttpServletRequest;
|
| | |
| | | * 登录服务
|
| | | *
|
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | public interface UserAccountService {
|
| | | /**
|
| | |
| | |
|
| | | /**
|
| | | * 根据系统与微信unionid获取用户信息
|
| | | *
|
| | | * @param system
|
| | | * @param unionId
|
| | | * @return
|
| | |
| | |
|
| | | /**
|
| | | * 根据系统和淘宝的Openid寻找用户
|
| | | *
|
| | | * @param system
|
| | | * @param openId
|
| | | * @return
|
| | |
| | |
|
| | | /**
|
| | | * 根据系统和电话号码寻找用户
|
| | | *
|
| | | * @param system
|
| | | * @param phone
|
| | | * @return
|
| | |
| | |
|
| | | /**
|
| | | * 电话号码登录 1.5.3
|
| | | *
|
| | | * @param ipInfo
|
| | | * @param acceptData
|
| | | * @param loginType
|
| | | * @param vcode
|
| | | * @param phone
|
| | | * @param appId
|
| | | * @param businessSystem
|
| | | * @return
|
| | | * @throws UserAccountException
|
| | | */
|
| | |
| | | public UserInfo loginPhone(ProxyIP ipInfo, int loginType, String vcode, String phone, BusinessSystem businessSystem)
|
| | | throws UserAccountException;
|
| | |
|
| | | /**
|
| | | * 淘宝登录
|
| | | *
|
| | | * @param ipInfo
|
| | | * @param taoBaoUser -淘宝信息
|
| | | * @param businessSystem
|
| | | * @return
|
| | | * @throws UserAccountException
|
| | | */
|
| | | public UserInfo loginTB(ProxyIP ipInfo, TaoBaoUser taoBaoUser, BusinessSystem businessSystem)
|
| | | throws UserAccountException;
|
| | |
|
| | | /**
|
| | | * 微信登录 1.5.3
|
| | | *
|
| | | * @param ipInfo
|
| | | * @param acceptData
|
| | | * @param loginType
|
| | | * @param code
|
| | | * @param appId
|
| | | * @param businessSystem
|
| | | * @return
|
| | | * @throws UserAccountException
|
| | | */
|
| | |
| | |
|
| | | /**
|
| | | * 绑定微信 V1.5.3
|
| | | *
|
| | | * @param uid
|
| | | * @param wxUser
|
| | | * @throws UserAccountException
|
| | |
| | |
|
| | | /**
|
| | | * 2.0.1 新登录方式 -微信
|
| | | *
|
| | | * @param ipInfo
|
| | | * @param acceptData
|
| | | * @param loginType
|
| | |
| | |
|
| | | /**
|
| | | * 未注册之前绑定手机号
|
| | | *
|
| | | * @param ipinfo
|
| | | * @param acceptData
|
| | | * @param phone
|
| | |
| | |
|
| | | /**
|
| | | * 手机登录需要绑定微信
|
| | | *
|
| | | * @param ipinfo
|
| | | * @param acceptData
|
| | | * @param loginType
|
| | |
| | |
|
| | | /**
|
| | | * 绑定微信登录 + 手机号key
|
| | | *
|
| | | * @param ipInfo
|
| | | * @param acceptData
|
| | | * @param code
|
| | |
| | | */
|
| | | public UserInfo getEffectiveUserInfoByWXUnionId(String unionId, SystemEnum sysetm);
|
| | |
|
| | |
|
| | | /**
|
| | | * 获取有效用户(根据淘宝OpenId)
|
| | | * @param openId
|
| | | * @param sysetm
|
| | | * @return
|
| | | */
|
| | | public UserInfo getEffectiveUserInfoByOpenId(String openId, SystemEnum sysetm);
|
| | |
|
| | | /**
|
| | | * 获取用户余额
|
| | | *
|
| | |
| | | /**
|
| | | * 获取商品详情,简版
|
| | | *
|
| | | * @param id
|
| | | * -商品AuctionId
|
| | | * @param id -商品AuctionId
|
| | | * @return
|
| | | */
|
| | | public static TaoBaoGoodsBrief getSimpleGoodsInfo(Long id) throws TaobaoGoodsDownException {
|
| | |
| | | /**
|
| | | * 获取淘口令
|
| | | *
|
| | | * @param logo
|
| | | * -图标
|
| | | * @param text
|
| | | * -文字
|
| | | * @param url
|
| | | * -简介
|
| | | * @param logo -图标
|
| | | * @param text -文字
|
| | | * @param url -简介
|
| | | * @return
|
| | | */
|
| | | public static String getTKToken(String logo, String text, String url) {
|
| | |
| | | /**
|
| | | * 店铺搜索
|
| | | *
|
| | | * @param key
|
| | | * -店铺名称
|
| | | * @param page
|
| | | * -页码
|
| | | * @param key -店铺名称
|
| | | * @param page -页码
|
| | | * @return
|
| | | */
|
| | | public static List<TaoBaoShopInfo> searchShop(String key, int page) {
|
| | |
| | | /**
|
| | | * 店铺搜索
|
| | | *
|
| | | * @param key
|
| | | * -店铺名称
|
| | | * @param page
|
| | | * -页码
|
| | | * @param key -店铺名称
|
| | | * @param page -页码
|
| | | * @return
|
| | | */
|
| | | public static TaoBaoShopInfoDTO searchShop(String key, int page, int pageSize) {
|
| | |
| | | /**
|
| | | * 店铺搜索
|
| | | *
|
| | | * @param key
|
| | | * -店铺名称
|
| | | * @param page
|
| | | * -页码
|
| | | * @param key -店铺名称
|
| | | * @param page -页码
|
| | | * @return
|
| | | */
|
| | | public static List<TaoBaoShopInfo> searchShop(SearchShopFilter filter) {
|
| | |
| | | /**
|
| | | * 通过物料ID获取商品信息
|
| | | *
|
| | | * @param materialId
|
| | | * -物料ID
|
| | | * @param page
|
| | | * -页码
|
| | | * @param pageSize
|
| | | * -每页数量
|
| | | * @param materialId -物料ID
|
| | | * @param page -页码
|
| | | * @param pageSize -每页数量
|
| | | * @return
|
| | | */
|
| | | public static TaoBaoSearchResult getMaterialByMaterialId(int materialId, int page, int pageSize) {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public static TaoBaoGoodsBrief specialConvertCoupon(Long auctionId, TaoKeAppInfo app) {
|
| | | public static TaoBaoGoodsBrief specialConvertCoupon(Long auctionId, String specialId,String relationId, TaoKeAppInfo app) {
|
| | | String pid = app.getPid();
|
| | | String[] sts = pid.split("_");
|
| | | Map<String, String> map = new HashMap<>();
|
| | | map.put("method", "taobao.tbk.coupon.convert");
|
| | | map.put("item_id", auctionId + "");
|
| | | map.put("adzone_id", sts[3]);
|
| | | if (!StringUtil.isNullOrEmpty(specialId)) {
|
| | | map.put("special_id", specialId);
|
| | | }
|
| | | if (!StringUtil.isNullOrEmpty(relationId)) {
|
| | | map.put("relation_id", specialId);
|
| | | }
|
| | |
|
| | | try {
|
| | | String result = TaoKeBaseUtil.baseRequestForThreeTimes(map, app);
|
| | | System.out.println(result);
|
| | |
| | | }
|
| | |
|
| | | return null;
|
| | | }
|
| | |
|
| | |
|
| | | public static TaoBaoGoodsBrief specialConvertCoupon(Long auctionId, TaoKeAppInfo app) {
|
| | | return specialConvertCoupon(auctionId, null,null, app);
|
| | | }
|
| | |
|
| | | public static void juHuaSuan() {
|
| | |
| | | /**
|
| | | * 官方活动推广
|
| | | *
|
| | | * @param adZoneId
|
| | | * -广告位
|
| | | * @param adZoneId -广告位
|
| | | * @param promotionSceneId-活动ID
|
| | | * @param relationId
|
| | | * -渠道ID
|
| | | * @param relationId -渠道ID
|
| | | * @return
|
| | | */
|
| | | public static TaoKeOfficialActivityConvertResultDTO officialActivityConvert(String adZoneId,
|
| | |
| | |
|
| | | /**
|
| | | * 淘宝客-推广者-官方活动信息获取
|
| | | * @Title: getActivityInfo
|
| | | * @Description: |
| | | *
|
| | | * @param activityMaterialId
|
| | | * @param pid
|
| | | * @param relationId
|
| | | * @return |
| | | * String 返回类型
|
| | | * @return String 返回类型
|
| | | * @throws
|
| | | * @Title: getActivityInfo
|
| | | * @Description:
|
| | | */
|
| | | public static String getActivityInfo(String activityMaterialId, String pid, String relationId) {
|
| | | Map<String, String> map = new HashMap<>();
|
| | |
| | | private BigDecimal totalFanLiMoney;// 累计自购返利
|
| | | private BigDecimal totalShareMoney;// 累计分享奖金
|
| | | private BigDecimal totalInviteMoney;// 累计邀请奖金
|
| | | private BigDecimal totalMoney;//累计资金
|
| | |
|
| | | // 收货详情
|
| | | private BigDecimal monthSettleMoney;// 本月已收货
|
| | |
| | | private MoneyPredictVO monthPredict;// 本月预估
|
| | |
|
| | |
|
| | | public BigDecimal getTotalMoney() {
|
| | | return totalMoney;
|
| | | }
|
| | |
|
| | | public void setTotalMoney(BigDecimal totalMoney) {
|
| | | this.totalMoney = totalMoney;
|
| | | }
|
| | |
|
| | | public BigDecimal getBalanceMoney() {
|
| | | return balanceMoney;
|
New file |
| | |
| | | package com.yeshi.fanli.vo.taobao; |
| | | |
| | | public class TaoBaoUser { |
| | | private String userid; |
| | | private String nick; |
| | | private String avatarUrl; |
| | | private String openId; |
| | | private String openSid; |
| | | private String topAccessToken; |
| | | private String topAuthCode; |
| | | private String topExpireTime; |
| | | private String ssoToken; |
| | | private String havanaSsoToken; |
| | | |
| | | public String getUserid() { |
| | | return userid; |
| | | } |
| | | |
| | | public void setUserid(String userid) { |
| | | this.userid = userid; |
| | | } |
| | | |
| | | public String getNick() { |
| | | return nick; |
| | | } |
| | | |
| | | public void setNick(String nick) { |
| | | this.nick = nick; |
| | | } |
| | | |
| | | public String getAvatarUrl() { |
| | | return avatarUrl; |
| | | } |
| | | |
| | | public void setAvatarUrl(String avatarUrl) { |
| | | this.avatarUrl = avatarUrl; |
| | | } |
| | | |
| | | public String getOpenId() { |
| | | return openId; |
| | | } |
| | | |
| | | public void setOpenId(String openId) { |
| | | this.openId = openId; |
| | | } |
| | | |
| | | public String getOpenSid() { |
| | | return openSid; |
| | | } |
| | | |
| | | public void setOpenSid(String openSid) { |
| | | this.openSid = openSid; |
| | | } |
| | | |
| | | public String getTopAccessToken() { |
| | | return topAccessToken; |
| | | } |
| | | |
| | | public void setTopAccessToken(String topAccessToken) { |
| | | this.topAccessToken = topAccessToken; |
| | | } |
| | | |
| | | public String getTopAuthCode() { |
| | | return topAuthCode; |
| | | } |
| | | |
| | | public void setTopAuthCode(String topAuthCode) { |
| | | this.topAuthCode = topAuthCode; |
| | | } |
| | | |
| | | public String getTopExpireTime() { |
| | | return topExpireTime; |
| | | } |
| | | |
| | | public void setTopExpireTime(String topExpireTime) { |
| | | this.topExpireTime = topExpireTime; |
| | | } |
| | | |
| | | public String getSsoToken() { |
| | | return ssoToken; |
| | | } |
| | | |
| | | public void setSsoToken(String ssoToken) { |
| | | this.ssoToken = ssoToken; |
| | | } |
| | | |
| | | public String getHavanaSsoToken() { |
| | | return havanaSsoToken; |
| | | } |
| | | |
| | | public void setHavanaSsoToken(String havanaSsoToken) { |
| | | this.havanaSsoToken = havanaSsoToken; |
| | | } |
| | | } |
| | |
| | | mongo.dbname=flq
|
| | | mongo.port=27017
|
| | | mongo.port=27016
|
| | | #开发环境
|
| | | mongo.host=192.168.1.253
|
| | | mongo.username=admin
|
| | | mongo.password=123456
|
| | | #mongo.host=192.168.1.253
|
| | | #mongo.username=admin
|
| | | #mongo.password=123456
|
| | | #
|
| | | #mongo.host=193.112.35.168
|
| | | #mongo.username=yeshi
|
| | | #mongo.password=Yeshi2016@
|
| | | mongo.host=193.112.35.168
|
| | | mongo.username=yeshi
|
| | | mongo.password=Yeshi2016@
|
| | |
|
| | | mongo.connectionsPerHost=8
|
| | | mongo.threadsAllowedToBlockForConnectionMultiplier=4
|
| | |
| | | </select> |
| | | |
| | | |
| | | <select id="selectByKey" resultMap="BaseResultMap" |
| | | parameterType="java.lang.String"> |
| | | <select id="selectByKey" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_hongbao_manage where `key` = #{key} AND system=#{system} order by validtime |
| | |
| | | LIMIT 1 |
| | | </select> |
| | | |
| | | <select id="getEffectiveUserInfoByOpenId" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_user |
| | | where identifycode=#{openId} AND system=#{system} AND state = 0 |
| | | LIMIT 1 |
| | | </select> |
| | | |
| | | |
| | | <select id="getEffectiveUserInfoByWXOpenId" resultMap="BaseResultMap"> |
| | | select |
| | |
| | | |
| | | <select id="listEffective" resultMap="BaseResultMap"> |
| | | SELECT * FROM yeshi_ec_brand_class_shop b |
| | | LEFT JOIN `yeshi_ec_taobao_shop_info` p ON b.`bcs_shop_id` = p.`tsi_id` left join yeshi_ec_brand_class_system_map m on m.`sm_brand_class_id`=b.`bcs_cid` |
| | | left join yeshi_ec_brand_class_system_map m on m.`sm_brand_class_id`=b.`bcs_cid` |
| | | WHERE b.bcs_state = 1 AND m.sm_system=#{system} |
| | | <if test="cid != null and cid !=0 "> |
| | | AND b.`bcs_cid` = #{cid} |
| | |
| | | </delete> |
| | | |
| | | <select id="listBrandInfoVO" resultMap="ResultVOMap"> |
| | | SELECT * FROM yeshi_ec_brand_info d LEFT JOIN `yeshi_ec_brand_class_shop` s ON d.`bf_id`=s.`bcs_shop_id` LEFT JOIN `yeshi_ec_brand_class_system_map` m ON m.`sm_brand_class_id`=s.`bcs_cid` |
| | | SELECT * FROM yeshi_ec_brand_info d LEFT JOIN `yeshi_ec_brand_class_system_map` m ON m.`sm_brand_class_id`=d.`bf_cid` |
| | | WHERE d.`bf_state` = 1 AND sm_system=#{system} AND d.bf_goods_total <![CDATA[>=]]> 3 AND d.bf_shop_total <![CDATA[>]]> 0 |
| | | <if test="cid != null">AND d.`bf_cid` = #{cid}</if> |
| | | ORDER BY d.`bf_weight` DESC |
| | |
| | | </select> |
| | | |
| | | <select id="listValidByCidToApp" resultMap="BaseResultMap"> |
| | | SELECT * FROM yeshi_ec_brand_info d LEFT JOIN `yeshi_ec_brand_class_shop` s ON d.`bf_id`=s.`bcs_shop_id` LEFT JOIN `yeshi_ec_brand_class_system_map` m ON m.`sm_brand_class_id`=s.`bcs_cid` |
| | | SELECT * FROM yeshi_ec_brand_info d LEFT JOIN `yeshi_ec_brand_class_system_map` m ON m.`sm_brand_class_id`=d.`bf_cid` |
| | | WHERE d.`bf_state` = 1 AND d.`bf_cid` = #{cid} AND d.bf_goods_total <![CDATA[>=]]>3 |
| | | AND d.bf_shop_total <![CDATA[>]]> 0 AND m.sm_system=#{system} |
| | | ORDER BY d.`bf_order` |
| | |
| | | </select> |
| | | |
| | | <select id="countValidByCidToApp" resultType="Long"> |
| | | SELECT IFNULL(COUNT(d.`bf_id`),0) FROM yeshi_ec_brand_info d LEFT JOIN `yeshi_ec_brand_class_shop` s ON d.`bf_id`=s.`bcs_shop_id` LEFT JOIN `yeshi_ec_brand_class_system_map` m ON m.`sm_brand_class_id`=s.`bcs_cid` |
| | | SELECT IFNULL(COUNT(d.`bf_id`),0) FROM yeshi_ec_brand_info d LEFT JOIN `yeshi_ec_brand_class_system_map` m ON m.`sm_brand_class_id`=d.`bf_cid` |
| | | WHERE d.`bf_state` = 1 AND m.sm_system=#{system} |
| | | <if test="cid != null">AND d.`bf_cid` = #{cid}</if> |
| | | AND d.bf_goods_total <![CDATA[>=]]> 3 AND d.bf_shop_total <![CDATA[>]]> 0 |
| | |
| | | LEFT JOIN |
| | | `yeshi_ec_special_place` pc ON pc.`sp_id` = c.`cd_place_id` |
| | | WHERE |
| | | c.`cd_state` = 0 |
| | | c.`cd_state` = 0 AND c.`cd_system`=#{system} |
| | | AND IF(c.`cd_start_time` IS NULL,TRUE, |
| | | c.`cd_start_time`<![CDATA[<=]]>NOW()) |
| | | AND IF(c.`cd_end_time` IS NULL,TRUE,c.`cd_end_time`<![CDATA[>=]]>NOW()) |
| | |
| | | |
| | | <select id="listByTaoBaoUid" resultMap="BaseResultMap" |
| | | parameterType="java.lang.String"> |
| | | SELECT * FROM yeshi_ec_user_info_extra_taobao tb left join yeshi_ec_user on id=uiet_uid |
| | | SELECT <include refid="Base_Column_List"/> FROM yeshi_ec_user_info_extra_taobao tb left join yeshi_ec_user on id=uiet_uid |
| | | WHERE |
| | | tb.`uiet_taobao_uid` = #{taoBaoUid} |
| | | <if test="system!=null"> |