405个文件已添加
11个文件已修改
1 文件已重命名
4个文件已删除
New file |
| | |
| | | package com.yeshi.fanli.base;
|
| | |
|
| | | import java.io.Serializable;
|
| | | import java.util.List;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.apache.log4j.Logger;
|
| | | import org.hibernate.HibernateException;
|
| | | import org.hibernate.Query;
|
| | | import org.hibernate.Session;
|
| | | import org.springframework.orm.hibernate4.HibernateCallback;
|
| | | import org.springframework.orm.hibernate4.HibernateTemplate;
|
| | | import org.springframework.stereotype.Repository;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
|
| | | @Repository
|
| | | public abstract class BaseDao<T> {
|
| | | Logger log = Logger.getLogger(BaseDao.class);
|
| | |
|
| | | @Resource
|
| | | private HibernateTemplate hibernateTemplate;
|
| | |
|
| | |
|
| | | public HibernateTemplate getHibernateTemplate() {
|
| | | return hibernateTemplate;
|
| | | }
|
| | |
|
| | | |
| | | public void setHibernateTemplate(HibernateTemplate hibernateTemplate) {
|
| | | this.hibernateTemplate = hibernateTemplate;
|
| | | }
|
| | |
|
| | | |
| | | @Transactional
|
| | | public Serializable save(T object) {
|
| | |
|
| | | return hibernateTemplate.save(object);
|
| | | }
|
| | |
|
| | | @Transactional
|
| | | public void create(T object) {
|
| | | hibernateTemplate.persist(object);
|
| | | }
|
| | |
|
| | | |
| | | @Transactional
|
| | | public void update(T object) {
|
| | | hibernateTemplate.update(object);
|
| | | }
|
| | |
|
| | | |
| | | @Transactional
|
| | | public void delete(T object) {
|
| | | hibernateTemplate.delete(object);
|
| | | }
|
| | |
|
| | | public T find(Class<? extends T> clazz, Serializable id) {
|
| | | return (T) hibernateTemplate.get(clazz, id);
|
| | | }
|
| | |
|
| | | |
| | | @SuppressWarnings("unchecked")
|
| | | public List<T> list(String hql, Serializable[] params) {
|
| | | return (List<T>) hibernateTemplate.find(hql, params);
|
| | | }
|
| | |
|
| | | |
| | | @SuppressWarnings({ "unchecked", "rawtypes" })
|
| | | public List<T> list(String hql, final int start, final int count, final Serializable[] params) {
|
| | | final String tempsql = hql;
|
| | | return (List<T>) hibernateTemplate.execute(new HibernateCallback() {
|
| | | public Object doInHibernate(Session session) throws HibernateException {
|
| | | Query query = session.createQuery(tempsql);
|
| | | if (params != null)
|
| | | for (int i = 0; i < params.length; i++) {
|
| | | query.setParameter(i, params[i]);
|
| | | }
|
| | | query.setFirstResult(start);
|
| | | query.setMaxResults(count);
|
| | | return query.list();
|
| | | }
|
| | | });
|
| | |
|
| | | }
|
| | |
|
| | | public int update(final String hql, final Serializable[] params){
|
| | | return hibernateTemplate.execute(new HibernateCallback<Integer>() {
|
| | | public Integer doInHibernate(Session session)
|
| | | throws HibernateException {
|
| | | Query query = session.createQuery(hql);
|
| | | if(params != null){
|
| | | int i=0;
|
| | | for (Serializable serializable : params) {
|
| | | query.setParameter(i++, serializable);
|
| | | }
|
| | | }
|
| | | return query.executeUpdate();
|
| | | }
|
| | | });
|
| | | }
|
| | | |
| | | @SuppressWarnings("unchecked")
|
| | | public List<T> list(String hql) {
|
| | | return (List<T>) hibernateTemplate.find(hql);
|
| | | }
|
| | |
|
| | | // SQL
|
| | |
|
| | | @SuppressWarnings({ "rawtypes", "unchecked" })
|
| | | public List sqlList(final String sql, final Serializable[] params) {
|
| | | return (List) hibernateTemplate.execute(new HibernateCallback() {
|
| | | public Object doInHibernate(Session session) throws HibernateException {
|
| | | Query query = session.createSQLQuery(sql);
|
| | | if (params != null)
|
| | | for (int i = 0; i < params.length; i++) {
|
| | | query.setParameter(i, params[i]);
|
| | | }
|
| | | log.info("sqlList");
|
| | | return query.list();
|
| | | }
|
| | | });
|
| | | }
|
| | |
|
| | | @SuppressWarnings({ "rawtypes", "unchecked" })
|
| | | public List sqlList(final String sql, final int start, final int count, final Serializable[] params) {
|
| | | return (List) hibernateTemplate.execute(new HibernateCallback() {
|
| | | public Object doInHibernate(Session session) throws HibernateException {
|
| | | Query query = session.createSQLQuery(sql);
|
| | | if (params != null)
|
| | | for (int i = 0; i < params.length; i++) {
|
| | | query.setParameter(i, params[i]);
|
| | | }
|
| | | query.setFirstResult(start);
|
| | | query.setMaxResults(count);
|
| | | log.info("sqlList");
|
| | | return query.list();
|
| | | }
|
| | | });
|
| | | }
|
| | |
|
| | | @SuppressWarnings({ "rawtypes", "unchecked" })
|
| | | public List sqlList(final String sql) {
|
| | | return (List) hibernateTemplate.execute(new HibernateCallback() {
|
| | | public Object doInHibernate(Session session) throws HibernateException {
|
| | | Query query = session.createSQLQuery(sql);
|
| | | return query.list();
|
| | | }
|
| | | });
|
| | | }
|
| | |
|
| | | |
| | | public long getCount(final String hqlStr) {
|
| | | @SuppressWarnings("unchecked")
|
| | | Object count = hibernateTemplate.execute(new HibernateCallback() {
|
| | | public Object doInHibernate(Session session) throws HibernateException {
|
| | | return Long.parseLong(session.createQuery(hqlStr).uniqueResult() + "");
|
| | | }
|
| | | });
|
| | | return Long.parseLong(count + "");
|
| | | }
|
| | |
|
| | | @SuppressWarnings("unchecked")
|
| | | public long getCount(final String hqlStr, final Serializable[] wheres) {
|
| | | Object count = hibernateTemplate.execute(new HibernateCallback() {
|
| | | public Object doInHibernate(Session session) throws HibernateException {
|
| | | String hql = hqlStr;
|
| | | Query query = session.createQuery(hql);
|
| | | for (int i = 0; i < wheres.length; i++) {
|
| | | query.setParameter(i, wheres[i]);
|
| | | }
|
| | | return Long.parseLong(query.uniqueResult() + "");
|
| | | }
|
| | | });
|
| | | return Long.parseLong(count + "");
|
| | | }
|
| | | |
| | | @SuppressWarnings("unchecked")
|
| | | public long getCountSQL(final String hqlStr) {
|
| | |
|
| | | Object count = hibernateTemplate.execute(new HibernateCallback() {
|
| | | public Object doInHibernate(Session session) throws HibernateException {
|
| | | return Long.parseLong(session.createSQLQuery(hqlStr).uniqueResult() + "");
|
| | | }
|
| | | });
|
| | | return Long.parseLong(count + "");
|
| | | }
|
| | |
|
| | | |
| | | @SuppressWarnings("unchecked")
|
| | | public long getCountSQL(final String hqlStr, final Serializable[] wheres) {
|
| | | Object count = hibernateTemplate.execute(new HibernateCallback() {
|
| | | public Object doInHibernate(Session session) throws HibernateException {
|
| | | int fromIndex = hqlStr.indexOf("from");
|
| | | String hql = "select count(*) " + hqlStr.substring(fromIndex);
|
| | | Query query = session.createSQLQuery(hql);
|
| | | for (int i = 0; i < wheres.length; i++) {
|
| | | query.setParameter(i, wheres[i]);
|
| | | }
|
| | | return Long.parseLong(query.uniqueResult() + "");
|
| | | }
|
| | | });
|
| | | return Long.parseLong(count + "");
|
| | | }
|
| | |
|
| | | @SuppressWarnings({ "unchecked", "rawtypes" })
|
| | | public Object excute(HibernateCallback callBack){
|
| | | return hibernateTemplate.execute(callBack);
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.base;
|
| | |
|
| | | public interface BaseMapper<T> {
|
| | |
|
| | | int deleteByPrimaryKey(Long id);
|
| | |
|
| | | int insert(T record);
|
| | |
|
| | | int insertSelective(T record);
|
| | |
|
| | | T selectByPrimaryKey(Long id);
|
| | |
|
| | | int updateByPrimaryKeySelective(T record);
|
| | |
|
| | | int updateByPrimaryKey(T record);
|
| | |
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.base;
|
| | |
|
| | | import java.io.IOException;
|
| | | import java.util.ArrayList;
|
| | | import java.util.Collection;
|
| | | import java.util.Collections;
|
| | | import java.util.Comparator;
|
| | | import java.util.HashMap;
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | | import java.util.Map.Entry;
|
| | | import java.util.TreeMap;
|
| | | import java.util.regex.Matcher;
|
| | | import java.util.regex.Pattern;
|
| | |
|
| | | import javax.servlet.http.HttpServletRequest;
|
| | |
|
| | | import net.sf.json.JSONArray;
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | | import org.jsoup.Jsoup;
|
| | | import org.jsoup.nodes.Document;
|
| | | import org.yeshi.utils.StringUtil;
|
| | | import org.yeshi.utils.taobao.TbImgUtil;
|
| | |
|
| | | import com.yeshi.fanli.base.entity.admin.AdminUser;
|
| | |
|
| | | public class BaseUtils {
|
| | |
|
| | | private static final String ANDROID = "ANDROID";
|
| | | private static final String IOS = "IOS";
|
| | | private static final String WEB = "WEB";
|
| | |
|
| | | private static final Map<String, String> map = new HashMap<String, String>();
|
| | |
|
| | | static {
|
| | | map.put("1", ANDROID);
|
| | | map.put("2", IOS);
|
| | | map.put("3", WEB);
|
| | | }
|
| | |
|
| | | public static Map<String, String> getMap() {
|
| | | return map;
|
| | | }
|
| | |
|
| | | public static boolean isEmailUrlRight(String email, String sign, long time) {
|
| | | if (StringUtil.Md5(email + time + "WEIJU2016xxx").equalsIgnoreCase(sign)
|
| | | && Math.abs(System.currentTimeMillis() - time) < 1000 * 60 * 60 * 2) {
|
| | | return true;
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public static String getUrlPageTitle(String url) {
|
| | | try {
|
| | | Document doc = Jsoup.connect(url).timeout(1000 * 60).get();
|
| | | return doc.title();
|
| | | } catch (IOException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | return "";
|
| | | }
|
| | |
|
| | | public static AdminUser getAdminUser(HttpServletRequest request) {
|
| | | AdminUser adminUser = (AdminUser) request.getSession().getAttribute("ADMIN_USERINFO");
|
| | | return adminUser;
|
| | | }
|
| | |
|
| | | public static boolean signIsRight(String devicename, String imei, String sign) {
|
| | | return sign.equalsIgnoreCase(StringUtil.Md5(devicename + imei + "WEIju2016888xx3"));
|
| | | }
|
| | |
|
| | | public static Map<String, Object> sort(Map<String, Integer> map) {
|
| | | // 通过ArrayList构�?函数把map.entrySet()转换成list
|
| | | List<Map.Entry<String, Object>> list = new ArrayList<Map.Entry<String, Object>>((Collection) map.entrySet());
|
| | | // 通过比较器实现比较排�?
|
| | | Collections.sort(list, new Comparator<Map.Entry<String, Object>>() {
|
| | | public int compare(Map.Entry<String, Object> mapping1, Map.Entry<String, Object> mapping2) {
|
| | | return mapping1.getKey().compareTo(mapping2.getKey());
|
| | | }
|
| | | });
|
| | |
|
| | | Map<String, Object> newMap = new TreeMap<String, Object>();
|
| | | for (Entry<String, Object> entry : list) {
|
| | | newMap.put(entry.getKey(), entry.getValue());
|
| | | }
|
| | | return newMap;
|
| | | }
|
| | |
|
| | |
|
| | | public static String imgSize(String jsonStr) {
|
| | | JSONObject json = JSONObject.fromObject(jsonStr);
|
| | | String picUrl = (String) json.opt("pictUrl");
|
| | | if (picUrl.contains("alicdn") || picUrl.contains("tbcdn")) {
|
| | | picUrl = TbImgUtil.getTBSize320Img(picUrl);
|
| | | }
|
| | | json.element("pictUrl", picUrl);
|
| | | return json.toString();
|
| | | }
|
| | |
|
| | | public static String imgListSize(String jsonStr) {
|
| | | JSONArray json = JSONArray.fromObject(jsonStr);
|
| | | for (Object object : json) {
|
| | | String picUrl = (String) ((JSONObject) object).opt("pictUrl");
|
| | | if (picUrl.contains("alicdn") || picUrl.contains("tbcdn")) {
|
| | | picUrl = TbImgUtil.getTBSize320Img(picUrl);
|
| | | }
|
| | | ((JSONObject) object).element("pictUrl", picUrl);
|
| | | }
|
| | | return json.toString();
|
| | | }
|
| | |
|
| | | public static Map<String, String> parseURL(String url) {
|
| | |
|
| | | String URL_REGEX = "(((http|https)://)|(www\\.))[a-zA-Z0-9\\._-]+\\.[a-zA-Z]{2,6}(:[0-9]{1,4})?(/[a-zA-Z0-9\\&%_\\./-~-]*)?";
|
| | | Pattern p = Pattern.compile(URL_REGEX);
|
| | | Matcher matcher = p.matcher(url);
|
| | | boolean b = matcher.matches();
|
| | | Map<String, String> map = new HashMap<String, String>();
|
| | | if (!b) {
|
| | | return map;
|
| | | }
|
| | | if (!url.contains("?")) {
|
| | | return map;
|
| | | }
|
| | |
|
| | | String params = url.substring(url.indexOf("?") + 1);
|
| | | if (params == null || "".equals(params)) {
|
| | | return map;
|
| | | }
|
| | |
|
| | | String[] paramArr = params.split("&");
|
| | |
|
| | | for (String arr : paramArr) {
|
| | | String[] kv = arr.split("=");
|
| | | if (kv.length == 1) {
|
| | | kv[1] = "";
|
| | | }
|
| | | map.put(kv[0], kv[1]);
|
| | | }
|
| | |
|
| | | return map;
|
| | | }
|
| | |
|
| | | public static double random(double mix) {
|
| | | return (Math.random() * 20) + mix;
|
| | | }
|
| | |
|
| | | public static String getStarString(String content, int begin, int end) {
|
| | |
|
| | | if (begin >= content.length() || begin < 0) {
|
| | | return content;
|
| | | }
|
| | | if (end >= content.length() || end < 0) {
|
| | | return content;
|
| | | }
|
| | | if (begin >= end) {
|
| | | return content;
|
| | | }
|
| | | String starStr = "";
|
| | | for (int i = begin; i < end; i++) {
|
| | | starStr = starStr + "*";
|
| | | }
|
| | | return content.substring(0, begin) + starStr + content.substring(end, content.length());
|
| | |
|
| | | }
|
| | |
|
| | | public static boolean isNum(String content) {
|
| | | if (content == null) {
|
| | | return false;
|
| | | }
|
| | | String regex = "\\d+";
|
| | | Pattern compile = Pattern.compile(regex);
|
| | | Matcher matcher = compile.matcher(content);
|
| | | return matcher.matches();
|
| | | }
|
| | |
|
| | | public static boolean isOrderNum(String order) {
|
| | | if (order == null) {
|
| | | return false;
|
| | | }
|
| | | String regex = "\\d{16,}";
|
| | | Pattern compile = Pattern.compile(regex);
|
| | | Matcher matcher = compile.matcher(order);
|
| | | return matcher.matches();
|
| | | }
|
| | |
|
| | | public static boolean isUserOrder(String existOrder, String lostOrder) {
|
| | | if (existOrder.length() < 16 || lostOrder.length() < 16) {
|
| | | return false;
|
| | | }
|
| | | String existNum = existOrder.substring(existOrder.length() - 6);
|
| | | String lostOrderNum = lostOrder.substring(lostOrder.length() - 6);
|
| | |
|
| | | if (existNum.equals(lostOrderNum)) {
|
| | | return true;
|
| | | }
|
| | |
|
| | | return false;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.base;
|
| | |
|
| | | import java.util.Properties;
|
| | |
|
| | | import org.yeshi.utils.annotation.MapUtil;
|
| | |
|
| | | import com.yeshi.fanli.base.config.AlipayConfig;
|
| | | import com.yeshi.fanli.base.config.SMSConfig;
|
| | | import com.yeshi.fanli.base.config.SystemCommonConfig;
|
| | | import com.yeshi.fanli.base.config.WXGZConfig;
|
| | | import com.yeshi.fanli.base.config.ZNXConfig;
|
| | |
|
| | | public class Constant {
|
| | | public static boolean IS_TASK = false;
|
| | | // 外网环境
|
| | | public static boolean IS_OUTNET = false;
|
| | |
|
| | | public static boolean IS_TEST = true;
|
| | |
|
| | | public static int PAGE_SIZE = 20;
|
| | | public static int[] TASK_TYPE = { 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008// 微信任务类型编号
|
| | | };
|
| | |
|
| | | public final static String UIDAESKEY = "WW782ss@8*px/%2v";
|
| | |
|
| | | public final static String ADMINH5_AESKEY = "WW782Ss@0*px/,2v";
|
| | |
|
| | | public final static String RANDKEY = "user_randkey";
|
| | | public final static String RANDPWDKEY = "user_pwd_randkey";
|
| | |
|
| | | public final static String MAIL_SENDER_ACCOUNT = "he15901227708@163.com";// 发送账号
|
| | | public final static String MAIL_SENDER_PWD = "hexiaohui1011";// 发送密码
|
| | |
|
| | | public final static String TAOBAO_APP_ID = "23595652";
|
| | | public final static String TAOBAO_APP_SECRET = "a4b2098670284a929a3f5930644ac26d";
|
| | | public final static String TAOBAO_BASEURL = "http://gw.api.taobao.com/router/rest";
|
| | | public final static long TAOBAO_AdzoneId = 70076496L;
|
| | |
|
| | | public final static int HB_NOTIME = 1;
|
| | | public final static int HB_GET = 2;
|
| | | public final static int HB_GOT = 3;
|
| | | public final static int HB_DISABLE = 4;
|
| | | public final static String HB_STATEEXCEPTION = "红包状态异常";
|
| | | public final static String HB_NOEXIST = "红包不存在";
|
| | | public static final int MR_COUNT = 2;
|
| | |
|
| | | public final static String BA_EXIST = "该类型账户已存在";
|
| | | public final static String BA_SUCCESS = "创建成功";
|
| | |
|
| | | public final static int NOT_EXIST_OBJACT = 1;
|
| | | public final static int OBJECT_STATE_EXCEPTION = 2;
|
| | |
|
| | | public final static int ZHIFUBAO = 1;
|
| | | public final static int WEIXIN = 2;
|
| | | public static final String NOTYPE = "不存在该类型";
|
| | | public static final String NOACCOUNT = "不存在该类型账户";
|
| | | public static final String HB_TIMEEXCEPTION = "红包解锁时间未到,还不能打开红包";
|
| | | public static final String DEL = "delete";
|
| | | public static final int EXTRACT_DEFUALT = 0;
|
| | | public static final int EXTRACT_PASS = 1;
|
| | | public static final int EXTRACT_REJECT = 2;
|
| | | public static final String SESSION_ADMIN = "ADMIN";// 管理员用户的session key
|
| | | public static final String SESSION_EXTRACT_CODE = "ADMIN_EXTRACT_CODE"; // 提现码
|
| | | public static final String SESSION_EXTRACT_VERIFY_RESULT = "SESSION_EXTRACT_VERIFY_RESULT"; // 提现码验证结果
|
| | | public static final int NOWHOTSIZE = 10;
|
| | | public static final int DAYMS = 86400000;
|
| | | public static final int DEFAULT_DAYMS = 1296000000;
|
| | | public static final int HOURMS = 3600000;
|
| | | public static String Extract_Activty;
|
| | | public static String HB_Activity;
|
| | |
|
| | | public static final String EXTRACT_MIN_MONEY = "extract_min_money";
|
| | | public static final String MYLIKE = "mylike";
|
| | | public static final String MYDYNAMIC = "mydynamic";
|
| | |
|
| | | public static final String TAOBAO_AUTH_APPKEY = "24980167";
|
| | | public static final String TAOBAO_AUTH_APPSECRET = "e0a2e05deabf5ce039b52e5b492d5382";
|
| | | public static final String TAOBAO_RELATION_PID_DEFAULT = "mm_124933865_56750082_87140050199";
|
| | | public static final String TAOBAO_SPECIAL_PID_DEFAULT = "mm_124933865_56750082_89555600043";
|
| | |
|
| | | // 来源-淘宝
|
| | | public static final int SOURCE_TYPE_TAOBAO = 1;
|
| | | // 来源-京东
|
| | | public static final int SOURCE_TYPE_JD = 2;
|
| | |
|
| | | // 自购-返利
|
| | | public static final int TYPE_REBATE = 1;
|
| | | // 分享
|
| | | public static final int TYPE_SHAER = 2;
|
| | | // 邀请
|
| | | public static final int TYPE_INVITE = 3;
|
| | |
|
| | | public static WXGZConfig wxGZConfig;
|
| | |
|
| | | // 短信验证码配置
|
| | | public static SMSConfig smsConfig;
|
| | |
|
| | | // 系统常见配置
|
| | | public static SystemCommonConfig systemCommonConfig;
|
| | |
|
| | | public static AlipayConfig alipayConfig;
|
| | |
|
| | | public static ZNXConfig znxConfig;
|
| | |
|
| | | /**
|
| | | * 淘宝商品红包
|
| | | */
|
| | | public static final int TAOBAO = 1;
|
| | | /**
|
| | | * 一级分销红包
|
| | | */
|
| | | public static final int ONESALE = 6;
|
| | | /**
|
| | | * 二级分销红包
|
| | | */
|
| | | public static final int TWOSALE = 7;
|
| | |
|
| | | /**
|
| | | * 一级分销红包
|
| | | */
|
| | | public static final int ONESHARE = 21;
|
| | | /**
|
| | | * 二级分销红包
|
| | | */
|
| | | public static final int TWOSHARE = 22;
|
| | |
|
| | | /**
|
| | | * 新人红包类型
|
| | | */
|
| | | public static final int HB_NEWUSER = 4;
|
| | | /**
|
| | | * 活动红包
|
| | | */
|
| | | public static final int HB_HUODONG = 3;
|
| | | public static final String APPID = "23649898";
|
| | | /**
|
| | | * 新建
|
| | | */
|
| | | public static final String NEWUSER = "1";
|
| | | /**
|
| | | * 绑定
|
| | | */
|
| | | public static final String BINDUSER = "2";
|
| | | /**
|
| | | * 返利券系统的ID(安卓)
|
| | | */
|
| | | public static final long FANLI = 4;
|
| | | /**
|
| | | * 微信头像保存地址
|
| | | */
|
| | | public static final String WXHEADURL = "wx/headImg/";
|
| | |
|
| | | public static final String WEBPAGE_SIGN_KEY = "@?,223Hbb88lll";
|
| | |
|
| | | // public static final String TAOKE_ANDROID_APPKEY = "24587154";
|
| | | // public static final String TAOKE_IOS_APPKEY = "24838852";
|
| | |
|
| | | static {
|
| | |
|
| | | if (smsConfig == null) {
|
| | | smsConfig = new SMSConfig();
|
| | | Properties ps = org.yeshi.utils.PropertiesUtil
|
| | | .getProperties(Constant.class.getClassLoader().getResourceAsStream("sms_config.properties"));
|
| | | smsConfig = (SMSConfig) MapUtil.parseMap(SMSConfig.class, ps);
|
| | | }
|
| | |
|
| | | if (systemCommonConfig == null) {
|
| | | Properties ps = org.yeshi.utils.PropertiesUtil
|
| | | .getProperties(Constant.class.getClassLoader().getResourceAsStream("system_config.properties"));
|
| | | systemCommonConfig = (SystemCommonConfig) MapUtil.parseMap(SystemCommonConfig.class, ps);
|
| | | }
|
| | |
|
| | | if (wxGZConfig == null) {
|
| | | Properties ps = org.yeshi.utils.PropertiesUtil
|
| | | .getProperties(Constant.class.getClassLoader().getResourceAsStream("wx_gz_config.properties"));
|
| | | wxGZConfig = (WXGZConfig) MapUtil.parseMap(WXGZConfig.class, ps);
|
| | | }
|
| | |
|
| | | if (alipayConfig == null) {
|
| | | Properties ps = org.yeshi.utils.PropertiesUtil
|
| | | .getProperties(Constant.class.getClassLoader().getResourceAsStream("alipay.properties"));
|
| | | alipayConfig = (AlipayConfig) MapUtil.parseMap(AlipayConfig.class, ps);
|
| | | }
|
| | |
|
| | | if (znxConfig == null) {
|
| | | Properties ps = org.yeshi.utils.PropertiesUtil
|
| | | .getProperties(Constant.class.getClassLoader().getResourceAsStream("znx_msg.properties"));
|
| | | znxConfig = (ZNXConfig) MapUtil.parseMap(ZNXConfig.class, ps);
|
| | | }
|
| | |
|
| | | Extract_Activty = String.format("%s.ui.mine.MyRedPacketsActivity",
|
| | | Constant.systemCommonConfig.getAndroidBaseactivityName());
|
| | | HB_Activity = String.format("%s.ui.main.MainActivity",
|
| | | Constant.systemCommonConfig.getAndroidBaseactivityName());
|
| | | }
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.base;
|
| | |
|
| | | import net.sf.ehcache.Cache;
|
| | | import net.sf.ehcache.CacheManager;
|
| | | import net.sf.ehcache.config.CacheConfiguration;
|
| | |
|
| | | public class EhcacheUtil {
|
| | | |
| | | public static CacheManager cacheManager = CacheManager.getInstance();
|
| | | |
| | | public static Cache addCahae(CacheConfiguration cacheConfiguration){
|
| | | cacheManager.addCache(new Cache(cacheConfiguration));
|
| | | return cacheManager.getCache(cacheConfiguration.getName());
|
| | | }
|
| | | |
| | | public static void removeCache(String name){
|
| | | cacheManager.removeCache(name);
|
| | | }
|
| | | |
| | | public static Cache getCache(String name){
|
| | | return cacheManager.getCache(name);
|
| | | }
|
| | | |
| | | public static CacheConfiguration getMyPubCacheConfig(String name){
|
| | | CacheConfiguration cacheConfiguration = new CacheConfiguration();
|
| | | cacheConfiguration.setMaxElementsInMemory(1000);
|
| | | cacheConfiguration.setMaxElementsOnDisk(10000);
|
| | | cacheConfiguration.setEternal(false);
|
| | | cacheConfiguration.setTimeToIdleSeconds(Constant.DAYMS);
|
| | | cacheConfiguration.setTimeToLiveSeconds(Constant.DAYMS);
|
| | | cacheConfiguration.setOverflowToDisk(true);
|
| | | cacheConfiguration.setMemoryStoreEvictionPolicy("LRU");
|
| | | cacheConfiguration.setName(name);
|
| | | return cacheConfiguration;
|
| | | }
|
| | | |
| | | public static CacheConfiguration getOneDayCacheConfig(String name){
|
| | | CacheConfiguration cacheConfiguration = new CacheConfiguration();
|
| | | cacheConfiguration.setMaxElementsInMemory(1000);
|
| | | cacheConfiguration.setMaxElementsOnDisk(10000);
|
| | | cacheConfiguration.setEternal(false);
|
| | | cacheConfiguration.setTimeToLiveSeconds(86400000);
|
| | | cacheConfiguration.setOverflowToDisk(true);
|
| | | cacheConfiguration.setMemoryStoreEvictionPolicy("LRU");
|
| | | cacheConfiguration.setName(name);
|
| | | return cacheConfiguration;
|
| | | }
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.base.config;
|
| | |
|
| | | import org.yeshi.utils.annotation.Map;
|
| | |
|
| | | public class AlipayConfig {
|
| | | @Map("appId")
|
| | | private String appId;
|
| | | @Map("private_key")
|
| | | private String privateKey;
|
| | |
|
| | | public String getAppId() {
|
| | | return appId;
|
| | | }
|
| | |
|
| | | public void setAppId(String appId) {
|
| | | this.appId = appId;
|
| | | }
|
| | |
|
| | | public String getPrivateKey() {
|
| | | return privateKey;
|
| | | }
|
| | |
|
| | | public void setPrivateKey(String privateKey) {
|
| | | this.privateKey = privateKey;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.base.config;
|
| | |
|
| | | import org.yeshi.utils.annotation.Map;
|
| | |
|
| | | /**
|
| | | * 验证码配置
|
| | | * |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | public class SMSConfig {
|
| | | @Map("sms_login")
|
| | | private String smsLogin;
|
| | | @Map("sms_bind")
|
| | | private String smsBind;
|
| | | @Map("sms_extract")
|
| | | private String smsExtract;
|
| | | @Map("sms_extract_success")
|
| | | private String smsExtractSuccess;
|
| | | @Map("sms_extract_fail")
|
| | | private String smsExtractFail;
|
| | | @Map("sms_appid")
|
| | | private String smsAppId;
|
| | | @Map("sms_appkey")
|
| | | private String smsAppKey;
|
| | | @Map("sms_sign")
|
| | | private String smsSign;
|
| | |
|
| | | public String getSmsExtractSuccess() {
|
| | | return smsExtractSuccess;
|
| | | }
|
| | |
|
| | | public void setSmsExtractSuccess(String smsExtractSuccess) {
|
| | | this.smsExtractSuccess = smsExtractSuccess;
|
| | | }
|
| | |
|
| | | public String getSmsExtractFail() {
|
| | | return smsExtractFail;
|
| | | }
|
| | |
|
| | | public void setSmsExtractFail(String smsExtractFail) {
|
| | | this.smsExtractFail = smsExtractFail;
|
| | | }
|
| | |
|
| | | public String getSmsAppId() {
|
| | | return smsAppId;
|
| | | }
|
| | |
|
| | | public void setSmsAppId(String smsAppId) {
|
| | | this.smsAppId = smsAppId;
|
| | | }
|
| | |
|
| | | public String getSmsAppKey() {
|
| | | return smsAppKey;
|
| | | }
|
| | |
|
| | | public void setSmsAppKey(String smsAppKey) {
|
| | | this.smsAppKey = smsAppKey;
|
| | | }
|
| | |
|
| | | public String getSmsSign() {
|
| | | return smsSign;
|
| | | }
|
| | |
|
| | | public void setSmsSign(String smsSign) {
|
| | | this.smsSign = smsSign;
|
| | | }
|
| | |
|
| | | public String getSmsLogin() {
|
| | | return smsLogin;
|
| | | }
|
| | |
|
| | | public void setSmsLogin(String smsLogin) {
|
| | | this.smsLogin = smsLogin;
|
| | | }
|
| | |
|
| | | public String getSmsBind() {
|
| | | return smsBind;
|
| | | }
|
| | |
|
| | | public void setSmsBind(String smsBind) {
|
| | | this.smsBind = smsBind;
|
| | | }
|
| | |
|
| | | public String getSmsExtract() {
|
| | | return smsExtract;
|
| | | }
|
| | |
|
| | | public void setSmsExtract(String smsExtract) {
|
| | | this.smsExtract = smsExtract;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.base.config;
|
| | |
|
| | | /**
|
| | | * 分享APP的信息
|
| | | * |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | public class ShareAppInfo {
|
| | | private String shareTitle;// 标题
|
| | | private String sharePicture;// 图片
|
| | | private String shareDesc;// 描述
|
| | | private String shareUrl;// 链接
|
| | |
|
| | | public String getShareTitle() {
|
| | | return shareTitle;
|
| | | }
|
| | |
|
| | | public void setShareTitle(String shareTitle) {
|
| | | this.shareTitle = shareTitle;
|
| | | }
|
| | |
|
| | | public String getSharePicture() {
|
| | | return sharePicture;
|
| | | }
|
| | |
|
| | | public void setSharePicture(String sharePicture) {
|
| | | this.sharePicture = sharePicture;
|
| | | }
|
| | |
|
| | | public String getShareDesc() {
|
| | | return shareDesc;
|
| | | }
|
| | |
|
| | | public void setShareDesc(String shareDesc) {
|
| | | this.shareDesc = shareDesc;
|
| | | }
|
| | |
|
| | | public String getShareUrl() {
|
| | | return shareUrl;
|
| | | }
|
| | |
|
| | | public void setShareUrl(String shareUrl) {
|
| | | this.shareUrl = shareUrl;
|
| | | }
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.base.config;
|
| | |
|
| | | import org.yeshi.utils.annotation.Map;
|
| | |
|
| | | public class SystemCommonConfig {
|
| | | // 项目名称
|
| | | @Map("project_name")
|
| | | private String projectName;
|
| | |
|
| | | @Map("project_chinese_name")
|
| | | private String projectChineseName;
|
| | |
|
| | | // 项目域名
|
| | | @Map("project_host")
|
| | | private String projectHost;
|
| | | @Map("default_nick_name")
|
| | | private String defaultNickName;
|
| | | @Map("default_portrait")
|
| | | private String defaultPortrait;
|
| | |
|
| | | // 公众平台appid
|
| | | @Map("wxgz_appid")
|
| | | private String wxGZAppId;
|
| | | // 公众平台Appsecret
|
| | | @Map("wxgz_appsecret")
|
| | | private String wxGZAppSecret;
|
| | |
|
| | | // 开放平台appId
|
| | | @Map("wx_open_appid")
|
| | | private String wxOpenAppId;
|
| | | // 开放平台appSecret
|
| | | @Map("wx_open_appsecret")
|
| | | private String wxOpenAppSecret;
|
| | | // 默认的提成订单图片
|
| | | @Map("default_order_picture")
|
| | | private String defaultOrderPicture;
|
| | |
|
| | | @Map("android_package_name")
|
| | | private String androidPackageName;
|
| | |
|
| | | @Map("ios_bundle_id")
|
| | | private String iosBundleId;
|
| | |
|
| | | @Map("h5_package_name")
|
| | | private String h5PackageName;
|
| | |
|
| | | @Map("sign_key")
|
| | | private String signKey;
|
| | |
|
| | | @Map("android_baseactivity_name")
|
| | | private String androidBaseactivityName;
|
| | |
|
| | | @Map("share_goods_page_path")
|
| | | private String shareGoodsPagePath;
|
| | |
|
| | | @Map("app_shareinfo_url")
|
| | | private String appShareInfoUrl;
|
| | |
|
| | | @Map("base_user_rank_icon_url")
|
| | | private String baseUserRankIconUrl;
|
| | |
|
| | | @Map("ios_push_certificate_pwd")
|
| | | private String iosPushCertificatePwd;
|
| | |
|
| | | @Map("extract_notify_url")
|
| | | private String extractNotifyUrl;
|
| | |
|
| | | public String getExtractNotifyUrl() {
|
| | | return extractNotifyUrl;
|
| | | }
|
| | |
|
| | | public void setExtractNotifyUrl(String extractNotifyUrl) {
|
| | | this.extractNotifyUrl = extractNotifyUrl;
|
| | | }
|
| | |
|
| | | public String getIosPushCertificatePwd() {
|
| | | return iosPushCertificatePwd;
|
| | | }
|
| | |
|
| | | public void setIosPushCertificatePwd(String iosPushCertificatePwd) {
|
| | | this.iosPushCertificatePwd = iosPushCertificatePwd;
|
| | | }
|
| | |
|
| | | public String getBaseUserRankIconUrl() {
|
| | | return baseUserRankIconUrl;
|
| | | }
|
| | |
|
| | | public void setBaseUserRankIconUrl(String baseUserRankIconUrl) {
|
| | | this.baseUserRankIconUrl = baseUserRankIconUrl;
|
| | | }
|
| | |
|
| | | public String getAppShareInfoUrl() {
|
| | | return appShareInfoUrl;
|
| | | }
|
| | |
|
| | | public void setAppShareInfoUrl(String appShareInfoUrl) {
|
| | | this.appShareInfoUrl = appShareInfoUrl;
|
| | | }
|
| | |
|
| | | public String getShareGoodsPagePath() {
|
| | | return shareGoodsPagePath;
|
| | | }
|
| | |
|
| | | public void setShareGoodsPagePath(String shareGoodsPagePath) {
|
| | | this.shareGoodsPagePath = shareGoodsPagePath;
|
| | | }
|
| | |
|
| | | public String getAndroidBaseactivityName() {
|
| | | return androidBaseactivityName;
|
| | | }
|
| | |
|
| | | public void setAndroidBaseactivityName(String androidBaseactivityName) {
|
| | | this.androidBaseactivityName = androidBaseactivityName;
|
| | | }
|
| | |
|
| | | public String getSignKey() {
|
| | | return signKey;
|
| | | }
|
| | |
|
| | | public void setSignKey(String signKey) {
|
| | | this.signKey = signKey;
|
| | | }
|
| | |
|
| | | public String getProjectChineseName() {
|
| | | return projectChineseName;
|
| | | }
|
| | |
|
| | | public void setProjectChineseName(String projectChineseName) {
|
| | | this.projectChineseName = projectChineseName;
|
| | | }
|
| | |
|
| | | public String getH5PackageName() {
|
| | | return h5PackageName;
|
| | | }
|
| | |
|
| | | public void setH5PackageName(String h5PackageName) {
|
| | | this.h5PackageName = h5PackageName;
|
| | | }
|
| | |
|
| | | public String getAndroidPackageName() {
|
| | | return androidPackageName;
|
| | | }
|
| | |
|
| | | public void setAndroidPackageName(String androidPackageName) {
|
| | | this.androidPackageName = androidPackageName;
|
| | | }
|
| | |
|
| | | public String getIosBundleId() {
|
| | | return iosBundleId;
|
| | | }
|
| | |
|
| | | public void setIosBundleId(String iosBundleId) {
|
| | | this.iosBundleId = iosBundleId;
|
| | | }
|
| | |
|
| | | public String getDefaultOrderPicture() {
|
| | | return defaultOrderPicture;
|
| | | }
|
| | |
|
| | | public void setDefaultOrderPicture(String defaultOrderPicture) {
|
| | | this.defaultOrderPicture = defaultOrderPicture;
|
| | | }
|
| | |
|
| | | public String getWxGZAppId() {
|
| | | return wxGZAppId;
|
| | | }
|
| | |
|
| | | public void setWxGZAppId(String wxGZAppId) {
|
| | | this.wxGZAppId = wxGZAppId;
|
| | | }
|
| | |
|
| | | public String getWxGZAppSecret() {
|
| | | return wxGZAppSecret;
|
| | | }
|
| | |
|
| | | public void setWxGZAppSecret(String wxGZAppSecret) {
|
| | | this.wxGZAppSecret = wxGZAppSecret;
|
| | | }
|
| | |
|
| | | public String getWxOpenAppId() {
|
| | | return wxOpenAppId;
|
| | | }
|
| | |
|
| | | public void setWxOpenAppId(String wxOpenAppId) {
|
| | | this.wxOpenAppId = wxOpenAppId;
|
| | | }
|
| | |
|
| | | public String getWxOpenAppSecret() {
|
| | | return wxOpenAppSecret;
|
| | | }
|
| | |
|
| | | public void setWxOpenAppSecret(String wxOpenAppSecret) {
|
| | | this.wxOpenAppSecret = wxOpenAppSecret;
|
| | | }
|
| | |
|
| | | public String getProjectName() {
|
| | | return projectName;
|
| | | }
|
| | |
|
| | | public void setProjectName(String projectName) {
|
| | | this.projectName = projectName;
|
| | | }
|
| | |
|
| | | public String getProjectHost() {
|
| | | return projectHost;
|
| | | }
|
| | |
|
| | | public void setProjectHost(String projectHost) {
|
| | | this.projectHost = projectHost;
|
| | | }
|
| | |
|
| | | public String getDefaultNickName() {
|
| | | return defaultNickName;
|
| | | }
|
| | |
|
| | | public void setDefaultNickName(String defaultNickName) {
|
| | | this.defaultNickName = defaultNickName;
|
| | | }
|
| | |
|
| | | public String getDefaultPortrait() {
|
| | | return defaultPortrait;
|
| | | }
|
| | |
|
| | | public void setDefaultPortrait(String defaultPortrait) {
|
| | | this.defaultPortrait = defaultPortrait;
|
| | | }
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.base.config;
|
| | |
|
| | | import org.yeshi.utils.annotation.Map;
|
| | |
|
| | | public class WXGZConfig {
|
| | | @Map("welcome_msg")
|
| | | private String welcomeMsg;
|
| | | @Map("app_download_link")
|
| | | private String appDownloadLink;
|
| | |
|
| | | @Map("help_url")
|
| | | private String helpUrl;
|
| | |
|
| | | @Map("h5_url")
|
| | | private String h5Url;
|
| | |
|
| | | @Map("login_host")
|
| | | private String loginHost;
|
| | |
|
| | | public String getH5Url() {
|
| | | return h5Url;
|
| | | }
|
| | |
|
| | | public void setH5Url(String h5Url) {
|
| | | this.h5Url = h5Url;
|
| | | }
|
| | |
|
| | | public String getHelpUrl() {
|
| | | return helpUrl;
|
| | | }
|
| | |
|
| | | public void setHelpUrl(String helpUrl) {
|
| | | this.helpUrl = helpUrl;
|
| | | }
|
| | |
|
| | | public String getWelcomeMsg() {
|
| | | return welcomeMsg;
|
| | | }
|
| | |
|
| | | public void setWelcomeMsg(String welcomeMsg) {
|
| | | this.welcomeMsg = welcomeMsg;
|
| | | }
|
| | |
|
| | | public String getAppDownloadLink() {
|
| | | return appDownloadLink;
|
| | | }
|
| | |
|
| | | public void setAppDownloadLink(String appDownloadLink) {
|
| | | this.appDownloadLink = appDownloadLink;
|
| | | }
|
| | |
|
| | | public String getLoginHost() {
|
| | | return loginHost;
|
| | | }
|
| | |
|
| | | public void setLoginHost(String loginHost) {
|
| | | this.loginHost = loginHost;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.base.config;
|
| | |
|
| | | import org.yeshi.utils.annotation.Map;
|
| | |
|
| | | public class ZNXConfig {
|
| | | // 站内信和推送消息
|
| | | // 新人红包
|
| | | @Map("newer_hongbao_title")
|
| | | private String newerHongbaoTitle;
|
| | | @Map("newer_hongbao_push")
|
| | | private String newerHongbaoPush;
|
| | | @Map("newer_hongbao_msg")
|
| | | private String newerHongbaoMsg;
|
| | |
|
| | | // 订单返利到账
|
| | | @Map("order_fanli_recieve_title")
|
| | | private String orderFanliRecieveTitle;
|
| | | @Map("order_fanli_recieve_push")
|
| | | private String orderFanliRecievePush;
|
| | | @Map("order_fanli_recieve_msg")
|
| | | private String orderFanliRecieveMsg;
|
| | |
|
| | | // 返利订单被统计
|
| | | @Map("fanli_order_statisticed_title")
|
| | | private String fanliOrderStatisticedTitle;
|
| | | @Map("fanli_order_statisticed_push")
|
| | | private String fanliOrderStatisticedPush;
|
| | | @Map("fanli_order_statisticed_msg")
|
| | | private String fanliOrderStatisticedMsg;
|
| | |
|
| | | // 提成订单被统计
|
| | | @Map("ticheng_order_statisticed_title")
|
| | | private String tichengOrderStatisticedTitle;
|
| | | @Map("ticheng_order_statisticed_push")
|
| | | private String tichengOrderStatisticedPush;
|
| | | @Map("ticheng_order_statisticed_msg")
|
| | | private String tichengOrderStatisticedMsg;
|
| | |
|
| | | // 分享赚和邀请赚上月收入到账提示
|
| | |
|
| | | @Map("share_invite_money_recieve_title")
|
| | | private String shareInviteMoneyRecieveTitle;
|
| | | @Map("share_invite_money_recieve_push")
|
| | | private String shareInviteMoneyRecievePush;
|
| | | @Map("share_invite_money_recieve_msg")
|
| | | private String shareInviteMoneyRecieveMsg;
|
| | |
|
| | | // 售后维权订单扣款提示
|
| | |
|
| | | @Map("weiquan_drawback_fanli_title")
|
| | | private String weiquanDrawbackFanliTitle;
|
| | |
|
| | | @Map("weiquan_drawback_fanli_msg")
|
| | | private String weiquanDrawbackFanliMsg;
|
| | |
|
| | | @Map("weiquan_drawback_fanli_push")
|
| | | private String weiquanDrawbackFanliPush;
|
| | |
|
| | | @Map("weiquan_drawback_share_title")
|
| | | private String weiquanDrawbackShareTitle;
|
| | |
|
| | | @Map("weiquan_drawback_share_msg")
|
| | | private String weiquanDrawbackShareMsg;
|
| | |
|
| | | @Map("weiquan_drawback_share_push")
|
| | | private String weiquanDrawbackSharePush;
|
| | |
|
| | | // 提交提现申请
|
| | | @Map("extract_applay_title")
|
| | | private String extractApplayTitle;
|
| | | @Map("extract_applay_push")
|
| | | private String extractApplayPush;
|
| | | @Map("extract_applay_msg")
|
| | | private String extractApplayMsg;
|
| | |
|
| | | // 提现申请不成功,账号有误
|
| | | @Map("extract_transfer_fail_title")
|
| | | private String extractTransferFailTitle;
|
| | |
|
| | | @Map("extract_transfer_fail_push")
|
| | | private String extractTransferFailPush;
|
| | |
|
| | | @Map("extract_transfer_fail_msg")
|
| | | private String extractTransferFailMsg;
|
| | |
|
| | | // 提现不成功,账户出现错误
|
| | | @Map("extract_wrong_title")
|
| | | private String extractWrongTitle;
|
| | |
|
| | | @Map("extract_wrong_push")
|
| | | private String extractWrongPush;
|
| | |
|
| | | @Map("extract_wrong_msg")
|
| | | private String extractWrongMsg;
|
| | |
|
| | | // 提现成功
|
| | | @Map("extract_success_title")
|
| | | private String extractSuccessTitle;
|
| | |
|
| | | @Map("extract_success_push")
|
| | | private String extractSuccessPush;
|
| | |
|
| | | @Map("extract_success_msg")
|
| | | private String extractSuccessMsg;
|
| | | |
| | | //支付宝账户验证
|
| | | @Map("alipay_account_valid_title")
|
| | | private String alipayAccountValidTitle;
|
| | | |
| | | @Map("alipay_account_valid_msg")
|
| | | private String alipayAccountValidMsg;
|
| | | |
| | | |
| | |
|
| | | public String getAlipayAccountValidTitle() {
|
| | | return alipayAccountValidTitle;
|
| | | }
|
| | |
|
| | | public void setAlipayAccountValidTitle(String alipayAccountValidTitle) {
|
| | | this.alipayAccountValidTitle = alipayAccountValidTitle;
|
| | | }
|
| | |
|
| | | public String getAlipayAccountValidMsg() {
|
| | | return alipayAccountValidMsg;
|
| | | }
|
| | |
|
| | | public void setAlipayAccountValidMsg(String alipayAccountValidMsg) {
|
| | | this.alipayAccountValidMsg = alipayAccountValidMsg;
|
| | | }
|
| | |
|
| | | public String getFanliOrderStatisticedTitle() {
|
| | | return fanliOrderStatisticedTitle;
|
| | | }
|
| | |
|
| | | public void setFanliOrderStatisticedTitle(String fanliOrderStatisticedTitle) {
|
| | | this.fanliOrderStatisticedTitle = fanliOrderStatisticedTitle;
|
| | | }
|
| | |
|
| | | public String getFanliOrderStatisticedPush() {
|
| | | return fanliOrderStatisticedPush;
|
| | | }
|
| | |
|
| | | public void setFanliOrderStatisticedPush(String fanliOrderStatisticedPush) {
|
| | | this.fanliOrderStatisticedPush = fanliOrderStatisticedPush;
|
| | | }
|
| | |
|
| | | public String getFanliOrderStatisticedMsg() {
|
| | | return fanliOrderStatisticedMsg;
|
| | | }
|
| | |
|
| | | public void setFanliOrderStatisticedMsg(String fanliOrderStatisticedMsg) {
|
| | | this.fanliOrderStatisticedMsg = fanliOrderStatisticedMsg;
|
| | | }
|
| | |
|
| | | public String getTichengOrderStatisticedTitle() {
|
| | | return tichengOrderStatisticedTitle;
|
| | | }
|
| | |
|
| | | public void setTichengOrderStatisticedTitle(String tichengOrderStatisticedTitle) {
|
| | | this.tichengOrderStatisticedTitle = tichengOrderStatisticedTitle;
|
| | | }
|
| | |
|
| | | public String getTichengOrderStatisticedPush() {
|
| | | return tichengOrderStatisticedPush;
|
| | | }
|
| | |
|
| | | public void setTichengOrderStatisticedPush(String tichengOrderStatisticedPush) {
|
| | | this.tichengOrderStatisticedPush = tichengOrderStatisticedPush;
|
| | | }
|
| | |
|
| | | public String getTichengOrderStatisticedMsg() {
|
| | | return tichengOrderStatisticedMsg;
|
| | | }
|
| | |
|
| | | public void setTichengOrderStatisticedMsg(String tichengOrderStatisticedMsg) {
|
| | | this.tichengOrderStatisticedMsg = tichengOrderStatisticedMsg;
|
| | | }
|
| | |
|
| | | public String getNewerHongbaoTitle() {
|
| | | return newerHongbaoTitle;
|
| | | }
|
| | |
|
| | | public void setNewerHongbaoTitle(String newerHongbaoTitle) {
|
| | | this.newerHongbaoTitle = newerHongbaoTitle;
|
| | | }
|
| | |
|
| | | public String getExtractApplayMsg() {
|
| | | return extractApplayMsg;
|
| | | }
|
| | |
|
| | | public void setExtractApplayMsg(String extractApplayMsg) {
|
| | | this.extractApplayMsg = extractApplayMsg;
|
| | | }
|
| | |
|
| | | public String getOrderFanliRecieveTitle() {
|
| | | return orderFanliRecieveTitle;
|
| | | }
|
| | |
|
| | | public void setOrderFanliRecieveTitle(String orderFanliRecieveTitle) {
|
| | | this.orderFanliRecieveTitle = orderFanliRecieveTitle;
|
| | | }
|
| | |
|
| | | public String getShareInviteMoneyRecieveTitle() {
|
| | | return shareInviteMoneyRecieveTitle;
|
| | | }
|
| | |
|
| | | public void setShareInviteMoneyRecieveTitle(String shareInviteMoneyRecieveTitle) {
|
| | | this.shareInviteMoneyRecieveTitle = shareInviteMoneyRecieveTitle;
|
| | | }
|
| | |
|
| | | public String getWeiquanDrawbackFanliTitle() {
|
| | | return weiquanDrawbackFanliTitle;
|
| | | }
|
| | |
|
| | | public void setWeiquanDrawbackFanliTitle(String weiquanDrawbackFanliTitle) {
|
| | | this.weiquanDrawbackFanliTitle = weiquanDrawbackFanliTitle;
|
| | | }
|
| | |
|
| | | public String getExtractApplayTitle() {
|
| | | return extractApplayTitle;
|
| | | }
|
| | |
|
| | | public void setExtractApplayTitle(String extractApplayTitle) {
|
| | | this.extractApplayTitle = extractApplayTitle;
|
| | | }
|
| | |
|
| | | public String getExtractTransferFailTitle() {
|
| | | return extractTransferFailTitle;
|
| | | }
|
| | |
|
| | | public void setExtractTransferFailTitle(String extractTransferFailTitle) {
|
| | | this.extractTransferFailTitle = extractTransferFailTitle;
|
| | | }
|
| | |
|
| | | public String getExtractWrongTitle() {
|
| | | return extractWrongTitle;
|
| | | }
|
| | |
|
| | | public void setExtractWrongTitle(String extractWrongTitle) {
|
| | | this.extractWrongTitle = extractWrongTitle;
|
| | | }
|
| | |
|
| | | public String getExtractSuccessTitle() {
|
| | | return extractSuccessTitle;
|
| | | }
|
| | |
|
| | | public void setExtractSuccessTitle(String extractSuccessTitle) {
|
| | | this.extractSuccessTitle = extractSuccessTitle;
|
| | | }
|
| | |
|
| | | public String getNewerHongbaoPush() {
|
| | | return newerHongbaoPush;
|
| | | }
|
| | |
|
| | | public void setNewerHongbaoPush(String newerHongbaoPush) {
|
| | | this.newerHongbaoPush = newerHongbaoPush;
|
| | | }
|
| | |
|
| | | public String getNewerHongbaoMsg() {
|
| | | return newerHongbaoMsg;
|
| | | }
|
| | |
|
| | | public void setNewerHongbaoMsg(String newerHongbaoMsg) {
|
| | | this.newerHongbaoMsg = newerHongbaoMsg;
|
| | | }
|
| | |
|
| | | public String getOrderFanliRecievePush() {
|
| | | return orderFanliRecievePush;
|
| | | }
|
| | |
|
| | | public void setOrderFanliRecievePush(String orderFanliRecievePush) {
|
| | | this.orderFanliRecievePush = orderFanliRecievePush;
|
| | | }
|
| | |
|
| | | public String getOrderFanliRecieveMsg() {
|
| | | return orderFanliRecieveMsg;
|
| | | }
|
| | |
|
| | | public void setOrderFanliRecieveMsg(String orderFanliRecieveMsg) {
|
| | | this.orderFanliRecieveMsg = orderFanliRecieveMsg;
|
| | | }
|
| | |
|
| | | public String getShareInviteMoneyRecievePush() {
|
| | | return shareInviteMoneyRecievePush;
|
| | | }
|
| | |
|
| | | public void setShareInviteMoneyRecievePush(String shareInviteMoneyRecievePush) {
|
| | | this.shareInviteMoneyRecievePush = shareInviteMoneyRecievePush;
|
| | | }
|
| | |
|
| | | public String getShareInviteMoneyRecieveMsg() {
|
| | | return shareInviteMoneyRecieveMsg;
|
| | | }
|
| | |
|
| | | public void setShareInviteMoneyRecieveMsg(String shareInviteMoneyRecieveMsg) {
|
| | | this.shareInviteMoneyRecieveMsg = shareInviteMoneyRecieveMsg;
|
| | | }
|
| | |
|
| | | public String getWeiquanDrawbackFanliMsg() {
|
| | | return weiquanDrawbackFanliMsg;
|
| | | }
|
| | |
|
| | | public void setWeiquanDrawbackFanliMsg(String weiquanDrawbackFanliMsg) {
|
| | | this.weiquanDrawbackFanliMsg = weiquanDrawbackFanliMsg;
|
| | | }
|
| | |
|
| | | public String getWeiquanDrawbackShareMsg() {
|
| | | return weiquanDrawbackShareMsg;
|
| | | }
|
| | |
|
| | | public void setWeiquanDrawbackShareMsg(String weiquanDrawbackShareMsg) {
|
| | | this.weiquanDrawbackShareMsg = weiquanDrawbackShareMsg;
|
| | | }
|
| | |
|
| | | public String getExtractApplayPush() {
|
| | | return extractApplayPush;
|
| | | }
|
| | |
|
| | | public void setExtractApplayPush(String extractApplayPush) {
|
| | | this.extractApplayPush = extractApplayPush;
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | public String getExtractTransferFailPush() {
|
| | | return extractTransferFailPush;
|
| | | }
|
| | |
|
| | | public void setExtractTransferFailPush(String extractTransferFailPush) {
|
| | | this.extractTransferFailPush = extractTransferFailPush;
|
| | | }
|
| | |
|
| | | public String getExtractTransferFailMsg() {
|
| | | return extractTransferFailMsg;
|
| | | }
|
| | |
|
| | | public void setExtractTransferFailMsg(String extractTransferFailMsg) {
|
| | | this.extractTransferFailMsg = extractTransferFailMsg;
|
| | | }
|
| | |
|
| | | public String getExtractWrongPush() {
|
| | | return extractWrongPush;
|
| | | }
|
| | |
|
| | | public void setExtractWrongPush(String extractWrongPush) {
|
| | | this.extractWrongPush = extractWrongPush;
|
| | | }
|
| | |
|
| | | public String getExtractWrongMsg() {
|
| | | return extractWrongMsg;
|
| | | }
|
| | |
|
| | | public void setExtractWrongMsg(String extractWrongMsg) {
|
| | | this.extractWrongMsg = extractWrongMsg;
|
| | | }
|
| | |
|
| | | public String getExtractSuccessPush() {
|
| | | return extractSuccessPush;
|
| | | }
|
| | |
|
| | | public void setExtractSuccessPush(String extractSuccessPush) {
|
| | | this.extractSuccessPush = extractSuccessPush;
|
| | | }
|
| | |
|
| | | public String getExtractSuccessMsg() {
|
| | | return extractSuccessMsg;
|
| | | }
|
| | |
|
| | | public void setExtractSuccessMsg(String extractSuccessMsg) {
|
| | | this.extractSuccessMsg = extractSuccessMsg;
|
| | | }
|
| | |
|
| | | public String getWeiquanDrawbackFanliPush() {
|
| | | return weiquanDrawbackFanliPush;
|
| | | }
|
| | |
|
| | | public void setWeiquanDrawbackFanliPush(String weiquanDrawbackFanliPush) {
|
| | | this.weiquanDrawbackFanliPush = weiquanDrawbackFanliPush;
|
| | | }
|
| | |
|
| | | public String getWeiquanDrawbackShareTitle() {
|
| | | return weiquanDrawbackShareTitle;
|
| | | }
|
| | |
|
| | | public void setWeiquanDrawbackShareTitle(String weiquanDrawbackShareTitle) {
|
| | | this.weiquanDrawbackShareTitle = weiquanDrawbackShareTitle;
|
| | | }
|
| | |
|
| | | public String getWeiquanDrawbackSharePush() {
|
| | | return weiquanDrawbackSharePush;
|
| | | }
|
| | |
|
| | | public void setWeiquanDrawbackSharePush(String weiquanDrawbackSharePush) {
|
| | | this.weiquanDrawbackSharePush = weiquanDrawbackSharePush;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.base.dto;
|
| | |
|
| | | public class AcceptData {
|
| | | private String appkey;
|
| | | private String device;
|
| | | private String packages;
|
| | | private String time;
|
| | | private String sign;
|
| | | private String version;
|
| | | private String apiversion;
|
| | | private String platform;
|
| | | private String channel;
|
| | | private String deviceType;
|
| | | private String osVersion;
|
| | | private String network;
|
| | | private String imei;
|
| | |
|
| | | public String getImei() {
|
| | | return imei;
|
| | | }
|
| | |
|
| | | public void setImei(String imei) {
|
| | | this.imei = imei;
|
| | | }
|
| | |
|
| | | public String getNetwork() {
|
| | | return network;
|
| | | }
|
| | |
|
| | | public void setNetwork(String network) {
|
| | | this.network = network;
|
| | | }
|
| | |
|
| | | public String getChannel() {
|
| | | return channel;
|
| | | }
|
| | |
|
| | | public void setChannel(String channel) {
|
| | | this.channel = channel;
|
| | | }
|
| | |
|
| | | public String getDeviceType() {
|
| | | return deviceType;
|
| | | }
|
| | |
|
| | | public void setDeviceType(String deviceType) {
|
| | | this.deviceType = deviceType;
|
| | | }
|
| | |
|
| | | public String getOsVersion() {
|
| | | return osVersion;
|
| | | }
|
| | |
|
| | | public void setOsVersion(String osVersion) {
|
| | | this.osVersion = osVersion;
|
| | | }
|
| | |
|
| | | public String getPlatform() {
|
| | | return platform;
|
| | | }
|
| | |
|
| | | public void setPlatform(String platform) {
|
| | | this.platform = platform;
|
| | | }
|
| | |
|
| | | public String getAppkey() {
|
| | | return appkey;
|
| | | }
|
| | |
|
| | | public void setAppkey(String appkey) {
|
| | | this.appkey = appkey;
|
| | | }
|
| | |
|
| | | public String getDevice() {
|
| | | return device;
|
| | | }
|
| | |
|
| | | public void setDevice(String device) {
|
| | | this.device = device;
|
| | | }
|
| | |
|
| | | public String getPackages() {
|
| | | return packages;
|
| | | }
|
| | |
|
| | | public void setPackages(String packages) {
|
| | | this.packages = packages;
|
| | | }
|
| | |
|
| | | public String getTime() {
|
| | | return time;
|
| | | }
|
| | |
|
| | | public void setTime(String time) {
|
| | | this.time = time;
|
| | | }
|
| | |
|
| | | public String getSign() {
|
| | | return sign;
|
| | | }
|
| | |
|
| | | public void setSign(String sign) {
|
| | | this.sign = sign;
|
| | | }
|
| | |
|
| | | public String getVersion() {
|
| | | return version;
|
| | | }
|
| | |
|
| | | public void setVersion(String version) {
|
| | | this.version = version;
|
| | | }
|
| | |
|
| | | public String getApiversion() {
|
| | | return apiversion;
|
| | | }
|
| | |
|
| | | public void setApiversion(String apiversion) {
|
| | | this.apiversion = apiversion;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.base.dto;
|
| | |
|
| | | public class ImageInfo {
|
| | | private String picture;
|
| | | private int width;
|
| | | private int height;
|
| | |
|
| | | public ImageInfo() {
|
| | |
|
| | | }
|
| | |
|
| | | public ImageInfo(String picture, int width, int height) {
|
| | | this.picture = picture;
|
| | | this.width = width;
|
| | | this.height = height;
|
| | | }
|
| | |
|
| | | public String getPicture() {
|
| | | return picture;
|
| | | }
|
| | |
|
| | | public void setPicture(String picture) {
|
| | | this.picture = picture;
|
| | | }
|
| | |
|
| | | public int getWidth() {
|
| | | return width;
|
| | | }
|
| | |
|
| | | public void setWidth(int width) {
|
| | | this.width = width;
|
| | | }
|
| | |
|
| | | public int getHeight() {
|
| | | return height;
|
| | | }
|
| | |
|
| | | public void setHeight(int height) {
|
| | | this.height = height;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.base.dto;
|
| | |
|
| | | import java.util.Map;
|
| | |
|
| | | import com.google.gson.annotations.Expose;
|
| | |
|
| | | public class PageEntity {
|
| | | private String url; //
|
| | | @Expose
|
| | | private int pageIndex;//
|
| | | @Expose
|
| | | private int pageSize; //
|
| | | @Expose
|
| | | private long totalCount;//
|
| | | @Expose
|
| | | private int totalPage;
|
| | |
|
| | | public PageEntity(int pageIndex, int pageSize, long totalCount, int totalPage) {
|
| | | super();
|
| | | this.pageIndex = pageIndex;
|
| | | this.pageSize = pageSize;
|
| | | this.totalCount = totalCount;
|
| | | this.totalPage = totalPage;
|
| | | }
|
| | | public PageEntity() {
|
| | | super();
|
| | | }
|
| | | |
| | | public PageEntity(int pageIndex, int pageSize, int totalCount) {
|
| | | super();
|
| | | this.pageIndex = pageIndex;
|
| | | this.pageSize = pageSize;
|
| | | this.totalCount = totalCount;
|
| | | }
|
| | |
|
| | | private Map<String, String> params;//
|
| | |
|
| | | public int getTotalPage() {
|
| | | return totalPage;
|
| | | }
|
| | |
|
| | | public void setTotalPage(int totalPage) {
|
| | | this.totalPage = totalPage;
|
| | | }
|
| | |
|
| | | public String getUrl() {
|
| | | return url;
|
| | | }
|
| | |
|
| | | public void setUrl(String url) {
|
| | | this.url = url;
|
| | | }
|
| | |
|
| | | public int getPageIndex() {
|
| | | return pageIndex;
|
| | | }
|
| | |
|
| | | public void setPageIndex(int pageIndex) {
|
| | | this.pageIndex = pageIndex;
|
| | | }
|
| | |
|
| | | public int getPageSize() {
|
| | | return pageSize;
|
| | | }
|
| | |
|
| | | public void setPageSize(int pageSize) {
|
| | | this.pageSize = pageSize;
|
| | | }
|
| | |
|
| | | public long getTotalCount() {
|
| | | return totalCount;
|
| | | }
|
| | |
|
| | | public void setTotalCount(long totalCount) {
|
| | | this.totalCount = totalCount;
|
| | | }
|
| | |
|
| | | public Map<String, String> getParams() {
|
| | | return params;
|
| | | }
|
| | |
|
| | | public void setParams(Map<String, String> params) {
|
| | | this.params = params;
|
| | | }
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.base.dto;
|
| | |
|
| | | import java.math.BigDecimal;
|
| | | import java.util.Set;
|
| | |
|
| | | public class SearchFilter {
|
| | | private BigDecimal startPrice;
|
| | | private BigDecimal endPrice;
|
| | | private Set<String> params;
|
| | | private String key;
|
| | | private int page;
|
| | | private int pageSize;
|
| | |
|
| | | // 排序字段
|
| | | // 销量(total_sales)淘客佣金比率(tk_rate)累计推广量(tk_total_sales)总支出佣金(tk_total_commi)
|
| | | private int sort;
|
| | |
|
| | | private String cateIds;
|
| | | // 官方的物料Id
|
| | | private String materialId;
|
| | | |
| | | private boolean tmall;
|
| | |
|
| | | private int hongbao;
|
| | |
|
| | | private int type;
|
| | |
|
| | | private String shopTag;
|
| | | // 1-包邮 0-不包邮
|
| | | private boolean baoYou;
|
| | |
|
| | | private boolean tmFlagship;
|
| | |
|
| | | private int provinceId;
|
| | | // 淘客佣金比率上限,如:1234表示12.34%
|
| | | private int endTkRate;
|
| | | // 淘客佣金比率下限,如:1234表示12.34%
|
| | | private int startTkRate;
|
| | | |
| | | // KA媒体淘客佣金比率上限,如:1234表示12.34%
|
| | | private int endKaTkRate;
|
| | | // KA媒体淘客佣金比率下限,如:1234表示12.34%
|
| | | private int startKaTkRate;
|
| | | |
| | | |
| | | // 1-有券 0-无券
|
| | | private int quan;
|
| | | |
| | |
|
| | | // 店铺dsr评分,筛选高于等于当前设置的店铺dsr评分的商品0-50000之间
|
| | | private int startDsr;
|
| | | // 是否海外商品,设置为true表示该商品是属于海外商品,设置为false或不设置表示不判断这个属性
|
| | | private boolean overseas;
|
| | | // 是否加入消费者保障,true表示加入,空或false表示不限
|
| | | private boolean needPrepay;
|
| | | // 成交转化是否高于行业均值
|
| | | private boolean includePayRate30;
|
| | | // 好评率是否高于行业均值
|
| | | private boolean includeGoodRate;
|
| | | // 退款率是否低于行业均值
|
| | | private boolean includeRfdRate;
|
| | | // 牛皮癣程度,取值:1:不限,2:无,3:轻微
|
| | | private int npxLevel;
|
| | |
|
| | | // 月销量
|
| | | private String startBiz30day;
|
| | | |
| | | // 销售量小值
|
| | | private int minSales;
|
| | | // 销售量大值
|
| | | private int maxSales;
|
| | | // 标签
|
| | | private String lableNames;
|
| | | |
| | | // ip地址
|
| | | private String ip;
|
| | |
|
| | | public SearchFilter() {
|
| | | shopTag = "";
|
| | | }
|
| | |
|
| | | public boolean isTmFlagship() {
|
| | | return tmFlagship;
|
| | | }
|
| | |
|
| | | public int getPageSize() {
|
| | | return pageSize;
|
| | | }
|
| | |
|
| | | public void setPageSize(int pageSize) {
|
| | | this.pageSize = pageSize;
|
| | | }
|
| | |
|
| | | public void setTmFlagship(boolean tmFlagship) {
|
| | | this.tmFlagship = tmFlagship;
|
| | | }
|
| | |
|
| | | public String getShopTag() {
|
| | | return shopTag;
|
| | | }
|
| | |
|
| | | public void setShopTag(String shopTag) {
|
| | | this.shopTag = shopTag;
|
| | | }
|
| | |
|
| | | public Set<String> getParams() {
|
| | | return params;
|
| | | }
|
| | |
|
| | | public boolean isBaoYou() {
|
| | | return baoYou;
|
| | | }
|
| | |
|
| | | public void setBaoYou(boolean baoYou) {
|
| | | this.baoYou = baoYou;
|
| | | }
|
| | |
|
| | | public void setParams(Set<String> params) {
|
| | | this.params = params;
|
| | | }
|
| | |
|
| | | public int getType() {
|
| | | return type;
|
| | | }
|
| | |
|
| | | public void setType(int type) {
|
| | | this.type = type;
|
| | | }
|
| | |
|
| | | public int getHongbao() {
|
| | | return hongbao;
|
| | | }
|
| | |
|
| | | public void setHongbao(int hongbao) {
|
| | | this.hongbao = hongbao;
|
| | | }
|
| | |
|
| | | public int getQuan() {
|
| | | return quan;
|
| | | }
|
| | |
|
| | | public void setQuan(int quan) {
|
| | | this.quan = quan;
|
| | | }
|
| | |
|
| | | public boolean isTmall() {
|
| | | return tmall;
|
| | | }
|
| | |
|
| | | public void setTmall(boolean tmall) {
|
| | | this.tmall = tmall;
|
| | | }
|
| | |
|
| | | public String getCateIds() {
|
| | | return cateIds;
|
| | | }
|
| | |
|
| | | public void setCateIds(String cateIds) {
|
| | | this.cateIds = cateIds;
|
| | | }
|
| | |
|
| | | public String getKey() {
|
| | | return key;
|
| | | }
|
| | |
|
| | | public void setKey(String key) {
|
| | | this.key = key;
|
| | | }
|
| | |
|
| | | public int getPage() {
|
| | | return page;
|
| | | }
|
| | |
|
| | | public void setPage(int page) {
|
| | | this.page = page;
|
| | | }
|
| | |
|
| | | public int getSort() {
|
| | | return sort;
|
| | | }
|
| | |
|
| | | public void setSort(int sort) {
|
| | | this.sort = sort;
|
| | | }
|
| | |
|
| | | public int getProvinceId() {
|
| | | return provinceId;
|
| | | }
|
| | |
|
| | | public void setProvinceId(int provinceId) {
|
| | | this.provinceId = provinceId;
|
| | | }
|
| | |
|
| | | public int getEndTkRate() {
|
| | | return endTkRate;
|
| | | }
|
| | |
|
| | | public void setEndTkRate(int endTkRate) {
|
| | | this.endTkRate = endTkRate;
|
| | | }
|
| | |
|
| | | public int getStartTkRate() {
|
| | | return startTkRate;
|
| | | }
|
| | |
|
| | | public void setStartTkRate(int startTkRate) {
|
| | | this.startTkRate = startTkRate;
|
| | | }
|
| | |
|
| | | public int getStartDsr() {
|
| | | return startDsr;
|
| | | }
|
| | |
|
| | | public void setStartDsr(int startDsr) {
|
| | | this.startDsr = startDsr;
|
| | | }
|
| | |
|
| | | public boolean isOverseas() {
|
| | | return overseas;
|
| | | }
|
| | |
|
| | | public void setOverseas(boolean overseas) {
|
| | | this.overseas = overseas;
|
| | | }
|
| | |
|
| | | public boolean isNeedPrepay() {
|
| | | return needPrepay;
|
| | | }
|
| | |
|
| | | public void setNeedPrepay(boolean needPrepay) {
|
| | | this.needPrepay = needPrepay;
|
| | | }
|
| | |
|
| | | public boolean isIncludePayRate30() {
|
| | | return includePayRate30;
|
| | | }
|
| | |
|
| | | public void setIncludePayRate30(boolean includePayRate30) {
|
| | | this.includePayRate30 = includePayRate30;
|
| | | }
|
| | |
|
| | | public boolean isIncludeGoodRate() {
|
| | | return includeGoodRate;
|
| | | }
|
| | |
|
| | | public void setIncludeGoodRate(boolean includeGoodRate) {
|
| | | this.includeGoodRate = includeGoodRate;
|
| | | }
|
| | |
|
| | | public boolean isIncludeRfdRate() {
|
| | | return includeRfdRate;
|
| | | }
|
| | |
|
| | | public void setIncludeRfdRate(boolean includeRfdRate) {
|
| | | this.includeRfdRate = includeRfdRate;
|
| | | }
|
| | |
|
| | | public int getNpxLevel() {
|
| | | return npxLevel;
|
| | | }
|
| | |
|
| | | public void setNpxLevel(int npxLevel) {
|
| | | this.npxLevel = npxLevel;
|
| | | }
|
| | |
|
| | | public String getStartBiz30day() {
|
| | | return startBiz30day;
|
| | | }
|
| | |
|
| | | public void setStartBiz30day(String startBiz30day) {
|
| | | this.startBiz30day = startBiz30day;
|
| | | }
|
| | |
|
| | | public BigDecimal getStartPrice() {
|
| | | return startPrice;
|
| | | }
|
| | |
|
| | | public void setStartPrice(BigDecimal startPrice) {
|
| | | this.startPrice = startPrice;
|
| | | }
|
| | |
|
| | | public BigDecimal getEndPrice() {
|
| | | return endPrice;
|
| | | }
|
| | |
|
| | | public void setEndPrice(BigDecimal endPrice) {
|
| | | this.endPrice = endPrice;
|
| | | }
|
| | |
|
| | | public int getMinSales() {
|
| | | return minSales;
|
| | | }
|
| | |
|
| | | public void setMinSales(int minSales) {
|
| | | this.minSales = minSales;
|
| | | }
|
| | |
|
| | | public int getMaxSales() {
|
| | | return maxSales;
|
| | | }
|
| | |
|
| | | public void setMaxSales(int maxSales) {
|
| | | this.maxSales = maxSales;
|
| | | }
|
| | |
|
| | | public String getLableNames() {
|
| | | return lableNames;
|
| | | }
|
| | |
|
| | | public void setLableNames(String lableNames) {
|
| | | this.lableNames = lableNames;
|
| | | }
|
| | |
|
| | | public String getIp() {
|
| | | return ip;
|
| | | }
|
| | |
|
| | | public void setIp(String ip) {
|
| | | this.ip = ip;
|
| | | }
|
| | |
|
| | | public String getMaterialId() {
|
| | | return materialId;
|
| | | }
|
| | |
|
| | | public void setMaterialId(String materialId) {
|
| | | this.materialId = materialId;
|
| | | }
|
| | |
|
| | | public int getEndKaTkRate() {
|
| | | return endKaTkRate;
|
| | | }
|
| | |
|
| | | public void setEndKaTkRate(int endKaTkRate) {
|
| | | this.endKaTkRate = endKaTkRate;
|
| | | }
|
| | |
|
| | | public int getStartKaTkRate() {
|
| | | return startKaTkRate;
|
| | | }
|
| | |
|
| | | public void setStartKaTkRate(int startKaTkRate) {
|
| | | this.startKaTkRate = startKaTkRate;
|
| | | }
|
| | | |
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.base.entity.admin;
|
| | |
|
| | | import java.io.Serializable;
|
| | |
|
| | | import javax.persistence.Column;
|
| | | import javax.persistence.Entity;
|
| | | import javax.persistence.GeneratedValue;
|
| | | import javax.persistence.GenerationType;
|
| | | import javax.persistence.Id;
|
| | | import javax.persistence.Table;
|
| | |
|
| | | import com.google.gson.annotations.Expose;
|
| | |
|
| | | @Entity
|
| | | @Table(name = "`yeshi_ec_adminuser`")
|
| | | @org.yeshi.utils.mybatis.Table("yeshi_ec_adminuser")
|
| | | public class AdminUser implements Serializable{
|
| | | /**
|
| | | * |
| | | */
|
| | | private static final long serialVersionUID = 1L;
|
| | |
|
| | | @Id
|
| | | @GeneratedValue(strategy = GenerationType.AUTO)
|
| | | @org.yeshi.utils.mybatis.Column(name = "id")
|
| | | @Column(name = "id")
|
| | | private Long id;
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "name")
|
| | | @Column(name = "name", length = 32)
|
| | | @Expose
|
| | | private String name;
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "account")
|
| | | @Column(name = "account", length = 50)
|
| | | private String account;
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "pwd")
|
| | | @Column(name = "pwd", length = 50)
|
| | | private String pwd;
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "createtime")
|
| | | @Column(name = "createtime", length = 16)
|
| | | private String createtime;
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "authority")
|
| | | @Column(name = "authority", length = 1)
|
| | | private Integer authority;// 0-超级权限 1-普�?权限
|
| | |
|
| | | // 邮箱
|
| | | @org.yeshi.utils.mybatis.Column(name = "email")
|
| | | @Column(name = "email", length = 30)
|
| | | private String email;
|
| | | |
| | | |
| | | public AdminUser(){}
|
| | | |
| | | public AdminUser(Long id){
|
| | | this.id=id;
|
| | | }
|
| | | |
| | | |
| | |
|
| | | public String getEmail() {
|
| | | return email;
|
| | | }
|
| | |
|
| | | public void setEmail(String email) {
|
| | | this.email = email;
|
| | | }
|
| | |
|
| | | public int getAuthority() {
|
| | | return authority;
|
| | | }
|
| | |
|
| | | public void setAuthority(int authority) {
|
| | | this.authority = authority;
|
| | | }
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public String getName() {
|
| | | return name;
|
| | | }
|
| | |
|
| | | public void setName(String name) {
|
| | | this.name = name;
|
| | | }
|
| | |
|
| | | public String getAccount() {
|
| | | return account;
|
| | | }
|
| | |
|
| | | public void setAccount(String account) {
|
| | | this.account = account;
|
| | | }
|
| | |
|
| | | public String getPwd() {
|
| | | return pwd;
|
| | | }
|
| | |
|
| | | public void setPwd(String pwd) {
|
| | | this.pwd = pwd;
|
| | | }
|
| | |
|
| | | public String getCreatetime() {
|
| | | return createtime;
|
| | | }
|
| | |
|
| | | public void setCreatetime(String createtime) {
|
| | | this.createtime = createtime;
|
| | | }
|
| | | }
|
| | |
| | | private BigDecimal rate;
|
| | | @Column(name = "cg_picture")
|
| | | private String picture;
|
| | | @Column(name = "cg_picture_white")
|
| | | private String pictureWhite;
|
| | | @Column(name = "cg_state")
|
| | | private Integer state;
|
| | | @Column(name = "cg_price")
|
| | |
| | | public void setVideoUrl(String videoUrl) {
|
| | | this.videoUrl = videoUrl;
|
| | | }
|
| | |
|
| | | public String getPictureWhite() {
|
| | | return pictureWhite;
|
| | | }
|
| | |
|
| | | public void setPictureWhite(String pictureWhite) {
|
| | | this.pictureWhite = pictureWhite;
|
| | | }
|
| | | }
|
| | |
| | | package com.yeshi.fanli.base.entity.goods;
|
| | |
|
| | | import com.google.gson.annotations.Expose;
|
| | | import org.hibernate.annotations.Type;
|
| | |
|
| | | import javax.persistence.*;
|
| | | import java.io.Serializable;
|
| | | import java.math.BigDecimal;
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | |
|
| | | import javax.persistence.Column;
|
| | | import javax.persistence.Entity;
|
| | | import javax.persistence.GeneratedValue;
|
| | | import javax.persistence.GenerationType;
|
| | | import javax.persistence.Id;
|
| | | import javax.persistence.Table;
|
| | | import javax.persistence.Transient;
|
| | |
|
| | | import org.hibernate.annotations.Type;
|
| | |
|
| | | import com.google.gson.annotations.Expose;
|
| | |
|
| | | /**
|
| | | * 淘宝商品信息
|
| | |
| | | @Column(length = 256)
|
| | | @Expose
|
| | | private String pictUrl;// 主图链接
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "pictUrlWhite")
|
| | | @Column(length = 256)
|
| | | @Expose
|
| | | private String pictUrlWhite;// 白底色图片链接
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "title")
|
| | | @Column(length = 256)
|
| | |
| | | @Column
|
| | | private Integer state;// 0-正常 1-商品下架
|
| | |
|
| | | @Transient
|
| | | private Integer materialLibType;//物料库类型
|
| | | |
| | |
|
| | |
|
| | | /* 新增字段 2018-7-16 ; 由于数据未从淘宝获取成功,暂不启用 */
|
| | | |
| | | public Integer getMaterialLibType() {
|
| | | return materialLibType;
|
| | | }
|
| | |
|
| | | public void setMaterialLibType(Integer materialLibType) {
|
| | | this.materialLibType = materialLibType;
|
| | | }
|
| | |
|
| | | // @org.yeshi.utils.mybatis.Column(name = "catLeafName")
|
| | | @Transient
|
| | |
| | | this.totalSales = totalSales;
|
| | | }
|
| | |
|
| | | public String getPictUrlWhite() {
|
| | | return pictUrlWhite;
|
| | | }
|
| | |
|
| | | public void setPictUrlWhite(String pictUrlWhite) {
|
| | | this.pictUrlWhite = pictUrlWhite;
|
| | | }
|
| | | |
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.base.entity.user;
|
| | |
|
| | | import org.yeshi.utils.mybatis.Column;
|
| | | import org.yeshi.utils.mybatis.Table;
|
| | |
|
| | | @Table("yeshi_ec_pid_user")
|
| | | public class PidUser {
|
| | | // 商品分享PID
|
| | | public final static int TYPE_SHARE_GOODS = 0;
|
| | |
|
| | | // 商品返利-Android
|
| | | public final static int TYPE_FANLI_ANDROID = 1;
|
| | |
|
| | | // 商品返利-IOS
|
| | | public final static int TYPE_FANLI_IOS = 2;
|
| | |
|
| | | @Column(name = "id")
|
| | | private Long id;
|
| | | @Column(name = "uid")
|
| | | private Long uid;
|
| | |
|
| | | @Column(name = "pid")
|
| | | private String pid;
|
| | |
|
| | | @Column(name = "pid_type")
|
| | | private Integer type;
|
| | |
|
| | | public Integer getType() {
|
| | | return type;
|
| | | }
|
| | |
|
| | | public void setType(Integer type) {
|
| | | this.type = type;
|
| | | }
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public Long getUid() {
|
| | | return uid;
|
| | | }
|
| | |
|
| | | public void setUid(Long uid) {
|
| | | this.uid = uid;
|
| | | }
|
| | |
|
| | | public String getPid() {
|
| | | return pid;
|
| | | }
|
| | |
|
| | | public void setPid(String pid) {
|
| | | this.pid = pid;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.base.exception;
|
| | |
|
| | | public class ExistObjectException extends Exception {
|
| | |
|
| | | private static final long serialVersionUID = 572112205824229000L;
|
| | |
|
| | | public ExistObjectException() {
|
| | | }
|
| | | |
| | | public ExistObjectException(String msg) {
|
| | | super(msg);
|
| | | }
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.base.exception;
|
| | |
|
| | | public class NotExistObjectException extends Exception {
|
| | |
|
| | | private static final long serialVersionUID = 572112205824229000L;
|
| | |
|
| | | public NotExistObjectException() {
|
| | | }
|
| | | |
| | | public NotExistObjectException(String msg) {
|
| | | super(msg);
|
| | | }
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.base.exception;
|
| | |
|
| | | public class ObjectStateException extends Exception {
|
| | | private static final long serialVersionUID = 8576781914864365552L;
|
| | | private String msg;
|
| | | |
| | | public ObjectStateException() {
|
| | | |
| | | }
|
| | | |
| | | public ObjectStateException(String error) {
|
| | | this.msg=error;
|
| | | }
|
| | | |
| | | @Override
|
| | | public String getMessage() {
|
| | | return this.msg;
|
| | | }
|
| | | |
| | | |
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.base.log;
|
| | |
|
| | | import java.io.File;
|
| | | import java.io.FileOutputStream;
|
| | | import java.io.OutputStream;
|
| | | import java.io.PrintStream;
|
| | |
|
| | | import org.apache.log4j.Logger;
|
| | | import org.yeshi.utils.TimeUtil;
|
| | |
|
| | | public class LogHelper {
|
| | | // log
|
| | | private static Logger userLogger = Logger.getLogger("userInfoLog");
|
| | |
|
| | | private static Logger orderLogger = Logger.getLogger("orderLog");
|
| | |
|
| | | private static Logger userOrderLogger = Logger.getLogger("userOrderLog");
|
| | |
|
| | | private static Logger cookieLogger = Logger.getLogger("cookieLog");
|
| | |
|
| | | private static Logger testLogger = Logger.getLogger("testLog");
|
| | |
|
| | | private static Logger errorLogger = Logger.getLogger("errorLog");
|
| | |
|
| | | private static Logger httpLogger = Logger.getLogger("httpLog");
|
| | |
|
| | | private static Logger taoBaoLinkLog = Logger.getLogger("taoBaoLinkLog");
|
| | |
|
| | | private static Logger shareGoodsLogger = Logger.getLogger("shareGoodsLog");
|
| | |
|
| | | private static Logger loginLogger = Logger.getLogger("loginLog");
|
| | |
|
| | | public static void userInfo(Object obj) {
|
| | | userLogger.info(obj);
|
| | | }
|
| | |
|
| | | public static void userErrorInfo(Object obj) {
|
| | | userLogger.error(obj);
|
| | | }
|
| | |
|
| | | public static void orderInfo(Object obj) {
|
| | | orderLogger.info(obj);
|
| | | }
|
| | |
|
| | | public static void orderErrorInfo(Object obj) {
|
| | | orderLogger.error(obj);
|
| | | }
|
| | |
|
| | | public static void cookieLog(Object obj) {
|
| | | cookieLogger.info(obj);
|
| | | }
|
| | |
|
| | | public static void userOrder(Object obj) {
|
| | | userOrderLogger.info(obj);
|
| | | }
|
| | |
|
| | | public static void test(Object obj) {
|
| | | testLogger.info(obj);
|
| | | }
|
| | |
|
| | | public static void error(Object obj) {
|
| | | errorLogger.info(obj);
|
| | | }
|
| | |
|
| | | public static void taoBaoLinkError(Object obj) {
|
| | | taoBaoLinkLog.info(obj);
|
| | | }
|
| | |
|
| | | public static void shareGoods(Object obj) {
|
| | | shareGoodsLogger.info(obj);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 登录信息
|
| | | * @param obj
|
| | | */
|
| | | public static void lgoinInfo(Object obj) {
|
| | | loginLogger.info(obj);
|
| | | }
|
| | |
|
| | | public static void errorDetailInfo(Throwable e) throws Exception {
|
| | | e.printStackTrace();
|
| | | String date = TimeUtil.getGernalTime(System.currentTimeMillis(), "yyyy_MM_dd");
|
| | | String os = System.getProperty("os.name");
|
| | | String filePath = String.format("/usr/local/tomcat8/logs/error_detail_%s.txt", date);
|
| | | if (os.toLowerCase().startsWith("win")) {
|
| | | filePath = String.format("C:/logs/error_detail_%s.txt", date);
|
| | | } else
|
| | | filePath = String.format("/usr/local/tomcat8/logs/error_detail_%s.txt", date);
|
| | |
|
| | | OutputStream out = new FileOutputStream(new File(filePath), true);
|
| | | try {
|
| | | PrintStream ps = new PrintStream(out);
|
| | | ps.print(TimeUtil.getGernalTime(System.currentTimeMillis(), "yyyy-MM-dd HH:mm:ss"));
|
| | | ps.print("\n");
|
| | | e.printStackTrace(ps);
|
| | | ps.flush();
|
| | | ps.close();
|
| | | } finally {
|
| | | out.close();
|
| | | }
|
| | | }
|
| | |
|
| | | public static void errorDetailInfo(Throwable e, String params, String url) throws Exception {
|
| | | e.printStackTrace();
|
| | | String date = TimeUtil.getGernalTime(System.currentTimeMillis(), "yyyy_MM_dd");
|
| | | String os = System.getProperty("os.name");
|
| | | String filePath = String.format("/usr/local/tomcat8/logs/error_detail_%s.txt", date);
|
| | | if (os.toLowerCase().startsWith("win")) {
|
| | | filePath = String.format("C:/logs/error_detail_%s.txt", date);
|
| | | } else
|
| | | filePath = String.format("/usr/local/tomcat8/logs/error_detail_%s.txt", date);
|
| | |
|
| | | OutputStream out = new FileOutputStream(new File(filePath), true);
|
| | | try {
|
| | | PrintStream ps = new PrintStream(out);
|
| | | ps.print(TimeUtil.getGernalTime(System.currentTimeMillis(), "yyyy-MM-dd HH:mm:ss"));
|
| | | ps.print("\n");
|
| | | ps.print("链接:" + url);
|
| | | ps.print("\n");
|
| | | ps.print("参数:" + params);
|
| | | ps.print("\n");
|
| | | e.printStackTrace(ps);
|
| | | ps.flush();
|
| | | ps.close();
|
| | | } finally {
|
| | | out.close();
|
| | | }
|
| | | }
|
| | |
|
| | | public static void httpInfo(String url, String params, String response) {
|
| | | String msg = url + "\n" + params + "\n" + response;
|
| | | httpLogger.info(msg);
|
| | | }
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.base.log;
|
| | |
|
| | | import java.io.File;
|
| | | import java.io.FileOutputStream;
|
| | | import java.io.IOException;
|
| | | import java.io.OutputStream;
|
| | | import java.io.PrintStream;
|
| | |
|
| | | import org.apache.log4j.Logger;
|
| | | import org.yeshi.utils.TimeUtil;
|
| | |
|
| | | /**
|
| | | * 推送日志
|
| | | * |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | public class PushLogHelper {
|
| | | // log
|
| | | private static Logger xmLogger = Logger.getLogger("pushXMLog");
|
| | |
|
| | | private static Logger iosLogger = Logger.getLogger("pushIOSLog");
|
| | |
|
| | | private static Logger hwLogger = Logger.getLogger("pushHWLog");
|
| | |
|
| | | public static void xmInfo(Object obj) {
|
| | | xmLogger.info(obj);
|
| | | }
|
| | |
|
| | | public static void iosInfo(Object obj) {
|
| | | iosLogger.info(obj);
|
| | | }
|
| | |
|
| | | public static void hwInfo(Object obj) {
|
| | | hwLogger.info(obj);
|
| | | }
|
| | |
|
| | | public static void xmError(Throwable e) {
|
| | | String date = TimeUtil.getGernalTime(System.currentTimeMillis(), "yyyy_MM_dd");
|
| | | String os = System.getProperty("os.name");
|
| | | String filePath = String.format("/usr/local/tomcat8/logs/push/xm_error_detail_%s.txt", date);
|
| | | if (os.toLowerCase().startsWith("win")) {
|
| | | filePath = String.format("C:/logs/push/xm_error_detail_%s.txt", date);
|
| | | }
|
| | |
|
| | | try {
|
| | | saveErrorLog(e, filePath);
|
| | | } catch (IOException e1) {
|
| | | }
|
| | | }
|
| | |
|
| | | public static void iosError(Throwable e) {
|
| | | String date = TimeUtil.getGernalTime(System.currentTimeMillis(), "yyyy_MM_dd");
|
| | | String os = System.getProperty("os.name");
|
| | | String filePath = String.format("/usr/local/tomcat8/logs/push/ios_error_detail_%s.txt", date);
|
| | | if (os.toLowerCase().startsWith("win")) {
|
| | | filePath = String.format("C:/logs/push/ios_error_detail_%s.txt", date);
|
| | | }
|
| | |
|
| | | try {
|
| | | saveErrorLog(e, filePath);
|
| | | } catch (IOException e1) {
|
| | | }
|
| | | }
|
| | |
|
| | | public static void hwError(Throwable e) {
|
| | | String date = TimeUtil.getGernalTime(System.currentTimeMillis(), "yyyy_MM_dd");
|
| | | String os = System.getProperty("os.name");
|
| | | String filePath = String.format("/usr/local/tomcat8/logs/push/hw_error_detail_%s.txt", date);
|
| | | if (os.toLowerCase().startsWith("win")) {
|
| | | filePath = String.format("C:/logs/push/hw_error_detail_%s.txt", date);
|
| | | }
|
| | |
|
| | | try {
|
| | | saveErrorLog(e, filePath);
|
| | | } catch (IOException e1) {
|
| | | }
|
| | | }
|
| | |
|
| | | public static void saveErrorLog(Throwable e, String filePath) throws IOException {
|
| | | // 创建文件夹
|
| | | if (!new File(new File(filePath).getParent()).exists())
|
| | | new File(new File(filePath).getParent()).mkdirs();
|
| | | OutputStream out = new FileOutputStream(new File(filePath), true);
|
| | | try {
|
| | | PrintStream ps = new PrintStream(out);
|
| | | ps.print(TimeUtil.getGernalTime(System.currentTimeMillis(), "yyyy-MM-dd HH:mm:ss"));
|
| | | ps.print("\n");
|
| | | e.printStackTrace(ps);
|
| | | ps.flush();
|
| | | ps.close();
|
| | | } finally {
|
| | | out.close();
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.base.log;
|
| | |
|
| | | import java.util.Iterator;
|
| | | import java.util.Map;
|
| | |
|
| | | import org.apache.log4j.Logger;
|
| | |
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | | /**
|
| | | * 淘宝客日志
|
| | | * |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | public class TaoKeLogHelper {
|
| | | // log
|
| | | private static Logger taoKeLogger = Logger.getLogger("taoKeLog");
|
| | |
|
| | | public static void error(Map<String, String> params, String msg) {
|
| | | String ps = "";
|
| | | if (params != null) {
|
| | | Iterator<String> its = params.keySet().iterator();
|
| | | JSONObject data = new JSONObject();
|
| | | while (its.hasNext()) {
|
| | | String key = its.next();
|
| | | data.put(key, params.get(key));
|
| | | }
|
| | | ps = data.toString();
|
| | | }
|
| | |
|
| | | String message = "参数:" + ps + "\n";
|
| | | message += "内容:" + msg;
|
| | |
|
| | | taoKeLogger.error(message);
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
| | | </properties> |
| | | <dependencies> |
| | | |
| | | <dependency> |
| | | <groupId>com.yeshi.fanli</groupId> |
| | | <artifactId>fanli-common</artifactId> |
| | |
| | | <version>0.0.1-SNAPSHOT</version> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>com.yeshi.fanli</groupId> |
| | | <artifactId>fanli-facade-system</artifactId> |
| | | <version>0.0.1-SNAPSHOT</version> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>com.yeshi.fanli</groupId> |
| | | <artifactId>fanli-facade-order</artifactId> |
| | | <version>0.0.1-SNAPSHOT</version> |
| | | </dependency> |
| | | |
| | | <!-- JAR包依赖 --> |
| | | |
| | | |
| | | <dependency> |
| | | <groupId>taobao</groupId> |
| | | <artifactId>taobao</artifactId> |
| | | <version>1.0.0</version> |
| | | <scope>system</scope> |
| | | <systemPath>${basedir}/lib/taobao-sdk-java-auto_1533536267316-20180829.jar</systemPath> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>alipay</groupId> |
| | | <artifactId>alipay</artifactId> |
| | | <version>1.0.0</version> |
| | | <scope>system</scope> |
| | | <systemPath>${basedir}/lib/alipay-sdk-java20170324180803.jar</systemPath> |
| | | </dependency> |
| | | |
| | | |
| | | <dependency> |
| | | <groupId>javapns-jdk16</groupId> |
| | | <artifactId>javapns-jdk16</artifactId> |
| | | <version>2.3.1</version> |
| | | <scope>system</scope> |
| | | <systemPath>${basedir}/lib/javapns-jdk16-2.3.1.jar</systemPath> |
| | | </dependency> |
| | | |
| | | |
| | | <dependency> |
| | | <groupId>MiPush_SDK_Server</groupId> |
| | | <artifactId>MiPush_SDK_Server</artifactId> |
| | | <version>2.2.18</version> |
| | | <scope>system</scope> |
| | | <systemPath>${basedir}/lib/MiPush_SDK_Server_2_2_18.jar</systemPath> |
| | | </dependency> |
| | | |
| | | |
| | | <dependency> |
| | | <groupId>open-api-sdk</groupId> |
| | | <artifactId>open-api-sdk</artifactId> |
| | | <version>2.0</version> |
| | | <scope>system</scope> |
| | | <systemPath>${basedir}/lib/open-api-sdk-2.0.jar</systemPath> |
| | | </dependency> |
| | | |
| | | |
| | | <dependency> |
| | | <groupId>PushJavaSDK</groupId> |
| | | <artifactId>PushJavaSDK</artifactId> |
| | | <version>1.0.0</version> |
| | | <scope>system</scope> |
| | | <systemPath>${basedir}/lib/PushJavaSDK.jar</systemPath> |
| | | </dependency> |
| | | |
| | | </dependencies> |
| | | <build> |
| | | <finalName>fanli-facade-goods</finalName> |
New file |
| | |
| | | package org.fanli.facade.goods.dto.activity;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import org.yeshi.utils.entity.FileUploadResult;
|
| | |
|
| | | /**
|
| | | * 活动分享结果
|
| | | * |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | public class ActivityShareResult {
|
| | | private String title;
|
| | | private List<FileUploadResult> imgList;
|
| | |
|
| | | public String getTitle() {
|
| | | return title;
|
| | | }
|
| | |
|
| | | public void setTitle(String title) {
|
| | | this.title = title;
|
| | | }
|
| | |
|
| | | public List<FileUploadResult> getImgList() {
|
| | | return imgList;
|
| | | }
|
| | |
|
| | | public void setImgList(List<FileUploadResult> imgList) {
|
| | | this.imgList = imgList;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.dto.clazz;
|
| | |
|
| | | import java.util.ArrayList;
|
| | | import java.util.List;
|
| | |
|
| | | import org.fanli.facade.goods.entity.clazz.GoodsClass;
|
| | |
|
| | | public class GoodsClassAdmin {
|
| | | private GoodsClass goodsClass;
|
| | | private final List<org.fanli.facade.system.entity.common.SystemManage> systemList=new ArrayList<org.fanli.facade.system.entity.common.SystemManage>();
|
| | |
|
| | | public GoodsClassAdmin() {
|
| | | }
|
| | | |
| | | public GoodsClassAdmin(GoodsClass goodsClass) {
|
| | | super();
|
| | | this.goodsClass = goodsClass;
|
| | | }
|
| | |
|
| | | public GoodsClass getGoodsClass() {
|
| | | return goodsClass;
|
| | | }
|
| | | public void setGoodsClass(GoodsClass goodsClass) {
|
| | | this.goodsClass = goodsClass;
|
| | | }
|
| | | public List<org.fanli.facade.system.entity.common.SystemManage> getSystemList() {
|
| | | return systemList;
|
| | | }
|
| | |
|
| | | } |
New file |
| | |
| | | package org.fanli.facade.goods.dto.recommend;
|
| | |
|
| | | import java.util.ArrayList;
|
| | | import java.util.List;
|
| | |
|
| | | import org.fanli.facade.goods.entity.recommend.RecommendBanner;
|
| | | import org.fanli.facade.system.entity.common.SystemManage;
|
| | |
|
| | | public class RecommendBannerAdmin {
|
| | |
|
| | | private RecommendBanner recommendBanner;
|
| | | private final List<SystemManage> systemList = new ArrayList<SystemManage>();
|
| | |
|
| | | public RecommendBannerAdmin() {
|
| | | }
|
| | |
|
| | | public RecommendBannerAdmin(RecommendBanner recommendBanner) {
|
| | | super();
|
| | | this.recommendBanner = recommendBanner;
|
| | | }
|
| | |
|
| | | public RecommendBanner getRecommendBanner() {
|
| | | return recommendBanner;
|
| | | }
|
| | |
|
| | | public void setRecommendBanner(RecommendBanner recommendBanner) {
|
| | | this.recommendBanner = recommendBanner;
|
| | | }
|
| | |
|
| | | public List<SystemManage> getSystemManageList() {
|
| | | return systemList;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.dto.recommend;
|
| | |
|
| | | import java.util.ArrayList;
|
| | | import java.util.List;
|
| | |
|
| | | import org.fanli.facade.goods.entity.recommend.RecommendBannerV2;
|
| | | import org.fanli.facade.system.entity.common.SystemManage;
|
| | |
|
| | | public class RecommendBannerV2Admin {
|
| | |
|
| | | private RecommendBannerV2 recommendBanner;
|
| | | private final List<SystemManage> systemList = new ArrayList<SystemManage>();
|
| | |
|
| | | public RecommendBannerV2Admin() {
|
| | | }
|
| | |
|
| | | public RecommendBannerV2Admin(RecommendBannerV2 recommendBanner) {
|
| | | super();
|
| | | this.recommendBanner = recommendBanner;
|
| | | }
|
| | |
|
| | | public RecommendBannerV2 getRecommendBanner() {
|
| | | return recommendBanner;
|
| | | }
|
| | |
|
| | | public void setRecommendBanner(RecommendBannerV2 recommendBanner) {
|
| | | this.recommendBanner = recommendBanner;
|
| | | }
|
| | |
|
| | | public List<SystemManage> getSystemList() {
|
| | | return systemList;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.dto.recommend;
|
| | |
|
| | | import java.util.ArrayList;
|
| | | import java.util.List;
|
| | |
|
| | | import org.fanli.facade.goods.entity.recommend.RecommendSection;
|
| | | import org.fanli.facade.system.entity.common.SystemManage;
|
| | |
|
| | | public class RecommendSectionAdmin {
|
| | | |
| | | private RecommendSection recommendSection;
|
| | | private final List<SystemManage> systemList=new ArrayList<SystemManage>();
|
| | | |
| | | public RecommendSectionAdmin() {
|
| | | // TODO Auto-generated constructor stub
|
| | | }
|
| | | |
| | | public RecommendSectionAdmin(RecommendSection recommendSection) {
|
| | | super();
|
| | | this.recommendSection = recommendSection;
|
| | | }
|
| | | |
| | | public RecommendSection getRecommendSection() {
|
| | | return recommendSection;
|
| | | }
|
| | | public void setRecommendSection(RecommendSection recommendSection) {
|
| | | this.recommendSection = recommendSection;
|
| | | }
|
| | | public List<SystemManage> getSystemList() {
|
| | | return systemList;
|
| | | }
|
| | | |
| | | @Override
|
| | | public int hashCode() {
|
| | | final int prime = 31;
|
| | | int result = 1;
|
| | | result = prime
|
| | | * result
|
| | | + ((recommendSection == null) ? 0 : recommendSection.hashCode());
|
| | | return result;
|
| | | }
|
| | | @Override
|
| | | public boolean equals(Object obj) {
|
| | | if (this == obj)
|
| | | return true;
|
| | | if (obj == null)
|
| | | return false;
|
| | | if (getClass() != obj.getClass())
|
| | | return false;
|
| | | RecommendSectionAdmin other = (RecommendSectionAdmin) obj;
|
| | | if (recommendSection == null) {
|
| | | if (other.recommendSection != null)
|
| | | return false;
|
| | | } else if (!recommendSection.equals(other.recommendSection))
|
| | | return false;
|
| | | return true;
|
| | | }
|
| | | |
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.dto.recommend;
|
| | |
|
| | | import java.util.ArrayList;
|
| | | import java.util.List;
|
| | |
|
| | | import org.fanli.facade.goods.entity.recommend.RecommendSpecial;
|
| | | import org.fanli.facade.system.entity.common.SystemManage;
|
| | |
|
| | | public class RecommendSpecialAdmin {
|
| | | |
| | | private RecommendSpecial recommendSpecial;
|
| | | private final List<SystemManage> systemList=new ArrayList<SystemManage>();
|
| | | |
| | | public RecommendSpecialAdmin() {
|
| | | }
|
| | |
|
| | | public RecommendSpecialAdmin(RecommendSpecial recommendSpecial) {
|
| | | super();
|
| | | this.recommendSpecial = recommendSpecial;
|
| | | }
|
| | |
|
| | | public RecommendSpecial getRecommendSpecial() {
|
| | | return recommendSpecial;
|
| | | }
|
| | |
|
| | | public void setRecommendSpecial(RecommendSpecial recommendSpecial) {
|
| | | this.recommendSpecial = recommendSpecial;
|
| | | }
|
| | |
|
| | | public List<SystemManage> getSystemManageList() {
|
| | | return systemList;
|
| | | }
|
| | | |
| | | |
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.dto.taobao;
|
| | |
|
| | | import java.math.BigDecimal;
|
| | |
|
| | | import com.google.gson.annotations.Expose;
|
| | | import com.yeshi.fanli.base.entity.goods.TaoBaoGoodsBrief;
|
| | |
|
| | | public class TaoBaoGoodsBriefExtra extends TaoBaoGoodsBrief {
|
| | |
|
| | | @Expose
|
| | | private boolean baoyou;
|
| | | @Expose
|
| | | private int shopType;// 0-无 1-淘宝 2-天猫
|
| | | @Expose
|
| | | private TaoBaoQuanInfo taoBaoQuanInfo;
|
| | | @Expose
|
| | | private TaoBaoHongBaoInfo taoBaoHongBaoInfo;
|
| | | @Expose
|
| | | private int showType;// 0-没有红包与券 1-只有券 2-只有红包 3-有券和红包
|
| | | @Expose
|
| | | private BigDecimal quanPrice; // 券后价
|
| | | @Expose
|
| | | private String tbToken;
|
| | | @Expose
|
| | | private int collected; // 0-没有收藏 1-已收藏
|
| | |
|
| | | public String getTbToken() {
|
| | | return tbToken;
|
| | | }
|
| | |
|
| | | public void setTbToken(String tbToken) {
|
| | | this.tbToken = tbToken;
|
| | | }
|
| | |
|
| | | public BigDecimal getQuanPrice() {
|
| | | return quanPrice;
|
| | | }
|
| | |
|
| | | public void setQuanPrice(BigDecimal quanPrice) {
|
| | | this.quanPrice = quanPrice;
|
| | | }
|
| | |
|
| | | public int getShowType() {
|
| | | return showType;
|
| | | }
|
| | |
|
| | | public void setShowType(int showType) {
|
| | | this.showType = showType;
|
| | | }
|
| | |
|
| | | public boolean isBaoyou() {
|
| | | return baoyou;
|
| | | }
|
| | |
|
| | | public void setBaoyou(boolean baoyou) {
|
| | | this.baoyou = baoyou;
|
| | | }
|
| | |
|
| | | public int getShopType() {
|
| | | return shopType;
|
| | | }
|
| | |
|
| | | public void setShopType(int shopType) {
|
| | | this.shopType = shopType;
|
| | | }
|
| | |
|
| | | public TaoBaoQuanInfo getTaoBaoQuanInfo() {
|
| | | return taoBaoQuanInfo;
|
| | | }
|
| | |
|
| | | public void setTaoBaoQuanInfo(TaoBaoQuanInfo taoBaoQuanInfo) {
|
| | | this.taoBaoQuanInfo = taoBaoQuanInfo;
|
| | | }
|
| | |
|
| | | public TaoBaoHongBaoInfo getTaoBaoHongBaoInfo() {
|
| | | return taoBaoHongBaoInfo;
|
| | | }
|
| | |
|
| | | public void setTaoBaoHongBaoInfo(TaoBaoHongBaoInfo taoBaoHongBaoInfo) {
|
| | | this.taoBaoHongBaoInfo = taoBaoHongBaoInfo;
|
| | | }
|
| | |
|
| | | public int getCollected() {
|
| | | return collected;
|
| | | }
|
| | |
|
| | | public void setCollected(int collected) {
|
| | | this.collected = collected;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.dto.taobao;
|
| | |
|
| | | public class TaoBaoHead {
|
| | | |
| | | private int docsfound;
|
| | |
|
| | | public int getDocsfound() {
|
| | | return docsfound;
|
| | | }
|
| | |
|
| | | public void setDocsfound(int docsfound) {
|
| | | this.docsfound = docsfound;
|
| | | }
|
| | | |
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.dto.taobao;
|
| | |
|
| | | import java.math.BigDecimal;
|
| | |
|
| | | import com.google.gson.annotations.Expose;
|
| | |
|
| | | //密朵红包信息
|
| | | public class TaoBaoHongBaoInfo {
|
| | | @Expose
|
| | | private BigDecimal hongbao;
|
| | |
|
| | | @Expose
|
| | | private String rate;
|
| | | |
| | | /**
|
| | | * 0:红包 1:比率
|
| | | */
|
| | | @Expose
|
| | | private int type;
|
| | | |
| | | public BigDecimal getHongbao() {
|
| | | return hongbao;
|
| | | }
|
| | |
|
| | | public void setHongbao(BigDecimal hongbao) {
|
| | | this.hongbao = hongbao;
|
| | | }
|
| | |
|
| | | public String getRate() {
|
| | | return rate;
|
| | | }
|
| | |
|
| | | public void setRate(String rate) {
|
| | | this.rate = rate;
|
| | | }
|
| | |
|
| | | public int getType() {
|
| | | return type;
|
| | | }
|
| | |
|
| | | public void setType(int type) {
|
| | | this.type = type;
|
| | | }
|
| | | |
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.dto.taobao;
|
| | |
|
| | | public class TaoBaoProvince {
|
| | | private String name;
|
| | | private String id;
|
| | | public String getName() {
|
| | | return name;
|
| | | }
|
| | | public void setName(String name) {
|
| | | this.name = name;
|
| | | }
|
| | | public String getId() {
|
| | | return id;
|
| | | }
|
| | | public void setId(String id) {
|
| | | this.id = id;
|
| | | }
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.dto.taobao;
|
| | |
|
| | | import java.math.BigDecimal;
|
| | |
|
| | | import com.google.gson.annotations.Expose;
|
| | |
|
| | | //淘宝优惠券信息
|
| | | public class TaoBaoQuanInfo {
|
| | | @Expose
|
| | | private int couponTotalCount;// 优惠券总数
|
| | | @Expose
|
| | | private int couponLeftCount;// 优惠券剩余数量
|
| | | @Expose
|
| | | private BigDecimal couponAmount;// 优惠金额
|
| | | @Expose
|
| | | private String couponInfo;// 优惠券信息
|
| | | @Expose
|
| | | private BigDecimal couponStartFee;// 优惠券起始优惠
|
| | | @Expose
|
| | | private String couponEffectiveStartTime;
|
| | | @Expose
|
| | | private String couponEffectiveEndTime;
|
| | | @Expose
|
| | | private BigDecimal couponPrice;// 券后价
|
| | | @Expose
|
| | | private String couponLink;// 券的链接
|
| | |
|
| | | public String getCouponLink() {
|
| | | return couponLink;
|
| | | }
|
| | |
|
| | | public void setCouponLink(String couponLink) {
|
| | | this.couponLink = couponLink;
|
| | | }
|
| | |
|
| | | public int getCouponTotalCount() {
|
| | | return couponTotalCount;
|
| | | }
|
| | |
|
| | | public void setCouponTotalCount(int couponTotalCount) {
|
| | | this.couponTotalCount = couponTotalCount;
|
| | | }
|
| | |
|
| | | public int getCouponLeftCount() {
|
| | | return couponLeftCount;
|
| | | }
|
| | |
|
| | | public void setCouponLeftCount(int couponLeftCount) {
|
| | | this.couponLeftCount = couponLeftCount;
|
| | | }
|
| | |
|
| | |
|
| | | public String getCouponInfo() {
|
| | | return couponInfo;
|
| | | }
|
| | |
|
| | | public void setCouponInfo(String couponInfo) {
|
| | | this.couponInfo = couponInfo;
|
| | | }
|
| | |
|
| | |
|
| | | public String getCouponEffectiveStartTime() {
|
| | | return couponEffectiveStartTime;
|
| | | }
|
| | |
|
| | | public void setCouponEffectiveStartTime(String couponEffectiveStartTime) {
|
| | | this.couponEffectiveStartTime = couponEffectiveStartTime;
|
| | | }
|
| | |
|
| | | public String getCouponEffectiveEndTime() {
|
| | | return couponEffectiveEndTime;
|
| | | }
|
| | |
|
| | | public void setCouponEffectiveEndTime(String couponEffectiveEndTime) {
|
| | | this.couponEffectiveEndTime = couponEffectiveEndTime;
|
| | | }
|
| | |
|
| | | public BigDecimal getCouponAmount() {
|
| | | return couponAmount;
|
| | | }
|
| | |
|
| | | public void setCouponAmount(BigDecimal couponAmount) {
|
| | | this.couponAmount = couponAmount;
|
| | | }
|
| | |
|
| | | public BigDecimal getCouponStartFee() {
|
| | | return couponStartFee;
|
| | | }
|
| | |
|
| | | public void setCouponStartFee(BigDecimal couponStartFee) {
|
| | | this.couponStartFee = couponStartFee;
|
| | | }
|
| | |
|
| | | public BigDecimal getCouponPrice() {
|
| | | return couponPrice;
|
| | | }
|
| | |
|
| | | public void setCouponPrice(BigDecimal couponPrice) {
|
| | | this.couponPrice = couponPrice;
|
| | | }
|
| | | |
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.dto.taobao;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import com.google.gson.annotations.Expose;
|
| | |
|
| | | /**
|
| | | * 淘宝搜索分类实体
|
| | | * |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | public class TaoBaoSearchNav {
|
| | | private int count;
|
| | | private String flag;
|
| | | @Expose
|
| | | private long id;
|
| | | private int level;
|
| | | @Expose
|
| | | private String name;
|
| | | @Expose
|
| | | private String type;
|
| | | @Expose
|
| | | private List<TaoBaoSearchNav> subIds;
|
| | | @Expose
|
| | | private int selector; //0单选 1多选
|
| | | |
| | | public TaoBaoSearchNav(int count, String flag, long id, int level, String name, String type) {
|
| | | this.count = count;
|
| | | this.flag = flag;
|
| | | this.id = id;
|
| | | this.level = level;
|
| | | this.name = name;
|
| | | this.type = type;
|
| | | }
|
| | |
|
| | | public TaoBaoSearchNav() {
|
| | |
|
| | | }
|
| | | |
| | | public int getSelector() {
|
| | | return selector;
|
| | | }
|
| | |
|
| | | public void setSelector(int selector) {
|
| | | this.selector = selector;
|
| | | }
|
| | |
|
| | | public int getCount() {
|
| | | return count;
|
| | | }
|
| | |
|
| | | public void setCount(int count) {
|
| | | this.count = count;
|
| | | }
|
| | |
|
| | | public String getFlag() {
|
| | | return flag;
|
| | | }
|
| | |
|
| | | public void setFlag(String flag) {
|
| | | this.flag = flag;
|
| | | }
|
| | |
|
| | | public long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public int getLevel() {
|
| | | return level;
|
| | | }
|
| | |
|
| | | public void setLevel(int level) {
|
| | | this.level = level;
|
| | | }
|
| | |
|
| | | public String getName() {
|
| | | return name;
|
| | | }
|
| | |
|
| | | public void setName(String name) {
|
| | | this.name = name;
|
| | | }
|
| | |
|
| | | public String getType() {
|
| | | return type;
|
| | | }
|
| | |
|
| | | public void setType(String type) {
|
| | | this.type = type;
|
| | | }
|
| | |
|
| | | public List<TaoBaoSearchNav> getSubIds() {
|
| | | return subIds;
|
| | | }
|
| | |
|
| | | public void setSubIds(List<TaoBaoSearchNav> subIds) {
|
| | | this.subIds = subIds;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.dto.taobao;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.base.dto.PageEntity;
|
| | | import com.yeshi.fanli.base.entity.goods.TaoBaoGoodsBrief;
|
| | |
|
| | | public class TaoBaoSearchResult {
|
| | | private String key;
|
| | | private List<TaoBaoGoodsBrief> taoBaoGoodsBriefs;
|
| | | private List<TaoBaoSearchNav> navList;
|
| | | private TaoBaoHead taoBaoHead;
|
| | | private PageEntity pageEntity;
|
| | | |
| | | public PageEntity getPageEntity() {
|
| | | return pageEntity;
|
| | | }
|
| | |
|
| | | public void setPageEntity(PageEntity pageEntity) {
|
| | | this.pageEntity = pageEntity;
|
| | | }
|
| | |
|
| | | public String getKey() {
|
| | | return key;
|
| | | }
|
| | |
|
| | | public void setKey(String key) {
|
| | | this.key = key;
|
| | | }
|
| | |
|
| | | public List<TaoBaoGoodsBrief> getTaoBaoGoodsBriefs() {
|
| | | return taoBaoGoodsBriefs;
|
| | | }
|
| | |
|
| | | public void setTaoBaoGoodsBriefs(List<TaoBaoGoodsBrief> taoBaoGoodsBriefs) {
|
| | | this.taoBaoGoodsBriefs = taoBaoGoodsBriefs;
|
| | | }
|
| | |
|
| | | public List<TaoBaoSearchNav> getNavList() {
|
| | | return navList;
|
| | | }
|
| | |
|
| | | public void setNavList(List<TaoBaoSearchNav> navList) {
|
| | | this.navList = navList;
|
| | | }
|
| | |
|
| | | public TaoBaoHead getTaoBaoHead() {
|
| | | return taoBaoHead;
|
| | | }
|
| | |
|
| | | public void setTaoBaoHead(TaoBaoHead taoBaoHead) {
|
| | | this.taoBaoHead = taoBaoHead;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.dto.taoke;
|
| | |
|
| | | /**
|
| | | * 客户端淘宝推广位信息
|
| | | * |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | public class ClientTBPid {
|
| | | private String appKey;
|
| | | private String pid;
|
| | | private String siteId;
|
| | | private String adZoneId;
|
| | |
|
| | | public ClientTBPid(String appKey, String pid, String siteId, String adZoneId) {
|
| | | this.appKey = appKey;
|
| | | this.pid = pid;
|
| | | this.siteId = siteId;
|
| | | this.adZoneId = adZoneId;
|
| | | }
|
| | |
|
| | | public String getAppKey() {
|
| | | return appKey;
|
| | | }
|
| | |
|
| | | public void setAppKey(String appKey) {
|
| | | this.appKey = appKey;
|
| | | }
|
| | |
|
| | | public String getPid() {
|
| | | return pid;
|
| | | }
|
| | |
|
| | | public void setPid(String pid) {
|
| | | this.pid = pid;
|
| | | }
|
| | |
|
| | | public String getSiteId() {
|
| | | return siteId;
|
| | | }
|
| | |
|
| | | public void setSiteId(String siteId) {
|
| | | this.siteId = siteId;
|
| | | }
|
| | |
|
| | | public String getAdZoneId() {
|
| | | return adZoneId;
|
| | | }
|
| | |
|
| | | public void setAdZoneId(String adZoneId) {
|
| | | this.adZoneId = adZoneId;
|
| | | }
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.dto.taoke;
|
| | |
|
| | | public class RelateGoods {
|
| | | private String id;
|
| | | private String title;
|
| | | private String picUrl;
|
| | | private String zkPrice;
|
| | | private String url;
|
| | | public String getId() {
|
| | | return id;
|
| | | }
|
| | | public void setId(String id) {
|
| | | this.id = id;
|
| | | }
|
| | | public String getUrl() {
|
| | | return url;
|
| | | }
|
| | | public void setUrl(String url) {
|
| | | this.url = url;
|
| | | }
|
| | | public String getTitle() {
|
| | | return title;
|
| | | }
|
| | | public void setTitle(String title) {
|
| | | this.title = title;
|
| | | }
|
| | | public String getPicUrl() {
|
| | | return picUrl;
|
| | | }
|
| | | public void setPicUrl(String picUrl) {
|
| | | this.picUrl = picUrl;
|
| | | }
|
| | | public String getZkPrice() {
|
| | | return zkPrice;
|
| | | }
|
| | | public void setZkPrice(String zkPrice) {
|
| | | this.zkPrice = zkPrice;
|
| | | }
|
| | | |
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.dto.taoke;
|
| | |
|
| | | /**
|
| | | * 淘客的app信息
|
| | | * |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | public class TaoKeAppInfo {
|
| | | private String appKey;
|
| | | private String appSecret;
|
| | | private String pid;
|
| | | private String adzoneId;
|
| | |
|
| | | public String getAdzoneId() {
|
| | | return adzoneId;
|
| | | }
|
| | |
|
| | | public void setAdzoneId(String adzoneId) {
|
| | | this.adzoneId = adzoneId;
|
| | | }
|
| | |
|
| | | public String getAppKey() {
|
| | | return appKey;
|
| | | }
|
| | |
|
| | | public void setAppKey(String appKey) {
|
| | | this.appKey = appKey;
|
| | | }
|
| | |
|
| | | public String getAppSecret() {
|
| | | return appSecret;
|
| | | }
|
| | |
|
| | | public void setAppSecret(String appSecret) {
|
| | | this.appSecret = appSecret;
|
| | | }
|
| | |
|
| | | public String getPid() {
|
| | | return pid;
|
| | | }
|
| | |
|
| | | public void setPid(String pid) {
|
| | | this.pid = pid;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.dto.usergoods;
|
| | | public class Address {
|
| | | |
| | | private String ip;
|
| | | private int port;
|
| | | |
| | | public Address() {
|
| | | }
|
| | | |
| | | public Address(String ip, int port) {
|
| | | this.ip = ip;
|
| | | this.port = port;
|
| | | }
|
| | | public String getIp() {
|
| | | return ip;
|
| | | }
|
| | | public void setIp(String ip) {
|
| | | this.ip = ip;
|
| | | }
|
| | | public int getPort() {
|
| | | return port;
|
| | | }
|
| | | public void setPort(int port) {
|
| | | this.port = port;
|
| | | }
|
| | | |
| | | } |
New file |
| | |
| | | package org.fanli.facade.goods.dto.usergoods;
|
| | |
|
| | | import java.util.ArrayList;
|
| | | import java.util.List;
|
| | |
|
| | | import org.fanli.facade.goods.entity.search.HotSearch;
|
| | | import org.fanli.facade.system.entity.common.SystemManage;
|
| | |
|
| | | public class HotSearchAdmin {
|
| | | private HotSearch hotSearch;
|
| | | private final List<SystemManage> systemList=new ArrayList<SystemManage>();
|
| | | |
| | | public HotSearchAdmin() {
|
| | | }
|
| | | |
| | | public HotSearchAdmin(HotSearch hotSearch) {
|
| | | super();
|
| | | this.hotSearch = hotSearch;
|
| | | }
|
| | |
|
| | | public HotSearch getHotSearch() {
|
| | | return hotSearch;
|
| | | }
|
| | |
|
| | | public void setHotSearch(HotSearch hotSearch) {
|
| | | this.hotSearch = hotSearch;
|
| | | }
|
| | |
|
| | | public List<SystemManage> getSystemList() {
|
| | | return systemList;
|
| | | }
|
| | | |
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.dto.usergoods;
|
| | |
|
| | | import java.util.Date;
|
| | |
|
| | |
|
| | | public class ShareTaoPassword {
|
| | | |
| | | private Long id;
|
| | | |
| | | /**
|
| | | * 商品id
|
| | | */
|
| | | private Long auctionId;
|
| | | |
| | | /**
|
| | | * pid
|
| | | */
|
| | | private String pid;
|
| | | |
| | | /**
|
| | | * 淘宝token
|
| | | */
|
| | | private String taoToken;
|
| | | |
| | | /**
|
| | | * 淘宝券链�?
|
| | | */
|
| | | private String couponLink;
|
| | | |
| | | /**
|
| | | * 淘宝推广链接
|
| | | */
|
| | | private String clickUrl;
|
| | | |
| | | /**
|
| | | * 创建时间
|
| | | */
|
| | | private Date createTime;
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public Long getAuctionId() {
|
| | | return auctionId;
|
| | | }
|
| | |
|
| | | public void setAuctionId(Long auctionId) {
|
| | | this.auctionId = auctionId;
|
| | | }
|
| | |
|
| | | public String getPid() {
|
| | | return pid;
|
| | | }
|
| | |
|
| | | public void setPid(String pid) {
|
| | | this.pid = pid;
|
| | | }
|
| | |
|
| | | public String getTaoToken() {
|
| | | return taoToken;
|
| | | }
|
| | |
|
| | | public void setTaoToken(String taoToken) {
|
| | | this.taoToken = taoToken;
|
| | | }
|
| | |
|
| | | public String getCouponLink() {
|
| | | return couponLink;
|
| | | }
|
| | |
|
| | | public void setCouponLink(String couponLink) {
|
| | | this.couponLink = couponLink;
|
| | | }
|
| | |
|
| | | public String getClickUrl() {
|
| | | return clickUrl;
|
| | | }
|
| | |
|
| | | public void setClickUrl(String clickUrl) {
|
| | | this.clickUrl = clickUrl;
|
| | | }
|
| | |
|
| | | public Date getCreateTime() {
|
| | | return createTime;
|
| | | }
|
| | |
|
| | | public void setCreateTime(Date createTime) {
|
| | | this.createTime = createTime;
|
| | | }
|
| | | |
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.activity;
|
| | |
|
| | | import java.util.Date;
|
| | |
|
| | | import com.google.gson.annotations.Expose;
|
| | | import org.yeshi.utils.mybatis.Column;
|
| | | import org.yeshi.utils.mybatis.Table;
|
| | |
|
| | | /**
|
| | | * 活动用户
|
| | | * |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | @Table("yeshi_ec_activity_user")
|
| | | public class ActivityUser {
|
| | |
|
| | | public ActivityUser() {
|
| | | }
|
| | |
|
| | | public ActivityUser(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | @Column(name = "au_id")
|
| | | private Long id;
|
| | | @Expose
|
| | | @Column(name = "au_nick_name")
|
| | | private String nickName;
|
| | | @Expose
|
| | | @Column(name = "au_portrait")
|
| | | private String portrait;
|
| | | @Column(name = "au_create_time")
|
| | | private Date createTime;
|
| | |
|
| | | public String getNickName() {
|
| | | return nickName;
|
| | | }
|
| | |
|
| | | public void setNickName(String nickName) {
|
| | | this.nickName = nickName;
|
| | | }
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public String getPortrait() {
|
| | | return portrait;
|
| | | }
|
| | |
|
| | | public void setPortrait(String portrait) {
|
| | | this.portrait = portrait;
|
| | | }
|
| | |
|
| | | public Date getCreateTime() {
|
| | | return createTime;
|
| | | }
|
| | |
|
| | | public void setCreateTime(Date createTime) {
|
| | | this.createTime = createTime;
|
| | | }
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.activity;
|
| | |
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | |
|
| | | import org.yeshi.utils.mybatis.Column;
|
| | | import org.yeshi.utils.mybatis.Table;
|
| | |
|
| | | import com.google.gson.annotations.Expose;
|
| | | import com.google.gson.annotations.SerializedName;
|
| | |
|
| | | /**
|
| | | * 推荐活动
|
| | | * |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | @Table("yeshi_ec_activity_recommend")
|
| | | public class RecommendActivity {
|
| | | public final static int TYPE_SHARE_GOODS = 1;// 商品分享
|
| | | public final static int TYPE_INVITE = 2;// 生成邀请图
|
| | | public final static int TYPE_TEXTIMG = 3;// 简单图文
|
| | | public final static int TYPE_VIDEO = 4;// 视频
|
| | | @Expose
|
| | | @Column(name = "ar_id")
|
| | | private Long id;
|
| | | @Expose
|
| | | @Column(name = "ar_title")
|
| | | private String title;// 标题
|
| | | @Expose
|
| | | @Column(name = "ar_type")
|
| | | private Integer type;// 类型
|
| | | @Column(name = "ar_order_by")
|
| | | private Integer orderBy;// 排序值 从小到大排序
|
| | | @Expose
|
| | | @Column(name = "ar_activity_uid")
|
| | | private ActivityUser activityUser;// 发布动态的用户
|
| | |
|
| | | @Expose
|
| | | private List<RecommendActivityTaoBaoGoods> goodsList;// 商品列表-商品分享有此属性
|
| | |
|
| | | @Expose
|
| | | private List<String> imageList;// 图片列表
|
| | |
|
| | | @Expose
|
| | | private List<String> widthAndHeight;
|
| | |
|
| | | @Column(name = "ar_share_count")
|
| | | private Integer shareCount;// 分享数
|
| | |
|
| | | // 总共分享赚的资金-商品分享有此属性
|
| | | @Expose
|
| | | @Column(name = "ar_total_getmoney")
|
| | | private String totalGetMoney;
|
| | |
|
| | | @Expose
|
| | | @Column(name = "ar_video_post_picture")
|
| | | private String videoPostPictire;// 视频封面图片
|
| | |
|
| | | @Expose
|
| | | @Column(name = "ar_video_url")
|
| | | private String videoUrl;// 视频链接
|
| | |
|
| | | @Expose
|
| | | @Column(name = "ar_create_time")
|
| | | private Date createTime;// 创建时间
|
| | |
|
| | | @Expose
|
| | | @Column(name = "ar_top")
|
| | | private Boolean top;// 是否置顶
|
| | |
|
| | | @Expose
|
| | | @SerializedName("shareCount")
|
| | | private String shareCountShow;
|
| | | |
| | | |
| | | private RecommendActivityInviteInfo inviteInfo;
|
| | |
|
| | | public RecommendActivityInviteInfo getInviteInfo() {
|
| | | return inviteInfo;
|
| | | }
|
| | |
|
| | | public void setInviteInfo(RecommendActivityInviteInfo inviteInfo) {
|
| | | this.inviteInfo = inviteInfo;
|
| | | }
|
| | |
|
| | | public String getShareCountShow() {
|
| | | return shareCountShow;
|
| | | }
|
| | |
|
| | | public void setShareCountShow(String shareCountShow) {
|
| | | this.shareCountShow = shareCountShow;
|
| | | }
|
| | |
|
| | | public Boolean getTop() {
|
| | | return top;
|
| | | }
|
| | |
|
| | | public void setTop(Boolean top) {
|
| | | this.top = top;
|
| | | }
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public String getTitle() {
|
| | | return title;
|
| | | }
|
| | |
|
| | | public void setTitle(String title) {
|
| | | this.title = title;
|
| | | }
|
| | |
|
| | | public Integer getType() {
|
| | | return type;
|
| | | }
|
| | |
|
| | | public void setType(Integer type) {
|
| | | this.type = type;
|
| | | }
|
| | |
|
| | | public Integer getOrderBy() {
|
| | | return orderBy;
|
| | | }
|
| | |
|
| | | public void setOrderBy(Integer orderBy) {
|
| | | this.orderBy = orderBy;
|
| | | }
|
| | |
|
| | | public ActivityUser getActivityUser() {
|
| | | return activityUser;
|
| | | }
|
| | |
|
| | | public void setActivityUser(ActivityUser activityUser) {
|
| | | this.activityUser = activityUser;
|
| | | }
|
| | |
|
| | | public List<RecommendActivityTaoBaoGoods> getGoodsList() {
|
| | | return goodsList;
|
| | | }
|
| | |
|
| | | public void setGoodsList(List<RecommendActivityTaoBaoGoods> goodsList) {
|
| | | this.goodsList = goodsList;
|
| | | }
|
| | |
|
| | | public List<String> getImageList() {
|
| | | return imageList;
|
| | | }
|
| | |
|
| | | public void setImageList(List<String> imageList) {
|
| | | this.imageList = imageList;
|
| | | }
|
| | |
|
| | | public Integer getShareCount() {
|
| | | return shareCount;
|
| | | }
|
| | |
|
| | | public void setShareCount(Integer shareCount) {
|
| | | this.shareCount = shareCount;
|
| | | }
|
| | |
|
| | | public String getTotalGetMoney() {
|
| | | return totalGetMoney;
|
| | | }
|
| | |
|
| | | public void setTotalGetMoney(String totalGetMoney) {
|
| | | this.totalGetMoney = totalGetMoney;
|
| | | }
|
| | |
|
| | | public String getVideoPostPictire() {
|
| | | return videoPostPictire;
|
| | | }
|
| | |
|
| | | public void setVideoPostPictire(String videoPostPictire) {
|
| | | this.videoPostPictire = videoPostPictire;
|
| | | }
|
| | |
|
| | | public String getVideoUrl() {
|
| | | return videoUrl;
|
| | | }
|
| | |
|
| | | public void setVideoUrl(String videoUrl) {
|
| | | this.videoUrl = videoUrl;
|
| | | }
|
| | |
|
| | | public Date getCreateTime() {
|
| | | return createTime;
|
| | | }
|
| | |
|
| | | public void setCreateTime(Date createTime) {
|
| | | this.createTime = createTime;
|
| | | }
|
| | |
|
| | | public List<String> getWidthAndHeight() {
|
| | | return widthAndHeight;
|
| | | }
|
| | |
|
| | | public void setWidthAndHeight(List<String> widthAndHeight) {
|
| | | this.widthAndHeight = widthAndHeight;
|
| | | }
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.activity;
|
| | |
|
| | | import org.yeshi.utils.mybatis.Column;
|
| | | import org.yeshi.utils.mybatis.Table;
|
| | |
|
| | | /**
|
| | | * 动态图片
|
| | | * |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | @Table("yeshi_ec_activity_img")
|
| | | public class RecommendActivityImg {
|
| | | @Column(name = "ai_id")
|
| | | private Long id;
|
| | | @Column(name = "ai_activity_id")
|
| | | private RecommendActivity recommendActivity;
|
| | | @Column(name = "ai_img")
|
| | | private String img;
|
| | | @Column(name = "ai_orderby")
|
| | | private Integer orderBy;
|
| | |
|
| | | @Column(name = "ai_img_height")
|
| | | private Integer imgHeight;
|
| | | @Column(name = "ai_img_width")
|
| | | private Integer imgWidth;
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public RecommendActivity getRecommendActivity() {
|
| | | return recommendActivity;
|
| | | }
|
| | |
|
| | | public void setRecommendActivity(RecommendActivity recommendActivity) {
|
| | | this.recommendActivity = recommendActivity;
|
| | | }
|
| | |
|
| | | public String getImg() {
|
| | | return img;
|
| | | }
|
| | |
|
| | | public void setImg(String img) {
|
| | | this.img = img;
|
| | | }
|
| | |
|
| | | public Integer getOrderBy() {
|
| | | return orderBy;
|
| | | }
|
| | |
|
| | | public void setOrderBy(Integer orderBy) {
|
| | | this.orderBy = orderBy;
|
| | | }
|
| | |
|
| | | public Integer getImgHeight() {
|
| | | return imgHeight;
|
| | | }
|
| | |
|
| | | public void setImgHeight(Integer imgHeight) {
|
| | | this.imgHeight = imgHeight;
|
| | | }
|
| | |
|
| | | public Integer getImgWidth() {
|
| | | return imgWidth;
|
| | | }
|
| | |
|
| | | public void setImgWidth(Integer imgWidth) {
|
| | | this.imgWidth = imgWidth;
|
| | | }
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.activity;
|
| | |
|
| | | import org.yeshi.utils.mybatis.Column;
|
| | | import org.yeshi.utils.mybatis.Table;
|
| | |
|
| | | /**
|
| | | * 动态图片
|
| | | * |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | @Table("yeshi_ec_activity_invite_info")
|
| | | public class RecommendActivityInviteInfo {
|
| | | @Column(name = "aii_id")
|
| | | private Long id;
|
| | | @Column(name = "aii_px")
|
| | | private Integer px;
|
| | | @Column(name = "aii_py")
|
| | | private Integer py;
|
| | | @Column(name = "aii_size")
|
| | | private Integer size;
|
| | | @Column(name = "aii_activity_id")
|
| | | private RecommendActivity recommendActivity;
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public Integer getPx() {
|
| | | return px;
|
| | | }
|
| | |
|
| | | public void setPx(Integer px) {
|
| | | this.px = px;
|
| | | }
|
| | |
|
| | | public Integer getPy() {
|
| | | return py;
|
| | | }
|
| | |
|
| | | public void setPy(Integer py) {
|
| | | this.py = py;
|
| | | }
|
| | |
|
| | | public Integer getSize() {
|
| | | return size;
|
| | | }
|
| | |
|
| | | public void setSize(Integer size) {
|
| | | this.size = size;
|
| | | }
|
| | |
|
| | | public RecommendActivity getRecommendActivity() {
|
| | | return recommendActivity;
|
| | | }
|
| | |
|
| | | public void setRecommendActivity(RecommendActivity recommendActivity) {
|
| | | this.recommendActivity = recommendActivity;
|
| | | }
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.activity;
|
| | |
|
| | | import java.math.BigDecimal;
|
| | | import java.util.Date;
|
| | |
|
| | | import org.yeshi.utils.mybatis.Column;
|
| | | import org.yeshi.utils.mybatis.Table;
|
| | |
|
| | | import com.google.gson.annotations.Expose;
|
| | | import com.yeshi.fanli.base.entity.goods.TaoBaoGoodsBrief;
|
| | |
|
| | | /**
|
| | | * 动态淘宝商品
|
| | | * |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | @Table("yeshi_ec_activity_goods_taobao")
|
| | | public class RecommendActivityTaoBaoGoods {
|
| | | public final static int STATE_NORMAL = 0;// 正常状态
|
| | | public final static int STATE_UNSHELVE = 1;// 下架
|
| | |
|
| | | @Column(name = "agt_id")
|
| | | private Long id;
|
| | | @Column(name = "agt_activity_id")
|
| | | private RecommendActivity recommendActivity;
|
| | | @Column(name = "agt_goods_id")
|
| | | private TaoBaoGoodsBrief taoBaoGoodsBrief;
|
| | | @Column(name = "agt_orderby")
|
| | | private Integer orderBy;
|
| | | @Expose
|
| | | @Column(name = "agt_picture")
|
| | | private String pictUrl;
|
| | |
|
| | | @Expose
|
| | | @Column(name = "agt_desc")
|
| | | private String desc;// 简介,券后价
|
| | | |
| | | @Expose
|
| | | private String quanPrice;
|
| | | |
| | | |
| | |
|
| | | @Expose
|
| | | @Column(name = "agt_auctionid")
|
| | | private String auctionId;// 商品ID
|
| | | @Column(name = "agt_createtime")
|
| | | private Date createTime;
|
| | | @Expose
|
| | | @Column(name = "agt_state")
|
| | | private Integer state;// 0-正常状态 1-下架
|
| | |
|
| | | @Column(name = "agt_title")
|
| | | private String title;//商品标题
|
| | | |
| | | @Column(name="agt_coupon_amount")
|
| | | private BigDecimal couponAmount;
|
| | | |
| | | |
| | | public BigDecimal getCouponAmount() {
|
| | | return couponAmount;
|
| | | }
|
| | |
|
| | | public void setCouponAmount(BigDecimal couponAmount) {
|
| | | this.couponAmount = couponAmount;
|
| | | }
|
| | |
|
| | | public String getQuanPrice() {
|
| | | return quanPrice;
|
| | | }
|
| | |
|
| | | public void setQuanPrice(String quanPrice) {
|
| | | this.quanPrice = quanPrice;
|
| | | }
|
| | | |
| | | |
| | | public Integer getState() {
|
| | | return state;
|
| | | }
|
| | |
|
| | | public void setState(Integer state) {
|
| | | this.state = state;
|
| | | }
|
| | |
|
| | |
|
| | | public String getTitle() {
|
| | | return title;
|
| | | }
|
| | |
|
| | | public void setTitle(String title) {
|
| | | this.title = title;
|
| | | }
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public RecommendActivity getRecommendActivity() {
|
| | | return recommendActivity;
|
| | | }
|
| | |
|
| | | public void setRecommendActivity(RecommendActivity recommendActivity) {
|
| | | this.recommendActivity = recommendActivity;
|
| | | }
|
| | |
|
| | | public TaoBaoGoodsBrief getTaoBaoGoodsBrief() {
|
| | | return taoBaoGoodsBrief;
|
| | | }
|
| | |
|
| | | public void setTaoBaoGoodsBrief(TaoBaoGoodsBrief taoBaoGoodsBrief) {
|
| | | this.taoBaoGoodsBrief = taoBaoGoodsBrief;
|
| | | }
|
| | |
|
| | | public Integer getOrderBy() {
|
| | | return orderBy;
|
| | | }
|
| | |
|
| | | public void setOrderBy(Integer orderBy) {
|
| | | this.orderBy = orderBy;
|
| | | }
|
| | |
|
| | | public String getDesc() {
|
| | | return desc;
|
| | | }
|
| | |
|
| | | public void setDesc(String desc) {
|
| | | this.desc = desc;
|
| | | }
|
| | |
|
| | | public String getAuctionId() {
|
| | | return auctionId;
|
| | | }
|
| | |
|
| | | public void setAuctionId(String auctionId) {
|
| | | this.auctionId = auctionId;
|
| | | }
|
| | |
|
| | | public Date getCreateTime() {
|
| | | return createTime;
|
| | | }
|
| | |
|
| | | public void setCreateTime(Date createTime) {
|
| | | this.createTime = createTime;
|
| | | }
|
| | |
|
| | | public String getPictUrl() {
|
| | | return pictUrl;
|
| | | }
|
| | |
|
| | | public void setPictUrl(String pictUrl) {
|
| | | this.pictUrl = pictUrl;
|
| | | }
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.clazz;
|
| | | import java.io.Serializable;
|
| | | import java.util.List;
|
| | |
|
| | | import javax.persistence.Column;
|
| | | import javax.persistence.Entity;
|
| | | import javax.persistence.GeneratedValue;
|
| | | import javax.persistence.GenerationType;
|
| | | import javax.persistence.Id;
|
| | | import javax.persistence.Table;
|
| | | import javax.persistence.Transient;
|
| | |
|
| | | /**
|
| | | * 商品分类
|
| | | * |
| | | * @author Administrator
|
| | | *
|
| | | *
|
| | | */
|
| | | @Entity
|
| | | @Table(name = "yeshi_ec_class")
|
| | | public class GoodsClass implements Serializable{
|
| | | /**
|
| | | * |
| | | */
|
| | | private static final long serialVersionUID = 1L;
|
| | |
|
| | | @Id
|
| | | @GeneratedValue(strategy = GenerationType.AUTO)
|
| | | @Column(name = "id")
|
| | | private long id;
|
| | | |
| | | @Column(name = "`name`", length = 50)
|
| | | private String name;
|
| | | |
| | | @Column(name = "`picture`", length = 1024)
|
| | | private String picture;
|
| | |
|
| | | private String url;
|
| | | |
| | | @Column(name = "`key`", length = 50)
|
| | | private String key;
|
| | | |
| | | |
| | | @Column(name = "`search_param`", length = 1024)
|
| | | private String searchParam;
|
| | |
|
| | | // @Column(name = "`tbcates`", length = 1024)
|
| | | // private String tbCates;
|
| | |
|
| | | private int orderby;
|
| | | |
| | | private long createtime;
|
| | | |
| | | @Column(name = "ios_click")
|
| | | private Long iosClick = 0l;
|
| | | |
| | | @Column(name = "android_click")
|
| | | private Long androidClick = 0l;
|
| | | |
| | | @Transient // 点击次数
|
| | | private Long countClick = 0l; |
| | | |
| | | @Transient // 关联标签数量
|
| | | private int countlabel = 0; |
| | | |
| | | @Transient // 系统关联列表
|
| | | private List<org.fanli.facade.system.entity.common.SystemManage> systemList;
|
| | |
|
| | |
|
| | | public GoodsClass(String name, String picture, int orderby, long createtime) {
|
| | | super();
|
| | | this.name = name;
|
| | | this.picture = picture;
|
| | | this.orderby = orderby;
|
| | | this.createtime = createtime;
|
| | | }
|
| | |
|
| | | public GoodsClass() {
|
| | | }
|
| | |
|
| | | public GoodsClass(long id) {
|
| | | super();
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public String getName() {
|
| | | return name;
|
| | | }
|
| | |
|
| | | public void setName(String name) {
|
| | | this.name = name;
|
| | | }
|
| | |
|
| | | public String getKey() {
|
| | | return key;
|
| | | }
|
| | |
|
| | | public void setKey(String key) {
|
| | | this.key = key;
|
| | | }
|
| | |
|
| | | public String getPicture() {
|
| | | return picture;
|
| | | }
|
| | |
|
| | | public void setPicture(String picture) {
|
| | | this.picture = picture;
|
| | | }
|
| | |
|
| | | public String getUrl() {
|
| | | return url;
|
| | | }
|
| | |
|
| | | public void setUrl(String url) {
|
| | | this.url = url;
|
| | | }
|
| | |
|
| | | public int getOrderby() {
|
| | | return orderby;
|
| | | }
|
| | |
|
| | | public void setOrderby(int orderby) {
|
| | | this.orderby = orderby;
|
| | | }
|
| | |
|
| | | public long getCreatetime() {
|
| | | return createtime;
|
| | | }
|
| | |
|
| | | public void setCreatetime(long createtime) {
|
| | | this.createtime = createtime;
|
| | | }
|
| | |
|
| | | public Long getIosClick() {
|
| | | return iosClick;
|
| | | }
|
| | |
|
| | | public void setIosClick(Long iosClick) {
|
| | | this.iosClick = iosClick;
|
| | | }
|
| | |
|
| | | public Long getAndroidClick() {
|
| | | return androidClick;
|
| | | }
|
| | |
|
| | | public void setAndroidClick(Long androidClick) {
|
| | | this.androidClick = androidClick;
|
| | | }
|
| | |
|
| | | public Long getCountClick() {
|
| | | return countClick;
|
| | | }
|
| | |
|
| | | public void setCountClick(Long countClick) {
|
| | | this.countClick = countClick;
|
| | | }
|
| | |
|
| | | public List<org.fanli.facade.system.entity.common.SystemManage> getSystemList() {
|
| | | return systemList;
|
| | | }
|
| | |
|
| | | public void setSystemList(List<org.fanli.facade.system.entity.common.SystemManage> systemList) {
|
| | | this.systemList = systemList;
|
| | | }
|
| | |
|
| | | public int getCountlabel() {
|
| | | return countlabel;
|
| | | }
|
| | |
|
| | | public void setCountlabel(int countlabel) {
|
| | | this.countlabel = countlabel;
|
| | | }
|
| | |
|
| | | public String getSearchParam() {
|
| | | return searchParam;
|
| | | }
|
| | |
|
| | | public void setSearchParam(String searchParam) {
|
| | | this.searchParam = searchParam;
|
| | | }
|
| | |
|
| | | |
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.clazz;
|
| | |
|
| | | import javax.persistence.Column;
|
| | | import javax.persistence.Entity;
|
| | | import javax.persistence.FetchType;
|
| | | import javax.persistence.GeneratedValue;
|
| | | import javax.persistence.GenerationType;
|
| | | import javax.persistence.Id;
|
| | | import javax.persistence.JoinColumn;
|
| | | import javax.persistence.ManyToOne;
|
| | | import javax.persistence.Table;
|
| | |
|
| | | import org.fanli.facade.goods.entity.clazz.GoodsClass;
|
| | |
|
| | | import com.google.gson.annotations.Expose;
|
| | |
|
| | | /**
|
| | | * 商品二级分类
|
| | | * |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | @Entity
|
| | | @Table(name = "yeshi_ec_second_class")
|
| | | public class GoodsSecondClass {
|
| | | @Id
|
| | | @GeneratedValue(strategy = GenerationType.AUTO)
|
| | | @Column(name = "id")
|
| | | @Expose
|
| | | private long id;
|
| | | @Expose
|
| | | @Column(name = "`name`", length = 50)
|
| | | private String name;
|
| | | @Expose
|
| | | @Column(name = "`picture`", length = 1024)
|
| | | private String picture;
|
| | | private int orderby;
|
| | | private long createtime;
|
| | | @ManyToOne(fetch = FetchType.EAGER)
|
| | | @JoinColumn(name = "pid")
|
| | | private GoodsClass parent;
|
| | | @Column(name = "`key`", length = 10)
|
| | | private String key;
|
| | | |
| | | public GoodsSecondClass() {
|
| | | }
|
| | | |
| | | public GoodsSecondClass(long id) {
|
| | | super();
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public GoodsSecondClass(String name, String picture, int orderby,
|
| | | long createtime, GoodsClass parent) {
|
| | | super();
|
| | | this.name = name;
|
| | | this.picture = picture;
|
| | | this.orderby = orderby;
|
| | | this.createtime = createtime;
|
| | | this.parent = parent;
|
| | | }
|
| | | |
| | | public String getKey() {
|
| | | return key;
|
| | | }
|
| | |
|
| | | public void setKey(String key) {
|
| | | this.key = key;
|
| | | }
|
| | |
|
| | | public GoodsClass getParent() {
|
| | | return parent;
|
| | | }
|
| | |
|
| | | public void setParent(GoodsClass parent) {
|
| | | this.parent = parent;
|
| | | }
|
| | |
|
| | | public long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public String getName() {
|
| | | return name;
|
| | | }
|
| | |
|
| | | public void setName(String name) {
|
| | | this.name = name;
|
| | | }
|
| | |
|
| | | public String getPicture() {
|
| | | return picture;
|
| | | }
|
| | |
|
| | | public void setPicture(String picture) {
|
| | | this.picture = picture;
|
| | | }
|
| | |
|
| | | public int getOrderby() {
|
| | | return orderby;
|
| | | }
|
| | |
|
| | | public void setOrderby(int orderby) {
|
| | | this.orderby = orderby;
|
| | | }
|
| | |
|
| | | public long getCreatetime() {
|
| | | return createtime;
|
| | | }
|
| | |
|
| | | public void setCreatetime(long createtime) {
|
| | | this.createtime = createtime;
|
| | | }
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.clazz;
|
| | |
|
| | | import java.io.Serializable;
|
| | | import java.util.Date;
|
| | |
|
| | | import javax.persistence.Column;
|
| | | import javax.persistence.Entity;
|
| | | import javax.persistence.Table;
|
| | | import javax.persistence.Transient;
|
| | |
|
| | | import com.google.gson.annotations.Expose;
|
| | |
|
| | | /**
|
| | | * 商品二级分类
|
| | | * |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | @Entity
|
| | | @Table(name = "yeshi_ec_sub_class")
|
| | | @org.yeshi.utils.mybatis.Table("yeshi_ec_sub_class")
|
| | | public class GoodsSubClass implements Serializable {
|
| | | /**
|
| | | * |
| | | */
|
| | | private static final long serialVersionUID = 1L;
|
| | |
|
| | | @Expose
|
| | | @Column(name = "sub_id")
|
| | | private Long id;
|
| | |
|
| | | @Expose
|
| | | @Column(name = "sub_name")
|
| | | private String name; // 名称
|
| | |
|
| | | @Expose
|
| | | @Column(name = "sub_picture")
|
| | | private String picture; // 图片路径
|
| | |
|
| | | @Expose
|
| | | @Column(name = "sub_weight")
|
| | | private Integer weight; // 权重-排序
|
| | |
|
| | | @Expose
|
| | | @Column(name = "sub_state")
|
| | | private Integer state; // 状态 1启用 0停用
|
| | |
|
| | | @Column(name = "sub_root_id")
|
| | | private GoodsClass rootClass; // 一级类别
|
| | |
|
| | | @Column(name = "sub_pid")
|
| | | private GoodsSubClass parent; // 上级:对应的二级以下分类 用于3级、4级、5级
|
| | |
|
| | | @Expose
|
| | | @Column(name = "sub_level")
|
| | | private Integer level; // 具体等级
|
| | |
|
| | | @Expose
|
| | | @Column(name = "sub_key")
|
| | | private String key; // 搜索关键词
|
| | |
|
| | | @Expose
|
| | | @Column(name = "sub_search_json")
|
| | | private String searchJson; // 搜索条件
|
| | |
|
| | | @Expose
|
| | | @Column(name = "sub_ios_click")
|
| | | private Long iosClick = 0l;
|
| | |
|
| | | @Expose
|
| | | @Column(name = "sub_android_click")
|
| | | private Long androidClick = 0l;
|
| | |
|
| | | @Expose
|
| | | @Column(name = "sub_createtime")
|
| | | private Date createtime; // 创建时间
|
| | |
|
| | | @Expose
|
| | | @Column(name = "sub_updatetime")
|
| | | private Date updatetime; // 创建时间
|
| | |
|
| | | @Transient
|
| | | private Long CountClick = 0l;
|
| | | @Transient
|
| | | // 关联标签数量
|
| | | private int countlabel = 0;
|
| | |
|
| | | public GoodsSubClass() {
|
| | | }
|
| | |
|
| | | public GoodsSubClass(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public String getName() {
|
| | | return name;
|
| | | }
|
| | |
|
| | | public void setName(String name) {
|
| | | this.name = name;
|
| | | }
|
| | |
|
| | | public String getPicture() {
|
| | | return picture;
|
| | | }
|
| | |
|
| | | public void setPicture(String picture) {
|
| | | this.picture = picture;
|
| | | }
|
| | |
|
| | | public Integer getWeight() {
|
| | | return weight;
|
| | | }
|
| | |
|
| | | public void setWeight(Integer weight) {
|
| | | this.weight = weight;
|
| | | }
|
| | |
|
| | | public Date getCreatetime() {
|
| | | return createtime;
|
| | | }
|
| | |
|
| | | public void setCreatetime(Date createtime) {
|
| | | this.createtime = createtime;
|
| | | }
|
| | |
|
| | | public GoodsSubClass getParent() {
|
| | | return parent;
|
| | | }
|
| | |
|
| | | public void setParent(GoodsSubClass parent) {
|
| | | this.parent = parent;
|
| | | }
|
| | |
|
| | | public GoodsClass getRootClass() {
|
| | | return rootClass;
|
| | | }
|
| | |
|
| | | public void setRootClass(GoodsClass rootClass) {
|
| | | this.rootClass = rootClass;
|
| | | }
|
| | |
|
| | | public Long getIosClick() {
|
| | | return iosClick;
|
| | | }
|
| | |
|
| | | public void setIosClick(Long iosClick) {
|
| | | this.iosClick = iosClick;
|
| | | }
|
| | |
|
| | | public Long getAndroidClick() {
|
| | | return androidClick;
|
| | | }
|
| | |
|
| | | public void setAndroidClick(Long androidClick) {
|
| | | this.androidClick = androidClick;
|
| | | }
|
| | |
|
| | | public Long getCountClick() {
|
| | | return CountClick;
|
| | | }
|
| | |
|
| | | public void setCountClick(Long countClick) {
|
| | | CountClick = countClick;
|
| | | }
|
| | |
|
| | | public Integer getLevel() {
|
| | | return level;
|
| | | }
|
| | |
|
| | | public void setLevel(Integer level) {
|
| | | this.level = level;
|
| | | }
|
| | |
|
| | | public int getCountlabel() {
|
| | | return countlabel;
|
| | | }
|
| | |
|
| | | public void setCountlabel(int countlabel) {
|
| | | this.countlabel = countlabel;
|
| | | }
|
| | |
|
| | | public String getKey() {
|
| | | return key;
|
| | | }
|
| | |
|
| | | public void setKey(String key) {
|
| | | this.key = key;
|
| | | }
|
| | |
|
| | | public Date getUpdatetime() {
|
| | | return updatetime;
|
| | | }
|
| | |
|
| | | public void setUpdatetime(Date updatetime) {
|
| | | this.updatetime = updatetime;
|
| | | }
|
| | |
|
| | | public String getSearchJson() {
|
| | | return searchJson;
|
| | | }
|
| | |
|
| | | public void setSearchJson(String searchJson) {
|
| | | this.searchJson = searchJson;
|
| | | }
|
| | |
|
| | | public Integer getState() {
|
| | | return state;
|
| | | }
|
| | |
|
| | | public void setState(Integer state) {
|
| | | this.state = state;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.clazz;
|
| | | import java.io.Serializable;
|
| | | import java.util.Date;
|
| | |
|
| | | import javax.persistence.Column;
|
| | | import javax.persistence.Entity;
|
| | | import javax.persistence.Id;
|
| | | import javax.persistence.JoinColumn;
|
| | | import javax.persistence.Table;
|
| | |
|
| | |
|
| | | /**
|
| | | * 9k9组合类
|
| | | * |
| | | * @author yj
|
| | | *
|
| | | * @date 2018年6月27日
|
| | | */
|
| | | @Entity
|
| | | @Table(name = "yeshi_ec_class_9k9")
|
| | | public class MergeClass implements Serializable{
|
| | |
|
| | |
|
| | | /**
|
| | | * |
| | | */
|
| | | private static final long serialVersionUID = 1L;
|
| | |
|
| | | @Id
|
| | | @Column(name = "k_id")
|
| | | private Long id;
|
| | |
|
| | | @JoinColumn(name = "k_name")
|
| | | private String name;// 名称
|
| | |
|
| | | @JoinColumn(name = "k_merge_cid")
|
| | | private String mergeCids; // 系统类id(逗号隔开)
|
| | |
|
| | | @JoinColumn(name = "k_weight")
|
| | | private Double weight; // 权重
|
| | |
|
| | | @JoinColumn(name = "k_createtime")
|
| | | private Date createtime; // 创建时间
|
| | |
|
| | | @JoinColumn(name = "k_updatetime")
|
| | | private Date updatetime; // 更新时间(修改时间)
|
| | |
|
| | |
|
| | | |
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public String getName() {
|
| | | return name;
|
| | | }
|
| | |
|
| | | public void setName(String name) {
|
| | | this.name = name;
|
| | | }
|
| | |
|
| | | public String getMergeCids() {
|
| | | return mergeCids;
|
| | | }
|
| | |
|
| | | public void setMergeCids(String mergeCids) {
|
| | | this.mergeCids = mergeCids;
|
| | | }
|
| | |
|
| | | public Double getWeight() {
|
| | | return weight;
|
| | | }
|
| | |
|
| | | public void setWeight(Double weight) {
|
| | | this.weight = weight;
|
| | | }
|
| | |
|
| | | public Date getCreatetime() {
|
| | | return createtime;
|
| | | }
|
| | |
|
| | | public void setCreatetime(Date createtime) {
|
| | | this.createtime = createtime;
|
| | | }
|
| | |
|
| | | public Date getUpdatetime() {
|
| | | return updatetime;
|
| | | }
|
| | |
|
| | | public void setUpdatetime(Date updatetime) {
|
| | | this.updatetime = updatetime;
|
| | | }
|
| | | |
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.clazz;
|
| | |
|
| | | import java.io.Serializable;
|
| | |
|
| | | import javax.persistence.Column;
|
| | | import javax.persistence.Entity;
|
| | | import javax.persistence.FetchType;
|
| | | import javax.persistence.GeneratedValue;
|
| | | import javax.persistence.GenerationType;
|
| | | import javax.persistence.Id;
|
| | | import javax.persistence.JoinColumn;
|
| | | import javax.persistence.ManyToOne;
|
| | | import javax.persistence.Table;
|
| | |
|
| | | import org.fanli.facade.system.entity.common.SystemManage;
|
| | |
|
| | |
|
| | |
|
| | | @Entity
|
| | | @Table(name = "yeshi_ec_super_goodsclass")
|
| | | public class SuperGoodsClass implements Serializable{
|
| | | /**
|
| | | * |
| | | */
|
| | | private static final long serialVersionUID = 1L;
|
| | | |
| | | |
| | | @Id
|
| | | @GeneratedValue(strategy = GenerationType.AUTO)
|
| | | @Column(name = "id")
|
| | | private long id;
|
| | | @ManyToOne(fetch = FetchType.EAGER)
|
| | | @JoinColumn(name = "goodsclass_id")
|
| | | private GoodsClass goodsClass;
|
| | | @ManyToOne(fetch = FetchType.EAGER)
|
| | | @JoinColumn(name = "system_id")
|
| | | private SystemManage system;
|
| | |
|
| | | public SuperGoodsClass() {
|
| | | // TODO Auto-generated constructor stub
|
| | | }
|
| | | |
| | | public SuperGoodsClass(GoodsClass goodsClass, SystemManage system) {
|
| | | super();
|
| | | this.goodsClass = goodsClass;
|
| | | this.system = system;
|
| | | }
|
| | |
|
| | | public long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public GoodsClass getGoodsClass() {
|
| | | return goodsClass;
|
| | | }
|
| | |
|
| | | public void setGoodsClass(GoodsClass goodsClass) {
|
| | | this.goodsClass = goodsClass;
|
| | | }
|
| | |
|
| | | public SystemManage getSystem() {
|
| | | return system;
|
| | | }
|
| | |
|
| | | public void setSystem(SystemManage system) {
|
| | | this.system = system;
|
| | | }
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.clazz.taobao;
|
| | | import java.util.Date;
|
| | |
|
| | | import javax.persistence.Column;
|
| | | import javax.persistence.Entity;
|
| | | import javax.persistence.GeneratedValue;
|
| | | import javax.persistence.GenerationType;
|
| | | import javax.persistence.Id;
|
| | | import javax.persistence.Table;
|
| | |
|
| | | import com.google.gson.annotations.Expose;
|
| | |
|
| | | /**
|
| | | * 淘宝分类
|
| | | * |
| | | * @author yj
|
| | | *
|
| | | */
|
| | | @Entity
|
| | | @Table(name = "yeshi_ec_taobao_class")
|
| | | @org.yeshi.utils.mybatis.Table("yeshi_ec_taobao_class")
|
| | | public class TaoBaoClass {
|
| | | @Id
|
| | | @Expose
|
| | | @Column(name = "tc_id")
|
| | | @GeneratedValue(strategy = GenerationType.AUTO)
|
| | | @org.yeshi.utils.mybatis.Column(name="tc_id")
|
| | | private Long id;
|
| | | |
| | | @Expose
|
| | | @Column(name = "tc_category_id")
|
| | | @org.yeshi.utils.mybatis.Column(name="tc_category_id")
|
| | | private Integer categoryId; // 分类id
|
| | | |
| | | @Expose
|
| | | @Column(name = "tc_category_name")
|
| | | @org.yeshi.utils.mybatis.Column(name="tc_category_name")
|
| | | private String categoryName; // 淘宝分类名称
|
| | | |
| | | @Expose
|
| | | @Column(name = "tc_parent_category_id")
|
| | | @org.yeshi.utils.mybatis.Column(name="tc_parent_category_id")
|
| | | private Integer parentCategoryId; // 上级淘宝分类id
|
| | | |
| | | @Expose
|
| | | @Column(name = "tc_createtime")
|
| | | @org.yeshi.utils.mybatis.Column(name="tc_createtime")
|
| | | private Date createtime; // 创建时间
|
| | | |
| | | @Expose
|
| | | @Column(name = "tc_updatetime")
|
| | | @org.yeshi.utils.mybatis.Column(name="tc_updatetime")
|
| | | private Date updatetime; // 更新时间
|
| | | |
| | | |
| | | |
| | | public TaoBaoClass(){}
|
| | | |
| | | public TaoBaoClass(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public Integer getCategoryId() {
|
| | | return categoryId;
|
| | | }
|
| | |
|
| | | public void setCategoryId(Integer categoryId) {
|
| | | this.categoryId = categoryId;
|
| | | }
|
| | |
|
| | | public String getCategoryName() {
|
| | | return categoryName;
|
| | | }
|
| | |
|
| | | public void setCategoryName(String categoryName) {
|
| | | this.categoryName = categoryName;
|
| | | }
|
| | |
|
| | | public Integer getParentCategoryId() {
|
| | | return parentCategoryId;
|
| | | }
|
| | |
|
| | | public void setParentCategoryId(Integer parentCategoryId) {
|
| | | this.parentCategoryId = parentCategoryId;
|
| | | }
|
| | |
|
| | | public Date getCreatetime() {
|
| | | return createtime;
|
| | | }
|
| | |
|
| | | public void setCreatetime(Date createtime) {
|
| | | this.createtime = createtime;
|
| | | }
|
| | |
|
| | | public Date getUpdatetime() {
|
| | | return updatetime;
|
| | | }
|
| | |
|
| | | public void setUpdatetime(Date updatetime) {
|
| | | this.updatetime = updatetime;
|
| | | }
|
| | | |
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.clazz.taobao;
|
| | | import java.util.Date;
|
| | |
|
| | | import javax.persistence.Column;
|
| | | import javax.persistence.Entity;
|
| | | import javax.persistence.GeneratedValue;
|
| | | import javax.persistence.GenerationType;
|
| | | import javax.persistence.Id;
|
| | | import javax.persistence.JoinColumn;
|
| | | import javax.persistence.Table;
|
| | |
|
| | | import com.google.gson.annotations.Expose;
|
| | |
|
| | | /**
|
| | | * 淘宝分类-映射-系统分类
|
| | | * |
| | | * @author yj
|
| | | *
|
| | | */
|
| | | @Entity
|
| | | @Table(name = "yeshi_ec_taobao_class_mapper")
|
| | | @org.yeshi.utils.mybatis.Table("yeshi_ec_taobao_class_mapper")
|
| | | public class TaoBaoClassRelation {
|
| | | @Id
|
| | | @Expose
|
| | | @Column(name = "tm_id")
|
| | | @GeneratedValue(strategy = GenerationType.AUTO)
|
| | | @org.yeshi.utils.mybatis.Column(name="tm_id")
|
| | | private Long id;
|
| | | |
| | | @Expose
|
| | | @Column(name = "tm_system_cid")
|
| | | @org.yeshi.utils.mybatis.Column(name="tm_system_cid")
|
| | | private Long cid; // 本系统一级类目id
|
| | | |
| | | @Expose
|
| | | @Column(name = "tm_system_sub_cid")
|
| | | @org.yeshi.utils.mybatis.Column(name="tm_system_sub_cid")
|
| | | private Long subId; //本系统二级类目id
|
| | | |
| | | @Expose
|
| | | @Column(name = "tm_taobao_cid")
|
| | | @org.yeshi.utils.mybatis.Column(name="tm_taobao_cid")
|
| | | private Long taobaoCid; // 淘宝类目id
|
| | |
|
| | | @JoinColumn(name = "tm_weight")
|
| | | @org.yeshi.utils.mybatis.Column(name = "tm_weight")
|
| | | private Double weight; // 权重
|
| | |
|
| | | @JoinColumn(name = "tm_createtime")
|
| | | @org.yeshi.utils.mybatis.Column(name = "tm_createtime")
|
| | | private Date createtime; // 创建时间
|
| | |
|
| | | @JoinColumn(name = "tm_updatetime")
|
| | | @org.yeshi.utils.mybatis.Column(name = "tm_updatetime")
|
| | | private Date updatetime; // 更新时间(修改时间)
|
| | |
|
| | | |
| | | |
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public Long getCid() {
|
| | | return cid;
|
| | | }
|
| | |
|
| | | public void setCid(Long cid) {
|
| | | this.cid = cid;
|
| | | }
|
| | |
|
| | | public Long getSubId() {
|
| | | return subId;
|
| | | }
|
| | |
|
| | | public void setSubId(Long subId) {
|
| | | this.subId = subId;
|
| | | }
|
| | |
|
| | | public Long getTaobaoCid() {
|
| | | return taobaoCid;
|
| | | }
|
| | |
|
| | | public void setTaobaoCid(Long taobaoCid) {
|
| | | this.taobaoCid = taobaoCid;
|
| | | }
|
| | |
|
| | | public Double getWeight() {
|
| | | return weight;
|
| | | }
|
| | |
|
| | | public void setWeight(Double weight) {
|
| | | this.weight = weight;
|
| | | }
|
| | |
|
| | | public Date getCreatetime() {
|
| | | return createtime;
|
| | | }
|
| | |
|
| | | public void setCreatetime(Date createtime) {
|
| | | this.createtime = createtime;
|
| | | }
|
| | |
|
| | | public Date getUpdatetime() {
|
| | | return updatetime;
|
| | | }
|
| | |
|
| | | public void setUpdatetime(Date updatetime) {
|
| | | this.updatetime = updatetime;
|
| | | }
|
| | | |
| | | |
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.label;
|
| | |
|
| | | import java.io.Serializable;
|
| | | import java.util.Date;
|
| | |
|
| | | import javax.persistence.Column;
|
| | | import javax.persistence.Entity;
|
| | | import javax.persistence.FetchType;
|
| | | import javax.persistence.GeneratedValue;
|
| | | import javax.persistence.GenerationType;
|
| | | import javax.persistence.Id;
|
| | | import javax.persistence.JoinColumn;
|
| | | import javax.persistence.ManyToOne;
|
| | | import javax.persistence.Table;
|
| | |
|
| | | import com.yeshi.fanli.base.entity.admin.AdminUser;
|
| | |
|
| | | /**
|
| | | * 标签库
|
| | | * |
| | | * @author yj
|
| | | *
|
| | | * @date 2018年6月27日
|
| | | */
|
| | | @Entity
|
| | | @Table(name = "yeshi_ec_label")
|
| | | @org.yeshi.utils.mybatis.Table("yeshi_ec_label")
|
| | | public class Label implements Serializable{
|
| | |
|
| | | /**
|
| | | * |
| | | */
|
| | | private static final long serialVersionUID = 1L;
|
| | | // 后台录入
|
| | | public final static int MODE_BACKSTAGE = 1;
|
| | | // excel导入
|
| | | public final static int MODE_EXCEL = 2;
|
| | | // 系统数据抓取
|
| | | public final static int MODE_SYSTEM = 3;
|
| | |
|
| | | @Id
|
| | | @Column(name = "lab_id")
|
| | | @GeneratedValue(strategy = GenerationType.AUTO)
|
| | | @org.yeshi.utils.mybatis.Column(name = "lab_id")
|
| | | private Long id;
|
| | |
|
| | | @JoinColumn(name = "lab_title")
|
| | | @org.yeshi.utils.mybatis.Column(name = "lab_title")
|
| | | private String title;// 名称
|
| | |
|
| | | @JoinColumn(name = "lab_picture")
|
| | | @org.yeshi.utils.mybatis.Column(name = "lab_picture")
|
| | | private String picture; // 图片url
|
| | |
|
| | | @JoinColumn(name = "lab_ios_click")
|
| | | @org.yeshi.utils.mybatis.Column(name = "lab_ios_click")
|
| | | private Long iosClick; // 点击次数
|
| | |
|
| | | @JoinColumn(name = "lab_android_click")
|
| | | @org.yeshi.utils.mybatis.Column(name = "lab_android_click")
|
| | | private Long androidClick; // 点击次数
|
| | |
|
| | | @ManyToOne(fetch = FetchType.EAGER)
|
| | | @JoinColumn(name = "lab_entry_aid")
|
| | | @org.yeshi.utils.mybatis.Column(name = "lab_entry_aid")
|
| | | private AdminUser createUser; // 录入人
|
| | |
|
| | | @JoinColumn(name = "lab_entry_mode")
|
| | | @org.yeshi.utils.mybatis.Column(name = "lab_entry_mode")
|
| | | private Integer entrymode; // 录入方式 (1 人工录入、2 系统自动录入、3 搜索录入)
|
| | |
|
| | | @JoinColumn(name = "lab_remark")
|
| | | @org.yeshi.utils.mybatis.Column(name = "lab_remark")
|
| | | private String remark; // 备注
|
| | | |
| | | |
| | | @JoinColumn(name = "lab_createtime")
|
| | | @org.yeshi.utils.mybatis.Column(name = "lab_createtime")
|
| | | private Date createtime; // 创建时间
|
| | |
|
| | | @JoinColumn(name = "lab_updatetime")
|
| | | @org.yeshi.utils.mybatis.Column(name = "lab_updatetime")
|
| | | private Date updatetime; // 更新时间(修改时间)
|
| | |
|
| | | |
| | | private Long countRelation; // 统计关联商品数量
|
| | | private Long countClick; // 总点击次数
|
| | | |
| | | |
| | | public Label(){}
|
| | | |
| | | public Label(Long id){
|
| | | this.id = id;
|
| | | }
|
| | | |
| | | |
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public String getTitle() {
|
| | | return title;
|
| | | }
|
| | |
|
| | | public void setTitle(String title) {
|
| | | this.title = title;
|
| | | }
|
| | |
|
| | | public String getPicture() {
|
| | | return picture;
|
| | | }
|
| | |
|
| | | public void setPicture(String picture) {
|
| | | this.picture = picture;
|
| | | }
|
| | |
|
| | | public Long getIosClick() {
|
| | | return iosClick;
|
| | | }
|
| | |
|
| | | public void setIosClick(Long iosClick) {
|
| | | this.iosClick = iosClick;
|
| | | }
|
| | |
|
| | | public Long getAndroidClick() {
|
| | | return androidClick;
|
| | | }
|
| | |
|
| | | public void setAndroidClick(Long androidClick) {
|
| | | this.androidClick = androidClick;
|
| | | }
|
| | |
|
| | | public AdminUser getCreateUser() {
|
| | | return createUser;
|
| | | }
|
| | |
|
| | | public void setCreateUser(AdminUser createUser) {
|
| | | this.createUser = createUser;
|
| | | }
|
| | |
|
| | | public Integer getEntrymode() {
|
| | | return entrymode;
|
| | | }
|
| | |
|
| | | public void setEntrymode(Integer entrymode) {
|
| | | this.entrymode = entrymode;
|
| | | }
|
| | |
|
| | | public Date getCreatetime() {
|
| | | return createtime;
|
| | | }
|
| | |
|
| | | public void setCreatetime(Date createtime) {
|
| | | this.createtime = createtime;
|
| | | }
|
| | |
|
| | | public Date getUpdatetime() {
|
| | | return updatetime;
|
| | | }
|
| | |
|
| | | public void setUpdatetime(Date updatetime) {
|
| | | this.updatetime = updatetime;
|
| | | }
|
| | |
|
| | | public Long getCountRelation() {
|
| | | return countRelation;
|
| | | }
|
| | |
|
| | | public void setCountRelation(Long countRelation) {
|
| | | this.countRelation = countRelation;
|
| | | }
|
| | |
|
| | | public Long getCountClick() {
|
| | | return countClick;
|
| | | }
|
| | |
|
| | | public void setCountClick(Long countClick) {
|
| | | this.countClick = countClick;
|
| | | }
|
| | |
|
| | | public String getRemark() {
|
| | | return remark;
|
| | | }
|
| | |
|
| | | public void setRemark(String remark) {
|
| | | this.remark = remark;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.label;
|
| | | import java.io.Serializable;
|
| | | import java.util.Date;
|
| | |
|
| | | import org.fanli.facade.goods.entity.clazz.GoodsClass;
|
| | | import org.fanli.facade.goods.entity.clazz.GoodsSubClass;
|
| | | import org.yeshi.utils.mybatis.Column;
|
| | | import org.yeshi.utils.mybatis.Table;
|
| | | /**
|
| | | * 商品关联标签库
|
| | | * |
| | | * @author yj
|
| | | *
|
| | | * @date 2018年6月27日
|
| | | */
|
| | | @Table("yeshi_ec_label_")
|
| | | public class LabelClass implements Serializable{
|
| | |
|
| | | /**
|
| | | * |
| | | */
|
| | | private static final long serialVersionUID = 1L;
|
| | |
|
| | | @Column(name = "lc_id")
|
| | | private Long id;
|
| | |
|
| | | @Column(name = "lc_label_id")
|
| | | private Label label; // 标签id
|
| | |
|
| | | @Column(name = "lc_class_id")
|
| | | private GoodsClass goodClass;// 商品大类
|
| | |
|
| | | @Column(name = "lc_subclass_id")
|
| | | private GoodsSubClass goodsSubClass; // 商品子类
|
| | |
|
| | | @Column(name = "lc_createtime")
|
| | | private Date createtime; // 创建时间
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public Label getLabel() {
|
| | | return label;
|
| | | }
|
| | |
|
| | | public void setLabel(Label label) {
|
| | | this.label = label;
|
| | | }
|
| | |
|
| | | public GoodsClass getGoodClass() {
|
| | | return goodClass;
|
| | | }
|
| | |
|
| | | public void setGoodClass(GoodsClass goodClass) {
|
| | | this.goodClass = goodClass;
|
| | | }
|
| | |
|
| | | public GoodsSubClass getGoodsSubClass() {
|
| | | return goodsSubClass;
|
| | | }
|
| | |
|
| | | public void setGoodsSubClass(GoodsSubClass goodsSubClass) {
|
| | | this.goodsSubClass = goodsSubClass;
|
| | | }
|
| | |
|
| | | public Date getCreatetime() {
|
| | | return createtime;
|
| | | }
|
| | |
|
| | | public void setCreatetime(Date createtime) {
|
| | | this.createtime = createtime;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.label;
|
| | |
|
| | | import java.io.Serializable;
|
| | | import java.util.Date;
|
| | |
|
| | | import org.yeshi.utils.mybatis.Column;
|
| | | import org.yeshi.utils.mybatis.Table;
|
| | |
|
| | | import com.yeshi.fanli.base.entity.admin.AdminUser;
|
| | | import com.yeshi.fanli.base.entity.goods.TaoBaoGoodsBrief;
|
| | |
|
| | | /**
|
| | | * 商品关联标签库
|
| | | * |
| | | * @author yj
|
| | | *
|
| | | * @date 2018年6月27日
|
| | | */
|
| | | @Table("yeshi_ec_label_goods")
|
| | | public class LabelGoods implements Serializable{
|
| | | |
| | | |
| | | /**
|
| | | * |
| | | */
|
| | | private static final long serialVersionUID = 1L;
|
| | |
|
| | | @Column(name = "lg_id")
|
| | | private Long id;
|
| | |
|
| | | @Column(name = "lg_label_id")
|
| | | private Label label; // 标签id
|
| | |
|
| | | @Column(name = "lg_goods_id")
|
| | | private TaoBaoGoodsBrief taoBaoGoodsBrief;// 商品id
|
| | |
|
| | | @Column(name = "lg_create_aid")
|
| | | private AdminUser createUser; // 创建人
|
| | | |
| | | @Column(name = "lg_weight")
|
| | | private Double weight; // 分类id
|
| | |
|
| | | |
| | | @Column(name = "lg_createtime")
|
| | | private Date createtime; // 创建时间
|
| | |
|
| | | @Column(name = "lg_updatetime")
|
| | | private Date updatetime; // 更新时间
|
| | |
|
| | | |
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public Label getLabel() {
|
| | | return label;
|
| | | }
|
| | |
|
| | | public void setLabel(Label label) {
|
| | | this.label = label;
|
| | | }
|
| | |
|
| | | public TaoBaoGoodsBrief getTaoBaoGoodsBrief() {
|
| | | return taoBaoGoodsBrief;
|
| | | }
|
| | |
|
| | | public void setTaoBaoGoodsBrief(TaoBaoGoodsBrief taoBaoGoodsBrief) {
|
| | | this.taoBaoGoodsBrief = taoBaoGoodsBrief;
|
| | | }
|
| | |
|
| | |
|
| | | public AdminUser getCreateUser() {
|
| | | return createUser;
|
| | | }
|
| | |
|
| | | public void setCreateUser(AdminUser createUser) {
|
| | | this.createUser = createUser;
|
| | | }
|
| | |
|
| | | public Date getCreatetime() {
|
| | | return createtime;
|
| | | }
|
| | |
|
| | | public void setCreatetime(Date createtime) {
|
| | | this.createtime = createtime;
|
| | | }
|
| | |
|
| | |
|
| | | public Date getUpdatetime() {
|
| | | return updatetime;
|
| | | }
|
| | |
|
| | | public void setUpdatetime(Date updatetime) {
|
| | | this.updatetime = updatetime;
|
| | | }
|
| | |
|
| | | public Double getWeight() {
|
| | | return weight;
|
| | | }
|
| | |
|
| | | public void setWeight(Double weight) {
|
| | | this.weight = weight;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.quality;
|
| | |
|
| | |
|
| | | import java.io.Serializable;
|
| | | import java.util.Date;
|
| | |
|
| | | import javax.persistence.Column;
|
| | | import javax.persistence.Entity;
|
| | | import javax.persistence.GeneratedValue;
|
| | | import javax.persistence.GenerationType;
|
| | | import javax.persistence.Id;
|
| | | import javax.persistence.JoinColumn;
|
| | | import javax.persistence.Table;
|
| | | import javax.persistence.Transient;
|
| | |
|
| | | import org.springframework.format.annotation.DateTimeFormat;
|
| | |
|
| | | import com.yeshi.fanli.base.entity.admin.AdminUser;
|
| | |
|
| | |
|
| | | /**
|
| | | * 精选库商品入库规则
|
| | | * |
| | | * @author yj
|
| | | *
|
| | | * @date 2018年8月2日
|
| | | */
|
| | | @Entity
|
| | | @Table(name = "yeshi_ec_boutique_auto_rule")
|
| | | @org.yeshi.utils.mybatis.Table("yeshi_ec_boutique_auto_rule")
|
| | | public class BoutiqueAutoRule implements Serializable{ |
| | |
|
| | | /**
|
| | | * |
| | | */
|
| | | private static final long serialVersionUID = 1L;
|
| | | |
| | | // 淘宝物料API
|
| | | public final static int TB_OPTIONAL = 1;
|
| | | // 淘宝官方推荐
|
| | | public final static int TB_MATERIAL = 2;
|
| | | |
| | | // 京东
|
| | | public final static int JD = 8;
|
| | | // 拼多多
|
| | | public final static int PDD = 9;
|
| | | |
| | | |
| | |
|
| | | @Id
|
| | | @Column(name = "sr_id")
|
| | | @GeneratedValue(strategy = GenerationType.AUTO)
|
| | | @org.yeshi.utils.mybatis.Column(name = "sr_id")
|
| | | private Long id;
|
| | |
|
| | | |
| | | @JoinColumn(name = "sr_source")
|
| | | @org.yeshi.utils.mybatis.Column(name = "sr_source")
|
| | | private Integer source; // 来源
|
| | | |
| | | |
| | | @JoinColumn(name = "sr_title")
|
| | | @org.yeshi.utils.mybatis.Column(name = "sr_title")
|
| | | private String title; // 任务名称
|
| | |
|
| | | |
| | | @JoinColumn(name = "sr_search_content")
|
| | | @org.yeshi.utils.mybatis.Column(name = "sr_search_content")
|
| | | private String searchContent; // 任务内容
|
| | | |
| | | @JoinColumn(name = "sr_class_name")
|
| | | @org.yeshi.utils.mybatis.Column(name = "sr_class_name")
|
| | | private String className; // 主类目
|
| | | |
| | | @JoinColumn(name = "sr_subclass_name")
|
| | | @org.yeshi.utils.mybatis.Column(name = "sr_subclass_name")
|
| | | private String subclassName; // 子类目
|
| | | |
| | | @JoinColumn(name = "sr_execute_day")
|
| | | @org.yeshi.utils.mybatis.Column(name = "sr_execute_day")
|
| | | private String executeDay; // 执行相隔天数
|
| | | |
| | | @JoinColumn(name = "sr_execute_time")
|
| | | @org.yeshi.utils.mybatis.Column(name = "sr_execute_time")
|
| | | private String executeTime; // 执行时间
|
| | | |
| | | @JoinColumn(name = "sr_cron_time")
|
| | | @org.yeshi.utils.mybatis.Column(name = "sr_cron_time")
|
| | | private String cronTime; // cron执行时间
|
| | |
|
| | | @JoinColumn(name = "sr_state")
|
| | | @org.yeshi.utils.mybatis.Column(name = "sr_state")
|
| | | private Integer state; // 状态:1启用 0停用
|
| | | |
| | | @JoinColumn(name = "sr_start_time")
|
| | | @org.yeshi.utils.mybatis.Column(name = "sr_start_time")
|
| | | @DateTimeFormat(pattern = "yyyy-MM-dd")
|
| | | private Date startTime; // 生效时间
|
| | |
|
| | | |
| | | @JoinColumn(name = "sr_end_time")
|
| | | @org.yeshi.utils.mybatis.Column(name = "sr_end_time")
|
| | | @DateTimeFormat(pattern = "yyyy-MM-dd")
|
| | | private Date endTime; // 失效时间
|
| | | |
| | | |
| | | |
| | | @JoinColumn(name = "sr_createtime")
|
| | | @org.yeshi.utils.mybatis.Column(name = "sr_createtime")
|
| | | private Date createtime; // 创建时间
|
| | |
|
| | | @JoinColumn(name = "sr_updatetime")
|
| | | @org.yeshi.utils.mybatis.Column(name = "sr_updatetime")
|
| | | private Date updatetime; // 更新时间(修改时间)
|
| | | |
| | | |
| | | @Transient
|
| | | private String key; // 搜索关键词
|
| | | @Transient
|
| | | private String cateIds; // 官方推荐商品库投放ID;淘宝类目id集合
|
| | | @Transient
|
| | | private Integer startSales; // 销量小值
|
| | | @Transient
|
| | | private Integer endSales; // 销量大值
|
| | | |
| | | @Transient
|
| | | private Double startZkPrice; // 在售价范围小值
|
| | | @Transient
|
| | | private Double endZkPrice; // 在售价范围大值
|
| | | |
| | | @Transient
|
| | | private Double startPrice; // 券后价范围小值
|
| | | @Transient
|
| | | private Double endPrice; // 券后价范围大值
|
| | | @Transient
|
| | | private Double startTkRate; // 佣金范围小值
|
| | | @Transient
|
| | | private Double endTkRate; // 佣金范围大值
|
| | |
|
| | | @Transient
|
| | | private Integer isTmall; // 是否天猫
|
| | | @Transient
|
| | | private Integer hasCoupon; // 是否有券:1 有 0 无
|
| | | @Transient
|
| | | private Integer freeShipment; // 是否包邮:1 有 0 无
|
| | | @Transient
|
| | | private Integer needPrepay; // 是否消费保障:1有 0 无
|
| | | @Transient
|
| | | private Integer npxLevel; // 牛皮癣程度,取值:1:不限,2:无,3:轻微
|
| | | @Transient
|
| | | private Integer includePayRate30; // 成交转化是否高于行业均值 1 有 0 无
|
| | | @Transient
|
| | | private Integer includeGoodRate; // 好评率是否高于行业均值 1 有 0 无
|
| | | @Transient
|
| | | private Integer includeRfdRate; // 退款率是否低于行业均值 1 有 0 无
|
| | | |
| | | @Transient
|
| | | private String lableNames; // 标签名称:空格隔开
|
| | | |
| | | @Transient
|
| | | private String classNameChinese; // 淘宝类目名称
|
| | | |
| | | @Transient
|
| | | private Integer maxPage; // 请求最大页数
|
| | |
|
| | | @Transient
|
| | | private int goodsSource; // 权重结束
|
| | | @Transient
|
| | | private String sourceCalss; // 具体来源
|
| | | @Transient
|
| | | private String systemCid;// 系统分类id
|
| | | |
| | | @Transient
|
| | | private boolean calss9k9; // 是否9k9类目
|
| | | |
| | | @Transient
|
| | | private boolean flashSale; // 是否加入限时抢购
|
| | | |
| | | @Transient
|
| | | private int startWeight; // 权重起始
|
| | | @Transient
|
| | | private int endWeight; // 权重结束
|
| | | |
| | |
|
| | | @Transient
|
| | | private AdminUser adminUser;
|
| | | |
| | | |
| | | |
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | |
|
| | | public Integer getSource() {
|
| | | return source;
|
| | | }
|
| | |
|
| | |
|
| | | public void setSource(Integer source) {
|
| | | this.source = source;
|
| | | }
|
| | |
|
| | |
|
| | | public String getTitle() {
|
| | | return title;
|
| | | }
|
| | |
|
| | |
|
| | | public void setTitle(String title) {
|
| | | this.title = title;
|
| | | }
|
| | |
|
| | |
|
| | | public String getSearchContent() {
|
| | | return searchContent;
|
| | | }
|
| | |
|
| | |
|
| | | public void setSearchContent(String searchContent) {
|
| | | this.searchContent = searchContent;
|
| | | }
|
| | |
|
| | |
|
| | | public String getClassName() {
|
| | | return className;
|
| | | }
|
| | |
|
| | |
|
| | | public void setClassName(String className) {
|
| | | this.className = className;
|
| | | }
|
| | |
|
| | |
|
| | | public String getSubclassName() {
|
| | | return subclassName;
|
| | | }
|
| | |
|
| | |
|
| | | public void setSubclassName(String subclassName) {
|
| | | this.subclassName = subclassName;
|
| | | }
|
| | |
|
| | |
|
| | | public String getExecuteDay() {
|
| | | return executeDay;
|
| | | }
|
| | |
|
| | |
|
| | | public void setExecuteDay(String executeDay) {
|
| | | this.executeDay = executeDay;
|
| | | }
|
| | |
|
| | |
|
| | | public String getExecuteTime() {
|
| | | return executeTime;
|
| | | }
|
| | |
|
| | |
|
| | | public void setExecuteTime(String executeTime) {
|
| | | this.executeTime = executeTime;
|
| | | }
|
| | |
|
| | |
|
| | | public String getCronTime() {
|
| | | return cronTime;
|
| | | }
|
| | |
|
| | |
|
| | | public void setCronTime(String cronTime) {
|
| | | this.cronTime = cronTime;
|
| | | }
|
| | |
|
| | |
|
| | | public Date getStartTime() {
|
| | | return startTime;
|
| | | }
|
| | |
|
| | |
|
| | | public void setStartTime(Date startTime) {
|
| | | this.startTime = startTime;
|
| | | }
|
| | |
|
| | |
|
| | | public Date getEndTime() {
|
| | | return endTime;
|
| | | }
|
| | |
|
| | |
|
| | | public void setEndTime(Date endTime) {
|
| | | this.endTime = endTime;
|
| | | }
|
| | |
|
| | |
|
| | | public Integer getState() {
|
| | | return state;
|
| | | }
|
| | |
|
| | |
|
| | | public void setState(Integer state) {
|
| | | this.state = state;
|
| | | }
|
| | |
|
| | |
|
| | | public Date getCreatetime() {
|
| | | return createtime;
|
| | | }
|
| | |
|
| | |
|
| | | public void setCreatetime(Date createtime) {
|
| | | this.createtime = createtime;
|
| | | }
|
| | |
|
| | |
|
| | | public Date getUpdatetime() {
|
| | | return updatetime;
|
| | | }
|
| | |
|
| | |
|
| | | public void setUpdatetime(Date updatetime) {
|
| | | this.updatetime = updatetime;
|
| | | }
|
| | |
|
| | |
|
| | | public String getCateIds() {
|
| | | return cateIds;
|
| | | }
|
| | |
|
| | |
|
| | | public void setCateIds(String cateIds) {
|
| | | this.cateIds = cateIds;
|
| | | }
|
| | |
|
| | |
|
| | | public Integer getStartSales() {
|
| | | return startSales;
|
| | | }
|
| | |
|
| | |
|
| | | public void setStartSales(Integer startSales) {
|
| | | this.startSales = startSales;
|
| | | }
|
| | |
|
| | |
|
| | | public Integer getEndSales() {
|
| | | return endSales;
|
| | | }
|
| | |
|
| | |
|
| | | public void setEndSales(Integer endSales) {
|
| | | this.endSales = endSales;
|
| | | }
|
| | |
|
| | |
|
| | | public Double getStartPrice() {
|
| | | return startPrice;
|
| | | }
|
| | |
|
| | |
|
| | | public void setStartPrice(Double startPrice) {
|
| | | this.startPrice = startPrice;
|
| | | }
|
| | |
|
| | |
|
| | | public Double getEndPrice() {
|
| | | return endPrice;
|
| | | }
|
| | |
|
| | |
|
| | | public void setEndPrice(Double endPrice) {
|
| | | this.endPrice = endPrice;
|
| | | }
|
| | |
|
| | |
|
| | | public Double getStartTkRate() {
|
| | | return startTkRate;
|
| | | }
|
| | |
|
| | |
|
| | | public void setStartTkRate(Double startTkRate) {
|
| | | this.startTkRate = startTkRate;
|
| | | }
|
| | |
|
| | |
|
| | | public Double getEndTkRate() {
|
| | | return endTkRate;
|
| | | }
|
| | |
|
| | |
|
| | | public void setEndTkRate(Double endTkRate) {
|
| | | this.endTkRate = endTkRate;
|
| | | }
|
| | |
|
| | |
|
| | | public Integer getIsTmall() {
|
| | | return isTmall;
|
| | | }
|
| | |
|
| | |
|
| | | public void setIsTmall(Integer isTmall) {
|
| | | this.isTmall = isTmall;
|
| | | }
|
| | |
|
| | |
|
| | | public Integer getHasCoupon() {
|
| | | return hasCoupon;
|
| | | }
|
| | |
|
| | |
|
| | | public void setHasCoupon(Integer hasCoupon) {
|
| | | this.hasCoupon = hasCoupon;
|
| | | }
|
| | |
|
| | |
|
| | | public Integer getFreeShipment() {
|
| | | return freeShipment;
|
| | | }
|
| | |
|
| | |
|
| | | public void setFreeShipment(Integer freeShipment) {
|
| | | this.freeShipment = freeShipment;
|
| | | }
|
| | |
|
| | |
|
| | | public Integer getNeedPrepay() {
|
| | | return needPrepay;
|
| | | }
|
| | |
|
| | |
|
| | | public void setNeedPrepay(Integer needPrepay) {
|
| | | this.needPrepay = needPrepay;
|
| | | }
|
| | |
|
| | |
|
| | | public Integer getNpxLevel() {
|
| | | return npxLevel;
|
| | | }
|
| | |
|
| | |
|
| | | public void setNpxLevel(Integer npxLevel) {
|
| | | this.npxLevel = npxLevel;
|
| | | }
|
| | |
|
| | |
|
| | | public Integer getIncludePayRate30() {
|
| | | return includePayRate30;
|
| | | }
|
| | |
|
| | |
|
| | | public void setIncludePayRate30(Integer includePayRate30) {
|
| | | this.includePayRate30 = includePayRate30;
|
| | | }
|
| | |
|
| | |
|
| | | public Integer getIncludeGoodRate() {
|
| | | return includeGoodRate;
|
| | | }
|
| | |
|
| | |
|
| | | public void setIncludeGoodRate(Integer includeGoodRate) {
|
| | | this.includeGoodRate = includeGoodRate;
|
| | | }
|
| | |
|
| | |
|
| | | public Integer getIncludeRfdRate() {
|
| | | return includeRfdRate;
|
| | | }
|
| | |
|
| | |
|
| | | public void setIncludeRfdRate(Integer includeRfdRate) {
|
| | | this.includeRfdRate = includeRfdRate;
|
| | | }
|
| | |
|
| | |
|
| | | public String getLableNames() {
|
| | | return lableNames;
|
| | | }
|
| | |
|
| | |
|
| | | public void setLableNames(String lableNames) {
|
| | | this.lableNames = lableNames;
|
| | | }
|
| | |
|
| | |
|
| | | public String getKey() {
|
| | | return key;
|
| | | }
|
| | |
|
| | |
|
| | | public void setKey(String key) {
|
| | | this.key = key;
|
| | | }
|
| | |
|
| | |
|
| | | public String getClassNameChinese() {
|
| | | return classNameChinese;
|
| | | }
|
| | |
|
| | |
|
| | | public void setClassNameChinese(String classNameChinese) {
|
| | | this.classNameChinese = classNameChinese;
|
| | | }
|
| | |
|
| | |
|
| | | public Double getStartZkPrice() {
|
| | | return startZkPrice;
|
| | | }
|
| | |
|
| | |
|
| | | public void setStartZkPrice(Double startZkPrice) {
|
| | | this.startZkPrice = startZkPrice;
|
| | | }
|
| | |
|
| | |
|
| | | public Double getEndZkPrice() {
|
| | | return endZkPrice;
|
| | | }
|
| | |
|
| | |
|
| | | public void setEndZkPrice(Double endZkPrice) {
|
| | | this.endZkPrice = endZkPrice;
|
| | | }
|
| | |
|
| | |
|
| | | public Integer getMaxPage() {
|
| | | return maxPage;
|
| | | }
|
| | |
|
| | |
|
| | | public void setMaxPage(Integer maxPage) {
|
| | | this.maxPage = maxPage;
|
| | | }
|
| | |
|
| | |
|
| | | public int getGoodsSource() {
|
| | | return goodsSource;
|
| | | }
|
| | |
|
| | |
|
| | | public void setGoodsSource(int goodsSource) {
|
| | | this.goodsSource = goodsSource;
|
| | | }
|
| | |
|
| | |
|
| | | public String getSourceCalss() {
|
| | | return sourceCalss;
|
| | | }
|
| | |
|
| | |
|
| | | public void setSourceCalss(String sourceCalss) {
|
| | | this.sourceCalss = sourceCalss;
|
| | | }
|
| | |
|
| | |
|
| | | public String getSystemCid() {
|
| | | return systemCid;
|
| | | }
|
| | |
|
| | |
|
| | | public void setSystemCid(String systemCid) {
|
| | | this.systemCid = systemCid;
|
| | | }
|
| | |
|
| | |
|
| | | public boolean isCalss9k9() {
|
| | | return calss9k9;
|
| | | }
|
| | |
|
| | |
|
| | | public void setCalss9k9(boolean calss9k9) {
|
| | | this.calss9k9 = calss9k9;
|
| | | }
|
| | |
|
| | |
|
| | | public boolean isFlashSale() {
|
| | | return flashSale;
|
| | | }
|
| | |
|
| | |
|
| | | public void setFlashSale(boolean flashSale) {
|
| | | this.flashSale = flashSale;
|
| | | }
|
| | |
|
| | |
|
| | | public int getStartWeight() {
|
| | | return startWeight;
|
| | | }
|
| | |
|
| | |
|
| | | public void setStartWeight(int startWeight) {
|
| | | this.startWeight = startWeight;
|
| | | }
|
| | |
|
| | |
|
| | | public int getEndWeight() {
|
| | | return endWeight;
|
| | | }
|
| | |
|
| | |
|
| | | public void setEndWeight(int endWeight) {
|
| | | this.endWeight = endWeight;
|
| | | }
|
| | |
|
| | |
|
| | | public AdminUser getAdminUser() {
|
| | | return adminUser;
|
| | | }
|
| | |
|
| | |
|
| | | public void setAdminUser(AdminUser adminUser) {
|
| | | this.adminUser = adminUser;
|
| | | }
|
| | |
|
| | |
|
| | | |
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.quality;
|
| | |
|
| | | import java.io.Serializable;
|
| | | import java.util.Date;
|
| | |
|
| | | import javax.persistence.Column;
|
| | | import javax.persistence.Entity;
|
| | | import javax.persistence.FetchType;
|
| | | import javax.persistence.GeneratedValue;
|
| | | import javax.persistence.GenerationType;
|
| | | import javax.persistence.Id;
|
| | | import javax.persistence.JoinColumn;
|
| | | import javax.persistence.ManyToOne;
|
| | | import javax.persistence.Table;
|
| | |
|
| | | import com.yeshi.fanli.base.entity.admin.AdminUser;
|
| | | import com.yeshi.fanli.base.entity.goods.TaoBaoGoodsBrief;
|
| | |
|
| | | /**
|
| | | * 精选库商品
|
| | | * |
| | | * @author yj
|
| | | *
|
| | | * @date 2018年7月3日
|
| | | */
|
| | | @Entity
|
| | | @Table(name = "yeshi_ec_quality_factory")
|
| | | @org.yeshi.utils.mybatis.Table("yeshi_ec_quality_factory")
|
| | | public class QualityFactory implements Serializable{
|
| | | |
| | | private static final long serialVersionUID = 1L;
|
| | | |
| | | // 人工筛选入库
|
| | | public final static int MODE_MANUAL = 1;
|
| | | // 系统算法 -自动入库
|
| | | public final static int MODE_SYSTEM = 2;
|
| | | // 自动入库
|
| | | public final static int MODE_AUTO = 3;
|
| | | |
| | | // 来源-淘宝
|
| | | public final static int SOURCE_TAOBAO = 1;
|
| | | // 来源-淘宝推荐接口
|
| | | public final static int SOURCE_TAOBAO_MATERIAL = 11;
|
| | | // 来源-淘宝大淘客
|
| | | public final static int SOURCE_TAOBAO_DATAOKE = 12;
|
| | | // 来源-京东
|
| | | public final static int SOURCE_JINGDONG = 2;
|
| | | // 来源-拼多多
|
| | | public final static int SOURCE_PINDUODUO = 3;
|
| | | // 来源-唯品会
|
| | | public final static int SOURCE_WEIPINHUI = 4;
|
| | | // 来源-其他商务合作
|
| | | public final static int SOURCE_OTHER = 5;
|
| | | |
| | | |
| | | @Id
|
| | | @Column(name = "sg_id")
|
| | | @GeneratedValue(strategy = GenerationType.AUTO)
|
| | | @org.yeshi.utils.mybatis.Column(name = "sg_id")
|
| | | private Long id;
|
| | |
|
| | | |
| | | @JoinColumn(name = "sg_class_id")
|
| | | @org.yeshi.utils.mybatis.Column(name = "sg_class_id")
|
| | | private Long systemCid; // 商品类目id
|
| | | |
| | | @ManyToOne(fetch = FetchType.EAGER)
|
| | | @JoinColumn(name = "sg_goods_id")
|
| | | @org.yeshi.utils.mybatis.Column(name = "sg_goods_id")
|
| | | private TaoBaoGoodsBrief taoBaoGoodsBrief;// 商品id
|
| | |
|
| | |
|
| | | @JoinColumn(name = "sg_entry_mode")
|
| | | @org.yeshi.utils.mybatis.Column(name = "sg_entry_mode")
|
| | | private Integer entryMode; // 录入方式
|
| | |
|
| | | @JoinColumn(name = "sg_goods_source")
|
| | | @org.yeshi.utils.mybatis.Column(name = "sg_goods_source")
|
| | | private Integer goodsSource; // 商品来源
|
| | | |
| | | @JoinColumn(name = "sg_source_calss")
|
| | | @org.yeshi.utils.mybatis.Column(name = "sg_source_calss")
|
| | | private String sourceCalss; // 来源具体类目
|
| | | |
| | | @ManyToOne(fetch = FetchType.EAGER)
|
| | | @JoinColumn(name = "sg_rule_id")
|
| | | @org.yeshi.utils.mybatis.Column(name = "sg_rule_id")
|
| | | private BoutiqueAutoRule boutiqueAutoRule; // 录入方式
|
| | |
|
| | | @JoinColumn(name = "sg_weight")
|
| | | @org.yeshi.utils.mybatis.Column(name = "sg_weight")
|
| | | private Integer weight; // 商品权重 -- 排序
|
| | | |
| | | @ManyToOne(fetch = FetchType.EAGER)
|
| | | @JoinColumn(name = "sg_create_aid")
|
| | | @org.yeshi.utils.mybatis.Column(name = "sg_create_aid")
|
| | | private AdminUser createUser; // 创建人
|
| | |
|
| | | @JoinColumn(name = "sg_createtime")
|
| | | @org.yeshi.utils.mybatis.Column(name = "sg_createtime")
|
| | | private Date createtime; // 创建时间
|
| | |
|
| | | @ManyToOne(fetch = FetchType.EAGER)
|
| | | @JoinColumn(name = "sg_update_aid")
|
| | | @org.yeshi.utils.mybatis.Column(name = "sg_update_aid")
|
| | | private AdminUser updateUser; // 修改人
|
| | |
|
| | | @JoinColumn(name = "sg_updatetime")
|
| | | @org.yeshi.utils.mybatis.Column(name = "sg_updatetime")
|
| | | private Date updatetime; // 更新时间
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public TaoBaoGoodsBrief getTaoBaoGoodsBrief() {
|
| | | return taoBaoGoodsBrief;
|
| | | }
|
| | |
|
| | | public void setTaoBaoGoodsBrief(TaoBaoGoodsBrief taoBaoGoodsBrief) {
|
| | | this.taoBaoGoodsBrief = taoBaoGoodsBrief;
|
| | | }
|
| | |
|
| | | public Integer getGoodsSource() {
|
| | | return goodsSource;
|
| | | }
|
| | |
|
| | | public void setGoodsSource(Integer goodsSource) {
|
| | | this.goodsSource = goodsSource;
|
| | | }
|
| | |
|
| | | public Integer getEntryMode() {
|
| | | return entryMode;
|
| | | }
|
| | |
|
| | | public void setEntryMode(Integer entryMode) {
|
| | | this.entryMode = entryMode;
|
| | | }
|
| | |
|
| | | public Integer getWeight() {
|
| | | return weight;
|
| | | }
|
| | |
|
| | | public void setWeight(Integer weight) {
|
| | | this.weight = weight;
|
| | | }
|
| | |
|
| | | public AdminUser getCreateUser() {
|
| | | return createUser;
|
| | | }
|
| | |
|
| | | public void setCreateUser(AdminUser createUser) {
|
| | | this.createUser = createUser;
|
| | | }
|
| | |
|
| | | public Date getCreatetime() {
|
| | | return createtime;
|
| | | }
|
| | |
|
| | | public void setCreatetime(Date createtime) {
|
| | | this.createtime = createtime;
|
| | | }
|
| | |
|
| | | public AdminUser getUpdateUser() {
|
| | | return updateUser;
|
| | | }
|
| | |
|
| | | public void setUpdateUser(AdminUser updateUser) {
|
| | | this.updateUser = updateUser;
|
| | | }
|
| | |
|
| | | public Date getUpdatetime() {
|
| | | return updatetime;
|
| | | }
|
| | |
|
| | | public void setUpdatetime(Date updatetime) {
|
| | | this.updatetime = updatetime;
|
| | | }
|
| | |
|
| | | public Long getSystemCid() {
|
| | | return systemCid;
|
| | | }
|
| | |
|
| | | public void setSystemCid(Long systemCid) {
|
| | | this.systemCid = systemCid;
|
| | | }
|
| | |
|
| | | public String getSourceCalss() {
|
| | | return sourceCalss;
|
| | | }
|
| | |
|
| | | public void setSourceCalss(String sourceCalss) {
|
| | | this.sourceCalss = sourceCalss;
|
| | | }
|
| | |
|
| | | public BoutiqueAutoRule getBoutiqueAutoRule() {
|
| | | return boutiqueAutoRule;
|
| | | }
|
| | |
|
| | | public void setBoutiqueAutoRule(BoutiqueAutoRule boutiqueAutoRule) {
|
| | | this.boutiqueAutoRule = boutiqueAutoRule;
|
| | | }
|
| | | |
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.quality;
|
| | |
|
| | | import java.io.Serializable;
|
| | | import java.util.Date;
|
| | |
|
| | | import javax.persistence.Column;
|
| | | import javax.persistence.Entity;
|
| | | import javax.persistence.FetchType;
|
| | | import javax.persistence.GeneratedValue;
|
| | | import javax.persistence.GenerationType;
|
| | | import javax.persistence.Id;
|
| | | import javax.persistence.JoinColumn;
|
| | | import javax.persistence.ManyToOne;
|
| | | import javax.persistence.Table;
|
| | |
|
| | | /**
|
| | | * 精选库:限时抢购
|
| | | * |
| | | * @author yj
|
| | | *
|
| | | * @date 2018年9月18日
|
| | | */
|
| | | @Entity
|
| | | @Table(name = "yeshi_ec_quality_flash_sale")
|
| | | @org.yeshi.utils.mybatis.Table("yeshi_ec_quality_flash_sale")
|
| | | public class QualityFlashSale implements Serializable{
|
| | | |
| | | /**
|
| | | * |
| | | */
|
| | | private static final long serialVersionUID = 1L;
|
| | |
|
| | | @Id
|
| | | @Column(name = "fs_id")
|
| | | @GeneratedValue(strategy = GenerationType.AUTO)
|
| | | @org.yeshi.utils.mybatis.Column(name = "fs_id")
|
| | | private Long id;
|
| | |
|
| | | @ManyToOne(fetch = FetchType.EAGER)
|
| | | @JoinColumn(name = "fs_qfgoods_id")
|
| | | @org.yeshi.utils.mybatis.Column(name = "fs_qfgoods_id")
|
| | | private QualityFactory qualityFactory; // 精选id
|
| | | |
| | | // 取消数据区分时间段:1(00:00) 2(09:00) 3(12:00) 4(14:00) 5(16:00) 6(20:00) 7(22:00) |
| | | @JoinColumn(name = "fs_type")
|
| | | @org.yeshi.utils.mybatis.Column(name = "fs_type")
|
| | | private Integer type; // 暂停用
|
| | | |
| | | |
| | | @JoinColumn(name = "fs_weight")
|
| | | @org.yeshi.utils.mybatis.Column(name = "fs_weight")
|
| | | private Double weight; // 商品权重 -- 排序
|
| | | |
| | | |
| | | @JoinColumn(name = "fs_createtime")
|
| | | @org.yeshi.utils.mybatis.Column(name = "fs_createtime")
|
| | | private Date createtime; // 创建时间
|
| | | |
| | | @JoinColumn(name = "fs_updatetime")
|
| | | @org.yeshi.utils.mybatis.Column(name = "fs_updatetime")
|
| | | private Date updatetime; // 更新时间
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public QualityFactory getQualityFactory() {
|
| | | return qualityFactory;
|
| | | }
|
| | |
|
| | | public void setQualityFactory(QualityFactory qualityFactory) {
|
| | | this.qualityFactory = qualityFactory;
|
| | | }
|
| | |
|
| | | public Integer geTtype() {
|
| | | return type;
|
| | | }
|
| | |
|
| | | public void setType(Integer periodtime) {
|
| | | this.type = periodtime;
|
| | | }
|
| | |
|
| | | public Date getCreatetime() {
|
| | | return createtime;
|
| | | }
|
| | |
|
| | | public void setCreatetime(Date createtime) {
|
| | | this.createtime = createtime;
|
| | | }
|
| | |
|
| | | public Date getUpdatetime() {
|
| | | return updatetime;
|
| | | }
|
| | |
|
| | | public void setUpdatetime(Date updatetime) {
|
| | | this.updatetime = updatetime;
|
| | | }
|
| | |
|
| | | public Double getWeight() {
|
| | | return weight;
|
| | | }
|
| | |
|
| | | public void setWeight(Double weight) {
|
| | | this.weight = weight;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.recommend;
|
| | |
|
| | | import javax.persistence.Column;
|
| | | import javax.persistence.Entity;
|
| | | import javax.persistence.FetchType;
|
| | | import javax.persistence.GeneratedValue;
|
| | | import javax.persistence.GenerationType;
|
| | | import javax.persistence.Id;
|
| | | import javax.persistence.JoinColumn;
|
| | | import javax.persistence.ManyToOne;
|
| | | import javax.persistence.Table;
|
| | |
|
| | | import org.fanli.facade.goods.entity.clazz.GoodsClass;
|
| | |
|
| | | import com.google.gson.annotations.Expose;
|
| | | import com.yeshi.fanli.base.entity.goods.TaoBaoGoodsBrief;
|
| | |
|
| | | /**
|
| | | * 分类推荐商品
|
| | | * |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | @Entity
|
| | | @Table(name = "yeshi_ec_class_recommendgoods")
|
| | | public class ClassRecommendGoods {
|
| | | @Id
|
| | | @GeneratedValue(strategy = GenerationType.AUTO)
|
| | | @Column(name = "id")
|
| | | @Expose
|
| | | private long id;
|
| | | @ManyToOne(fetch = FetchType.EAGER)
|
| | | @JoinColumn(name = "goodsclass_id")
|
| | | private GoodsClass goodsClass;
|
| | | @ManyToOne(fetch = FetchType.EAGER)
|
| | | @JoinColumn(name = "taobaogoods_id")
|
| | | @Expose
|
| | | private TaoBaoGoodsBrief taoBaoGoodsBrief;
|
| | | @Expose
|
| | | private int orderby;
|
| | | @Expose
|
| | | private long createtime;
|
| | |
|
| | | public ClassRecommendGoods() {
|
| | | // TODO Auto-generated constructor stub
|
| | | }
|
| | | |
| | | public ClassRecommendGoods(long id) {
|
| | | super();
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public ClassRecommendGoods(GoodsClass goodsClass,
|
| | | TaoBaoGoodsBrief taoBaoGoodsBrief, int orderby, long createtime) {
|
| | | super();
|
| | | this.goodsClass = goodsClass;
|
| | | this.taoBaoGoodsBrief = taoBaoGoodsBrief;
|
| | | this.orderby = orderby;
|
| | | this.createtime = createtime;
|
| | | }
|
| | |
|
| | | public long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public GoodsClass getGoodsClass() {
|
| | | return goodsClass;
|
| | | }
|
| | |
|
| | | public void setGoodsClass(GoodsClass goodsClass) {
|
| | | this.goodsClass = goodsClass;
|
| | | }
|
| | |
|
| | | public TaoBaoGoodsBrief getTaoBaoGoodsBrief() {
|
| | | return taoBaoGoodsBrief;
|
| | | }
|
| | |
|
| | | public void setTaoBaoGoodsBrief(TaoBaoGoodsBrief taoBaoGoodsBrief) {
|
| | | this.taoBaoGoodsBrief = taoBaoGoodsBrief;
|
| | | }
|
| | |
|
| | | public int getOrderby() {
|
| | | return orderby;
|
| | | }
|
| | |
|
| | | public void setOrderby(int orderby) {
|
| | | this.orderby = orderby;
|
| | | }
|
| | |
|
| | | public long getCreatetime() {
|
| | | return createtime;
|
| | | }
|
| | |
|
| | | public void setCreatetime(long createtime) {
|
| | | this.createtime = createtime;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.recommend;
|
| | |
|
| | | import java.math.BigDecimal;
|
| | | import java.util.HashSet;
|
| | | import java.util.Set;
|
| | |
|
| | | import javax.persistence.CascadeType;
|
| | | import javax.persistence.Column;
|
| | | import javax.persistence.Entity;
|
| | | import javax.persistence.FetchType;
|
| | | import javax.persistence.GeneratedValue;
|
| | | import javax.persistence.GenerationType;
|
| | | import javax.persistence.Id;
|
| | | import javax.persistence.JoinColumn;
|
| | | import javax.persistence.ManyToOne;
|
| | | import javax.persistence.OneToMany;
|
| | | import javax.persistence.Table;
|
| | | import javax.persistence.Transient;
|
| | |
|
| | | import com.google.gson.annotations.Expose;
|
| | | import com.yeshi.fanli.base.entity.user.UserInfo;
|
| | | @Entity
|
| | | @Table(name="yeshi_ec_dynamic_recommend")
|
| | | public class DynamicRecommend {
|
| | | @Id
|
| | | @GeneratedValue(strategy=GenerationType.AUTO)
|
| | | @Column(name="`id`")
|
| | | @Expose
|
| | | private long id;
|
| | | @JoinColumn(name="`uid`")
|
| | | @ManyToOne(fetch = FetchType.EAGER)
|
| | | @Expose
|
| | | private UserInfo userInfo; //推荐�? |
| | | @Expose
|
| | | @Column(name="`uPicUrl`",length=1024)
|
| | | private String uPicUrl; //用户选择的图�? |
| | | // @Transient
|
| | | @Expose
|
| | | private String gPicUrl; //商品本身的图�? |
| | | // @Transient
|
| | | @Expose
|
| | | private String gname; //商品名称
|
| | | // @Transient
|
| | | @Expose
|
| | | private BigDecimal zkPrice; //价格
|
| | | // @Transient
|
| | | @Expose
|
| | | private BigDecimal hongbao; //红包
|
| | | @Column(name="`reason`",length=1024)
|
| | | @Expose
|
| | | private String reason; //推荐理由
|
| | | @Column(name="`url`",length=1024)
|
| | | @Expose
|
| | | private String url; //商品URL
|
| | | @Expose
|
| | | private long createtime;
|
| | | @Expose
|
| | | private int goodsType; //商品类型 1:淘宝 2:天猫 |
| | | @Expose
|
| | | private int likeCount;
|
| | | @Expose
|
| | | private int replyCount;
|
| | | @Expose
|
| | | private String auctionId; //商品id
|
| | | @OneToMany(fetch=FetchType.EAGER,mappedBy="dynamicRecommend",cascade=CascadeType.ALL)
|
| | | private Set<RecommendLike> likers = new HashSet<RecommendLike>();
|
| | | @Expose
|
| | | @Transient
|
| | | private boolean islike;
|
| | | |
| | | private int type; //0:用户发布 1:后台虚拟发布 |
| | | |
| | | public DynamicRecommend() {
|
| | | // TODO Auto-generated constructor stub
|
| | | }
|
| | | public DynamicRecommend(long id) {
|
| | | super();
|
| | | this.id = id;
|
| | | }
|
| | | public long getId() {
|
| | | return id;
|
| | | }
|
| | | public void setId(long id) {
|
| | | this.id = id;
|
| | | }
|
| | | |
| | | public int getType() {
|
| | | return type;
|
| | | }
|
| | | public void setType(int type) {
|
| | | this.type = type;
|
| | | }
|
| | | public Set<RecommendLike> getLikers() {
|
| | | return likers;
|
| | | }
|
| | | public void setLikers(Set<RecommendLike> likers) {
|
| | | this.likers = likers;
|
| | | }
|
| | | public boolean isIslike() {
|
| | | return islike;
|
| | | }
|
| | | public void setIslike(boolean islike) {
|
| | | this.islike = islike;
|
| | | }
|
| | | public String getAuctionId() {
|
| | | return auctionId;
|
| | | }
|
| | | public void setAuctionId(String auctionId) {
|
| | | this.auctionId = auctionId;
|
| | | }
|
| | | public int getReplyCount() {
|
| | | return replyCount;
|
| | | }
|
| | | public void setReplyCount(int replyCount) {
|
| | | this.replyCount = replyCount;
|
| | | }
|
| | | public int getLikeCount() {
|
| | | return likeCount;
|
| | | }
|
| | | public void setLikeCount(int likeCount) {
|
| | | this.likeCount = likeCount;
|
| | | }
|
| | | public int getGoodsType() {
|
| | | return goodsType;
|
| | | }
|
| | | public void setGoodsType(int goodsType) {
|
| | | this.goodsType = goodsType;
|
| | | }
|
| | | public long getCreatetime() {
|
| | | return createtime;
|
| | | }
|
| | | public void setCreatetime(long createtime) {
|
| | | this.createtime = createtime;
|
| | | }
|
| | | public UserInfo getUserInfo() {
|
| | | return userInfo;
|
| | | }
|
| | | public void setUserInfo(UserInfo userInfo) {
|
| | | this.userInfo = userInfo;
|
| | | }
|
| | | public String getuPicUrl() {
|
| | | return uPicUrl;
|
| | | }
|
| | | public void setuPicUrl(String uPicUrl) {
|
| | | this.uPicUrl = uPicUrl;
|
| | | }
|
| | | public String getgPicUrl() {
|
| | | return gPicUrl;
|
| | | }
|
| | | public void setgPicUrl(String gPicUrl) {
|
| | | this.gPicUrl = gPicUrl;
|
| | | }
|
| | | public String getGname() {
|
| | | return gname;
|
| | | }
|
| | | public void setGname(String gname) {
|
| | | this.gname = gname;
|
| | | }
|
| | | public String getUrl() {
|
| | | return url;
|
| | | }
|
| | | public void setUrl(String url) {
|
| | | this.url = url;
|
| | | }
|
| | | public BigDecimal getZkPrice() {
|
| | | return zkPrice;
|
| | | }
|
| | | public void setZkPrice(BigDecimal zkPrice) {
|
| | | this.zkPrice = zkPrice;
|
| | | }
|
| | | public BigDecimal getHongbao() {
|
| | | return hongbao;
|
| | | }
|
| | | public void setHongbao(BigDecimal hongbao) {
|
| | | this.hongbao = hongbao;
|
| | | }
|
| | | public String getReason() {
|
| | | return reason;
|
| | | }
|
| | | public void setReason(String reason) {
|
| | | this.reason = reason;
|
| | | }
|
| | | @Override
|
| | | public int hashCode() {
|
| | | final int prime = 31;
|
| | | int result = 1;
|
| | | result = prime * result + (int) (id ^ (id >>> 32));
|
| | | return result;
|
| | | }
|
| | | @Override
|
| | | public boolean equals(Object obj) {
|
| | | if (this == obj)
|
| | | return true;
|
| | | if (obj == null)
|
| | | return false;
|
| | | if (getClass() != obj.getClass())
|
| | | return false;
|
| | | DynamicRecommend other = (DynamicRecommend) obj;
|
| | | if (id != other.id)
|
| | | return false;
|
| | | return true;
|
| | | }
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.recommend;
|
| | |
|
| | | import java.io.Serializable;
|
| | |
|
| | | import javax.persistence.Entity;
|
| | | import javax.persistence.GeneratedValue;
|
| | | import javax.persistence.GenerationType;
|
| | | import javax.persistence.Id;
|
| | | import javax.persistence.Table;
|
| | | import javax.persistence.Transient;
|
| | |
|
| | | import org.fanli.facade.system.entity.common.JumpDetail;
|
| | |
|
| | | @Entity
|
| | | @Table(name="yeshi_ec_honest")
|
| | | public class Honest implements Serializable{
|
| | | |
| | | /**
|
| | | * |
| | | */
|
| | | private static final long serialVersionUID = 1L;
|
| | | |
| | | @Id
|
| | | @GeneratedValue(strategy=GenerationType.AUTO)
|
| | | private long id;
|
| | | private String name;
|
| | | private String picture;
|
| | | private String bigImg;
|
| | | private int orderBy;
|
| | | private String url;
|
| | | @Transient
|
| | | private JumpDetail jumpDetail; //璺宠浆璇︽儏
|
| | | @Transient
|
| | | private String params;//鍙傛暟
|
| | |
|
| | | |
| | | public String getParams() {
|
| | | return params;
|
| | | }
|
| | | public void setParams(String params) {
|
| | | this.params = params;
|
| | | }
|
| | | /**
|
| | | * 1锛�9.9
|
| | | * 2:19.9
|
| | | * 3锛氱壒浠峰ソ璐�
|
| | | * 4锛氬垎浜湁绀�
|
| | | */
|
| | | private int type;
|
| | | |
| | | public String getUrl() {
|
| | | return url;
|
| | | }
|
| | | public void setUrl(String url) {
|
| | | this.url = url;
|
| | | }
|
| | | public long getId() {
|
| | | return id;
|
| | | }
|
| | | public void setId(long id) {
|
| | | this.id = id;
|
| | | }
|
| | | |
| | | public String getBigImg() {
|
| | | return bigImg;
|
| | | }
|
| | | public void setBigImg(String bigImg) {
|
| | | this.bigImg = bigImg;
|
| | | }
|
| | | public String getName() {
|
| | | return name;
|
| | | }
|
| | | public void setName(String name) {
|
| | | this.name = name;
|
| | | }
|
| | | public String getPicture() {
|
| | | return picture;
|
| | | }
|
| | | public void setPicture(String picture) {
|
| | | this.picture = picture;
|
| | | }
|
| | | public int getOrderBy() {
|
| | | return orderBy;
|
| | | }
|
| | | public void setOrderBy(int orderBy) {
|
| | | this.orderBy = orderBy;
|
| | | }
|
| | | public int getType() {
|
| | | return type;
|
| | | }
|
| | | public void setType(int type) {
|
| | | this.type = type;
|
| | | }
|
| | | |
| | | |
| | | public JumpDetail getJumpDetail() {
|
| | | return jumpDetail;
|
| | | }
|
| | | public void setJumpDetail(JumpDetail jumpDetail) {
|
| | | this.jumpDetail = jumpDetail;
|
| | | }
|
| | | |
| | | |
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.recommend;
|
| | |
|
| | | import javax.persistence.Column;
|
| | | import javax.persistence.Entity;
|
| | | import javax.persistence.GeneratedValue;
|
| | | import javax.persistence.GenerationType;
|
| | | import javax.persistence.Id;
|
| | | import javax.persistence.Table;
|
| | | @Entity
|
| | | @Table(name="yeshi_ec_mask_key")
|
| | | public class MaskKey {
|
| | | @Id
|
| | | @GeneratedValue(strategy=GenerationType.AUTO)
|
| | | @Column(name="`id`")
|
| | | private long id;
|
| | | private String content;
|
| | | public MaskKey() {
|
| | | |
| | | }
|
| | | |
| | | public MaskKey(String content) {
|
| | | super();
|
| | | this.content = content;
|
| | | }
|
| | |
|
| | |
|
| | | public MaskKey(long id) {
|
| | | super();
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public long getId() {
|
| | | return id;
|
| | | }
|
| | | public void setId(long id) {
|
| | | this.id = id;
|
| | | }
|
| | | public String getContent() {
|
| | | return content;
|
| | | }
|
| | | public void setContent(String content) {
|
| | | this.content = content;
|
| | | }
|
| | | |
| | | |
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.recommend;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import org.fanli.facade.system.entity.common.JumpDetail;
;
|
| | |
|
| | | //推荐Banner
|
| | | @Entity
|
| | | @Table(name = "yeshi_ec_recommend_banner")
|
| | | public class RecommendBanner implements Serializable{
|
| | | /**
|
| | | * |
| | | */
|
| | | private static final long serialVersionUID = 1L;
|
| | | |
| | | @Id
|
| | | @GeneratedValue(strategy = GenerationType.AUTO)
|
| | | @Column(name = "id")
|
| | | private long id;
|
| | | @ManyToOne(fetch = FetchType.EAGER)
|
| | | @JoinColumn(name = "jumpid")
|
| | | private JumpDetail jumpDetail;// 跳转详情
|
| | | @Column(length = 256)
|
| | | private String params;// 跳转参数
|
| | | @Column(length = 256)
|
| | | private String picture;// 图片链接
|
| | | private long createtime;
|
| | | private int orderby;// 值越小越�? |
| | | @Column(name = "`show`")
|
| | | private boolean show;// 是否显示
|
| | | private String name;
|
| | |
|
| | | public RecommendBanner() {
|
| | | }
|
| | | |
| | | public RecommendBanner(JumpDetail jumpDetail, String params,
|
| | | String picture, long createtime, int orderby, boolean show) {
|
| | | super();
|
| | | this.jumpDetail = jumpDetail;
|
| | | this.params = params;
|
| | | this.picture = picture;
|
| | | this.createtime = createtime;
|
| | | this.orderby = orderby;
|
| | | this.show = show;
|
| | | }
|
| | |
|
| | | public String getName() {
|
| | | return name;
|
| | | }
|
| | |
|
| | | public void setName(String name) {
|
| | | this.name = name;
|
| | | }
|
| | |
|
| | | public boolean isShow() {
|
| | | return show;
|
| | | }
|
| | |
|
| | | public void setShow(boolean show) {
|
| | | this.show = show;
|
| | | }
|
| | |
|
| | | public long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public JumpDetail getJumpDetail() {
|
| | | return jumpDetail;
|
| | | }
|
| | |
|
| | | public void setJumpDetail(JumpDetail jumpDetail) {
|
| | | this.jumpDetail = jumpDetail;
|
| | | }
|
| | |
|
| | | public String getParams() {
|
| | | return params;
|
| | | }
|
| | |
|
| | | public void setParams(String params) {
|
| | | this.params = params;
|
| | | }
|
| | |
|
| | | public String getPicture() {
|
| | | return picture;
|
| | | }
|
| | |
|
| | | public void setPicture(String picture) {
|
| | | this.picture = picture;
|
| | | }
|
| | |
|
| | | public long getCreatetime() {
|
| | | return createtime;
|
| | | }
|
| | |
|
| | | public void setCreatetime(long createtime) {
|
| | | this.createtime = createtime;
|
| | | }
|
| | |
|
| | | public int getOrderby() {
|
| | | return orderby;
|
| | | }
|
| | |
|
| | | public void setOrderby(int orderby) {
|
| | | this.orderby = orderby;
|
| | | }
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.recommend;
|
| | |
|
| | | import java.io.Serializable;
|
| | |
|
| | | import javax.persistence.Column;
|
| | | import javax.persistence.Entity;
|
| | | import javax.persistence.FetchType;
|
| | | import javax.persistence.GeneratedValue;
|
| | | import javax.persistence.GenerationType;
|
| | | import javax.persistence.Id;
|
| | | import javax.persistence.JoinColumn;
|
| | | import javax.persistence.ManyToOne;
|
| | | import javax.persistence.Table;
|
| | |
|
| | | import org.fanli.facade.system.entity.common.JumpDetailV2;
|
| | |
|
| | | //推荐Banner v.2
|
| | | @Entity
|
| | | @Table(name = "yeshi_ec_recommend_banner_v2")
|
| | | public class RecommendBannerV2 implements Serializable{
|
| | | /**
|
| | | * |
| | | */
|
| | | private static final long serialVersionUID = 1L;
|
| | | |
| | | @Id
|
| | | @GeneratedValue(strategy = GenerationType.AUTO)
|
| | | @Column(name = "id")
|
| | | private long id;
|
| | | |
| | | @Column(name = "`name`")
|
| | | private String name;
|
| | | |
| | | @Column(name = "`picture`",length = 256)
|
| | | private String picture;// 图片链接
|
| | | |
| | | @ManyToOne(fetch = FetchType.EAGER)
|
| | | @JoinColumn(name = "jumpid")
|
| | | private JumpDetailV2 jumpDetail;// 跳转详情
|
| | | |
| | | @Column(name = "`params`",length = 256)
|
| | | private String params;// 跳转参数
|
| | | |
| | | @Column(name = "`createtime`")
|
| | | private long createtime;
|
| | | |
| | | @Column(name = "`orderby`")
|
| | | private int orderby;// 值越小越�?
|
| | | |
| | | @Column(name = "`show`")
|
| | | private boolean show;// 是否显示
|
| | | |
| | | |
| | |
|
| | | public RecommendBannerV2() {}
|
| | | |
| | | |
| | | public RecommendBannerV2(JumpDetailV2 jumpDetail, String params,
|
| | | String picture, long createtime, int orderby, boolean show) {
|
| | | super();
|
| | | this.jumpDetail = jumpDetail;
|
| | | this.params = params;
|
| | | this.picture = picture;
|
| | | this.createtime = createtime;
|
| | | this.orderby = orderby;
|
| | | this.show = show;
|
| | | }
|
| | |
|
| | | public String getName() {
|
| | | return name;
|
| | | }
|
| | |
|
| | | public void setName(String name) {
|
| | | this.name = name;
|
| | | }
|
| | |
|
| | | public boolean isShow() {
|
| | | return show;
|
| | | }
|
| | |
|
| | | public void setShow(boolean show) {
|
| | | this.show = show;
|
| | | }
|
| | |
|
| | | public long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public JumpDetailV2 getJumpDetail() {
|
| | | return jumpDetail;
|
| | | }
|
| | |
|
| | | public void setJumpDetail(JumpDetailV2 jumpDetail) {
|
| | | this.jumpDetail = jumpDetail;
|
| | | }
|
| | |
|
| | | public String getParams() {
|
| | | return params;
|
| | | }
|
| | |
|
| | | public void setParams(String params) {
|
| | | this.params = params;
|
| | | }
|
| | |
|
| | | public String getPicture() {
|
| | | return picture;
|
| | | }
|
| | |
|
| | | public void setPicture(String picture) {
|
| | | this.picture = picture;
|
| | | }
|
| | |
|
| | | public long getCreatetime() {
|
| | | return createtime;
|
| | | }
|
| | |
|
| | | public void setCreatetime(long createtime) {
|
| | | this.createtime = createtime;
|
| | | }
|
| | |
|
| | | public int getOrderby() {
|
| | | return orderby;
|
| | | }
|
| | |
|
| | | public void setOrderby(int orderby) {
|
| | | this.orderby = orderby;
|
| | | }
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.recommend;
|
| | |
|
| | | import java.util.ArrayList;
|
| | | import java.util.List;
|
| | |
|
| | | import javax.persistence.CascadeType;
|
| | | import javax.persistence.Column;
|
| | | import javax.persistence.Entity;
|
| | | import javax.persistence.FetchType;
|
| | | import javax.persistence.GeneratedValue;
|
| | | import javax.persistence.GenerationType;
|
| | | import javax.persistence.Id;
|
| | | import javax.persistence.JoinColumn;
|
| | | import javax.persistence.JoinTable;
|
| | | import javax.persistence.ManyToMany;
|
| | | import javax.persistence.OneToMany;
|
| | | import javax.persistence.OneToOne;
|
| | | import javax.persistence.Table;
|
| | | import javax.persistence.Transient;
|
| | | import javax.persistence.UniqueConstraint;
|
| | |
|
| | | import org.hibernate.annotations.Type;
|
| | |
|
| | | import com.google.gson.annotations.Expose;
|
| | | import com.yeshi.fanli.base.entity.user.UserInfo;
|
| | | /**
|
| | | * 推荐的详 |
| | | * @author ChenX
|
| | | *
|
| | | */
|
| | | @Entity
|
| | | @Table(name="yeshi_ec_recommend_details")
|
| | | public class RecommendDetails {
|
| | | @Id
|
| | | @GeneratedValue(strategy=GenerationType.AUTO)
|
| | | @Column(name="id")
|
| | | @Type(type="long")
|
| | | @Expose
|
| | | private long id;
|
| | | @OneToOne(fetch=FetchType.EAGER,cascade=CascadeType.REMOVE)
|
| | | @JoinColumn(name="`dr_id`")
|
| | | @Expose
|
| | | private DynamicRecommend dynamicRecommend; //对应的动态推 |
| | | @Expose
|
| | | private int goodCount; |
| | | @Expose
|
| | | private int badCount; |
| | | |
| | | @ManyToMany(fetch=FetchType.EAGER)
|
| | | @JoinTable(name="yeshi_ec_recommend_details_voteuid",joinColumns={@JoinColumn(name="did")},inverseJoinColumns={@JoinColumn(name="uid")},uniqueConstraints={@UniqueConstraint(columnNames={"did","uid"})})
|
| | | private List<UserInfo> voteUserInfos = new ArrayList<UserInfo>(); //投过值或不的用 |
| | | @Expose
|
| | | @OneToMany(mappedBy="recommendDetails",fetch=FetchType.LAZY,cascade=CascadeType.REMOVE)
|
| | | private List<RecommendReply> recommendReplys = new ArrayList<RecommendReply>(); //推荐的回 |
| | | @Expose
|
| | | @Transient
|
| | | private boolean isVote;
|
| | | |
| | | public RecommendDetails() {
|
| | | }
|
| | | |
| | | public RecommendDetails(long id) {
|
| | | super();
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public long getId() {
|
| | | return id;
|
| | | }
|
| | | public void setId(long id) {
|
| | | this.id = id;
|
| | | }
|
| | | |
| | | public List<UserInfo> getVoteUserInfos() {
|
| | | return voteUserInfos;
|
| | | }
|
| | |
|
| | | public void setVoteUserInfos(List<UserInfo> voteUserInfos) {
|
| | | this.voteUserInfos = voteUserInfos;
|
| | | }
|
| | |
|
| | | public List<RecommendReply> getRecommendReplys() {
|
| | | return recommendReplys;
|
| | | }
|
| | |
|
| | | public void setRecommendReplys(List<RecommendReply> recommendReplys) {
|
| | | this.recommendReplys = recommendReplys;
|
| | | }
|
| | |
|
| | | public boolean isVote() {
|
| | | return isVote;
|
| | | }
|
| | | public void setVote(boolean isVote) {
|
| | | this.isVote = isVote;
|
| | | }
|
| | | public DynamicRecommend getDynamicRecommend() {
|
| | | return dynamicRecommend;
|
| | | }
|
| | | public void setDynamicRecommend(DynamicRecommend dynamicRecommend) {
|
| | | this.dynamicRecommend = dynamicRecommend;
|
| | | }
|
| | | public int getGoodCount() {
|
| | | return goodCount;
|
| | | }
|
| | | public void setGoodCount(int goodCount) {
|
| | | this.goodCount = goodCount;
|
| | | }
|
| | | public int getBadCount() {
|
| | | return badCount;
|
| | | }
|
| | | public void setBadCount(int badCount) {
|
| | | this.badCount = badCount;
|
| | | }
|
| | | |
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.recommend;
|
| | |
|
| | | import javax.persistence.Entity;
|
| | | import javax.persistence.FetchType;
|
| | | import javax.persistence.GeneratedValue;
|
| | | import javax.persistence.GenerationType;
|
| | | import javax.persistence.Id;
|
| | | import javax.persistence.JoinColumn;
|
| | | import javax.persistence.ManyToOne;
|
| | | import javax.persistence.Table;
|
| | |
|
| | | import com.yeshi.fanli.base.entity.user.UserInfo;
|
| | | @Entity
|
| | | @Table(name="yeshi_ec_dynamic_recommend_like")
|
| | | public class RecommendLike {
|
| | | @Id
|
| | | @GeneratedValue(strategy=GenerationType.AUTO)
|
| | | private long id;
|
| | | @ManyToOne
|
| | | @JoinColumn(name="uid")
|
| | | private UserInfo userInfo;
|
| | | |
| | | @JoinColumn(name="dr_id")
|
| | | @ManyToOne(fetch=FetchType.EAGER)
|
| | | private DynamicRecommend dynamicRecommend;
|
| | | |
| | | private long createtime;
|
| | | |
| | | public RecommendLike() {
|
| | | // TODO Auto-generated constructor stub
|
| | | }
|
| | | |
| | | public RecommendLike(UserInfo userInfo, DynamicRecommend dynamicRecommend) {
|
| | | super();
|
| | | this.userInfo = userInfo;
|
| | | this.dynamicRecommend = dynamicRecommend;
|
| | | }
|
| | |
|
| | | public long getId() {
|
| | | return id;
|
| | | }
|
| | | public void setId(long id) {
|
| | | this.id = id;
|
| | | }
|
| | | public UserInfo getUserInfo() {
|
| | | return userInfo;
|
| | | }
|
| | | public void setUserInfo(UserInfo userInfo) {
|
| | | this.userInfo = userInfo;
|
| | | }
|
| | | public DynamicRecommend getDynamicRecommend() {
|
| | | return dynamicRecommend;
|
| | | }
|
| | | public void setDynamicRecommend(DynamicRecommend dynamicRecommend) {
|
| | | this.dynamicRecommend = dynamicRecommend;
|
| | | }
|
| | | public long getCreatetime() {
|
| | | return createtime;
|
| | | }
|
| | | public void setCreatetime(long createtime) {
|
| | | this.createtime = createtime;
|
| | | }
|
| | | @Override
|
| | | public int hashCode() {
|
| | | final int prime = 31;
|
| | | int result = 1;
|
| | | result = prime
|
| | | * result
|
| | | + ((dynamicRecommend == null) ? 0 : dynamicRecommend.hashCode());
|
| | | result = prime * result
|
| | | + ((userInfo == null) ? 0 : userInfo.hashCode());
|
| | | return result;
|
| | | }
|
| | | @Override
|
| | | public boolean equals(Object obj) {
|
| | | if (this == obj)
|
| | | return true;
|
| | | if (obj == null)
|
| | | return false;
|
| | | if (getClass() != obj.getClass())
|
| | | return false;
|
| | | RecommendLike other = (RecommendLike) obj;
|
| | | if (dynamicRecommend == null) {
|
| | | if (other.dynamicRecommend != null)
|
| | | return false;
|
| | | } else if (!dynamicRecommend.equals(other.dynamicRecommend))
|
| | | return false;
|
| | | if (userInfo == null) {
|
| | | if (other.userInfo != null)
|
| | | return false;
|
| | | } else if (!userInfo.equals(other.userInfo))
|
| | | return false;
|
| | | return true;
|
| | | }
|
| | | |
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.recommend;
|
| | |
|
| | | import java.util.HashSet;
|
| | | import java.util.Set;
|
| | |
|
| | | import javax.persistence.CascadeType;
|
| | | import javax.persistence.Column;
|
| | | import javax.persistence.Entity;
|
| | | import javax.persistence.FetchType;
|
| | | import javax.persistence.GeneratedValue;
|
| | | import javax.persistence.GenerationType;
|
| | | import javax.persistence.Id;
|
| | | import javax.persistence.JoinColumn;
|
| | | import javax.persistence.JoinTable;
|
| | | import javax.persistence.ManyToMany;
|
| | | import javax.persistence.ManyToOne;
|
| | | import javax.persistence.OneToMany;
|
| | | import javax.persistence.Table;
|
| | | import javax.persistence.Transient;
|
| | | import javax.persistence.UniqueConstraint;
|
| | |
|
| | | import com.google.gson.annotations.Expose;
|
| | | import com.yeshi.fanli.base.entity.user.UserInfo;
|
| | |
|
| | | /**
|
| | | * 推荐回复
|
| | | * @author ChenX
|
| | | *
|
| | | */
|
| | | /**
|
| | | * @author ChenX
|
| | | *
|
| | | */
|
| | | @Entity
|
| | | @Table(name="yeshi_ec_recommend_reply")
|
| | | public class RecommendReply {
|
| | | @Id
|
| | | @GeneratedValue(strategy=GenerationType.AUTO)
|
| | | @Expose
|
| | | private long id;
|
| | | @Expose
|
| | | @ManyToOne(fetch = FetchType.EAGER)
|
| | | @JoinColumn(name="`replier`")
|
| | | private UserInfo replier; //回复人 |
| | | @Expose
|
| | | private long replyTime; //回复时间
|
| | | @Expose
|
| | | @Column(name="`content`",length=1024)
|
| | | private String content; //回复内容
|
| | | |
| | | @Column(name="zan_count")
|
| | | private int zanCount; //点赞数量
|
| | | |
| | | @ManyToOne(fetch = FetchType.EAGER)
|
| | | @JoinColumn(name="rd_id")
|
| | | private RecommendDetails recommendDetails;
|
| | | |
| | | @ManyToMany(fetch=FetchType.LAZY)
|
| | | @JoinTable(name="yeshi_ec_recommend_replys_u_zan",joinColumns={@JoinColumn(name="rid")},inverseJoinColumns={@JoinColumn(name="uid")},uniqueConstraints={@UniqueConstraint(columnNames={"rid","uid"})})
|
| | | private Set<UserInfo> zanUserInfos = new HashSet<UserInfo>(); //点过赞的用户
|
| | | |
| | | @OneToMany(fetch=FetchType.EAGER,cascade=CascadeType.REMOVE)
|
| | | @JoinTable(name="yeshi_ec_recommend_replys_replys",joinColumns={@JoinColumn(name="rid")},inverseJoinColumns={@JoinColumn(name="r_rid")},uniqueConstraints={@UniqueConstraint(columnNames={"rid","r_rid"})})
|
| | | private Set<RecommendReply> recommendReplys=new HashSet<RecommendReply>();
|
| | | |
| | | @Transient
|
| | | private boolean isZan;
|
| | | |
| | | public RecommendReply() {
|
| | | |
| | | }
|
| | | |
| | | public RecommendReply(long id) {
|
| | | super();
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public RecommendDetails getRecommendDetails() {
|
| | | return recommendDetails;
|
| | | }
|
| | |
|
| | | public void setRecommendDetails(RecommendDetails recommendDetails) {
|
| | | this.recommendDetails = recommendDetails;
|
| | | }
|
| | |
|
| | | public void setId(long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public UserInfo getReplier() {
|
| | | return replier;
|
| | | }
|
| | |
|
| | | public void setReplier(UserInfo replier) {
|
| | | this.replier = replier;
|
| | | }
|
| | | |
| | | public boolean isZan() {
|
| | | return isZan;
|
| | | }
|
| | |
|
| | | public void setZan(boolean isZan) {
|
| | | this.isZan = isZan;
|
| | | }
|
| | |
|
| | | public long getReplyTime() {
|
| | | return replyTime;
|
| | | }
|
| | |
|
| | | public void setReplyTime(long replyTime) {
|
| | | this.replyTime = replyTime;
|
| | | }
|
| | |
|
| | | public String getContent() {
|
| | | return content;
|
| | | }
|
| | |
|
| | | public void setContent(String content) {
|
| | | this.content = content;
|
| | | }
|
| | |
|
| | | public int getZanCount() {
|
| | | return zanCount;
|
| | | }
|
| | |
|
| | | public void setZanCount(int zanCount) {
|
| | | this.zanCount = zanCount;
|
| | | }
|
| | |
|
| | | public Set<UserInfo> getZanUserInfos() {
|
| | | return zanUserInfos;
|
| | | }
|
| | |
|
| | | public void setZanUserInfos(Set<UserInfo> zanUserInfos) {
|
| | | this.zanUserInfos = zanUserInfos;
|
| | | }
|
| | |
|
| | | public Set<RecommendReply> getRecommendReplys() {
|
| | | return recommendReplys;
|
| | | }
|
| | |
|
| | | public void setRecommendReplys(Set<RecommendReply> recommendReplys) {
|
| | | this.recommendReplys = recommendReplys;
|
| | | }
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.recommend;
|
| | |
|
| | | import java.io.Serializable;
|
| | |
|
| | | import javax.persistence.Column;
|
| | | import javax.persistence.Entity;
|
| | | import javax.persistence.GeneratedValue;
|
| | | import javax.persistence.GenerationType;
|
| | | import javax.persistence.Id;
|
| | | import javax.persistence.Table;
|
| | |
|
| | | import com.google.gson.annotations.Expose;
|
| | |
|
| | | /**
|
| | | * 推荐版块
|
| | | * |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | @Entity
|
| | | @Table(name = "yeshi_ec_recommend_section")
|
| | | public class RecommendSection implements Serializable{
|
| | | /**
|
| | | * |
| | | */
|
| | | private static final long serialVersionUID = 1L;
|
| | | |
| | | @Id
|
| | | @GeneratedValue(strategy = GenerationType.AUTO)
|
| | | @Column(name = "id")
|
| | | private long id;
|
| | | @Expose
|
| | | @Column(name = "`name`", length = 50)
|
| | | private String name;
|
| | | private int orderby;
|
| | | @Column(name = "`show`")
|
| | | private boolean show;// 是否显示
|
| | | private long createtime;
|
| | | @Expose
|
| | | private int counts;
|
| | |
|
| | | @Expose
|
| | | private String picUrl;
|
| | | @Expose
|
| | | private String jumpUrl;
|
| | | |
| | | public RecommendSection() {
|
| | | // TODO Auto-generated constructor stub
|
| | | }
|
| | | |
| | | public RecommendSection(long id) {
|
| | | super();
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public RecommendSection(String name, int orderby, boolean show,
|
| | | long createtime, int counts) {
|
| | | super();
|
| | | this.name = name;
|
| | | this.orderby = orderby;
|
| | | this.show = show;
|
| | | this.createtime = createtime;
|
| | | this.counts = counts;
|
| | | }
|
| | | |
| | | public String getPicUrl() {
|
| | | return picUrl;
|
| | | }
|
| | |
|
| | | public void setPicUrl(String picUrl) {
|
| | | this.picUrl = picUrl;
|
| | | }
|
| | |
|
| | | public String getJumpUrl() {
|
| | | return jumpUrl;
|
| | | }
|
| | |
|
| | | public void setJumpUrl(String jumpUrl) {
|
| | | this.jumpUrl = jumpUrl;
|
| | | }
|
| | |
|
| | | public int getCounts() {
|
| | | return counts;
|
| | | }
|
| | |
|
| | | public void setCounts(int counts) {
|
| | | this.counts = counts;
|
| | | }
|
| | |
|
| | | public long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public String getName() {
|
| | | return name;
|
| | | }
|
| | |
|
| | | public void setName(String name) {
|
| | | this.name = name;
|
| | | }
|
| | |
|
| | | public int getOrderby() {
|
| | | return orderby;
|
| | | }
|
| | |
|
| | | public void setOrderby(int orderby) {
|
| | | this.orderby = orderby;
|
| | | }
|
| | |
|
| | | public boolean isShow() {
|
| | | return show;
|
| | | }
|
| | |
|
| | | public void setShow(boolean show) {
|
| | | this.show = show;
|
| | | }
|
| | |
|
| | | public long getCreatetime() {
|
| | | return createtime;
|
| | | }
|
| | |
|
| | | public void setCreatetime(long createtime) {
|
| | | this.createtime = createtime;
|
| | | }
|
| | |
|
| | | @Override
|
| | | public int hashCode() {
|
| | | final int prime = 31;
|
| | | int result = 1;
|
| | | result = prime * result + (int) (id ^ (id >>> 32));
|
| | | return result;
|
| | | }
|
| | |
|
| | | @Override
|
| | | public boolean equals(Object obj) {
|
| | | if (this == obj)
|
| | | return true;
|
| | | if (obj == null)
|
| | | return false;
|
| | | if (getClass() != obj.getClass())
|
| | | return false;
|
| | | RecommendSection other = (RecommendSection) obj;
|
| | | if (id != other.id)
|
| | | return false;
|
| | | return true;
|
| | | }
|
| | | |
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.recommend;
|
| | |
|
| | | import javax.persistence.Column;
|
| | | import javax.persistence.Entity;
|
| | | import javax.persistence.GeneratedValue;
|
| | | import javax.persistence.GenerationType;
|
| | | import javax.persistence.Id;
|
| | | import javax.persistence.JoinColumn;
|
| | | import javax.persistence.OneToOne;
|
| | | import javax.persistence.Table;
|
| | |
|
| | | @Entity
|
| | | @Table(name = "yeshi_ec_recommend_section_detail")
|
| | | public class RecommendSectionDetail {
|
| | | |
| | | @Id
|
| | | @GeneratedValue(strategy = GenerationType.AUTO)
|
| | | @Column(name = "id")
|
| | | private long id;
|
| | | |
| | | @OneToOne
|
| | | @JoinColumn(name="rs_id")
|
| | | private RecommendSection recommendSection;
|
| | | |
| | | @Column(name="pic_url")
|
| | | private String picUrl;
|
| | | |
| | | @Column(name="html_code")
|
| | | private String htmlCode;
|
| | |
|
| | | public long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public RecommendSection getRecommendSection() {
|
| | | return recommendSection;
|
| | | }
|
| | |
|
| | | public void setRecommendSection(RecommendSection recommendSection) {
|
| | | this.recommendSection = recommendSection;
|
| | | }
|
| | |
|
| | | public String getPicUrl() {
|
| | | return picUrl;
|
| | | }
|
| | |
|
| | | public void setPicUrl(String picUrl) {
|
| | | this.picUrl = picUrl;
|
| | | }
|
| | |
|
| | | public String getHtmlCode() {
|
| | | return htmlCode;
|
| | | }
|
| | |
|
| | | public void setHtmlCode(String htmlCode) {
|
| | | this.htmlCode = htmlCode;
|
| | | }
|
| | | |
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.recommend;
|
| | |
|
| | | import javax.persistence.Column;
|
| | | import javax.persistence.Entity;
|
| | | import javax.persistence.FetchType;
|
| | | import javax.persistence.GeneratedValue;
|
| | | import javax.persistence.GenerationType;
|
| | | import javax.persistence.Id;
|
| | | import javax.persistence.JoinColumn;
|
| | | import javax.persistence.ManyToOne;
|
| | | import javax.persistence.Table;
|
| | |
|
| | | import com.google.gson.annotations.Expose;
|
| | | import com.yeshi.fanli.base.entity.goods.TaoBaoGoodsBrief;
|
| | |
|
| | | /**
|
| | | * 推荐版块商品
|
| | | * |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | @Entity
|
| | | @Table(name = "yeshi_ec_recommend_section_goods")
|
| | | public class RecommendSectionGoods {
|
| | | @Id
|
| | | @GeneratedValue(strategy = GenerationType.AUTO)
|
| | | @Column(name = "id")
|
| | | @Expose
|
| | | private long id;
|
| | | |
| | | @ManyToOne(fetch = FetchType.EAGER)
|
| | | @JoinColumn(name = "goodsid")
|
| | | @Expose
|
| | | private TaoBaoGoodsBrief taoBaoGoodsBrief;
|
| | | |
| | | @ManyToOne(fetch = FetchType.EAGER)
|
| | | @JoinColumn(name = "recommend_section_id")
|
| | | private RecommendSection recommendSection;
|
| | | |
| | | @Expose
|
| | | private long createtime;// 创建时间
|
| | | |
| | | @Expose
|
| | | private int orderby;// 排序�? |
| | |
|
| | | public RecommendSectionGoods() {
|
| | | }
|
| | | |
| | | public RecommendSectionGoods(long id) {
|
| | | super();
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public RecommendSectionGoods(TaoBaoGoodsBrief taoBaoGoodsBrief,
|
| | | RecommendSection recommendSection, long createtime, int orderby) {
|
| | | super();
|
| | | this.taoBaoGoodsBrief = taoBaoGoodsBrief;
|
| | | this.recommendSection = recommendSection;
|
| | | this.createtime = createtime;
|
| | | this.orderby = orderby;
|
| | | }
|
| | |
|
| | | public long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public TaoBaoGoodsBrief getTaoBaoGoodsBrief() {
|
| | | return taoBaoGoodsBrief;
|
| | | }
|
| | |
|
| | | public void setTaoBaoGoodsBrief(TaoBaoGoodsBrief taoBaoGoodsBrief) {
|
| | | this.taoBaoGoodsBrief = taoBaoGoodsBrief;
|
| | | }
|
| | |
|
| | | public RecommendSection getRecommendSection() {
|
| | | return recommendSection;
|
| | | }
|
| | |
|
| | | public void setRecommendSection(RecommendSection recommendSection) {
|
| | | this.recommendSection = recommendSection;
|
| | | }
|
| | |
|
| | | public long getCreatetime() {
|
| | | return createtime;
|
| | | }
|
| | |
|
| | | public void setCreatetime(long createtime) {
|
| | | this.createtime = createtime;
|
| | | }
|
| | |
|
| | | public int getOrderby() {
|
| | | return orderby;
|
| | | }
|
| | |
|
| | | public void setOrderby(int orderby) {
|
| | | this.orderby = orderby;
|
| | | }
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.recommend;
|
| | |
|
| | | import java.io.Serializable;
|
| | |
|
| | | import javax.persistence.Column;
|
| | | import javax.persistence.Entity;
|
| | | import javax.persistence.FetchType;
|
| | | import javax.persistence.GeneratedValue;
|
| | | import javax.persistence.GenerationType;
|
| | | import javax.persistence.Id;
|
| | | import javax.persistence.JoinColumn;
|
| | | import javax.persistence.ManyToOne;
|
| | | import javax.persistence.Table;
|
| | |
|
| | | import org.fanli.facade.system.entity.common.JumpDetail;
|
| | |
|
| | |
|
| | | /**
|
| | | * 推荐专题
|
| | | * |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | @Entity
|
| | | @Table(name = "yeshi_ec_recommend_special")
|
| | | public class RecommendSpecial implements Serializable{
|
| | | /**
|
| | | * |
| | | */
|
| | | private static final long serialVersionUID = 1L;
|
| | | |
| | | @Id
|
| | | @GeneratedValue(strategy = GenerationType.AUTO)
|
| | | @Column(name = "id")
|
| | | private long id;
|
| | | @Column(length = 256)
|
| | | private String picture;
|
| | | @Column(name = "`name`", length = 50)
|
| | | private String name;
|
| | | @Column(name = "`tag`", length = 50)
|
| | | private String tag;
|
| | | private int orderby;
|
| | | @ManyToOne(fetch = FetchType.EAGER)
|
| | | @JoinColumn(name = "jumpid")
|
| | | private JumpDetail jumpDetail;// 跳转详情
|
| | | @Column(name = "`params`", length = 128)
|
| | | private String params;
|
| | | @Column(name = "`show`")
|
| | | private boolean show;
|
| | | private long createtime;
|
| | | |
| | | public RecommendSpecial() {
|
| | | // TODO Auto-generated constructor stub
|
| | | }
|
| | | |
| | | public RecommendSpecial(long id) {
|
| | | super();
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public RecommendSpecial(String picture, String name, String tag,
|
| | | int orderby, JumpDetail jumpDetail, String params, boolean show,
|
| | | long createtime) {
|
| | | super();
|
| | | this.picture = picture;
|
| | | this.name = name;
|
| | | this.tag = tag;
|
| | | this.orderby = orderby;
|
| | | this.jumpDetail = jumpDetail;
|
| | | this.params = params;
|
| | | this.show = show;
|
| | | this.createtime = createtime;
|
| | | }
|
| | |
|
| | | public long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public String getPicture() {
|
| | | return picture;
|
| | | }
|
| | |
|
| | | public void setPicture(String picture) {
|
| | | this.picture = picture;
|
| | | }
|
| | |
|
| | | public String getName() {
|
| | | return name;
|
| | | }
|
| | |
|
| | | public void setName(String name) {
|
| | | this.name = name;
|
| | | }
|
| | |
|
| | | public String getTag() {
|
| | | return tag;
|
| | | }
|
| | |
|
| | | public void setTag(String tag) {
|
| | | this.tag = tag;
|
| | | }
|
| | |
|
| | | public int getOrderby() {
|
| | | return orderby;
|
| | | }
|
| | |
|
| | | public void setOrderby(int orderby) {
|
| | | this.orderby = orderby;
|
| | | }
|
| | |
|
| | | public JumpDetail getJumpDetail() {
|
| | | return jumpDetail;
|
| | | }
|
| | |
|
| | | public void setJumpDetail(JumpDetail jumpDetail) {
|
| | | this.jumpDetail = jumpDetail;
|
| | | }
|
| | |
|
| | | public String getParams() {
|
| | | return params;
|
| | | }
|
| | |
|
| | | public void setParams(String params) {
|
| | | this.params = params;
|
| | | }
|
| | |
|
| | | public boolean isShow() {
|
| | | return show;
|
| | | }
|
| | |
|
| | | public void setShow(boolean show) {
|
| | | this.show = show;
|
| | | }
|
| | |
|
| | | public long getCreatetime() {
|
| | | return createtime;
|
| | | }
|
| | |
|
| | | public void setCreatetime(long createtime) {
|
| | | this.createtime = createtime;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.recommend;
|
| | |
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | |
|
| | | import org.yeshi.utils.mybatis.Column;
|
| | | import org.yeshi.utils.mybatis.Table;
|
| | |
|
| | | import com.yeshi.fanli.base.entity.goods.CommonGoods;
|
| | | import com.yeshi.fanli.base.entity.user.UserInfo;
|
| | |
|
| | | /*
|
| | | * 用户商品推荐
|
| | | */
|
| | | @Table("yeshi_ec_recommend_user_goods")
|
| | | public class RecommendUserGoods {
|
| | | @Column(name = "rug_id")
|
| | | private Long id;
|
| | | @Column(name = "rug_uid")
|
| | | private UserInfo user;
|
| | | @Column(name = "rug_recommend_desc")
|
| | | private String recommendDesc;
|
| | | @Column(name = "rug_create_time")
|
| | | private Date createTime;
|
| | | @Column(name = "rug_update_time")
|
| | | private Date updateTime;
|
| | | private List<CommonGoods> goodsList;
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public List<CommonGoods> getGoodsList() {
|
| | | return goodsList;
|
| | | }
|
| | |
|
| | | public void setGoodsList(List<CommonGoods> goodsList) {
|
| | | this.goodsList = goodsList;
|
| | | }
|
| | |
|
| | | public UserInfo getUser() {
|
| | | return user;
|
| | | }
|
| | |
|
| | | public void setUser(UserInfo user) {
|
| | | this.user = user;
|
| | | }
|
| | |
|
| | | public String getRecommendDesc() {
|
| | | return recommendDesc;
|
| | | }
|
| | |
|
| | | public void setRecommendDesc(String recommendDesc) {
|
| | | this.recommendDesc = recommendDesc;
|
| | | }
|
| | |
|
| | | public Date getCreateTime() {
|
| | | return createTime;
|
| | | }
|
| | |
|
| | | public void setCreateTime(Date createTime) {
|
| | | this.createTime = createTime;
|
| | | }
|
| | |
|
| | | public Date getUpdateTime() {
|
| | | return updateTime;
|
| | | }
|
| | |
|
| | | public void setUpdateTime(Date updateTime) {
|
| | | this.updateTime = updateTime;
|
| | | }
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.recommend;
|
| | |
|
| | | import java.util.Date;
|
| | |
|
| | | import org.yeshi.utils.mybatis.Column;
|
| | | import org.yeshi.utils.mybatis.Table;
|
| | |
|
| | | import com.yeshi.fanli.base.entity.goods.CommonGoods;
|
| | |
|
| | | /*
|
| | | * 用户商品推荐
|
| | | */
|
| | | @Table("yeshi_ec_recommend_user_goods_map")
|
| | | public class RecommendUserGoodsMap {
|
| | | @Column(name = "rugm_id")
|
| | | private Long id;
|
| | | @Column(name = "rugm_common_goods_id")
|
| | | private CommonGoods goods;
|
| | | @Column(name = "rugm_recommend_id")
|
| | | private RecommendUserGoods recommend;
|
| | | @Column(name = "rugm_create_time")
|
| | | private Date createTime;
|
| | |
|
| | | public RecommendUserGoodsMap(CommonGoods goods, RecommendUserGoods recommend, Date createTime) {
|
| | | this.goods = goods;
|
| | | this.recommend = recommend;
|
| | | this.createTime = createTime;
|
| | | }
|
| | |
|
| | | public RecommendUserGoodsMap() {
|
| | |
|
| | | }
|
| | |
|
| | | public RecommendUserGoodsMap(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public CommonGoods getGoods() {
|
| | | return goods;
|
| | | }
|
| | |
|
| | | public void setGoods(CommonGoods goods) {
|
| | | this.goods = goods;
|
| | | }
|
| | |
|
| | | public RecommendUserGoods getRecommend() {
|
| | | return recommend;
|
| | | }
|
| | |
|
| | | public void setRecommend(RecommendUserGoods recommend) {
|
| | | this.recommend = recommend;
|
| | | }
|
| | |
|
| | | public Date getCreateTime() {
|
| | | return createTime;
|
| | | }
|
| | |
|
| | | public void setCreateTime(Date createTime) {
|
| | | this.createTime = createTime;
|
| | | }
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.recommend;
|
| | |
|
| | | import java.io.Serializable;
|
| | |
|
| | | import javax.persistence.Column;
|
| | | import javax.persistence.Entity;
|
| | | import javax.persistence.FetchType;
|
| | | import javax.persistence.GeneratedValue;
|
| | | import javax.persistence.GenerationType;
|
| | | import javax.persistence.Id;
|
| | | import javax.persistence.JoinColumn;
|
| | | import javax.persistence.ManyToOne;
|
| | | import javax.persistence.Table;
|
| | |
|
| | | import org.fanli.facade.system.entity.common.SystemManage;
|
| | |
|
| | | @Entity
|
| | | @Table(name = "yeshi_ec_super_recommendbanner")
|
| | | public class SuperRecommendBanner implements Serializable{
|
| | | /**
|
| | | * |
| | | */
|
| | | private static final long serialVersionUID = 1L;
|
| | | |
| | | @Id
|
| | | @GeneratedValue(strategy = GenerationType.AUTO)
|
| | | @Column(name = "id")
|
| | | private long id;
|
| | | @ManyToOne(fetch = FetchType.EAGER)
|
| | | @JoinColumn(name = "recommendbanner_id")
|
| | | private RecommendBanner recommendBanner;
|
| | | @ManyToOne(fetch = FetchType.EAGER)
|
| | | @JoinColumn(name = "system_id")
|
| | | private SystemManage system;
|
| | |
|
| | | public SuperRecommendBanner() {
|
| | | }
|
| | | |
| | | public SuperRecommendBanner(RecommendBanner recommendBanner, SystemManage system) {
|
| | | super();
|
| | | this.recommendBanner = recommendBanner;
|
| | | this.system = system;
|
| | | }
|
| | |
|
| | | public long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public RecommendBanner getRecommendBanner() {
|
| | | return recommendBanner;
|
| | | }
|
| | |
|
| | | public void setRecommendBanner(RecommendBanner recommendBanner) {
|
| | | this.recommendBanner = recommendBanner;
|
| | | }
|
| | |
|
| | | public SystemManage getSystem() {
|
| | | return system;
|
| | | }
|
| | |
|
| | | public void setSystem(SystemManage system) {
|
| | | this.system = system;
|
| | | }
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.recommend;
|
| | |
|
| | | import java.io.Serializable;
|
| | |
|
| | | import javax.persistence.Column;
|
| | | import javax.persistence.Entity;
|
| | | import javax.persistence.FetchType;
|
| | | import javax.persistence.GeneratedValue;
|
| | | import javax.persistence.GenerationType;
|
| | | import javax.persistence.Id;
|
| | | import javax.persistence.JoinColumn;
|
| | | import javax.persistence.ManyToOne;
|
| | | import javax.persistence.Table;
|
| | |
|
| | | import org.fanli.facade.system.entity.common.SystemManage;
|
| | |
|
| | | @Entity
|
| | | @Table(name = "yeshi_ec_super_recommendbanner_v2")
|
| | | public class SuperRecommendBannerV2 implements Serializable {
|
| | | /**
|
| | | * |
| | | */
|
| | | private static final long serialVersionUID = 1L;
|
| | |
|
| | | @Id
|
| | | @GeneratedValue(strategy = GenerationType.AUTO)
|
| | | @Column(name = "id")
|
| | | private long id;
|
| | |
|
| | | @ManyToOne(fetch = FetchType.EAGER)
|
| | | @JoinColumn(name = "recommendbanner_id")
|
| | | private RecommendBannerV2 recommendBanner;
|
| | |
|
| | | @ManyToOne(fetch = FetchType.EAGER)
|
| | | @JoinColumn(name = "system_id")
|
| | | private SystemManage system;
|
| | |
|
| | | public SuperRecommendBannerV2() {
|
| | | }
|
| | |
|
| | | public SuperRecommendBannerV2(RecommendBannerV2 recommendBanner, SystemManage system) {
|
| | | super();
|
| | | this.recommendBanner = recommendBanner;
|
| | | this.system = system;
|
| | | }
|
| | |
|
| | | public long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public RecommendBannerV2 getRecommendBanner() {
|
| | | return recommendBanner;
|
| | | }
|
| | |
|
| | | public void setRecommendBanner(RecommendBannerV2 recommendBanner) {
|
| | | this.recommendBanner = recommendBanner;
|
| | | }
|
| | |
|
| | | public SystemManage getSystem() {
|
| | | return system;
|
| | | }
|
| | |
|
| | | public void setSystem(SystemManage system) {
|
| | | this.system = system;
|
| | | }
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.recommend;
|
| | |
|
| | | import java.io.Serializable;
|
| | |
|
| | | import javax.persistence.Column;
|
| | | import javax.persistence.Entity;
|
| | | import javax.persistence.FetchType;
|
| | | import javax.persistence.GeneratedValue;
|
| | | import javax.persistence.GenerationType;
|
| | | import javax.persistence.Id;
|
| | | import javax.persistence.JoinColumn;
|
| | | import javax.persistence.ManyToOne;
|
| | | import javax.persistence.Table;
|
| | |
|
| | | import org.fanli.facade.system.entity.common.SystemManage;
|
| | |
|
| | | @Entity
|
| | | @Table(name = "yeshi_ec_super_recommendsection")
|
| | | public class SuperRecommendSection implements Serializable {
|
| | |
|
| | | /**
|
| | | * |
| | | */
|
| | | private static final long serialVersionUID = 1L;
|
| | |
|
| | | @Id
|
| | | @GeneratedValue(strategy = GenerationType.AUTO)
|
| | | @Column(name = "id")
|
| | | private long id;
|
| | | @ManyToOne(fetch = FetchType.EAGER)
|
| | | @JoinColumn(name = "recommendsection_id")
|
| | | private RecommendSection recommendSection;
|
| | | @ManyToOne(fetch = FetchType.EAGER)
|
| | | @JoinColumn(name = "system_id")
|
| | | private SystemManage system;
|
| | |
|
| | | public SuperRecommendSection() {
|
| | | }
|
| | |
|
| | | public SuperRecommendSection(RecommendSection recommendSection, SystemManage system) {
|
| | | super();
|
| | | this.recommendSection = recommendSection;
|
| | | this.system = system;
|
| | | }
|
| | |
|
| | | public long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public RecommendSection getRecommendSection() {
|
| | | return recommendSection;
|
| | | }
|
| | |
|
| | | public void setRecommendSection(RecommendSection recommendSection) {
|
| | | this.recommendSection = recommendSection;
|
| | | }
|
| | |
|
| | | public SystemManage getSystem() {
|
| | | return system;
|
| | | }
|
| | |
|
| | | public void setSystem(SystemManage system) {
|
| | | this.system = system;
|
| | | }
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.recommend;
|
| | |
|
| | | import java.io.Serializable;
|
| | |
|
| | | import javax.persistence.Column;
|
| | | import javax.persistence.Entity;
|
| | | import javax.persistence.FetchType;
|
| | | import javax.persistence.GeneratedValue;
|
| | | import javax.persistence.GenerationType;
|
| | | import javax.persistence.Id;
|
| | | import javax.persistence.JoinColumn;
|
| | | import javax.persistence.ManyToOne;
|
| | | import javax.persistence.Table;
|
| | |
|
| | | import org.fanli.facade.system.entity.common.SystemManage;
|
| | |
|
| | | @Entity
|
| | | @Table(name = "yeshi_ec_super_recommendspecial")
|
| | | public class SuperRecommendSpecial implements Serializable {
|
| | | /**
|
| | | * |
| | | */
|
| | | private static final long serialVersionUID = 1L;
|
| | |
|
| | | @Id
|
| | | @GeneratedValue(strategy = GenerationType.AUTO)
|
| | | @Column(name = "id")
|
| | | private long id;
|
| | | @ManyToOne(fetch = FetchType.EAGER)
|
| | | @JoinColumn(name = "recommendspecial_id")
|
| | | private RecommendSpecial recommendSpecial;
|
| | | @ManyToOne(fetch = FetchType.EAGER)
|
| | | @JoinColumn(name = "system_id")
|
| | | private SystemManage system;
|
| | |
|
| | | public SuperRecommendSpecial() {
|
| | | }
|
| | |
|
| | | public SuperRecommendSpecial(RecommendSpecial recommendSpecial, SystemManage system) {
|
| | | super();
|
| | | this.recommendSpecial = recommendSpecial;
|
| | | this.system = system;
|
| | | }
|
| | |
|
| | | public long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public RecommendSpecial getRecommendSpecial() {
|
| | | return recommendSpecial;
|
| | | }
|
| | |
|
| | | public void setRecommendSpecial(RecommendSpecial recommendSpecial) {
|
| | | this.recommendSpecial = recommendSpecial;
|
| | | }
|
| | |
|
| | | public SystemManage getSystem() {
|
| | | return system;
|
| | | }
|
| | |
|
| | | public void setSystem(SystemManage system) {
|
| | | this.system = system;
|
| | | }
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.search;
|
| | |
|
| | | import java.util.Date;
|
| | |
|
| | | import javax.persistence.Column;
|
| | | import javax.persistence.Entity;
|
| | | import javax.persistence.GeneratedValue;
|
| | | import javax.persistence.GenerationType;
|
| | | import javax.persistence.Id;
|
| | | import javax.persistence.Table;
|
| | |
|
| | | import org.hibernate.annotations.Type;
|
| | |
|
| | | import com.google.gson.annotations.Expose;
|
| | |
|
| | | @Entity
|
| | | @Table(name="`yeshi_ec_history_search`")
|
| | | public class HistorySearch {
|
| | | @Id
|
| | | @GeneratedValue(strategy=GenerationType.AUTO)
|
| | | private Long id;
|
| | | @Column(name="`name`")
|
| | | @Expose
|
| | | private String name;
|
| | | @Column(name="`businessId`")
|
| | | private String businessId;
|
| | | @Column(name="`state`",length=2)
|
| | | private int state;
|
| | | @Type(type="date")
|
| | | private Date createtime;
|
| | | |
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public int getState() {
|
| | | return state;
|
| | | }
|
| | |
|
| | | public void setState(int state) {
|
| | | this.state = state;
|
| | | }
|
| | |
|
| | | public String getName() {
|
| | | return name;
|
| | | }
|
| | |
|
| | | public void setName(String name) {
|
| | | this.name = name;
|
| | | }
|
| | |
|
| | | public String getBusinessId() {
|
| | | return businessId;
|
| | | }
|
| | |
|
| | | public void setBusinessId(String businessId) {
|
| | | this.businessId = businessId;
|
| | | }
|
| | |
|
| | | public Date getCreatetime() {
|
| | | return createtime;
|
| | | }
|
| | |
|
| | | public void setCreatetime(Date createtime) {
|
| | | this.createtime = createtime;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.search;
|
| | |
|
| | | import java.io.Serializable;
|
| | | import java.util.List;
|
| | |
|
| | | import javax.persistence.Column;
|
| | | import javax.persistence.Entity;
|
| | | import javax.persistence.GeneratedValue;
|
| | | import javax.persistence.GenerationType;
|
| | | import javax.persistence.Id;
|
| | | import javax.persistence.Table;
|
| | | import javax.persistence.Transient;
|
| | |
|
| | | import org.fanli.facade.system.entity.common.SystemManage;
|
| | |
|
| | | @Entity
|
| | | @Table(name = "yeshi_ec_hot_search")
|
| | | public class HotSearch implements Serializable {
|
| | |
|
| | | private static final long serialVersionUID = 1L;
|
| | | @Id
|
| | | @GeneratedValue(strategy = GenerationType.AUTO)
|
| | | @Column(name = "id")
|
| | | private Long id;
|
| | | @Column(name = "`orderby`")
|
| | | private Integer orderby;
|
| | | @Column(name = "`name`")
|
| | | private String name;
|
| | | private Long createtime;
|
| | |
|
| | | @Transient
|
| | | // 系统关联列表
|
| | | private List<SystemManage> systemList;
|
| | |
|
| | | public HotSearch() {
|
| | | }
|
| | |
|
| | | public HotSearch(Long id) {
|
| | | super();
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public HotSearch(Integer orderby, String name) {
|
| | | super();
|
| | | this.orderby = orderby;
|
| | | this.name = name;
|
| | | }
|
| | |
|
| | | public Long getCreatetime() {
|
| | | return createtime;
|
| | | }
|
| | |
|
| | | public void setCreatetime(Long createtime) {
|
| | | this.createtime = createtime;
|
| | | }
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public Integer getOrderby() {
|
| | | return orderby;
|
| | | }
|
| | |
|
| | | public void setOrderby(Integer orderby) {
|
| | | this.orderby = orderby;
|
| | | }
|
| | |
|
| | | public String getName() {
|
| | | return name;
|
| | | }
|
| | |
|
| | | public void setName(String name) {
|
| | | this.name = name;
|
| | | }
|
| | |
|
| | | public List<SystemManage> getSystemList() {
|
| | | return systemList;
|
| | | }
|
| | |
|
| | | public void setSystemList(List<SystemManage> systemList) {
|
| | | this.systemList = systemList;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.taobao;
|
| | |
|
| | | import javax.persistence.Entity;
|
| | | import javax.persistence.GeneratedValue;
|
| | | import javax.persistence.GenerationType;
|
| | | import javax.persistence.Id;
|
| | | import javax.persistence.Table;
|
| | |
|
| | | import org.yeshi.utils.mybatis.Column;
|
| | |
|
| | | @Entity
|
| | | @Table(name = "yeshi_ec_pid")
|
| | | @org.yeshi.utils.mybatis.Table("yeshi_ec_pid")
|
| | | public class TBPid {
|
| | | @Id
|
| | | @GeneratedValue(strategy = GenerationType.AUTO)
|
| | | @Column(name = "id")
|
| | | private Long id;
|
| | | @Column(name = "name")
|
| | | private String name;
|
| | | @Column(name = "pid")
|
| | | private String pid;
|
| | | @Column(name = "createtime")
|
| | | private Long createtime;
|
| | | @Column(name = "used")
|
| | | private Boolean used;
|
| | |
|
| | | public Boolean getUsed() {
|
| | | return used;
|
| | | }
|
| | |
|
| | | public void setUsed(Boolean used) {
|
| | | this.used = used;
|
| | | }
|
| | |
|
| | | public Long getCreatetime() {
|
| | | return createtime;
|
| | | }
|
| | |
|
| | | public void setCreatetime(Long createtime) {
|
| | | this.createtime = createtime;
|
| | | }
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public String getName() {
|
| | | return name;
|
| | | }
|
| | |
|
| | | public void setName(String name) {
|
| | | this.name = name;
|
| | | }
|
| | |
|
| | | public String getPid() {
|
| | | return pid;
|
| | | }
|
| | |
|
| | | public void setPid(String pid) {
|
| | | this.pid = pid;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.taobao;
|
| | |
|
| | | import java.math.BigDecimal;
|
| | |
|
| | | import javax.persistence.Column;
|
| | | import javax.persistence.Entity;
|
| | | import javax.persistence.GeneratedValue;
|
| | | import javax.persistence.GenerationType;
|
| | | import javax.persistence.Id;
|
| | | import javax.persistence.Table;
|
| | | import javax.persistence.Transient;
|
| | |
|
| | | import com.google.gson.annotations.Expose;
|
| | |
|
| | | @Table(name = "yeshi_ec_taobao_coupon")
|
| | | @Entity
|
| | | public class TaoBaoCoupon {
|
| | | @Id
|
| | | @GeneratedValue(strategy = GenerationType.AUTO)
|
| | | @Column(name = "id")
|
| | | @Expose
|
| | | private long id;
|
| | | @Expose
|
| | | @Column(name = "auctionId")
|
| | | private String auctionId;
|
| | | @Column(name = "`title`")
|
| | | @Expose
|
| | | private String title;
|
| | | @Expose
|
| | | private String pictUrl;
|
| | | @Expose
|
| | | private String auctionUrl;
|
| | | private String classNames; // 分类名称 多级分类/分开
|
| | | @Column(name = "`taobaokeUrl`", length = 1024)
|
| | | private String taobaokeUrl;
|
| | | @Expose
|
| | | private BigDecimal zkPrice; // 无线价格
|
| | | @Expose
|
| | | private int biz30day;
|
| | | @Expose
|
| | | private double tkRate; // 比例
|
| | | private BigDecimal brokerage; // 佣金
|
| | | private String shopWangWang; // 店铺旺旺
|
| | | private long sellerId;// 卖家Id
|
| | | private String shopTitle; // 店铺名称
|
| | | @Expose
|
| | | private int shopType; // 平台类型 1-淘宝 2-天猫 0-其他
|
| | | private String couponId; // 优惠券ID
|
| | | private int couponSum; // 优惠券总数
|
| | | private int couponCount; // 优惠券剩余量
|
| | | @Expose
|
| | | private String couponinfo; // 优惠券信息
|
| | | private BigDecimal couponStartFee; // 优惠券起始金额
|
| | | private BigDecimal couponAmount; // 优惠券金额
|
| | | @Expose
|
| | | private BigDecimal quanPrice;
|
| | | private String couponBegin;
|
| | | private String couponEnd;
|
| | | @Column(name = "couponLink", length = 1024)
|
| | | private String couponLink;
|
| | | @Column(name = "generalizeUrl", length = 1024)
|
| | | private String generalizeUrl; // 推广URl
|
| | | @Expose
|
| | | private int orderby;
|
| | | @Expose
|
| | | private long createtime;
|
| | |
|
| | | @Expose
|
| | | @Transient
|
| | | private BigDecimal hongbao;
|
| | |
|
| | | @Expose
|
| | | private int showType; //
|
| | |
|
| | | public TaoBaoCoupon() {
|
| | | }
|
| | |
|
| | | public TaoBaoCoupon(long id) {
|
| | | super();
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public int getShowType() {
|
| | | return showType;
|
| | | }
|
| | |
|
| | | public void setShowType(int showType) {
|
| | | this.showType = showType;
|
| | | }
|
| | |
|
| | | public BigDecimal getHongbao() {
|
| | | return hongbao;
|
| | | }
|
| | |
|
| | | public void setHongbao(BigDecimal hongbao) {
|
| | | this.hongbao = hongbao;
|
| | | }
|
| | |
|
| | | public BigDecimal getQuanPrice() {
|
| | | return quanPrice;
|
| | | }
|
| | |
|
| | | public void setQuanPrice(BigDecimal quanPrice) {
|
| | | this.quanPrice = quanPrice;
|
| | | }
|
| | |
|
| | | public String getAuctionId() {
|
| | | return auctionId;
|
| | | }
|
| | |
|
| | | public BigDecimal getCouponStartFee() {
|
| | | return couponStartFee;
|
| | | }
|
| | |
|
| | | public int getOrderby() {
|
| | | return orderby;
|
| | | }
|
| | |
|
| | | public void setOrderby(int orderby) {
|
| | | this.orderby = orderby;
|
| | | }
|
| | |
|
| | | public void setCouponStartFee(BigDecimal couponStartFee) {
|
| | | this.couponStartFee = couponStartFee;
|
| | | }
|
| | |
|
| | | public BigDecimal getCouponAmount() {
|
| | | return couponAmount;
|
| | | }
|
| | |
|
| | | public void setCouponAmount(BigDecimal couponAmount) {
|
| | | this.couponAmount = couponAmount;
|
| | | }
|
| | |
|
| | | public void setAuctionId(String auctionId) {
|
| | | this.auctionId = auctionId;
|
| | | }
|
| | |
|
| | | public String getTitle() {
|
| | | return title;
|
| | | }
|
| | |
|
| | | public void setTitle(String title) {
|
| | | this.title = title;
|
| | | }
|
| | |
|
| | | public String getPictUrl() {
|
| | | return pictUrl;
|
| | | }
|
| | |
|
| | | public void setPictUrl(String pictUrl) {
|
| | | this.pictUrl = pictUrl;
|
| | | }
|
| | |
|
| | | public String getAuctionUrl() {
|
| | | return auctionUrl;
|
| | | }
|
| | |
|
| | | public void setAuctionUrl(String auctionUrl) {
|
| | | this.auctionUrl = auctionUrl;
|
| | | }
|
| | |
|
| | | public String getClassNames() {
|
| | | return classNames;
|
| | | }
|
| | |
|
| | | public void setClassNames(String classNames) {
|
| | | this.classNames = classNames;
|
| | | }
|
| | |
|
| | | public String getTaobaokeUrl() {
|
| | | return taobaokeUrl;
|
| | | }
|
| | |
|
| | | public void setTaobaokeUrl(String taobaokeUrl) {
|
| | | this.taobaokeUrl = taobaokeUrl;
|
| | | }
|
| | |
|
| | | public BigDecimal getZkPrice() {
|
| | | return zkPrice;
|
| | | }
|
| | |
|
| | | public void setZkPrice(BigDecimal zkPrice) {
|
| | | this.zkPrice = zkPrice;
|
| | | }
|
| | |
|
| | | public int getBiz30day() {
|
| | | return biz30day;
|
| | | }
|
| | |
|
| | | public void setBiz30day(int biz30day) {
|
| | | this.biz30day = biz30day;
|
| | | }
|
| | |
|
| | | public double getTkRate() {
|
| | | return tkRate;
|
| | | }
|
| | |
|
| | | public void setTkRate(double tkRate) {
|
| | | this.tkRate = tkRate;
|
| | | }
|
| | |
|
| | | public BigDecimal getBrokerage() {
|
| | | return brokerage;
|
| | | }
|
| | |
|
| | | public void setBrokerage(BigDecimal brokerage) {
|
| | | this.brokerage = brokerage;
|
| | | }
|
| | |
|
| | | public String getShopWangWang() {
|
| | | return shopWangWang;
|
| | | }
|
| | |
|
| | | public void setShopWangWang(String shopWangWang) {
|
| | | this.shopWangWang = shopWangWang;
|
| | | }
|
| | |
|
| | | public long getSellerId() {
|
| | | return sellerId;
|
| | | }
|
| | |
|
| | | public void setSellerId(long sellerId) {
|
| | | this.sellerId = sellerId;
|
| | | }
|
| | |
|
| | | public String getShopTitle() {
|
| | | return shopTitle;
|
| | | }
|
| | |
|
| | | public void setShopTitle(String shopTitle) {
|
| | | this.shopTitle = shopTitle;
|
| | | }
|
| | |
|
| | | public int getShopType() {
|
| | | return shopType;
|
| | | }
|
| | |
|
| | | public void setShopType(int shopType) {
|
| | | this.shopType = shopType;
|
| | | }
|
| | |
|
| | | public String getCouponId() {
|
| | | return couponId;
|
| | | }
|
| | |
|
| | | public void setCouponId(String couponId) {
|
| | | this.couponId = couponId;
|
| | | }
|
| | |
|
| | | public int getCouponSum() {
|
| | | return couponSum;
|
| | | }
|
| | |
|
| | | public void setCouponSum(int couponSum) {
|
| | | this.couponSum = couponSum;
|
| | | }
|
| | |
|
| | | public int getCouponCount() {
|
| | | return couponCount;
|
| | | }
|
| | |
|
| | | public void setCouponCount(int couponCount) {
|
| | | this.couponCount = couponCount;
|
| | | }
|
| | |
|
| | | public long getCreatetime() {
|
| | | return createtime;
|
| | | }
|
| | |
|
| | | public void setCreatetime(long createtime) {
|
| | | this.createtime = createtime;
|
| | | }
|
| | |
|
| | | public String getCouponinfo() {
|
| | | return couponinfo;
|
| | | }
|
| | |
|
| | | public void setCouponinfo(String couponinfo) {
|
| | | this.couponinfo = couponinfo;
|
| | | }
|
| | |
|
| | | public String getCouponBegin() {
|
| | | return couponBegin;
|
| | | }
|
| | |
|
| | | public void setCouponBegin(String couponBegin) {
|
| | | this.couponBegin = couponBegin;
|
| | | }
|
| | |
|
| | | public String getCouponEnd() {
|
| | | return couponEnd;
|
| | | }
|
| | |
|
| | | public void setCouponEnd(String couponEnd) {
|
| | | this.couponEnd = couponEnd;
|
| | | }
|
| | |
|
| | | public String getCouponLink() {
|
| | | return couponLink;
|
| | | }
|
| | |
|
| | | public void setCouponLink(String couponLink) {
|
| | | this.couponLink = couponLink;
|
| | | }
|
| | |
|
| | | public String getGeneralizeUrl() {
|
| | | return generalizeUrl;
|
| | | }
|
| | |
|
| | | public void setGeneralizeUrl(String generalizeUrl) {
|
| | | this.generalizeUrl = generalizeUrl;
|
| | | }
|
| | |
|
| | | @Override
|
| | | public int hashCode() {
|
| | | final int prime = 31;
|
| | | int result = 1;
|
| | | result = prime * result + ((auctionId == null) ? 0 : auctionId.hashCode());
|
| | | return result;
|
| | | }
|
| | |
|
| | | @Override
|
| | | public boolean equals(Object obj) {
|
| | | if (this == obj)
|
| | | return true;
|
| | | if (obj == null)
|
| | | return false;
|
| | | if (getClass() != obj.getClass())
|
| | | return false;
|
| | | TaoBaoCoupon other = (TaoBaoCoupon) obj;
|
| | | if (auctionId == null) {
|
| | | if (other.auctionId != null)
|
| | | return false;
|
| | | } else if (!auctionId.equals(other.auctionId))
|
| | | return false;
|
| | | return true;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.taobao;
|
| | |
|
| | | import java.math.BigDecimal;
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | |
|
| | | import javax.persistence.Column;
|
| | | import javax.persistence.Entity;
|
| | | import javax.persistence.GeneratedValue;
|
| | | import javax.persistence.GenerationType;
|
| | | import javax.persistence.Id;
|
| | | import javax.persistence.Table;
|
| | | import javax.persistence.Transient;
|
| | |
|
| | | import org.hibernate.annotations.Type;
|
| | |
|
| | | import com.google.gson.annotations.Expose;
|
| | |
|
| | | /**
|
| | | * 淘宝商品信息记录 -暂存数据
|
| | | * |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | @Entity
|
| | | @Table(name = "yeshi_ec_taobao_goods_record")
|
| | | @org.yeshi.utils.mybatis.Table("yeshi_ec_taobao_goods_record")
|
| | | public class TaoBaoGoodsBriefRecord {
|
| | | @org.yeshi.utils.mybatis.Column(name = "id")
|
| | | @Id
|
| | | @GeneratedValue(strategy = GenerationType.AUTO)
|
| | | @Column(name = "id")
|
| | | @Expose
|
| | | private Long id;
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "rootCatId")
|
| | | private Integer rootCatId;// 0,
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "eventCreatorId")
|
| | | private Integer eventCreatorId;// 0,
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "leafCatId")
|
| | | private Integer leafCatId;// 50011277,
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "debugInfo")
|
| | | @Column(length = 50)
|
| | | private String debugInfo;// null,
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "rootCatScore")
|
| | | private Integer rootCatScore;// 0,
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "sellerId")
|
| | | private Long sellerId;// 卖家Id
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "userType")
|
| | | private Integer userType;// 0,
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "shopTitle")
|
| | | @Column(length = 256)
|
| | | private String shopTitle;// 店铺名称
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "pictUrl")
|
| | | @Column(length = 256)
|
| | | @Expose
|
| | | private String pictUrl;// 主图链接
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "title")
|
| | | @Column(length = 256)
|
| | | @Expose
|
| | | private String title;// 商品标题
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "auctionId")
|
| | | @Expose
|
| | | private Long auctionId;// 商品ID
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "couponLink")
|
| | | @Expose
|
| | | @Column(length = 256)
|
| | | private String couponLink;// 优惠券链�?
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "couponLinkTaoToken")
|
| | | @Expose
|
| | | @Column(length = 256)
|
| | | private String couponLinkTaoToken;//
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "couponActivityId")
|
| | | @Expose
|
| | | @Column(length = 128)
|
| | | private String couponActivityId;//
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "biz30day")
|
| | | @Expose
|
| | | private Integer biz30day;// 月销量
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "tkRate")
|
| | | @Expose
|
| | | private BigDecimal tkRate;// 佣金比例 �?��100
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "nick")
|
| | | @Expose
|
| | | @Column(length = 50)
|
| | | private String nick;// "yoyo_808611", 店铺名称
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "includeDxjh")
|
| | | @Expose
|
| | | private Integer includeDxjh;// 1:定向计划
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "reservePrice")
|
| | | @Expose
|
| | | private BigDecimal reservePrice;// 588,
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "tkCommFee")
|
| | | @Expose
|
| | | private BigDecimal tkCommFee;// 32.04,
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "totalFee")
|
| | | @Expose
|
| | | private BigDecimal totalFee;// 4814.43,
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "totalNum")
|
| | | @Expose
|
| | | private Integer totalNum;// 229,
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "zkPrice")
|
| | | @Expose
|
| | | private BigDecimal zkPrice;// 无线价格,在售价
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "dayLeft")
|
| | | @Expose
|
| | | private Integer dayLeft;// -17228,
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "tk3rdRate")
|
| | | @Expose
|
| | | @Column(length = 50)
|
| | | private String tk3rdRate;// null,
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "auctionUrl")
|
| | | @Column(length = 128)
|
| | | @Expose
|
| | | private String auctionUrl;// 商品链接
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "rlRate")
|
| | | @Expose
|
| | | private Double rlRate;// 69.72,
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "hasRecommended")
|
| | | @Expose
|
| | | private Integer hasRecommended;// 0,
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "hasSame")
|
| | | @Expose
|
| | | private Integer hasSame;// 0,
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "sameItemPid")
|
| | | @Expose
|
| | | private Long sameItemPid;// "-232381821",
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "couponTotalCount")
|
| | | @Expose
|
| | | private Integer couponTotalCount;// 优惠券�?�?
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "couponLeftCount")
|
| | | @Expose
|
| | | private Integer couponLeftCount;// 优惠券剩余数�?
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "couponAmount")
|
| | | @Expose
|
| | | private BigDecimal couponAmount;// 优惠金额
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "eventRate")
|
| | | @Expose
|
| | | @Column(length = 50)
|
| | | private String eventRate;// null,
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "couponShortLink")
|
| | | @Expose
|
| | | @Column(length = 128)
|
| | | private String couponShortLink;// 优惠券短�?
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "couponInfo")
|
| | | @Column(length = 50)
|
| | | @Expose
|
| | | private String couponInfo;// 优惠券信�?
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "couponStartFee")
|
| | | @Expose
|
| | | private BigDecimal couponStartFee;// 优惠券起始优�?
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "couponEffectiveStartTime")
|
| | | @Expose
|
| | | @Column(length = 20)
|
| | | private String couponEffectiveStartTime;// "2017-02-04",优惠券开始时�?
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "couponEffectiveEndTime")
|
| | | @Expose
|
| | | @Column(length = 20)
|
| | | private String couponEffectiveEndTime;// 优惠券结束时�?
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "hasUmpBonus")
|
| | | @Expose
|
| | | @Column(length = 10)
|
| | | private String hasUmpBonus;// null,
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "isBizActivity")
|
| | | @Expose
|
| | | @Column(length = 10)
|
| | | private String isBizActivity;// null,
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "umpBonus")
|
| | | @Expose
|
| | | @Column(length = 10)
|
| | | private String umpBonus;// null,
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "rootCategoryName")
|
| | | @Expose
|
| | | @Column(length = 30)
|
| | | private String rootCategoryName;// 根分�?
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "couponOriLink")
|
| | | @Expose
|
| | | @Column(length = 128)
|
| | | private String couponOriLink;// 优惠券原始链�?
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "userTypeName")
|
| | | @Expose
|
| | | @Column(length = 30)
|
| | | private String userTypeName;// 用户类型
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "createtime")
|
| | | @Expose
|
| | | @Type(type = "date")
|
| | | private Date createtime;
|
| | |
|
| | | @org.yeshi.utils.mybatis.Column(name = "tkMktStatus")
|
| | | @Expose
|
| | | @Column
|
| | | private String tkMktStatus; // 1:营销返利
|
| | |
|
| | | /* 新增字段 2018-7-16 ; 由于数据未从淘宝获取成功,暂不启用 */
|
| | | @Transient
|
| | | private String catName; // 一级类目
|
| | |
|
| | | @Transient
|
| | | private String catLeafName; // 子级类目
|
| | |
|
| | | @Transient
|
| | | private Integer isPrepay; // 是否加入消费者保障 1:是 0 否
|
| | |
|
| | | @Transient
|
| | | private Integer shopDsr; // 店铺评分
|
| | |
|
| | | @Transient
|
| | | private Integer ratesum; // 卖家等级
|
| | |
|
| | | @Transient
|
| | | private Integer rfdRate; // 退款率是否低于行业均值
|
| | |
|
| | | @Transient
|
| | | private Integer goodRate; // 好评率是否高于行业均值
|
| | |
|
| | | @Transient
|
| | | private Integer payRate30; // 成交转化是否高于行业均值
|
| | |
|
| | | @Transient
|
| | | private Integer freeShipment; // 是否包邮
|
| | |
|
| | | @Transient
|
| | | @Expose
|
| | | private String salesCount;
|
| | |
|
| | | @Transient
|
| | | private List<String> imgList;
|
| | |
|
| | | @Transient
|
| | | private String dxjhInfo;
|
| | |
|
| | | @Transient
|
| | | private String provcity;
|
| | |
|
| | | |
| | | |
| | | |
| | | public String getProvcity() {
|
| | | return provcity;
|
| | | }
|
| | |
|
| | | public void setProvcity(String provcity) {
|
| | | this.provcity = provcity;
|
| | | }
|
| | |
|
| | | public String getDxjhInfo() {
|
| | | return dxjhInfo;
|
| | | }
|
| | |
|
| | | public void setDxjhInfo(String dxjhInfo) {
|
| | | this.dxjhInfo = dxjhInfo;
|
| | | }
|
| | |
|
| | | public Date getCreatetime() {
|
| | | return createtime;
|
| | | }
|
| | |
|
| | | public void setCreatetime(Date createtime) {
|
| | | this.createtime = createtime;
|
| | | }
|
| | |
|
| | | public TaoBaoGoodsBriefRecord() {
|
| | | this.eventCreatorId = 0;
|
| | | this.hasRecommended = 0;
|
| | | this.hasSame = 0;
|
| | | this.rootCatId = 0;
|
| | | this.rootCatScore = 0;
|
| | | this.sameItemPid = 0L;
|
| | | this.totalFee = new BigDecimal(0);
|
| | | this.couponStartFee = new BigDecimal(0);
|
| | | this.couponTotalCount = 0;
|
| | | this.dayLeft = 0;
|
| | | this.leafCatId = 0;
|
| | | this.couponAmount = new BigDecimal(0);
|
| | | this.rlRate = 0.0;
|
| | | this.couponLeftCount = 0;
|
| | | this.includeDxjh = 0;
|
| | |
|
| | | }
|
| | |
|
| | | public TaoBaoGoodsBriefRecord(Long id) {
|
| | | super();
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public TaoBaoGoodsBriefRecord(String shopTitle) {
|
| | | super();
|
| | | this.shopTitle = shopTitle;
|
| | | }
|
| | |
|
| | | public List<String> getImgList() {
|
| | | return imgList;
|
| | | }
|
| | |
|
| | | public void setImgList(List<String> imgList) {
|
| | | this.imgList = imgList;
|
| | | }
|
| | |
|
| | | public Integer getRootCatId() {
|
| | | return rootCatId;
|
| | | }
|
| | |
|
| | | public void setRootCatId(Integer rootCatId) {
|
| | | this.rootCatId = rootCatId;
|
| | | }
|
| | |
|
| | | public Integer getEventCreatorId() {
|
| | | return eventCreatorId;
|
| | | }
|
| | |
|
| | | public void setEventCreatorId(Integer eventCreatorId) {
|
| | | this.eventCreatorId = eventCreatorId;
|
| | | }
|
| | |
|
| | | public Integer getLeafCatId() {
|
| | | return leafCatId;
|
| | | }
|
| | |
|
| | | public void setLeafCatId(Integer leafCatId) {
|
| | | this.leafCatId = leafCatId;
|
| | | }
|
| | |
|
| | | public String getDebugInfo() {
|
| | | return debugInfo;
|
| | | }
|
| | |
|
| | | public void setDebugInfo(String debugInfo) {
|
| | | this.debugInfo = debugInfo;
|
| | | }
|
| | |
|
| | | public Integer getRootCatScore() {
|
| | | return rootCatScore;
|
| | | }
|
| | |
|
| | | public void setRootCatScore(Integer rootCatScore) {
|
| | | this.rootCatScore = rootCatScore;
|
| | | }
|
| | |
|
| | | public Long getSellerId() {
|
| | | return sellerId;
|
| | | }
|
| | |
|
| | | public void setSellerId(Long sellerId) {
|
| | | this.sellerId = sellerId;
|
| | | }
|
| | |
|
| | | public Integer getUserType() {
|
| | | return userType;
|
| | | }
|
| | |
|
| | | public void setUserType(Integer userType) {
|
| | | this.userType = userType;
|
| | | }
|
| | |
|
| | | public String getShopTitle() {
|
| | | return shopTitle;
|
| | | }
|
| | |
|
| | | public void setShopTitle(String shopTitle) {
|
| | | this.shopTitle = shopTitle;
|
| | | }
|
| | |
|
| | | public String getPictUrl() {
|
| | | return pictUrl;
|
| | | }
|
| | |
|
| | | public void setPictUrl(String pictUrl) {
|
| | | this.pictUrl = pictUrl;
|
| | | }
|
| | |
|
| | | public String getTitle() {
|
| | | return title;
|
| | | }
|
| | |
|
| | | public void setTitle(String title) {
|
| | | this.title = title;
|
| | | }
|
| | |
|
| | | public Long getAuctionId() {
|
| | | return auctionId;
|
| | | }
|
| | |
|
| | | public void setAuctionId(Long auctionId) {
|
| | | this.auctionId = auctionId;
|
| | | }
|
| | |
|
| | | public String getCouponLink() {
|
| | | return couponLink;
|
| | | }
|
| | |
|
| | | public void setCouponLink(String couponLink) {
|
| | | this.couponLink = couponLink;
|
| | | }
|
| | |
|
| | | public String getCouponLinkTaoToken() {
|
| | | return couponLinkTaoToken;
|
| | | }
|
| | |
|
| | | public void setCouponLinkTaoToken(String couponLinkTaoToken) {
|
| | | this.couponLinkTaoToken = couponLinkTaoToken;
|
| | | }
|
| | |
|
| | | public String getCouponActivityId() {
|
| | | return couponActivityId;
|
| | | }
|
| | |
|
| | | public void setCouponActivityId(String couponActivityId) {
|
| | | this.couponActivityId = couponActivityId;
|
| | | }
|
| | |
|
| | | public Integer getBiz30day() {
|
| | | return biz30day;
|
| | | }
|
| | |
|
| | | public void setBiz30day(Integer biz30day) {
|
| | | this.biz30day = biz30day;
|
| | | }
|
| | |
|
| | | public BigDecimal getTkRate() {
|
| | | return tkRate;
|
| | | }
|
| | |
|
| | | public void setTkRate(BigDecimal tkRate) {
|
| | | this.tkRate = tkRate;
|
| | | }
|
| | |
|
| | | public String getNick() {
|
| | | return nick;
|
| | | }
|
| | |
|
| | | public void setNick(String nick) {
|
| | | this.nick = nick;
|
| | | }
|
| | |
|
| | | public Integer getIncludeDxjh() {
|
| | | return includeDxjh;
|
| | | }
|
| | |
|
| | | public void setIncludeDxjh(Integer includeDxjh) {
|
| | | this.includeDxjh = includeDxjh;
|
| | | }
|
| | |
|
| | | public BigDecimal getTkCommFee() {
|
| | | return tkCommFee;
|
| | | }
|
| | |
|
| | | public BigDecimal getReservePrice() {
|
| | | return reservePrice;
|
| | | }
|
| | |
|
| | | public void setReservePrice(BigDecimal reservePrice) {
|
| | | this.reservePrice = reservePrice;
|
| | | }
|
| | |
|
| | | public BigDecimal getTotalFee() {
|
| | | return totalFee;
|
| | | }
|
| | |
|
| | | public void setTotalFee(BigDecimal totalFee) {
|
| | | this.totalFee = totalFee;
|
| | | }
|
| | |
|
| | | public void setTkCommFee(BigDecimal tkCommFee) {
|
| | | this.tkCommFee = tkCommFee;
|
| | | }
|
| | |
|
| | | public Integer getTotalNum() {
|
| | | return totalNum;
|
| | | }
|
| | |
|
| | | public void setTotalNum(Integer totalNum) {
|
| | | this.totalNum = totalNum;
|
| | | }
|
| | |
|
| | | public BigDecimal getZkPrice() {
|
| | | return zkPrice;
|
| | | }
|
| | |
|
| | | public void setZkPrice(BigDecimal zkPrice) {
|
| | | this.zkPrice = zkPrice;
|
| | | }
|
| | |
|
| | | public Integer getDayLeft() {
|
| | | return dayLeft;
|
| | | }
|
| | |
|
| | | public void setDayLeft(Integer dayLeft) {
|
| | | this.dayLeft = dayLeft;
|
| | | }
|
| | |
|
| | | public String getTk3rdRate() {
|
| | | return tk3rdRate;
|
| | | }
|
| | |
|
| | | public void setTk3rdRate(String tk3rdRate) {
|
| | | this.tk3rdRate = tk3rdRate;
|
| | | }
|
| | |
|
| | | public String getAuctionUrl() {
|
| | | return auctionUrl;
|
| | | }
|
| | |
|
| | | public void setAuctionUrl(String auctionUrl) {
|
| | | this.auctionUrl = auctionUrl;
|
| | | }
|
| | |
|
| | | public Double getRlRate() {
|
| | | return rlRate;
|
| | | }
|
| | |
|
| | | public void setRlRate(Double rlRate) {
|
| | | this.rlRate = rlRate;
|
| | | }
|
| | |
|
| | | public Integer getHasRecommended() {
|
| | | return hasRecommended;
|
| | | }
|
| | |
|
| | | public void setHasRecommended(Integer hasRecommended) {
|
| | | this.hasRecommended = hasRecommended;
|
| | | }
|
| | |
|
| | | public Integer getHasSame() {
|
| | | return hasSame;
|
| | | }
|
| | |
|
| | | public void setHasSame(Integer hasSame) {
|
| | | this.hasSame = hasSame;
|
| | | }
|
| | |
|
| | | public Long getSameItemPid() {
|
| | | return sameItemPid;
|
| | | }
|
| | |
|
| | | public void setSameItemPid(Long sameItemPid) {
|
| | | this.sameItemPid = sameItemPid;
|
| | | }
|
| | |
|
| | | public Integer getCouponTotalCount() {
|
| | | return couponTotalCount;
|
| | | }
|
| | |
|
| | | public void setCouponTotalCount(Integer couponTotalCount) {
|
| | | this.couponTotalCount = couponTotalCount;
|
| | | }
|
| | |
|
| | | public Integer getCouponLeftCount() {
|
| | | return couponLeftCount;
|
| | | }
|
| | |
|
| | | public void setCouponLeftCount(Integer couponLeftCount) {
|
| | | this.couponLeftCount = couponLeftCount;
|
| | | }
|
| | |
|
| | | public BigDecimal getCouponAmount() {
|
| | | return couponAmount;
|
| | | }
|
| | |
|
| | | public void setCouponAmount(BigDecimal couponAmount) {
|
| | | this.couponAmount = couponAmount;
|
| | | }
|
| | |
|
| | | public String getEventRate() {
|
| | | return eventRate;
|
| | | }
|
| | |
|
| | | public void setEventRate(String eventRate) {
|
| | | this.eventRate = eventRate;
|
| | | }
|
| | |
|
| | | public String getCouponShortLink() {
|
| | | return couponShortLink;
|
| | | }
|
| | |
|
| | | public void setCouponShortLink(String couponShortLink) {
|
| | | this.couponShortLink = couponShortLink;
|
| | | }
|
| | |
|
| | | public String getCouponInfo() {
|
| | | return couponInfo;
|
| | | }
|
| | |
|
| | | public void setCouponInfo(String couponInfo) {
|
| | | this.couponInfo = couponInfo;
|
| | | }
|
| | |
|
| | | public BigDecimal getCouponStartFee() {
|
| | | return couponStartFee;
|
| | | }
|
| | |
|
| | | public void setCouponStartFee(BigDecimal couponStartFee) {
|
| | | this.couponStartFee = couponStartFee;
|
| | | }
|
| | |
|
| | | public String getCouponEffectiveStartTime() {
|
| | | return couponEffectiveStartTime;
|
| | | }
|
| | |
|
| | | public void setCouponEffectiveStartTime(String couponEffectiveStartTime) {
|
| | | this.couponEffectiveStartTime = couponEffectiveStartTime;
|
| | | }
|
| | |
|
| | | public String getCouponEffectiveEndTime() {
|
| | | return couponEffectiveEndTime;
|
| | | }
|
| | |
|
| | | public void setCouponEffectiveEndTime(String couponEffectiveEndTime) {
|
| | | this.couponEffectiveEndTime = couponEffectiveEndTime;
|
| | | }
|
| | |
|
| | | public String getHasUmpBonus() {
|
| | | return hasUmpBonus;
|
| | | }
|
| | |
|
| | | public void setHasUmpBonus(String hasUmpBonus) {
|
| | | this.hasUmpBonus = hasUmpBonus;
|
| | | }
|
| | |
|
| | | public String getIsBizActivity() {
|
| | | return isBizActivity;
|
| | | }
|
| | |
|
| | | public void setIsBizActivity(String isBizActivity) {
|
| | | this.isBizActivity = isBizActivity;
|
| | | }
|
| | |
|
| | | public String getUmpBonus() {
|
| | | return umpBonus;
|
| | | }
|
| | |
|
| | | public void setUmpBonus(String umpBonus) {
|
| | | this.umpBonus = umpBonus;
|
| | | }
|
| | |
|
| | | public String getRootCategoryName() {
|
| | | return rootCategoryName;
|
| | | }
|
| | |
|
| | | public void setRootCategoryName(String rootCategoryName) {
|
| | | this.rootCategoryName = rootCategoryName;
|
| | | }
|
| | |
|
| | | public String getCouponOriLink() {
|
| | | return couponOriLink;
|
| | | }
|
| | |
|
| | | public void setCouponOriLink(String couponOriLink) {
|
| | | this.couponOriLink = couponOriLink;
|
| | | }
|
| | |
|
| | | public String getUserTypeName() {
|
| | | return userTypeName;
|
| | | }
|
| | |
|
| | | public void setUserTypeName(String userTypeName) {
|
| | | this.userTypeName = userTypeName;
|
| | | }
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public String getTkMktStatus() {
|
| | | return tkMktStatus;
|
| | | }
|
| | |
|
| | | public void setTkMktStatus(String tkMktStatus) {
|
| | | this.tkMktStatus = tkMktStatus;
|
| | | }
|
| | |
|
| | | public String getSalesCount() {
|
| | | return salesCount;
|
| | | }
|
| | |
|
| | | public void setSalesCount(String salesCount) {
|
| | | this.salesCount = salesCount;
|
| | | }
|
| | |
|
| | | public String getCatName() {
|
| | | return catName;
|
| | | }
|
| | |
|
| | | public void setCatName(String catName) {
|
| | | this.catName = catName;
|
| | | }
|
| | |
|
| | | public String getCatLeafName() {
|
| | | return catLeafName;
|
| | | }
|
| | |
|
| | | public void setCatLeafName(String catLeafName) {
|
| | | this.catLeafName = catLeafName;
|
| | | }
|
| | |
|
| | | public Integer getIsPrepay() {
|
| | | return isPrepay;
|
| | | }
|
| | |
|
| | | public void setIsPrepay(Integer isPrepay) {
|
| | | this.isPrepay = isPrepay;
|
| | | }
|
| | |
|
| | | public Integer getShopDsr() {
|
| | | return shopDsr;
|
| | | }
|
| | |
|
| | | public void setShopDsr(Integer shopDsr) {
|
| | | this.shopDsr = shopDsr;
|
| | | }
|
| | |
|
| | | public Integer getRatesum() {
|
| | | return ratesum;
|
| | | }
|
| | |
|
| | | public void setRatesum(Integer ratesum) {
|
| | | this.ratesum = ratesum;
|
| | | }
|
| | |
|
| | | public Integer getRfdRate() {
|
| | | return rfdRate;
|
| | | }
|
| | |
|
| | | public void setRfdRate(Integer rfdRate) {
|
| | | this.rfdRate = rfdRate;
|
| | | }
|
| | |
|
| | | public Integer getGoodRate() {
|
| | | return goodRate;
|
| | | }
|
| | |
|
| | | public void setGoodRate(Integer goodRate) {
|
| | | this.goodRate = goodRate;
|
| | | }
|
| | |
|
| | | public Integer getPayRate30() {
|
| | | return payRate30;
|
| | | }
|
| | |
|
| | | public void setPayRate30(Integer payRate30) {
|
| | | this.payRate30 = payRate30;
|
| | | }
|
| | |
|
| | | public Integer getFreeShipment() {
|
| | | return freeShipment;
|
| | | }
|
| | |
|
| | | public void setFreeShipment(Integer freeShipment) {
|
| | | this.freeShipment = freeShipment;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.taobao;
|
| | |
|
| | | import javax.persistence.Column;
|
| | | import javax.persistence.Entity;
|
| | | import javax.persistence.GeneratedValue;
|
| | | import javax.persistence.GenerationType;
|
| | | import javax.persistence.Id;
|
| | | import javax.persistence.JoinColumn;
|
| | | import javax.persistence.ManyToOne;
|
| | | import javax.persistence.Table;
|
| | | import javax.persistence.Transient;
|
| | |
|
| | | import com.yeshi.fanli.base.entity.goods.TaoBaoGoodsBrief;
|
| | |
|
| | | @Entity
|
| | | @Table(name="yeshi_ec_taobao_link")
|
| | | public class TaoBaoLink {
|
| | | /**
|
| | | * 淘宝ID
|
| | | */
|
| | | @Id
|
| | | @GeneratedValue(strategy=GenerationType.AUTO)
|
| | | @Column(name="id")
|
| | | private Long id;
|
| | | |
| | | @Column(name="auctionId")
|
| | | private Long auctionId;
|
| | | |
| | | @ManyToOne
|
| | | @JoinColumn(name="sid")
|
| | | private System system;
|
| | | |
| | | /**
|
| | | * 淘宝token
|
| | | */
|
| | | @Column(name="taoToken",length=50)
|
| | | private String taoToken;
|
| | | |
| | | /**
|
| | | * 淘宝券链�? |
| | | */
|
| | | @Column(name="couponLink",length=512,insertable=true)
|
| | | private String couponLink;
|
| | | |
| | | /**
|
| | | * 淘宝推广链接
|
| | | */
|
| | | @Column(name="clickUrl",length=512)
|
| | | private String clickUrl;
|
| | | |
| | |
|
| | | @Transient
|
| | | private TaoBaoGoodsBrief goods;
|
| | |
|
| | | public TaoBaoGoodsBrief getGoods() {
|
| | | return goods;
|
| | | }
|
| | |
|
| | | public void setGoods(TaoBaoGoodsBrief goods) {
|
| | | this.goods = goods;
|
| | | }
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public String getTaoToken() {
|
| | | return taoToken;
|
| | | }
|
| | |
|
| | | public void setTaoToken(String taoToken) {
|
| | | this.taoToken = taoToken;
|
| | | }
|
| | |
|
| | | public System getSystem() {
|
| | | return system;
|
| | | }
|
| | |
|
| | | public void setSystem(System system) {
|
| | | this.system = system;
|
| | | }
|
| | |
|
| | | public Long getAuctionId() {
|
| | | return auctionId;
|
| | | }
|
| | |
|
| | | public void setAuctionId(Long auctionId) {
|
| | | this.auctionId = auctionId;
|
| | | }
|
| | |
|
| | | public String getCouponLink() {
|
| | | return couponLink;
|
| | | }
|
| | |
|
| | | public void setCouponLink(String couponLink) {
|
| | | this.couponLink = couponLink;
|
| | | }
|
| | |
|
| | | public String getClickUrl() {
|
| | | return clickUrl;
|
| | | }
|
| | |
|
| | | public void setClickUrl(String clickUrl) {
|
| | | this.clickUrl = clickUrl;
|
| | | }
|
| | | |
| | | |
| | | |
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.taobao;
|
| | |
|
| | | import java.io.Serializable;
|
| | | import java.util.Date;
|
| | |
|
| | | import javax.persistence.Column;
|
| | | import javax.persistence.Entity;
|
| | | import javax.persistence.GeneratedValue;
|
| | | import javax.persistence.GenerationType;
|
| | | import javax.persistence.Id;
|
| | | import javax.persistence.JoinColumn;
|
| | | import javax.persistence.Table;
|
| | |
|
| | | /**
|
| | | * 官方推荐商品库投放ID列表:(不定期更新)
|
| | | * |
| | | * @author yj
|
| | | *
|
| | | * @date 2018年8月24日
|
| | | */
|
| | | @Entity
|
| | | @Table(name = "yeshi_ec_taobao_meterial")
|
| | | @org.yeshi.utils.mybatis.Table("yeshi_ec_taobao_meterial")
|
| | | public class TaoBaoMeterial implements Serializable{
|
| | |
|
| | | |
| | | /**
|
| | | * |
| | | */
|
| | | private static final long serialVersionUID = 1L;
|
| | |
|
| | | @Id
|
| | | @Column(name = "tm_id")
|
| | | @GeneratedValue(strategy = GenerationType.AUTO)
|
| | | @org.yeshi.utils.mybatis.Column(name = "tm_id")
|
| | | private Long id;
|
| | |
|
| | | @JoinColumn(name = "tm_class_name")
|
| | | @org.yeshi.utils.mybatis.Column(name = "tm_class_name")
|
| | | private String className;// 名称
|
| | |
|
| | | @JoinColumn(name = "tm_super_name")
|
| | | @org.yeshi.utils.mybatis.Column(name = "tm_super_name")
|
| | | private String superName; // 上级类目
|
| | |
|
| | | @JoinColumn(name = "tm_material_id")
|
| | | @org.yeshi.utils.mybatis.Column(name = "tm_material_id")
|
| | | private Integer materialId; // 通用物料id
|
| | |
|
| | |
|
| | | @JoinColumn(name = "tm_createtime")
|
| | | @org.yeshi.utils.mybatis.Column(name = "tm_createtime")
|
| | | private Date createtime; // 创建时间
|
| | |
|
| | | @JoinColumn(name = "tm_updatetime")
|
| | | @org.yeshi.utils.mybatis.Column(name = "tm_updatetime")
|
| | | private Date updatetime; // 更新时间(修改时间)
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public String getClassName() {
|
| | | return className;
|
| | | }
|
| | |
|
| | | public void setClassName(String className) {
|
| | | this.className = className;
|
| | | }
|
| | |
|
| | | public String getSuperName() {
|
| | | return superName;
|
| | | }
|
| | |
|
| | | public void setSuperName(String superName) {
|
| | | this.superName = superName;
|
| | | }
|
| | |
|
| | | public Integer getMaterialId() {
|
| | | return materialId;
|
| | | }
|
| | |
|
| | | public void setMaterialId(Integer materialId) {
|
| | | this.materialId = materialId;
|
| | | }
|
| | |
|
| | | public Date getCreatetime() {
|
| | | return createtime;
|
| | | }
|
| | |
|
| | | public void setCreatetime(Date createtime) {
|
| | | this.createtime = createtime;
|
| | | }
|
| | |
|
| | | public Date getUpdatetime() {
|
| | | return updatetime;
|
| | | }
|
| | |
|
| | | public void setUpdatetime(Date updatetime) {
|
| | | this.updatetime = updatetime;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.taobao;
|
| | |
|
| | | import org.springframework.data.annotation.Id;
|
| | | import org.springframework.data.annotation.PersistenceConstructor;
|
| | | import org.springframework.data.mongodb.core.mapping.Document;
|
| | |
|
| | | /**
|
| | | * 淘宝店铺信息
|
| | | * |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | @Document(collection = "tbShopInfo")
|
| | | public class TaoBaoShopInfo {
|
| | | @Id
|
| | | private Long userId;// 店铺ID
|
| | | private String shopTitle;// 店铺标题
|
| | | private String shopType;// 店铺类型 B-天猫 C-淘宝
|
| | | private String sellerNick;// 卖家昵称
|
| | | private String pictureUrl;// 店铺图标
|
| | | private String shopUrl;// 店铺地址
|
| | | |
| | | private String userType;// 店铺类型 1-天猫 0-淘宝()
|
| | | |
| | |
|
| | | public TaoBaoShopInfo() {
|
| | |
|
| | | }
|
| | |
|
| | | @PersistenceConstructor
|
| | | public TaoBaoShopInfo(Long userId, String shopTitle, String shopType, String sellerNick, String pictureUrl,
|
| | | String shopUrl) {
|
| | | this.userId = userId;
|
| | | this.shopTitle = shopTitle;
|
| | | this.shopType = shopType;
|
| | | this.sellerNick = sellerNick;
|
| | | this.pictureUrl = pictureUrl;
|
| | | this.shopUrl = shopUrl;
|
| | | }
|
| | |
|
| | | public Long getUserId() {
|
| | | return userId;
|
| | | }
|
| | |
|
| | | public void setUserId(Long userId) {
|
| | | this.userId = userId;
|
| | | }
|
| | |
|
| | | public String getShopTitle() {
|
| | | return shopTitle;
|
| | | }
|
| | |
|
| | | public void setShopTitle(String shopTitle) {
|
| | | this.shopTitle = shopTitle;
|
| | | }
|
| | |
|
| | | public String getShopType() {
|
| | | return shopType;
|
| | | }
|
| | |
|
| | | public void setShopType(String shopType) {
|
| | | this.shopType = shopType;
|
| | | }
|
| | |
|
| | | public String getSellerNick() {
|
| | | return sellerNick;
|
| | | }
|
| | |
|
| | | public void setSellerNick(String sellerNick) {
|
| | | this.sellerNick = sellerNick;
|
| | | }
|
| | |
|
| | | public String getPictureUrl() {
|
| | | return pictureUrl;
|
| | | }
|
| | |
|
| | | public void setPictureUrl(String pictureUrl) {
|
| | | this.pictureUrl = pictureUrl;
|
| | | }
|
| | |
|
| | | public String getShopUrl() {
|
| | | return shopUrl;
|
| | | }
|
| | |
|
| | | public void setShopUrl(String shopUrl) {
|
| | | this.shopUrl = shopUrl;
|
| | | }
|
| | |
|
| | | public String getUserType() {
|
| | | return userType;
|
| | | }
|
| | |
|
| | | public void setUserType(String userType) {
|
| | | this.userType = userType;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.taobao;
|
| | |
|
| | | import java.io.Serializable;
|
| | |
|
| | | import org.yeshi.utils.mybatis.Column;
|
| | | import org.yeshi.utils.mybatis.Table;
|
| | |
|
| | | /**
|
| | | * 淘宝联盟的参数配置
|
| | | * |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | @Table("yeshi_ec_taobao_union_config")
|
| | | public class TaoBaoUnionConfig implements Serializable{
|
| | | /**
|
| | | * |
| | | */
|
| | | private static final long serialVersionUID = 1L;
|
| | | |
| | | public final static int TYPE_ANDROID = 1;
|
| | | public final static int TYPE_IOS = 2;
|
| | | public final static int TYPE_SHARE = 0;
|
| | | @Column(name = "tc_id")
|
| | | private Long id;
|
| | | @Column(name = "tc_account")
|
| | | private String account;
|
| | | @Column(name = "tc_account_id")
|
| | | private String accountId;
|
| | | @Column(name = "tc_appkey")
|
| | | private String appKey;
|
| | | @Column(name = "tc_appsecret")
|
| | | private String appSecret;
|
| | | @Column(name = "tc_appid")
|
| | | private String appId;
|
| | | @Column(name = "tc_default_pid")
|
| | | private String defaultPid;
|
| | | @Column(name = "tc_beizhu")
|
| | | private String beizhu;
|
| | | @Column(name = "tc_appname")
|
| | | private String appName;
|
| | | @Column(name = "tc_type")
|
| | | private Integer type;
|
| | |
|
| | | public TaoBaoUnionConfig() {
|
| | |
|
| | | }
|
| | |
|
| | | public TaoBaoUnionConfig(String account, String accountId, String appKey, String appSecret, String appId,
|
| | | String defaultPid, String beizhu, String appName, Integer type) {
|
| | | this.account = account;
|
| | | this.accountId = accountId;
|
| | | this.appKey = appKey;
|
| | | this.appSecret = appSecret;
|
| | | this.appId = appId;
|
| | | this.defaultPid = defaultPid;
|
| | | this.beizhu = beizhu;
|
| | | this.appName = appName;
|
| | | this.type = type;
|
| | | }
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public String getAccount() {
|
| | | return account;
|
| | | }
|
| | |
|
| | | public void setAccount(String account) {
|
| | | this.account = account;
|
| | | }
|
| | |
|
| | | public String getAccountId() {
|
| | | return accountId;
|
| | | }
|
| | |
|
| | | public void setAccountId(String accountId) {
|
| | | this.accountId = accountId;
|
| | | }
|
| | |
|
| | | public String getAppKey() {
|
| | | return appKey;
|
| | | }
|
| | |
|
| | | public void setAppKey(String appKey) {
|
| | | this.appKey = appKey;
|
| | | }
|
| | |
|
| | | public String getAppSecret() {
|
| | | return appSecret;
|
| | | }
|
| | |
|
| | | public void setAppSecret(String appSecret) {
|
| | | this.appSecret = appSecret;
|
| | | }
|
| | |
|
| | | public String getAppId() {
|
| | | return appId;
|
| | | }
|
| | |
|
| | | public void setAppId(String appId) {
|
| | | this.appId = appId;
|
| | | }
|
| | |
|
| | | public String getDefaultPid() {
|
| | | return defaultPid;
|
| | | }
|
| | |
|
| | | public void setDefaultPid(String defaultPid) {
|
| | | this.defaultPid = defaultPid;
|
| | | }
|
| | |
|
| | | public String getBeizhu() {
|
| | | return beizhu;
|
| | | }
|
| | |
|
| | | public void setBeizhu(String beizhu) {
|
| | | this.beizhu = beizhu;
|
| | | }
|
| | |
|
| | | public String getAppName() {
|
| | | return appName;
|
| | | }
|
| | |
|
| | | public void setAppName(String appName) {
|
| | | this.appName = appName;
|
| | | }
|
| | |
|
| | | public Integer getType() {
|
| | | return type;
|
| | | }
|
| | |
|
| | | public void setType(Integer type) {
|
| | | this.type = type;
|
| | | }
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.usergoods;
|
| | |
|
| | | import java.math.BigDecimal;
|
| | | import java.util.Date;
|
| | |
|
| | | import javax.persistence.Column;
|
| | | import javax.persistence.Entity;
|
| | | import javax.persistence.FetchType;
|
| | | import javax.persistence.GeneratedValue;
|
| | | import javax.persistence.GenerationType;
|
| | | import javax.persistence.Id;
|
| | | import javax.persistence.JoinColumn;
|
| | | import javax.persistence.ManyToOne;
|
| | | import javax.persistence.Table;
|
| | | import javax.persistence.Transient;
|
| | |
|
| | | import org.hibernate.annotations.Type;
|
| | |
|
| | | import com.google.gson.annotations.Expose;
|
| | | import org.fanli.facade.system.entity.common.SystemManage;
|
| | |
|
| | | /**
|
| | | * 浏览足记
|
| | | * |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | @Entity
|
| | | @Table(name = "yeshi_ec_scanhistory")
|
| | | public class ScanHistory {
|
| | | @Id
|
| | | @GeneratedValue(strategy = GenerationType.AUTO)
|
| | | @Column(name = "id")
|
| | | @Expose
|
| | | private long id;
|
| | |
|
| | | @Column(length = 100)
|
| | | private String device;
|
| | |
|
| | | @ManyToOne(fetch = FetchType.EAGER)
|
| | | @JoinColumn(name = "systemid")
|
| | | private SystemManage system;
|
| | |
|
| | | private Long uid; //用户id
|
| | | |
| | | public Long getUid() {
|
| | | return uid;
|
| | | }
|
| | |
|
| | | public void setUid(Long uid) {
|
| | | this.uid = uid;
|
| | | }
|
| | |
|
| | | public String getDevice() {
|
| | | return device;
|
| | | }
|
| | |
|
| | | public void setDevice(String device) {
|
| | | this.device = device;
|
| | | }
|
| | |
|
| | | public SystemManage getSystem() {
|
| | | return system;
|
| | | }
|
| | |
|
| | | public void setSystem(SystemManage system) {
|
| | | this.system = system;
|
| | | }
|
| | |
|
| | | @Expose
|
| | | private int rootCatId;// 0,
|
| | | @Expose
|
| | | private int eventCreatorId;// 0,
|
| | | @Expose
|
| | | private int leafCatId;// 50011277,
|
| | | @Column(length = 50)
|
| | | @Expose
|
| | | private String debugInfo;// null,
|
| | | @Expose
|
| | | private int rootCatScore;// 0,
|
| | | @Expose
|
| | | private long sellerId;// 卖家Id
|
| | | @Expose
|
| | | private int userType;// 0,
|
| | | @Column(length = 256)
|
| | | @Expose
|
| | | private String shopTitle;// 店铺名称
|
| | | @Column(length = 256)
|
| | | @Expose
|
| | | private String pictUrl;// 主图链接
|
| | | @Column(length = 256)
|
| | | @Expose
|
| | | private String title;// 商品标题
|
| | | @Expose
|
| | | private long auctionId;// 商品ID
|
| | | @Column(length = 256)
|
| | | @Expose
|
| | | private String couponLink;// 优惠券链�? |
| | | @Column(length = 256)
|
| | | @Expose
|
| | | private String couponLinkTaoToken;//
|
| | | @Column(length = 128)
|
| | | @Expose
|
| | | private String couponActivityId;//
|
| | | @Expose
|
| | | private int biz30day;// 4125,
|
| | | @Transient
|
| | | @Expose
|
| | | private String salesCount;
|
| | | @Expose
|
| | | private BigDecimal tkRate;// 佣金比例 �?��100
|
| | | @Column(length = 50)
|
| | | @Expose
|
| | | private String nick;// "yoyo_808611",
|
| | | @Expose
|
| | | private int includeDxjh;// 1,
|
| | | @Expose
|
| | | private BigDecimal reservePrice;// 588,
|
| | | @Expose
|
| | | private BigDecimal tkCommFee;// 32.04,
|
| | | @Expose
|
| | | private BigDecimal totalFee;// 4814.43,
|
| | | @Expose
|
| | | private int totalNum;// 229,
|
| | | @Expose
|
| | | private BigDecimal zkPrice;// 无线价格
|
| | | @Expose
|
| | | private int dayLeft;// -17228,
|
| | | @Column(length = 50)
|
| | | @Expose
|
| | | private String tk3rdRate;// null,
|
| | | @Column(length = 128)
|
| | | @Expose
|
| | | private String auctionUrl;// 商品链接
|
| | | @Expose
|
| | | private double rlRate;// 69.72,
|
| | | @Expose
|
| | | private int hasRecommended;// 0,
|
| | | @Expose
|
| | | private int hasSame;// 0,
|
| | | @Expose
|
| | | private long sameItemPid;// "-232381821",
|
| | | @Expose
|
| | | private int couponTotalCount;// 优惠券�?�? |
| | | @Expose
|
| | | private int couponLeftCount;// 优惠券剩余数�? |
| | | @Expose
|
| | | private BigDecimal couponAmount;// 优惠金额
|
| | | @Column(length = 50)
|
| | | @Expose
|
| | | private String eventRate;// null,
|
| | | @Column(length = 128)
|
| | | @Expose
|
| | | private String couponShortLink;// 优惠券短�? |
| | | @Column(length = 50)
|
| | | @Expose
|
| | | private String couponInfo;// 优惠券信�? |
| | | @Expose
|
| | | private BigDecimal couponStartFee;// 优惠券起始优�? |
| | | @Column(length = 20)
|
| | | @Expose
|
| | | private String couponEffectiveStartTime;// "2017-02-04",优惠券开始时�? |
| | | @Column(length = 20)
|
| | | @Expose
|
| | | private String couponEffectiveEndTime;// 优惠券结束时�? |
| | | @Column(length = 10)
|
| | | @Expose
|
| | | private String hasUmpBonus;// null,
|
| | | @Column(length = 10)
|
| | | @Expose
|
| | | private String isBizActivity;// null,
|
| | | @Column(length = 10)
|
| | | @Expose
|
| | | private String umpBonus;// null,
|
| | | @Column(length = 30)
|
| | | @Expose
|
| | | private String rootCategoryName;// 根分�? |
| | | @Column(length = 128)
|
| | | @Expose
|
| | | private String couponOriLink;// 优惠券原始链�? |
| | | @Column(length = 30)
|
| | | @Expose
|
| | | private String userTypeName;// 用户类型
|
| | | |
| | | @Type(type="date")
|
| | | private Date createtime;
|
| | | |
| | | @Column(length = 1)
|
| | | @Expose
|
| | | private int state;// 0默认 �?删除
|
| | | |
| | | public ScanHistory() {
|
| | | }
|
| | |
|
| | | public ScanHistory(long id) {
|
| | | super();
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public ScanHistory(String shopTitle) {
|
| | | super();
|
| | | this.shopTitle = shopTitle;
|
| | | }
|
| | | |
| | | public int getState() {
|
| | | return state;
|
| | | }
|
| | |
|
| | | public void setState(int state) {
|
| | | this.state = state;
|
| | | }
|
| | |
|
| | | public Date getCreatetime() {
|
| | | return createtime;
|
| | | }
|
| | |
|
| | | public void setCreatetime(Date createtime) {
|
| | | this.createtime = createtime;
|
| | | }
|
| | |
|
| | | public int getRootCatId() {
|
| | | return rootCatId;
|
| | | }
|
| | |
|
| | | public void setRootCatId(int rootCatId) {
|
| | | this.rootCatId = rootCatId;
|
| | | }
|
| | |
|
| | | public int getEventCreatorId() {
|
| | | return eventCreatorId;
|
| | | }
|
| | |
|
| | | public void setEventCreatorId(int eventCreatorId) {
|
| | | this.eventCreatorId = eventCreatorId;
|
| | | }
|
| | |
|
| | | public int getLeafCatId() {
|
| | | return leafCatId;
|
| | | }
|
| | |
|
| | | public void setLeafCatId(int leafCatId) {
|
| | | this.leafCatId = leafCatId;
|
| | | }
|
| | |
|
| | | public String getDebugInfo() {
|
| | | return debugInfo;
|
| | | }
|
| | |
|
| | | public void setDebugInfo(String debugInfo) {
|
| | | this.debugInfo = debugInfo;
|
| | | }
|
| | |
|
| | | public int getRootCatScore() {
|
| | | return rootCatScore;
|
| | | }
|
| | |
|
| | | public void setRootCatScore(int rootCatScore) {
|
| | | this.rootCatScore = rootCatScore;
|
| | | }
|
| | |
|
| | | public long getSellerId() {
|
| | | return sellerId;
|
| | | }
|
| | |
|
| | | public void setSellerId(long sellerId) {
|
| | | this.sellerId = sellerId;
|
| | | }
|
| | |
|
| | | public int getUserType() {
|
| | | return userType;
|
| | | }
|
| | |
|
| | | public void setUserType(int userType) {
|
| | | this.userType = userType;
|
| | | }
|
| | |
|
| | | public String getShopTitle() {
|
| | | return shopTitle;
|
| | | }
|
| | |
|
| | | public void setShopTitle(String shopTitle) {
|
| | | this.shopTitle = shopTitle;
|
| | | }
|
| | |
|
| | | public String getPictUrl() {
|
| | | return pictUrl;
|
| | | }
|
| | |
|
| | | public void setPictUrl(String pictUrl) {
|
| | | this.pictUrl = pictUrl;
|
| | | }
|
| | |
|
| | | public String getTitle() {
|
| | | return title;
|
| | | }
|
| | |
|
| | | public void setTitle(String title) {
|
| | | this.title = title;
|
| | | }
|
| | |
|
| | | public long getAuctionId() {
|
| | | return auctionId;
|
| | | }
|
| | |
|
| | | public void setAuctionId(long auctionId) {
|
| | | this.auctionId = auctionId;
|
| | | }
|
| | |
|
| | | public String getCouponLink() {
|
| | | return couponLink;
|
| | | }
|
| | |
|
| | | public void setCouponLink(String couponLink) {
|
| | | this.couponLink = couponLink;
|
| | | }
|
| | |
|
| | | public String getCouponLinkTaoToken() {
|
| | | return couponLinkTaoToken;
|
| | | }
|
| | |
|
| | | public void setCouponLinkTaoToken(String couponLinkTaoToken) {
|
| | | this.couponLinkTaoToken = couponLinkTaoToken;
|
| | | }
|
| | |
|
| | | public String getCouponActivityId() {
|
| | | return couponActivityId;
|
| | | }
|
| | |
|
| | | public void setCouponActivityId(String couponActivityId) {
|
| | | this.couponActivityId = couponActivityId;
|
| | | }
|
| | |
|
| | | public int getBiz30day() {
|
| | | return biz30day;
|
| | | }
|
| | |
|
| | | public void setBiz30day(int biz30day) {
|
| | | this.biz30day = biz30day;
|
| | | }
|
| | |
|
| | |
|
| | | public String getNick() {
|
| | | return nick;
|
| | | }
|
| | |
|
| | | public void setNick(String nick) {
|
| | | this.nick = nick;
|
| | | }
|
| | |
|
| | | public int getIncludeDxjh() {
|
| | | return includeDxjh;
|
| | | }
|
| | | public int getDayLeft() {
|
| | | return dayLeft;
|
| | | }
|
| | |
|
| | | public void setDayLeft(int dayLeft) {
|
| | | this.dayLeft = dayLeft;
|
| | | }
|
| | |
|
| | | public String getTk3rdRate() {
|
| | | return tk3rdRate;
|
| | | }
|
| | |
|
| | | public void setTk3rdRate(String tk3rdRate) {
|
| | | this.tk3rdRate = tk3rdRate;
|
| | | }
|
| | |
|
| | | public String getAuctionUrl() {
|
| | | return auctionUrl;
|
| | | }
|
| | |
|
| | | public void setAuctionUrl(String auctionUrl) {
|
| | | this.auctionUrl = auctionUrl;
|
| | | }
|
| | |
|
| | | public double getRlRate() {
|
| | | return rlRate;
|
| | | }
|
| | |
|
| | | public void setRlRate(double rlRate) {
|
| | | this.rlRate = rlRate;
|
| | | }
|
| | |
|
| | | public int getHasRecommended() {
|
| | | return hasRecommended;
|
| | | }
|
| | |
|
| | | public void setHasRecommended(int hasRecommended) {
|
| | | this.hasRecommended = hasRecommended;
|
| | | }
|
| | |
|
| | | public int getHasSame() {
|
| | | return hasSame;
|
| | | }
|
| | |
|
| | | public void setHasSame(int hasSame) {
|
| | | this.hasSame = hasSame;
|
| | | }
|
| | |
|
| | | public long getSameItemPid() {
|
| | | return sameItemPid;
|
| | | }
|
| | |
|
| | | public void setSameItemPid(long sameItemPid) {
|
| | | this.sameItemPid = sameItemPid;
|
| | | }
|
| | |
|
| | | public int getCouponTotalCount() {
|
| | | return couponTotalCount;
|
| | | }
|
| | |
|
| | | public void setCouponTotalCount(int couponTotalCount) {
|
| | | this.couponTotalCount = couponTotalCount;
|
| | | }
|
| | |
|
| | | public int getCouponLeftCount() {
|
| | | return couponLeftCount;
|
| | | }
|
| | |
|
| | | public void setCouponLeftCount(int couponLeftCount) {
|
| | | this.couponLeftCount = couponLeftCount;
|
| | | }
|
| | |
|
| | | public BigDecimal getCouponAmount() {
|
| | | return couponAmount;
|
| | | }
|
| | |
|
| | | public void setCouponAmount(BigDecimal couponAmount) {
|
| | | this.couponAmount = couponAmount;
|
| | | }
|
| | |
|
| | | public String getEventRate() {
|
| | | return eventRate;
|
| | | }
|
| | |
|
| | | public void setEventRate(String eventRate) {
|
| | | this.eventRate = eventRate;
|
| | | }
|
| | |
|
| | | public String getCouponShortLink() {
|
| | | return couponShortLink;
|
| | | }
|
| | |
|
| | | public void setCouponShortLink(String couponShortLink) {
|
| | | this.couponShortLink = couponShortLink;
|
| | | }
|
| | |
|
| | | public String getCouponInfo() {
|
| | | return couponInfo;
|
| | | }
|
| | |
|
| | | public void setCouponInfo(String couponInfo) {
|
| | | this.couponInfo = couponInfo;
|
| | | }
|
| | |
|
| | | public BigDecimal getTkRate() {
|
| | | return tkRate;
|
| | | }
|
| | |
|
| | | public void setTkRate(BigDecimal tkRate) {
|
| | | this.tkRate = tkRate;
|
| | | }
|
| | |
|
| | | public BigDecimal getReservePrice() {
|
| | | return reservePrice;
|
| | | }
|
| | |
|
| | | public void setReservePrice(BigDecimal reservePrice) {
|
| | | this.reservePrice = reservePrice;
|
| | | }
|
| | |
|
| | | public BigDecimal getTkCommFee() {
|
| | | return tkCommFee;
|
| | | }
|
| | |
|
| | | public void setTkCommFee(BigDecimal tkCommFee) {
|
| | | this.tkCommFee = tkCommFee;
|
| | | }
|
| | |
|
| | | public BigDecimal getTotalFee() {
|
| | | return totalFee;
|
| | | }
|
| | |
|
| | | public void setTotalFee(BigDecimal totalFee) {
|
| | | this.totalFee = totalFee;
|
| | | }
|
| | |
|
| | | public int getTotalNum() {
|
| | | return totalNum;
|
| | | }
|
| | |
|
| | | public void setTotalNum(int totalNum) {
|
| | | this.totalNum = totalNum;
|
| | | }
|
| | |
|
| | | public BigDecimal getZkPrice() {
|
| | | return zkPrice;
|
| | | }
|
| | |
|
| | | public void setZkPrice(BigDecimal zkPrice) {
|
| | | this.zkPrice = zkPrice;
|
| | | }
|
| | |
|
| | | public BigDecimal getCouponStartFee() {
|
| | | return couponStartFee;
|
| | | }
|
| | |
|
| | | public void setCouponStartFee(BigDecimal couponStartFee) {
|
| | | this.couponStartFee = couponStartFee;
|
| | | }
|
| | |
|
| | | public void setIncludeDxjh(int includeDxjh) {
|
| | | this.includeDxjh = includeDxjh;
|
| | | }
|
| | |
|
| | | public String getCouponEffectiveStartTime() {
|
| | | return couponEffectiveStartTime;
|
| | | }
|
| | |
|
| | | public void setCouponEffectiveStartTime(String couponEffectiveStartTime) {
|
| | | this.couponEffectiveStartTime = couponEffectiveStartTime;
|
| | | }
|
| | |
|
| | | public String getCouponEffectiveEndTime() {
|
| | | return couponEffectiveEndTime;
|
| | | }
|
| | |
|
| | | public void setCouponEffectiveEndTime(String couponEffectiveEndTime) {
|
| | | this.couponEffectiveEndTime = couponEffectiveEndTime;
|
| | | }
|
| | |
|
| | | public String getHasUmpBonus() {
|
| | | return hasUmpBonus;
|
| | | }
|
| | |
|
| | | public void setHasUmpBonus(String hasUmpBonus) {
|
| | | this.hasUmpBonus = hasUmpBonus;
|
| | | }
|
| | |
|
| | | public String getIsBizActivity() {
|
| | | return isBizActivity;
|
| | | }
|
| | |
|
| | | public void setIsBizActivity(String isBizActivity) {
|
| | | this.isBizActivity = isBizActivity;
|
| | | }
|
| | |
|
| | | public String getUmpBonus() {
|
| | | return umpBonus;
|
| | | }
|
| | |
|
| | | public void setUmpBonus(String umpBonus) {
|
| | | this.umpBonus = umpBonus;
|
| | | }
|
| | |
|
| | | public String getRootCategoryName() {
|
| | | return rootCategoryName;
|
| | | }
|
| | |
|
| | | public void setRootCategoryName(String rootCategoryName) {
|
| | | this.rootCategoryName = rootCategoryName;
|
| | | }
|
| | |
|
| | | public String getCouponOriLink() {
|
| | | return couponOriLink;
|
| | | }
|
| | |
|
| | | public void setCouponOriLink(String couponOriLink) {
|
| | | this.couponOriLink = couponOriLink;
|
| | | }
|
| | |
|
| | | public String getUserTypeName() {
|
| | | return userTypeName;
|
| | | }
|
| | |
|
| | | public void setUserTypeName(String userTypeName) {
|
| | | this.userTypeName = userTypeName;
|
| | | }
|
| | |
|
| | | public long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public String getSalesCount() {
|
| | | return salesCount;
|
| | | }
|
| | |
|
| | | public void setSalesCount(String salesCount) {
|
| | | this.salesCount = salesCount;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.usergoods;
|
| | |
|
| | | import java.util.Date;
|
| | |
|
| | | import org.yeshi.utils.mybatis.Column;
|
| | | import org.yeshi.utils.mybatis.Table;
|
| | |
|
| | | import com.yeshi.fanli.base.entity.goods.CommonGoods;
|
| | | import com.yeshi.fanli.base.entity.user.UserInfo;
|
| | |
|
| | | @Table("yeshi_ec_scanhistory_v2")
|
| | | public class ScanHistoryV2 {
|
| | | @Column(name = "s_id")
|
| | | private Long id;
|
| | | @Column(name = "s_device")
|
| | | private String device;
|
| | | @Column(name = "s_uid")
|
| | | private UserInfo userInfo;
|
| | | @Column(name = "s_common_goods_id")
|
| | | private CommonGoods commonGoods;
|
| | | @Column(name = "s_createtime")
|
| | | private Date createTime;
|
| | | @Column(name = "s_updatetime")
|
| | | private Date updateTime;
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public String getDevice() {
|
| | | return device;
|
| | | }
|
| | |
|
| | | public void setDevice(String device) {
|
| | | this.device = device;
|
| | | }
|
| | |
|
| | | public UserInfo getUserInfo() {
|
| | | return userInfo;
|
| | | }
|
| | |
|
| | | public void setUserInfo(UserInfo userInfo) {
|
| | | this.userInfo = userInfo;
|
| | | }
|
| | |
|
| | | public CommonGoods getCommonGoods() {
|
| | | return commonGoods;
|
| | | }
|
| | |
|
| | | public void setCommonGoods(CommonGoods commonGoods) {
|
| | | this.commonGoods = commonGoods;
|
| | | }
|
| | |
|
| | | public Date getCreateTime() {
|
| | | return createTime;
|
| | | }
|
| | |
|
| | | public void setCreateTime(Date createTime) {
|
| | | this.createTime = createTime;
|
| | | }
|
| | |
|
| | | public Date getUpdateTime() {
|
| | | return updateTime;
|
| | | }
|
| | |
|
| | | public void setUpdateTime(Date updateTime) {
|
| | | this.updateTime = updateTime;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.usergoods;
|
| | |
|
| | | import java.util.Date;
|
| | |
|
| | | import javax.persistence.Column;
|
| | | import javax.persistence.Entity;
|
| | | import javax.persistence.GeneratedValue;
|
| | | import javax.persistence.GenerationType;
|
| | | import javax.persistence.Id;
|
| | | import javax.persistence.Table;
|
| | | import javax.persistence.Transient;
|
| | |
|
| | | import com.google.gson.annotations.Expose;
|
| | |
|
| | | @Entity
|
| | | @Table(name = "yeshi_ec_spread_img")
|
| | | public class SpreadImg {
|
| | | |
| | | @Id
|
| | | @GeneratedValue(strategy = GenerationType.AUTO)
|
| | | @Column(name = "si_id")
|
| | | @Expose
|
| | | private long id;
|
| | | |
| | | @Expose
|
| | | @Column(name="si_url")
|
| | | private String url;
|
| | | |
| | | @Expose
|
| | | @Column(name="si_createtime")
|
| | | private Date createtime;
|
| | | |
| | | @Transient
|
| | | private String md5;
|
| | |
|
| | | public String getMd5() {
|
| | | return md5;
|
| | | }
|
| | |
|
| | | public void setMd5(String md5) {
|
| | | this.md5 = md5;
|
| | | }
|
| | |
|
| | | public long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public String getUrl() {
|
| | | return url;
|
| | | }
|
| | |
|
| | | public void setUrl(String url) {
|
| | | this.url = url;
|
| | | }
|
| | |
|
| | | public Date getCreatetime() {
|
| | | return createtime;
|
| | | }
|
| | |
|
| | | public void setCreatetime(Date createtime) {
|
| | | this.createtime = createtime;
|
| | | }
|
| | | |
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.usergoods;
|
| | |
|
| | | import java.util.Date;
|
| | |
|
| | | import org.yeshi.utils.mybatis.Column;
|
| | | import org.yeshi.utils.mybatis.Table;
|
| | |
|
| | | import com.yeshi.fanli.base.entity.goods.CommonGoods;
|
| | |
|
| | | @Table("yeshi_ec_user_goods_storage")
|
| | | public class UserGoodsStorage {
|
| | | |
| | | public static int STATE_NORMAL = 0;// 初始
|
| | | public static int STATE_SHARED = 1;// 1已分享
|
| | | |
| | | @Column(name = "guc_id")
|
| | | private Long id;
|
| | |
|
| | | // 商品
|
| | | @Column(name = "guc_common_id")
|
| | | private CommonGoods commonGoods;
|
| | |
|
| | | // 用户id
|
| | | @Column(name = "guc_uid")
|
| | | private Long uid;
|
| | |
|
| | | // 状态 0 初始 1已分享
|
| | | @Column(name = "guc_state")
|
| | | private Integer state;
|
| | |
|
| | | @Column(name = "guc_createtime")
|
| | | private Date createTime;
|
| | |
|
| | | @Column(name = "guc_updatetime")
|
| | | private Date updateTime;
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public CommonGoods getCommonGoods() {
|
| | | return commonGoods;
|
| | | }
|
| | |
|
| | | public void setCommonGoods(CommonGoods commonGoods) {
|
| | | this.commonGoods = commonGoods;
|
| | | }
|
| | |
|
| | | public Long getUid() {
|
| | | return uid;
|
| | | }
|
| | |
|
| | | public void setUid(Long uid) {
|
| | | this.uid = uid;
|
| | | }
|
| | |
|
| | | public Integer getState() {
|
| | | return state;
|
| | | }
|
| | |
|
| | | public void setState(Integer state) {
|
| | | this.state = state;
|
| | | }
|
| | |
|
| | | public Date getCreateTime() {
|
| | | return createTime;
|
| | | }
|
| | |
|
| | | public void setCreateTime(Date createTime) {
|
| | | this.createTime = createTime;
|
| | | }
|
| | |
|
| | | public Date getUpdateTime() {
|
| | | return updateTime;
|
| | | }
|
| | |
|
| | | public void setUpdateTime(Date updateTime) {
|
| | | this.updateTime = updateTime;
|
| | | }
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.usergoods;
|
| | |
|
| | | import java.math.BigDecimal;
|
| | | import java.util.Date;
|
| | |
|
| | | import org.yeshi.utils.mybatis.Column;
|
| | | import org.yeshi.utils.mybatis.Table;
|
| | |
|
| | | import com.google.gson.annotations.Expose;
|
| | | import com.yeshi.fanli.base.entity.goods.CommonGoods;
|
| | |
|
| | | @Table("yeshi_ec_share_goods_group")
|
| | | public class UserShareGoodsGroup {
|
| | |
|
| | | @Column(name = "gu_id")
|
| | | private Long id;
|
| | |
|
| | | // 记录id
|
| | | @Column(name = "gu_record_id")
|
| | | private Long recordId;
|
| | |
|
| | | // 商品
|
| | | @Column(name = "gu_common_goods_id")
|
| | | private CommonGoods commonGoods;
|
| | | |
| | | // 今日浏览
|
| | | @Expose
|
| | | @Column(name = "gu_today_browse")
|
| | | private Integer todayBrowse;
|
| | | |
| | | // 累计浏览
|
| | | @Expose
|
| | | @Column(name = "gu_total_browse")
|
| | | private Integer totalBrowse;
|
| | | |
| | | // 预计订单
|
| | | @Expose
|
| | | @Column(name = "gu_total_order")
|
| | | private Integer totalOrder;
|
| | | |
| | | // 预计收益
|
| | | @Expose
|
| | | @Column(name = "gu_total_money")
|
| | | private BigDecimal totalMoney;
|
| | | |
| | | // 浏览时间
|
| | | @Column(name = "gu_browse_time")
|
| | | private Date browseTime;
|
| | | |
| | | // 分享时间
|
| | | @Column(name = "gu_createtime")
|
| | | private Date createTime;
|
| | | |
| | | // 更新时间
|
| | | @Column(name = "gu_updatetime")
|
| | | private Date updateTime;
|
| | | |
| | | // 记录组中的总商品数量
|
| | | private int totalGoods;
|
| | | |
| | | public UserShareGoodsGroup(){}
|
| | | |
| | | public UserShareGoodsGroup(Long id){
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public Long getRecordId() {
|
| | | return recordId;
|
| | | }
|
| | |
|
| | | public void setRecordId(Long recordId) {
|
| | | this.recordId = recordId;
|
| | | }
|
| | |
|
| | |
|
| | | public CommonGoods getCommonGoods() {
|
| | | return commonGoods;
|
| | | }
|
| | |
|
| | | public void setCommonGoods(CommonGoods commonGoods) {
|
| | | this.commonGoods = commonGoods;
|
| | | }
|
| | |
|
| | | public Integer getTodayBrowse() {
|
| | | return todayBrowse;
|
| | | }
|
| | |
|
| | | public void setTodayBrowse(Integer todayBrowse) {
|
| | | this.todayBrowse = todayBrowse;
|
| | | }
|
| | |
|
| | | public Integer getTotalBrowse() {
|
| | | return totalBrowse;
|
| | | }
|
| | |
|
| | | public void setTotalBrowse(Integer totalBrowse) {
|
| | | this.totalBrowse = totalBrowse;
|
| | | }
|
| | |
|
| | | public Integer getTotalOrder() {
|
| | | return totalOrder;
|
| | | }
|
| | |
|
| | | public void setTotalOrder(Integer totalOrder) {
|
| | | this.totalOrder = totalOrder;
|
| | | }
|
| | |
|
| | | public BigDecimal getTotalMoney() {
|
| | | return totalMoney;
|
| | | }
|
| | |
|
| | | public void setTotalMoney(BigDecimal totalMoney) {
|
| | | this.totalMoney = totalMoney;
|
| | | }
|
| | |
|
| | | public Date getCreateTime() {
|
| | | return createTime;
|
| | | }
|
| | |
|
| | | public void setCreateTime(Date createTime) {
|
| | | this.createTime = createTime;
|
| | | }
|
| | |
|
| | | public Date getUpdateTime() {
|
| | | return updateTime;
|
| | | }
|
| | |
|
| | | public void setUpdateTime(Date updateTime) {
|
| | | this.updateTime = updateTime;
|
| | | }
|
| | |
|
| | | public int getTotalGoods() {
|
| | | return totalGoods;
|
| | | }
|
| | |
|
| | | public void setTotalGoods(int totalGoods) {
|
| | | this.totalGoods = totalGoods;
|
| | | }
|
| | |
|
| | | public Date getBrowseTime() {
|
| | | return browseTime;
|
| | | }
|
| | |
|
| | | public void setBrowseTime(Date browseTime) {
|
| | | this.browseTime = browseTime;
|
| | | }
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.usergoods;
|
| | |
|
| | | import java.math.BigDecimal;
|
| | | import java.util.Date;
|
| | |
|
| | | import javax.persistence.Transient;
|
| | |
|
| | | import org.yeshi.utils.mybatis.Column;
|
| | | import org.yeshi.utils.mybatis.Table;
|
| | |
|
| | | import com.yeshi.fanli.base.entity.user.UserInfo;
|
| | |
|
| | | /**
|
| | | * 用户分享商品记录
|
| | | * |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | @Table("yeshi_ec_share_goods_usershare")
|
| | | public class UserShareGoodsHistory {
|
| | |
|
| | | public final static int TYPE_TAOBAO = 1;
|
| | | @Column(name = "sgus_id")
|
| | | private Long id;
|
| | | @Column(name = "sgus_uid")
|
| | | private UserInfo user;
|
| | | @Column(name = "sgus_goods_type")
|
| | | private Integer goodsType;
|
| | | @Column(name = "sgus_goods_id")
|
| | | private Long goodsId;
|
| | | @Column(name = "sgus_post_picture")
|
| | | private String postPicture;
|
| | |
|
| | | @Column(name = "sgus_share_img")
|
| | | private String shareImg;
|
| | |
|
| | | @Column(name = "sgu_pictures")
|
| | | private String pictures;
|
| | | @Column(name = "sgu_hongbao")
|
| | | private BigDecimal hongbao;
|
| | | @Column(name = "sgu_link")
|
| | | private String link;
|
| | | @Column(name = "sgu_quanlink")
|
| | | private String quanLink;
|
| | | @Column(name = "sgu_tkcode")
|
| | | private String tkCode;
|
| | | @Column(name = "sgu_createtime")
|
| | | private Date createTime;
|
| | |
|
| | | @Transient
|
| | | private String shareImgMD5;
|
| | |
|
| | | public String getShareImgMD5() {
|
| | | return shareImgMD5;
|
| | | }
|
| | |
|
| | | public void setShareImgMD5(String shareImgMD5) {
|
| | | this.shareImgMD5 = shareImgMD5;
|
| | | }
|
| | |
|
| | | public String getShareImg() {
|
| | | return shareImg;
|
| | | }
|
| | |
|
| | | public void setShareImg(String shareImg) {
|
| | | this.shareImg = shareImg;
|
| | | }
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public UserInfo getUser() {
|
| | | return user;
|
| | | }
|
| | |
|
| | | public void setUser(UserInfo user) {
|
| | | this.user = user;
|
| | | }
|
| | |
|
| | | public Integer getGoodsType() {
|
| | | return goodsType;
|
| | | }
|
| | |
|
| | | public void setGoodsType(Integer goodsType) {
|
| | | this.goodsType = goodsType;
|
| | | }
|
| | |
|
| | | public Long getGoodsId() {
|
| | | return goodsId;
|
| | | }
|
| | |
|
| | | public void setGoodsId(Long goodsId) {
|
| | | this.goodsId = goodsId;
|
| | | }
|
| | |
|
| | | public String getPostPicture() {
|
| | | return postPicture;
|
| | | }
|
| | |
|
| | | public void setPostPicture(String postPicture) {
|
| | | this.postPicture = postPicture;
|
| | | }
|
| | |
|
| | | public String getPictures() {
|
| | | return pictures;
|
| | | }
|
| | |
|
| | | public void setPictures(String pictures) {
|
| | | this.pictures = pictures;
|
| | | }
|
| | |
|
| | | public BigDecimal getHongbao() {
|
| | | return hongbao;
|
| | | }
|
| | |
|
| | | public void setHongbao(BigDecimal hongbao) {
|
| | | this.hongbao = hongbao;
|
| | | }
|
| | |
|
| | | public String getLink() {
|
| | | return link;
|
| | | }
|
| | |
|
| | | public void setLink(String link) {
|
| | | this.link = link;
|
| | | }
|
| | |
|
| | | public String getQuanLink() {
|
| | | return quanLink;
|
| | | }
|
| | |
|
| | | public void setQuanLink(String quanLink) {
|
| | | this.quanLink = quanLink;
|
| | | }
|
| | |
|
| | | public String getTkCode() {
|
| | | return tkCode;
|
| | | }
|
| | |
|
| | | public void setTkCode(String tkCode) {
|
| | | this.tkCode = tkCode;
|
| | | }
|
| | |
|
| | | public Date getCreateTime() {
|
| | | return createTime;
|
| | | }
|
| | |
|
| | | public void setCreateTime(Date createTime) {
|
| | | this.createTime = createTime;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.entity.usergoods;
|
| | |
|
| | | import java.math.BigDecimal;
|
| | | import java.util.Date;
|
| | |
|
| | | import org.yeshi.utils.mybatis.Column;
|
| | | import org.yeshi.utils.mybatis.Table;
|
| | |
|
| | | import com.google.gson.annotations.Expose;
|
| | |
|
| | | @Table("yeshi_ec_share_goods_record")
|
| | | public class UserShareGoodsRecord {
|
| | |
|
| | | // 分享来源
|
| | | public enum ShareSourceTypeEnum {
|
| | | storage("选品库"), activity("动态"), goodsDetail("商品详情页");
|
| | | |
| | | private final String desc;
|
| | | |
| | | private ShareSourceTypeEnum(String desc) {
|
| | | this.desc = desc;
|
| | | }
|
| | |
|
| | | public String getDesc() {
|
| | | return desc;
|
| | | }
|
| | | }
|
| | | |
| | | public static String SHARETYPE_SINGLE = "single"; // 单个商品分享
|
| | | public static String SHARETYPE_GROUP = "group"; // 多商品分享
|
| | | |
| | | @Expose
|
| | | @Column(name = "sgr_id")
|
| | | private Long id;
|
| | |
|
| | | // 用户id
|
| | | @Expose
|
| | | @Column(name = "sgr_uid")
|
| | | private Long uid;
|
| | |
|
| | | // 分享来源
|
| | | @Expose
|
| | | @Column(name = "sgr_source")
|
| | | private ShareSourceTypeEnum source;
|
| | |
|
| | | // 显示主图
|
| | | @Expose
|
| | | @Column(name = "sgr_picture")
|
| | | private String picture;
|
| | | |
| | | // 显示标题内容
|
| | | @Expose
|
| | | @Column(name = "sgr_title")
|
| | | private String title;
|
| | | |
| | | // 是否已分享 状态:0初始值 1已分享
|
| | | @Expose
|
| | | @Column(name = "sgr_share_state")
|
| | | private Integer shareState;
|
| | | |
| | | // 分享时间
|
| | | @Column(name = "sgr_createtime")
|
| | | private Date createTime;
|
| | | |
| | | // 更新时间 : 单个商品重复分享时 只更新 不重复生成分享记录
|
| | | @Column(name = "sgr_updatetime")
|
| | | private Date updateTime;
|
| | | |
| | | // 分享时间
|
| | | private Long shareTime;
|
| | |
|
| | |
|
| | | // 分享类型
|
| | | @Expose
|
| | | private String shareType;
|
| | | |
| | | // 商品总数
|
| | | @Expose
|
| | | private int totalGoods;
|
| | | |
| | | // 今日浏览
|
| | | @Expose
|
| | | private int todayBrowse;
|
| | | |
| | | // 累计浏览
|
| | | @Expose
|
| | | private int totalBrowse;
|
| | | |
| | | // 商品总数
|
| | | @Expose
|
| | | private int totalOrder;
|
| | | |
| | | // 预计收益
|
| | | private BigDecimal revenueMoney;
|
| | | |
| | | // 显示收益
|
| | | @Expose
|
| | | private BigDecimal totalMoney;
|
| | |
|
| | |
|
| | | |
| | | public UserShareGoodsRecord(){}
|
| | | |
| | | public UserShareGoodsRecord(Long id){
|
| | | this.id = id;
|
| | | }
|
| | | |
| | | |
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public Long getUid() {
|
| | | return uid;
|
| | | }
|
| | |
|
| | | public void setUid(Long uid) {
|
| | | this.uid = uid;
|
| | | }
|
| | |
|
| | | public ShareSourceTypeEnum getSource() {
|
| | | return source;
|
| | | }
|
| | |
|
| | | public void setSource(ShareSourceTypeEnum source) {
|
| | | this.source = source;
|
| | | }
|
| | |
|
| | | public String getPicture() {
|
| | | return picture;
|
| | | }
|
| | |
|
| | | public void setPicture(String picture) {
|
| | | this.picture = picture;
|
| | | }
|
| | |
|
| | | public Date getCreateTime() {
|
| | | return createTime;
|
| | | }
|
| | |
|
| | | public void setCreateTime(Date createTime) {
|
| | | this.createTime = createTime;
|
| | | }
|
| | |
|
| | | public Date getUpdateTime() {
|
| | | return updateTime;
|
| | | }
|
| | |
|
| | | public void setUpdateTime(Date updateTime) {
|
| | | this.updateTime = updateTime;
|
| | | }
|
| | |
|
| | | public String getShareType() {
|
| | | return shareType;
|
| | | }
|
| | |
|
| | | public void setShareType(String shareType) {
|
| | | this.shareType = shareType;
|
| | | }
|
| | |
|
| | | public int getTotalGoods() {
|
| | | return totalGoods;
|
| | | }
|
| | |
|
| | | public void setTotalGoods(int totalGoods) {
|
| | | this.totalGoods = totalGoods;
|
| | | }
|
| | |
|
| | | public int getTodayBrowse() {
|
| | | return todayBrowse;
|
| | | }
|
| | |
|
| | | public void setTodayBrowse(int todayBrowse) {
|
| | | this.todayBrowse = todayBrowse;
|
| | | }
|
| | |
|
| | | public int getTotalBrowse() {
|
| | | return totalBrowse;
|
| | | }
|
| | |
|
| | | public void setTotalBrowse(int totalBrowse) {
|
| | | this.totalBrowse = totalBrowse;
|
| | | }
|
| | |
|
| | | public int getTotalOrder() {
|
| | | return totalOrder;
|
| | | }
|
| | |
|
| | | public void setTotalOrder(int totalOrder) {
|
| | | this.totalOrder = totalOrder;
|
| | | }
|
| | |
|
| | | public BigDecimal getTotalMoney() {
|
| | | return totalMoney;
|
| | | }
|
| | |
|
| | | public void setTotalMoney(BigDecimal totalMoney) {
|
| | | this.totalMoney = totalMoney;
|
| | | }
|
| | |
|
| | | public Long getShareTime() {
|
| | | return shareTime;
|
| | | }
|
| | |
|
| | | public void setShareTime(Long shareTime) {
|
| | | this.shareTime = shareTime;
|
| | | }
|
| | |
|
| | | public BigDecimal getRevenueMoney() {
|
| | | return revenueMoney;
|
| | | }
|
| | |
|
| | | public void setRevenueMoney(BigDecimal revenueMoney) {
|
| | | this.revenueMoney = revenueMoney;
|
| | | }
|
| | |
|
| | | public String getTitle() {
|
| | | return title;
|
| | | }
|
| | |
|
| | | public void setTitle(String title) {
|
| | | this.title = title;
|
| | | }
|
| | |
|
| | | public Integer getShareState() {
|
| | | return shareState;
|
| | | }
|
| | |
|
| | | public void setShareState(Integer shareState) {
|
| | | this.shareState = shareState;
|
| | | }
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.exception;
|
| | |
|
| | | public class ExistObjectException extends Exception {
|
| | |
|
| | | private static final long serialVersionUID = 572112205824229000L;
|
| | |
|
| | | public ExistObjectException() {
|
| | | }
|
| | | |
| | | public ExistObjectException(String msg) {
|
| | | super(msg);
|
| | | }
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.exception;
|
| | |
|
| | | public class NotExistObjectException extends Exception {
|
| | |
|
| | | private static final long serialVersionUID = 572112205824229000L;
|
| | |
|
| | | public NotExistObjectException() {
|
| | | }
|
| | | |
| | | public NotExistObjectException(String msg) {
|
| | | super(msg);
|
| | | }
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.exception; |
| | | |
| | | public class SMSException extends Exception { |
| | | /** |
| | | * |
| | | */ |
| | | private static final long serialVersionUID = 1L; |
| | | private int code; |
| | | private String msg; |
| | | |
| | | public int getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public String getMsg() { |
| | | return msg; |
| | | } |
| | | |
| | | public SMSException(int code, String msg) { |
| | | this.code = code; |
| | | this.msg = msg; |
| | | } |
| | | |
| | | public SMSException() { |
| | | } |
| | | |
| | | @Override |
| | | public String getMessage() { |
| | | return this.msg; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package org.fanli.facade.goods.exception.clazz; |
| | | |
| | | public class LabelClassException extends Exception { |
| | | |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | private int code; |
| | | private String msg; |
| | | |
| | | public int getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public String getMsg() { |
| | | return msg; |
| | | } |
| | | |
| | | public LabelClassException(int code, String msg) { |
| | | this.code = code; |
| | | this.msg = msg; |
| | | } |
| | | |
| | | public LabelClassException() { |
| | | } |
| | | |
| | | @Override |
| | | public String getMessage() { |
| | | return this.msg; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package org.fanli.facade.goods.exception.clazz; |
| | | |
| | | public class MergeClassException extends Exception { |
| | | |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | private int code; |
| | | private String msg; |
| | | |
| | | public int getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public String getMsg() { |
| | | return msg; |
| | | } |
| | | |
| | | public MergeClassException(int code, String msg) { |
| | | this.code = code; |
| | | this.msg = msg; |
| | | } |
| | | |
| | | public MergeClassException() { |
| | | } |
| | | |
| | | @Override |
| | | public String getMessage() { |
| | | return this.msg; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package org.fanli.facade.goods.exception.quality; |
| | | |
| | | public class BoutiqueAutoRuleException extends Exception { |
| | | /** |
| | | * |
| | | */ |
| | | private static final long serialVersionUID = 1L; |
| | | private int code; |
| | | private String msg; |
| | | |
| | | public int getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public String getMsg() { |
| | | return msg; |
| | | } |
| | | |
| | | public BoutiqueAutoRuleException(int code, String msg) { |
| | | this.code = code; |
| | | this.msg = msg; |
| | | } |
| | | |
| | | public BoutiqueAutoRuleException() { |
| | | } |
| | | |
| | | @Override |
| | | public String getMessage() { |
| | | return this.msg; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package org.fanli.facade.goods.exception.quality; |
| | | |
| | | public class QualityFactoryException extends Exception { |
| | | |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | private int code; |
| | | private String msg; |
| | | |
| | | public int getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public String getMsg() { |
| | | return msg; |
| | | } |
| | | |
| | | public QualityFactoryException(int code, String msg) { |
| | | this.code = code; |
| | | this.msg = msg; |
| | | } |
| | | |
| | | public QualityFactoryException() { |
| | | } |
| | | |
| | | @Override |
| | | public String getMessage() { |
| | | return this.msg; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package org.fanli.facade.goods.exception.quality; |
| | | |
| | | public class QualityFlashSaleException extends Exception { |
| | | |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | private int code; |
| | | private String msg; |
| | | |
| | | public int getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public String getMsg() { |
| | | return msg; |
| | | } |
| | | |
| | | public QualityFlashSaleException(int code, String msg) { |
| | | this.code = code; |
| | | this.msg = msg; |
| | | } |
| | | |
| | | public QualityFlashSaleException() { |
| | | } |
| | | |
| | | @Override |
| | | public String getMessage() { |
| | | return this.msg; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package org.fanli.facade.goods.exception.recommend; |
| | | |
| | | public class RecommendUserGoodsException extends Exception { |
| | | /** |
| | | * |
| | | */ |
| | | private static final long serialVersionUID = 1L; |
| | | private int code; |
| | | private String msg; |
| | | |
| | | public int getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public String getMsg() { |
| | | return msg; |
| | | } |
| | | |
| | | public RecommendUserGoodsException(int code, String msg) { |
| | | this.code = code; |
| | | this.msg = msg; |
| | | } |
| | | |
| | | public RecommendUserGoodsException() { |
| | | } |
| | | |
| | | @Override |
| | | public String getMessage() { |
| | | return this.msg; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package org.fanli.facade.goods.exception.taobao; |
| | | |
| | | public class CommonGoodsException extends Exception { |
| | | /** |
| | | * |
| | | */ |
| | | private static final long serialVersionUID = 1L; |
| | | private int code; |
| | | private String msg; |
| | | |
| | | public int getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public String getMsg() { |
| | | return msg; |
| | | } |
| | | |
| | | public CommonGoodsException(int code, String msg) { |
| | | this.code = code; |
| | | this.msg = msg; |
| | | } |
| | | |
| | | public CommonGoodsException() { |
| | | } |
| | | |
| | | @Override |
| | | public String getMessage() { |
| | | return this.msg; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package org.fanli.facade.goods.exception.taobao; |
| | | |
| | | public class LabelException extends Exception { |
| | | /** |
| | | * |
| | | */ |
| | | private static final long serialVersionUID = 1L; |
| | | private int code; |
| | | private String msg; |
| | | |
| | | public int getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public String getMsg() { |
| | | return msg; |
| | | } |
| | | |
| | | public LabelException(int code, String msg) { |
| | | this.code = code; |
| | | this.msg = msg; |
| | | } |
| | | |
| | | public LabelException() { |
| | | } |
| | | |
| | | @Override |
| | | public String getMessage() { |
| | | return this.msg; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package org.fanli.facade.goods.exception.taobao; |
| | | |
| | | public class LabelGoodsException extends Exception { |
| | | |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | private int code; |
| | | private String msg; |
| | | |
| | | public int getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public String getMsg() { |
| | | return msg; |
| | | } |
| | | |
| | | public LabelGoodsException(int code, String msg) { |
| | | this.code = code; |
| | | this.msg = msg; |
| | | } |
| | | |
| | | public LabelGoodsException() { |
| | | } |
| | | |
| | | @Override |
| | | public String getMessage() { |
| | | return this.msg; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package org.fanli.facade.goods.exception.taobao; |
| | | |
| | | //淘宝商品下架 |
| | | public class TaobaoGoodsDownException extends Exception { |
| | | /** |
| | | * |
| | | */ |
| | | private static final long serialVersionUID = 1L; |
| | | private int code; |
| | | private String msg; |
| | | |
| | | public int getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public String getMsg() { |
| | | return msg; |
| | | } |
| | | |
| | | public TaobaoGoodsDownException(int code, String msg) { |
| | | this.code = code; |
| | | this.msg = msg; |
| | | } |
| | | |
| | | public TaobaoGoodsDownException() { |
| | | } |
| | | |
| | | @Override |
| | | public String getMessage() { |
| | | return this.msg; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package org.fanli.facade.goods.exception.taobao; |
| | | |
| | | //淘宝商品更新异常 |
| | | public class TaobaoGoodsUpdateException extends Exception { |
| | | /** |
| | | * |
| | | */ |
| | | private static final long serialVersionUID = 1L; |
| | | private int code; |
| | | private String msg; |
| | | |
| | | public int getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public String getMsg() { |
| | | return msg; |
| | | } |
| | | |
| | | public TaobaoGoodsUpdateException(int code, String msg) { |
| | | this.code = code; |
| | | this.msg = msg; |
| | | } |
| | | |
| | | public TaobaoGoodsUpdateException() { |
| | | } |
| | | |
| | | @Override |
| | | public String getMessage() { |
| | | return this.msg; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package org.fanli.facade.goods.exception.taoke;
|
| | |
|
| | | import java.util.Map;
|
| | |
|
| | | /**
|
| | | * 淘客API异常
|
| | | * |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | public class TaoKeApiException extends Exception {
|
| | | // 淘宝APPkey的请求限制
|
| | | public static final int CODE_APPKEY_LIMIT = 1;
|
| | | // 无可用app
|
| | | public static final int CODE_NO_USE = 2;
|
| | | // api请求错误
|
| | | public static final int CODE_API_ERROR = 3;
|
| | | // 其他错误
|
| | | public static final int CODE_OTHER = 4;
|
| | |
|
| | | private int code;
|
| | | private String msg;
|
| | |
|
| | | private Map<String, String> params;
|
| | |
|
| | | public Map<String, String> getParams() {
|
| | | return params;
|
| | | }
|
| | |
|
| | | public void setParams(Map<String, String> params) {
|
| | | this.params = params;
|
| | | }
|
| | |
|
| | | public int getCode() {
|
| | | return code;
|
| | | }
|
| | |
|
| | | public void setCode(int code) {
|
| | | this.code = code;
|
| | | }
|
| | |
|
| | | public String getMsg() {
|
| | | return msg;
|
| | | }
|
| | |
|
| | | public void setMsg(String msg) {
|
| | | this.msg = msg;
|
| | | }
|
| | |
|
| | | public TaoKeApiException() {
|
| | |
|
| | | }
|
| | |
|
| | | public TaoKeApiException(int code, String msg) {
|
| | | this.code = code;
|
| | | this.msg = msg;
|
| | | }
|
| | |
|
| | | public TaoKeApiException(int code, String msg, Map<String, String> params) {
|
| | | this.code = code;
|
| | | this.msg = msg;
|
| | | this.params = params;
|
| | | }
|
| | |
|
| | | @Override
|
| | | public String getMessage() {
|
| | | return String.format("错误码为:%s 错误信息为:%s", code + "", msg);
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.exception.usergoods; |
| | | |
| | | public class CollectionGoodsException extends Exception { |
| | | /** |
| | | * |
| | | */ |
| | | private static final long serialVersionUID = 1L; |
| | | private int code; |
| | | private String msg; |
| | | |
| | | public int getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public String getMsg() { |
| | | return msg; |
| | | } |
| | | |
| | | public CollectionGoodsException(int code, String msg) { |
| | | this.code = code; |
| | | this.msg = msg; |
| | | } |
| | | |
| | | public CollectionGoodsException() { |
| | | } |
| | | |
| | | @Override |
| | | public String getMessage() { |
| | | return this.msg; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package org.fanli.facade.goods.exception.usergoods; |
| | | |
| | | public class ScanHistoryException extends Exception { |
| | | /** |
| | | * |
| | | */ |
| | | private static final long serialVersionUID = 1L; |
| | | private int code; |
| | | private String msg; |
| | | |
| | | public int getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public String getMsg() { |
| | | return msg; |
| | | } |
| | | |
| | | public ScanHistoryException(int code, String msg) { |
| | | this.code = code; |
| | | this.msg = msg; |
| | | } |
| | | |
| | | public ScanHistoryException() { |
| | | } |
| | | |
| | | @Override |
| | | public String getMessage() { |
| | | return this.msg; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package org.fanli.facade.goods.exception.usergoods;
|
| | |
|
| | | public class ShareGoodsException extends Exception {
|
| | | /**
|
| | | * |
| | | */
|
| | | private static final long serialVersionUID = 1L;
|
| | | private int code;
|
| | | private String msg;
|
| | |
|
| | | public int getCode() {
|
| | | return code;
|
| | | }
|
| | |
|
| | | public void setCode(int code) {
|
| | | this.code = code;
|
| | | }
|
| | |
|
| | | public String getMsg() {
|
| | | return msg;
|
| | | }
|
| | |
|
| | | public void setMsg(String msg) {
|
| | | this.msg = msg;
|
| | | }
|
| | |
|
| | | public ShareGoodsException() {
|
| | |
|
| | | }
|
| | |
|
| | | public ShareGoodsException(int code, String msg) {
|
| | | this.code = code;
|
| | | this.msg = msg;
|
| | | }
|
| | |
|
| | | @Override
|
| | | public String getMessage() {
|
| | | return this.msg;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.exception.usergoods; |
| | | |
| | | public class UserGoodsStorageException extends Exception { |
| | | /** |
| | | * |
| | | */ |
| | | private static final long serialVersionUID = 1L; |
| | | private int code; |
| | | private String msg; |
| | | |
| | | public int getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public String getMsg() { |
| | | return msg; |
| | | } |
| | | |
| | | public UserGoodsStorageException(int code, String msg) { |
| | | this.code = code; |
| | | this.msg = msg; |
| | | } |
| | | |
| | | public UserGoodsStorageException() { |
| | | } |
| | | |
| | | @Override |
| | | public String getMessage() { |
| | | return this.msg; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package org.fanli.facade.goods.exception.usergoods; |
| | | |
| | | public class UserShareGoodsGroupException extends Exception { |
| | | /** |
| | | * |
| | | */ |
| | | private static final long serialVersionUID = 1L; |
| | | private int code; |
| | | private String msg; |
| | | |
| | | public int getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public String getMsg() { |
| | | return msg; |
| | | } |
| | | |
| | | public UserShareGoodsGroupException(int code, String msg) { |
| | | this.code = code; |
| | | this.msg = msg; |
| | | } |
| | | |
| | | public UserShareGoodsGroupException() { |
| | | } |
| | | |
| | | @Override |
| | | public String getMessage() { |
| | | return this.msg; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package org.fanli.facade.goods.exception.usergoods; |
| | | |
| | | public class UserShareGoodsRecordException extends Exception { |
| | | /** |
| | | * |
| | | */ |
| | | private static final long serialVersionUID = 1L; |
| | | private int code; |
| | | private String msg; |
| | | |
| | | public int getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public String getMsg() { |
| | | return msg; |
| | | } |
| | | |
| | | public UserShareGoodsRecordException(int code, String msg) { |
| | | this.code = code; |
| | | this.msg = msg; |
| | | } |
| | | |
| | | public UserShareGoodsRecordException() { |
| | | } |
| | | |
| | | @Override |
| | | public String getMessage() { |
| | | return this.msg; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package org.fanli.facade.goods.service.clazz;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import org.fanli.facade.goods.dto.clazz.GoodsClassAdmin;
|
| | | import org.fanli.facade.goods.entity.clazz.GoodsClass;
|
| | | import org.springframework.web.multipart.MultipartFile;
|
| | |
|
| | | public interface GoodsClassService {
|
| | | |
| | | public GoodsClass getGoodsClass(long gcid);
|
| | | |
| | | |
| | | public GoodsClass getGoodsClassCache(long gcid);
|
| | |
|
| | | public List<GoodsClassAdmin> getGoodsClassAdmins(int i, String platform,
|
| | | String packages, String key);
|
| | |
|
| | | public int getCount(String platform, String packages, String key);
|
| | |
|
| | | public Integer addGoodsClass(GoodsClass goodsClass);
|
| | |
|
| | | public void deleteGoodsClasss(long[] gcids);
|
| | |
|
| | | public Integer updateGoodsClass(GoodsClass goodsClass);
|
| | | /**
|
| | | * 获取所有分类
|
| | | * @return
|
| | | */
|
| | | public List<GoodsClass> getGoodsClassAll();
|
| | |
|
| | | /**
|
| | | * |
| | | * 方法说明: 通过id获取商品类型的Key
|
| | | * @author mawurui
|
| | | * createTime 2018年4月26日 下午3:51:56
|
| | | * @param id
|
| | | * @return
|
| | | */
|
| | | public String getKwById(Long id);
|
| | |
|
| | | /**
|
| | | * 上传图片
|
| | | * @param record
|
| | | * @param file
|
| | | * @return
|
| | | * @throws Exception
|
| | | */
|
| | | public void uploadPicture(GoodsClass record, MultipartFile file) throws Exception;
|
| | | |
| | | /**
|
| | | * 新增类别
|
| | | * @param record
|
| | | * @param file
|
| | | * @return
|
| | | * @throws Exception
|
| | | */
|
| | | public long saveAdd(GoodsClass record, MultipartFile file) throws Exception;
|
| | |
|
| | | public void deleteGoodsClass(long id);
|
| | |
|
| | | public void removePicture(GoodsClass record) throws Exception;
|
| | | |
| | | |
| | | public List<GoodsClass> queryAll(String platform, String packages) throws Exception;
|
| | | |
| | | /**
|
| | | * 根据排序id查询
|
| | | * @param orderby
|
| | | * @return
|
| | | */
|
| | | public List<GoodsClass> getByorderby(int orderby);
|
| | |
|
| | | |
| | | /**
|
| | | * 查询所有
|
| | | * @return
|
| | | */
|
| | | public List<GoodsClass> queryAll();
|
| | |
|
| | | /**
|
| | | * 选择性更新
|
| | | * @param record
|
| | | * @return
|
| | | */
|
| | | public int updateByPrimaryKeySelective(GoodsClass record);
|
| | |
|
| | | public GoodsClass selectByPrimaryKey(Long gcid);
|
| | |
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.service.clazz;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import org.fanli.facade.goods.entity.clazz.GoodsSecondClass;
|
| | | import org.fanli.facade.goods.exception.NotExistObjectException;
|
| | |
|
| | | public interface GoodsSecondClassService {
|
| | | |
| | | public List<GoodsSecondClass> getGoodsSecondClassByGoodsClassId(long id);
|
| | |
|
| | | public List<GoodsSecondClass> getSecondClassList(int i, String key,
|
| | | long cid);
|
| | |
|
| | | public int getCount(long cid, String key);
|
| | |
|
| | | public void addSecondClass(GoodsSecondClass secondClass);
|
| | |
|
| | | public void deleteSecondClass(long sid);
|
| | |
|
| | | public GoodsSecondClass getSecondClass(long scid);
|
| | |
|
| | | public void updateSecondClass(GoodsSecondClass secondClass) throws NotExistObjectException;
|
| | |
|
| | | public void deleteSecondClassByGC(long id);
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.service.clazz;
|
| | |
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import org.fanli.facade.goods.entity.clazz.GoodsSubClass;
|
| | | import org.springframework.web.multipart.MultipartFile;
|
| | |
|
| | | import com.yeshi.fanli.base.dto.AcceptData;
|
| | |
|
| | |
|
| | |
|
| | | public interface GoodsSubClassService {
|
| | | |
| | | public int deleteByPrimaryKey(Long id);
|
| | |
|
| | | public int insert(GoodsSubClass record);
|
| | |
|
| | | public int insertSelective(GoodsSubClass record);
|
| | |
|
| | | public GoodsSubClass selectByPrimaryKey(Long id);
|
| | |
|
| | | public int updateByPrimaryKeySelective(GoodsSubClass record);
|
| | |
|
| | | public int updateByPrimaryKey(GoodsSubClass record);
|
| | | |
| | | /**
|
| | | * 批量删除
|
| | | * @param recordIds
|
| | | * @return
|
| | | */
|
| | | public void deleteByPrimaryKeyBatch(List<String> recordIds) throws Exception ;
|
| | |
|
| | | /**
|
| | | * 保存分类信息
|
| | | * @param record
|
| | | * @param file
|
| | | * @throws Exception
|
| | | */
|
| | | public int save(GoodsSubClass record, MultipartFile file) throws Exception;
|
| | |
|
| | | |
| | | /**
|
| | | * 上传图片文件 并更新对象信息
|
| | | * @param file |
| | | * @param record
|
| | | * @return
|
| | | * @throws Exception
|
| | | */
|
| | | public int uploadPicture(GoodsSubClass record, MultipartFile file) throws Exception;
|
| | | |
| | |
|
| | | /**
|
| | | * 删除图片文件 并更新对象信息
|
| | | * @param record
|
| | | * @return
|
| | | * @throws Exception
|
| | | */
|
| | | public int removePicture(GoodsSubClass record) throws Exception;
|
| | | |
| | | |
| | | /**
|
| | | * 查询一级之下的所有二级分类
|
| | | * @param rootId 一级id
|
| | | * @return
|
| | | * @throws Exception
|
| | | */
|
| | | public List<GoodsSubClass> queryByRootId(Long rootId, Integer state) throws Exception;
|
| | |
|
| | | /**
|
| | | * 查询二级分类之下其他分类
|
| | | * @param rootId 一级id
|
| | | * @return
|
| | | */
|
| | | public List<GoodsSubClass> queryByPid(Long pid, Integer state) throws Exception;
|
| | |
|
| | | /**
|
| | | * 删除类别 同时删除相应所有子类
|
| | | * @param recordId
|
| | | * @throws Exception
|
| | | */
|
| | | public void deleteSub(Long recordId) throws Exception;
|
| | |
|
| | | public void deleteByRootId(Long id) throws Exception;
|
| | |
|
| | | |
| | | /**
|
| | | * 二级分类
|
| | | * @param rootId
|
| | | * @return
|
| | | * @throws Exception
|
| | | */
|
| | | public List<GoodsSubClass> getGoodsSecondClass(Long rootId, Integer state) throws Exception;
|
| | |
|
| | | public List<GoodsSubClass> queryByRootIdAndWeight(Long rootId, int type, int weight) throws Exception;
|
| | |
|
| | | public List<GoodsSubClass> queryByPidAndWeight(Long pid, int type, int weight) throws Exception;
|
| | |
|
| | | public int countByRootId(Long rootId);
|
| | |
|
| | | public int countByPid(Long pid);
|
| | |
|
| | | /**
|
| | | * 统计一级之下的所有二级分类最大权重
|
| | | * @param rootId 一级id
|
| | | * @returnL
|
| | | */
|
| | | public int getMaxWeightByRootId(Long rootId);
|
| | |
|
| | | /**
|
| | | * 统计二级分类之下其他分类最大权重
|
| | | * @param rootId 一级id
|
| | | * @return
|
| | | */
|
| | | public int getMaxWeightByPid(Long pid);
|
| | |
|
| | | /**
|
| | | * 获取二级分类+ 加入缓存
|
| | | * @param rootId
|
| | | * @param state
|
| | | * @return
|
| | | * @throws Exception
|
| | | */
|
| | | public List<GoodsSubClass> getSubClassCache(Long rootId, Integer state) throws Exception;
|
| | |
|
| | | /**
|
| | | * 统计前端 点击次数
|
| | | * @param acceptData
|
| | | * @param record
|
| | | */
|
| | | public void countClick(AcceptData acceptData, GoodsSubClass record);
|
| | |
|
| | | |
| | | /**
|
| | | * 根据id获取 + 缓存
|
| | | * @param id
|
| | | * @return
|
| | | * @throws Exception
|
| | | */
|
| | | public GoodsSubClass getSubClassByPrimaryKeyCache(Long id) throws Exception;
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.service.clazz;
|
| | |
|
| | |
|
| | |
|
| | | import org.fanli.facade.goods.entity.clazz.MergeClass;
|
| | | import org.fanli.facade.goods.exception.clazz.MergeClassException;
|
| | |
|
| | | public interface MergeClassService {
|
| | | |
| | | /**
|
| | | * 插入对象
|
| | | * @param record
|
| | | * @return
|
| | | * @throws MergeClassException
|
| | | */
|
| | | public int insert(MergeClass record) throws MergeClassException;
|
| | | |
| | | /**
|
| | | * 更新当前对象所有数据
|
| | | * @param record
|
| | | * @return
|
| | | * @throws MergeClassException
|
| | | */
|
| | | public int updateByPrimaryKey(MergeClass record) throws MergeClassException;
|
| | | |
| | | /**
|
| | | * 选择性更新内容——不为空则更新该字段
|
| | | * @param record
|
| | | * @return
|
| | | * @throws MergeClassException
|
| | | */
|
| | | public int updateByPrimaryKeySelective(MergeClass record) throws MergeClassException;
|
| | | |
| | | /**
|
| | | * 根据id删除当前对象
|
| | | * @param id
|
| | | * @return
|
| | | * @throws MergeClassException
|
| | | */
|
| | | public int deleteByPrimaryKey(Long id) throws MergeClassException;
|
| | |
|
| | | |
| | | /**
|
| | | * 根据id查找当前对象
|
| | | * @param id
|
| | | * @return
|
| | | * @throws MergeClassException
|
| | | */
|
| | | public MergeClass selectByPrimaryKeyCache(Long id) throws MergeClassException;
|
| | |
|
| | | public MergeClass selectByPrimaryKey(Long id) throws MergeClassException;
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.service.clazz;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import org.fanli.facade.goods.entity.clazz.SuperGoodsClass;
|
| | |
|
| | | public interface SuperGoodsClassService {
|
| | | |
| | | public List<SuperGoodsClass> getSuperGoodsClassBySystemId(long id);
|
| | |
|
| | | public List<SuperGoodsClass> getSuperGoodsClasss(List<Long> gcIdList);
|
| | |
|
| | | public List<SuperGoodsClass> getSuperGoodsClassList(long id, int strat,
|
| | | int pAGE_SIZE, String likekey);
|
| | |
|
| | | public Integer deleteSuperGoodsClass(long gcid, String platform,
|
| | | String packageName);
|
| | |
|
| | | public void addSuperGoodsClass(long gcid, String platform,
|
| | | String packageName);
|
| | |
|
| | | public void deleteSuperGoodsClass(long gcid);
|
| | |
|
| | | public List<SuperGoodsClass> getSuperGoodsClassAll(long id);
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.service.clazz.taobao;
|
| | |
|
| | | import org.fanli.facade.goods.entity.clazz.taobao.TaoBaoClassRelation;
|
| | |
|
| | |
|
| | | public interface TaoBaoClassRelationService {
|
| | | |
| | | public int deleteByPrimaryKey(Long id);
|
| | |
|
| | | public int insert(TaoBaoClassRelation record);
|
| | |
|
| | | public int insertSelective(TaoBaoClassRelation record);
|
| | |
|
| | | public TaoBaoClassRelation selectByPrimaryKey(Long id);
|
| | |
|
| | | public int updateByPrimaryKeySelective(TaoBaoClassRelation record);
|
| | |
|
| | | public int updateByPrimaryKey(TaoBaoClassRelation record);
|
| | |
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.service.clazz.taobao;
|
| | |
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import org.fanli.facade.goods.entity.clazz.taobao.TaoBaoClass;
|
| | |
|
| | |
|
| | | public interface TaoBaoClassService {
|
| | | |
| | | public int deleteByPrimaryKey(Long id);
|
| | |
|
| | | public int insert(TaoBaoClass record);
|
| | |
|
| | | public int insertSelective(TaoBaoClass record);
|
| | |
|
| | | public TaoBaoClass selectByPrimaryKey(Long id);
|
| | |
|
| | | public int updateByPrimaryKeySelective(TaoBaoClass record);
|
| | |
|
| | | public int updateByPrimaryKey(TaoBaoClass record);
|
| | |
|
| | | public List<TaoBaoClass> listBySystemCid(long start, int count, Long systemCid);
|
| | |
|
| | | /**
|
| | | * 根据系统主类查询淘宝类目id
|
| | | * @param classId
|
| | | * @return
|
| | | */
|
| | | public String getTaoBaoCatIds(Long classId);
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.service.label;
|
| | |
|
| | |
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import org.fanli.facade.goods.entity.clazz.GoodsClass;
|
| | | import org.fanli.facade.goods.entity.clazz.GoodsSubClass;
|
| | | import org.fanli.facade.goods.entity.label.LabelClass;
|
| | | import org.fanli.facade.goods.exception.clazz.LabelClassException;
|
| | |
|
| | | public interface LabelClassService {
|
| | | |
| | | /**
|
| | | * 插入对象
|
| | | * @param record
|
| | | * @return
|
| | | * @throws LabelClassException
|
| | | */
|
| | | public int insert(LabelClass record) throws LabelClassException;
|
| | | |
| | | /**
|
| | | * 更新当前对象所有数据
|
| | | * @param record
|
| | | * @return
|
| | | * @throws LabelClassException
|
| | | */
|
| | | public int updateByPrimaryKey(LabelClass record) throws LabelClassException;
|
| | | |
| | | /**
|
| | | * 选择性更新内容——不为空则更新该字段
|
| | | * @param record
|
| | | * @return
|
| | | * @throws LabelClassException
|
| | | */
|
| | | public int updateByPrimaryKeySelective(LabelClass record) throws LabelClassException;
|
| | | |
| | | /**
|
| | | * 根据id删除当前对象
|
| | | * @param id
|
| | | * @return
|
| | | * @throws LabelClassException
|
| | | */
|
| | | public int deleteByPrimaryKey(Long id) throws LabelClassException;
|
| | |
|
| | | |
| | | /**
|
| | | * 根据id查找当前对象
|
| | | * @param id
|
| | | * @return
|
| | | * @throws LabelClassException
|
| | | */
|
| | | public LabelClass selectByPrimaryKey(Long id) throws LabelClassException;
|
| | |
|
| | | |
| | | /**
|
| | | * 对单个一级分类进行批量贴上标签
|
| | | * @param goodsClass
|
| | | * @param labIdList
|
| | | * @throws Exception
|
| | | */
|
| | | public void addBatchClass(GoodsClass goodsClass, List<Long> labIdList) throws Exception;
|
| | |
|
| | | |
| | | /**
|
| | | * 对单个子级分类进行批量贴上标签
|
| | | * @param goodsSubClass
|
| | | * @param labIdList
|
| | | * @throws Exception
|
| | | */
|
| | | public void addBatchSubClass(GoodsSubClass goodsSubClass, List<Long> labIdList) throws Exception;
|
| | |
|
| | | /**
|
| | | * 查询一级类对应标签
|
| | | * @param record
|
| | | * @return
|
| | | */
|
| | | public List<LabelClass> getByClassId(Long classId) throws LabelClassException;
|
| | |
|
| | | /**
|
| | | * 查询子类对应标签
|
| | | * @param record
|
| | | * @return
|
| | | */
|
| | | public List<LabelClass> getBySubClassId(Long classId) throws LabelClassException;
|
| | |
|
| | | /**
|
| | | * 查询一级类对应标签 -- 分页
|
| | | * @param record
|
| | | * @return
|
| | | */
|
| | | public List<LabelClass> queryByClassId(int start, int count, Long classId) throws LabelClassException;
|
| | | |
| | | public int getCountQueryByClassId(Long classId) throws LabelClassException;
|
| | |
|
| | | /**
|
| | | * 查询子类对应标签 -- 分页
|
| | | * @param record
|
| | | * @return
|
| | | */
|
| | | public List<LabelClass> queryBySubClassId(int start, int count, Long classId) throws LabelClassException;
|
| | | |
| | | public int getCountQueryBySubClassId(Long subClassId) throws LabelClassException;
|
| | |
|
| | | /**
|
| | | * 根据一级类别ID删除
|
| | | * @param recordId
|
| | | * @throws Exception
|
| | | */
|
| | | public int deleteByClassId(Long recordId) throws Exception;
|
| | |
|
| | | /**
|
| | | * 根据子类别ID删除
|
| | | * @param recordId
|
| | | * @return
|
| | | * @throws Exception
|
| | | */
|
| | | public int deleteBySubClassId(Long recordId) throws Exception;
|
| | | |
| | | |
| | | public List<LabelClass> queryBySubClassIdCache(int start, int count, Long classId) throws LabelClassException;
|
| | |
|
| | | /**
|
| | | * 获取分类关联标签id
|
| | | * @param start
|
| | | * @param count
|
| | | * @param classId
|
| | | * @return
|
| | | * @throws LabelClassException
|
| | | */
|
| | | public List<Long> getRelationLabIds(int start, int count, Long classId) throws LabelClassException;
|
| | |
|
| | | |
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.service.label;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import org.fanli.facade.goods.entity.label.LabelGoods;
|
| | | import org.fanli.facade.goods.exception.clazz.LabelClassException;
|
| | | import org.fanli.facade.goods.exception.taobao.LabelGoodsException;
|
| | |
|
| | | import com.yeshi.fanli.base.entity.admin.AdminUser;
|
| | | import com.yeshi.fanli.base.entity.goods.TaoBaoGoodsBrief;
|
| | |
|
| | | public interface LabelGoodsService {
|
| | |
|
| | | /**
|
| | | * 插入对象
|
| | | * |
| | | * @param record
|
| | | * @return
|
| | | * @throws LabelGoodsException
|
| | | */
|
| | | public int insertSelective(LabelGoods record) throws LabelGoodsException;
|
| | |
|
| | | /**
|
| | | * 根据id删除当前对象
|
| | | * |
| | | * @param id
|
| | | * @return
|
| | | * @throws LabelGoodsException
|
| | | */
|
| | | public int deleteByPrimaryKey(Long id) throws LabelGoodsException;
|
| | |
|
| | | /**
|
| | | * 根据id查找当前对象
|
| | | * |
| | | * @param id
|
| | | * @return
|
| | | * @throws LabelGoodsException
|
| | | */
|
| | | public LabelGoods selectByPrimaryKey(Long id) throws LabelGoodsException;
|
| | |
|
| | |
|
| | | /**
|
| | | * 根据id批量删除
|
| | | * |
| | | * @param ids
|
| | | */
|
| | | public int deleteBatchById(long[] ids) throws LabelGoodsException;
|
| | |
|
| | |
|
| | | /**
|
| | | * 根据商品id 删除商品对应的所有标签信息
|
| | | * |
| | | * @param ids
|
| | | * @throws LabelGoodsException
|
| | | */
|
| | | public void deleteByGoodsId(List<String> ids) throws LabelGoodsException;
|
| | |
|
| | |
|
| | | /**
|
| | | * 获取标签商品关联数量
|
| | | * |
| | | * @param labelId
|
| | | * @return
|
| | | * @throws LabelGoodsException
|
| | | */
|
| | | public Long getRelationNum(Long labelId) throws LabelGoodsException;
|
| | |
|
| | |
|
| | | public Long isExistence(Long goodsId, Long labId);
|
| | |
|
| | | public int deleteByGoodsIdAndLabId(Long goodsId, Long labId);
|
| | |
|
| | | /**
|
| | | * 查询商品对应标签 --分页
|
| | | * |
| | | * @param start
|
| | | * @param count
|
| | | * @param goodsId
|
| | | * @return
|
| | | * @throws LabelClassException
|
| | | */
|
| | | public List<LabelGoods> queryByGoodsId(int start, int count, Long goodsId) throws LabelClassException;
|
| | |
|
| | | public int getCountQueryByGoodsId(Long goodsId);
|
| | | |
| | | |
| | | /**
|
| | | * 统计商品的标签数量
|
| | | * @param goodsId
|
| | | * @return
|
| | | */
|
| | | public int getCountByGoodsId(Long goodsId);
|
| | | |
| | |
|
| | | /**
|
| | | * 商品选择标签添加入库
|
| | | * @param taoBaoGoodsBrief
|
| | | * @param labIdList
|
| | | * @param admin
|
| | | * @throws Exception
|
| | | */
|
| | | public void addBatchByLabId(TaoBaoGoodsBrief taoBaoGoodsBrief, List<String> labIdList, AdminUser admin) throws Exception;
|
| | | |
| | | /**
|
| | | * 批量商品贴上标签 |
| | | * @param goodsIdList 商品id
|
| | | * @param labIdList 标签id
|
| | | * @param admin
|
| | | * @throws Exception
|
| | | */
|
| | | public void batchGoodsAddLables(List<Long> goodsIdList, List<Long> labIdList, AdminUser admin) throws Exception;
|
| | |
|
| | | /**
|
| | | * 单个商品贴标签
|
| | | * @param goodsId
|
| | | * @param labIdList
|
| | | * @param admin
|
| | | * @throws Exception
|
| | | */
|
| | | public void singleGoodsAddLables(Long goodsId, List<Long> labIdList, AdminUser admin) throws Exception;
|
| | | |
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.service.label;
|
| | |
|
| | |
|
| | | import java.io.InputStream;
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | |
|
| | | import org.fanli.facade.goods.entity.label.Label;
|
| | | import org.fanli.facade.goods.entity.label.LabelGoods;
|
| | | import org.fanli.facade.goods.exception.taobao.LabelException;
|
| | | import org.springframework.web.multipart.MultipartFile;
|
| | |
|
| | | import com.yeshi.fanli.base.entity.admin.AdminUser;
|
| | |
|
| | | public interface LabelService {
|
| | | |
| | | /**
|
| | | * 插入对象
|
| | | * @param record
|
| | | * @return
|
| | | * @throws LabelException
|
| | | */
|
| | | public int insertSelective(Label record) throws LabelException;
|
| | | |
| | | /**
|
| | | * 更新当前对象所有数据
|
| | | * @param record
|
| | | * @return
|
| | | * @throws LabelException
|
| | | */
|
| | | public int updateByPrimaryKey(Label record) throws LabelException;
|
| | | |
| | | /**
|
| | | * 选择性更新内容——不为空则更新该字段
|
| | | * @param record
|
| | | * @return
|
| | | * @throws LabelException
|
| | | */
|
| | | public int updateByPrimaryKeySelective(Label record) throws LabelException;
|
| | | |
| | |
|
| | | |
| | | /**
|
| | | * 根据id查找当前对象
|
| | | * @param id
|
| | | * @return
|
| | | * @throws LabelException
|
| | | */
|
| | | public Label selectByPrimaryKey(Long id) throws LabelException;
|
| | | |
| | | |
| | |
|
| | | /**
|
| | | * 根据id批量删除
|
| | | * @param ids
|
| | | */
|
| | | public int deleteBatchById(long[] ids) throws LabelException;
|
| | |
|
| | | /**
|
| | | * 查询标签
|
| | | * @param pageIndex 页码
|
| | | * @param pageSize 页面条数
|
| | | * @param key 搜索条件
|
| | | * @param startTime 起始时间
|
| | | * @param endTime 结束时间
|
| | | * @return
|
| | | */
|
| | | public List<Label> query(int pageIndex, int pageSize, String key,String startTime,
|
| | | String endTime, String orderMode) throws LabelException;
|
| | | |
| | | public int getQueryCount(String key, String startTime, String endTime) throws LabelException;
|
| | |
|
| | | |
| | | /**
|
| | | * excel上传
|
| | | * @param in
|
| | | * @param admin
|
| | | * @throws Exception
|
| | | */
|
| | | public void analysisExcel(InputStream in, AdminUser admin) throws Exception;
|
| | |
|
| | | /**
|
| | | * 批量插入数据
|
| | | * @param records
|
| | | * @param admin
|
| | | * @throws LabelException
|
| | | */
|
| | | public void insertList(List<Label> records, AdminUser admin) throws LabelException;
|
| | |
|
| | | /**
|
| | | * 上传标签图片
|
| | | * @param file
|
| | | * @param admin
|
| | | * @return
|
| | | * @throws LabelException
|
| | | */
|
| | | public int uploadPicture(MultipartFile file,Label label ) throws Exception;
|
| | |
|
| | |
|
| | | /**
|
| | | * 统计今日录入总数
|
| | | * @return
|
| | | */
|
| | | public long getCountToday() throws LabelException;
|
| | |
|
| | |
|
| | |
|
| | | |
| | | public List<Label> selectByTitle(String title) throws LabelException;
|
| | |
|
| | | |
| | | |
| | | |
| | | public void deleteBatchByPrimaryKey(List<Long> ids) throws LabelException;
|
| | |
|
| | |
|
| | | |
| | | public void updateList(List<Label> records) throws LabelException;
|
| | |
|
| | | |
| | | public void insertSingle(Label label, AdminUser admin, MultipartFile file)
|
| | | throws Exception;
|
| | |
|
| | | |
| | | /**
|
| | | * 删除图片
|
| | | * @param label
|
| | | * @return
|
| | | * @throws Exception
|
| | | */
|
| | | public int deleteImg(Label label) throws LabelException;
|
| | |
|
| | | |
| | | /**
|
| | | * 统计所有
|
| | | * @return
|
| | | */
|
| | | public long getCount();
|
| | |
|
| | |
|
| | | /**
|
| | | * 查询一级分类 标签候选项- 分页
|
| | | * @param classId
|
| | | * @return
|
| | | */
|
| | | public List<Label> queryClassCandidate(int start, int count, String key, Long classId) throws LabelException;
|
| | | |
| | | public int getCountQueryClassCandidate(String key, Long classId) throws LabelException;
|
| | |
|
| | | |
| | | /**
|
| | | * 查询子级分类 标签候选项- 分页
|
| | | * @param subClassId
|
| | | * @return
|
| | | */
|
| | | public List<Label> querySubClassCandidate(int start, int count, String key, Long subClassId) throws LabelException;
|
| | |
|
| | | public int getCountQuerySubClassCandidate(String key, Long subClassId) throws LabelException;
|
| | |
|
| | | /**
|
| | | * 商品标签添加候选项(已排除存在标签)
|
| | | * @param goodsId
|
| | | * @return
|
| | | * @throws LabelException
|
| | | */
|
| | | public List<Label> queryGoodsCandidate(int start, int count, String key, Long classId) throws LabelException;
|
| | |
|
| | | public int getCountQueryGoodsCandidate(String key, Long classId) throws LabelException;
|
| | |
|
| | | /**
|
| | | * 根据录入方式统计
|
| | | * @return
|
| | | * @throws LabelException
|
| | | */
|
| | | public Map<String, Object> getCountByEntryMode() throws LabelException;
|
| | |
|
| | | /**
|
| | | * 查询商品对应标签
|
| | | * @param goodsId
|
| | | * @return
|
| | | */
|
| | | public List<LabelGoods> getByGoodsId(Long goodsId);
|
| | |
|
| | | |
| | | public List<Label> selectByTitleCache(String labKey, String title) throws LabelException;
|
| | | |
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.service.quality;
|
| | |
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import org.fanli.facade.goods.entity.quality.BoutiqueAutoRule;
|
| | | import org.fanli.facade.goods.exception.quality.BoutiqueAutoRuleException;
|
| | |
|
| | | public interface BoutiqueAutoRuleService {
|
| | | |
| | | /**
|
| | | * 插入对象
|
| | | * @param record
|
| | | * @return
|
| | | * @throws BoutiqueAutoRuleException
|
| | | */
|
| | | public int insertSelective(BoutiqueAutoRule record) throws BoutiqueAutoRuleException;
|
| | | |
| | | /**
|
| | | * 更新当前对象所有数据
|
| | | * @param record
|
| | | * @return
|
| | | * @throws BoutiqueAutoRuleException
|
| | | */
|
| | | public int updateByPrimaryKey(BoutiqueAutoRule record) throws BoutiqueAutoRuleException;
|
| | | |
| | | /**
|
| | | * 选择性更新内容——不为空则更新该字段
|
| | | * @param record
|
| | | * @return
|
| | | * @throws BoutiqueAutoRuleException
|
| | | */
|
| | | public int updateByPrimaryKeySelective(BoutiqueAutoRule record) throws BoutiqueAutoRuleException;
|
| | | |
| | |
|
| | | /**
|
| | | * 根据id查找当前对象
|
| | | * @param id
|
| | | * @return
|
| | | * @throws BoutiqueAutoRuleException
|
| | | */
|
| | | public BoutiqueAutoRule selectByPrimaryKey(Long id) throws BoutiqueAutoRuleException;
|
| | | |
| | | |
| | | /**
|
| | | * 批量删除
|
| | | * @param ids
|
| | | * @throws BoutiqueAutoRuleException
|
| | | */
|
| | | public void deleteBatchByPrimaryKey(List<Long> ids) throws BoutiqueAutoRuleException;
|
| | |
|
| | |
|
| | | /**
|
| | | * 查询标签
|
| | | * @param pageIndex 页码
|
| | | * @param pageSize 页面条数
|
| | | * @param source 搜索条件
|
| | | * @return
|
| | | */
|
| | | public List<BoutiqueAutoRule> query(int pageIndex, int pageSize, Integer source, String key,
|
| | | Integer state, Integer sort) throws BoutiqueAutoRuleException;
|
| | | |
| | | public long queryCount(Integer source, String key, Integer state) throws BoutiqueAutoRuleException;
|
| | |
|
| | | /**
|
| | | * 单个删除
|
| | | * @param id
|
| | | * @throws BoutiqueAutoRuleException
|
| | | */
|
| | | public void deleteByPrimaryKey(Long id) throws BoutiqueAutoRuleException;
|
| | |
|
| | | /**
|
| | | * 设置任务
|
| | | * @param boutiqueAutoRule
|
| | | * @param type
|
| | | */
|
| | | public void setScheduler(BoutiqueAutoRule boutiqueAutoRule, String type);
|
| | |
|
| | | /**
|
| | | * 时间格式化 Cron
|
| | | * @param day
|
| | | * @param time
|
| | | * @return
|
| | | */
|
| | | public String setCronTime(String day, String time);
|
| | |
|
| | | /**
|
| | | * 查询所有启用任务
|
| | | * @return
|
| | | * @throws BoutiqueAutoRuleException
|
| | | */
|
| | | public List<BoutiqueAutoRule> queryStart() throws BoutiqueAutoRuleException;
|
| | | |
| | |
|
| | | /**
|
| | | * 系统启动时,添加任务到Scheduler
|
| | | */
|
| | | public void startScheduler();
|
| | |
|
| | | /**
|
| | | * 关闭所有定时任务
|
| | | */
|
| | | public void shutdownJobs() throws Exception;
|
| | |
|
| | | /**
|
| | | * 验证日期
|
| | | * @return
|
| | | */
|
| | | public boolean validateDate(BoutiqueAutoRule BoutiqueAutoRule);
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.service.quality;
|
| | |
|
| | |
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | |
|
| | | import org.fanli.facade.goods.entity.label.Label;
|
| | | import org.fanli.facade.goods.entity.quality.BoutiqueAutoRule;
|
| | | import org.fanli.facade.goods.entity.quality.QualityFactory;
|
| | | import org.fanli.facade.goods.exception.quality.QualityFactoryException;
|
| | | import org.fanli.facade.goods.vo.quality.QualityFactoryVO;
|
| | |
|
| | | import com.yeshi.fanli.base.entity.admin.AdminUser;
|
| | | import com.yeshi.fanli.base.entity.goods.TaoBaoGoodsBrief;
|
| | |
|
| | | public interface QualityFactoryService {
|
| | | |
| | | /**
|
| | | * 选择性更新内容——不为空则更新该字段
|
| | | * @param record
|
| | | * @return
|
| | | * @throws QualityFactoryException
|
| | | */
|
| | | public int updateByPrimaryKeySelective(QualityFactory record) throws QualityFactoryException;
|
| | | |
| | | |
| | | /**
|
| | | * 根据id查找当前对象
|
| | | * @param id
|
| | | * @return
|
| | | * @throws QualityFactoryException
|
| | | */
|
| | | public QualityFactory selectByPrimaryKey(Long id) throws QualityFactoryException;
|
| | | |
| | | |
| | | /**
|
| | | * 统计商品数量
|
| | | * @return
|
| | | */
|
| | | public Map<String, Object> getCountAll();
|
| | | |
| | | /**
|
| | | * 根据商品id 移除精品库
|
| | | * @param ids
|
| | | * @throws QualityFactoryException
|
| | | */
|
| | | public void deleteByGoodsId(List<String> ids) throws QualityFactoryException;
|
| | | |
| | | /**
|
| | | * 根据淘宝id 删除精选库对应信息
|
| | | * @param gid
|
| | | * @throws QualityFactoryException
|
| | | */
|
| | | public void deleteByTaoBaoGoodsId(Long gid) throws QualityFactoryException;
|
| | |
|
| | | /**
|
| | | * 根据淘宝id集合 批量删除精选库对应信息
|
| | | * @param listId
|
| | | * @throws QualityFactoryException
|
| | | */
|
| | | public void deleteBatchByTaoBaoGoodsId(List<Long> listId) throws QualityFactoryException;
|
| | |
|
| | | /**
|
| | | * 根据淘宝id 删除
|
| | | * @param auctionId
|
| | | * @throws QualityFactoryException
|
| | | */
|
| | | public void deleteByTbAuctionId(Long auctionId);
|
| | |
|
| | | |
| | | /**
|
| | | * 统计商品id 是存在精品库
|
| | | * @param goodsId
|
| | | * @return
|
| | | */
|
| | | public Long queryCountByGoodsId(Long goodsId);
|
| | | |
| | | /**
|
| | | * 批量入库--淘宝
|
| | | * @param auctionIdList
|
| | | * @param admin
|
| | | * @throws Exception
|
| | | */
|
| | | public void addBatch(List<Long> auctionIdList, String las, AdminUser admin) throws Exception;
|
| | |
|
| | | |
| | | /**
|
| | | * 精选库商品筛选
|
| | | * |
| | | * @throws QualityFactoryException
|
| | | */
|
| | | public List<QualityFactory> query(QualityFactoryVO qualityFactoryVO) throws QualityFactoryException;
|
| | |
|
| | | public long queryCount(QualityFactoryVO qualityFactoryVO) throws QualityFactoryException;
|
| | |
|
| | | |
| | | /**
|
| | | * 批量设置权重 + 随机权重
|
| | | * @param idList
|
| | | * @param admin
|
| | | * @param weight
|
| | | * @param weightSmall
|
| | | * @param weightLarge
|
| | | * @throws Exception
|
| | | */
|
| | | public void setWeightBatch(List<Long> idList, AdminUser admin, Integer weight, Integer weightSmall, Integer weightLarge) throws Exception;
|
| | |
|
| | | /**
|
| | | * 统计总行数
|
| | | * @return
|
| | | */
|
| | | public Long countTotalRows(Integer days);
|
| | |
|
| | | /**
|
| | | * 查询所有数据-无条件
|
| | | * @param start
|
| | | * @param count
|
| | | * @return
|
| | | */
|
| | | public List<QualityFactory> queryAll(long start, int count, Integer days);
|
| | |
|
| | |
|
| | | /**
|
| | | * 查询需要更新的精选库商品id
|
| | | * @param count
|
| | | * @param hour
|
| | | * @return
|
| | | */
|
| | | public List<Long> queryNeedUpdate(long start, int count, int hour);
|
| | |
|
| | | /**
|
| | | * 统计更新数据量
|
| | | * @return
|
| | | */
|
| | | public long queryNeedUpdateCount();
|
| | |
|
| | | /**
|
| | | * 查询精选商品数据应用前端
|
| | | * @param start
|
| | | * @param count
|
| | | * @param key
|
| | | * @param classId 分类id
|
| | | * @param labId 标签id
|
| | | * @return
|
| | | */
|
| | | public List<QualityFactory> listQuery(long start, int count, String key, Long classId, Long labId);
|
| | | |
| | | /**
|
| | | * 对应查询精选商品数据应用前端统计
|
| | | */ |
| | | public long countQuery(String key, Integer goodsSource, Long classId, Long labId);
|
| | |
|
| | |
|
| | |
|
| | | /**
|
| | | * 更新精选库商品
|
| | | * @param goodsList
|
| | | * @param systemCid
|
| | | * @param labels
|
| | | */
|
| | | public void autoInsertOrUpadateStorage(List<TaoBaoGoodsBrief> goodsList, List<Label> listLabs,
|
| | | BoutiqueAutoRule autoRule) throws Exception;
|
| | |
|
| | | |
| | | /**
|
| | | * AuctionId查收精选库
|
| | | * @param list
|
| | | * @return
|
| | | */
|
| | | public List<QualityFactory> listQueryByAuctionId(List<Long> list);
|
| | |
|
| | | |
| | | /**
|
| | | * 根据时间 获取当前时间之前创建的商品信息
|
| | | * @param systemCid 系统分类id
|
| | | * @param dateTime 筛选时间
|
| | | * @param goodsSource 商品来源
|
| | | * @return
|
| | | */
|
| | | public List<Long> getAuctionIdbyClassId(Long systemCid, Integer goodsSource, String dateTime) throws QualityFactoryException;
|
| | | |
| | | /**
|
| | | * 更新权重
|
| | | * @param weight
|
| | | * @param time
|
| | | * @return
|
| | | */
|
| | | public void updateWeight(Integer weight, Integer time);
|
| | |
|
| | | /**
|
| | | * 根据精选库商品id 更新商品信息
|
| | | * @param listId 商品主键
|
| | | */
|
| | | public void updateGoodsFactory(List<Long> listId);
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.service.quality;
|
| | |
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import org.fanli.facade.goods.entity.quality.QualityFlashSale;
|
| | | import org.fanli.facade.goods.exception.quality.QualityFlashSaleException;
|
| | |
|
| | | public interface QualityFlashSaleService {
|
| | | |
| | | /**
|
| | | * 插入对象
|
| | | * @param record
|
| | | * @return
|
| | | * @throws QualityFlashSaleException
|
| | | */
|
| | | public int insertSelective(QualityFlashSale record) throws QualityFlashSaleException;
|
| | | |
| | | /**
|
| | | * 更新当前对象所有数据
|
| | | * @param record
|
| | | * @return
|
| | | * @throws QualityFlashSaleException
|
| | | */
|
| | | public int updateByPrimaryKey(QualityFlashSale record) throws QualityFlashSaleException;
|
| | | |
| | | /**
|
| | | * 选择性更新内容——不为空则更新该字段
|
| | | * @param record
|
| | | * @return
|
| | | * @throws QualityFlashSaleException
|
| | | */
|
| | | public int updateByPrimaryKeySelective(QualityFlashSale record) throws QualityFlashSaleException;
|
| | |
|
| | | /**
|
| | | * 获取对应时间段类型
|
| | | * @return
|
| | | */
|
| | | public int getNowType();
|
| | |
|
| | | /**
|
| | | * 批量插入
|
| | | * @param list
|
| | | * @return
|
| | | */
|
| | | public int insertBatch(List<QualityFlashSale> list);
|
| | | |
| | | |
| | | /**
|
| | | * 批量选择更新
|
| | | * @param list
|
| | | * @return
|
| | | */
|
| | | public int updateBatchSelective(List<QualityFlashSale> list);
|
| | | |
| | |
|
| | | /**
|
| | | * 根据精选id查询
|
| | | * @param list
|
| | | * @return
|
| | | */
|
| | | public List<QualityFlashSale> listQueryByQualityID(List<Long> list);
|
| | |
|
| | | |
| | | /**
|
| | | * 超过一定时间的抢购商品---待需删除
|
| | | * @param start
|
| | | * @param count
|
| | | * @param hour 时长
|
| | | * @return
|
| | | */
|
| | | public List<Long> queryNeedRemove(long start, int count, int hour) throws QualityFlashSaleException;
|
| | |
|
| | | |
| | | /**
|
| | | * 根据主键 批量删除
|
| | | * @param list 主键集合
|
| | | */
|
| | | public void deleteBatchByPrimaryKey(List<Long> list) throws QualityFlashSaleException;
|
| | | |
| | | |
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.service.quality;
|
| | |
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import net.sf.json.JSONArray;
|
| | |
|
| | | import org.fanli.facade.goods.entity.quality.QualityFactory;
|
| | |
|
| | | public interface QualityGoodsService {
|
| | |
|
| | | /**
|
| | | * 根据券面额查询商品信息
|
| | | * @param start
|
| | | * @param count
|
| | | * @param key
|
| | | * @param endAmount
|
| | | * @return
|
| | | */
|
| | | public List<QualityFactory> listQueryByCouponAmount(long start, int count, Integer key, Integer endAmount, Integer startPropor);
|
| | | public long countQueryByCouponAmount(Integer key, Integer endAmount, Integer startPropor);
|
| | | |
| | | |
| | | /**
|
| | | * 限时抢购商品
|
| | | * @param start
|
| | | * @param count
|
| | | * @param periodtime
|
| | | * @return
|
| | | */
|
| | | |
| | | public List<QualityFactory> listQueryByFlashSale(long start, int count);
|
| | | public long countQueryByFlashSale();
|
| | | |
| | | |
| | | /**
|
| | | * 今日必抢 - 9k9
|
| | | * @param start
|
| | | * @param count
|
| | | * @param systemCid
|
| | | * @param labId
|
| | | * @param sortField
|
| | | * @return
|
| | | */
|
| | | public List<QualityFactory> listQueryEverydayRob(long start, int count, Long cid, Long labId, Integer sortField, Double startCouponAmount, Double endCouponAmount);
|
| | | public long countQueryEverydayRob(Long cid, Long labId, Double startCouponAmount, Double endCouponAmount);
|
| | |
|
| | | |
| | |
|
| | | /**
|
| | | * 小金额查询:9.9/19.9/29.9/49.9(移动端)
|
| | | * @param start
|
| | | * @param count
|
| | | * @param key
|
| | | * @param classId 分类id
|
| | | * @param labId 标签id
|
| | | * @return
|
| | | */
|
| | | public List<QualityFactory> listQuerySmallAmount(long start, int count, String key, Long labId, String cids);
|
| | |
|
| | | /**
|
| | | * 对应小金额查询:9.9/19.9/29.9/49.9
|
| | | */
|
| | | public long countQuerySmallAmount(String key, Long labId, String cids);
|
| | |
|
| | | |
| | | /**
|
| | | * 根据关键词搜索
|
| | | * @param start
|
| | | * @param count
|
| | | * @param key
|
| | | * @return
|
| | | */
|
| | | public List<QualityFactory> listQueryByKey(long start, int count, String key, Integer sort, Long systemCid, Integer hasQuan, Integer userType,
|
| | | Integer biz30day, Integer startprice, Integer endprice);
|
| | | public long countQueryByKey(String key, Long systemCid, Integer hasQuan, Integer userType,
|
| | | Integer biz30day, Integer startprice, Integer endprice);
|
| | |
|
| | | |
| | | /**
|
| | | * 一级分类查询精选库数据
|
| | | * @param start
|
| | | * @param count
|
| | | * @param cid
|
| | | * @return
|
| | | */
|
| | | public List<QualityFactory> listQueryByClassId(long start, int count, Long cid);
|
| | |
|
| | | public long countQueryClassId(Long cid);
|
| | |
|
| | | |
| | | /**
|
| | | * 关键词+标签id搜索商品
|
| | | * @param start
|
| | | * @param count
|
| | | * @param systemCid
|
| | | * @param key
|
| | | * @param listId
|
| | | * @param sort
|
| | | * @return
|
| | | */
|
| | | |
| | | public List<QualityFactory> listQueryByKeyAndlabIDs(long start, int count, String key, List<Long> listId,
|
| | | Integer sort, Long systemCid, Integer hasQuan, Integer userType, Integer biz30day, Integer startprice, Integer endprice);
|
| | | public long countQueryKeyAndlabIDs(String key, List<Long> listId, Long systemCid, Integer hasQuan, Integer userType,
|
| | | Integer biz30day, Integer startprice, Integer endprice);
|
| | |
|
| | | |
| | | |
| | | /**
|
| | | * 返利金额数据查询
|
| | | * @param start
|
| | | * @param count
|
| | | * @param proportion
|
| | | * @param startAmount
|
| | | * @param endAmount
|
| | | * @return
|
| | | */
|
| | | public List<QualityFactory> listQueryByRebateAmount(long start, int count, String proportion, Integer startAmount, Integer endAmount, double tkRate);
|
| | |
|
| | | public long countQueryByRebateAmount(String proportion, Integer startAmount, Integer endAmount, double tkRate);
|
| | |
|
| | |
|
| | | /**
|
| | | * 优惠券栏目 精选库每日最新入库的商品 且前200条数据,
|
| | | * @param start
|
| | | * @param count
|
| | | * @return
|
| | | */
|
| | | public List<QualityFactory> queryToCouponColumn(long start, int count);
|
| | | |
| | | public long countQueryToCouponColumn();
|
| | |
|
| | | |
| | | /**
|
| | | * 返利金额数据查询 - 首页最底部@商品信息流:券面额高(高于5元以上)返利金额高的(2元以上),返利佣金比例高的(5%以上)
|
| | | * @param start
|
| | | * @param count
|
| | | * @param proportion 分成比例
|
| | | * @param startAmount 返利
|
| | | * @param couponAmount 券面额
|
| | | * @param tkRate 佣金比例
|
| | | * @return
|
| | | */
|
| | | public List<QualityFactory> listRecommend(long start, int count, Double proportion, Integer startAmount,
|
| | | Integer couponAmount, double tkRate, Double couponRatio);
|
| | | |
| | | public long countRecommend(Double proportion, Integer startAmount, Integer couponAmount,
|
| | | double tkRate, Double couponRatio);
|
| | | |
| | | /**
|
| | | * 根据关键词进行搜索商品-搜索-推荐
|
| | | * @param start
|
| | | * @param count
|
| | | * @param key 关键词
|
| | | * @return
|
| | | */
|
| | | public List<QualityFactory> listRecommendBykey(long start, int count, String key, Integer hasQuan,
|
| | | Integer userType, Double startprice, Double endprice, Double startTkRate, Double endTkRate, Integer sort);
|
| | | |
| | | public long countRecommendBykey(String key, Integer hasQuan, Integer userType,
|
| | | Double startprice, Double endprice, Double startTkRate, Double endTkRate);
|
| | | |
| | | |
| | | /**
|
| | | * 首页推荐
|
| | | * @param start 起始位置
|
| | | * @param count 返回总行数
|
| | | * @param proportion 计算比例
|
| | | * @return
|
| | | */
|
| | | public JSONArray getRecommendToIndex(long start, int count, String proportion);
|
| | | |
| | | public long countRecommendToIndex(String proportion);
|
| | | |
| | | /**
|
| | | * 单个商品根据标签推荐商品
|
| | | * @param paramLong
|
| | | * @param paramString1
|
| | | * @param paramString2
|
| | | * @return
|
| | | */
|
| | | public List<QualityFactory> recommendByAuctionId(Long paramLong);
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.service.quality;
|
| | |
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | |
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | | import org.fanli.facade.goods.entity.quality.QualityFactory;
|
| | |
|
| | | import com.yeshi.fanli.base.dto.SearchFilter;
|
| | | import com.yeshi.fanli.base.entity.goods.TaoBaoGoodsBrief;
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | public interface TaoKeGoodsService {
|
| | | |
| | |
|
| | | /**
|
| | | * 根据MaterialID 获取推荐商品信息
|
| | | * @return
|
| | | * @throws Exception
|
| | | */
|
| | | |
| | | public List<TaoBaoGoodsBrief> listByMaterial(Integer materialId, Integer page1, int pageSize) throws Exception;
|
| | |
|
| | |
|
| | | /**
|
| | | * 物料搜索— 分类id搜索、关键词
|
| | | * @param key
|
| | | * @param cateIds
|
| | | * @param page
|
| | | * @param filterParams
|
| | | * @param order
|
| | | * @param startprice
|
| | | * @param endprice
|
| | | * @return
|
| | | */
|
| | | public JSONObject listByWuLiao(int page, String key, String cateIds, String filterParams,
|
| | | String order, String startprice, String endprice, String searchParam);
|
| | |
|
| | |
|
| | | /**
|
| | | * 品牌购 (官方推荐【品牌券】接口)
|
| | | * @param materialId
|
| | | * @param pageIndex
|
| | | * @param pageSize
|
| | | * @return
|
| | | * @throws Exception
|
| | | */
|
| | | public JSONObject getBrandsGoods(Integer materialId, int pageIndex, int pageSize) throws Exception;
|
| | |
|
| | |
|
| | | /**
|
| | | * 获取商品店铺信息
|
| | | * @param materialId
|
| | | * @param pageIndex
|
| | | * @param pageSize
|
| | | * @return
|
| | | * @throws Exception
|
| | | */
|
| | | public JSONObject getBrandsShops(Integer materialId, int pageIndex, int pageSize) throws Exception;
|
| | |
|
| | |
|
| | | /**
|
| | | * 淘宝接口获取商品列表
|
| | | * @param sf
|
| | | * @return
|
| | | */
|
| | | public JSONObject searchWuLiao(SearchFilter sf);
|
| | |
|
| | | public List<TaoBaoGoodsBrief> searchWuLiaoList(SearchFilter sf);
|
| | |
|
| | |
|
| | | public void setSearchFilter(SearchFilter searchfilter, String filter, String order, String startprice, String endprice, String fastFilter,
|
| | | Integer totalSales);
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | /**
|
| | | * 精选库数据转换
|
| | | * @param listQuality
|
| | | * @param searchWuLiaoList
|
| | | * @param map
|
| | | * @return
|
| | | */
|
| | | public JSONObject listQualityGoods(List<QualityFactory> listQuality, List<TaoBaoGoodsBrief> searchWuLiaoList, Map<String, String> map);
|
| | |
|
| | |
|
| | | /**
|
| | | * 统计精选库值 |
| | | * @param searchKey 搜索关键词
|
| | | * @param systemCid 系统主分类
|
| | | * @param listLabId 标签id集合
|
| | | * @return
|
| | | */
|
| | | public long countByQuality(String searchKey, Long systemCid, List<Long> listLabId);
|
| | |
|
| | | |
| | | /**
|
| | | * 查询精选库
|
| | | * @param start
|
| | | * @param count
|
| | | * @param searchKey 搜索关键词
|
| | | * @param systemCid 系统主分类
|
| | | * @param listLabId 标签id集合
|
| | | * @return
|
| | | */
|
| | | public List<QualityFactory> queryByQuality(long start, int count, String searchKey, Long systemCid, List<Long> listLabId);
|
| | |
|
| | | |
| | | |
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.service.recommend;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import org.fanli.facade.goods.entity.clazz.GoodsClass;
|
| | | import org.fanli.facade.goods.entity.recommend.ClassRecommendGoods;
|
| | | import org.fanli.facade.goods.exception.ExistObjectException;
|
| | | import org.fanli.facade.goods.exception.NotExistObjectException;
|
| | |
|
| | | import com.yeshi.fanli.base.entity.goods.TaoBaoGoodsBrief;
|
| | |
|
| | | public interface ClassRecommendGoodsService {
|
| | | /**
|
| | | * 推荐商品获取
|
| | | * @param id
|
| | | * @return
|
| | | */
|
| | | |
| | | public List<ClassRecommendGoods> getClassRecommendGoodsByGoodsClassId(long id);
|
| | | |
| | | /**
|
| | | * 添加推荐商品
|
| | | * @param tbids
|
| | | * @param cgid
|
| | | * @throws ExistObjectException
|
| | | */
|
| | | public void addRecommendGoods(String tbids, long cgid) throws ExistObjectException;
|
| | | |
| | | /**
|
| | | * 获取分类推荐商品
|
| | | * @param i
|
| | | * @param key
|
| | | * @param cgid
|
| | | * @return
|
| | | */
|
| | | public List<ClassRecommendGoods> getClassRecommendGoods(int i, String key,
|
| | | long cgid);
|
| | | |
| | | /**
|
| | | * 获取数量
|
| | | * @param cgid
|
| | | * @param key
|
| | | * @return
|
| | | */
|
| | | public int getCount(long cgid, String key);
|
| | | /**
|
| | | *根据id删除
|
| | | * @param id
|
| | | */
|
| | | public void deleteRecommendGoods(long id);
|
| | | |
| | | /**
|
| | | * 获取推荐商品
|
| | | * @param cgid
|
| | | * @return
|
| | | */
|
| | | public ClassRecommendGoods getRecommendGoods(long cgid);
|
| | | |
| | | public void updateRecommendGoods(long cgid, int orderby) throws NotExistObjectException;
|
| | | |
| | | /**
|
| | | * 更具淘宝ID删除
|
| | | * @param id
|
| | | */
|
| | | public void deleteRecommendGoodsByTB(long id);
|
| | | /**
|
| | | * 添加推荐商品
|
| | | * @param goodsClass
|
| | | * @param taobao
|
| | | * @throws ExistObjectException
|
| | | */
|
| | | public void addRecommendGoods(GoodsClass goodsClass, TaoBaoGoodsBrief taobao) throws ExistObjectException;
|
| | | /**
|
| | | * 删除分类
|
| | | * @param id
|
| | | */
|
| | | public void deleteClassGoodsByGC(long id);
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.service.recommend;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import org.fanli.facade.goods.entity.recommend.DynamicRecommend;
|
| | |
|
| | | public interface DynamicRecommendService {
|
| | | /**
|
| | | * 发布
|
| | | * @param dynamicRecommend
|
| | | * @return
|
| | | */
|
| | | public long makePublic(DynamicRecommend dynamicRecommend);
|
| | | |
| | | /**
|
| | | * |
| | | * @param uid
|
| | | * @param page
|
| | | * @return
|
| | | */
|
| | | public List<DynamicRecommend> getDynamicRecommendList(long uid, int page);
|
| | |
|
| | | public int getCount();
|
| | | |
| | | public List<DynamicRecommend> getMyDynamicRecommendList(long uid, int page);
|
| | |
|
| | | public int getCount(long uid);
|
| | |
|
| | | public DynamicRecommend getDynamicRecommend(long drid, long uid);
|
| | |
|
| | | public void replyUp(long drid);
|
| | |
|
| | | public void delete(long l);
|
| | |
|
| | | public void addlike(long drid, long uid);
|
| | |
|
| | | public void removelike(long drid, long uid);
|
| | |
|
| | | public List<DynamicRecommend> getMyLikeRecommends(long uid, int page);
|
| | |
|
| | | public List<DynamicRecommend> getDynamicRecommendList(String key,int type,int page);
|
| | |
|
| | | public int getCount(String key,int type);
|
| | |
|
| | | public void updateLikeCount();
|
| | |
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.service.recommend;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import org.fanli.facade.goods.dto.recommend.RecommendBannerAdmin;
|
| | | import org.fanli.facade.goods.entity.recommend.RecommendBanner;
|
| | |
|
| | | public interface RecommendBannerService {
|
| | |
|
| | | public List<RecommendBanner> getRecommendBanners();
|
| | |
|
| | | public void addRecommendBanner(RecommendBanner banner);
|
| | |
|
| | | public List<RecommendBannerAdmin> getRecommendBanners(int pageIndex, String platform, String packages, String key);
|
| | |
|
| | | public long getCount();
|
| | |
|
| | | public void deleteBanners(long[] rbids);
|
| | |
|
| | | public RecommendBanner getRecommendBanner(long id);
|
| | |
|
| | | public void updateBanner(RecommendBanner banner);
|
| | |
|
| | | public int getCount(String platform, String packages, String key);
|
| | |
|
| | | public void updateBannerJumpDetail(long id);
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.service.recommend;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import org.fanli.facade.goods.dto.recommend.RecommendBannerV2Admin;
|
| | | import org.fanli.facade.goods.entity.recommend.RecommendBannerV2;
|
| | |
|
| | |
|
| | | public interface RecommendBannerV2Service {
|
| | |
|
| | | public List<RecommendBannerV2> getRecommendBanners();
|
| | |
|
| | | public void addRecommendBanner(RecommendBannerV2 banner);
|
| | |
|
| | | public List<RecommendBannerV2Admin> getRecommendBanners(int pageIndex, String platform, String packages, String key);
|
| | |
|
| | | public long getCount();
|
| | |
|
| | | public void deleteBanners(long[] rbids);
|
| | |
|
| | | public RecommendBannerV2 getRecommendBanner(long id);
|
| | |
|
| | | public void updateBanner(RecommendBannerV2 banner);
|
| | |
|
| | | public int getCount(String platform, String packages, String key);
|
| | |
|
| | | public void updateBannerJumpDetail(long id);
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.service.recommend;
|
| | |
|
| | | import org.fanli.facade.goods.entity.recommend.RecommendDetails;
|
| | |
|
| | | public interface RecommendDetailsService {
|
| | |
|
| | | public RecommendDetails getRecommendDetails(long drid, long uid);
|
| | |
|
| | | public long save(RecommendDetails rd);
|
| | |
|
| | | public RecommendDetails getRecommendDetails(long drid);
|
| | |
|
| | | public int vote(long drid, long uid, int type);
|
| | |
|
| | | public void deleteByDr(long drid);
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.service.recommend;
|
| | |
|
| | | import org.fanli.facade.goods.entity.recommend.RecommendLike;
|
| | |
|
| | | public interface RecommendLikeService {
|
| | |
|
| | | public void save(RecommendLike newlike);
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.service.recommend;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import org.fanli.facade.goods.entity.recommend.RecommendReply;
|
| | |
|
| | | import com.yeshi.fanli.base.entity.user.UserInfo;
|
| | |
|
| | | public interface RecommendReplyService {
|
| | |
|
| | | public List<RecommendReply> getRecommendReplys(long drid, long uid, int page);
|
| | |
|
| | | public int getCount(long drid);
|
| | |
|
| | | public int replys(long drid,UserInfo user, String content);
|
| | |
|
| | | public List<RecommendReply> getRecommendReplys(long drid, int page);
|
| | |
|
| | | public void delete(long id);
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.service.recommend;
|
| | |
|
| | | import org.fanli.facade.goods.entity.recommend.RecommendSectionDetail;
|
| | |
|
| | | public interface RecommendSectionDetailService {
|
| | |
|
| | | public RecommendSectionDetail getRecommendSectionDetailByRsId(long id);
|
| | |
|
| | | public void saveSectionDetail(RecommendSectionDetail rsd);
|
| | |
|
| | | public void updateSectionDetail(RecommendSectionDetail rsd);
|
| | |
|
| | | public void deleteSectionDetailBySections(long[] rsids);
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.service.recommend;
|
| | |
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | |
|
| | | import org.fanli.facade.goods.entity.recommend.RecommendSection;
|
| | | import org.fanli.facade.goods.entity.recommend.RecommendSectionGoods;
|
| | | import org.fanli.facade.goods.exception.ExistObjectException;
|
| | | import org.fanli.facade.goods.exception.NotExistObjectException;
|
| | | import org.springframework.cache.annotation.CacheEvict;
|
| | |
|
| | | import com.yeshi.fanli.base.entity.goods.TaoBaoGoodsBrief;
|
| | |
|
| | | public interface RecommendSectionGoodsService {
|
| | | |
| | | public List<RecommendSectionGoods> getRecommendSectionGoods(long id, int counts);
|
| | |
|
| | | public List<RecommendSectionGoods> getRecommendSectionGoods(int index,
|
| | | long rsid, String key);
|
| | |
|
| | | public int getCount(long rsid, String key);
|
| | | @CacheEvict(value="sectionCache",allEntries=true)
|
| | | public void deleteSectionGoods(long[] rsgids);
|
| | | @CacheEvict(value="sectionCache",allEntries=true)
|
| | | public void addSectionGoods(long rsid, String tbgid) throws ExistObjectException;
|
| | |
|
| | | public RecommendSectionGoods getRecommendSectionGoods(long id);
|
| | | |
| | | @CacheEvict(value="sectionCache",allEntries=true)
|
| | | public void updateRecommendSectionGoods(RecommendSectionGoods rsg) throws NotExistObjectException;
|
| | | |
| | | @CacheEvict(value="sectionCache",allEntries=true)
|
| | | public void deleteRecommendSectionGoodsByTB(long id);
|
| | | |
| | | @CacheEvict(value="sectionCache",allEntries=true)
|
| | | public void addRecommendSectionGoods(RecommendSection recommendSection,
|
| | | TaoBaoGoodsBrief taobao) throws ExistObjectException;
|
| | | @CacheEvict(value="sectionCache",allEntries=true)
|
| | | public void deleteSectionGoodsBySections(long[] rsids);
|
| | | |
| | |
|
| | | public Map<Long, List<RecommendSectionGoods>> getAllSectionGoodsMap();
|
| | | |
| | | |
| | | public List<RecommendSectionGoods> getSectionGoods(int count);
|
| | | |
| | | public void deleteRecommendSectionGoodsByTbAuctionId(long auctionId);
|
| | |
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.service.recommend;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import org.fanli.facade.goods.dto.recommend.RecommendSectionAdmin;
|
| | | import org.fanli.facade.goods.entity.recommend.RecommendSection;
|
| | | import org.fanli.facade.goods.entity.recommend.RecommendSectionDetail;
|
| | |
|
| | | public interface RecommendSectionService {
|
| | |
|
| | | public boolean addRecommendSection(RecommendSection section, RecommendSectionDetail detail);
|
| | |
|
| | | public long getCount();
|
| | |
|
| | | public List<RecommendSectionAdmin> getRecommendSections(int index, String platform,String packages, String key);
|
| | |
|
| | | public RecommendSection getRecommendSection(long id);
|
| | |
|
| | | public void deleteSections(long[] rsids);
|
| | |
|
| | | public void updateSection(RecommendSection section);
|
| | |
|
| | | public int getCount(String platform, String packages, String key);
|
| | |
|
| | | public List<RecommendSection> getRecommendSectionAll();
|
| | |
|
| | | public int getCounts(String key);
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.service.recommend;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import org.fanli.facade.goods.dto.recommend.RecommendSpecialAdmin;
|
| | | import org.fanli.facade.goods.entity.recommend.RecommendSpecial;
|
| | |
|
| | | public interface RecommendSpecialService {
|
| | |
|
| | | public void addRecommendSpecial(RecommendSpecial special);
|
| | |
|
| | | public long getCount();
|
| | |
|
| | | public List<RecommendSpecialAdmin> getRecommendSpecials(int i, String platform, String packages, String key);
|
| | |
|
| | | public RecommendSpecial getRecommendSpecial(long id);
|
| | |
|
| | | public void deleteSpecials(long[] rbids);
|
| | |
|
| | | public void updateSpecial(RecommendSpecial special);
|
| | |
|
| | | public int getCount(String platform, String packages, String key);
|
| | |
|
| | | public void updateSpecialJumpDetail(long id);
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.service.recommend;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import org.fanli.facade.goods.entity.recommend.RecommendUserGoods;
|
| | | import org.fanli.facade.goods.entity.recommend.RecommendUserGoodsMap;
|
| | | import org.fanli.facade.goods.exception.recommend.RecommendUserGoodsException;
|
| | |
|
| | | import com.yeshi.fanli.base.entity.goods.CommonGoods;
|
| | |
|
| | | public interface RecommendUserGoodsService {
|
| | |
|
| | | /**
|
| | | * 添加商品推荐
|
| | | * |
| | | * @param uid
|
| | | * @param recommendDesc
|
| | | * 推荐语
|
| | | * @param goodsList
|
| | | */
|
| | | public void addRecommend(Long uid, String recommendDesc, List<CommonGoods> goodsList)
|
| | | throws RecommendUserGoodsException;
|
| | | |
| | | /**
|
| | | * |
| | | * @param uid
|
| | | * @param commonGoodsId
|
| | | * @return
|
| | | */
|
| | | public List<RecommendUserGoodsMap> listByUidAndCommonGoodsId(Long uid,Long commonGoodsId);
|
| | | |
| | | /**
|
| | | * |
| | | * @param uid
|
| | | * @param commonGoodsId
|
| | | * @return
|
| | | */
|
| | | public Long countByUidAndCommonGoodsId(Long uid,Long commonGoodsId);
|
| | | |
| | |
|
| | | /**
|
| | | * 获取推荐列表
|
| | | * |
| | | * @param uid
|
| | | * @param page
|
| | | * @param pageSize
|
| | | * @return
|
| | | */
|
| | | public List<RecommendUserGoods> listRecommend(Long uid, int page, int pageSize);
|
| | |
|
| | | /**
|
| | | * 获取推荐数量
|
| | | * |
| | | * @param uid
|
| | | * @return
|
| | | */
|
| | | public long countRecommend(Long uid);
|
| | | |
| | | public RecommendUserGoods getLatestRecommendUserGoods(Long uid);
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.service.recommend;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import org.fanli.facade.goods.entity.recommend.SuperRecommendBanner;
|
| | | import org.fanli.facade.system.entity.common.SystemManage;
|
| | | import org.springframework.cache.annotation.CacheEvict;
|
| | |
|
| | | public interface SuperRecommendBannerService {
|
| | | |
| | | public List<SuperRecommendBanner> getSuperRecommendBannersBySystem(SystemManage system);
|
| | |
|
| | | public List<SuperRecommendBanner> getSuperRecommendBannersByBanners(
|
| | | List<Long> rbIdList);
|
| | | @CacheEvict(value={"bannerCache"},allEntries=true)
|
| | | public Integer deleteSuperRecommendBanner(long rbid, String platform, String packageName);
|
| | | |
| | | @CacheEvict(value={"bannerCache"},allEntries=true)
|
| | | public void addSuperRecommendBanner(long rbid, String platform,String packageName);
|
| | | @CacheEvict(value={"bannerCache"},allEntries=true)
|
| | | public void deleteSuperRecommendBanners(long[] rbids);
|
| | |
|
| | | public List<SuperRecommendBanner> getSuperRecommendBannerBySystemId(
|
| | | long id, int strat, int count);
|
| | |
|
| | | public List<SuperRecommendBanner> getSuperRecommendBannerBySystemId(
|
| | | long id, int strat, int pAGE_SIZE, String likekey);
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.service.recommend;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import org.fanli.facade.goods.entity.recommend.SuperRecommendBannerV2;
|
| | | import org.fanli.facade.system.entity.common.SystemManage;
|
| | |
|
| | | public interface SuperRecommendBannerV2Service {
|
| | | |
| | | public List<SuperRecommendBannerV2> getSuperRecommendBannerV2sBySystem(SystemManage system);
|
| | |
|
| | | public List<SuperRecommendBannerV2> getSuperRecommendBannersByBanners(
|
| | | List<Long> rbIdList);
|
| | | |
| | | public Integer deleteSuperRecommendBanner(long rbid, String platform, String packageName);
|
| | | |
| | | public void addSuperRecommendBanner(long rbid, String platform,String packageName);
|
| | | |
| | | public void deleteSuperRecommendBanners(long[] rbids);
|
| | |
|
| | | public List<SuperRecommendBannerV2> getSuperRecommendBannerBySystemId(
|
| | | long id, int strat, int count);
|
| | |
|
| | | public List<SuperRecommendBannerV2> getSuperRecommendBannerBySystemId(
|
| | | long id, int strat, int pAGE_SIZE, String likekey);
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.service.recommend;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import org.fanli.facade.goods.entity.recommend.SuperRecommendSection;
|
| | | import org.springframework.cache.annotation.CacheEvict;
|
| | |
|
| | | public interface SuperRecommendSectionService {
|
| | |
|
| | | public List<SuperRecommendSection> getSuperRecommendSectionBySystemId(
|
| | | long id);
|
| | |
|
| | | public List<SuperRecommendSection> getSuperRecommendSectionsBySections(
|
| | | List<Long> rsIdList);
|
| | | @CacheEvict(value="supersectionCache",allEntries=true)
|
| | | public Integer deleteSuperRecommendSection(long rbid, String platform,
|
| | | String packageName);
|
| | | @CacheEvict(value="supersectionCache",allEntries=true)
|
| | | public void addSuperRecommendSection(long rbid, String platform,
|
| | | String packageName);
|
| | | @CacheEvict(value="supersectionCache",allEntries=true)
|
| | | public void deleteSuperRecommendSections(long[] rsids);
|
| | | |
| | | public List<SuperRecommendSection> getSuperRecommendSectionBySystemId(
|
| | | long id,int start,int count);
|
| | |
|
| | | public List<SuperRecommendSection> getSuperRecommendSectionBySystemId(
|
| | | long id, int strat, int count, String key);
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.service.recommend;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import org.fanli.facade.goods.entity.recommend.SuperRecommendSpecial;
|
| | | import org.springframework.cache.annotation.CacheEvict;
|
| | |
|
| | | public interface SuperRecommendSpecialService {
|
| | | |
| | | public List<SuperRecommendSpecial> getSuperRecommendSpecialBySystemId(long id);
|
| | |
|
| | | public List<SuperRecommendSpecial> getSuperRecommendSpecials(
|
| | | List<Long> rsIdList);
|
| | | @CacheEvict(value="specialCache",allEntries=true)
|
| | | public Integer deleteSuperRecommendSpecial(long rbid, String platform,
|
| | | String packageName);
|
| | | @CacheEvict(value="specialCache",allEntries=true)
|
| | | public void addSuperRecommendSpecial(long rbid, String platform,
|
| | | String packageName);
|
| | | @CacheEvict(value="specialCache",allEntries=true)
|
| | | public void deleteSuperRecommendSpecials(long[] rbids); |
| | |
|
| | | public List<SuperRecommendSpecial> getSuperRecommendSpecialBySystemId(
|
| | | long id, int strat, int count);
|
| | |
|
| | | public List<SuperRecommendSpecial> getSuperRecommendSpecialBySystemId(
|
| | | long id, int strat, int pAGE_SIZE, String likekey);
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.service.taobao;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import org.fanli.facade.goods.exception.taobao.CommonGoodsException;
|
| | |
|
| | | import com.yeshi.fanli.base.entity.goods.CommonGoods;
|
| | |
|
| | | /**
|
| | | * 常规商品库
|
| | | * |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | public interface CommonGoodsService {
|
| | |
|
| | | /**
|
| | | * 添加商品(无就添加,有则更新)
|
| | | * |
| | | * @param commonGoods
|
| | | * @return
|
| | | * @throws CommonGoodsException
|
| | | */
|
| | | public CommonGoods addOrUpdateCommonGoods(CommonGoods commonGoods) throws CommonGoodsException;
|
| | | |
| | | |
| | | /**
|
| | | * 添加商品(无就添加,有则返回)
|
| | | * |
| | | * @param commonGoods
|
| | | * @return
|
| | | * @throws CommonGoodsException
|
| | | */
|
| | | public CommonGoods addCommonGoods(CommonGoods commonGoods) throws CommonGoodsException;
|
| | |
|
| | | /**
|
| | | * 更新商品信息
|
| | | * |
| | | * @param commonGoods
|
| | | * @throws CommonGoodsException
|
| | | */
|
| | | public void updateCommonGoods(CommonGoods commonGoods) throws CommonGoodsException;
|
| | |
|
| | | /**
|
| | | * 商品下线
|
| | | * |
| | | * @param goodsId
|
| | | * @param goodsType
|
| | | */
|
| | | public void offlineCommonGoods(Long goodsId, int goodsType);
|
| | |
|
| | | /**
|
| | | * 根据商品ID和商品类型查询库商品
|
| | | * |
| | | * @param goodsId
|
| | | * @param goodsType
|
| | | * @return
|
| | | */
|
| | | public CommonGoods getCommonGoodsByGoodsIdAndGoodsType(Long goodsId, int goodsType);
|
| | |
|
| | | /**
|
| | | * 批量更新
|
| | | * @param listCommonGoods
|
| | | */
|
| | | public void updateBatchCommonGoods(List<CommonGoods> listCommonGoods);
|
| | |
|
| | |
|
| | | /**
|
| | | * 批量插入
|
| | | * @param listCommonGoods
|
| | | */
|
| | | public void addBatchCommonGoods(List<CommonGoods> listCommonGoods);
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.service.taobao;
|
| | |
|
| | | import org.fanli.facade.goods.dto.taoke.ClientTBPid;
|
| | | import org.fanli.facade.goods.entity.taobao.TBPid;
|
| | |
|
| | | public interface TBPidService {
|
| | |
|
| | | /**
|
| | | * 获取android默认的淘客参数
|
| | | * |
| | | * @return
|
| | | */
|
| | | public ClientTBPid getAndroidDefault();
|
| | |
|
| | | /**
|
| | | * 获取IOS默认的淘客参数
|
| | | * |
| | | * @return
|
| | | */
|
| | | public ClientTBPid getIOSDefault();
|
| | |
|
| | | /**
|
| | | * 创建PID
|
| | | */
|
| | | public void startCreatePid();
|
| | | |
| | | /**
|
| | | * 步心街创建PID
|
| | | */
|
| | | public void startCreatePidBuXinJie();
|
| | |
|
| | | /**
|
| | | * 获取一个有效的PID
|
| | | * |
| | | * @return
|
| | | */
|
| | | public TBPid getTBPid(Long uid, int type);
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.service.taobao;
|
| | | import java.util.List;
|
| | |
|
| | | import org.fanli.facade.goods.entity.taobao.TaoBaoCoupon;
|
| | | import org.springframework.cache.annotation.CacheEvict;
|
| | |
|
| | | import com.yeshi.fanli.base.entity.goods.TaoBaoGoodsBrief;
|
| | |
|
| | |
|
| | | public interface TaoBaoCouponService {
|
| | |
|
| | |
|
| | | public List<TaoBaoCoupon> getTaoBaoCouponList(String key, int page);
|
| | |
|
| | | /**
|
| | | * 通过淘宝的api获取券
|
| | | * |
| | | * @param page
|
| | | * @return
|
| | | */
|
| | |
|
| | | |
| | | public List<TaoBaoGoodsBrief> getTaoBaoCouponList(int page);
|
| | | |
| | |
|
| | | public List<TaoBaoGoodsBrief> getTaoBaoCouponListByMeterialId(int materialId,int page);
|
| | |
|
| | | public int getCount(String key);
|
| | |
|
| | | public void deleteTaoBaoCoupons(long[] ids);
|
| | |
|
| | | public TaoBaoCoupon getaoBaoCoupon(long id);
|
| | |
|
| | | public TaoBaoCoupon getTaoBaoCouponByAuctionId(long id);
|
| | |
|
| | | public void updatetaoBaoCoupon(TaoBaoCoupon find);
|
| | |
|
| | | public List<TaoBaoCoupon> getTaoBaoCouponListByClassKeys(String[] key, int page);
|
| | |
|
| | | public List<TaoBaoCoupon> getTaoBaoCouponListBykeys(List<String> searchKeys, int page);
|
| | |
|
| | | public TaoBaoCoupon getTaoBaoCouponByActionId(String id);
|
| | |
|
| | | public int getCount(List<String> searchKeys);
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.service.taobao;
|
| | |
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import com.yeshi.fanli.base.entity.goods.TaoBaoGoodsBrief;
|
| | |
|
| | | public interface TaoBaoGoodsBriefRecordService {
|
| | | |
| | | /**
|
| | | * 批量插入数据库
|
| | | * @param record
|
| | | */
|
| | | public void insertBatch(List<TaoBaoGoodsBrief> list);
|
| | | |
| | | /**
|
| | | * 清理表数据
|
| | | * @return
|
| | | */
|
| | | public int deleteAllData();
|
| | | |
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.service.taobao;
|
| | |
|
| | | import java.math.BigDecimal;
|
| | | import java.util.List;
|
| | |
|
| | | import org.fanli.facade.goods.entity.recommend.RecommendSectionGoods;
|
| | | import org.fanli.facade.goods.exception.ExistObjectException;
|
| | | import org.fanli.facade.goods.exception.NotExistObjectException;
|
| | | import org.fanli.facade.goods.exception.taobao.TaobaoGoodsDownException;
|
| | | import org.fanli.facade.goods.exception.usergoods.ShareGoodsException;
|
| | |
|
| | | import com.yeshi.fanli.base.entity.goods.TaoBaoGoodsBrief;
|
| | |
|
| | | public interface TaoBaoGoodsBriefService {
|
| | |
|
| | | public void save(TaoBaoGoodsBrief taoBaoGoodsBrief) throws ExistObjectException;
|
| | |
|
| | | public List<TaoBaoGoodsBrief> getTBList(int i, String key);
|
| | |
|
| | | public int getCount(String key);
|
| | |
|
| | | public TaoBaoGoodsBrief getTaoBao(long id);
|
| | |
|
| | | public TaoBaoGoodsBrief getTaoBaoByAuctionId(long id);
|
| | |
|
| | | public void deleteTaoBaoGoods(long id);
|
| | |
|
| | | public void addRecommendSectionGoods(long rsid, long tbid) throws NotExistObjectException, ExistObjectException;
|
| | |
|
| | | public void addClassRecommendGoods(long gcid, long tbid) throws NotExistObjectException, ExistObjectException;
|
| | |
|
| | | public TaoBaoGoodsBrief getTaoBaoByAuctionId(String tbid);
|
| | |
|
| | | public void updateTBGoods(TaoBaoGoodsBrief tb) throws NotExistObjectException;
|
| | |
|
| | | /**
|
| | | * 更新最新的商品数据到数据库
|
| | | * |
| | | * @param tb
|
| | | * @throws NotExistObjectException
|
| | | */
|
| | | public void updateTBGoodsWithNewInfo(TaoBaoGoodsBrief tb) throws NotExistObjectException;
|
| | |
|
| | | public List<TaoBaoGoodsBrief> getAllTaoBao();
|
| | |
|
| | | public void getUpdateTaoBao();
|
| | |
|
| | | public int getInvalidCount();
|
| | |
|
| | | public List<TaoBaoGoodsBrief> getInvalidTB(int pageIndex);
|
| | |
|
| | | public void updateTaoBaoGoods(TaoBaoGoodsBrief taoBaoGoodsBrief) throws TaobaoGoodsDownException;
|
| | |
|
| | | public List<RecommendSectionGoods> listRecommendSectionGoods();
|
| | |
|
| | |
|
| | | /**
|
| | | * 获取单个商品用户能够分得的红包
|
| | | * |
| | | * @param goods
|
| | | * @return
|
| | | */
|
| | | public String getGoodsUserHongBao(TaoBaoGoodsBrief goods);
|
| | |
|
| | | /**
|
| | | * 获取分享商品所能得到的红包
|
| | | * |
| | | * @param goods
|
| | | * @return
|
| | | */
|
| | | public BigDecimal getShareGoodsUserHongBao(TaoBaoGoodsBrief goods);
|
| | |
|
| | | /**
|
| | | * 根据auctionId 查询商品信息
|
| | | * |
| | | * @param auctionId
|
| | | * @return
|
| | | */
|
| | | List<TaoBaoGoodsBrief> queryByAuctionId(Long auctionId);
|
| | |
|
| | | /**
|
| | | * 选择行插入数据
|
| | | * |
| | | * @param taoBaoGoodsBrief
|
| | | * @return
|
| | | */
|
| | | public int insertSelective(TaoBaoGoodsBrief taoBaoGoodsBrief);
|
| | |
|
| | | public TaoBaoGoodsBrief selectByPrimaryKey(Long id);
|
| | |
|
| | | /**
|
| | | * 设置默认值
|
| | | * |
| | | * @param goodsBrief
|
| | | * @return
|
| | | */
|
| | | public void setGoodsBriefDefault(TaoBaoGoodsBrief goodsBrief);
|
| | |
|
| | | /**
|
| | | * 获取商品详情(用于分享)
|
| | | * |
| | | * @param auctionId
|
| | | * @param info
|
| | | * @return 返回的淘宝链接是通过转链了的
|
| | | */
|
| | | public TaoBaoGoodsBrief getTaoBaoGoodsDetailForShare(Long auctionId, Long uid) throws ShareGoodsException;
|
| | |
|
| | | /**
|
| | | * 批量插入商品
|
| | | * @param list
|
| | | * @return
|
| | | */
|
| | | public int insertBatch(List<TaoBaoGoodsBrief> list);
|
| | |
|
| | | |
| | | /**
|
| | | * 批量查询根据AuctionId
|
| | | * @param list
|
| | | * @return
|
| | | */
|
| | | public List<TaoBaoGoodsBrief> listQueryByAuctionId(List<Long> list);
|
| | |
|
| | |
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.service.taobao;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import org.fanli.facade.goods.exception.taobao.TaobaoGoodsUpdateException;
|
| | |
|
| | | import com.yeshi.fanli.base.entity.goods.TaoBaoGoodsBrief;
|
| | |
|
| | | /**
|
| | | * 淘宝商品更新
|
| | | * |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | public interface TaoBaoGoodsUpdateService {
|
| | | // 更新商品库
|
| | | // 更新动态商品
|
| | | // 更新首页的推荐
|
| | | // 精选库更新
|
| | |
|
| | | /**
|
| | | * 开始更新淘宝商品库信息 按照更新时间升序排列 只更新最近2个小时未更新的数据
|
| | | */
|
| | | public void startUpdate();
|
| | |
|
| | | /**
|
| | | * 删除创建时间过长的商品
|
| | | */
|
| | | public void deleteOutOfDate();
|
| | |
|
| | | /**
|
| | | * 淘宝商品更新
|
| | | * |
| | | * @param goods
|
| | | * 需要携带券信息
|
| | | */
|
| | | public void updateTaoBaoGoods(TaoBaoGoodsBrief goods) throws TaobaoGoodsUpdateException;
|
| | |
|
| | | /**
|
| | | * 淘宝商品批量更新
|
| | | * |
| | | * @param goods
|
| | | * 需要携带券信息
|
| | | */
|
| | | public void updateTaoBaoGoods(List<TaoBaoGoodsBrief> goodsList) throws TaobaoGoodsUpdateException;
|
| | |
|
| | | /**
|
| | | * 删除淘宝的商品数据和对应的依赖数据
|
| | | * |
| | | * @param auctionId
|
| | | */
|
| | |
|
| | | public void deleteTaoBaoGoods(Long auctionId);
|
| | |
|
| | | /**
|
| | | * 下架某个商品的数据
|
| | | * |
| | | * @param auctionId
|
| | | */
|
| | | public void offlineTaoBaoGoods(Long auctionId);
|
| | |
|
| | | /**
|
| | | * 淘宝商品更新信息
|
| | | * |
| | | * @param taoBaoGoodsBrief
|
| | | * @return
|
| | | */
|
| | | public TaoBaoGoodsBrief getUpdateTaoBaoGoodsBrief(TaoBaoGoodsBrief taoBaoGoodsBrief);
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.service.taobao;
|
| | |
|
| | | import org.fanli.facade.goods.entity.taobao.TaoBaoLink;
|
| | | import org.fanli.facade.system.entity.common.SystemManage;
|
| | |
|
| | | public interface TaoBaoLinkService {
|
| | |
|
| | | TaoBaoLink find(long auctionId, SystemManage system);
|
| | |
|
| | | void save(TaoBaoLink tbk);
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.service.taobao;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import org.fanli.facade.goods.entity.taobao.TaoBaoMeterial;
|
| | |
|
| | | /**
|
| | | * 淘宝推荐物料
|
| | | * |
| | | * @author yj
|
| | | *
|
| | | */
|
| | |
|
| | | public interface TaoBaoMeterialService {
|
| | |
|
| | | public int deleteByPrimaryKey(Long id);
|
| | |
|
| | | public int insert(TaoBaoMeterial record);
|
| | |
|
| | | public int insertSelective(TaoBaoMeterial record);
|
| | |
|
| | | public TaoBaoMeterial selectByPrimaryKey(Long id);
|
| | |
|
| | | public int updateByPrimaryKeySelective(TaoBaoMeterial record);
|
| | |
|
| | | public int updateByPrimaryKey(TaoBaoMeterial record);
|
| | | |
| | | // 根据类目名称查询
|
| | | public List<TaoBaoMeterial> selectByClassNameAndSuperName(String className, String superName);
|
| | |
|
| | | /**
|
| | | * 根据上级类查询子类
|
| | | * @param superName
|
| | | * @return
|
| | | */
|
| | | public List<TaoBaoMeterial> selectBySuperName(String superName);
|
| | | |
| | | |
| | |
|
| | | public List<TaoBaoMeterial> selectByClassNameAndSuperNameCache(String className, String superName);
|
| | | public List<TaoBaoMeterial> selectBySuperNameCache(String superName);
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.service.taobao;
|
| | |
|
| | | import org.fanli.facade.goods.entity.taobao.TaoBaoShopInfo;
|
| | |
|
| | | import com.yeshi.fanli.base.entity.goods.TaoBaoGoodsBrief;
|
| | |
|
| | | public interface TaoBaoShopService {
|
| | |
|
| | | /**
|
| | | * 获取淘宝的商品信息
|
| | | * |
| | | * @param goodsInfo
|
| | | * @return
|
| | | */
|
| | | public TaoBaoShopInfo getTaoBaoShopInfo(TaoBaoGoodsBrief goodsInfo);
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.service.taobao;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import org.fanli.facade.goods.entity.taobao.TaoBaoUnionConfig;
|
| | |
|
| | | public interface TaoBaoUnionConfigService {
|
| | | /**
|
| | | * 根据类型获取配置信息
|
| | | * |
| | | * @param type
|
| | | * @return
|
| | | */
|
| | | List<TaoBaoUnionConfig> getConfigByType(int type);
|
| | |
|
| | | |
| | | List<TaoBaoUnionConfig> getConfigByTypeCache(int type);
|
| | |
|
| | | /**
|
| | | * 添加配置信息
|
| | | * |
| | | * @param config
|
| | | */
|
| | | public void addConfig(TaoBaoUnionConfig config);
|
| | |
|
| | | /**
|
| | | * 根据APPID获取信息
|
| | | * |
| | | * @param appId
|
| | | * @return
|
| | | */
|
| | | public TaoBaoUnionConfig getConfigByAppId(String appId);
|
| | | |
| | | |
| | | |
| | | public TaoBaoUnionConfig getConfigByAppIdCache(String appId);
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.service.usergoods;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import org.fanli.facade.goods.entity.usergoods.CollectionGoodsV2;
|
| | | import org.fanli.facade.goods.exception.usergoods.CollectionGoodsException;
|
| | |
|
| | | import com.yeshi.fanli.base.entity.goods.TaoBaoGoodsBrief;
|
| | |
|
| | | public interface CollectionGoodsV2Service {
|
| | |
|
| | | /**
|
| | | * 添加收藏
|
| | | * |
| | | * @param uid
|
| | | * 用户ID
|
| | | * @param goods
|
| | | * 商品信息
|
| | | * @throws CollectionGoodsException
|
| | | */
|
| | | public void addCollection(Long uid, TaoBaoGoodsBrief goods) throws CollectionGoodsException;
|
| | |
|
| | | /**
|
| | | * 添加收藏
|
| | | * |
| | | * @param goods
|
| | | * @throws CollectionGoodsException
|
| | | */
|
| | | public void addCollection(CollectionGoodsV2 goods) throws CollectionGoodsException;
|
| | |
|
| | | /**
|
| | | * 取消收藏
|
| | | * |
| | | * @param uid
|
| | | * -用户ID
|
| | | * @param id
|
| | | * -收藏ID
|
| | | * @throws CollectionGoodsException
|
| | | */
|
| | | public void cancelCollection(Long uid, Long id) throws CollectionGoodsException;
|
| | |
|
| | | /**
|
| | | * 取消收藏
|
| | | * |
| | | * @param uid
|
| | | * -用户编号
|
| | | * @param auctionId
|
| | | * -商品ID
|
| | | * @throws CollectionGoodsException
|
| | | */
|
| | | public void cancelCollectionByAuctionId(Long uid, Long auctionId) throws CollectionGoodsException;
|
| | |
|
| | | /**
|
| | | * 取消收藏
|
| | | * |
| | | * @param uid
|
| | | * @throws CollectionGoodsException
|
| | | */
|
| | | public void cancelCollectionByUid(Long uid) throws CollectionGoodsException;
|
| | |
|
| | | /**
|
| | | * 获取收藏记录
|
| | | * |
| | | * @param uid
|
| | | * @param page
|
| | | * @param pageSize
|
| | | * @return
|
| | | */
|
| | | public List<CollectionGoodsV2> getCollectionGoodsList(Long uid, int page, int pageSize);
|
| | |
|
| | | /**
|
| | | * 获取收藏数量
|
| | | * |
| | | * @param uid
|
| | | * @return
|
| | | */
|
| | | public long getCollectionGoodsCount(Long uid);
|
| | |
|
| | | /**
|
| | | * 根据用户ID和淘宝商品ID查询是否收藏
|
| | | * |
| | | * @param uid
|
| | | * @param actionId
|
| | | * @return
|
| | | */
|
| | | public CollectionGoodsV2 findByUidAndAuctionId(Long uid, Long actionId);
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.service.usergoods;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import org.fanli.facade.goods.entity.usergoods.ScanHistoryV2;
|
| | | import org.fanli.facade.goods.exception.taobao.CommonGoodsException;
|
| | | import org.fanli.facade.goods.exception.usergoods.ScanHistoryException;
|
| | |
|
| | | import com.yeshi.fanli.base.entity.goods.TaoBaoGoodsBrief;
|
| | |
|
| | | public interface ScanHistoryV2Service {
|
| | | /**
|
| | | * 添加浏览记录
|
| | | * |
| | | * @param uid
|
| | | * @param device
|
| | | * @param goods
|
| | | */
|
| | | public void addScanHistory(Long uid, String device, TaoBaoGoodsBrief goods)
|
| | | throws CommonGoodsException, ScanHistoryException;
|
| | |
|
| | | /**
|
| | | * 添加浏览记录
|
| | | * |
| | | * @param history
|
| | | * @throws CommonGoodsException
|
| | | * @throws ScanHistoryException
|
| | | */
|
| | | public void addScanHistory(ScanHistoryV2 history) throws CommonGoodsException, ScanHistoryException;
|
| | |
|
| | | /**
|
| | | * 根据设备或者用户ID获取浏览记录
|
| | | * |
| | | * @param uid
|
| | | * @param device
|
| | | * @param page
|
| | | * @param pageSize
|
| | | * @return
|
| | | */
|
| | | public List<ScanHistoryV2> getScanHistoryByDeviceOrUid(Long uid, String device, int page, int pageSize);
|
| | |
|
| | | /**
|
| | | * 根据设备或者用户ID获取浏览记录数量
|
| | | * |
| | | * @param uid
|
| | | * @param device
|
| | | * @return
|
| | | */
|
| | | public long getCountByDeviceOrUid(Long uid, String device);
|
| | |
|
| | | /**
|
| | | * 根据用户或者设备删除浏览记录
|
| | | * |
| | | * @param uid
|
| | | * @param device
|
| | | */
|
| | | public void deleteByDeviceOrUid(Long uid, String device);
|
| | |
|
| | | /**
|
| | | * 根据用户或者设备和淘宝商品ID删除浏览记录
|
| | | * |
| | | * @param uid
|
| | | * @param device
|
| | | * @param auctionId
|
| | | */
|
| | | public void deleteByAuctionIdAndDeviceOrUid(Long uid, String device, Long auctionId);
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.service.usergoods;
|
| | |
|
| | | import org.fanli.facade.goods.entity.taobao.TaoBaoLink;
|
| | | import org.fanli.facade.goods.entity.usergoods.UserShareGoodsHistory;
|
| | | import org.fanli.facade.goods.exception.usergoods.ShareGoodsException;
|
| | |
|
| | | import com.yeshi.fanli.base.entity.goods.TaoBaoGoodsBrief;
|
| | |
|
| | | public interface ShareGoodsService {
|
| | |
|
| | | /**
|
| | | * 添加分享记录
|
| | | * |
| | | * @param history
|
| | | * @return
|
| | | * @throws ShareGoodsException
|
| | | */
|
| | | public void addShareGoodsHistory(UserShareGoodsHistory history);
|
| | |
|
| | | /**
|
| | | * 添加分享记录
|
| | | * |
| | | * @param uid
|
| | | * @param auctionId
|
| | | */
|
| | | public UserShareGoodsHistory addShareGoodsHistory(Long uid, Long auctionId) throws ShareGoodsException;
|
| | |
|
| | | /**
|
| | | * 添加分享
|
| | | * |
| | | * @param uid
|
| | | * @param goods
|
| | | * @return
|
| | | * @throws ShareGoodsException
|
| | | */
|
| | | public UserShareGoodsHistory addShareGoodsHistory(Long uid, TaoBaoGoodsBrief goods) throws ShareGoodsException;
|
| | |
|
| | | /**
|
| | | * 获取分享详情
|
| | | * |
| | | * @param uid
|
| | | * @param auctionId
|
| | | * @return
|
| | | * @throws ShareGoodsException
|
| | | */
|
| | | public UserShareGoodsHistory getShareGoodsHistoryDetail(Long uid, Long auctionId) throws ShareGoodsException;
|
| | |
|
| | | /**
|
| | | * 获取商品的分享转链链接
|
| | | * |
| | | * @param uid
|
| | | * @param auctionId
|
| | | * @return
|
| | | * @throws ShareGoodsException
|
| | | */
|
| | |
|
| | | public TaoBaoLink getTaoBaoLinkForShare(Long uid, Long auctionId) throws ShareGoodsException;
|
| | |
|
| | | /**
|
| | | * 获取商品的购买转链链接
|
| | | * |
| | | * @param uid
|
| | | * @param auctionId
|
| | | * @return
|
| | | * @throws ShareGoodsException
|
| | | */
|
| | | public TaoBaoLink getTaoBaoLinkForBuy(Long uid, Long auctionId, int pidType) throws ShareGoodsException;
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.service.usergoods;
|
| | |
|
| | | import java.util.List;
|
| | | import java.util.Set;
|
| | |
|
| | | import org.apache.ibatis.annotations.Param;
|
| | | import org.fanli.facade.goods.entity.usergoods.UserGoodsStorage;
|
| | | import org.fanli.facade.goods.exception.usergoods.UserGoodsStorageException;
|
| | | import org.fanli.facade.goods.exception.usergoods.UserShareGoodsRecordException;
|
| | |
|
| | | import net.sf.json.JSONArray;
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | | public interface UserGoodsStorageService {
|
| | |
|
| | | public int deleteByPrimaryKey(Long id);
|
| | |
|
| | | public int insert(UserGoodsStorage record);
|
| | |
|
| | | public int insertSelective(UserGoodsStorage record);
|
| | |
|
| | | public UserGoodsStorage selectByPrimaryKey(Long id);
|
| | |
|
| | | public int updateByPrimaryKeySelective(UserGoodsStorage record);
|
| | |
|
| | | public int updateByPrimaryKey(UserGoodsStorage record);
|
| | | |
| | | /**
|
| | | * 查询用户对应的选品库
|
| | | * @param start
|
| | | * @param count
|
| | | * @param uid
|
| | | * @return
|
| | | */
|
| | | public List<UserGoodsStorage> listQueryByUid(@Param("start") long start, @Param("count") int count, |
| | | @Param("uid") Long uid);
|
| | | |
| | | public long countQueryByUid(@Param("uid") Long uid);
|
| | |
|
| | | /**
|
| | | * 新增或初始化用户选品库
|
| | | * @param uid 用户id
|
| | | * @param auctionIds 商品id集合
|
| | | * @return
|
| | | * @throws UserGoodsStorageException
|
| | | */
|
| | | public void save(Long uid, Set<Long> auctionIds) throws UserGoodsStorageException;
|
| | |
|
| | | /**
|
| | | * 批量删除
|
| | | * @param list
|
| | | * @return
|
| | | */
|
| | | public int deleteBatchByPrimaryKey(List<Long> list);
|
| | |
|
| | | /**
|
| | | * 查询备选库
|
| | | * @param page
|
| | | * @param pageSize
|
| | | * @param uid
|
| | | * @return
|
| | | * @throws UserGoodsStorageException
|
| | | */
|
| | | public JSONArray getMyStorage(int page, int pageSize, Long uid) throws UserGoodsStorageException;
|
| | |
|
| | | /**
|
| | | * 根据主键 、uid 批量删除
|
| | | * @param list
|
| | | * @return
|
| | | */
|
| | | public int deleteBatchByUidAndPrimaryKey(Long uid, List<Long> list);
|
| | |
|
| | | /**
|
| | | * 根据用户id、淘宝商品 id
|
| | | * @param uid 用户id
|
| | | * @param auctionId 淘宝商品 id
|
| | | * @return
|
| | | */
|
| | | public UserGoodsStorage getByUidAndAuctionId(Long uid, Long auctionId);
|
| | |
|
| | | /**
|
| | | * 判断是否属于选品库
|
| | | * @param uid 用户id
|
| | | * @param auctionId 商品id
|
| | | * @return |
| | | */
|
| | | public boolean isExistStorage(Long uid, Long auctionId);
|
| | |
|
| | | /**
|
| | | * 选品库分享商品
|
| | | * @param uid
|
| | | * @param listStorageID
|
| | | * @throws UserGoodsStorageException
|
| | | * @throws UserShareGoodsRecordException
|
| | | */
|
| | | public JSONObject shareGoods(Long uid, List<Long> listStorageID) throws UserGoodsStorageException, UserShareGoodsRecordException;
|
| | |
|
| | | /**
|
| | | * 更新商品状态为已分享
|
| | | * @param shareId 分享
|
| | | */
|
| | | public void updateShareState(Long shareId);
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.service.usergoods;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import org.fanli.facade.goods.entity.usergoods.UserShareGoodsGroup;
|
| | | import org.fanli.facade.goods.exception.usergoods.UserShareGoodsRecordException;
|
| | | import org.fanli.facade.order.entity.hongbao.HongBao;
|
| | |
|
| | | public interface UserShareGoodsGroupService {
|
| | |
|
| | | public int insert(UserShareGoodsGroup record);
|
| | |
|
| | | public int insertSelective(UserShareGoodsGroup record);
|
| | |
|
| | | public int updateByPrimaryKeySelective(UserShareGoodsGroup record);
|
| | |
|
| | | public int updateByPrimaryKey(UserShareGoodsGroup record);
|
| | | |
| | | public UserShareGoodsGroup selectByPrimaryKey(Long id);
|
| | | |
| | | /**
|
| | | * 查询分享商品
|
| | | * @param recordId 分享记录id
|
| | | * @return
|
| | | */
|
| | | public List<UserShareGoodsGroup> listByRecordId(Long recordId);
|
| | | |
| | | /**
|
| | | * 查询单个商品 判断是否单个商品分享 goodsDetail
|
| | | * @param recordId
|
| | | * @return
|
| | | */
|
| | | public UserShareGoodsGroup getSingleGoods(Long cid, Long uid);
|
| | |
|
| | | /**
|
| | | * 批量插入数据
|
| | | * @param list
|
| | | * @return
|
| | | */
|
| | | public int insertBatch(List<UserShareGoodsGroup> list);
|
| | | |
| | | /**
|
| | | * 查询最新更新的商品
|
| | | * @param cid
|
| | | * @param auctionId
|
| | | * @return
|
| | | */
|
| | | public UserShareGoodsGroup getNewestRecord(Long uid, Long auctionId);
|
| | |
|
| | |
|
| | | /**
|
| | | * 更新订单数量及收益
|
| | | * @param uid 用户id |
| | | * @param auctionId 商品id
|
| | | * @param count 订单数量
|
| | | * @throws UserShareGoodsRecordException
|
| | | */
|
| | | public void updateOrderRecord(HongBao hongBao) throws UserShareGoodsRecordException;
|
| | |
|
| | | /**
|
| | | * 单个商品分享浏览记录
|
| | | * @param uid
|
| | | * @param auctionId
|
| | | * @param count
|
| | | * @throws UserShareGoodsRecordException
|
| | | */
|
| | | public void updateBrowseRecord(Long uid, Long auctionId, int count) throws UserShareGoodsRecordException;
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.service.usergoods;
|
| | |
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | |
|
| | | import org.fanli.facade.goods.entity.usergoods.UserShareGoodsRecord;
|
| | | import org.fanli.facade.goods.entity.usergoods.UserShareGoodsRecord.ShareSourceTypeEnum;
|
| | | import org.fanli.facade.goods.exception.usergoods.UserShareGoodsRecordException;
|
| | |
|
| | | import com.yeshi.fanli.base.entity.goods.TaoBaoGoodsBrief;
|
| | |
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | | public interface UserShareGoodsRecordService {
|
| | |
|
| | | public int insert(UserShareGoodsRecord record);
|
| | |
|
| | | public int insertSelective(UserShareGoodsRecord record);
|
| | |
|
| | | public int updateByPrimaryKeySelective(UserShareGoodsRecord record);
|
| | |
|
| | | public UserShareGoodsRecord selectByPrimaryKey(Long id);
|
| | |
|
| | | /**
|
| | | * 查询用户对应的选品库
|
| | | * |
| | | * @param start
|
| | | * @param count
|
| | | * @param uid
|
| | | * @return
|
| | | */
|
| | | public List<UserShareGoodsRecord> listQueryByUid(long start, int count, Long uid, String source);
|
| | |
|
| | | public long countQueryByUid(Long uid, String source);
|
| | |
|
| | | /**
|
| | | * 统计记录
|
| | | * |
| | | * @param list
|
| | | * @return
|
| | | */
|
| | | public List<UserShareGoodsRecord> listCountRecord(List<Long> list);
|
| | |
|
| | | /**
|
| | | * 获取分享记录
|
| | | * |
| | | * @param start
|
| | | * @param count
|
| | | * @param uid
|
| | | * @param source
|
| | | * @return
|
| | | */
|
| | | public List<UserShareGoodsRecord> getMyShareGoodsRecords(long start, int count, Long uid, String source);
|
| | |
|
| | | /**
|
| | | * 多个商品分享
|
| | | * |
| | | * @param uid
|
| | | * 用户id
|
| | | * @param source
|
| | | * 来源
|
| | | * @param title
|
| | | * 标题内容
|
| | | * @param listGoods
|
| | | * 商品集合
|
| | | * @throws UserShareGoodsRecordException
|
| | | */
|
| | | public Map<String, Object> save(Long uid, ShareSourceTypeEnum source, String title,
|
| | | List<TaoBaoGoodsBrief> listGoods) throws UserShareGoodsRecordException;
|
| | |
|
| | | /**
|
| | | * 单个商品分享
|
| | | * |
| | | * @param uid
|
| | | * 用户id
|
| | | * @param source
|
| | | * 来源
|
| | | * @param taoBaoGoodsBrief
|
| | | * 商品
|
| | | * @throws UserShareGoodsRecordException
|
| | | */
|
| | | public void save(Long uid, ShareSourceTypeEnum source, String title, TaoBaoGoodsBrief taoBaoGoodsBrief)
|
| | | throws UserShareGoodsRecordException;
|
| | |
|
| | | /**
|
| | | * 查询已分享商品
|
| | | * |
| | | * @param recordId
|
| | | * @return
|
| | | * @throws UserShareGoodsRecordException
|
| | | */
|
| | | public JSONObject getGoodsGroup(Long recordId) throws UserShareGoodsRecordException;
|
| | |
|
| | | /**
|
| | | * h5分享商品列表
|
| | | * |
| | | * @param recordId
|
| | | * @return
|
| | | * @throws UserShareGoodsRecordException
|
| | | */
|
| | | public JSONObject getGoodsGroupDetail(Long recordId) throws UserShareGoodsRecordException;
|
| | |
|
| | | /**
|
| | | * 更新分享记录
|
| | | * |
| | | * @param shareId
|
| | | * @throws UserShareGoodsRecordException
|
| | | */
|
| | | public void updateShareRecord(Long shareId) throws UserShareGoodsRecordException;
|
| | |
|
| | | /**
|
| | | * |
| | | * @param uid
|
| | | * @param auctionId
|
| | | * @param type
|
| | | * @throws UserShareGoodsRecordException
|
| | | */
|
| | | public void saveDetail(Long uid, Long auctionId, String type) throws UserShareGoodsRecordException;
|
| | |
|
| | | /**
|
| | | * 分享记录计数
|
| | | * @param uid
|
| | | * @return
|
| | | */
|
| | | public long countShareRecordByUid(Long uid);
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.utils;
|
| | |
|
| | | import java.io.IOException;
|
| | | import java.text.ParseException;
|
| | | import java.text.SimpleDateFormat;
|
| | | import java.util.ArrayList;
|
| | | import java.util.Calendar;
|
| | | import java.util.Collection;
|
| | | import java.util.Collections;
|
| | | import java.util.Comparator;
|
| | | import java.util.Date;
|
| | | import java.util.HashMap;
|
| | | import java.util.LinkedHashMap;
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | | import java.util.Map.Entry;
|
| | | import java.util.TreeMap;
|
| | | import java.util.regex.Matcher;
|
| | | import java.util.regex.Pattern;
|
| | |
|
| | | import javax.servlet.http.HttpServletRequest;
|
| | |
|
| | | import org.fanli.facade.goods.dto.clazz.GoodsClassAdmin;
|
| | | import org.fanli.facade.goods.dto.recommend.RecommendBannerAdmin;
|
| | | import org.fanli.facade.goods.dto.recommend.RecommendSectionAdmin;
|
| | | import org.fanli.facade.goods.dto.recommend.RecommendSpecialAdmin;
|
| | | import org.fanli.facade.goods.dto.usergoods.HotSearchAdmin;
|
| | | import org.fanli.facade.goods.entity.recommend.RecommendSection;
|
| | | import org.fanli.facade.goods.entity.recommend.RecommendSectionGoods;
|
| | | import org.jsoup.Jsoup;
|
| | | import org.jsoup.nodes.Document;
|
| | | import org.yeshi.utils.StringUtil;
|
| | | import org.yeshi.utils.taobao.TbImgUtil;
|
| | |
|
| | | import com.yeshi.fanli.base.entity.admin.AdminUser;
|
| | |
|
| | | import net.sf.json.JSONArray;
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | | public class GoodsUtils {
|
| | |
|
| | | private static final String ANDROID = "ANDROID";
|
| | | private static final String IOS = "IOS";
|
| | | private static final String WEB = "WEB";
|
| | |
|
| | | private static final Map<String, String> map = new HashMap<String, String>();
|
| | |
|
| | | static {
|
| | | map.put("1", ANDROID);
|
| | | map.put("2", IOS);
|
| | | map.put("3", WEB);
|
| | | }
|
| | |
|
| | | public static Map<String, String> getMap() {
|
| | | return map;
|
| | | }
|
| | |
|
| | | public static boolean isEmailUrlRight(String email, String sign, long time) {
|
| | | if (StringUtil.Md5(email + time + "WEIJU2016xxx").equalsIgnoreCase(sign)
|
| | | && Math.abs(System.currentTimeMillis() - time) < 1000 * 60 * 60 * 2) {
|
| | | return true;
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public static String getUrlPageTitle(String url) {
|
| | | try {
|
| | | Document doc = Jsoup.connect(url).timeout(1000 * 60).get();
|
| | | return doc.title();
|
| | | } catch (IOException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | return "";
|
| | | }
|
| | |
|
| | | public static AdminUser getAdminUser(HttpServletRequest request) {
|
| | | AdminUser adminUser = (AdminUser) request.getSession().getAttribute("ADMIN_USERINFO");
|
| | | return adminUser;
|
| | | }
|
| | |
|
| | | public static boolean signIsRight(String devicename, String imei, String sign) {
|
| | | return sign.equalsIgnoreCase(StringUtil.Md5(devicename + imei + "WEIju2016888xx3"));
|
| | | }
|
| | |
|
| | | public static Map<String, Object> sort(Map<String, Integer> map) {
|
| | | // 通过ArrayList构�?函数把map.entrySet()转换成list
|
| | | List<Map.Entry<String, Object>> list = new ArrayList<Map.Entry<String, Object>>((Collection) map.entrySet());
|
| | | // 通过比较器实现比较排�?
|
| | | Collections.sort(list, new Comparator<Map.Entry<String, Object>>() {
|
| | | public int compare(Map.Entry<String, Object> mapping1, Map.Entry<String, Object> mapping2) {
|
| | | return mapping1.getKey().compareTo(mapping2.getKey());
|
| | | }
|
| | | });
|
| | |
|
| | | Map<String, Object> newMap = new TreeMap<String, Object>();
|
| | | for (Entry<String, Object> entry : list) {
|
| | | newMap.put(entry.getKey(), entry.getValue());
|
| | | }
|
| | | return newMap;
|
| | | }
|
| | |
|
| | | @SuppressWarnings("unchecked")
|
| | | public static void sort(List list) {
|
| | | if (list == null || list.size() == 0) {
|
| | | return;
|
| | | }
|
| | | if (list.get(0) instanceof RecommendSection) {
|
| | | Collections.sort(list, new Comparator<RecommendSection>() {
|
| | | public int compare(RecommendSection o1, RecommendSection o2) {
|
| | | return o1.getOrderby() - o2.getOrderby();
|
| | | }
|
| | | });
|
| | | } else if (list.get(0) instanceof RecommendSectionGoods) {
|
| | | Collections.sort(list, new Comparator<RecommendSectionGoods>() {
|
| | | public int compare(RecommendSectionGoods o1, RecommendSectionGoods o2) {
|
| | | return o1.getOrderby() - o2.getOrderby();
|
| | | }
|
| | | });
|
| | | }
|
| | | return;
|
| | | }
|
| | |
|
| | | @SuppressWarnings("unchecked")
|
| | | public static Map orderBy(Map map) {
|
| | | if (map.size() == 0) {
|
| | | return map;
|
| | | }
|
| | |
|
| | | Collection values = map.values();
|
| | | Object obj = null;
|
| | | for (Object object : values) {
|
| | | obj = object;
|
| | | break;
|
| | | }
|
| | | if (obj instanceof RecommendBannerAdmin) {
|
| | |
|
| | | // 通过ArrayList构�?函数把map.entrySet()转换成list
|
| | | List<Map.Entry<Long, RecommendBannerAdmin>> list = new ArrayList<Map.Entry<Long, RecommendBannerAdmin>>(
|
| | | (Collection) map.entrySet());
|
| | | // 通过比较器实现比较排�?
|
| | | Collections.sort(list, new Comparator<Map.Entry<Long, RecommendBannerAdmin>>() {
|
| | | public int compare(Map.Entry<Long, RecommendBannerAdmin> mapping1,
|
| | | Map.Entry<Long, RecommendBannerAdmin> mapping2) {
|
| | | int orderby1 = mapping1.getValue().getRecommendBanner().getOrderby();
|
| | | int orderby2 = mapping2.getValue().getRecommendBanner().getOrderby();
|
| | | return orderby1 - orderby2;
|
| | | }
|
| | | });
|
| | | LinkedHashMap<Long, Object> newMap = new LinkedHashMap<Long, Object>();
|
| | | for (Entry<Long, RecommendBannerAdmin> entry : list) {
|
| | | newMap.put(entry.getKey(), entry.getValue());
|
| | | }
|
| | | return newMap;
|
| | | } else if (obj instanceof RecommendSpecialAdmin) {
|
| | | List<Map.Entry<Long, RecommendSpecialAdmin>> list = new ArrayList<Map.Entry<Long, RecommendSpecialAdmin>>(
|
| | | (Collection) map.entrySet());
|
| | | Collections.sort(list, new Comparator<Map.Entry<Long, RecommendSpecialAdmin>>() {
|
| | | public int compare(Map.Entry<Long, RecommendSpecialAdmin> mapping1,
|
| | | Map.Entry<Long, RecommendSpecialAdmin> mapping2) {
|
| | | int orderby1 = mapping1.getValue().getRecommendSpecial().getOrderby();
|
| | | int orderby2 = mapping2.getValue().getRecommendSpecial().getOrderby();
|
| | | return orderby1 - orderby2;
|
| | | }
|
| | | });
|
| | | LinkedHashMap<Long, Object> newMap = new LinkedHashMap<Long, Object>();
|
| | | for (Entry<Long, RecommendSpecialAdmin> entry : list) {
|
| | | newMap.put(entry.getKey(), entry.getValue());
|
| | | }
|
| | | return newMap;
|
| | | } else if (obj instanceof HotSearchAdmin) {
|
| | | List<Map.Entry<Long, HotSearchAdmin>> list = new ArrayList<Map.Entry<Long, HotSearchAdmin>>(
|
| | | (Collection) map.entrySet());
|
| | | Collections.sort(list, new Comparator<Map.Entry<Long, HotSearchAdmin>>() {
|
| | | public int compare(Map.Entry<Long, HotSearchAdmin> mapping1, Map.Entry<Long, HotSearchAdmin> mapping2) {
|
| | | int orderby1 = mapping1.getValue().getHotSearch().getOrderby();
|
| | | int orderby2 = mapping2.getValue().getHotSearch().getOrderby();
|
| | | return orderby1 - orderby2;
|
| | | }
|
| | | });
|
| | | LinkedHashMap<Long, Object> newMap = new LinkedHashMap<Long, Object>();
|
| | | for (Entry<Long, HotSearchAdmin> entry : list) {
|
| | | newMap.put(entry.getKey(), entry.getValue());
|
| | | }
|
| | | return newMap;
|
| | | } else if (obj instanceof GoodsClassAdmin) {
|
| | | List<Map.Entry<Long, GoodsClassAdmin>> list = new ArrayList<Map.Entry<Long, GoodsClassAdmin>>(
|
| | | (Collection) map.entrySet());
|
| | | Collections.sort(list, new Comparator<Map.Entry<Long, GoodsClassAdmin>>() {
|
| | | public int compare(Map.Entry<Long, GoodsClassAdmin> mapping1,
|
| | | Map.Entry<Long, GoodsClassAdmin> mapping2) {
|
| | | int orderby1 = mapping1.getValue().getGoodsClass().getOrderby();
|
| | | int orderby2 = mapping2.getValue().getGoodsClass().getOrderby();
|
| | | return orderby1 - orderby2;
|
| | | }
|
| | | });
|
| | | LinkedHashMap<Long, Object> newMap = new LinkedHashMap<Long, Object>();
|
| | | for (Entry<Long, GoodsClassAdmin> entry : list) {
|
| | | newMap.put(entry.getKey(), entry.getValue());
|
| | | }
|
| | | return newMap;
|
| | | } else if (obj instanceof RecommendSectionAdmin) {
|
| | | List<Map.Entry<Long, RecommendSectionAdmin>> list = new ArrayList<Map.Entry<Long, RecommendSectionAdmin>>(
|
| | | (Collection) map.entrySet());
|
| | | Collections.sort(list, new Comparator<Map.Entry<Long, RecommendSectionAdmin>>() {
|
| | | public int compare(Map.Entry<Long, RecommendSectionAdmin> mapping1,
|
| | | Map.Entry<Long, RecommendSectionAdmin> mapping2) {
|
| | | int orderby1 = mapping1.getValue().getRecommendSection().getOrderby();
|
| | | int orderby2 = mapping2.getValue().getRecommendSection().getOrderby();
|
| | | return orderby1 - orderby2;
|
| | | }
|
| | | });
|
| | | LinkedHashMap<Long, Object> newMap = new LinkedHashMap<Long, Object>();
|
| | | for (Entry<Long, RecommendSectionAdmin> entry : list) {
|
| | | newMap.put(entry.getKey(), entry.getValue());
|
| | | }
|
| | | return newMap;
|
| | | }
|
| | | return map;
|
| | | }
|
| | |
|
| | | public static List<String> getDateMonthList(Date beginDate, Date endDate) {
|
| | | Calendar endCalendar = Calendar.getInstance();
|
| | | endCalendar.setTime(endDate);
|
| | |
|
| | | Calendar beginCalendar = Calendar.getInstance();
|
| | | beginCalendar.setTime(beginDate);
|
| | |
|
| | | int month = beginCalendar.get(Calendar.MONTH) - endCalendar.get(Calendar.MONTH);
|
| | | List<String> list = new ArrayList<String>();
|
| | | SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM");
|
| | | for (int ii = month; ii < 0; ii++) {
|
| | | Calendar ca = Calendar.getInstance();
|
| | | ca.set(Calendar.DAY_OF_MONTH, 1);
|
| | | ca.set(Calendar.MONTH, (ca.get(Calendar.MONTH)) + ii + 1);
|
| | | String format = dateFormat.format(ca.getTime());
|
| | | list.add(format);
|
| | | }
|
| | | return list;
|
| | | }
|
| | |
|
| | | public static List<String> getDateMonthList(int month, Date date) {
|
| | | List<String> list = new ArrayList<String>();
|
| | | SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM");
|
| | | Calendar ca;
|
| | | for (int ii = -month; ii < 0; ii++) {
|
| | | ca = Calendar.getInstance();
|
| | | ca.setTime(date);
|
| | | ca.set(Calendar.DAY_OF_MONTH, 1);
|
| | | ca.set(Calendar.MONTH, (ca.get(Calendar.MONTH)) + ii + 1);
|
| | | String format = dateFormat.format(ca.getTime());
|
| | | list.add(format);
|
| | | }
|
| | | return list;
|
| | | }
|
| | |
|
| | | public static int countMonths(String date1, String date2) throws ParseException {
|
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
| | |
|
| | | Calendar c1 = Calendar.getInstance();
|
| | | Calendar c2 = Calendar.getInstance();
|
| | |
|
| | | c1.setTime(sdf.parse(date1));
|
| | | c2.setTime(sdf.parse(date2));
|
| | |
|
| | | int year = c2.get(Calendar.YEAR) - c1.get(Calendar.YEAR);
|
| | |
|
| | | // �?��日期若小月结束日�?
|
| | | if (year < 0) {
|
| | | year = -year;
|
| | | return year * 12 + c1.get(Calendar.MONTH) - c2.get(Calendar.MONTH);
|
| | | }
|
| | |
|
| | | return year * 12 + c2.get(Calendar.MONTH) - c1.get(Calendar.MONTH);
|
| | | }
|
| | |
|
| | | public static int countDay(String date1, String date2) throws ParseException {
|
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
| | |
|
| | | Calendar c1 = Calendar.getInstance();
|
| | | Calendar c2 = Calendar.getInstance();
|
| | |
|
| | | c1.setTime(sdf.parse(date1));
|
| | | c2.setTime(sdf.parse(date2));
|
| | | int day = ((Long) ((c2.getTimeInMillis() - c1.getTimeInMillis()) / 86400000)).intValue();
|
| | | return day;
|
| | | }
|
| | |
|
| | | public static String imgSize(String jsonStr) {
|
| | | JSONObject json = JSONObject.fromObject(jsonStr);
|
| | | String picUrl = (String) json.opt("pictUrl");
|
| | | if (picUrl.contains("alicdn") || picUrl.contains("tbcdn")) {
|
| | | picUrl = TbImgUtil.getTBSize320Img(picUrl);
|
| | | }
|
| | | json.element("pictUrl", picUrl);
|
| | | return json.toString();
|
| | | }
|
| | |
|
| | | public static String imgListSize(String jsonStr) {
|
| | | JSONArray json = JSONArray.fromObject(jsonStr);
|
| | | for (Object object : json) {
|
| | | String picUrl = (String) ((JSONObject) object).opt("pictUrl");
|
| | | if (picUrl.contains("alicdn") || picUrl.contains("tbcdn")) {
|
| | | picUrl = TbImgUtil.getTBSize320Img(picUrl);
|
| | | }
|
| | | ((JSONObject) object).element("pictUrl", picUrl);
|
| | | }
|
| | | return json.toString();
|
| | | }
|
| | |
|
| | | public static Map<String, String> parseURL(String url) {
|
| | |
|
| | | String URL_REGEX = "(((http|https)://)|(www\\.))[a-zA-Z0-9\\._-]+\\.[a-zA-Z]{2,6}(:[0-9]{1,4})?(/[a-zA-Z0-9\\&%_\\./-~-]*)?";
|
| | | Pattern p = Pattern.compile(URL_REGEX);
|
| | | Matcher matcher = p.matcher(url);
|
| | | boolean b = matcher.matches();
|
| | | Map<String, String> map = new HashMap<String, String>();
|
| | | if (!b) {
|
| | | return map;
|
| | | }
|
| | | if (!url.contains("?")) {
|
| | | return map;
|
| | | }
|
| | |
|
| | | String params = url.substring(url.indexOf("?") + 1);
|
| | | if (params == null || "".equals(params)) {
|
| | | return map;
|
| | | }
|
| | |
|
| | | String[] paramArr = params.split("&");
|
| | |
|
| | | for (String arr : paramArr) {
|
| | | String[] kv = arr.split("=");
|
| | | if (kv.length == 1) {
|
| | | kv[1] = "";
|
| | | }
|
| | | map.put(kv[0], kv[1]);
|
| | | }
|
| | |
|
| | | return map;
|
| | | }
|
| | |
|
| | | public static double random(double mix) {
|
| | | return (Math.random() * 20) + mix;
|
| | | }
|
| | |
|
| | | public static String getStarString(String content, int begin, int end) {
|
| | |
|
| | | if (begin >= content.length() || begin < 0) {
|
| | | return content;
|
| | | }
|
| | | if (end >= content.length() || end < 0) {
|
| | | return content;
|
| | | }
|
| | | if (begin >= end) {
|
| | | return content;
|
| | | }
|
| | | String starStr = "";
|
| | | for (int i = begin; i < end; i++) {
|
| | | starStr = starStr + "*";
|
| | | }
|
| | | return content.substring(0, begin) + starStr + content.substring(end, content.length());
|
| | |
|
| | | }
|
| | |
|
| | | public static boolean isNum(String content) {
|
| | | if (content == null) {
|
| | | return false;
|
| | | }
|
| | | String regex = "\\d+";
|
| | | Pattern compile = Pattern.compile(regex);
|
| | | Matcher matcher = compile.matcher(content);
|
| | | return matcher.matches();
|
| | | }
|
| | |
|
| | | public static boolean isOrderNum(String order) {
|
| | | if (order == null) {
|
| | | return false;
|
| | | }
|
| | | String regex = "\\d{16,}";
|
| | | Pattern compile = Pattern.compile(regex);
|
| | | Matcher matcher = compile.matcher(order);
|
| | | return matcher.matches();
|
| | | }
|
| | |
|
| | | public static boolean isUserOrder(String existOrder, String lostOrder) {
|
| | | if (existOrder.length() < 16 || lostOrder.length() < 16) {
|
| | | return false;
|
| | | }
|
| | | String existNum = existOrder.substring(existOrder.length() - 6);
|
| | | String lostOrderNum = lostOrder.substring(lostOrder.length() - 6);
|
| | |
|
| | | if (existNum.equals(lostOrderNum)) {
|
| | | return true;
|
| | | }
|
| | |
|
| | | return false;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.utils;
|
| | |
|
| | | import java.awt.BasicStroke;
|
| | | import java.awt.Color;
|
| | | import java.awt.Font;
|
| | | import java.awt.FontFormatException;
|
| | | import java.awt.FontMetrics;
|
| | | import java.awt.Graphics;
|
| | | import java.awt.Graphics2D;
|
| | | import java.awt.RenderingHints;
|
| | | import java.awt.RenderingHints.Key;
|
| | | import java.awt.geom.RoundRectangle2D;
|
| | | import java.awt.image.BufferedImage;
|
| | | import java.io.ByteArrayInputStream;
|
| | | import java.io.ByteArrayOutputStream;
|
| | | import java.io.File;
|
| | | import java.io.FileInputStream;
|
| | | import java.io.FileOutputStream;
|
| | | import java.io.IOException;
|
| | | import java.io.InputStream;
|
| | | import java.io.OutputStream;
|
| | | import java.math.BigDecimal;
|
| | | import java.net.MalformedURLException;
|
| | | import java.net.URL;
|
| | | import java.util.HashMap;
|
| | | import java.util.List;
|
| | |
|
| | | import javax.imageio.ImageIO;
|
| | |
|
| | | import org.fanli.facade.goods.entity.activity.RecommendActivityTaoBaoGoods;
|
| | | import org.fanli.facade.goods.utils.taobao.TaoBaoHttpUtil;
|
| | | import org.fanli.facade.goods.utils.taobao.TaoBaoUtil;
|
| | | import org.yeshi.utils.FileUtil;
|
| | | import org.yeshi.utils.HttpUtil;
|
| | | import org.yeshi.utils.MoneyBigDecimalUtil;
|
| | | import org.yeshi.utils.StringUtil;
|
| | |
|
| | | import com.yeshi.fanli.base.entity.goods.TaoBaoGoodsBrief;
|
| | | import com.yeshi.fanli.base.log.LogHelper;
|
| | |
|
| | | public class ImageUtil {
|
| | |
|
| | | // 画商品分享图
|
| | | public static InputStream drawGoodsShareImg(InputStream qrcodeStream, InputStream portrait,
|
| | | TaoBaoGoodsBrief goods) {
|
| | |
|
| | | String fontPath = "/usr/share/fonts/PingFang_Medium.ttf";
|
| | |
|
| | | String os = System.getProperty("os.name");
|
| | | if (os.toLowerCase().startsWith("win")) {
|
| | | fontPath = "D:/PingFang_Medium.ttf";
|
| | | }
|
| | |
|
| | | String fontBoldPath = "/usr/share/fonts/PingFang_Heavy_0.ttf";
|
| | | if (os.toLowerCase().startsWith("win")) {
|
| | | fontBoldPath = "D:/PingFang_Heavy_0.ttf";
|
| | | }
|
| | |
|
| | | final BufferedImage targetImg = new BufferedImage(720, 1280, BufferedImage.TYPE_INT_RGB);
|
| | |
|
| | | HashMap<Key, Object> mapH = new HashMap<Key, Object>();
|
| | | mapH.put(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);// 抗锯齿 (抗锯齿总开关)
|
| | | mapH.put(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_GASP);// 文字抗锯齿
|
| | |
|
| | | final Graphics2D g2d = (Graphics2D) targetImg.getGraphics();
|
| | |
|
| | | g2d.setRenderingHints(mapH);
|
| | |
|
| | | g2d.setColor(Color.WHITE);
|
| | | g2d.fillRect(0, 0, 720, 1280);
|
| | | Font font = null;
|
| | | try {
|
| | | font = Font.createFont(Font.PLAIN, new File(fontPath)).deriveFont(30.0f);
|
| | | } catch (FontFormatException e1) {
|
| | | e1.printStackTrace();
|
| | | } catch (IOException e1) {
|
| | | e1.printStackTrace();
|
| | | }
|
| | |
|
| | | g2d.setFont(font);
|
| | | try {
|
| | | g2d.setColor(new Color(153, 153, 153));
|
| | | // 画来源图标
|
| | | InputStream userTypeIcon = null;
|
| | | if (goods.getUserType() == 0)// 淘宝
|
| | | {
|
| | | userTypeIcon = ImageUtil.class.getClassLoader().getResourceAsStream("image/icon_tb.png");
|
| | | } else {
|
| | | userTypeIcon = ImageUtil.class.getClassLoader().getResourceAsStream("image/icon_tm.png");
|
| | | }
|
| | |
|
| | | g2d.drawImage(ImageIO.read(userTypeIcon), 50, 88, null);
|
| | |
|
| | | // 商品标题
|
| | | String title = goods.getTitle();
|
| | | int row = 0;
|
| | | int length = 0;
|
| | | // 画第一排
|
| | | length = getTextLengthByWidth(g2d, font, title, 500, 10);
|
| | | g2d.drawString(title.substring(0, length), 50 + 65, 112 + row * 40);
|
| | | title = title.substring(length);
|
| | | row++;
|
| | |
|
| | | // 判断是否画完,最多画2排
|
| | | while (title.length() > 0 && row < 2) {
|
| | | length = getTextLengthByWidth(g2d, font, title, 335, 10);
|
| | | g2d.drawString(title.substring(0, length), 50, 112 + row * 40);
|
| | | title = title.substring(length);
|
| | | row++;
|
| | | }
|
| | |
|
| | | // 画商品主图
|
| | | InputStream goodsPicture = TaoBaoHttpUtil.getAsInputStream(goods.getPictUrl());
|
| | | BufferedImage picImage = ImageIO.read(goodsPicture);
|
| | | picImage = zoomInImage(picImage, 620, 620);
|
| | | g2d.drawImage(picImage, 50, 190, null);
|
| | | Font boldFont = Font.createFont(Font.PLAIN, new File(fontBoldPath)).deriveFont(50.0f);
|
| | | // 画价格
|
| | | // 有券
|
| | | if (!StringUtil.isNullOrEmpty(goods.getCouponInfo())) {
|
| | | BigDecimal finalPrice = goods.getZkPrice();
|
| | | if (goods.getCouponStartFee().compareTo(goods.getZkPrice()) <= 0
|
| | | && goods.getZkPrice().compareTo(goods.getCouponAmount()) >= 0) {
|
| | | finalPrice = goods.getZkPrice().subtract(goods.getCouponAmount());
|
| | | }
|
| | |
|
| | | g2d.setColor(new Color(229, 0, 93));
|
| | | g2d.drawString("券后价 ¥", 57, 875);
|
| | | g2d.setColor(new Color(229, 0, 93));
|
| | | g2d.setFont(boldFont);
|
| | | g2d.drawString(finalPrice.toString(), 85 + 110, 875);
|
| | |
|
| | | // 画券右侧
|
| | | BufferedImage quanRight = ImageIO
|
| | | .read(ImageUtil.class.getClassLoader().getResourceAsStream("image/fanli_quan_right.png"));
|
| | | g2d.setColor(new Color(241, 66, 66));
|
| | | g2d.drawImage(quanRight, 670 - quanRight.getWidth(), 852, null);
|
| | |
|
| | | // 画券的内容
|
| | | g2d.setColor(new Color(229, 0, 93));
|
| | |
|
| | | String quanString = " " + MoneyBigDecimalUtil.getWithNoZera(goods.getCouponAmount()) + "元券 ";
|
| | |
|
| | | boldFont = boldFont.deriveFont(44.0f);
|
| | | g2d.setFont(boldFont);
|
| | | FontMetrics fm = g2d.getFontMetrics(boldFont);
|
| | | int textLength = fm.stringWidth(quanString);
|
| | |
|
| | | g2d.fillRect(670 - quanRight.getWidth() - textLength, 852, textLength, 80);
|
| | |
|
| | | g2d.setColor(Color.WHITE);
|
| | |
|
| | | g2d.setFont(boldFont);
|
| | | g2d.drawString(quanString, 670 - quanRight.getWidth() - textLength, 927 - 19);
|
| | |
|
| | | // 画券左侧
|
| | | BufferedImage quanLeft = ImageIO
|
| | | .read(ImageUtil.class.getClassLoader().getResourceAsStream("image/fanli_quan_left.png"));
|
| | | g2d.drawImage(quanLeft, 670 - quanRight.getWidth() - textLength - quanLeft.getWidth(), 852, null);
|
| | |
|
| | | String zkPriceName = "";
|
| | | if (goods.getUserType() == 0)
|
| | | zkPriceName = "淘宝价 ¥ " + MoneyBigDecimalUtil.getWithNoZera(goods.getZkPrice());
|
| | | else
|
| | | zkPriceName = "天猫价 ¥ " + MoneyBigDecimalUtil.getWithNoZera(goods.getZkPrice());
|
| | |
|
| | | g2d.setColor(new Color(153, 153, 153));
|
| | | font = font.deriveFont(30.0f);
|
| | | g2d.setFont(font);
|
| | | g2d.drawString(zkPriceName, 56, 930);
|
| | |
|
| | | } else// 无券
|
| | | {
|
| | | g2d.setColor(new Color(229, 0, 93));
|
| | | g2d.drawString("¥", 60, 870);
|
| | | g2d.setColor(new Color(229, 0, 93));
|
| | | BigDecimal finalPrice = goods.getZkPrice();
|
| | | g2d.setFont(boldFont);
|
| | | g2d.drawString(finalPrice.toString(), 85, 870);
|
| | | }
|
| | |
|
| | | g2d.setColor(new Color(247, 247, 247));
|
| | | g2d.fillRect(56, 1015, 608, 204);
|
| | |
|
| | | // 画二维码
|
| | |
|
| | | BufferedImage qrcodeImage = ImageIO.read(qrcodeStream);
|
| | | qrcodeImage = zoomInImage(qrcodeImage, 170, 170);
|
| | |
|
| | | g2d.drawImage(qrcodeImage, 56 + 17, 1015 + 17, null);
|
| | |
|
| | | // 画头像
|
| | | if (portrait != null) {
|
| | | BufferedImage portraitImg = ImageIO.read(portrait);
|
| | | portraitImg = zoomInImage(portraitImg, 40, 40);
|
| | | g2d.drawImage(portraitImg, 56 + 17 + (qrcodeImage.getWidth() - portraitImg.getWidth()) / 2,
|
| | | 1015 + 17 + (qrcodeImage.getHeight() - portraitImg.getHeight()) / 2, null);
|
| | | }
|
| | |
|
| | | font = font.deriveFont(30.0f);
|
| | | g2d.setFont(font);
|
| | | g2d.setColor(new Color(229, 0, 93));
|
| | | // g2d.drawString("返利券提醒您", 250 + 17, 1080 + 17);
|
| | |
|
| | | g2d.setColor(new Color(102, 102, 102));
|
| | | g2d.drawString("长按识别二维码领取优惠券", 250 + 17, 1130 + 17);
|
| | |
|
| | | g2d.dispose();
|
| | |
|
| | | // OutputStream out = new ByteArrayOutputStream(); new
|
| | | // FileOutputStream(new File(targetPath));
|
| | | // ImageIO.write(targetImg, "JPEG", out);
|
| | | // out.flush();
|
| | | // out.close();
|
| | | ByteArrayOutputStream aos = new ByteArrayOutputStream();
|
| | | ImageIO.write(targetImg, "JPEG", aos);
|
| | | InputStream is = new ByteArrayInputStream(aos.toByteArray());
|
| | | return is;
|
| | | } catch (Exception e) {
|
| | | try {
|
| | | LogHelper.errorDetailInfo(e);
|
| | | } catch (Exception e1) {
|
| | | e1.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | return null;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 绘制大的商品动态分享图
|
| | | * |
| | | * @param qrcodeStream
|
| | | * @param portrait
|
| | | * @param goods
|
| | | * @return
|
| | | */
|
| | | public static InputStream drawActivityGoodsShareBigImg(InputStream qrcodeStream, InputStream portrait,
|
| | | List<RecommendActivityTaoBaoGoods> goodsList) {
|
| | |
|
| | | String fontPath = "/usr/share/fonts/PingFang_Medium.ttf";
|
| | |
|
| | | String os = System.getProperty("os.name");
|
| | | if (os.toLowerCase().startsWith("win")) {
|
| | | fontPath = "D:/PingFang_Medium.ttf";
|
| | | }
|
| | |
|
| | | String fontBoldPath = "/usr/share/fonts/PingFang_Heavy_0.ttf";
|
| | | if (os.toLowerCase().startsWith("win")) {
|
| | | fontBoldPath = "D:/PingFang_Heavy_0.ttf";
|
| | | }
|
| | |
|
| | | final BufferedImage targetImg = new BufferedImage(1420, 1334, BufferedImage.TYPE_INT_RGB);
|
| | |
|
| | | HashMap<Key, Object> mapH = new HashMap<Key, Object>();
|
| | | mapH.put(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);// 抗锯齿 (抗锯齿总开关)
|
| | | mapH.put(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_GASP);// 文字抗锯齿
|
| | |
|
| | | final Graphics2D g2d = (Graphics2D) targetImg.getGraphics();
|
| | |
|
| | | g2d.setRenderingHints(mapH);
|
| | |
|
| | | g2d.setColor(Color.WHITE);
|
| | | g2d.fillRect(0, 0, 1420, 1334);
|
| | | Font font = null;
|
| | | try {
|
| | | font = Font.createFont(Font.PLAIN, new File(fontPath)).deriveFont(30.0f);
|
| | | } catch (FontFormatException e1) {
|
| | | e1.printStackTrace();
|
| | | } catch (IOException e1) {
|
| | | e1.printStackTrace();
|
| | | }
|
| | |
|
| | | Font boldFont = null;
|
| | | try {
|
| | | boldFont = Font.createFont(Font.PLAIN, new File(fontBoldPath)).deriveFont(50.0f);
|
| | | } catch (FontFormatException e2) {
|
| | | e2.printStackTrace();
|
| | | } catch (IOException e2) {
|
| | | e2.printStackTrace();
|
| | | }
|
| | | g2d.setFont(font);
|
| | | try {
|
| | | g2d.setColor(new Color(153, 153, 153));
|
| | | // 画第一张
|
| | | for (int i = 0; i < goodsList.size(); i++) {
|
| | | RecommendActivityTaoBaoGoods goods = goodsList.get(i);
|
| | |
|
| | | // 第一张图需要有价格信息
|
| | | if (i == 0) {
|
| | | int topX = 50;
|
| | | int topY = 50;
|
| | | // 画大图 起始点坐标为(50,50)
|
| | | InputStream goodsPicture = TaoBaoHttpUtil
|
| | | .getAsInputStream(goods.getPictUrl().replace("_.webp", "").replace("_220x220", ""));
|
| | | BufferedImage picImage = ImageIO.read(goodsPicture);
|
| | | picImage = zoomInImage(picImage, 650, 650);
|
| | | g2d.drawImage(picImage, topX, topX, null);
|
| | | g2d.setColor(new Color(224, 224, 224));
|
| | | // 画边框
|
| | | g2d.setStroke(new BasicStroke(1.0f));
|
| | | g2d.drawRect(topX - 1, topY - 1, 651, 651);
|
| | | // 画透明背景
|
| | | g2d.setColor(new Color(255, 255, 255, 210));
|
| | | g2d.fillRect(50, 600, 650, 100);
|
| | | // 画金额
|
| | | g2d.setColor(new Color(240, 0, 102));
|
| | | boldFont = boldFont.deriveFont(22.0f);
|
| | | g2d.setFont(boldFont);
|
| | | g2d.drawString("¥", 70, 650);
|
| | | boldFont = boldFont.deriveFont(42.0f);
|
| | | g2d.setFont(boldFont);
|
| | | g2d.drawString(goods.getQuanPrice(), 90, 650);
|
| | |
|
| | | // 画原价
|
| | | g2d.setColor(new Color(102, 102, 102));
|
| | | font = font.deriveFont(24.0f);
|
| | | g2d.setFont(font);
|
| | |
|
| | | String zkPrice = new BigDecimal(goods.getQuanPrice().replace("¥", "")).add(goods.getCouponAmount())
|
| | | .toString();
|
| | | g2d.drawString("¥ " + zkPrice, 70, 650 + 33);
|
| | |
|
| | | FontMetrics fm = g2d.getFontMetrics(font);
|
| | | int textLength = fm.stringWidth(zkPrice);
|
| | | // 画删除线
|
| | | g2d.setStroke(new BasicStroke(2.0f));
|
| | | g2d.drawLine(70 + 20, 674, 90 + 10 + textLength, 674);
|
| | |
|
| | | // 画券右侧
|
| | | BufferedImage quanRight = ImageIO
|
| | | .read(ImageUtil.class.getClassLoader().getResourceAsStream("image/fanli_quan_right.png"));
|
| | | quanRight = zoomInImage(quanRight, 12, 60);
|
| | | g2d.setColor(new Color(241, 66, 66));
|
| | | g2d.drawImage(quanRight, topX + 630 - quanRight.getWidth(), topY + 630 - quanRight.getHeight(),
|
| | | null);
|
| | |
|
| | | // 画券的内容
|
| | | g2d.setColor(new Color(229, 0, 93));
|
| | |
|
| | | String quanString = " " + MoneyBigDecimalUtil.getWithNoZera(goods.getCouponAmount()) + "元券 ";
|
| | |
|
| | | font = font.deriveFont(36.0f);
|
| | | g2d.setFont(font);
|
| | | fm = g2d.getFontMetrics(font);
|
| | | textLength = fm.stringWidth(quanString);
|
| | |
|
| | | g2d.fillRect(topX + 630 - quanRight.getWidth() - textLength, topY + 630 - quanRight.getHeight(),
|
| | | textLength, quanRight.getHeight());
|
| | |
|
| | | g2d.setColor(Color.WHITE);
|
| | | g2d.drawString(quanString, topX + 630 - quanRight.getWidth() - textLength,
|
| | | topY + 630 + 42 - quanRight.getHeight());
|
| | |
|
| | | // 画券左侧
|
| | | BufferedImage quanLeft = ImageIO
|
| | | .read(ImageUtil.class.getClassLoader().getResourceAsStream("image/fanli_quan_left.png"));
|
| | | quanLeft = zoomInImage(quanLeft, 12, 60);
|
| | | g2d.drawImage(quanLeft, topX + 630 - quanRight.getWidth() - textLength - quanLeft.getWidth(),
|
| | | topY + 630 - quanRight.getHeight(), null);
|
| | |
|
| | | } else {
|
| | | // 计算左上角坐标
|
| | | int topX = 0;
|
| | | int topY = 0;
|
| | | if (i == 1)
|
| | | topX = 50 + (315 + 20) * 0;
|
| | | else if (i == 2 || i % 2 != 0)// 2,3,5,7
|
| | | topX = 50 + (315 + 20) * (i % 2 + 1);
|
| | | else if (i % 2 == 0)// 4,6,8
|
| | | topX = 50 + (315 + 20) * 3;
|
| | |
|
| | | if (i == 1 || i == 2)
|
| | | topY = 50 + 650 + 20;
|
| | | else if (i == 3 || i == 4)
|
| | | topY = 50;
|
| | | else if (i == 5 || i == 6)
|
| | | topY = 50 + (315 + 20) * 1;
|
| | | else if (i == 7 || i == 8)
|
| | | topY = 50 + (315 + 20) * 2;
|
| | |
|
| | | // 画大图
|
| | | InputStream goodsPicture = TaoBaoHttpUtil
|
| | | .getAsInputStream(goods.getPictUrl().replace("_.webp", ""));
|
| | | BufferedImage picImage = ImageIO.read(goodsPicture);
|
| | | picImage = zoomInImage(picImage, 315, 315);
|
| | | g2d.drawImage(picImage, topX, topY, null);
|
| | |
|
| | | g2d.setColor(new Color(224, 224, 224));
|
| | | // 画边框
|
| | | g2d.setStroke(new BasicStroke(1.0f));
|
| | | g2d.drawRect(topX - 1, topY - 1, 316, 316);
|
| | |
|
| | | // 画券
|
| | |
|
| | | // 画券右侧
|
| | | BufferedImage quanRight = ImageIO
|
| | | .read(ImageUtil.class.getClassLoader().getResourceAsStream("image/fanli_quan_right.png"));
|
| | | quanRight = zoomInImage(quanRight, 8, 40);
|
| | | g2d.setColor(new Color(241, 66, 66));
|
| | | g2d.drawImage(quanRight, topX + 315 - quanRight.getWidth(), topY + 315 - quanRight.getHeight(),
|
| | | null);
|
| | |
|
| | | // 画券的内容
|
| | | g2d.setColor(new Color(229, 0, 93));
|
| | |
|
| | | String quanString = " " + MoneyBigDecimalUtil.getWithNoZera(goods.getCouponAmount()) + "元券 ";
|
| | |
|
| | | font = font.deriveFont(24.0f);
|
| | | g2d.setFont(font);
|
| | | FontMetrics fm = g2d.getFontMetrics(font);
|
| | | int textLength = fm.stringWidth(quanString);
|
| | |
|
| | | g2d.fillRect(topX + 315 - quanRight.getWidth() - textLength, topY + 315 - quanRight.getHeight(),
|
| | | textLength, quanRight.getHeight());
|
| | |
|
| | | g2d.setColor(Color.WHITE);
|
| | |
|
| | | g2d.setFont(font);
|
| | | g2d.drawString(quanString, topX + 315 - quanRight.getWidth() - textLength,
|
| | | topY + 315 + 28 - quanRight.getHeight());
|
| | |
|
| | | // 画券左侧
|
| | | BufferedImage quanLeft = ImageIO
|
| | | .read(ImageUtil.class.getClassLoader().getResourceAsStream("image/fanli_quan_left.png"));
|
| | | quanLeft = zoomInImage(quanLeft, 8, 40);
|
| | | g2d.drawImage(quanLeft, topX + 315 - quanRight.getWidth() - textLength - quanLeft.getWidth(),
|
| | | topY + 315 - quanRight.getHeight(), null);
|
| | | }
|
| | | }
|
| | |
|
| | | g2d.setColor(new Color(247, 247, 247));
|
| | | g2d.fillRect(50, 1070, 1320, 214);
|
| | |
|
| | | // 画二维码
|
| | |
|
| | | BufferedImage qrcodeImage = ImageIO.read(qrcodeStream);
|
| | | qrcodeImage = zoomInImage(qrcodeImage, 170, 170);
|
| | |
|
| | | g2d.drawImage(qrcodeImage, 70, 1092, null);
|
| | |
|
| | | // 画头像
|
| | | if (portrait != null) {
|
| | | BufferedImage portraitImg = ImageIO.read(portrait);
|
| | | portraitImg = zoomInImage(portraitImg, 40, 40);
|
| | | g2d.drawImage(portraitImg, 70 + (qrcodeImage.getWidth() - portraitImg.getWidth()) / 2,
|
| | | 1092 + (qrcodeImage.getHeight() - portraitImg.getHeight()) / 2, null);
|
| | | }
|
| | |
|
| | | font = font.deriveFont(50.0f);
|
| | | g2d.setFont(font);
|
| | | g2d.setColor(new Color(229, 0, 93));
|
| | | // g2d.drawString("返利券提醒您", 312, 1118 + 40);
|
| | |
|
| | | g2d.setColor(new Color(102, 102, 102));
|
| | | g2d.drawString("长按识别二维码领取优惠券", 312, 1118 + 77);
|
| | |
|
| | | g2d.dispose();
|
| | |
|
| | | // OutputStream out = new ByteArrayOutputStream(); new
|
| | | // FileOutputStream(new File(targetPath));
|
| | | // ImageIO.write(targetImg, "JPEG", out);
|
| | | // out.flush();
|
| | | // out.close();
|
| | | ByteArrayOutputStream aos = new ByteArrayOutputStream();
|
| | | ImageIO.write(targetImg, "JPEG", aos);
|
| | | InputStream is = new ByteArrayInputStream(aos.toByteArray());
|
| | | return is;
|
| | | } catch (Exception e) {
|
| | | try {
|
| | | LogHelper.errorDetailInfo(e);
|
| | | } catch (Exception e1) {
|
| | | e1.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | return null;
|
| | | }
|
| | | |
| | | /**
|
| | | * 绘制大的商品动态分享图
|
| | | * |
| | | * @param qrcodeStream
|
| | | * @param portrait
|
| | | * @param goods
|
| | | * @return
|
| | | */
|
| | | public static InputStream drawGoodsShareBigImg(InputStream qrcodeStream, InputStream portrait,
|
| | | List<TaoBaoGoodsBrief> goodsList) {
|
| | |
|
| | | String fontPath = "/usr/share/fonts/PingFang_Medium.ttf";
|
| | |
|
| | | String os = System.getProperty("os.name");
|
| | | if (os.toLowerCase().startsWith("win")) {
|
| | | fontPath = "D:/PingFang_Medium.ttf";
|
| | | }
|
| | |
|
| | | String fontBoldPath = "/usr/share/fonts/PingFang_Heavy_0.ttf";
|
| | | if (os.toLowerCase().startsWith("win")) {
|
| | | fontBoldPath = "D:/PingFang_Heavy_0.ttf";
|
| | | }
|
| | |
|
| | | final BufferedImage targetImg = new BufferedImage(1420, 1334, BufferedImage.TYPE_INT_RGB);
|
| | |
|
| | | HashMap<Key, Object> mapH = new HashMap<Key, Object>();
|
| | | mapH.put(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);// 抗锯齿 (抗锯齿总开关)
|
| | | mapH.put(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_GASP);// 文字抗锯齿
|
| | |
|
| | | final Graphics2D g2d = (Graphics2D) targetImg.getGraphics();
|
| | |
|
| | | g2d.setRenderingHints(mapH);
|
| | |
|
| | | g2d.setColor(Color.WHITE);
|
| | | g2d.fillRect(0, 0, 1420, 1334);
|
| | | Font font = null;
|
| | | try {
|
| | | font = Font.createFont(Font.PLAIN, new File(fontPath)).deriveFont(30.0f);
|
| | | } catch (FontFormatException e1) {
|
| | | e1.printStackTrace();
|
| | | } catch (IOException e1) {
|
| | | e1.printStackTrace();
|
| | | }
|
| | |
|
| | | Font boldFont = null;
|
| | | try {
|
| | | boldFont = Font.createFont(Font.PLAIN, new File(fontBoldPath)).deriveFont(50.0f);
|
| | | } catch (FontFormatException e2) {
|
| | | e2.printStackTrace();
|
| | | } catch (IOException e2) {
|
| | | e2.printStackTrace();
|
| | | }
|
| | | g2d.setFont(font);
|
| | | try {
|
| | | // g2d.setColor(new Color(153, 153, 153));
|
| | | // 画第一张
|
| | | for (int i = 0; i < goodsList.size(); i++) {
|
| | | TaoBaoGoodsBrief goods = goodsList.get(i);
|
| | | BigDecimal couplePrice = TaoBaoUtil.getAfterUseCouplePrice(goods);
|
| | | // 第一张图需要有价格信息
|
| | | if (i == 0) {
|
| | | int topX = 50;
|
| | | int topY = 50;
|
| | | // 画大图 起始点坐标为(50,50)
|
| | | InputStream goodsPicture = TaoBaoHttpUtil
|
| | | .getAsInputStream(goods.getPictUrl().replace("_.webp", "").replace("_220x220", ""));
|
| | | BufferedImage picImage = ImageIO.read(goodsPicture);
|
| | | picImage = zoomInImage(picImage, 650, 650);
|
| | | g2d.drawImage(picImage, topX, topX, null);
|
| | | g2d.setColor(new Color(224, 224, 224));
|
| | | // 画边框
|
| | | g2d.setStroke(new BasicStroke(1.0f));
|
| | | g2d.drawRect(topX - 1, topY - 1, 651, 651);
|
| | | // 画透明背景
|
| | | g2d.setColor(new Color(255, 255, 255, 210));
|
| | | g2d.fillRect(50, 600, 650, 100);
|
| | | // 画金额
|
| | | g2d.setColor(new Color(240, 0, 102));
|
| | | boldFont = boldFont.deriveFont(22.0f);
|
| | | g2d.setFont(boldFont);
|
| | | g2d.drawString("¥", 70, 650);
|
| | | boldFont = boldFont.deriveFont(42.0f);
|
| | | g2d.setFont(boldFont);
|
| | | g2d.drawString(couplePrice+"", 90, 650);
|
| | |
|
| | | // 画原价
|
| | | g2d.setColor(new Color(102, 102, 102));
|
| | | font = font.deriveFont(24.0f);
|
| | | g2d.setFont(font);
|
| | |
|
| | | String zkPrice = new BigDecimal((couplePrice+"").replace("¥", "")).add(goods.getCouponAmount())
|
| | | .toString();
|
| | | g2d.drawString("¥ " + zkPrice, 70, 650 + 33);
|
| | |
|
| | | FontMetrics fm = g2d.getFontMetrics(font);
|
| | | int textLength = fm.stringWidth(zkPrice);
|
| | | // 画删除线
|
| | | g2d.setStroke(new BasicStroke(2.0f));
|
| | | g2d.drawLine(70 + 20, 674, 90 + 10 + textLength, 674);
|
| | |
|
| | | String quanString = "";
|
| | | BigDecimal withNoZera = MoneyBigDecimalUtil.getWithNoZera(goods.getCouponAmount());
|
| | | |
| | | if (!withNoZera.toString().endsWith("0")) {
|
| | | |
| | | // 画券右侧
|
| | | BufferedImage quanRight = ImageIO
|
| | | .read(ImageUtil.class.getClassLoader().getResourceAsStream("image/fanli_quan_right.png"));
|
| | | quanRight = zoomInImage(quanRight, 12, 60);
|
| | | g2d.setColor(new Color(241, 66, 66));
|
| | | g2d.drawImage(quanRight, topX + 630 - quanRight.getWidth(), topY + 630 - quanRight.getHeight(),
|
| | | null);
|
| | |
|
| | | // 画券的内容
|
| | | g2d.setColor(new Color(229, 0, 93));
|
| | |
|
| | | quanString = " " + withNoZera + "元券 ";
|
| | |
|
| | | font = font.deriveFont(36.0f);
|
| | | g2d.setFont(font);
|
| | | fm = g2d.getFontMetrics(font);
|
| | | textLength = fm.stringWidth(quanString);
|
| | |
|
| | | g2d.fillRect(topX + 630 - quanRight.getWidth() - textLength, topY + 630 - quanRight.getHeight(),
|
| | | textLength, quanRight.getHeight());
|
| | |
|
| | | g2d.setColor(Color.WHITE);
|
| | | g2d.drawString(quanString, topX + 630 - quanRight.getWidth() - textLength,
|
| | | topY + 630 + 42 - quanRight.getHeight());
|
| | |
|
| | | // 画券左侧
|
| | | BufferedImage quanLeft = ImageIO
|
| | | .read(ImageUtil.class.getClassLoader().getResourceAsStream("image/fanli_quan_left.png"));
|
| | | quanLeft = zoomInImage(quanLeft, 12, 60);
|
| | | g2d.drawImage(quanLeft, topX + 630 - quanRight.getWidth() - textLength - quanLeft.getWidth(),
|
| | | topY + 630 - quanRight.getHeight(), null);
|
| | | }
|
| | |
|
| | | } else {
|
| | | // 计算左上角坐标
|
| | | int topX = 0;
|
| | | int topY = 0;
|
| | | if (i == 1)
|
| | | topX = 50 + (315 + 20) * 0;
|
| | | else if (i == 2 || i % 2 != 0)// 2,3,5,7
|
| | | topX = 50 + (315 + 20) * (i % 2 + 1);
|
| | | else if (i % 2 == 0)// 4,6,8
|
| | | topX = 50 + (315 + 20) * 3;
|
| | |
|
| | | if (i == 1 || i == 2)
|
| | | topY = 50 + 650 + 20;
|
| | | else if (i == 3 || i == 4)
|
| | | topY = 50;
|
| | | else if (i == 5 || i == 6)
|
| | | topY = 50 + (315 + 20) * 1;
|
| | | else if (i == 7 || i == 8)
|
| | | topY = 50 + (315 + 20) * 2;
|
| | |
|
| | | // 画大图
|
| | | InputStream goodsPicture = TaoBaoHttpUtil
|
| | | .getAsInputStream(goods.getPictUrl().replace("_.webp", ""));
|
| | | BufferedImage picImage = ImageIO.read(goodsPicture);
|
| | | picImage = zoomInImage(picImage, 315, 315);
|
| | | g2d.drawImage(picImage, topX, topY, null);
|
| | |
|
| | | g2d.setColor(new Color(224, 224, 224));
|
| | | // 画边框
|
| | | g2d.setStroke(new BasicStroke(1.0f));
|
| | | g2d.drawRect(topX - 1, topY - 1, 316, 316);
|
| | |
|
| | | // 画券
|
| | |
|
| | | String quanString = "";
|
| | | BigDecimal withNoZera = MoneyBigDecimalUtil.getWithNoZera(goods.getCouponAmount());
|
| | | |
| | | if (!withNoZera.toString().endsWith("0")) {
|
| | | |
| | | // 画券右侧
|
| | | BufferedImage quanRight = ImageIO
|
| | | .read(ImageUtil.class.getClassLoader().getResourceAsStream("image/fanli_quan_right.png"));
|
| | | quanRight = zoomInImage(quanRight, 8, 40);
|
| | | g2d.setColor(new Color(241, 66, 66));
|
| | | g2d.drawImage(quanRight, topX + 315 - quanRight.getWidth(), topY + 315 - quanRight.getHeight(),
|
| | | null);
|
| | |
|
| | | // 画券的内容
|
| | | g2d.setColor(new Color(229, 0, 93));
|
| | | |
| | | quanString = " " + withNoZera + "元券 ";
|
| | | |
| | | font = font.deriveFont(24.0f);
|
| | | g2d.setFont(font);
|
| | | FontMetrics fm = g2d.getFontMetrics(font);
|
| | | int textLength = fm.stringWidth(quanString);
|
| | |
|
| | | g2d.fillRect(topX + 315 - quanRight.getWidth() - textLength, topY + 315 - quanRight.getHeight(),
|
| | | textLength, quanRight.getHeight());
|
| | |
|
| | | g2d.setColor(Color.WHITE);
|
| | |
|
| | | g2d.setFont(font);
|
| | | g2d.drawString(quanString, topX + 315 - quanRight.getWidth() - textLength,
|
| | | topY + 315 + 28 - quanRight.getHeight());
|
| | |
|
| | | // 画券左侧
|
| | | BufferedImage quanLeft = ImageIO
|
| | | .read(ImageUtil.class.getClassLoader().getResourceAsStream("image/fanli_quan_left.png"));
|
| | | quanLeft = zoomInImage(quanLeft, 8, 40);
|
| | | g2d.drawImage(quanLeft, topX + 315 - quanRight.getWidth() - textLength - quanLeft.getWidth(),
|
| | | topY + 315 - quanRight.getHeight(), null);
|
| | | }
|
| | | |
| | | }
|
| | | }
|
| | |
|
| | | g2d.setColor(new Color(247, 247, 247));
|
| | | g2d.fillRect(50, 1070, 1320, 214);
|
| | |
|
| | | // 画二维码
|
| | |
|
| | | BufferedImage qrcodeImage = ImageIO.read(qrcodeStream);
|
| | | qrcodeImage = zoomInImage(qrcodeImage, 170, 170);
|
| | |
|
| | | g2d.drawImage(qrcodeImage, 70, 1092, null);
|
| | |
|
| | | // 画头像
|
| | | if (portrait != null) {
|
| | | BufferedImage portraitImg = ImageIO.read(portrait);
|
| | | // 放缩大小
|
| | | portraitImg = zoomInImage(portraitImg, 40,40);
|
| | | // 圆角
|
| | | portraitImg = roundImage(portraitImg, 10);
|
| | | |
| | | g2d.drawImage(portraitImg, 70 + (qrcodeImage.getWidth() - portraitImg.getWidth()) / 2,
|
| | | 1092 + (qrcodeImage.getHeight() - portraitImg.getHeight()) / 2, null);
|
| | | }
|
| | |
|
| | | font = font.deriveFont(50.0f);
|
| | | g2d.setFont(font);
|
| | | g2d.setColor(new Color(229, 0, 93));
|
| | | // g2d.drawString("返利券提醒您", 312, 1118 + 40);
|
| | |
|
| | | g2d.setColor(new Color(102, 102, 102));
|
| | | g2d.drawString("长按识别二维码免费领券", 312, 1150);
|
| | | |
| | | g2d.setColor(new Color(102, 102, 102));
|
| | | g2d.drawString("共", 1000, 1150);
|
| | | |
| | | |
| | | g2d.setColor(new Color(229, 0, 93));
|
| | | g2d.drawString(goodsList.size()+"", 1055, 1150);
|
| | | |
| | | |
| | | g2d.setColor(new Color(102, 102, 102));
|
| | | g2d.drawString("个商品", 1090, 1150);
|
| | | |
| | | // 提示语
|
| | | BufferedImage tips = ImageIO
|
| | | .read(ImageUtil.class.getClassLoader().getResourceAsStream("image/share/tips1.png"));
|
| | | tips = zoomInImage(tips,850, 65);
|
| | | g2d.drawImage(tips, 312,1190, null);
|
| | |
|
| | | g2d.dispose();
|
| | |
|
| | | ByteArrayOutputStream aos = new ByteArrayOutputStream();
|
| | | ImageIO.write(targetImg, "JPEG", aos);
|
| | | InputStream is = new ByteArrayInputStream(aos.toByteArray());
|
| | | return is;
|
| | | } catch (Exception e) {
|
| | | try {
|
| | | LogHelper.errorDetailInfo(e);
|
| | | } catch (Exception e1) {
|
| | | e1.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | return null;
|
| | | }
|
| | |
|
| | |
|
| | | // 画商品分享图
|
| | | public static InputStream drawGoodsShareImgHCJ(InputStream qrcodeStream, InputStream portrait,
|
| | | TaoBaoGoodsBrief goods) throws Exception {
|
| | |
|
| | | String fontPath = "/usr/share/fonts/PingFang_Medium.ttf";
|
| | |
|
| | | String os = System.getProperty("os.name");
|
| | | if (os.toLowerCase().startsWith("win")) {
|
| | | fontPath = "D:/PingFang_Medium.ttf";
|
| | | }
|
| | |
|
| | | String fontBoldPath = "/usr/share/fonts/PingFang_Heavy_0.ttf";
|
| | | if (os.toLowerCase().startsWith("win")) {
|
| | | fontBoldPath = "D:/PingFang_Heavy_0.ttf";
|
| | | }
|
| | |
|
| | | Font font = null;
|
| | | Font boldFont = null;
|
| | |
|
| | | font = Font.createFont(Font.PLAIN, new File(fontPath)).deriveFont(28.0f);
|
| | |
|
| | | boldFont = Font.createFont(Font.PLAIN, new File(fontBoldPath)).deriveFont(28.0f);
|
| | |
|
| | | final BufferedImage targetImg = new BufferedImage(720, 1280, BufferedImage.TYPE_INT_RGB);
|
| | |
|
| | | HashMap<Key, Object> mapH = new HashMap<Key, Object>();
|
| | | mapH.put(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);// 抗锯齿 (抗锯齿总开关)
|
| | | mapH.put(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_GASP);// 文字抗锯齿
|
| | |
|
| | | final Graphics2D g2d = (Graphics2D) targetImg.getGraphics();
|
| | |
|
| | | g2d.setRenderingHints(mapH);
|
| | |
|
| | | g2d.setColor(Color.WHITE);
|
| | | g2d.fillRect(0, 0, 720, 1280);
|
| | |
|
| | | g2d.setFont(font.deriveFont(28.0f));
|
| | |
|
| | | // 画广告语
|
| | | InputStream adTitle = ImageUtil.class.getClassLoader().getResourceAsStream("image/hcj_share_title_icon.png");
|
| | | if (adTitle != null) {
|
| | | BufferedImage adTitleImage = ImageIO.read(adTitle);
|
| | | g2d.drawImage(adTitleImage, 192, 101, null);
|
| | | }
|
| | |
|
| | | // 画商品主图
|
| | | InputStream goodsPicture = TaoBaoHttpUtil.getAsInputStream(goods.getPictUrl().replace("https://", "http://"));
|
| | | BufferedImage picImage = ImageIO.read(goodsPicture);
|
| | | picImage = zoomInImage(picImage, 620, 620);
|
| | | g2d.drawImage(picImage, 50, 207, null);
|
| | |
|
| | | // 画价格
|
| | | BigDecimal money = TaoBaoUtil.getAfterUseCouplePrice(goods);
|
| | | money = MoneyBigDecimalUtil.getWithNoZera(money);
|
| | | g2d.setColor(new Color(240, 66, 66));
|
| | |
|
| | | g2d.setFont(boldFont.deriveFont(30.0f));
|
| | | g2d.drawString("¥", 62, 900);
|
| | |
|
| | | g2d.setFont(boldFont.deriveFont(56.0f));
|
| | | g2d.drawString(money.toString(), 90, 900);
|
| | |
|
| | | g2d.setFont(font.deriveFont(56.0f));
|
| | | g2d.setColor(new Color(153, 153, 153));
|
| | |
|
| | | if (!StringUtil.isNullOrEmpty(goods.getCouponInfo())) {
|
| | | // 画天猫价或者淘宝价
|
| | | String zkPriceName = "";
|
| | | if (goods.getUserType() == 0)
|
| | | zkPriceName = "淘宝价 ¥ " + MoneyBigDecimalUtil.getWithNoZera(goods.getZkPrice());
|
| | | else
|
| | | zkPriceName = "天猫价 ¥ " + MoneyBigDecimalUtil.getWithNoZera(goods.getZkPrice());
|
| | |
|
| | | font = font.deriveFont(30.0f);
|
| | | g2d.setFont(font);
|
| | | g2d.drawString(zkPriceName, 56, 955);
|
| | |
|
| | | // 画券右侧
|
| | | BufferedImage quanRight = ImageIO
|
| | | .read(ImageUtil.class.getClassLoader().getResourceAsStream("image/hcj_quan_right.png"));
|
| | | g2d.setColor(new Color(241, 66, 66));
|
| | | g2d.drawImage(quanRight, 670 - quanRight.getWidth(), 867, null);
|
| | |
|
| | | // 画券的内容
|
| | | g2d.setColor(new Color(241, 66, 66));
|
| | |
|
| | | String quanString = " ¥ " + MoneyBigDecimalUtil.getWithNoZera(goods.getCouponAmount()) + " 券 ";
|
| | |
|
| | | font = font.deriveFont(44.0f);
|
| | | g2d.setFont(font);
|
| | | FontMetrics fm = g2d.getFontMetrics(font);
|
| | | int textLength = fm.stringWidth(quanString);
|
| | |
|
| | | g2d.fillRect(670 - quanRight.getWidth() - textLength, 872, textLength, 80);
|
| | |
|
| | | g2d.setColor(Color.WHITE);
|
| | |
|
| | | g2d.setFont(font);
|
| | | g2d.drawString(quanString, 670 - quanRight.getWidth() - textLength, 927);
|
| | |
|
| | | // 画券左侧
|
| | | BufferedImage quanLeft = ImageIO
|
| | | .read(ImageUtil.class.getClassLoader().getResourceAsStream("image/hcj_quan_left.png"));
|
| | | g2d.drawImage(quanLeft, 670 - quanRight.getWidth() - textLength - quanLeft.getWidth(), 867, null);
|
| | | }
|
| | | InputStream userTypeIcon;
|
| | | if (goods.getUserType() == 0)// 淘宝
|
| | | {
|
| | | userTypeIcon = ImageUtil.class.getClassLoader().getResourceAsStream("image/hcj_icon_tb.png");
|
| | | } else {
|
| | | userTypeIcon = ImageUtil.class.getClassLoader().getResourceAsStream("image/hcj_icon_tm.png");
|
| | | }
|
| | |
|
| | | g2d.drawImage(ImageIO.read(userTypeIcon), 63, 1022, null);
|
| | |
|
| | | String title = goods.getTitle();
|
| | | // 商品标题
|
| | | font = font.deriveFont(30.0f);
|
| | | g2d.setFont(font);
|
| | |
|
| | | int length = getTextLengthByWidth(g2d, font, title, 290, 8);
|
| | | g2d.setColor(new Color(153, 153, 153));
|
| | |
|
| | | int row = 0;
|
| | | // 画第一排
|
| | | g2d.drawString(title.substring(0, length), 20 + 50 + 46, 1044 + row * 40);
|
| | |
|
| | | if (length < title.length())
|
| | | title = title.substring(length);
|
| | | else
|
| | | title = "";
|
| | | // 判断是否画完
|
| | | row++;
|
| | | while (title.length() > 0) {
|
| | | length = getTextLengthByWidth(g2d, font, title, 330, 10);
|
| | | g2d.drawString(title.substring(0, length), 63, 1044 + row * 40);
|
| | | title = title.substring(length);
|
| | | row++;
|
| | | }
|
| | |
|
| | | // 画边框
|
| | | InputStream erCodeSide = ImageUtil.class.getClassLoader().getResourceAsStream("image/hcj_ercode_side.png");
|
| | | BufferedImage erCodeSideImage = ImageIO.read(erCodeSide);
|
| | | erCodeSideImage = zoomInImage(erCodeSideImage, 200, 200);
|
| | | g2d.drawImage(erCodeSideImage, 466, 986, null);
|
| | |
|
| | | // 画二维码
|
| | |
|
| | | BufferedImage qrcodeImage = ImageIO.read(qrcodeStream);
|
| | | qrcodeImage = zoomInImage(qrcodeImage, 170, 170);
|
| | |
|
| | | g2d.drawImage(qrcodeImage, 481, 1000, null);
|
| | |
|
| | | // 画头像
|
| | | if (portrait != null) {
|
| | | BufferedImage portraitImg = ImageIO.read(portrait);
|
| | | portraitImg = zoomInImage(portraitImg, 30, 30);
|
| | | g2d.drawImage(portraitImg, 481 + (qrcodeImage.getWidth() - portraitImg.getWidth()) / 2,
|
| | | 1000 + (qrcodeImage.getHeight() - portraitImg.getHeight()) / 2, null);
|
| | | }
|
| | |
|
| | | font = font.deriveFont(22.0f);
|
| | | g2d.setFont(font);
|
| | | g2d.setColor(new Color(241, 66, 66));
|
| | |
|
| | | FontMetrics fm = g2d.getFontMetrics(font);
|
| | | int textLength = fm.stringWidth("海草街提醒您");
|
| | | g2d.drawString("海草街提醒您", 481 + (qrcodeImage.getWidth() - textLength) / 2, 1220);
|
| | |
|
| | | g2d.setColor(new Color(102, 102, 102));
|
| | |
|
| | | fm = g2d.getFontMetrics(font);
|
| | | textLength = fm.stringWidth("长按识别二维码");
|
| | | g2d.drawString("长按识别二维码", 481 + (qrcodeImage.getWidth() - textLength) / 2, 1255);
|
| | |
|
| | | g2d.dispose();
|
| | |
|
| | | ByteArrayOutputStream aos = new ByteArrayOutputStream();
|
| | | ImageIO.write(targetImg, "JPEG", aos);
|
| | | InputStream is = new ByteArrayInputStream(aos.toByteArray());
|
| | | return is;
|
| | | }
|
| | |
|
| | | private static int[] computeCropPosition(BufferedImage source, int width, int height) {
|
| | | int[] cropParams = new int[4];
|
| | | int owidth = source.getWidth();
|
| | | int oheight = source.getHeight();
|
| | | if (oheight * width - owidth * height > 0) {
|
| | | cropParams[0] = 0;
|
| | | cropParams[1] = (oheight - height) / 2;
|
| | | cropParams[2] = owidth;
|
| | | cropParams[3] = cropParams[2] * height / width;
|
| | | } else {
|
| | | cropParams[0] = (owidth - width) / 2;
|
| | | cropParams[1] = 0;
|
| | | cropParams[3] = oheight;
|
| | | cropParams[2] = cropParams[3] * width / height;
|
| | | }
|
| | |
|
| | | return cropParams;
|
| | | }
|
| | |
|
| | | public static BufferedImage crop(BufferedImage source, int startX, int startY, int w, int h) {
|
| | | int width = source.getWidth();
|
| | | int height = source.getHeight();
|
| | |
|
| | | if (startX <= -1) {
|
| | | startX = 0;
|
| | | }
|
| | | if (startY <= -1) {
|
| | | startY = 0;
|
| | | }
|
| | | if (w <= -1) {
|
| | | w = width - 1;
|
| | | }
|
| | | if (h <= -1) {
|
| | | h = height - 1;
|
| | | }
|
| | | BufferedImage result = new BufferedImage(w, h, source.getType());
|
| | | for (int y = startY; y < h + startY; y++) {
|
| | | for (int x = startX; x < w + startX; x++) {
|
| | | int rgb = source.getRGB(x, y);
|
| | | result.setRGB(x - startX, y - startY, rgb);
|
| | | }
|
| | | }
|
| | | return result;
|
| | | }
|
| | |
|
| | | public static BufferedImage zoomInImage(BufferedImage originalImage, int width, int height) {
|
| | | int type = originalImage.getType();
|
| | | if (type == 0)
|
| | | type = 5;
|
| | | BufferedImage newImage = new BufferedImage(width, height, type);
|
| | | Graphics g = newImage.getGraphics();
|
| | | g.drawImage(originalImage, 0, 0, width, height, null);
|
| | | g.dispose();
|
| | | return newImage;
|
| | | }
|
| | |
|
| | | // 邀请好友图片
|
| | | public static void inviteFriendImg(InputStream urlInputStream, InputStream portraitInputStream,
|
| | | InputStream erCodeInputStream, String targetPath) throws IOException {
|
| | | inviteFriendImg(urlInputStream, portraitInputStream, erCodeInputStream, targetPath, 260, 908, 230);
|
| | | }
|
| | |
|
| | | /**
|
| | | * |
| | | * @param urlInputStream
|
| | | * @param portraitInputStream
|
| | | * @param erCodeInputStream
|
| | | * @param targetPath
|
| | | * @param pX
|
| | | * -二维码的横坐标
|
| | | * @param pY
|
| | | * -二维码的纵坐标
|
| | | * @param size
|
| | | * -二维码的尺寸
|
| | | * @throws IOException
|
| | | */
|
| | | // 邀请好友图片
|
| | | public static void inviteFriendImg(InputStream urlInputStream, InputStream portraitInputStream,
|
| | | InputStream erCodeInputStream, String targetPath, int pX, int pY, int size) throws IOException {
|
| | | BufferedImage bgImage = ImageIO.read(urlInputStream);
|
| | | final BufferedImage targetImg = new BufferedImage(bgImage.getWidth(), bgImage.getHeight(),
|
| | | BufferedImage.TYPE_INT_RGB);
|
| | | HashMap<Key, Object> mapH = new HashMap<Key, Object>();
|
| | | mapH.put(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);// 抗锯齿 (抗锯齿总开关)
|
| | | mapH.put(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_GASP);// 文字抗锯齿
|
| | |
|
| | | // 画 背景图片
|
| | | final Graphics2D g2d = targetImg.createGraphics();
|
| | |
|
| | | g2d.drawImage(bgImage, 0, 0, bgImage.getWidth(), bgImage.getHeight(), null);
|
| | |
|
| | | // 画 二维码
|
| | | BufferedImage qrCodeImage = ImageIO.read(erCodeInputStream);
|
| | | qrCodeImage = ImageUtil.qrCodeImage(g2d, qrCodeImage, pX, pY, size, size); // 二维码长宽
|
| | | // 230*230
|
| | |
|
| | | // 画 头像
|
| | | BufferedImage portraitImg = ImageIO.read(portraitInputStream);
|
| | | int portraitSize = size * 5 / 23;
|
| | |
|
| | | int pPX = pX + size / 2 - portraitSize / 2;
|
| | | int pPY = pY + size / 2 - portraitSize / 2;
|
| | | portraitImg = ImageUtil.portraitImg(g2d, portraitImg, pPX, pPY, portraitSize, portraitSize);// 头像长宽
|
| | |
|
| | | OutputStream out = new FileOutputStream(new File(targetPath));
|
| | | ImageIO.write(targetImg, "JPEG", out);
|
| | | out.flush();
|
| | | out.close();
|
| | | }
|
| | |
|
| | | // 二维码
|
| | | public static BufferedImage qrCodeImage(Graphics2D g2d, BufferedImage originalImage, int pX, int pY, int width,
|
| | | int height) {
|
| | | g2d.drawImage(originalImage, pX, pY, width, height, null);
|
| | | return originalImage;
|
| | | }
|
| | |
|
| | | // 头像
|
| | | public static BufferedImage portraitImg(Graphics2D g2d, BufferedImage originalImage, int pX, int pY, int width,
|
| | | int height) {
|
| | | g2d.drawImage(originalImage, pX, pY, width, height, null);
|
| | | return originalImage;
|
| | | }
|
| | |
|
| | | static BufferedImage roundImage(BufferedImage srcImage, int cornerRadius) { // 半径
|
| | | int width = srcImage.getWidth();
|
| | | int height = srcImage.getHeight();
|
| | | BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
|
| | | Graphics2D gs = image.createGraphics();
|
| | | HashMap<Key, Object> mapH = new HashMap<Key, Object>();
|
| | | mapH.put(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);// 抗锯齿 (抗锯齿总开关)
|
| | | mapH.put(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_GASP);// 文字抗锯齿
|
| | | gs.setRenderingHints(mapH);
|
| | | gs.setClip(new RoundRectangle2D.Double(0, 0, width, height, cornerRadius, cornerRadius));
|
| | | gs.drawImage(srcImage, 0, 0, null);
|
| | | gs.dispose();
|
| | | return image;
|
| | | }
|
| | | |
| | | public static int saveToImgByInputStream(InputStream inputStream, String imgPath, String imgName) {
|
| | | int stateInt = 1;
|
| | | try {
|
| | | File file = new File(imgPath, imgName);// 可以是任何图片格式.jpg,.png等
|
| | | FileOutputStream fos = new FileOutputStream(file);
|
| | |
|
| | | FileInputStream fis = (FileInputStream) inputStream;
|
| | |
|
| | | byte[] b = new byte[1024];
|
| | | int nRead = 0;
|
| | | while ((nRead = fis.read(b)) != -1) {
|
| | | fos.write(b, 0, nRead);
|
| | | }
|
| | | fos.flush();
|
| | | fos.close();
|
| | | fis.close();
|
| | |
|
| | | } catch (Exception e) {
|
| | | stateInt = 0;
|
| | | e.printStackTrace();
|
| | | } finally {
|
| | | }
|
| | | return stateInt;
|
| | | }
|
| | |
|
| | | static int getTextLengthByWidth(Graphics2D g2d, Font font, String content, int maxWidth, int startPos) {
|
| | | FontMetrics fm = g2d.getFontMetrics(font);
|
| | | for (int i = startPos; i < content.length(); i++) {
|
| | | if (fm.stringWidth(content.substring(0, i)) >= maxWidth)
|
| | | return i + 1;
|
| | | }
|
| | | return content.length();
|
| | | }
|
| | |
|
| | | public static int[] getImgWidthAndHeight(String imgUrl) throws MalformedURLException, IOException {
|
| | | if (StringUtil.isNullOrEmpty(imgUrl))
|
| | | return new int[] { 0, 0 };
|
| | | if (imgUrl.toLowerCase().endsWith("webp"))
|
| | | return getImgWidthAndHeightWithWebp(imgUrl);
|
| | | else
|
| | | return getImgWidthAndHeightWithPngAndJpg(imgUrl);
|
| | | }
|
| | |
|
| | | public static int[] getImgWidthAndHeightWithPngAndJpg(String imgUrl) throws MalformedURLException, IOException {
|
| | | InputStream murl = new URL(imgUrl).openStream();
|
| | | BufferedImage sourceImg = ImageIO.read(murl);
|
| | |
|
| | | int width = sourceImg.getWidth();
|
| | | int height = sourceImg.getHeight();
|
| | | return new int[] { width, height };
|
| | | }
|
| | |
|
| | | public static int[] getImgWidthAndHeightWithWebp(String imgUrl) throws MalformedURLException, IOException {
|
| | | String cacheFile = FileUtil.getCacheDir();
|
| | | String targetPath = cacheFile + "/CACHE_DOWNLOAD_IMG_" + System.currentTimeMillis() + "_"
|
| | | + (long) (Math.random() * 1000000000L);
|
| | | HttpUtil.downloadFile(imgUrl, targetPath);
|
| | | FileInputStream file = new FileInputStream(targetPath);
|
| | | byte[] bytes = new byte[30];
|
| | | file.read(bytes, 0, bytes.length);
|
| | | int width = ((int) bytes[27] & 0xff) << 8 | ((int) bytes[26] & 0xff);
|
| | | int height = ((int) bytes[29] & 0xff) << 8 | ((int) bytes[28] & 0xff);
|
| | | file.close();
|
| | | return new int[] { width, height };
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.utils;
|
| | |
|
| | | import java.util.ArrayList;
|
| | | import java.util.List;
|
| | |
|
| | | import org.fanli.facade.goods.dto.usergoods.Address;
|
| | | import org.fanli.facade.goods.utils.taobao.TaoBaoHttpUtil;
|
| | |
|
| | | import net.sf.json.JSONArray;
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | | public class ProxyUtil {
|
| | | |
| | | private static final String url="http://118.190.209.189:8080/nv/api/client/ip/getproxyips";
|
| | | |
| | | private static final List<Address> addressPool = new ArrayList<Address>(); |
| | | |
| | | private volatile static int pointer=0; //指针
|
| | | |
| | | public static void updateProxyPool(){
|
| | | try{
|
| | | String ips = TaoBaoHttpUtil.get(url,false);
|
| | | JSONArray array = JSONArray.fromObject(ips);
|
| | | Address address = null;
|
| | | int size = addressPool.size();
|
| | | for (Object obj : array) {
|
| | | JSONObject data = (JSONObject)obj;
|
| | | String ip = data.optString("ip");
|
| | | int port = Integer.parseInt(data.optString("port"));
|
| | | address = new Address(ip,port);
|
| | | addressPool.add(address);
|
| | | }
|
| | | for(int i=0;i<size-1;i++){
|
| | | addressPool.remove(i);
|
| | | }
|
| | | }catch(Exception e){
|
| | | System.out.println("代理更新失败");
|
| | | }
|
| | | }
|
| | | |
| | | public static Address getAddressProxy(){
|
| | | int size = addressPool.size();
|
| | | if(size==0){
|
| | | return null;
|
| | | }
|
| | | if(size-2 >= pointer){
|
| | | pointer++;
|
| | | }else{
|
| | | pointer=0;
|
| | | }
|
| | | return addressPool.get(pointer);
|
| | | }
|
| | | }
|
| | |
|
New file |
| | |
| | | package org.fanli.facade.goods.utils;
|
| | |
|
| | | import java.util.ArrayList;
|
| | | import java.util.List;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.fanli.facade.goods.entity.taobao.TaoBaoShopInfo;
|
| | | import org.fanli.facade.goods.entity.taobao.TaoBaoUnionConfig;
|
| | | import org.fanli.facade.goods.exception.taobao.TaobaoGoodsDownException;
|
| | | import org.fanli.facade.goods.service.taobao.TaoBaoShopService;
|
| | | import org.fanli.facade.goods.service.taobao.TaoBaoUnionConfigService;
|
| | | import org.fanli.facade.goods.utils.dataoke.TaoKeApiUtil;
|
| | | import org.fanli.facade.goods.utils.taobao.TaoBaoCouponUtil;
|
| | | import org.fanli.facade.goods.utils.taobao.TaoBaoUtil;
|
| | | import org.springframework.stereotype.Component;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | | import org.yeshi.utils.StringUtil;
|
| | |
|
| | | import com.google.gson.Gson;
|
| | | import com.google.gson.reflect.TypeToken;
|
| | | import com.yeshi.fanli.base.Constant;
|
| | | import com.yeshi.fanli.base.dto.ImageInfo;
|
| | | import com.yeshi.fanli.base.entity.goods.TaoBaoGoodsBrief;
|
| | | import com.yeshi.fanli.base.entity.user.PidUser;
|
| | | import com.yeshi.fanli.base.log.LogHelper;
|
| | |
|
| | | import net.sf.json.JSONArray;
|
| | | import redis.clients.jedis.Jedis;
|
| | | import redis.clients.jedis.JedisPool;
|
| | |
|
| | | //抢红包采用的redis
|
| | | @Component
|
| | | public class RedisManager {
|
| | |
|
| | | @Resource
|
| | | private JedisPool jedisPool;
|
| | |
|
| | | @Resource
|
| | | private TaoBaoShopService taoBaoShopService;
|
| | |
|
| | | @Resource
|
| | | private TaoBaoUnionConfigService taoBaoUnionConfigService;
|
| | |
|
| | | /**
|
| | | * 缓存字符串
|
| | | * |
| | | * @param key
|
| | | * @param value
|
| | | */
|
| | | private void setString(String key, String value) {
|
| | | Jedis jedis = jedisPool.getResource();
|
| | | try {
|
| | | jedis.set(key, value);
|
| | | } finally {
|
| | | jedisPool.returnResource(jedis);
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | /**
|
| | | * 删除某个键值
|
| | | * |
| | | * @param key
|
| | | * @param value
|
| | | */
|
| | | private void removeKey(String key) {
|
| | | Jedis jedis = jedisPool.getResource();
|
| | | try {
|
| | | jedis.del(key);
|
| | | } finally {
|
| | | jedisPool.returnResource(jedis);
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | /**
|
| | | * 缓存字符串
|
| | | * |
| | | * @param key
|
| | | * @param value
|
| | | * @param seconds
|
| | | * -缓存时间(s)
|
| | | */
|
| | | private void setString(String key, String value, int seconds) {
|
| | | Jedis jedis = jedisPool.getResource();
|
| | | try {
|
| | | jedis.setex(key, seconds, value);
|
| | | } finally {
|
| | | jedisPool.returnResource(jedis);
|
| | | }
|
| | | }
|
| | |
|
| | | private String getString(String key) {
|
| | | Jedis jedis = jedisPool.getResource();
|
| | | try {
|
| | | return jedis.get(key);
|
| | | } finally {
|
| | | jedisPool.returnResource(jedis);
|
| | | }
|
| | | }
|
| | |
|
| | | public void cacheCommonString(String key, String value, int seconds) {
|
| | | setString(key, value, seconds);
|
| | | }
|
| | |
|
| | | public void cacheCommonString(String key, String value) {
|
| | | setString(key, value);
|
| | | }
|
| | |
|
| | | public String getCommonString(String key) {
|
| | | return getString(key);
|
| | | }
|
| | |
|
| | | public void removeCommonString(String key) {
|
| | | removeKey(key);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 将信息永久保存到Redis
|
| | | * |
| | | * @param goods
|
| | | */
|
| | | public void saveTaoBaoGoodsBriefForever(TaoBaoGoodsBrief goods) {
|
| | | String key = "taobao-goods-" + goods.getAuctionId();
|
| | | if (Constant.IS_OUTNET) {
|
| | | cacheCommonString(key, JsonUtil.getSimpleGson().toJson(goods));
|
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | * 删除缓存
|
| | | * |
| | | * @param auctionId
|
| | | */
|
| | | public void deleteTaoBaoGoodsBrief(Long auctionId) {
|
| | | String key = "taobao-goods-" + auctionId;
|
| | | if (Constant.IS_OUTNET)
|
| | | removeKey(key);
|
| | | }
|
| | |
|
| | | public TaoBaoGoodsBrief getTaoBaoGoodsBrief(long auctionId) throws TaobaoGoodsDownException {
|
| | | long startTime = System.currentTimeMillis();
|
| | | String key = "taobao-goods-" + auctionId;
|
| | | String value = "";
|
| | | if (Constant.IS_OUTNET)
|
| | | value = getCommonString(key);
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(value)) {
|
| | | TaoBaoGoodsBrief goods = null;
|
| | |
|
| | | goods = TaoKeApiUtil.searchGoodsDetail(auctionId);
|
| | |
|
| | | if (goods != null)
|
| | | // 缓存20分钟
|
| | | if (Constant.IS_OUTNET)
|
| | | cacheCommonString(key, JsonUtil.getSimpleGson().toJson(goods), 60 * 20);
|
| | | LogHelper.test(auctionId + "-获取商品详情耗时:" + (System.currentTimeMillis() - startTime));
|
| | | return goods;
|
| | | } else {// 直接取缓存
|
| | | return JsonUtil.getSimpleGson().fromJson(value, TaoBaoGoodsBrief.class);
|
| | | }
|
| | | }
|
| | |
|
| | | public List<ImageInfo> getTaoBaoGoodsDetailImgs(long auctionId) {
|
| | | String key = "taobao-goods-detailimgs-size-" + auctionId;
|
| | | String value = "";
|
| | | if (Constant.IS_OUTNET)
|
| | | value = getCommonString(key);
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(value)) {
|
| | | List<ImageInfo> list = null;
|
| | | try {
|
| | | list = TaoBaoUtil.getTBDetailImageWithSizev2(auctionId);
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | if (list == null || list.size() == 0) {
|
| | | list = TaoBaoUtil.getTBDetailImageWithSize(auctionId);
|
| | | }
|
| | | if (list != null && list.size() > 0)
|
| | | // 缓存1天
|
| | | if (Constant.IS_OUTNET)
|
| | | cacheCommonString(key, JsonUtil.getSimpleGson().toJson(list), 60 * 60 * 24);
|
| | | return list;
|
| | | } else {// 直接取缓存
|
| | | List<ImageInfo> imgList = new Gson().fromJson(value, new TypeToken<List<ImageInfo>>() {
|
| | | }.getType());
|
| | | return imgList;
|
| | | }
|
| | | }
|
| | |
|
| | | public String getXCXCouponToken(TaoBaoGoodsBrief tb) {
|
| | | List<TaoBaoUnionConfig> configList = taoBaoUnionConfigService.getConfigByTypeCache(PidUser.TYPE_FANLI_ANDROID);
|
| | | String key = "taobao-couple-xcx-" + tb.getAuctionId();
|
| | | String value = "";
|
| | | if (Constant.IS_OUTNET)
|
| | | value = getCommonString(key);
|
| | | if (StringUtil.isNullOrEmpty(value)) {
|
| | | value = TaoKeApiUtil.getTKToken(tb.getPictUrl(), tb.getTitle(), TaoBaoCouponUtil
|
| | | .getCoupleUrl(tb.getCouponActivityId(), configList.get(0).getDefaultPid(), tb.getAuctionId() + ""));
|
| | | if (value != null)
|
| | | // 缓存20分钟
|
| | | if (Constant.IS_OUTNET)
|
| | | cacheCommonString(key, value, 60 * 20);
|
| | | return value;
|
| | | } else {// 直接取缓存
|
| | | return value;
|
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | * IP访问频率限制 适用于 小程序,H5,WEB 同一IP,5s内限制请求100次
|
| | | * |
| | | * @param ip
|
| | | */
|
| | | public boolean ipFrequencyLimit(String ip, String apiName) {
|
| | | String key = ip + "-" + StringUtil.Md5(apiName);
|
| | | Jedis jedis = jedisPool.getResource();
|
| | | try {
|
| | | long count = jedis.incr(key);
|
| | | if (count == 1)
|
| | | jedis.expire(key, 5);
|
| | | if (count >= 100)
|
| | | return true;
|
| | | else
|
| | | return false;
|
| | | } finally {
|
| | | jedisPool.returnResource(jedis);
|
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | * 获取淘宝图片
|
| | | * |
| | | * @param auctionId
|
| | | * @return
|
| | | */
|
| | | public List<String> getTBImg(Long auctionId) {
|
| | | String key = "taobao-img-" + auctionId;
|
| | | String value = "";
|
| | | if (Constant.IS_OUTNET)
|
| | | value = getCommonString(key);
|
| | | if (StringUtil.isNullOrEmpty(value)) {
|
| | | List<String> list = TaoBaoUtil.getTbImg(auctionId + "");
|
| | | if (Constant.IS_OUTNET && list != null && list.size() > 0) {
|
| | | value = new Gson().toJson(list);
|
| | | cacheCommonString(key, value, 60 * 60 * 2);
|
| | | }
|
| | | return list;
|
| | | } else {
|
| | | JSONArray array = JSONArray.fromObject(value);
|
| | | List<String> list = new ArrayList<>();
|
| | | for (int i = 0; i < array.size(); i++) {
|
| | | list.add(array.getString(i));
|
| | | }
|
| | | return list;
|
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | * 获取淘宝店铺信息
|
| | | * |
| | | * @param shopTitle
|
| | | * @param sellerId
|
| | | * @return
|
| | | */
|
| | | public TaoBaoShopInfo getTBShopInfo(String shopTitle, Long sellerId, Long auctionId) {
|
| | | String key = "taobao-shop-" + sellerId;
|
| | | String value = "";
|
| | | if (Constant.IS_OUTNET)
|
| | | value = getCommonString(key);
|
| | | if (StringUtil.isNullOrEmpty(value)) {
|
| | | TaoBaoGoodsBrief goods = new TaoBaoGoodsBrief();
|
| | | goods.setShopTitle(shopTitle);
|
| | | goods.setSellerId(sellerId);
|
| | | goods.setAuctionId(auctionId);
|
| | | TaoBaoShopInfo info = taoBaoShopService.getTaoBaoShopInfo(goods);
|
| | | if (Constant.IS_OUTNET && info != null) {
|
| | | value = new Gson().toJson(info);
|
| | | cacheCommonString(key, value, 60 * 60 * 2);
|
| | | }
|
| | | return info;
|
| | | } else {
|
| | | return new Gson().fromJson(value, TaoBaoShopInfo.class);
|
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | * 是否限制发送短信
|
| | | * |
| | | * @param phone
|
| | | * @param type
|
| | | * @return
|
| | | */
|
| | | public boolean isSmsFrequencyLimit(String phone, int type) {
|
| | | if (!Constant.IS_OUTNET)
|
| | | return false;
|
| | | String key = "sms-" + phone + "-" + type;
|
| | | String value = getCommonString(key);
|
| | | if (StringUtil.isNullOrEmpty(value))
|
| | | return false;
|
| | | else
|
| | | return true;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 设置短信60s倒计时
|
| | | * |
| | | * @param phone
|
| | | * @param type
|
| | | */
|
| | | public void sendSms(String phone, int type) {
|
| | | if (!Constant.IS_OUTNET)
|
| | | return;
|
| | | String key = "sms-" + phone + "-" + type;
|
| | | setString(key, "1", 10);
|
| | | }
|
| | |
|
| | | public void clearSMSFrequencyLimit(String phone, int type) {
|
| | | if (!Constant.IS_OUTNET)
|
| | | return;
|
| | | String key = "sms-" + phone + "-" + type;
|
| | | removeKey(key);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 保存验证码
|
| | | * |
| | | * @param phone
|
| | | * @param type
|
| | | * @param code
|
| | | */
|
| | |
|
| | | public void saveSMSVCode(String phone, int type, String code) {
|
| | | if (!Constant.IS_OUTNET)
|
| | | return;
|
| | | String key = "smscode-" + phone + "-" + type;
|
| | | // 保存2分钟
|
| | | setString(key, code, 120);
|
| | | }
|
| | |
|
| | | /**
|
| | | * |
| | | * @param phone
|
| | | * @param type
|
| | | * @return
|
| | | */
|
| | | public String getSMSVCode(String phone, int type) {
|
| | | if (!Constant.IS_OUTNET)
|
| | | return "";
|
| | | String key = "smscode-" + phone + "-" + type;
|
| | | // 保存2分钟
|
| | | return getString(key);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 清除掉验证码
|
| | | * |
| | | * @param phone
|
| | | * @param type
|
| | | * @param code
|
| | | */
|
| | | public void clearSMSVCode(String phone, int type) {
|
| | | if (!Constant.IS_OUTNET)
|
| | | return;
|
| | | String key = "smscode-" + phone + "-" + type;
|
| | | removeKey(key);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 保存绑定支付宝短信验证码的正确性
|
| | | */
|
| | | public void saveBindAlipayAccountSMSState(String phone) {
|
| | | String key = "smsstate-alipay-" + phone;
|
| | |
|
| | | // 验证后十分钟有效
|
| | | setString(key, "1", 10 * 60);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 绑定支付宝发送的短信是否在有效期内
|
| | | * |
| | | * @param phone
|
| | | * @return
|
| | | */
|
| | | public boolean isBindAlipayAccountSMSStateValid(String phone) {
|
| | | String key = "smsstate-alipay-" + phone;
|
| | | return !StringUtil.isNullOrEmpty(getString(key));
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.utils.dataoke;
|
| | |
|
| | | import java.math.BigDecimal;
|
| | | import java.util.ArrayList;
|
| | | import java.util.Date;
|
| | | import java.util.HashMap;
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | |
|
| | | import org.fanli.facade.goods.dto.taobao.TaoBaoHead;
|
| | | import org.fanli.facade.goods.dto.taobao.TaoBaoProvince;
|
| | | import org.fanli.facade.goods.dto.taobao.TaoBaoSearchNav;
|
| | | import org.fanli.facade.goods.dto.taobao.TaoBaoSearchResult;
|
| | | import org.fanli.facade.goods.dto.taoke.RelateGoods;
|
| | | import org.fanli.facade.goods.dto.taoke.TaoKeAppInfo;
|
| | | import org.fanli.facade.goods.entity.taobao.TaoBaoShopInfo;
|
| | | import org.fanli.facade.goods.exception.taobao.TaobaoGoodsDownException;
|
| | | import org.fanli.facade.goods.exception.taoke.TaoKeApiException;
|
| | | import org.fanli.facade.goods.utils.taobao.TaoBaoCouponUtil;
|
| | | import org.fanli.facade.goods.utils.taobao.TaoBaoUtil;
|
| | | import org.fanli.facade.order.entity.order.TaoBaoOrder;
|
| | | import org.yeshi.utils.MoneyBigDecimalUtil;
|
| | | import org.yeshi.utils.StringUtil;
|
| | | import org.yeshi.utils.TimeUtil;
|
| | | import org.yeshi.utils.taobao.TbImgUtil;
|
| | |
|
| | | import com.taobao.api.ApiException;
|
| | | import com.yeshi.fanli.base.dto.PageEntity;
|
| | | import com.yeshi.fanli.base.dto.SearchFilter;
|
| | | import com.yeshi.fanli.base.entity.goods.TaoBaoGoodsBrief;
|
| | | import com.yeshi.fanli.base.log.TaoKeLogHelper;
|
| | |
|
| | | import net.sf.json.JSONArray;
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | | //淘宝客API接口
|
| | | public class TaoKeApiUtil {
|
| | |
|
| | | /**
|
| | | * 按关键字和分类搜索券
|
| | | * |
| | | * @param key
|
| | | * @param catList
|
| | | * @return
|
| | | */
|
| | | public static TaoBaoSearchResult searchCouple(String key, List<Long> catList, int page, int pageSize) {
|
| | | Map<String, String> map = new HashMap<>();
|
| | | map.put("method", "taobao.tbk.dg.item.coupon.get");
|
| | | map.put("page_size", pageSize + "");
|
| | | map.put("page_no", page + "");
|
| | | String cate = "";
|
| | | if (catList != null && catList.size() > 10)
|
| | | catList = catList.subList(0, 10);
|
| | | if (catList != null && catList.size() > 0) {
|
| | | for (Long c : catList)
|
| | | cate += c + ",";
|
| | | if (cate.endsWith(","))
|
| | | cate = cate.substring(0, cate.length() - 1);
|
| | | map.put("cat", cate);
|
| | | }
|
| | |
|
| | | if (!StringUtil.isNullOrEmpty(key)) {
|
| | | map.put("q", key);
|
| | | }
|
| | | String result = TaoKeBaseUtil.baseRequestForThreeTimes(map, true);
|
| | | System.out.println(result);
|
| | | TaoBaoSearchResult finalResult = parseCoupleContent(result);
|
| | | if (finalResult == null)
|
| | | return null;
|
| | | PageEntity pageEntity = finalResult.getPageEntity();
|
| | | pageEntity.setPageIndex(page);
|
| | | pageEntity.setPageSize(pageSize);
|
| | | pageEntity.setTotalPage(pageEntity.getTotalCount() % pageSize == 0
|
| | | ? ((int) (pageEntity.getTotalCount() / pageSize)) : (int) (pageEntity.getTotalCount() / pageSize + 1));
|
| | | finalResult.setPageEntity(pageEntity);
|
| | | return finalResult;
|
| | | }
|
| | |
|
| | | // 解析券的内容
|
| | | private static TaoBaoSearchResult parseCoupleContent(String content) {
|
| | | TaoBaoSearchResult result = new TaoBaoSearchResult();
|
| | | JSONObject root = JSONObject.fromObject(content);
|
| | |
|
| | | root = root.optJSONObject("tbk_dg_item_coupon_get_response");
|
| | | if (root.optJSONObject("results") == null)
|
| | | return null;
|
| | |
|
| | | JSONArray array = root.optJSONObject("results").optJSONArray("tbk_coupon");
|
| | | if (array != null) {
|
| | | List<TaoBaoGoodsBrief> goodsList = new ArrayList<>();
|
| | | for (int i = 0; i < array.size(); i++) {
|
| | | JSONObject item = array.optJSONObject(i);
|
| | | TaoBaoGoodsBrief goods = new TaoBaoGoodsBrief();
|
| | | goods.setPictUrl(item.optString("pict_url"));
|
| | | goods.setAuctionId(item.optLong("num_iid"));
|
| | | goods.setAuctionUrl(item.optString("item_url"));
|
| | | goods.setBiz30day(item.optInt("volume"));
|
| | | goods.setCouponInfo(item.optString("coupon_info"));
|
| | | List<BigDecimal> quanInfo = TaoBaoCouponUtil.getCouponInfo(goods.getCouponInfo());
|
| | | goods.setCouponAmount(quanInfo.get(1));
|
| | | goods.setCouponEffectiveEndTime(item.optString("coupon_end_time"));
|
| | | goods.setCouponEffectiveStartTime(item.optString("coupon_start_time"));
|
| | | goods.setCouponStartFee(quanInfo.get(0));
|
| | | goods.setCouponLeftCount(item.optInt("coupon_remain_count"));
|
| | | goods.setCouponLink(item.optString("coupon_click_url"));
|
| | | goods.setCouponTotalCount(item.optInt("coupon_total_count"));
|
| | | goods.setDayLeft(-1);
|
| | | if (item.optJSONObject("small_images") != null) {
|
| | | JSONArray imgArray = item.optJSONObject("small_images").optJSONArray("string");
|
| | | if (imgArray != null) {
|
| | | List<String> imgList = new ArrayList<>();
|
| | | for (int n = 0; n < imgArray.size(); n++) {
|
| | | imgList.add(imgArray.optString(n));
|
| | | }
|
| | | goods.setImgList(imgList);
|
| | | }
|
| | | }
|
| | |
|
| | | goods.setSellerId(item.optLong("seller_id"));
|
| | | goods.setShopTitle(item.optString("shop_title"));
|
| | | goods.setTitle(item.optString("title"));
|
| | |
|
| | | goods.setTkRate(new BigDecimal(item.optString("commission_rate")));
|
| | | goods.setTotalNum(1000);
|
| | | goods.setUserType(item.optInt("user_type"));
|
| | | goods.setUserTypeName("");
|
| | | goods.setZkPrice(new BigDecimal(item.optString("zk_final_price")));
|
| | |
|
| | | if (goods.getZkPrice().compareTo(goods.getCouponStartFee()) >= 0
|
| | | && goods.getZkPrice().compareTo(goods.getCouponAmount()) > 0) {
|
| | | BigDecimal finalPrice = goods.getZkPrice().subtract(goods.getCouponAmount());
|
| | | goods.setTkCommFee(finalPrice.multiply(goods.getTkRate()).divide(new BigDecimal(100)));
|
| | | } else
|
| | | goods.setTkCommFee(new BigDecimal(0));
|
| | |
|
| | | goodsList.add(goods);
|
| | | }
|
| | |
|
| | | result.setTaoBaoGoodsBriefs(goodsList);
|
| | |
|
| | | int totalCount = 1000;// root.optInt("total_results");
|
| | | PageEntity pe = new PageEntity(0, 0, totalCount);
|
| | | result.setPageEntity(pe);
|
| | | }
|
| | | result.setNavList(new ArrayList<>());
|
| | | TaoBaoHead taoBaoHead = new TaoBaoHead();
|
| | | taoBaoHead.setDocsfound((int) result.getPageEntity().getTotalCount());
|
| | | result.setTaoBaoHead(taoBaoHead);
|
| | | return result;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 获取商品详情,简版
|
| | | * |
| | | * @param id
|
| | | * -商品AuctionId
|
| | | * @return
|
| | | */
|
| | | public static TaoBaoGoodsBrief getSimpleGoodsInfo(Long id) throws TaobaoGoodsDownException {
|
| | | Map<String, String> map = new HashMap<>();
|
| | | map.put("method", "taobao.tbk.item.info.get");
|
| | | map.put("num_iids", id + "");
|
| | | String resultStr = TaoKeBaseUtil.baseRequestForThreeTimes(map, true);
|
| | | // System.out.println(resultStr);
|
| | | JSONObject data = JSONObject.fromObject(resultStr);
|
| | | // 商品下架
|
| | | if (data.optJSONObject("error_response") != null && data.optJSONObject("error_response").optInt("code") == 15
|
| | | && data.optJSONObject("error_response").optInt("sub_code") == 50001) {
|
| | | throw new TaobaoGoodsDownException(data.optJSONObject("error_response").optInt("code"), "商品下架");
|
| | | }
|
| | |
|
| | | if (data.optJSONObject("tbk_item_info_get_response") == null)
|
| | | return null;
|
| | | JSONArray array = data.optJSONObject("tbk_item_info_get_response").optJSONObject("results")
|
| | | .optJSONArray("n_tbk_item");
|
| | | if (array != null && array.size() > 0) {
|
| | | JSONObject item = array.optJSONObject(0);
|
| | | TaoBaoGoodsBrief goods = new TaoBaoGoodsBrief();
|
| | | goods.setAuctionId(item.optLong("num_iid"));
|
| | | goods.setAuctionUrl(item.optString("item_url"));
|
| | | goods.setBiz30day(item.optInt("volume"));
|
| | | if (item.optJSONObject("small_images") != null) {
|
| | | JSONArray imgArray = item.optJSONObject("small_images").optJSONArray("string");
|
| | | if (imgArray != null) {
|
| | | List<String> imgList = new ArrayList<>();
|
| | | for (int n = 0; n < imgArray.size(); n++) {
|
| | | imgList.add(imgArray.optString(n));
|
| | | }
|
| | | goods.setImgList(imgList);
|
| | | }
|
| | | }
|
| | | goods.setTitle(item.optString("title"));
|
| | | goods.setUserType(item.optInt("user_type"));
|
| | | goods.setZkPrice(new BigDecimal(item.optString("zk_final_price")));
|
| | | goods.setReservePrice(new BigDecimal(item.optString("zk_final_price")));
|
| | | goods.setAuctionUrl(item.optString("item_url"));
|
| | | goods.setProvcity(item.optString("provcity"));
|
| | | goods.setPictUrl(item.optString("pict_url"));
|
| | | goods.setShopTitle(item.optString("nick"));
|
| | | goods.setSellerId(item.optLong("seller_id"));
|
| | |
|
| | | String optString = item.optString("shop_dsr");
|
| | | if (!StringUtil.isNullOrEmpty(optString)) {
|
| | | goods.setShopDsr(new Integer(optString));
|
| | | }
|
| | |
|
| | | String ratesum = item.optString("ratesum");
|
| | | if (!StringUtil.isNullOrEmpty(ratesum)) {
|
| | | goods.setRatesum(new Integer(ratesum));
|
| | | }
|
| | |
|
| | | if (item.optBoolean("is_prepay"))
|
| | | goods.setIsPrepay(1);
|
| | |
|
| | | if (item.optBoolean("i_rfd_rate"))
|
| | | goods.setRfdRate(1);
|
| | |
|
| | | if (item.optBoolean("h_good_rate"))
|
| | | goods.setGoodRate(1);
|
| | |
|
| | | if (item.optBoolean("h_pay_rate30"))
|
| | | goods.setPayRate30(1);
|
| | |
|
| | | if (item.optBoolean("free_shipment"))
|
| | | goods.setFreeShipment(1);
|
| | |
|
| | | if (!StringUtil.isNullOrEmpty(item.optString("material_lib_type")))
|
| | | goods.setMaterialLibType(item.optInt("material_lib_type"));
|
| | |
|
| | | return goods;
|
| | | }
|
| | | return null;
|
| | | }
|
| | |
|
| | | public String convertSpecialGoodsLink(Long auctionId, TaoKeAppInfo app) {
|
| | | Map<String, String> map = new HashMap<>();
|
| | | map.put("method", "taobao.tbk.coupon.convert");
|
| | | map.put("item_id", auctionId + "");
|
| | | String resultStr = TaoKeBaseUtil.baseRequestForThreeTimes(map, app);
|
| | | return resultStr;
|
| | | }
|
| | |
|
| | | public static List<TaoBaoGoodsBrief> getBatchGoodsInfo(List<Long> listId)
|
| | | throws TaoKeApiException, TaobaoGoodsDownException {
|
| | | if (listId == null || listId.size() == 0) {
|
| | | throw new TaobaoGoodsDownException(1, "淘宝商品ID不能为空");
|
| | | }
|
| | |
|
| | | if (listId.size() > 40) {
|
| | | throw new TaobaoGoodsDownException(1, "淘宝商品ID不能超过40个");
|
| | | }
|
| | |
|
| | | StringBuffer ids = new StringBuffer();
|
| | | for (Long id : listId) {
|
| | | ids.append(id + ",");
|
| | | }
|
| | |
|
| | | return getBatchGoodsInfos(ids.substring(0, ids.length() - 1));
|
| | | }
|
| | |
|
| | | /**
|
| | | * 获取商品详情,简版
|
| | | * |
| | | * @param id
|
| | | * @return
|
| | | */
|
| | | public static List<TaoBaoGoodsBrief> getBatchGoodsInfos(String ids) throws TaobaoGoodsDownException {
|
| | | List<TaoBaoGoodsBrief> goodsList = new ArrayList<>();
|
| | |
|
| | | Map<String, String> map = new HashMap<>();
|
| | | map.put("method", "taobao.tbk.item.info.get");
|
| | | map.put("num_iids", ids + "");
|
| | | String resultStr = TaoKeBaseUtil.baseRequestForThreeTimes(map, true);
|
| | | JSONObject data = JSONObject.fromObject(resultStr);
|
| | | // 商品下架
|
| | | if (data.optJSONObject("error_response") != null && data.optJSONObject("error_response").optInt("code") == 15
|
| | | && data.optJSONObject("error_response").optInt("sub_code") == 50001) {
|
| | | throw new TaobaoGoodsDownException(data.optJSONObject("error_response").optInt("code"), "商品下架");
|
| | | }
|
| | |
|
| | | if (data.optJSONObject("tbk_item_info_get_response") == null)
|
| | | return null;
|
| | |
|
| | | JSONArray array = data.optJSONObject("tbk_item_info_get_response").optJSONObject("results")
|
| | | .optJSONArray("n_tbk_item");
|
| | | if (array != null && array.size() > 0) {
|
| | |
|
| | | for (int i = 0; i < array.size(); i++) {
|
| | |
|
| | | TaoBaoGoodsBrief goods = new TaoBaoGoodsBrief();
|
| | |
|
| | | JSONObject item = array.optJSONObject(i);
|
| | |
|
| | | goods.setAuctionId(item.optLong("num_iid"));
|
| | | goods.setAuctionUrl(item.optString("item_url"));
|
| | | goods.setBiz30day(item.optInt("volume"));
|
| | | if (item.optJSONObject("small_images") != null) {
|
| | | JSONArray imgArray = item.optJSONObject("small_images").optJSONArray("string");
|
| | | if (imgArray != null) {
|
| | | List<String> imgList = new ArrayList<>();
|
| | | for (int n = 0; n < imgArray.size(); n++) {
|
| | | imgList.add(imgArray.optString(n));
|
| | | }
|
| | | goods.setImgList(imgList);
|
| | | }
|
| | | }
|
| | | goods.setTitle(item.optString("title"));
|
| | | goods.setUserType(item.optInt("user_type"));
|
| | | goods.setZkPrice(new BigDecimal(item.optString("zk_final_price")));
|
| | | goods.setReservePrice(new BigDecimal(item.optString("zk_final_price")));
|
| | | goods.setAuctionUrl(item.optString("item_url"));
|
| | | goods.setProvcity(item.optString("provcity"));
|
| | | goods.setPictUrl(item.optString("pict_url"));
|
| | | goods.setShopTitle(item.optString("nick"));
|
| | |
|
| | | String optString = item.optString("shop_dsr");
|
| | | if (!StringUtil.isNullOrEmpty(optString)) {
|
| | | goods.setShopDsr(new Integer(optString));
|
| | | }
|
| | |
|
| | | String ratesum = item.optString("ratesum");
|
| | | if (!StringUtil.isNullOrEmpty(ratesum)) {
|
| | | goods.setRatesum(new Integer(ratesum));
|
| | | }
|
| | |
|
| | | if (item.optBoolean("is_prepay"))
|
| | | goods.setIsPrepay(1);
|
| | |
|
| | | if (item.optBoolean("i_rfd_rate"))
|
| | | goods.setRfdRate(1);
|
| | |
|
| | | if (item.optBoolean("h_good_rate"))
|
| | | goods.setGoodRate(1);
|
| | |
|
| | | if (item.optBoolean("h_pay_rate30"))
|
| | | goods.setPayRate30(1);
|
| | |
|
| | | if (item.optBoolean("free_shipment"))
|
| | | goods.setFreeShipment(1);
|
| | |
|
| | | if ("1".equalsIgnoreCase(item.optString("material_lib_type")))
|
| | | ;
|
| | |
|
| | | goodsList.add(goods);
|
| | | }
|
| | | }
|
| | |
|
| | | return goodsList;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 搜索商品详情-详细
|
| | | * |
| | | * @param id
|
| | | * @return
|
| | | * @throws TaobaoGoodsDownException
|
| | | */
|
| | | public static TaoBaoGoodsBrief searchGoodsDetail(Long id) throws TaobaoGoodsDownException {
|
| | | TaoBaoGoodsBrief goods = getSimpleGoodsInfo(id);
|
| | | if (goods == null)
|
| | | return null;
|
| | | SearchFilter filter = new SearchFilter();
|
| | | filter.setKey(goods.getTitle());
|
| | | filter.setPage(1);
|
| | | filter.setPageSize(50);
|
| | | TaoBaoSearchResult result = searchWuLiaoForDetail(goods.getTitle(), goods.getZkPrice(), goods.getProvcity(),
|
| | | goods.getUserType());
|
| | | if (result != null && result.getTaoBaoGoodsBriefs() != null)
|
| | | for (TaoBaoGoodsBrief g : result.getTaoBaoGoodsBriefs()) {
|
| | | if (goods.getAuctionId().longValue() == g.getAuctionId()) {
|
| | | g.setId(goods.getAuctionId());
|
| | | // 判断是否有优惠券
|
| | | if (!StringUtil.isNullOrEmpty(g.getCouponActivityId())) {
|
| | | // 获取优惠券详情
|
| | | QuanInfo quanInfo = getQuanInfo(g.getAuctionId(), g.getCouponActivityId());
|
| | | if (quanInfo != null) {
|
| | | g.setCouponAmount(quanInfo.coupon_amount);
|
| | | g.setCouponEffectiveEndTime(quanInfo.coupon_end_time);
|
| | | g.setCouponEffectiveStartTime(quanInfo.coupon_start_time);
|
| | | g.setCouponLeftCount(quanInfo.coupon_remain_count);
|
| | | g.setCouponStartFee(quanInfo.coupon_start_fee);
|
| | | g.setCouponTotalCount(quanInfo.coupon_total_count);
|
| | | }
|
| | | } else {
|
| | | g.setCouponAmount(new BigDecimal(0));
|
| | | g.setCouponStartFee(new BigDecimal(0));
|
| | | }
|
| | | g.setCreatetime(new Date());
|
| | | return g;
|
| | | }
|
| | | }
|
| | |
|
| | | // 再从淘宝联盟网页搜索
|
| | | filter.setKey(goods.getAuctionUrl());
|
| | | TaoBaoSearchResult searchResult = TaoBaoUtil.searchFromAlimamaWeb(filter, null);
|
| | | if (searchResult != null && searchResult.getTaoBaoGoodsBriefs() != null
|
| | | && searchResult.getTaoBaoGoodsBriefs().size() > 0) {
|
| | | for (TaoBaoGoodsBrief g : searchResult.getTaoBaoGoodsBriefs()) {
|
| | | if (g.getAuctionId().longValue() == goods.getAuctionId()) {
|
| | | g.setImgList(goods.getImgList());
|
| | | goods = g;
|
| | | if ("无".equalsIgnoreCase(goods.getCouponInfo()))
|
| | | goods.setCouponInfo(null);
|
| | | return goods;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | TaoKeLogHelper.error(null, "没有搜索到详情:" + id);
|
| | | goods.setCouponAmount(new BigDecimal("0"));
|
| | | goods.setTkMktStatus("1");
|
| | | goods.setTkRate(new BigDecimal("0"));
|
| | | goods.setReservePrice(new BigDecimal(0));
|
| | | goods.setTkCommFee(new BigDecimal(0));
|
| | | return goods;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 搜索商品详情-详细
|
| | | * |
| | | * @param id
|
| | | * @return
|
| | | * @throws TaobaoGoodsDownException
|
| | | */
|
| | | public static TaoBaoGoodsBrief searchGoodsDetail(Long id, TaoKeAppInfo app) throws TaobaoGoodsDownException {
|
| | | TaoBaoGoodsBrief goods = getSimpleGoodsInfo(id);
|
| | | if (goods == null)
|
| | | return null;
|
| | | SearchFilter filter = new SearchFilter();
|
| | | filter.setKey(goods.getTitle());
|
| | | filter.setPage(1);
|
| | | filter.setPageSize(50);
|
| | | TaoBaoSearchResult result = searchWuLiaoForDetail(goods.getTitle(), goods.getZkPrice(), goods.getProvcity(),
|
| | | goods.getUserType(), app);
|
| | | if (result != null && result.getTaoBaoGoodsBriefs() != null)
|
| | | for (TaoBaoGoodsBrief g : result.getTaoBaoGoodsBriefs()) {
|
| | | if (goods.getAuctionId().longValue() == g.getAuctionId()) {
|
| | | g.setId(goods.getAuctionId());
|
| | | // 判断是否有优惠券
|
| | | if (!StringUtil.isNullOrEmpty(g.getCouponActivityId())) {
|
| | | // 获取优惠券详情
|
| | | QuanInfo quanInfo = getQuanInfo(g.getAuctionId(), g.getCouponActivityId());
|
| | | if (quanInfo != null) {
|
| | | g.setCouponAmount(quanInfo.coupon_amount);
|
| | | g.setCouponEffectiveEndTime(quanInfo.coupon_end_time);
|
| | | g.setCouponEffectiveStartTime(quanInfo.coupon_start_time);
|
| | | g.setCouponLeftCount(quanInfo.coupon_remain_count);
|
| | | g.setCouponStartFee(quanInfo.coupon_start_fee);
|
| | | g.setCouponTotalCount(quanInfo.coupon_total_count);
|
| | | }
|
| | | } else {
|
| | | g.setCouponAmount(new BigDecimal(0));
|
| | | g.setCouponStartFee(new BigDecimal(0));
|
| | | }
|
| | | g.setCreatetime(new Date());
|
| | | return g;
|
| | | }
|
| | | }
|
| | |
|
| | | // 再从淘宝联盟网页搜索
|
| | | filter.setKey(goods.getAuctionUrl());
|
| | | TaoBaoSearchResult searchResult = TaoBaoUtil.searchFromAlimamaWeb(filter, null);
|
| | | if (searchResult != null && searchResult.getTaoBaoGoodsBriefs() != null
|
| | | && searchResult.getTaoBaoGoodsBriefs().size() > 0) {
|
| | | for (TaoBaoGoodsBrief g : searchResult.getTaoBaoGoodsBriefs()) {
|
| | | if (g.getAuctionId().longValue() == goods.getAuctionId()) {
|
| | | g.setImgList(goods.getImgList());
|
| | | goods = g;
|
| | | if ("无".equalsIgnoreCase(goods.getCouponInfo()))
|
| | | goods.setCouponInfo(null);
|
| | | return goods;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | TaoKeLogHelper.error(null, "没有搜索到详情:" + id);
|
| | | goods.setCouponAmount(new BigDecimal("0"));
|
| | | goods.setTkMktStatus("1");
|
| | | goods.setTkRate(new BigDecimal("0"));
|
| | | goods.setReservePrice(new BigDecimal(0));
|
| | | goods.setTkCommFee(new BigDecimal(0));
|
| | | return goods;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 物料转链
|
| | | * |
| | | * @param id
|
| | | * @param app
|
| | | * @return
|
| | | * @throws TaobaoGoodsDownException
|
| | | */
|
| | | public static TaoBaoGoodsBrief searchGoodsDetailForConvert(Long id, TaoKeAppInfo app)
|
| | | throws TaobaoGoodsDownException {
|
| | | TaoBaoGoodsBrief goods = getSimpleGoodsInfo(id);
|
| | | if (goods == null)
|
| | | return null;
|
| | | SearchFilter filter = new SearchFilter();
|
| | | filter.setKey(goods.getTitle());
|
| | | filter.setPage(1);
|
| | | filter.setPageSize(50);
|
| | | TaoBaoSearchResult result = searchWuLiaoForDetail(goods.getTitle(), goods.getZkPrice(), goods.getProvcity(),
|
| | | goods.getUserType(), app);
|
| | | if (result != null && result.getTaoBaoGoodsBriefs() != null)
|
| | | for (TaoBaoGoodsBrief g : result.getTaoBaoGoodsBriefs()) {
|
| | | if (goods.getAuctionId().longValue() == g.getAuctionId()) {
|
| | | g.setId(goods.getAuctionId());
|
| | | g.setCreatetime(new Date());
|
| | | return g;
|
| | | }
|
| | | }
|
| | |
|
| | | TaoKeLogHelper.error(null, "没有搜索到详情:" + id);
|
| | | goods.setCouponAmount(new BigDecimal("0"));
|
| | | goods.setTkMktStatus("1");
|
| | | goods.setTkRate(new BigDecimal("0"));
|
| | | goods.setReservePrice(new BigDecimal(0));
|
| | | goods.setTkCommFee(new BigDecimal(0));
|
| | | return goods;
|
| | | }
|
| | |
|
| | | public static List<TaoBaoGoodsBrief> searchBatchGoodsDetail(String ids) throws TaobaoGoodsDownException {
|
| | |
|
| | | List<TaoBaoGoodsBrief> goodsBriefList = getBatchGoodsInfos(ids);
|
| | |
|
| | | if (goodsBriefList == null || goodsBriefList.size() == 0) {
|
| | | return null;
|
| | | }
|
| | |
|
| | | // System.out.println("---------goodsBriefList--------------:"+
|
| | | // goodsBriefList.size());
|
| | |
|
| | | List<TaoBaoGoodsBrief> goodsList = new ArrayList<>();
|
| | |
|
| | | for (TaoBaoGoodsBrief goods : goodsBriefList) {
|
| | |
|
| | | boolean pross = false;
|
| | |
|
| | | SearchFilter filter = new SearchFilter();
|
| | | filter.setKey(goods.getTitle());
|
| | | filter.setPage(1);
|
| | | filter.setPageSize(50);
|
| | | TaoBaoSearchResult result = searchWuLiaoForDetail(goods.getTitle(), goods.getZkPrice(), goods.getProvcity(),
|
| | | goods.getUserType());
|
| | | if (result != null && result.getTaoBaoGoodsBriefs() != null)
|
| | | for (TaoBaoGoodsBrief g : result.getTaoBaoGoodsBriefs()) {
|
| | | if (goods.getAuctionId().longValue() == g.getAuctionId()) {
|
| | | g.setId(goods.getAuctionId());
|
| | | g.setAuctionUrl(goods.getAuctionUrl());
|
| | | g.setShopTitle(goods.getShopTitle());
|
| | |
|
| | | // 判断是否有优惠券
|
| | | if (!StringUtil.isNullOrEmpty(g.getCouponActivityId())) {
|
| | | // 获取优惠券详情
|
| | | QuanInfo quanInfo = getQuanInfo(g.getAuctionId(), g.getCouponActivityId());
|
| | | if (quanInfo != null) {
|
| | | g.setCouponAmount(quanInfo.coupon_amount);
|
| | | g.setCouponEffectiveEndTime(quanInfo.coupon_end_time);
|
| | | g.setCouponEffectiveStartTime(quanInfo.coupon_start_time);
|
| | | g.setCouponLeftCount(quanInfo.coupon_remain_count);
|
| | | g.setCouponStartFee(quanInfo.coupon_start_fee);
|
| | | g.setCouponTotalCount(quanInfo.coupon_total_count);
|
| | | }
|
| | | } else {
|
| | | g.setCouponAmount(new BigDecimal(0));
|
| | | g.setCouponStartFee(new BigDecimal(0));
|
| | | }
|
| | | g.setCreatetime(new Date());
|
| | | goodsList.add(g);
|
| | | pross = true;
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | | if (pross)
|
| | | continue;
|
| | |
|
| | | // 再从淘宝联盟网页搜索
|
| | | filter.setKey(goods.getAuctionUrl());
|
| | | TaoBaoSearchResult searchResult = TaoBaoUtil.searchFromAlimamaWeb(filter, null);
|
| | | if (searchResult != null && searchResult.getTaoBaoGoodsBriefs() != null
|
| | | && searchResult.getTaoBaoGoodsBriefs().size() > 0) {
|
| | | for (TaoBaoGoodsBrief g : searchResult.getTaoBaoGoodsBriefs()) {
|
| | | if (g.getAuctionId().longValue() == goods.getAuctionId()) {
|
| | | g.setImgList(goods.getImgList());
|
| | | g.setId(goods.getAuctionId());
|
| | | g.setAuctionUrl(goods.getAuctionUrl());
|
| | | g.setShopTitle(goods.getShopTitle());
|
| | |
|
| | | goods = g;
|
| | | if ("无".equalsIgnoreCase(goods.getCouponInfo()))
|
| | | goods.setCouponInfo(null);
|
| | |
|
| | | goodsList.add(goods);
|
| | | pross = true;
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | if (pross)
|
| | | continue;
|
| | |
|
| | | goods.setCouponAmount(new BigDecimal("0"));
|
| | | goods.setTkMktStatus("1");
|
| | | goods.setTkRate(new BigDecimal("0"));
|
| | | goods.setReservePrice(new BigDecimal(0));
|
| | | goods.setTkCommFee(new BigDecimal(0));
|
| | |
|
| | | goodsList.add(goods);
|
| | | }
|
| | |
|
| | | return goodsList;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 商品物料搜索
|
| | | * |
| | | * @param filter
|
| | | * @return
|
| | | */
|
| | | public static TaoBaoSearchResult searchWuLiao(SearchFilter filter) {
|
| | |
|
| | | if (filter.getKey() != null && filter.getKey().trim().equalsIgnoreCase(""))
|
| | | return null;
|
| | |
|
| | | if (filter.getKey() != null && filter.getKey().length() > 100)
|
| | | return null;
|
| | |
|
| | | PageEntity pageEntity = new PageEntity();
|
| | | TaoBaoSearchResult taoBaoSearchResult = new TaoBaoSearchResult();
|
| | | Map<String, String> map = new HashMap<>();
|
| | | map.put("method", "taobao.tbk.dg.material.optional");
|
| | | map.put("page_size", filter.getPageSize() == 0 ? "20" : filter.getPageSize() + "");
|
| | | map.put("page_no", (filter.getPage() <= 0 ? 1 : filter.getPage()) + "");
|
| | | // map.put("material_id", "3756");
|
| | |
|
| | | pageEntity.setPageIndex(filter.getPage());
|
| | | pageEntity.setPageSize(filter.getPageSize() == 0 ? 20 : filter.getPageSize());
|
| | |
|
| | | // 包含了地区筛选
|
| | | if (filter.getProvinceId() > 0) {
|
| | | List<TaoBaoProvince> provinceList = TaoBaoUtil.getTaoBaoProvinceList();
|
| | |
|
| | | for (TaoBaoProvince province : provinceList) {
|
| | | if (Integer.parseInt(province.getId()) == filter.getProvinceId()) {
|
| | | map.put("itemloc", province.getName());
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | if (filter.getMaterialId() != null)
|
| | | map.put("material_id", filter.getMaterialId());
|
| | |
|
| | | if (filter.getStartPrice() != null)
|
| | | map.put("start_price", filter.getStartPrice() + "");
|
| | |
|
| | | if (filter.getEndPrice() != null)
|
| | | map.put("end_price", filter.getEndPrice() + "");
|
| | |
|
| | | if (filter.getStartTkRate() > 0)
|
| | | map.put("start_tk_rate", filter.getStartTkRate() + "");
|
| | |
|
| | | if (filter.getEndTkRate() > 0)
|
| | | map.put("end_tk_rate", filter.getEndTkRate() + "");
|
| | |
|
| | | if (filter.getStartKaTkRate() > 0)
|
| | | map.put("start_ka_tk_rate", filter.getStartKaTkRate() + "");
|
| | |
|
| | | if (filter.getEndKaTkRate() > 0)
|
| | | map.put("end_ka_tk_rate", filter.getEndKaTkRate() + "");
|
| | |
|
| | | if (filter.isTmall())
|
| | | map.put("is_tmall", filter.isTmall() + "");
|
| | |
|
| | | if (filter.isOverseas())
|
| | | map.put("is_overseas", filter.isOverseas() + "");
|
| | |
|
| | | if (filter.isBaoYou())
|
| | | map.put("need_free_shipment", filter.isBaoYou() + "");
|
| | |
|
| | | if (filter.isNeedPrepay())
|
| | | map.put("need_prepay", filter.isNeedPrepay() + "");
|
| | |
|
| | | if (filter.isIncludePayRate30())
|
| | | map.put("include_pay_rate_30", filter.isIncludePayRate30() + "");
|
| | |
|
| | | if (filter.isIncludeGoodRate())
|
| | | map.put("include_good_rate", filter.isIncludeGoodRate() + "");
|
| | |
|
| | | if (filter.isIncludeRfdRate())
|
| | | map.put("include_rfd_rate", filter.isIncludeRfdRate() + "");
|
| | |
|
| | | if (filter.getStartDsr() > 0)
|
| | | map.put("start_dsr", filter.getStartDsr() + "");
|
| | |
|
| | | if (filter.getNpxLevel() > 0)
|
| | | map.put("npx_level", filter.getNpxLevel() + "");
|
| | |
|
| | | if (!StringUtil.isNullOrEmpty(filter.getCateIds()))
|
| | | map.put("cat", filter.getCateIds());
|
| | |
|
| | | if (!StringUtil.isNullOrEmpty(filter.getKey()))
|
| | | map.put("q", filter.getKey());
|
| | |
|
| | | if (filter.getQuan() > 0)
|
| | | map.put("has_coupon", true + "");
|
| | |
|
| | | if (!StringUtil.isNullOrEmpty(filter.getIp()))
|
| | | map.put("ip", filter.getIp());
|
| | |
|
| | | if (filter.getSort() > 0) {
|
| | | if (filter.getSort() == TaoBaoUtil.SORT_SALE_HIGH_TO_LOW) {
|
| | | map.put("sort", "total_sales_des"); // 销量从高到低
|
| | | } else if (filter.getSort() == TaoBaoUtil.SORT_SALE_LOW_TO_HIGH) {
|
| | | map.put("sort", "total_sales_asc"); // 销量从低到高
|
| | | } else if (filter.getSort() == TaoBaoUtil.SORT_PRICE_HIGH_TO_LOW) {
|
| | | map.put("sort", "price_des"); // 价格从高到低
|
| | | } else if (filter.getSort() == TaoBaoUtil.SORT_PRICE_LOW_TO_HIGH) {
|
| | | map.put("sort", "price_asc"); // 价格从低到高
|
| | | } else if (filter.getSort() == TaoBaoUtil.SORT_TKRATE_HIGH_TO_LOW) {
|
| | | map.put("sort", "tk_rate_des"); // 淘客佣金比率高到低
|
| | | } else if (filter.getSort() == TaoBaoUtil.SORT_TKRATE_LOW_TO_HIGH) {
|
| | | map.put("sort", "tk_rate_asc"); // 淘客佣金比率低到高
|
| | | } else if (filter.getSort() == TaoBaoUtil.SORT_TOTAL_COMMI_HIGH_TO_LOW) {
|
| | | map.put("sort", "tk_total_commi_des"); // 总支出佣金高到低
|
| | | } else if (filter.getSort() == TaoBaoUtil.SORT_TOTAL_COMMI_LOW_TO_HIGH) {
|
| | | map.put("sort", "tk_total_commi_asc"); // 总支出佣金低到高
|
| | | } else if (filter.getSort() == TaoBaoUtil.SORT_TOTAL_SALES_HIGH_TO_LOW) {
|
| | | map.put("sort", "tk_total_sales_des"); // 累计推广量高到低
|
| | | } else if (filter.getSort() == TaoBaoUtil.SORT_TOTAL_SALES_LOW_TO_HIGH) {
|
| | | map.put("sort", "tk_total_sales_asc"); // 累计推广量低到高
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | String resultStr = TaoKeBaseUtil.baseRequestForThreeTimes(map, true);
|
| | | // System.out.println("resultStr"+ resultStr);
|
| | | JSONObject data = JSONObject.fromObject(resultStr);
|
| | | if (data.optJSONObject("tbk_dg_material_optional_response") != null
|
| | | && data.optJSONObject("tbk_dg_material_optional_response").optJSONObject("result_list") != null) {
|
| | | JSONArray array = data.optJSONObject("tbk_dg_material_optional_response").optJSONObject("result_list")
|
| | | .optJSONArray("map_data");
|
| | | List<TaoBaoGoodsBrief> goodsList = new ArrayList<>();
|
| | | if (array != null) {
|
| | | for (int i = 0; i < array.size(); i++) {
|
| | | TaoBaoGoodsBrief goods = parseWuLiaoItem(array.optJSONObject(i));
|
| | | if (goods != null)
|
| | | goodsList.add(goods);
|
| | | }
|
| | | }
|
| | | taoBaoSearchResult.setTaoBaoGoodsBriefs(goodsList);
|
| | |
|
| | | JSONObject optJSONObject = data.optJSONObject("tbk_dg_material_optional_response");
|
| | | int totalResults = optJSONObject.getInt("total_results");
|
| | | int totalPage = totalResults % pageEntity.getPageSize() == 0 ? totalResults / pageEntity.getPageSize()
|
| | | : totalResults / pageEntity.getPageSize() + 1;
|
| | | pageEntity.setTotalCount(totalResults);
|
| | | pageEntity.setTotalPage(totalPage);
|
| | |
|
| | | }
|
| | |
|
| | | List<TaoBaoSearchNav> navList = new ArrayList<>();
|
| | |
|
| | | TaoBaoHead taoBaoHead = new TaoBaoHead();
|
| | | taoBaoHead.setDocsfound((int) pageEntity.getTotalCount());
|
| | | taoBaoSearchResult.setTaoBaoHead(taoBaoHead);
|
| | |
|
| | | taoBaoSearchResult.setPageEntity(pageEntity);
|
| | |
|
| | | // filter.get
|
| | |
|
| | | // 设置发货地址
|
| | | TaoBaoSearchNav nav = new TaoBaoSearchNav();
|
| | | nav.setName("发货地选择");
|
| | | nav.setFlag("address");
|
| | | nav.setId(11110);
|
| | | nav.setType("fahuodi");
|
| | |
|
| | | List<TaoBaoSearchNav> childNavList = new ArrayList<>();
|
| | | List<TaoBaoProvince> provinceList = TaoBaoUtil.getTaoBaoProvinceList();
|
| | | for (TaoBaoProvince province : provinceList) {
|
| | | TaoBaoSearchNav childNav = new TaoBaoSearchNav();
|
| | | childNav.setName(province.getName());
|
| | | childNav.setId(Integer.parseInt(province.getId()));
|
| | | childNav.setType("fahuodi-child");
|
| | | if (Integer.parseInt(province.getId()) == filter.getProvinceId())
|
| | | childNav.setSelector(1);
|
| | | childNavList.add(childNav);
|
| | | }
|
| | |
|
| | | nav.setSubIds(childNavList);
|
| | | navList.add(nav);
|
| | |
|
| | | // 测试
|
| | | taoBaoSearchResult.setNavList(navList);
|
| | |
|
| | | return taoBaoSearchResult;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 商品物料搜索
|
| | | * |
| | | * @param filter
|
| | | * @return
|
| | | */
|
| | | public static TaoBaoSearchResult searchWuLiaoForDetail(String title, BigDecimal zkPrice, String provcity,
|
| | | int userType) {
|
| | | if (provcity.trim().contains(" "))
|
| | | provcity = provcity.split(" ")[provcity.split(" ").length - 1];
|
| | | TaoBaoSearchResult taoBaoSearchResult = new TaoBaoSearchResult();
|
| | | Map<String, String> map = new HashMap<>();
|
| | | map.put("method", "taobao.tbk.dg.material.optional");
|
| | | map.put("page_size", 50 + "");
|
| | | map.put("page_no", 1 + "");
|
| | | map.put("start_price", (int) zkPrice.subtract(new BigDecimal(1)).doubleValue() + "");
|
| | | map.put("end_price", (int) zkPrice.add(new BigDecimal(1)).doubleValue() + "");
|
| | | map.put("is_tmall", (userType == 1) + "");
|
| | | map.put("q", title);
|
| | | map.put("itemloc", provcity);
|
| | |
|
| | | String resultStr = TaoKeBaseUtil.baseRequestForThreeTimes(map, true);
|
| | | System.out.println(resultStr);
|
| | | JSONObject data = JSONObject.fromObject(resultStr);
|
| | | if (data.optJSONObject("tbk_dg_material_optional_response") != null
|
| | | && data.optJSONObject("tbk_dg_material_optional_response").optJSONObject("result_list") != null) {
|
| | | JSONArray array = data.optJSONObject("tbk_dg_material_optional_response").optJSONObject("result_list")
|
| | | .optJSONArray("map_data");
|
| | | List<TaoBaoGoodsBrief> goodsList = new ArrayList<>();
|
| | | if (array != null) {
|
| | | for (int i = 0; i < array.size(); i++) {
|
| | | TaoBaoGoodsBrief goods = parseWuLiaoItem(array.optJSONObject(i));
|
| | | if (goods != null)
|
| | | goodsList.add(goods);
|
| | | }
|
| | | }
|
| | | taoBaoSearchResult.setTaoBaoGoodsBriefs(goodsList);
|
| | | }
|
| | |
|
| | | List<TaoBaoSearchNav> navList = new ArrayList<>();
|
| | |
|
| | | TaoBaoHead taoBaoHead = new TaoBaoHead();
|
| | | taoBaoHead.setDocsfound(1000);
|
| | | taoBaoSearchResult.setTaoBaoHead(taoBaoHead);
|
| | | taoBaoSearchResult.setPageEntity(new PageEntity());
|
| | |
|
| | | taoBaoSearchResult.setNavList(navList);
|
| | |
|
| | | return taoBaoSearchResult;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 商品物料搜索
|
| | | * |
| | | * @param filter
|
| | | * @return
|
| | | */
|
| | | public static TaoBaoSearchResult searchWuLiaoForDetail(String title, BigDecimal zkPrice, String provcity,
|
| | | int userType, TaoKeAppInfo app) {
|
| | | if (provcity.trim().contains(" "))
|
| | | provcity = provcity.split(" ")[provcity.split(" ").length - 1];
|
| | | TaoBaoSearchResult taoBaoSearchResult = new TaoBaoSearchResult();
|
| | | Map<String, String> map = new HashMap<>();
|
| | | map.put("method", "taobao.tbk.dg.material.optional");
|
| | | map.put("page_size", 50 + "");
|
| | | map.put("page_no", 1 + "");
|
| | | map.put("start_price", (int) zkPrice.subtract(new BigDecimal(1)).doubleValue() + "");
|
| | | map.put("end_price", (int) zkPrice.add(new BigDecimal(1)).doubleValue() + "");
|
| | | map.put("is_tmall", (userType == 1) + "");
|
| | | map.put("q", title);
|
| | | map.put("itemloc", provcity);
|
| | |
|
| | | String resultStr = TaoKeBaseUtil.baseRequestForThreeTimes(map, app);
|
| | | JSONObject data = JSONObject.fromObject(resultStr);
|
| | | if (data.optJSONObject("tbk_dg_material_optional_response") != null
|
| | | && data.optJSONObject("tbk_dg_material_optional_response").optJSONObject("result_list") != null) {
|
| | | JSONArray array = data.optJSONObject("tbk_dg_material_optional_response").optJSONObject("result_list")
|
| | | .optJSONArray("map_data");
|
| | | List<TaoBaoGoodsBrief> goodsList = new ArrayList<>();
|
| | | if (array != null) {
|
| | | for (int i = 0; i < array.size(); i++) {
|
| | | TaoBaoGoodsBrief goods = parseWuLiaoItem(array.optJSONObject(i));
|
| | | if (goods != null)
|
| | | goodsList.add(goods);
|
| | | }
|
| | | }
|
| | | taoBaoSearchResult.setTaoBaoGoodsBriefs(goodsList);
|
| | | }
|
| | |
|
| | | List<TaoBaoSearchNav> navList = new ArrayList<>();
|
| | |
|
| | | TaoBaoHead taoBaoHead = new TaoBaoHead();
|
| | | taoBaoHead.setDocsfound(1000);
|
| | | taoBaoSearchResult.setTaoBaoHead(taoBaoHead);
|
| | | taoBaoSearchResult.setPageEntity(new PageEntity());
|
| | |
|
| | | taoBaoSearchResult.setNavList(navList);
|
| | |
|
| | | return taoBaoSearchResult;
|
| | | }
|
| | |
|
| | | // 解析物料
|
| | | private static TaoBaoGoodsBrief parseWuLiaoItem(JSONObject item) {
|
| | | TaoBaoGoodsBrief goods = new TaoBaoGoodsBrief();
|
| | | goods.setPictUrl(item.optString("pict_url"));
|
| | |
|
| | | if (!StringUtil.isNullOrEmpty(item.optString("white_image"))) {
|
| | | goods.setPictUrlWhite(item.optString("white_image"));
|
| | | }
|
| | |
|
| | | goods.setAuctionId(item.optLong("num_iid"));
|
| | | goods.setAuctionUrl("https:" + item.optString("url"));
|
| | | goods.setBiz30day(item.optInt("volume"));
|
| | | goods.setCouponInfo(item.optString("coupon_info"));
|
| | |
|
| | | if (goods.getCouponInfo() != null)
|
| | | goods.setCouponInfo(goods.getCouponInfo().replace(".00", ""));
|
| | |
|
| | | if (!StringUtil.isNullOrEmpty(goods.getCouponInfo())) {
|
| | | List<BigDecimal> quanInfo = TaoBaoCouponUtil.getCouponInfo(goods.getCouponInfo());
|
| | | goods.setCouponAmount(quanInfo.get(1));
|
| | | goods.setCouponEffectiveEndTime(
|
| | | TimeUtil.getGernalTime(System.currentTimeMillis() + 1000 * 60 * 60 * 24, "yyyy-MM-dd"));
|
| | | goods.setCouponEffectiveStartTime(TimeUtil.getGernalTime(System.currentTimeMillis(), "yyyy-MM-dd"));
|
| | | goods.setCouponStartFee(quanInfo.get(0));
|
| | | goods.setCouponLeftCount(item.optInt("coupon_remain_count"));
|
| | | goods.setCouponLink("https:" + item.optString("coupon_share_url"));
|
| | | goods.setCouponTotalCount(item.optInt("coupon_total_count"));
|
| | | goods.setCouponActivityId(item.optString("coupon_id"));
|
| | | } else {
|
| | | goods.setCouponAmount(new BigDecimal(0));
|
| | | }
|
| | |
|
| | | goods.setDayLeft(-1);
|
| | | if (item.optJSONObject("small_images") != null) {
|
| | | JSONArray imgArray = item.optJSONObject("small_images").optJSONArray("string");
|
| | | if (imgArray != null) {
|
| | | List<String> imgList = new ArrayList<>();
|
| | | for (int n = 0; n < imgArray.size(); n++) {
|
| | | imgList.add(imgArray.optString(n));
|
| | | }
|
| | | goods.setImgList(imgList);
|
| | | }
|
| | | }
|
| | |
|
| | | if (item.optBoolean("include_mkt"))
|
| | | goods.setTkMktStatus("1");
|
| | | else
|
| | | goods.setTkMktStatus("0");
|
| | |
|
| | | if (item.optBoolean("include_dxjh"))
|
| | | goods.setIncludeDxjh(1);
|
| | |
|
| | | goods.setSellerId(item.optLong("seller_id"));
|
| | | goods.setShopTitle(item.optString("shop_title"));
|
| | | goods.setTitle(item.optString("title"));
|
| | |
|
| | | if (!StringUtil.isNullOrEmpty(item.optString("level_one_category_id"))) {
|
| | | goods.setRootCatId(item.optInt("level_one_category_id"));
|
| | | }
|
| | | goods.setRootCategoryName(item.optString("level_one_category_name"));
|
| | |
|
| | | if (!StringUtil.isNullOrEmpty(item.optString("category_id"))) {
|
| | | goods.setLeafCatId(item.optInt("category_id"));
|
| | | }
|
| | | goods.setLeafName(item.optString("category_name"));
|
| | |
|
| | | goods.setTkRate(new BigDecimal(item.optString("commission_rate")).divide(new BigDecimal(100)));
|
| | | goods.setTotalNum(1000);
|
| | | goods.setUserType(item.optInt("user_type"));
|
| | | goods.setUserTypeName("");
|
| | | goods.setZkPrice(new BigDecimal(item.optString("zk_final_price")));
|
| | |
|
| | | if (item.optBoolean("include_dxjh")) {
|
| | | goods.setDxjhInfo(item.optString("info_dxjh"));
|
| | | }
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(goods.getCouponInfo())) {// 无券
|
| | | goods.setTkCommFee(goods.getZkPrice().multiply(goods.getTkRate()).divide(new BigDecimal(100)));
|
| | | } else if (goods.getZkPrice().compareTo(goods.getCouponStartFee()) >= 0// 有券
|
| | | && goods.getZkPrice().compareTo(goods.getCouponAmount()) >= 0) {
|
| | | BigDecimal finalPrice = goods.getZkPrice().subtract(goods.getCouponAmount());
|
| | | goods.setTkCommFee(finalPrice.multiply(goods.getTkRate()).divide(new BigDecimal(100)));
|
| | | } else {
|
| | | goods.setTkCommFee(new BigDecimal(0));
|
| | | }
|
| | | if (!StringUtil.isNullOrEmpty(item.optString("reserve_price")))
|
| | | goods.setReservePrice(new BigDecimal(item.optString("reserve_price")));
|
| | | goods.setTotalFee(new BigDecimal("0"));
|
| | | return goods;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 获取淘口令
|
| | | * |
| | | * @param logo
|
| | | * -图标
|
| | | * @param text
|
| | | * -文字
|
| | | * @param url
|
| | | * -简介
|
| | | * @return
|
| | | */
|
| | | public static String getTKToken(String logo, String text, String url) {
|
| | | if (text == null)
|
| | | return null;
|
| | | if (text.length() < 5)
|
| | | text = "好货:" + text;
|
| | |
|
| | | Map<String, String> map = new HashMap<>();
|
| | | map.put("method", "taobao.tbk.tpwd.create");
|
| | | map.put("url", url);
|
| | | map.put("text", text);
|
| | | map.put("logo", logo);
|
| | | String resultStr = TaoKeBaseUtil.baseRequestForThreeTimes(map, true);
|
| | |
|
| | | JSONObject data = JSONObject.fromObject(resultStr);
|
| | | if (data.optJSONObject("tbk_tpwd_create_response").optJSONObject("data") != null)
|
| | | return data.optJSONObject("tbk_tpwd_create_response").optJSONObject("data").optString("model");
|
| | | return null;
|
| | | }
|
| | |
|
| | | public static List<RelateGoods> getRelateGoodsList(long auctionId) throws ApiException {
|
| | | List<RelateGoods> resultList = new ArrayList<>();
|
| | | List<TaoBaoGoodsBrief> list = getRelationGoodsRecommend(auctionId, 9);
|
| | | for (TaoBaoGoodsBrief goods : list) {
|
| | | if (goods != null) {
|
| | | RelateGoods rg = new RelateGoods();
|
| | | rg.setId(goods.getAuctionId() + "");
|
| | | rg.setPicUrl(goods.getPictUrl());
|
| | | rg.setTitle(goods.getTitle());
|
| | | rg.setZkPrice(goods.getZkPrice().toString());
|
| | | rg.setUrl(goods.getAuctionUrl());
|
| | | resultList.add(rg);
|
| | | }
|
| | | }
|
| | | return resultList;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 获取券详细信息
|
| | | * |
| | | * @param auctionId
|
| | | * @param activityId
|
| | | * @return
|
| | | */
|
| | | public static QuanInfo getQuanInfo(Long auctionId, String activityId) {
|
| | | QuanInfo info = new QuanInfo();
|
| | | Map<String, String> map = new HashMap<>();
|
| | | map.put("method", "taobao.tbk.coupon.get");
|
| | | map.put("item_id", auctionId + "");
|
| | | map.put("activity_id", activityId);
|
| | | String resultStr = TaoKeBaseUtil.baseRequestForThreeTimes(map, true);
|
| | | JSONObject data = JSONObject.fromObject(resultStr);
|
| | | if (data.optJSONObject("tbk_coupon_get_response") != null) {
|
| | | data = data.optJSONObject("tbk_coupon_get_response").optJSONObject("data");
|
| | | info.coupon_start_time = data.optString("coupon_start_time");
|
| | | info.coupon_end_time = data.optString("coupon_end_time");
|
| | | info.coupon_amount = new BigDecimal(data.optString("coupon_amount"));
|
| | | info.coupon_total_count = data.optInt("coupon_total_count");
|
| | | info.coupon_remain_count = data.optInt("coupon_remain_count");
|
| | | info.coupon_start_fee = new BigDecimal(data.optString("coupon_start_fee"));
|
| | | } else
|
| | | return null;
|
| | | return info;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 获取关联商品推荐
|
| | | * |
| | | * @param auctionId
|
| | | * @return
|
| | | */
|
| | | public static List<TaoBaoGoodsBrief> getRelationGoodsRecommend(long auctionId, int count) {
|
| | | List<TaoBaoGoodsBrief> list = new ArrayList<>();
|
| | | Map<String, String> map = new HashMap<>();
|
| | | map.put("method", "taobao.tbk.item.recommend.get");
|
| | | map.put("num_iid", auctionId + "");
|
| | | map.put("count", count + "");
|
| | | map.put("platform", 2 + "");
|
| | | map.put("fields",
|
| | | "num_iid,title,pict_url,small_images,reserve_price,zk_final_price,user_type,provcity,item_url");
|
| | | String resultStr = TaoKeBaseUtil.baseRequestForThreeTimes(map, true);
|
| | | JSONObject data = JSONObject.fromObject(resultStr);
|
| | | if (data.optJSONObject("tbk_item_recommend_get_response") != null) {
|
| | | if (data.optJSONObject("tbk_item_recommend_get_response").optJSONObject("results") == null)
|
| | | return list;
|
| | | JSONArray array = data.optJSONObject("tbk_item_recommend_get_response").optJSONObject("results")
|
| | | .optJSONArray("n_tbk_item");
|
| | | if (array != null)
|
| | | for (int i = 0; i < array.size(); i++) {
|
| | | JSONObject item = array.optJSONObject(i);
|
| | | TaoBaoGoodsBrief goods = new TaoBaoGoodsBrief();
|
| | | goods.setAuctionId(item.optLong("num_iid"));
|
| | | goods.setTitle(item.optString("title"));
|
| | | goods.setZkPrice(new BigDecimal(item.optString("zk_final_price")));
|
| | | goods.setAuctionUrl(item.optString("item_url"));
|
| | | goods.setPictUrl(item.optString("pict_url"));
|
| | | list.add(goods);
|
| | | }
|
| | | }
|
| | | return list;
|
| | | }
|
| | |
|
| | | public static void taoQiangGou() {
|
| | | Map<String, String> map = new HashMap<>();
|
| | | map.put("method", "taobao.tbk.ju.tqg.get");
|
| | | map.put("fields",
|
| | | "click_url,pic_url,reserve_price,zk_final_price,total_amount,sold_num,title,category_name,start_time,end_time");
|
| | | map.put("start_time", "2018-06-11 08:00:00");
|
| | | map.put("end_time", "2018-06-12 12:00:00");
|
| | | map.put("page_no", "1");
|
| | | map.put("page_size", "96");
|
| | | String resultStr = TaoKeBaseUtil.baseRequestForThreeTimes(map, true);
|
| | | System.out.println(resultStr);
|
| | | }
|
| | |
|
| | | public static TaoBaoSearchResult taoQiangGou(int page, int pageSize, String startTime, String endTime) {
|
| | |
|
| | | List<TaoBaoGoodsBrief> goodsList = new ArrayList<>();
|
| | |
|
| | | Map<String, String> map = new HashMap<>();
|
| | | map.put("method", "taobao.tbk.ju.tqg.get");
|
| | | map.put("fields",
|
| | | "click_url,pic_url,reserve_price,zk_final_price,total_amount,sold_num,title,category_name,start_time,end_time");
|
| | | map.put("start_time", startTime);
|
| | | map.put("end_time", endTime);
|
| | | map.put("page_no", page + "");
|
| | | map.put("page_size", pageSize + "");
|
| | |
|
| | | String resultStr = TaoKeBaseUtil.baseRequestForThreeTimes(map, true);
|
| | |
|
| | | JSONObject resultJSON = JSONObject.fromObject(resultStr);
|
| | | JSONObject response = resultJSON.optJSONObject("tbk_ju_tqg_get_response");
|
| | | if (response != null && response.optJSONObject("results") != null) {
|
| | | JSONArray array = response.optJSONObject("results").optJSONArray("results");
|
| | | if (array != null) {
|
| | |
|
| | | for (int i = 0; i < array.size(); i++) {
|
| | | JSONObject item = array.optJSONObject(i);
|
| | | String url = item.optString("click_url");
|
| | |
|
| | | // 排除 非淘客商品
|
| | | if (url.contains("s.click.taobao.com/t?e=m")) {
|
| | | TaoBaoGoodsBrief goods;
|
| | | try {
|
| | | goods = searchGoodsDetail(item.optLong("num_iid"));
|
| | | if (goods != null)
|
| | | goodsList.add(goods);
|
| | | } catch (TaobaoGoodsDownException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | }
|
| | | }
|
| | |
|
| | | pageSize = array.size();
|
| | | }
|
| | | }
|
| | |
|
| | | TaoBaoSearchResult result = new TaoBaoSearchResult();
|
| | | result.setTaoBaoGoodsBriefs(goodsList);
|
| | |
|
| | | int totalResults = response.getInt("total_results");
|
| | |
|
| | | PageEntity pe = new PageEntity(page, pageSize, totalResults);
|
| | | result.setPageEntity(pe);
|
| | | result.setNavList(new ArrayList<>());
|
| | |
|
| | | TaoBaoHead taoBaoHead = new TaoBaoHead();
|
| | | taoBaoHead.setDocsfound((int) result.getPageEntity().getTotalCount());
|
| | |
|
| | | result.setTaoBaoHead(taoBaoHead);
|
| | |
|
| | | return result;
|
| | | }
|
| | |
|
| | | /*
|
| | | * TODO 获取分类列表
|
| | | */
|
| | | public static void getTaoBaoCategoryList() {
|
| | | Map<String, String> map = new HashMap<>();
|
| | | map.put("method", "taobao.itemcats.get");
|
| | | map.put("parent_cid", "0");
|
| | |
|
| | | String resultStr = TaoKeBaseUtil.baseRequestForThreeTimes(map, true);
|
| | | System.out.println(resultStr);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 店铺搜索
|
| | | * |
| | | * @param key
|
| | | * -店铺名称
|
| | | * @param page
|
| | | * -页码
|
| | | * @return
|
| | | */
|
| | | public static List<TaoBaoShopInfo> searchShop(String key, int page) {
|
| | | if (StringUtil.isNullOrEmpty(key))
|
| | | return new ArrayList<>();
|
| | | List<TaoBaoShopInfo> list = new ArrayList<>();
|
| | | Map<String, String> map = new HashMap<>();
|
| | | map.put("method", "taobao.tbk.shop.get");
|
| | | map.put("fields", "user_id,shop_title,shop_type,seller_nick,pict_url,shop_url");
|
| | | map.put("q", key);
|
| | | map.put("page_size", "95");
|
| | | map.put("page_no", page + "");
|
| | | String resultStr = TaoKeBaseUtil.baseRequestForThreeTimes(map, true);
|
| | | JSONObject resultDate = JSONObject.fromObject(resultStr);
|
| | | if (resultDate.optJSONObject("tbk_shop_get_response") != null
|
| | | && resultDate.optJSONObject("tbk_shop_get_response").optJSONObject("results") != null) {
|
| | | JSONArray array = resultDate.optJSONObject("tbk_shop_get_response").optJSONObject("results")
|
| | | .optJSONArray("n_tbk_shop");
|
| | | if (array != null)
|
| | | for (int i = 0; i < array.size(); i++) {
|
| | | JSONObject item = array.optJSONObject(i);
|
| | | TaoBaoShopInfo info = new TaoBaoShopInfo();
|
| | | info.setPictureUrl(item.optString("pict_url"));
|
| | | info.setSellerNick(item.optString("seller_nick"));
|
| | | info.setShopTitle(item.optString("shop_title"));
|
| | | info.setShopType(item.optString("shop_type"));
|
| | | info.setShopUrl(item.optString("shop_url"));
|
| | | info.setUserId(item.optLong("user_id"));
|
| | | list.add(info);
|
| | | }
|
| | | }
|
| | | return list;
|
| | | }
|
| | |
|
| | | /**
|
| | | * TODO 按设备猜你喜欢
|
| | | * |
| | | * @param userNickName
|
| | | * @param os
|
| | | * @param imei
|
| | | * @param idfa
|
| | | * @param ip
|
| | | * @param ua
|
| | | * @param net
|
| | | * @param pageNo
|
| | | * @param pageSize
|
| | | */
|
| | | public static void guessLikeByDevice(String userNickName, String os, String imei, String idfa, String ip, String ua,
|
| | | String net, int pageNo, int pageSize) {
|
| | | Map<String, String> map = new HashMap<>();
|
| | | map.put("method", "taobao.tbk.item.guess.like");
|
| | | if (!StringUtil.isNullOrEmpty(userNickName))
|
| | | map.put("user_nick", userNickName);
|
| | | map.put("os", os + "");
|
| | | if (!StringUtil.isNullOrEmpty(idfa))
|
| | | map.put("idfa", idfa);
|
| | | if (!StringUtil.isNullOrEmpty(imei)) {
|
| | | map.put("imei", imei + "");
|
| | | map.put("imei_md5", StringUtil.Md5(imei));
|
| | | }
|
| | | map.put("ip", ip + "");
|
| | | map.put("ua", ua + "");
|
| | | map.put("net", net + "");
|
| | | map.put("page_no", pageNo + "");
|
| | | map.put("page_size", pageSize + "");
|
| | | String resultStr = TaoKeBaseUtil.baseRequestForThreeTimes(map, true);
|
| | | System.out.println(resultStr);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 品牌券获取
|
| | | * |
| | | * @param pageNo
|
| | | * @param pageSize
|
| | | */
|
| | | public static void pingPaiCoupon(int pageNo, int pageSize) {
|
| | | Map<String, String> map = new HashMap<>();
|
| | | map.put("method", "taobao.tbk.sc.coupon.brand.recommend");
|
| | | map.put("page_no", pageNo + "");
|
| | | map.put("page_size", pageSize + "");
|
| | | String resultStr = TaoKeBaseUtil.baseRequestForThreeTimes(map, true);
|
| | | System.out.println(resultStr);
|
| | | }
|
| | |
|
| | | public static void getOrder(String order) {
|
| | | Map<String, String> map = new HashMap<>();
|
| | | map.put("method", "alibaba.mos.order.get");
|
| | | map.put("order_number", order);
|
| | | String resultStr = TaoKeBaseUtil.baseRequestForThreeTimes(map, true);
|
| | | System.out.println(resultStr);
|
| | | }
|
| | |
|
| | | public static void getTAEGoodsDetail(Long auctionId) {
|
| | | Map<String, String> map = new HashMap<>();
|
| | | map.put("method", "taobao.tae.items.list");
|
| | | map.put("fields", "title,nick,pic_url,location,cid,price,post_fee,promoted_service,ju,shop_name");
|
| | | map.put("num_iids", auctionId + "");
|
| | | String resultStr = TaoKeBaseUtil.baseRequestForThreeTimes(map, true);
|
| | | System.out.println(resultStr);
|
| | | }
|
| | |
|
| | | // taobao.ju.items.search
|
| | | public static void searchJuHuaSuan() {
|
| | | Map<String, String> map = new HashMap<>();
|
| | | map.put("method", "taobao.ju.items.search");
|
| | | map.put("current_page", "1");
|
| | | map.put("page_size", 20 + "");
|
| | | map.put("pid", "mm_124933865_43788020_381938426");
|
| | | String resultStr = TaoKeBaseUtil.baseRequestForThreeTimes(map, false);
|
| | | System.out.println(resultStr);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 通过物料ID获取商品信息
|
| | | * |
| | | * @param materialId
|
| | | * -物料ID
|
| | | * @param page
|
| | | * -页码
|
| | | * @param pageSize
|
| | | * -每页数量
|
| | | * @return
|
| | | */
|
| | | public static TaoBaoSearchResult getMaterialByMaterialId(int materialId, int page, int pageSize) {
|
| | | List<TaoBaoGoodsBrief> goodsList = new ArrayList<>();
|
| | | Map<String, String> map = new HashMap<>();
|
| | | map.put("method", "taobao.tbk.dg.optimus.material");
|
| | | map.put("page_no", page + "");
|
| | | map.put("page_size", pageSize + "");
|
| | | map.put("material_id", materialId + "");
|
| | | map.put("content_id", "561388751621");
|
| | |
|
| | | String resultStr = TaoKeBaseUtil.baseRequestForThreeTimes(map, true);
|
| | | System.out.println(resultStr);
|
| | | JSONObject resultJSON = JSONObject.fromObject(resultStr);
|
| | | JSONObject response = resultJSON.optJSONObject("tbk_dg_optimus_material_response");
|
| | | if (response != null && response.optJSONObject("result_list") != null) {
|
| | | JSONArray array = response.optJSONObject("result_list").optJSONArray("map_data");
|
| | | if (array != null) {
|
| | |
|
| | | for (int i = 0; i < array.size(); i++) {
|
| | | JSONObject item = array.optJSONObject(i);
|
| | | TaoBaoGoodsBrief goods = parseWuLiaoItemFromMaterialId(item);
|
| | | if (goods != null)
|
| | | goodsList.add(goods);
|
| | | }
|
| | |
|
| | | pageSize = array.size();
|
| | | }
|
| | | }
|
| | | TaoBaoSearchResult result = new TaoBaoSearchResult();
|
| | | result.setTaoBaoGoodsBriefs(goodsList);
|
| | | int totalCount = 1000;// root.optInt("total_results");
|
| | | PageEntity pe = new PageEntity(page, pageSize, totalCount);
|
| | | result.setPageEntity(pe);
|
| | | result.setNavList(new ArrayList<>());
|
| | | TaoBaoHead taoBaoHead = new TaoBaoHead();
|
| | | taoBaoHead.setDocsfound((int) result.getPageEntity().getTotalCount());
|
| | | result.setTaoBaoHead(taoBaoHead);
|
| | | return result;
|
| | | }
|
| | |
|
| | | public static TaoBaoSearchResult getQTZMaterialByMaterialId(int materialId, int page, int pageSize) {
|
| | | List<TaoBaoGoodsBrief> goodsList = new ArrayList<>();
|
| | | Map<String, String> map = new HashMap<>();
|
| | | map.put("method", "taobao.tbk.sc.optimus.material");
|
| | | map.put("page_no", page + "");
|
| | | map.put("page_size", pageSize + "");
|
| | | map.put("material_id", materialId + "");
|
| | |
|
| | | String resultStr = TaoKeBaseUtil.baseRequestForThreeTimes(map, true);
|
| | | JSONObject resultJSON = JSONObject.fromObject(resultStr);
|
| | | JSONObject response = resultJSON.optJSONObject("tbk_dg_optimus_material_response");
|
| | | if (response != null && response.optJSONObject("result_list") != null) {
|
| | | JSONArray array = response.optJSONObject("result_list").optJSONArray("map_data");
|
| | | if (array != null) {
|
| | |
|
| | | for (int i = 0; i < array.size(); i++) {
|
| | | JSONObject item = array.optJSONObject(i);
|
| | | TaoBaoGoodsBrief goods = parseWuLiaoItemFromMaterialId(item);
|
| | | if (goods != null)
|
| | | goodsList.add(goods);
|
| | | }
|
| | |
|
| | | pageSize = array.size();
|
| | | }
|
| | | }
|
| | | TaoBaoSearchResult result = new TaoBaoSearchResult();
|
| | | result.setTaoBaoGoodsBriefs(goodsList);
|
| | | int totalCount = 1000;// root.optInt("total_results");
|
| | | PageEntity pe = new PageEntity(page, pageSize, totalCount);
|
| | | result.setPageEntity(pe);
|
| | | result.setNavList(new ArrayList<>());
|
| | | TaoBaoHead taoBaoHead = new TaoBaoHead();
|
| | | taoBaoHead.setDocsfound((int) result.getPageEntity().getTotalCount());
|
| | | result.setTaoBaoHead(taoBaoHead);
|
| | | return result;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 根据设备猜你喜欢
|
| | | * |
| | | * @param page
|
| | | * @param pageSize
|
| | | * @param imei
|
| | | * @param idfa
|
| | | * @return
|
| | | */
|
| | | public static TaoBaoSearchResult guessDeviceLike(int page, int pageSize, String imei, String idfa) {
|
| | | List<TaoBaoGoodsBrief> goodsList = new ArrayList<>();
|
| | | Map<String, String> map = new HashMap<>();
|
| | | map.put("method", "taobao.tbk.dg.optimus.material");
|
| | | map.put("page_no", page + "");
|
| | | map.put("page_size", pageSize + "");
|
| | | map.put("material_id", "6708");
|
| | | if (StringUtil.isNullOrEmpty(imei) && StringUtil.isNullOrEmpty(idfa))
|
| | | return null;
|
| | | map.put("device_encrypt", "MD5");
|
| | |
|
| | | if (!StringUtil.isNullOrEmpty(imei)) {
|
| | | map.put("device_value", StringUtil.Md5(imei));
|
| | | map.put("device_type", "IMEI");
|
| | | } else {
|
| | | map.put("device_value", StringUtil.Md5(idfa));
|
| | | map.put("device_type", "IDFA");
|
| | | }
|
| | |
|
| | | JSONObject resultJSON = null;
|
| | | try {
|
| | | resultJSON = TaoKeBaseUtil.baseRequest(map, true);
|
| | | } catch (TaoKeApiException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | if (resultJSON == null)
|
| | | return null;
|
| | |
|
| | | // JSONObject resultJSON = JSONObject.fromObject(resultStr);
|
| | | JSONObject response = resultJSON.optJSONObject("tbk_dg_optimus_material_response");
|
| | | if (response != null && response.optJSONObject("result_list") != null) {
|
| | | JSONArray array = response.optJSONObject("result_list").optJSONArray("map_data");
|
| | | if (array != null) {
|
| | |
|
| | | for (int i = 0; i < array.size(); i++) {
|
| | | JSONObject item = array.optJSONObject(i);
|
| | | TaoBaoGoodsBrief goods = parseWuLiaoItemFromMaterialId(item);
|
| | | if (goods != null)
|
| | | goodsList.add(goods);
|
| | | }
|
| | |
|
| | | pageSize = array.size();
|
| | | }
|
| | | }
|
| | | TaoBaoSearchResult result = new TaoBaoSearchResult();
|
| | | result.setTaoBaoGoodsBriefs(goodsList);
|
| | | int totalCount = 1000;// root.optInt("total_results");
|
| | | PageEntity pe = new PageEntity(page, pageSize, totalCount);
|
| | | result.setPageEntity(pe);
|
| | | result.setNavList(new ArrayList<>());
|
| | | TaoBaoHead taoBaoHead = new TaoBaoHead();
|
| | | taoBaoHead.setDocsfound((int) result.getPageEntity().getTotalCount());
|
| | | result.setTaoBaoHead(taoBaoHead);
|
| | | return result;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 从淘宝链接中解析商品ID(高级接口)
|
| | | * |
| | | * @param link
|
| | | * @return
|
| | | */
|
| | | public static String parseAuctionIdFromLink(String link) {
|
| | | Map<String, String> map = new HashMap<>();
|
| | | map.put("method", "taobao.tbk.item.click.extract");
|
| | | map.put("click_url", link + "");
|
| | | JSONObject resultJSON = null;
|
| | | try {
|
| | | resultJSON = TaoKeBaseUtil.baseRequest(map, true);
|
| | | } catch (TaoKeApiException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | if (resultJSON == null)
|
| | | return null;
|
| | |
|
| | | return null;
|
| | |
|
| | | }
|
| | |
|
| | | public static String getAccessToken(String code, String appKey, String appSecret) {
|
| | | Map<String, String> map = new HashMap<>();
|
| | | map.put("method", "taobao.top.auth.token.create");
|
| | | map.put("code", code);
|
| | | TaoKeAppInfo app = new TaoKeAppInfo();
|
| | | app.setAppKey(appKey);
|
| | | app.setAppSecret(appSecret);
|
| | | try {
|
| | | JSONObject json = TaoKeBaseUtil.baseRequest(map, app);
|
| | | if (json != null)
|
| | | return json.toString();
|
| | | } catch (TaoKeApiException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | return null;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 渠道邀请码
|
| | | * |
| | | * @param relationId
|
| | | * @return
|
| | | */
|
| | | public static String getInviteCode(Long relationId, String accessToken, String appKey, String appSecret) {
|
| | | Map<String, String> map = new HashMap<>();
|
| | | map.put("method", "taobao.tbk.sc.invitecode.get");
|
| | | map.put("session", accessToken);
|
| | | map.put("code_type", "1");
|
| | | map.put("relation_app", "common");
|
| | | JSONObject resultJSON = null;
|
| | | try {
|
| | | TaoKeAppInfo app = new TaoKeAppInfo();
|
| | | app.setAppKey(appKey);
|
| | | app.setAppSecret(appSecret);
|
| | | resultJSON = TaoKeBaseUtil.baseRequest(map, app);
|
| | | } catch (TaoKeApiException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | if (resultJSON == null)
|
| | | return null;
|
| | |
|
| | | return null;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 获取渠道邀请码
|
| | | * |
| | | * @param accessToken
|
| | | * @param appKey
|
| | | * @param appSecret
|
| | | * @return
|
| | | */
|
| | | public static String getRootRelationInviteCode(String accessToken, String appKey, String appSecret) {
|
| | | Map<String, String> map = new HashMap<>();
|
| | | map.put("method", "taobao.tbk.sc.invitecode.get");
|
| | | map.put("session", accessToken);
|
| | | map.put("code_type", "1");
|
| | | map.put("relation_app", "common");
|
| | | JSONObject resultJSON = null;
|
| | | try {
|
| | | TaoKeAppInfo app = new TaoKeAppInfo();
|
| | | app.setAppKey(appKey);
|
| | | app.setAppSecret(appSecret);
|
| | | resultJSON = TaoKeBaseUtil.baseRequest(map, app);
|
| | | } catch (TaoKeApiException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | if (resultJSON == null)
|
| | | return null;
|
| | |
|
| | | return null;
|
| | | }
|
| | |
|
| | | public static String getRootSpecialInviteCode(String accessToken, String appKey, String appSecret) {
|
| | | Map<String, String> map = new HashMap<>();
|
| | | map.put("method", "taobao.tbk.sc.invitecode.get");
|
| | | map.put("session", accessToken);
|
| | | map.put("code_type", "3");
|
| | | map.put("relation_app", "common");
|
| | | JSONObject resultJSON = null;
|
| | | try {
|
| | | TaoKeAppInfo app = new TaoKeAppInfo();
|
| | | app.setAppKey(appKey);
|
| | | app.setAppSecret(appSecret);
|
| | | resultJSON = TaoKeBaseUtil.baseRequest(map, app);
|
| | | return resultJSON.optJSONObject("tbk_sc_invitecode_get_response").optJSONObject("data")
|
| | | .optString("inviter_code");
|
| | | } catch (TaoKeApiException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | if (resultJSON == null)
|
| | | return null;
|
| | |
|
| | | return null;
|
| | | }
|
| | |
|
| | | public static String getRelationId(String accessToken, String appKey, String appSecret) {
|
| | | Map<String, String> map = new HashMap<>();
|
| | | map.put("method", "taobao.tbk.sc.publisher.info.save");
|
| | | map.put("session", accessToken);
|
| | | map.put("inviter_code", "A2QnGL");
|
| | | map.put("info_type", "1");
|
| | | map.put("online_scene", "1");
|
| | | JSONObject resultJSON = null;
|
| | | try {
|
| | | TaoKeAppInfo app = new TaoKeAppInfo();
|
| | | app.setAppKey(appKey);
|
| | | app.setAppSecret(appSecret);
|
| | | resultJSON = TaoKeBaseUtil.baseRequest(map, app);
|
| | | return resultJSON.optJSONObject("tbk_sc_publisher_info_save_response").optJSONObject("data")
|
| | | .optString("relation_id");
|
| | | } catch (TaoKeApiException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | return null;
|
| | | }
|
| | |
|
| | | public static String getSpecialId(String accessToken, String appKey, String appSecret) {
|
| | | Map<String, String> map = new HashMap<>();
|
| | | map.put("method", "taobao.tbk.sc.publisher.info.save");
|
| | | map.put("session", accessToken);
|
| | | map.put("inviter_code", "AA5ISJ");
|
| | | map.put("info_type", "1");
|
| | | map.put("online_scene", "1");
|
| | | JSONObject resultJSON = null;
|
| | | try {
|
| | | TaoKeAppInfo app = new TaoKeAppInfo();
|
| | | app.setAppKey(appKey);
|
| | | app.setAppSecret(appSecret);
|
| | | resultJSON = TaoKeBaseUtil.baseRequest(map, app);
|
| | | return resultJSON.optJSONObject("tbk_sc_publisher_info_save_response").optJSONObject("data")
|
| | | .optString("special_id");
|
| | | } catch (TaoKeApiException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | return null;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 获取会员订单
|
| | | * |
| | | * @param startTime
|
| | | * @param appKey
|
| | | * @param appSecret
|
| | | * @return
|
| | | */
|
| | | public static List<TaoBaoOrder> getTaoBaoSpecialOrder(String startTime, String appKey, String appSecret) {
|
| | | Map<String, String> map = new HashMap<>();
|
| | | map.put("method", "taobao.tbk.order.get");
|
| | | map.put("fields",
|
| | | "tb_trade_parent_id,tb_trade_id,num_iid,item_title,item_num,price,pay_price,seller_nick,seller_shop_title,commission,commission_rate,unid,create_time,earning_time,tk_status,tk3rd_pub_id,tk3rd_site_id,tk3rd_adzone_id,relation_id,tb_trade_parent_id,tb_trade_id,num_iid,item_title,item_num,price,pay_price,seller_nick,seller_shop_title,commission,commission_rate,unid,create_time,earning_time,tk3rd_pub_id,tk3rd_site_id,tk3rd_adzone_id,special_id,click_time,relation_id,special_id");
|
| | | map.put("start_time", startTime);
|
| | | map.put("span", "1200");
|
| | | map.put("tk_status", "1");
|
| | | map.put("order_query_type", "create_time");
|
| | | map.put("order_scene", "3");
|
| | | map.put("page_no", 1 + "");
|
| | | map.put("page_size", 100 + "");
|
| | |
|
| | | TaoKeAppInfo app = new TaoKeAppInfo();
|
| | | app.setAppKey(appKey);
|
| | | app.setAppSecret(appSecret);
|
| | | try {
|
| | | JSONObject json = TaoKeBaseUtil.baseRequest(map, app);
|
| | | return parseTaoBaoOrder(json.toString());
|
| | | } catch (TaoKeApiException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | return null;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 获取渠道订单
|
| | | * |
| | | * @param startTime
|
| | | * @param appKey
|
| | | * @param appSecret
|
| | | * @return
|
| | | */
|
| | | public static List<TaoBaoOrder> getTaoBaoRelationOrder(String startTime, String appKey, String appSecret) {
|
| | | Map<String, String> map = new HashMap<>();
|
| | | map.put("method", "taobao.tbk.order.get");
|
| | | map.put("fields",
|
| | | "tb_trade_parent_id,tb_trade_id,num_iid,item_title,item_num,price,pay_price,seller_nick,seller_shop_title,commission,commission_rate,unid,create_time,earning_time,tk_status,tk3rd_pub_id,tk3rd_site_id,tk3rd_adzone_id,relation_id,tb_trade_parent_id,tb_trade_id,num_iid,item_title,item_num,price,pay_price,seller_nick,seller_shop_title,commission,commission_rate,unid,create_time,earning_time,tk3rd_pub_id,tk3rd_site_id,tk3rd_adzone_id,special_id,click_time,relation_id,special_id");
|
| | | map.put("start_time", startTime);
|
| | | map.put("span", "1200");
|
| | | map.put("tk_status", "1");
|
| | | map.put("order_query_type", "create_time");
|
| | | map.put("order_scene", "2");
|
| | | map.put("page_no", 1 + "");
|
| | | map.put("page_size", 100 + "");
|
| | |
|
| | | TaoKeAppInfo app = new TaoKeAppInfo();
|
| | | app.setAppKey(appKey);
|
| | | app.setAppSecret(appSecret);
|
| | | try {
|
| | | JSONObject json = TaoKeBaseUtil.baseRequest(map, app);
|
| | |
|
| | | return parseTaoBaoOrder(json.toString());
|
| | | } catch (TaoKeApiException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | return null;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 获取所有的订单(不带渠道信息与会员信息)
|
| | | * |
| | | * @param startTime
|
| | | * @param appKey
|
| | | * @param appSecret
|
| | | * @return
|
| | | */
|
| | | public static List<TaoBaoOrder> getTaoBaoAllOrder(String startTime, String appKey, String appSecret) {
|
| | | Map<String, String> map = new HashMap<>();
|
| | | map.put("method", "taobao.tbk.order.get");
|
| | | map.put("fields",
|
| | | "tb_trade_parent_id,tb_trade_id,num_iid,item_title,item_num,price,pay_price,seller_nick,seller_shop_title,commission,commission_rate,unid,create_time,earning_time,tk_status,tk3rd_pub_id,tk3rd_site_id,tk3rd_adzone_id,relation_id,tb_trade_parent_id,tb_trade_id,num_iid,item_title,item_num,price,pay_price,seller_nick,seller_shop_title,commission,commission_rate,unid,create_time,earning_time,tk3rd_pub_id,tk3rd_site_id,tk3rd_adzone_id,special_id,click_time,relation_id,special_id");
|
| | | map.put("start_time", startTime);
|
| | | map.put("span", "1200");
|
| | | map.put("tk_status", "1");
|
| | | map.put("order_query_type", "create_time");
|
| | | map.put("order_scene", "1");// 所有订单
|
| | | map.put("page_no", 1 + "");
|
| | | map.put("page_size", 100 + "");
|
| | |
|
| | | TaoKeAppInfo app = new TaoKeAppInfo();
|
| | | app.setAppKey(appKey);
|
| | | app.setAppSecret(appSecret);
|
| | | try {
|
| | | JSONObject json = TaoKeBaseUtil.baseRequest(map, app);
|
| | | return parseTaoBaoOrder(json.toString());
|
| | | } catch (TaoKeApiException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | return null;
|
| | | }
|
| | |
|
| | | private static List<TaoBaoOrder> parseTaoBaoOrder(String response) {
|
| | |
|
| | | List<TaoBaoOrder> orderList = new ArrayList<>();
|
| | |
|
| | | JSONObject data = JSONObject.fromObject(response);
|
| | | if (data.optJSONObject("tbk_order_get_response") == null)
|
| | | return orderList;
|
| | | if (data.optJSONObject("tbk_order_get_response").optJSONObject("results") == null)
|
| | | return orderList;
|
| | | if (data.optJSONObject("tbk_order_get_response").optJSONObject("results").optJSONArray("n_tbk_order") == null)
|
| | | return orderList;
|
| | |
|
| | | JSONArray array = data.optJSONObject("tbk_order_get_response").optJSONObject("results")
|
| | | .optJSONArray("n_tbk_order");
|
| | | for (int i = 0; i < array.size(); i++) {
|
| | | JSONObject item = array.optJSONObject(i);
|
| | | TaoBaoOrder taoBaoOrder = new TaoBaoOrder();
|
| | | taoBaoOrder.setAdPositionId(item.optString("adzone_id"));
|
| | | taoBaoOrder.setAdPositionName(item.optString("adzone_name"));
|
| | | taoBaoOrder.setAuctionId(item.optLong("num_iid"));
|
| | | taoBaoOrder.setClassName(item.optString("auction_category"));
|
| | | taoBaoOrder.setClickTime(item.optString("click_time"));
|
| | | taoBaoOrder.setCount(item.optInt("item_num"));
|
| | | taoBaoOrder.setCreateTime(item.optString("create_time"));
|
| | | if (!StringUtil.isNullOrEmpty(item.optString("total_commission_fee")))
|
| | | taoBaoOrder.seteIncome(new BigDecimal(item.optString("total_commission_fee")));
|
| | | else
|
| | | taoBaoOrder.seteIncome(new BigDecimal(0));
|
| | |
|
| | | if (!StringUtil.isNullOrEmpty(item.optString("pub_share_pre_fee")))
|
| | | taoBaoOrder.setEstimate(new BigDecimal(item.optString("pub_share_pre_fee")));
|
| | | else
|
| | | taoBaoOrder.setEstimate(new BigDecimal(0));
|
| | | taoBaoOrder.setiRatio(new BigDecimal(item.optString("income_rate")).multiply(new BigDecimal(100)));
|
| | | taoBaoOrder.setLatestUpdateTime(null);
|
| | | taoBaoOrder.setManagerWangWang(null);
|
| | | taoBaoOrder.setOrderBy(null);
|
| | | taoBaoOrder.setOrderId(item.optString("trade_parent_id"));
|
| | | if (item.optInt("tk_status") == 12)
|
| | | taoBaoOrder.setOrderState("订单付款");
|
| | | else if (item.optInt("tk_status") == 3)
|
| | | taoBaoOrder.setOrderState("订单结算");
|
| | | else if (item.optInt("tk_status") == 13)
|
| | | taoBaoOrder.setOrderState("订单失效");
|
| | | else if (item.optInt("tk_status") == 14)
|
| | | taoBaoOrder.setOrderState("订单成功");
|
| | |
|
| | | taoBaoOrder.setOrderType(item.optString("order_type"));
|
| | | if (!StringUtil.isNullOrEmpty(item.optString("alipay_total_price")))
|
| | | taoBaoOrder.setPayment(new BigDecimal(item.optString("alipay_total_price")));
|
| | | else
|
| | | taoBaoOrder.setPayment(new BigDecimal(0));
|
| | | taoBaoOrder.setPrice(new BigDecimal(item.optString("price")));
|
| | | if (!StringUtil.isNullOrEmpty(item.optString("alipay_total_price")))
|
| | | taoBaoOrder.setSettlement(new BigDecimal(item.optString("alipay_total_price")));
|
| | | else
|
| | | taoBaoOrder.setSettlement(new BigDecimal(0));
|
| | | taoBaoOrder.setSettlementTime(item.optString("earning_time"));
|
| | | taoBaoOrder.setShop(item.optString("seller_shop_title"));
|
| | | taoBaoOrder.setSourceMediaId(item.optString("site_id"));
|
| | | taoBaoOrder.setSourceMediaName(item.optString("site_name"));
|
| | | taoBaoOrder.setsRatio(null);
|
| | | taoBaoOrder.setSubsidy(null);
|
| | | if (!StringUtil.isNullOrEmpty(item.optString("subsidy_rate")))
|
| | | taoBaoOrder
|
| | | .setSubsidyRatio(new BigDecimal(item.optString("subsidy_rate")).multiply(new BigDecimal(100)));
|
| | | taoBaoOrder.setSubsidyType(item.optString("subsidy_type"));
|
| | | taoBaoOrder.setTechnologySupportPercent(null);
|
| | | taoBaoOrder.setThirdService(null);
|
| | | taoBaoOrder.setTitle(item.optString("item_title"));
|
| | | if (!StringUtil.isNullOrEmpty(item.optString("total_commission_fee")))
|
| | | taoBaoOrder.setTkMoney(new BigDecimal(item.optString("total_commission_fee")));
|
| | | else
|
| | | taoBaoOrder.setTkMoney(new BigDecimal(0));
|
| | | taoBaoOrder.setTkRate(new BigDecimal(item.optString("commission_rate")));
|
| | | taoBaoOrder.setTransactionPlatform(item.optString("terminal_type"));
|
| | | taoBaoOrder.setRelationId(item.optString("relation_id"));
|
| | | taoBaoOrder.setSpecialId(item.optString("special_id"));
|
| | | orderList.add(taoBaoOrder);
|
| | | }
|
| | |
|
| | | return orderList;
|
| | | }
|
| | |
|
| | | public static void specialConvertItem(Long auctionId, TaoKeAppInfo app) {
|
| | | String pid = app.getPid();
|
| | | String[] sts = pid.split("_");
|
| | | Map<String, String> map = new HashMap<>();
|
| | | map.put("method", "taobao.tbk.item.convert");
|
| | | map.put("num_iids", auctionId + "");
|
| | | map.put("fields", "num_iid,click_url");
|
| | | map.put("adzone_id", sts[3]);
|
| | | map.put("platform", "2");
|
| | | try {
|
| | | JSONObject json = TaoKeBaseUtil.baseRequest(map, app);
|
| | | System.out.println(json.toString());
|
| | | } catch (TaoKeApiException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | public static TaoBaoGoodsBrief specialConvertCoupon(Long auctionId, 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]);
|
| | | try {
|
| | | JSONObject json = TaoKeBaseUtil.baseRequest(map, app);
|
| | | JSONObject resultJSON = json.optJSONObject("tbk_coupon_convert_response").optJSONObject("result")
|
| | | .optJSONObject("results");
|
| | | String couponLink = resultJSON.optString("coupon_click_url");
|
| | | String itemLink = resultJSON.optString("item_url");
|
| | | TaoBaoGoodsBrief goods = new TaoBaoGoodsBrief();
|
| | | goods.setAuctionUrl(itemLink);
|
| | | goods.setCouponLink(couponLink);
|
| | | return goods;
|
| | | } catch (TaoKeApiException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | return null;
|
| | | }
|
| | |
|
| | | // AA5ISJ
|
| | |
|
| | | private static TaoBaoGoodsBrief parseWuLiaoItemFromMaterialId(JSONObject item) {
|
| | | TaoBaoGoodsBrief goods = new TaoBaoGoodsBrief();
|
| | | // 设置成320*320的图片尺寸
|
| | | goods.setPictUrl(TbImgUtil.getTBSize320Img("https:" + item.optString("pict_url")));
|
| | | goods.setAuctionId(item.optLong("item_id"));
|
| | | goods.setAuctionUrl("https://item.taobao.com/item.htm?id=" + goods.getAuctionId());
|
| | | goods.setBiz30day(item.optInt("volume"));
|
| | | if (!StringUtil.isNullOrEmpty(item.optString("coupon_amount"))) {
|
| | | goods.setCouponEffectiveEndTime(TimeUtil.getGernalTime(item.optLong("coupon_end_time"), "yyyy-MM-dd"));
|
| | | goods.setCouponEffectiveStartTime(TimeUtil.getGernalTime(item.optLong("coupon_start_time"), "yyyy-MM-dd"));
|
| | | goods.setCouponStartFee(new BigDecimal(item.optString("coupon_start_fee")));
|
| | | goods.setCouponLeftCount(item.optInt("coupon_remain_count"));
|
| | | goods.setCouponLink(null);
|
| | | goods.setCouponAmount(new BigDecimal(item.optString("coupon_amount")));
|
| | | goods.setCouponTotalCount(item.optInt("coupon_total_count"));
|
| | | goods.setCouponActivityId(item.optString("coupon_id"));
|
| | | if (goods.getCouponStartFee().compareTo(new BigDecimal(0)) > 0)
|
| | | goods.setCouponInfo(String.format("满%s元减%s元",
|
| | | MoneyBigDecimalUtil.getWithNoZera(goods.getCouponStartFee()).toString(),
|
| | | MoneyBigDecimalUtil.getWithNoZera(goods.getCouponAmount()).toString()));
|
| | | else
|
| | | goods.setCouponInfo(String.format("%s元无条件券",
|
| | | MoneyBigDecimalUtil.getWithNoZera(goods.getCouponAmount()).toString()));
|
| | |
|
| | | if (goods.getCouponStartFee().compareTo(new BigDecimal(0)) <= 0) {
|
| | | goods.setCouponStartFee(goods.getCouponAmount());
|
| | | }
|
| | |
|
| | | } else {
|
| | | goods.setCouponAmount(new BigDecimal(0));
|
| | | }
|
| | |
|
| | | goods.setDayLeft(-1);
|
| | | if (item.optJSONObject("small_images") != null) {
|
| | | JSONArray imgArray = item.optJSONObject("small_images").optJSONArray("string");
|
| | | if (imgArray != null) {
|
| | | List<String> imgList = new ArrayList<>();
|
| | | for (int n = 0; n < imgArray.size(); n++) {
|
| | | imgList.add(imgArray.optString(n));
|
| | | }
|
| | | goods.setImgList(imgList);
|
| | | }
|
| | | }
|
| | |
|
| | | goods.setTkMktStatus("0");
|
| | | goods.setIncludeDxjh(0);
|
| | |
|
| | | goods.setSellerId(item.optLong("seller_id"));
|
| | | goods.setShopTitle(item.optString("shop_title"));
|
| | | goods.setTitle(item.optString("title"));
|
| | |
|
| | | if (!StringUtil.isNullOrEmpty(item.optString("level_one_category_id"))) {
|
| | | goods.setRootCatId(item.optInt("level_one_category_id"));
|
| | | }
|
| | | goods.setRootCategoryName(item.optString("level_one_category_name"));
|
| | |
|
| | | if (!StringUtil.isNullOrEmpty(item.optString("category_id"))) {
|
| | | goods.setLeafCatId(item.optInt("category_id"));
|
| | | }
|
| | | goods.setLeafName(item.optString("category_name"));
|
| | |
|
| | | goods.setTotalNum(1000);
|
| | | goods.setUserType(item.optInt("user_type"));
|
| | | goods.setUserTypeName("");
|
| | |
|
| | | if (!StringUtil.isNullOrEmpty(item.optString("commission_rate"))) {
|
| | | goods.setTkRate(new BigDecimal(item.optString("commission_rate")));
|
| | | } else {
|
| | | goods.setTkRate(new BigDecimal(0));
|
| | | }
|
| | |
|
| | | if (!StringUtil.isNullOrEmpty(item.optString("zk_final_price"))) {
|
| | | goods.setZkPrice(new BigDecimal(item.optString("zk_final_price")));
|
| | | } else {
|
| | | goods.setZkPrice(new BigDecimal(0));
|
| | | }
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(goods.getCouponInfo())) {// 无券
|
| | | goods.setTkCommFee(goods.getZkPrice().multiply(goods.getTkRate()).divide(new BigDecimal(100)));
|
| | | } else if (goods.getZkPrice().compareTo(goods.getCouponStartFee()) >= 0// 有券
|
| | | && goods.getZkPrice().compareTo(goods.getCouponAmount()) >= 0) {
|
| | | BigDecimal finalPrice = goods.getZkPrice().subtract(goods.getCouponAmount());
|
| | | goods.setTkCommFee(finalPrice.multiply(goods.getTkRate()).divide(new BigDecimal(100)));
|
| | | } else {
|
| | | goods.setTkCommFee(new BigDecimal(0));
|
| | | }
|
| | | goods.setReservePrice(new BigDecimal(0));
|
| | | goods.setTotalFee(new BigDecimal("0"));
|
| | | return goods;
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | class QuanInfo {
|
| | | public String coupon_start_time;// 开始时间
|
| | | public String coupon_end_time; // 券结束时间
|
| | | public BigDecimal coupon_amount;// 券金额
|
| | | public int coupon_total_count;// 券总数量
|
| | | public int coupon_remain_count;// 券剩余数量
|
| | | public BigDecimal coupon_start_fee;// 券起始金额
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.utils.dataoke;
|
| | |
|
| | | import java.util.Arrays;
|
| | | import java.util.HashMap;
|
| | | import java.util.Iterator;
|
| | | import java.util.Map;
|
| | |
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | | import org.fanli.facade.goods.dto.taoke.TaoKeAppInfo;
|
| | | import org.fanli.facade.goods.exception.taoke.TaoKeApiException;
|
| | | import org.fanli.facade.goods.utils.taobao.TaoBaoHttpUtil;
|
| | | import org.yeshi.utils.HttpUtil;
|
| | | import org.yeshi.utils.StringUtil;
|
| | | import org.yeshi.utils.TimeUtil;
|
| | |
|
| | | import com.taobao.api.internal.util.StringUtils;
|
| | |
|
| | | import com.yeshi.fanli.base.log.LogHelper;
|
| | | import com.yeshi.fanli.base.log.TaoKeLogHelper;
|
| | |
|
| | | public class TaoKeBaseUtil {
|
| | |
|
| | | private static TaoKeAppInfo taoKeAppInfo = null;
|
| | | private static long lastTime = 0;
|
| | |
|
| | | public static JSONObject baseRequest(Map<String, String> param, boolean needAdzoneId) throws TaoKeApiException {
|
| | | // 复制params
|
| | | Map<String, String> params = new HashMap<>();
|
| | | if (param != null) {
|
| | | Iterator<String> its = param.keySet().iterator();
|
| | | while (its.hasNext()) {
|
| | | String key = its.next();
|
| | | params.put(key, param.get(key));
|
| | | }
|
| | | }
|
| | |
|
| | | // 获取有效的APPKey
|
| | | TaoKeAppInfo app = getAvailableTaoKeAppInfo();
|
| | | if (app == null)
|
| | | throw new TaoKeApiException(TaoKeApiException.CODE_NO_USE, "无appkey可用");
|
| | | // 签名
|
| | | params.put("app_key", app.getAppKey());
|
| | | params.put("sign_method", "md5");
|
| | | params.put("v", "2.0");
|
| | | params.put("timestamp", TimeUtil.getGernalTime(System.currentTimeMillis(), "yyyy-MM-dd HH:mm:ss"));
|
| | | params.put("format", "json");
|
| | | if (needAdzoneId)
|
| | | params.put("adzone_id", app.getAdzoneId());
|
| | | params.put("sign", getSign(params, "md5", app).toUpperCase());
|
| | | String result = TaoBaoHttpUtil.taoKeGet(params);
|
| | | JSONObject data = JSONObject.fromObject(result);
|
| | | if (data != null) {
|
| | | if (data.optJSONObject("error_response") != null
|
| | | && data.optJSONObject("error_response").optInt("code") == 7) {
|
| | | reportAppInvalid(app.getAppKey());
|
| | | TaoKeLogHelper.error(params, result);
|
| | | throw new TaoKeApiException(TaoKeApiException.CODE_APPKEY_LIMIT, "淘宝请求限制:" + result, params);
|
| | | } else if (data.optJSONObject("error_response") != null) {
|
| | | throw new TaoKeApiException(TaoKeApiException.CODE_API_ERROR, result, params);
|
| | | }
|
| | | } else
|
| | | throw new TaoKeApiException(TaoKeApiException.CODE_OTHER, ":" + result, params);
|
| | | reValid(app.getAppKey());
|
| | | return data;
|
| | | }
|
| | |
|
| | | public static JSONObject baseRequest(Map<String, String> param, TaoKeAppInfo app) throws TaoKeApiException {
|
| | | // 复制params
|
| | | Map<String, String> params = new HashMap<>();
|
| | | if (param != null) {
|
| | | Iterator<String> its = param.keySet().iterator();
|
| | | while (its.hasNext()) {
|
| | | String key = its.next();
|
| | | params.put(key, param.get(key));
|
| | | }
|
| | | }
|
| | |
|
| | | // 获取有效的APPKey
|
| | | if (app == null)
|
| | | throw new TaoKeApiException(TaoKeApiException.CODE_NO_USE, "无appkey可用");
|
| | | // 签名
|
| | | params.put("app_key", app.getAppKey());
|
| | | params.put("sign_method", "md5");
|
| | | params.put("v", "2.0");
|
| | | params.put("timestamp", TimeUtil.getGernalTime(System.currentTimeMillis(), "yyyy-MM-dd HH:mm:ss"));
|
| | | params.put("format", "json");
|
| | | params.put("adzone_id", app.getAdzoneId());
|
| | | params.put("sign", getSign(params, "md5", app).toUpperCase());
|
| | | String result = TaoBaoHttpUtil.taoKeGet(params);
|
| | | JSONObject data = JSONObject.fromObject(result);
|
| | | if (data != null) {
|
| | | if (data.optJSONObject("error_response") != null
|
| | | && data.optJSONObject("error_response").optInt("code") == 7) {
|
| | | reportAppInvalid(app.getAppKey());
|
| | | throw new TaoKeApiException(TaoKeApiException.CODE_APPKEY_LIMIT, "淘宝请求限制:" + result, params);
|
| | | } else if (data.optJSONObject("error_response") != null) {
|
| | | throw new TaoKeApiException(TaoKeApiException.CODE_API_ERROR, result, params);
|
| | | }
|
| | | } else
|
| | | throw new TaoKeApiException(TaoKeApiException.CODE_OTHER, ":" + result, params);
|
| | | reValid(app.getAppKey());
|
| | | return data;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 重复3次请求,降低出错概率
|
| | | * |
| | | * @param params
|
| | | * @return
|
| | | */
|
| | | public static String baseRequestForThreeTimes(Map<String, String> params, boolean needAdzoneId) {
|
| | | JSONObject data = null;
|
| | | int count = 0;
|
| | | String result = null;
|
| | | while (data == null && count < 2) {
|
| | | count++;
|
| | | try {
|
| | | data = baseRequest(params, needAdzoneId);
|
| | | } catch (TaoKeApiException e) {
|
| | | // 记录现场
|
| | | TaoKeLogHelper.error(e.getParams(), e.getMsg());
|
| | | if (e.getCode() == TaoKeApiException.CODE_API_ERROR) {
|
| | | result = e.getMsg();
|
| | | }
|
| | | }
|
| | | }
|
| | | if (!StringUtil.isNullOrEmpty(result)) {
|
| | | try {
|
| | | data = JSONObject.fromObject(result);
|
| | | } catch (Exception e) {
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | if (data != null)
|
| | | return data.toString();
|
| | | else
|
| | | return new JSONObject().toString();
|
| | | }
|
| | |
|
| | | public static String baseRequestForThreeTimes(Map<String, String> params, TaoKeAppInfo app) {
|
| | | JSONObject data = null;
|
| | | int count = 0;
|
| | | while (data == null && count < 3) {
|
| | | count++;
|
| | | try {
|
| | | data = baseRequest(params, app);
|
| | | } catch (TaoKeApiException e) {
|
| | | // 记录现场
|
| | | TaoKeLogHelper.error(e.getParams(), e.getMsg());
|
| | | }
|
| | | }
|
| | | if (data != null)
|
| | | return data.toString();
|
| | | else
|
| | | return new JSONObject().toString();
|
| | | }
|
| | |
|
| | | /**
|
| | | * 获取签名参数
|
| | | * |
| | | * @param params
|
| | | * @param signMethod
|
| | | * @param app
|
| | | * @return
|
| | | */
|
| | | public static String getSign(Map<String, String> params, String signMethod, TaoKeAppInfo app) {
|
| | | // 第一步:检查参数是否已经排序
|
| | | String[] keys = params.keySet().toArray(new String[0]);
|
| | | Arrays.sort(keys);
|
| | |
|
| | | // 第二步:把所有参数名和参数值串在一起
|
| | | StringBuilder query = new StringBuilder();
|
| | | if ("md5".equals(signMethod)) {
|
| | | query.append(app.getAppSecret());
|
| | | }
|
| | | for (String key : keys) {
|
| | | String value = params.get(key);
|
| | | if (StringUtils.areNotEmpty(key, value)) {
|
| | | query.append(key).append(value);
|
| | | }
|
| | | }
|
| | |
|
| | | query.append(app.getAppSecret());
|
| | | return StringUtil.Md5(query.toString());
|
| | | }
|
| | |
|
| | | static TaoKeAppInfo getAvailableTaoKeAppInfo() {
|
| | | if (System.currentTimeMillis() - lastTime > 1000 * 20L)
|
| | | taoKeAppInfo = null;
|
| | | if (taoKeAppInfo == null) {
|
| | | System.out.println("请求。。。。。");
|
| | | String result = null;
|
| | | try {
|
| | | result = HttpUtil.get("http://193.112.35.168:8091/tb/taoke/getcanuseapp");
|
| | | } catch (Exception e) {
|
| | | }
|
| | |
|
| | | // 接口请求失败,默认设置成影视大全IOS的媒体信息
|
| | | if (StringUtil.isNullOrEmpty(result)) {
|
| | | taoKeAppInfo = new TaoKeAppInfo();
|
| | | taoKeAppInfo.setAdzoneId("381938426");
|
| | | taoKeAppInfo.setAppKey("24838852");
|
| | | taoKeAppInfo.setAppSecret("bc8265e2bf8d8115329d652f9d3d4cd8");
|
| | | taoKeAppInfo.setPid("mm_124933865_43788020_381938426");
|
| | | lastTime = System.currentTimeMillis();
|
| | | return taoKeAppInfo;
|
| | | }
|
| | |
|
| | | JSONObject data = JSONObject.fromObject(result);
|
| | | if (data.optInt("code") == 0) {
|
| | | TaoKeAppInfo info = new TaoKeAppInfo();
|
| | | info.setAppKey(data.optJSONObject("data").optString("appkey"));
|
| | | info.setAppSecret(data.optJSONObject("data").optString("appsecret"));
|
| | | info.setPid(data.optJSONObject("data").optString("pid"));
|
| | | String[] sts = info.getPid().split("_");
|
| | | info.setAdzoneId(sts[sts.length - 1]);
|
| | | taoKeAppInfo = info;
|
| | | lastTime = System.currentTimeMillis();
|
| | | } else {// 防止所有的失效
|
| | | taoKeAppInfo = new TaoKeAppInfo();
|
| | | taoKeAppInfo.setAdzoneId("381938426");
|
| | | taoKeAppInfo.setAppKey("24838852");
|
| | | taoKeAppInfo.setAppSecret("bc8265e2bf8d8115329d652f9d3d4cd8");
|
| | | taoKeAppInfo.setPid("mm_124933865_43788020_381938426");
|
| | | return taoKeAppInfo;
|
| | | }
|
| | | }
|
| | | return taoKeAppInfo;
|
| | | }
|
| | |
|
| | | static void filterTaoKeResponse(String result, TaoKeAppInfo app) {
|
| | | if (!StringUtil.isNullOrEmpty(result)) {
|
| | | try {
|
| | | JSONObject data = JSONObject.fromObject(result);
|
| | | if (data != null) {
|
| | | if (data.optJSONObject("error_response") != null
|
| | | && data.optJSONObject("error_response").optInt("code") == 7) {
|
| | | reportAppInvalid(app.getAppKey());
|
| | | }
|
| | | } else
|
| | | LogHelper.test(result);
|
| | | } catch (Exception e) {
|
| | | try {
|
| | | LogHelper.errorDetailInfo(e);
|
| | | } catch (Exception e1) {
|
| | | e1.printStackTrace();
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | static Map<String, Integer> invalidMap = new HashMap<>();
|
| | |
|
| | | /**
|
| | | * 报告该APPKey不能用
|
| | | * |
| | | * @param appkey
|
| | | */
|
| | | static void reportAppInvalid(String appkey) {
|
| | | if (invalidMap == null)
|
| | | return;
|
| | | // 错误三次后再真正上报
|
| | | if (invalidMap.get(appkey) == null)
|
| | | invalidMap.put(appkey, 1);
|
| | | else
|
| | | invalidMap.put(appkey, invalidMap.get(appkey) + 1);
|
| | |
|
| | | if (invalidMap.get(appkey) < 4)
|
| | | return;
|
| | | invalidMap.put(appkey, 0);
|
| | | HttpUtil.get("http://193.112.35.168:8091/tb/taoke/reportappcannotuse?appkey=" + appkey);
|
| | | lastTime = 0;
|
| | | }
|
| | |
|
| | | /**
|
| | | * APPKey恢复可用
|
| | | * |
| | | * @param appKey
|
| | | */
|
| | | static void reValid(String appKey) {
|
| | | if (invalidMap == null)
|
| | | return;
|
| | | Integer count = invalidMap.get(appKey);
|
| | | if (count != null && count > 0)
|
| | | invalidMap.put(appKey, count - 1);
|
| | | }
|
| | |
|
| | | public static void setAppValid() {
|
| | | HttpUtil.get("http://193.112.35.168:8091/tb/taoke/setappcanuse");
|
| | | }
|
| | | |
| | | }
|
| | |
|
| | |
|
New file |
| | |
| | | package org.fanli.facade.goods.utils.factory;
|
| | |
|
| | | import com.yeshi.fanli.base.entity.goods.CommonGoods;
|
| | | import com.yeshi.fanli.base.entity.goods.TaoBaoGoodsBrief;
|
| | |
|
| | | public class CommonGoodsFactory {
|
| | |
|
| | | /**
|
| | | * 淘宝商品构造
|
| | | * |
| | | * @param goods
|
| | | * @return
|
| | | */
|
| | | public static CommonGoods create(TaoBaoGoodsBrief goods) {
|
| | | if (goods == null)
|
| | | return null;
|
| | |
|
| | | CommonGoods cg = new CommonGoods();
|
| | | cg.setCouponAmount(goods.getCouponAmount());
|
| | | cg.setCouponInfo(goods.getCouponInfo());
|
| | | cg.setCouponLeftCount(goods.getCouponLeftCount());
|
| | | cg.setCouponStartPrice(goods.getCouponStartFee());
|
| | | cg.setCouponTotalCount(goods.getCouponTotalCount());
|
| | | cg.setGoodsId(goods.getAuctionId());
|
| | | cg.setGoodsType(CommonGoods.GOODS_TYPE_TB);
|
| | | cg.setPicture(goods.getPictUrl());
|
| | | cg.setPictureWhite(goods.getPictUrlWhite());
|
| | | cg.setPrice(goods.getZkPrice());
|
| | | cg.setSales(goods.getBiz30day());
|
| | | cg.setRate(goods.getTkRate());
|
| | | cg.setSellerId(goods.getSellerId());
|
| | | cg.setSellerName(goods.getShopTitle());
|
| | | if (goods.getUserType() == 0)
|
| | | cg.setShopType(CommonGoods.SHOP_TYPE_TB);
|
| | | else
|
| | | cg.setShopType(CommonGoods.SHOP_TYPE_TM);
|
| | | cg.setState(CommonGoods.STATE_NORMAL);
|
| | | cg.setTitle(goods.getTitle());
|
| | | // 保留字段
|
| | | cg.setVideoCover(null);
|
| | | cg.setVideoUrl(null);
|
| | | cg.setState(goods.getState());
|
| | | return cg;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package org.fanli.facade.goods.utils.recommend;
|
| | |
|
| | | import java.util.ArrayList;
|
| | | import java.util.Collection;
|
| | | import java.util.Collections;
|
| | | import java.util.Comparator;
|
| | | import java.util.LinkedHashMap;
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | | import java.util.Map.Entry;
|
| | |
|
| | | import org.fanli.facade.goods.dto.clazz.GoodsClassAdmin;
|
| | | import org.fanli.facade.goods.dto.recommend.RecommendBannerAdmin;
|
| | | import org.fanli.facade.goods.dto.recommend.RecommendSectionAdmin;
|
| | | import org.fanli.facade.goods.dto.recommend.RecommendSpecialAdmin;
|
| | | import org.fanli.facade.goods.dto.usergoods.HotSearchAdmin;
|
| | | import org.fanli.facade.goods.entity.recommend.RecommendSection;
|
| | | import org.fanli.facade.goods.entity.recommend.RecommendSectionGoods;
|
| | |
|
| | | public class RecommendUtils {
|
| | |
|
| | | @SuppressWarnings("unchecked")
|
| | | public static void sort(List list) {
|
| | | if (list == null || list.size() == 0) {
|
| | | return;
|
| | | }
|
| | | if (list.get(0) instanceof RecommendSection) {
|
| | | Collections.sort(list, new Comparator<RecommendSection>() {
|
| | | public int compare(RecommendSection o1, RecommendSection o2) {
|
| | | return o1.getOrderby() - o2.getOrderby();
|
| | | }
|
| | | });
|
| | | } else if (list.get(0) instanceof RecommendSectionGoods) {
|
| | | Collections.sort(list, new Comparator<RecommendSectionGoods>() {
|
| | | public int compare(RecommendSectionGoods o1, RecommendSectionGoods o2) {
|
| | | return o1.getOrderby() - o2.getOrderby();
|
| | | }
|
| | | });
|
| | | }
|
| | | return;
|
| | | }
|
| | |
|
| | | @SuppressWarnings("unchecked")
|
| | | public static Map orderBy(Map map) {
|
| | | if (map.size() == 0) {
|
| | | return map;
|
| | | }
|
| | |
|
| | | Collection values = map.values();
|
| | | Object obj = null;
|
| | | for (Object object : values) {
|
| | | obj = object;
|
| | | break;
|
| | | }
|
| | | if (obj instanceof RecommendBannerAdmin) {
|
| | |
|
| | | // 通过ArrayList构�?函数把map.entrySet()转换成list
|
| | | List<Map.Entry<Long, RecommendBannerAdmin>> list = new ArrayList<Map.Entry<Long, RecommendBannerAdmin>>(
|
| | | (Collection) map.entrySet());
|
| | | // 通过比较器实现比较排�?
|
| | | Collections.sort(list, new Comparator<Map.Entry<Long, RecommendBannerAdmin>>() {
|
| | | public int compare(Map.Entry<Long, RecommendBannerAdmin> mapping1,
|
| | | Map.Entry<Long, RecommendBannerAdmin> mapping2) {
|
| | | int orderby1 = mapping1.getValue().getRecommendBanner().getOrderby();
|
| | | int orderby2 = mapping2.getValue().getRecommendBanner().getOrderby();
|
| | | return orderby1 - orderby2;
|
| | | }
|
| | | });
|
| | | LinkedHashMap<Long, Object> newMap = new LinkedHashMap<Long, Object>();
|
| | | for (Entry<Long, RecommendBannerAdmin> entry : list) {
|
| | | newMap.put(entry.getKey(), entry.getValue());
|
| | | }
|
| | | return newMap;
|
| | | } else if (obj instanceof RecommendSpecialAdmin) {
|
| | | List<Map.Entry<Long, RecommendSpecialAdmin>> list = new ArrayList<Map.Entry<Long, RecommendSpecialAdmin>>(
|
| | | (Collection) map.entrySet());
|
| | | Collections.sort(list, new Comparator<Map.Entry<Long, RecommendSpecialAdmin>>() {
|
| | | public int compare(Map.Entry<Long, RecommendSpecialAdmin> mapping1,
|
| | | Map.Entry<Long, RecommendSpecialAdmin> mapping2) {
|
| | | int orderby1 = mapping1.getValue().getRecommendSpecial().getOrderby();
|
| | | int orderby2 = mapping2.getValue().getRecommendSpecial().getOrderby();
|
| | | return orderby1 - orderby2;
|
| | | }
|
| | | });
|
| | | LinkedHashMap<Long, Object> newMap = new LinkedHashMap<Long, Object>();
|
| | | for (Entry<Long, RecommendSpecialAdmin> entry : list) {
|
| | | newMap.put(entry.getKey(), entry.getValue());
|
| | | }
|
| | | return newMap;
|
| | | } else if (obj instanceof HotSearchAdmin) {
|
| | | List<Map.Entry<Long, HotSearchAdmin>> list = new ArrayList<Map.Entry<Long, HotSearchAdmin>>(
|
| | | (Collection) map.entrySet());
|
| | | Collections.sort(list, new Comparator<Map.Entry<Long, HotSearchAdmin>>() {
|
| | | public int compare(Map.Entry<Long, HotSearchAdmin> mapping1, Map.Entry<Long, HotSearchAdmin> mapping2) {
|
| | | int orderby1 = mapping1.getValue().getHotSearch().getOrderby();
|
| | | int orderby2 = mapping2.getValue().getHotSearch().getOrderby();
|
| | | return orderby1 - orderby2;
|
| | | }
|
| | | });
|
| | | LinkedHashMap<Long, Object> newMap = new LinkedHashMap<Long, Object>();
|
| | | for (Entry<Long, HotSearchAdmin> entry : list) {
|
| | | newMap.put(entry.getKey(), entry.getValue());
|
| | | }
|
| | | return newMap;
|
| | | } else if (obj instanceof GoodsClassAdmin) {
|
| | | List<Map.Entry<Long, GoodsClassAdmin>> list = new ArrayList<Map.Entry<Long, GoodsClassAdmin>>(
|
| | | (Collection) map.entrySet());
|
| | | Collections.sort(list, new Comparator<Map.Entry<Long, GoodsClassAdmin>>() {
|
| | | public int compare(Map.Entry<Long, GoodsClassAdmin> mapping1,
|
| | | Map.Entry<Long, GoodsClassAdmin> mapping2) {
|
| | | int orderby1 = mapping1.getValue().getGoodsClass().getOrderby();
|
| | | int orderby2 = mapping2.getValue().getGoodsClass().getOrderby();
|
| | | return orderby1 - orderby2;
|
| | | }
|
| | | });
|
| | | LinkedHashMap<Long, Object> newMap = new LinkedHashMap<Long, Object>();
|
| | | for (Entry<Long, GoodsClassAdmin> entry : list) {
|
| | | newMap.put(entry.getKey(), entry.getValue());
|
| | | }
|
| | | return newMap;
|
| | | } else if (obj instanceof RecommendSectionAdmin) {
|
| | | List<Map.Entry<Long, RecommendSectionAdmin>> list = new ArrayList<Map.Entry<Long, RecommendSectionAdmin>>(
|
| | | (Collection) map.entrySet());
|
| | | Collections.sort(list, new Comparator<Map.Entry<Long, RecommendSectionAdmin>>() {
|
| | | public int compare(Map.Entry<Long, RecommendSectionAdmin> mapping1,
|
| | | Map.Entry<Long, RecommendSectionAdmin> mapping2) {
|
| | | int orderby1 = mapping1.getValue().getRecommendSection().getOrderby();
|
| | | int orderby2 = mapping2.getValue().getRecommendSection().getOrderby();
|
| | | return orderby1 - orderby2;
|
| | | }
|
| | | });
|
| | | LinkedHashMap<Long, Object> newMap = new LinkedHashMap<Long, Object>();
|
| | | for (Entry<Long, RecommendSectionAdmin> entry : list) {
|
| | | newMap.put(entry.getKey(), entry.getValue());
|
| | | }
|
| | | return newMap;
|
| | | }
|
| | | return map;
|
| | | }
|
| | |
|
| | | }
|
fanli-facade-goods/src/main/java/org/fanli/facade/goods/utils/taobao/TaoBao110Util.java
fanli-facade-goods/src/main/java/org/fanli/facade/goods/utils/taobao/TaoBaoCookieUtil.java
fanli-facade-goods/src/main/java/org/fanli/facade/goods/utils/taobao/TaoBaoCouponUtil.java
fanli-facade-goods/src/main/java/org/fanli/facade/goods/utils/taobao/TaoBaoHttpUtil.java
fanli-facade-goods/src/main/java/org/fanli/facade/goods/utils/taobao/TaoBaoShopUtil.java
fanli-facade-goods/src/main/java/org/fanli/facade/goods/utils/taobao/TaoBaoUtil.java
fanli-facade-goods/src/main/java/org/fanli/facade/goods/vo/quality/QualityFactoryVO.java
fanli-facade-goods/src/main/java/org/fanli/facade/goods/vo/test.java
fanli-facade-goods/src/test/java/org/fanli/facade/goods/AppTest.java (deleted)
fanli-facade-order/pom.xml
fanli-facade-order/src/main/java/org/fanli/facade/order/dto/hongbao/HongBaoActivityAdmin.java
fanli-facade-order/src/main/java/org/fanli/facade/order/dto/hongbao/HongBaoDTO.java
fanli-facade-order/src/main/java/org/fanli/facade/order/dto/hongbao/TaobaoOrderHongBao.java
fanli-facade-order/src/main/java/org/fanli/facade/order/dto/order/OrderAdmin.java
fanli-facade-order/src/main/java/org/fanli/facade/order/dto/order/OrderVital.java
fanli-facade-order/src/main/java/org/fanli/facade/order/entity/hongbao/HongBao.java
fanli-facade-order/src/main/java/org/fanli/facade/order/entity/hongbao/HongBaoActivity.java
fanli-facade-order/src/main/java/org/fanli/facade/order/entity/hongbao/HongBaoExtra.java
fanli-facade-order/src/main/java/org/fanli/facade/order/entity/hongbao/HongBaoManage.java
fanli-facade-order/src/main/java/org/fanli/facade/order/entity/hongbao/HongBaoOrder.java
fanli-facade-order/src/main/java/org/fanli/facade/order/entity/hongbao/HongBaoV2.java
fanli-facade-order/src/main/java/org/fanli/facade/order/entity/order/CommonOrder.java
fanli-facade-order/src/main/java/org/fanli/facade/order/entity/order/CommonOrderGoods.java
fanli-facade-order/src/main/java/org/fanli/facade/order/entity/order/LostOrder.java
fanli-facade-order/src/main/java/org/fanli/facade/order/entity/order/Order.java
fanli-facade-order/src/main/java/org/fanli/facade/order/entity/order/OrderItem.java
fanli-facade-order/src/main/java/org/fanli/facade/order/entity/order/PidOrder.java
fanli-facade-order/src/main/java/org/fanli/facade/order/entity/order/TaoBaoOrder.java
fanli-facade-order/src/main/java/org/fanli/facade/order/exception/hongbao/HongBaoException.java
fanli-facade-order/src/main/java/org/fanli/facade/order/exception/order/CommonOrderException.java
fanli-facade-order/src/main/java/org/fanli/facade/order/exception/order/OrderItemException.java
fanli-facade-order/src/main/java/org/fanli/facade/order/exception/order/TaoBaoOrderException.java
fanli-facade-order/src/main/java/org/fanli/facade/order/exception/order/TaoBaoWeiQuanDrawBack.java
fanli-facade-order/src/main/java/org/fanli/facade/order/exception/order/TaoBaoWeiQuanException.java
fanli-facade-order/src/main/java/org/fanli/facade/order/exception/order/TaoBaoWeiQuanOrder.java
fanli-facade-order/src/main/java/org/fanli/facade/order/service/hongbao/HongBaoActivityService.java
fanli-facade-order/src/main/java/org/fanli/facade/order/service/hongbao/HongBaoManageService.java
fanli-facade-order/src/main/java/org/fanli/facade/order/service/hongbao/HongBaoService.java
fanli-facade-order/src/main/java/org/fanli/facade/order/service/hongbao/HongBaoV2Service.java
fanli-facade-order/src/main/java/org/fanli/facade/order/service/order/CommonOrderCountService.java
fanli-facade-order/src/main/java/org/fanli/facade/order/service/order/CommonOrderGoodsService.java
fanli-facade-order/src/main/java/org/fanli/facade/order/service/order/CommonOrderService.java
fanli-facade-order/src/main/java/org/fanli/facade/order/service/order/LostOrderService.java
fanli-facade-order/src/main/java/org/fanli/facade/order/service/order/OrderItemServcie.java
fanli-facade-order/src/main/java/org/fanli/facade/order/service/order/OrderProcessService.java
fanli-facade-order/src/main/java/org/fanli/facade/order/service/order/OrderService.java
fanli-facade-order/src/main/java/org/fanli/facade/order/service/order/PidOrderService.java
fanli-facade-order/src/main/java/org/fanli/facade/order/vo/order/CommonOrderGoodsVO.java
fanli-facade-order/src/main/java/org/fanli/facade/order/vo/order/CommonOrderVO.java
fanli-facade-system/lib/MiPush_SDK_Server_2_2_18.jar
fanli-facade-system/lib/PushJavaSDK.jar
fanli-facade-system/lib/alipay-sdk-java20170324180803.jar
fanli-facade-system/lib/javapns-jdk16-2.3.1.jar
fanli-facade-system/lib/json-simple-1.1.1.jar
fanli-facade-system/lib/open-api-sdk-2.0.jar
fanli-facade-system/lib/taobao-sdk-java-auto_1533536267316-20180829.jar
fanli-facade-system/pom.xml
fanli-facade-system/src/main/java/org/fanli/facade/system/dto/common/AppHomeFloatImg.java
fanli-facade-system/src/main/java/org/fanli/facade/system/dto/common/SystemClientParamsAdmin.java
fanli-facade-system/src/main/java/org/fanli/facade/system/dto/common/XCXSettingConfig.java
fanli-facade-system/src/main/java/org/fanli/facade/system/entity/common/Config.java
fanli-facade-system/src/main/java/org/fanli/facade/system/entity/common/CustomerContent.java
fanli-facade-system/src/main/java/org/fanli/facade/system/entity/common/CustomerName.java
fanli-facade-system/src/main/java/org/fanli/facade/system/entity/common/JumpDetail.java
fanli-facade-system/src/main/java/org/fanli/facade/system/entity/common/JumpDetailV2.java
fanli-facade-system/src/main/java/org/fanli/facade/system/entity/common/SystemClientParams.java
fanli-facade-system/src/main/java/org/fanli/facade/system/entity/common/SystemConfig.java
fanli-facade-system/src/main/java/org/fanli/facade/system/entity/common/SystemManage.java
fanli-facade-system/src/main/java/org/fanli/facade/system/entity/common/SystemQuestionCenter.java
fanli-facade-system/src/main/java/org/fanli/facade/system/entity/common/SystemZnx.java
fanli-facade-system/src/main/java/org/fanli/facade/system/service/common/ConfigService.java
fanli-facade-system/src/main/java/org/fanli/facade/system/service/common/SystemClientParamsService.java
fanli-facade-system/src/main/java/org/fanli/facade/system/service/common/SystemConfigService.java
fanli-facade-system/src/main/java/org/fanli/facade/system/service/common/SystemManageService.java
fanli-facade-system/src/main/java/org/fanli/facade/system/service/common/SystemService.java
fanli-facade-user/src/main/java/org/fanli/facade/user/dto/InviteUser.java
fanli-facade-user/src/main/java/org/fanli/facade/user/dto/LoginResult.java
fanli-facade-user/src/main/java/org/fanli/facade/user/dto/Test.java (deleted)
fanli-facade-user/src/main/java/org/fanli/facade/user/dto/UserInfoAdmin.java
fanli-facade-user/src/main/java/org/fanli/facade/user/entity/Test.java (deleted)
fanli-facade-user/src/main/java/org/fanli/facade/user/entity/UserInfoExtra.java
fanli-facade-user/src/main/java/org/fanli/facade/user/entity/UserRank.java
fanli-facade-user/src/main/java/org/fanli/facade/user/entity/UserRankRecord.java
fanli-facade-user/src/main/java/org/fanli/facade/user/entity/UserRankings.java
fanli-facade-user/src/main/java/org/fanli/facade/user/exception/UserAccountException.java
fanli-facade-user/src/main/java/org/fanli/facade/user/exception/UserRankingsException.java
fanli-facade-user/src/main/java/org/fanli/facade/user/service/UserAccountService.java
fanli-facade-user/src/main/java/org/fanli/facade/user/service/UserInfoService.java
fanli-facade-user/src/test/java/org/fanli/facade/user/entity/account/AccountDetails.java
fanli-facade-user/src/test/java/org/fanli/facade/user/entity/account/AccountMessage.java
fanli-service-goods/pom.xml
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/dao/clazz/GoodsClassDao.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/dao/clazz/GoodsClassMapper.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/dao/clazz/GoodsSecondClassDao.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/dao/clazz/GoodsSubClassMapper.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/dao/clazz/MergeClassMapper.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/dao/clazz/SuperGoodsClassDao.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/dao/clazz/taobao/TaoBaoClassMapper.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/dao/clazz/taobao/TaoBaoClassRelationMapper.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/dao/label/LabelClassMapper.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/dao/label/LabelGoodsMapper.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/dao/label/LabelMapper.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/dao/quality/BoutiqueAutoRuleMapper.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/dao/quality/QualityFactoryMapper.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/dao/quality/QualityFlashSaleMapper.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/dao/recommend/ClassRecommendGoodsDao.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/dao/recommend/DynamicRecommendDao.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/dao/recommend/RecommendBannerDao.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/dao/recommend/RecommendBannerV2Dao.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/dao/recommend/RecommendDetailsDao.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/dao/recommend/RecommendLikeDao.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/dao/recommend/RecommendReplyDao.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/dao/recommend/RecommendSectionDao.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/dao/recommend/RecommendSectionDetailDao.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/dao/recommend/RecommendSectionGoodsDao.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/dao/recommend/RecommendSpecialDao.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/dao/recommend/RecommendUserGoodsMapMapper.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/dao/recommend/RecommendUserGoodsMapper.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/dao/recommend/SuperRecommendBannerDao.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/dao/recommend/SuperRecommendBannerV2Dao.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/dao/recommend/SuperRecommendSectionDao.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/dao/recommend/SuperRecommendSpecialDao.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/dao/taobao/CommonGoodsMapper.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/dao/taobao/TBPidDao.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/dao/taobao/TaoBaoCouponDao.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/dao/taobao/TaoBaoGoodsBriefDao.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/dao/taobao/TaoBaoGoodsBriefMapper.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/dao/taobao/TaoBaoGoodsBriefRecordMapper.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/dao/taobao/TaoBaoLinkDao.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/dao/usergoods/CollectionGoodsV2Mapper.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/dao/usergoods/PidUserMapper.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/dao/usergoods/ScanHistoryV2Mapper.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/dao/usergoods/ShareMapper.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/dao/usergoods/TBPidMapper.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/dao/usergoods/UserGoodsStorageMapper.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/dao/usergoods/UserShareGoodsGroupMapper.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/dao/usergoods/UserShareGoodsHistoryMapper.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/dao/usergoods/UserShareGoodsRecordMapper.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/job/QualityFactoryJob.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/job/QuartzManager.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/mapping/clazz/GoodsClassMapper.xml
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/mapping/clazz/GoodsSubClassMapper.xml
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/mapping/clazz/MergeClassMapper.xml
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/mapping/clazz/taobao/TaoBaoClassMapper.xml
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/mapping/clazz/taobao/TaoBaoClassRelationMapper.xml
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/mapping/label/LabelClassMapper.xml
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/mapping/label/LabelGoodsMapper.xml
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/mapping/label/LabelMapper.xml
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/mapping/quality/BoutiqueAutoRuleMapper.xml
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/mapping/quality/QualityFactoryMapper.xml
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/mapping/quality/QualityFlashSaleMapper.xml
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/mapping/taobao/CommonGoodsMapper.xml
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/mapping/taobao/CommonGoodsMapper2.xml
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/mapping/taobao/TaoBaoGoodsBriefMapper.xml
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/mapping/taobao/TaoBaoGoodsBriefRecordMapper.xml
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/mapping/usergoods/CollectionGoodsV2Mapper.xml
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/mapping/usergoods/PidUserMapper.xml
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/mapping/usergoods/ScanHistoryV2Mapper.xml
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/mapping/usergoods/ShareMapper.xml
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/mapping/usergoods/TBPidMapper.xml
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/mapping/usergoods/UserGoodsStorageMapper.xml
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/mapping/usergoods/UserShareGoodsGroupMapper.xml
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/mapping/usergoods/UserShareGoodsHistoryMapper.xml
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/mapping/usergoods/UserShareGoodsRecordMapper.xml
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/service/impl/clazz/GoodsClassServiceImpl.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/service/impl/clazz/GoodsSecondClassServiceImpl.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/service/impl/clazz/GoodsSubClassServiceImpl.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/service/impl/clazz/MergeClassServiceImpl.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/service/impl/clazz/SuperGoodsClassServiceImpl.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/service/impl/clazz/taobao/TaoBaoClassRelationServiceImpl.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/service/impl/clazz/taobao/TaoBaoClassServiceImpl.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/service/impl/label/LabelClassServiceImpl.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/service/impl/label/LabelGoodsServiceImpl.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/service/impl/label/LabelServiceImpl.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/service/impl/quality/BoutiqueAutoRuleServiceImpl.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/service/impl/quality/QualityFactoryServiceImpl.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/service/impl/quality/QualityFlashSaleServiceImpl.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/service/impl/quality/QualityGoodsServiceImpl.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/service/impl/quality/TaoKeGoodsServiceImpl.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/service/impl/recommend/ClassRecommendGoodsServiceImpl.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/service/impl/recommend/DynamicRecommendServiceImpl.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/service/impl/recommend/RecommendBannerServiceImpl.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/service/impl/recommend/RecommendBannerV2ServiceImpl.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/service/impl/recommend/RecommendDetailsServiceImpl.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/service/impl/recommend/RecommendLikeServiceImpl.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/service/impl/recommend/RecommendReplyServiceImpl.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/service/impl/recommend/RecommendSectionDetailServiceImpl.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/service/impl/recommend/RecommendSectionGoodsServiceImpl.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/service/impl/recommend/RecommendSectionServiceImpl.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/service/impl/recommend/RecommendSpecialServiceImpl.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/service/impl/recommend/RecommendUserGoodsServiceImpl.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/service/impl/recommend/SuperGoodsClassServiceImpl.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/service/impl/recommend/SuperRecommendBannerServiceImpl.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/service/impl/recommend/SuperRecommendBannerV2ServiceImpl.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/service/impl/recommend/SuperRecommendSectionServiceImpl.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/service/impl/recommend/SuperRecommendSpecialServiceImpl.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/service/impl/taobao/CommonGoodsServiceImpl.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/service/impl/taobao/TBPidServiceImpl.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/service/impl/taobao/TaoBaoCouponServiceImpl.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/service/impl/taobao/TaoBaoGoodsBriefRecordServiceImpl.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/service/impl/taobao/TaoBaoGoodsBriefServiceImpl.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/service/impl/taobao/TaoBaoLinkServiceImpl.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/service/impl/usergoods/CollectionGoodsV2ServiceImpl.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/service/impl/usergoods/ScanHistoryV2ServiceImpl.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/service/impl/usergoods/ShareGoodsServiceImpl.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/service/impl/usergoods/UserGoodsStorageServiceImpl.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/service/impl/usergoods/UserShareGoodsGroupServiceImpl.java
fanli-service-goods/src/main/java/com/yeshi/fanli/goods/service/impl/usergoods/UserShareGoodsRecordServiceImpl.java
fanli-service-goods/src/main/resource/druid.properties
fanli-service-goods/src/main/resource/spring.xml
fanli-service-goods/src/test/java/org/fanli/service/goods/quality/AppVersionTest.java
fanli-service-order/pom.xml
fanli-service-order/src/main/java/com/fanli/service/order/dao/hongbao/HongBaoManageMapper.java
fanli-service-order/src/main/java/com/fanli/service/order/dao/hongbao/HongBaoV2CountMapper.java
fanli-service-order/src/main/java/com/fanli/service/order/dao/hongbao/HongBaoV2Mapper.java
fanli-service-system/pom.xml
fanli-service-system/src/main/java/com/yeshi/fanli/system/dao/common/SystemClientParamsDao.java
fanli-service-system/src/main/java/com/yeshi/fanli/system/dao/common/SystemClientParamsMapper.java
fanli-service-system/src/main/java/com/yeshi/fanli/system/dao/common/SystemConfigDao.java
fanli-service-system/src/main/java/com/yeshi/fanli/system/dao/common/SystemHelpListDao.java
fanli-service-system/src/main/java/com/yeshi/fanli/system/dao/common/SystemManageDao.java
fanli-service-system/src/main/java/com/yeshi/fanli/system/dao/common/SystemManageMapper.java
fanli-service-system/src/main/java/com/yeshi/fanli/system/dao/common/SystemSecondProblemDao.java
fanli-service-system/src/main/java/com/yeshi/fanli/system/mapping/SystemClientParamsMapper.xml
fanli-service-system/src/main/java/com/yeshi/fanli/system/mapping/SystemManageMapper.xml
fanli-service-system/src/main/java/com/yeshi/fanli/system/service/impl/common/SystemClientParamsServiceImpl.java
fanli-service-system/src/main/java/com/yeshi/fanli/system/service/impl/common/SystemConfigServiceImpl.java
fanli-service-system/src/main/java/com/yeshi/fanli/system/service/impl/common/SystemManageServiceImpl.java
fanli-service-system/src/main/java/com/yeshi/fanli/system/utils/SystemCommonUtils.java
fanli-service-system/src/main/resource/druid.properties
fanli-service-system/src/main/resource/spring.xml
fanli-service-system/src/main/webapp/WEB-INF/web.xml
fanli-utils/src/main/java/org/yeshi/utils/DateUtil.java
fanli-utils/src/main/java/org/yeshi/utils/MoneyBigDecimalUtil.java
fanli-utils/src/main/java/org/yeshi/utils/TimeUtil.java
fanli-utils/src/main/java/org/yeshi/utils/email/MailSendInfo.java
fanli-utils/src/main/java/org/yeshi/utils/email/MailSenderUtil.java
fanli-utils/src/main/java/org/yeshi/utils/email/MyAuthenticator.java
pom.xml |