Commit 28609dab authored by Quxl's avatar Quxl

xx

parent ad5e2b8b
package com.egolm.shop.pojo; package com.egolm.shop.bean;
import javax.persistence.Entity; import javax.persistence.Entity;
......
package com.egolm.shop.pojo; package com.egolm.shop.bean;
import javax.persistence.Entity; import javax.persistence.Entity;
......
package com.egolm.shop.pojo; package com.egolm.shop.bean;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
......
package com.egolm.shop.pojo; package com.egolm.shop.bean;
import javax.persistence.Entity; import javax.persistence.Entity;
......
package com.egolm.shop.pojo.model; package com.egolm.shop.bean;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
......
package com.egolm.shop.pojo.model; package com.egolm.shop.bean;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
......
package com.egolm.shop.pojo; package com.egolm.shop.bean;
import javax.persistence.Entity; import javax.persistence.Entity;
......
package com.egolm.shop.encrypt; package com.egolm.shop.common;
import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
......
package com.egolm.shop.encrypt; package com.egolm.shop.common;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.security.MessageDigest; import java.security.MessageDigest;
......
package com.egolm.shop.config; package com.egolm.shop.common;
import com.egolm.common.bean.Rjx; import com.egolm.common.bean.Rjx;
......
package com.egolm.shop.config; package com.egolm.shop.common.config;
import javax.sql.DataSource; import javax.sql.DataSource;
......
package com.egolm.shop.config; package com.egolm.shop.common.config;
import java.io.IOException; import java.io.IOException;
...@@ -15,15 +15,12 @@ import org.springframework.boot.web.servlet.FilterRegistrationBean; ...@@ -15,15 +15,12 @@ import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.boot.web.servlet.ServletRegistrationBean; import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.DependsOn;
import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure; import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure;
import com.alibaba.druid.spring.boot.autoconfigure.properties.DruidStatProperties; import com.alibaba.druid.spring.boot.autoconfigure.properties.DruidStatProperties;
import com.alibaba.druid.support.http.StatViewServlet; import com.alibaba.druid.support.http.StatViewServlet;
import com.alibaba.druid.support.http.WebStatFilter; import com.alibaba.druid.support.http.WebStatFilter;
import com.alibaba.druid.util.Utils; import com.alibaba.druid.util.Utils;
import com.alibaba.druid.wall.WallConfig;
import com.alibaba.druid.wall.WallFilter;
@Configuration @Configuration
@ConditionalOnWebApplication @ConditionalOnWebApplication
......
package com.egolm.shop.config; package com.egolm.shop.common.config;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
...@@ -12,8 +12,9 @@ import org.springframework.web.servlet.ModelAndView; ...@@ -12,8 +12,9 @@ import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.view.json.MappingJackson2JsonView; import org.springframework.web.servlet.view.json.MappingJackson2JsonView;
import com.egolm.common.bean.Rjx; import com.egolm.common.bean.Rjx;
import com.egolm.shop.aliyunLog.AliyunLogProducer; import com.egolm.shop.common.XException;
import com.egolm.shop.util.I18NUtils; import com.egolm.shop.common.plugins.aliyunLog.AliyunLogProducer;
import com.egolm.shop.common.utils.I18NUtils;
import io.netty.util.internal.ThrowableUtil; import io.netty.util.internal.ThrowableUtil;
......
package com.egolm.shop.config; package com.egolm.shop.common.config;
import java.util.Locale; import java.util.Locale;
......
package com.egolm.shop.config; package com.egolm.shop.common.config;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
......
package com.egolm.shop.config; package com.egolm.shop.common.config;
import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
......
package com.egolm.shop.config; package com.egolm.shop.common.config;
import org.apache.solr.client.solrj.impl.HttpSolrClient; import org.apache.solr.client.solrj.impl.HttpSolrClient;
import org.apache.solr.client.solrj.impl.HttpSolrClient.Builder; import org.apache.solr.client.solrj.impl.HttpSolrClient.Builder;
......
package com.egolm.shop.config; package com.egolm.shop.common.config;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
......
package com.egolm.shop.config; package com.egolm.shop.common.config;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
...@@ -6,8 +6,8 @@ import org.springframework.web.servlet.config.annotation.InterceptorRegistration ...@@ -6,8 +6,8 @@ import org.springframework.web.servlet.config.annotation.InterceptorRegistration
import org.springframework.web.servlet.config.annotation.InterceptorRegistry; import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import com.egolm.shop.config.interceptor.LogInterceptor; import com.egolm.shop.common.interceptor.LogInterceptor;
import com.egolm.shop.config.interceptor.OpenInterceptor; import com.egolm.shop.common.interceptor.OpenInterceptor;
@Configuration @Configuration
public class WebMvcConfig implements WebMvcConfigurer { public class WebMvcConfig implements WebMvcConfigurer {
......
package com.egolm.shop.config.interceptor; package com.egolm.shop.common.interceptor;
import java.util.Date; import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
......
package com.egolm.shop.config.interceptor; package com.egolm.shop.common.interceptor;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
...@@ -15,13 +15,12 @@ import org.springframework.data.redis.core.RedisTemplate; ...@@ -15,13 +15,12 @@ import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
import com.alibaba.fastjson.JSON;
import com.egolm.common.GsonUtil; import com.egolm.common.GsonUtil;
import com.egolm.common.MD5Util; import com.egolm.common.MD5Util;
import com.egolm.common.StringUtil; import com.egolm.common.StringUtil;
import com.egolm.shop.config.XException; import com.egolm.shop.common.XException;
import com.egolm.shop.util.I18NUtils; import com.egolm.shop.common.utils.I18NUtils;
import com.egolm.shop.util.ShopContstrant; import com.egolm.shop.common.utils.ShopContstrant;
@Component @Component
public class OpenInterceptor extends HandlerInterceptorAdapter { public class OpenInterceptor extends HandlerInterceptorAdapter {
......
package com.egolm.shop.aliyunLog; package com.egolm.shop.common.plugins.aliyunLog;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
......
package com.egolm.shop.util; package com.egolm.shop.common.utils;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Calendar; import java.util.Calendar;
...@@ -17,8 +17,7 @@ import com.alibaba.fastjson.JSONArray; ...@@ -17,8 +17,7 @@ import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.egolm.common.HttpUtil; import com.egolm.common.HttpUtil;
import com.egolm.common.StringUtil; import com.egolm.common.StringUtil;
import com.egolm.shop.config.ExceptionHandler; import com.egolm.shop.common.XException;
import com.egolm.shop.config.XException;
@Component @Component
public class Express { public class Express {
......
package com.egolm.shop.util; package com.egolm.shop.common.utils;
import java.text.MessageFormat; import java.text.MessageFormat;
import java.util.Locale; import java.util.Locale;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.MessageSource; import org.springframework.context.MessageSource;
import org.springframework.context.NoSuchMessageException;
import org.springframework.context.i18n.LocaleContextHolder; import org.springframework.context.i18n.LocaleContextHolder;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
......
package com.egolm.shop.util; package com.egolm.shop.common.utils;
public class ShopContstrant { public class ShopContstrant {
......
package com.egolm.shop.util; package com.egolm.shop.common.utils;
import java.net.InetAddress; import java.net.InetAddress;
import java.util.ArrayList; import java.util.ArrayList;
......
package com.egolm.shop.util; package com.egolm.shop.common.utils;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.InputStream; import java.io.InputStream;
......
...@@ -16,8 +16,8 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -16,8 +16,8 @@ import org.springframework.web.bind.annotation.RestController;
import com.egolm.common.StringUtil; import com.egolm.common.StringUtil;
import com.egolm.common.bean.Rjx; import com.egolm.common.bean.Rjx;
import com.egolm.common.jdbc.Page; import com.egolm.common.jdbc.Page;
import com.egolm.shop.common.utils.I18NUtils;
import com.egolm.shop.service.ActivityService; import com.egolm.shop.service.ActivityService;
import com.egolm.shop.util.I18NUtils;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
......
...@@ -13,7 +13,7 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -13,7 +13,7 @@ import org.springframework.web.bind.annotation.RestController;
import com.egolm.common.bean.Rjx; import com.egolm.common.bean.Rjx;
import com.egolm.common.jdbc.Page; import com.egolm.common.jdbc.Page;
import com.egolm.shop.pojo.TCustAddress; import com.egolm.shop.bean.TCustAddress;
import com.egolm.shop.service.AddressService; import com.egolm.shop.service.AddressService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
......
...@@ -17,8 +17,8 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -17,8 +17,8 @@ import org.springframework.web.bind.annotation.RestController;
import com.egolm.common.StringUtil; import com.egolm.common.StringUtil;
import com.egolm.common.bean.Rjx; import com.egolm.common.bean.Rjx;
import com.egolm.common.jdbc.Page; import com.egolm.common.jdbc.Page;
import com.egolm.shop.common.utils.I18NUtils;
import com.egolm.shop.service.BrandService; import com.egolm.shop.service.BrandService;
import com.egolm.shop.util.I18NUtils;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
......
...@@ -14,7 +14,7 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -14,7 +14,7 @@ import org.springframework.web.bind.annotation.RestController;
import com.egolm.common.StringUtil; import com.egolm.common.StringUtil;
import com.egolm.common.bean.Rjx; import com.egolm.common.bean.Rjx;
import com.egolm.common.jdbc.JdbcTemplate; import com.egolm.common.jdbc.JdbcTemplate;
import com.egolm.shop.config.XException; import com.egolm.shop.common.XException;
import com.egolm.shop.service.CommonService; import com.egolm.shop.service.CommonService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
......
...@@ -7,7 +7,7 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -7,7 +7,7 @@ import org.springframework.web.bind.annotation.RestController;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.egolm.common.bean.Rjx; import com.egolm.common.bean.Rjx;
import com.egolm.shop.util.Express; import com.egolm.shop.common.utils.Express;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
......
...@@ -15,9 +15,9 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -15,9 +15,9 @@ import org.springframework.web.bind.annotation.RestController;
import com.egolm.common.StringUtil; import com.egolm.common.StringUtil;
import com.egolm.common.bean.Rjx; import com.egolm.common.bean.Rjx;
import com.egolm.common.jdbc.Page; import com.egolm.common.jdbc.Page;
import com.egolm.shop.config.XException; import com.egolm.shop.common.XException;
import com.egolm.shop.common.utils.I18NUtils;
import com.egolm.shop.service.GoodsService; import com.egolm.shop.service.GoodsService;
import com.egolm.shop.util.I18NUtils;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
......
...@@ -26,8 +26,8 @@ import com.egolm.common.HttpUtil; ...@@ -26,8 +26,8 @@ import com.egolm.common.HttpUtil;
import com.egolm.common.StringUtil; import com.egolm.common.StringUtil;
import com.egolm.common.bean.Rjx; import com.egolm.common.bean.Rjx;
import com.egolm.common.jdbc.Page; import com.egolm.common.jdbc.Page;
import com.egolm.shop.common.utils.XmlUtil;
import com.egolm.shop.service.OrderService; import com.egolm.shop.service.OrderService;
import com.egolm.shop.util.XmlUtil;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
......
...@@ -15,8 +15,8 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -15,8 +15,8 @@ import org.springframework.web.bind.annotation.RestController;
import com.egolm.common.StringUtil; import com.egolm.common.StringUtil;
import com.egolm.common.bean.Rjx; import com.egolm.common.bean.Rjx;
import com.egolm.common.jdbc.Page; import com.egolm.common.jdbc.Page;
import com.egolm.shop.common.utils.I18NUtils;
import com.egolm.shop.service.PageService; import com.egolm.shop.service.PageService;
import com.egolm.shop.util.I18NUtils;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
......
...@@ -11,8 +11,8 @@ import org.springframework.web.bind.annotation.RequestMethod; ...@@ -11,8 +11,8 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.egolm.common.bean.Rjx; import com.egolm.common.bean.Rjx;
import com.egolm.shop.common.utils.I18NUtils;
import com.egolm.shop.service.SystemCtrlService; import com.egolm.shop.service.SystemCtrlService;
import com.egolm.shop.util.I18NUtils;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
......
package com.egolm.shop.controller; package com.egolm.shop.controller;
import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -13,13 +12,12 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -13,13 +12,12 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.egolm.common.DateUtil;
import com.egolm.common.StringUtil; import com.egolm.common.StringUtil;
import com.egolm.common.bean.Rjx; import com.egolm.common.bean.Rjx;
import com.egolm.shop.config.XException; import com.egolm.shop.bean.TCustomer;
import com.egolm.shop.pojo.TCustomer; import com.egolm.shop.common.XException;
import com.egolm.shop.common.utils.I18NUtils;
import com.egolm.shop.service.UserService; import com.egolm.shop.service.UserService;
import com.egolm.shop.util.I18NUtils;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
......
...@@ -22,8 +22,8 @@ import com.aliyuncs.profile.DefaultProfile; ...@@ -22,8 +22,8 @@ import com.aliyuncs.profile.DefaultProfile;
import com.aliyuncs.profile.IClientProfile; import com.aliyuncs.profile.IClientProfile;
import com.egolm.common.StringUtil; import com.egolm.common.StringUtil;
import com.egolm.common.bean.Rjx; import com.egolm.common.bean.Rjx;
import com.egolm.shop.common.utils.ShopContstrant;
import com.egolm.shop.service.SystemCtrlService; import com.egolm.shop.service.SystemCtrlService;
import com.egolm.shop.util.ShopContstrant;
import com.tencent.cloud.CosStsClient; import com.tencent.cloud.CosStsClient;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
......
package com.egolm.shop.pojo;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.lang.reflect.Field;
import java.sql.SQLException;
import java.util.HashSet;
import java.util.Set;
import com.egolm.common.FileUtil;
import com.egolm.common.StringUtil;
import com.egolm.common.jdbc.dialect.MysqlTo;
import com.egolm.common.jdbc.dialect.SqlServerTo;
public class DB {
private static final String top = "D:\\pojo";
private static final String root = top ;//+ "\\egolm-domain\\src\\main\\java";
private static final Set<Field> columns = new HashSet<Field>();
private static final String regex = "^[a-z][A-Z].*$";
public static void main(String[] args) throws Exception {
createDomain();
}
public static void checkJsp(File file) throws Exception {
if(file.exists()) {
if(file.isDirectory()) {
File[] files = file.listFiles();
for(File f : files) {
checkJsp(f);
}
} else {
String extName = FileUtil.getExtName(file);
if("JSP".equals(extName)) {
BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(file)));
String text = StringUtil.read(br);
for(Field field : columns) {
String fieldName = field.getName();
if(fieldName.matches(regex)) {
String name = StringUtil.upperFirst(fieldName);
if(text.contains("\\." + name)) {
System.out.println(file.getAbsolutePath());
}
}
}
}
}
}
}
public static void foo(File file) throws FileNotFoundException {
if(file.exists()) {
if(file.isDirectory()) {
File[] files = file.listFiles();
for(File f : files) {
foo(f);
}
} else {
String extName = FileUtil.getExtName(file);
if("JAVA".equals(extName)) {
BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(file)));
String text = StringUtil.read(br);
try {
br.close();
} catch (IOException e) {
e.printStackTrace();
}
boolean boo = false;
for(Field field : columns) {
String columnName = field.getName();
String oname = StringUtil.upperFirst(columnName);
String name = (columnName.matches(regex) ? columnName : StringUtil.upperFirst(columnName));
String osetName = "set" + oname;
String setName = "set" + name;
String ogetName = "get" + oname;
String getName = "get" + name;
if(text.contains(osetName)) {
boo = true;
System.out.println(osetName);
text = text.replaceAll("\\.\\s*" + osetName + "\\s*\\(", "." + setName + "(");
text = text.replaceAll("\\s+" + osetName + "\\s*\\(", " " + setName + "(");
}
if(text.contains(ogetName)) {
boo = true;
System.out.println(ogetName);
text = text.replaceAll("\\.\\s*" + ogetName + "\\s*\\(", "." + getName + "(");
text = text.replaceAll("\\s+" + ogetName + "\\s*\\(", " " + getName + "(");
}
}
if(boo) {
System.out.println(text);
PrintWriter writer = new PrintWriter(new FileOutputStream(file));
writer.append(text);
writer.close();
}
}
}
}
}
public static void cache(File folder) throws FileNotFoundException, ClassNotFoundException, InstantiationException, IllegalAccessException {
File[] files = folder.listFiles();
if(files != null) {
for(File file : files) {
if(file.isDirectory()) {
cache(file);
} else {
String extName = FileUtil.getExtName(file);
if("JAVA".equals(extName)) {
String javaName = getClassFullName(file, null);
//System.out.println(javaName);
String className = javaName.substring(0, javaName.lastIndexOf("."));
try {
Class<?> clz = Class.forName(className);
Field[] fields = clz.getDeclaredFields();
for(Field field : fields) {
columns.add(field);
}
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
}
}
}
public static void createDomain() throws SQLException {
System.out.println("Directory: " + root);
File[] files = new File(root).listFiles();
for(File file : files) {
System.out.println("Delete: " + file.getAbsolutePath());
file.deleteOnExit();
}
new SqlServerTo(root, "com.egolm.shop.pojo", "曲欣亮", "10.10.0.22:1433", "B2BDB", "ERP", "qiyang@2013").execute();
}
public static String getClassFullName(File file, String x) {
String name = file.getName() + (StringUtil.isBlank(x) ? "" : ("." + x));
if(file.getName().equals("com")) {
return name;
} else {
return getClassFullName(file.getParentFile(), name);
}
}
}
...@@ -8,7 +8,7 @@ import org.apache.solr.client.solrj.impl.HttpSolrClient; ...@@ -8,7 +8,7 @@ import org.apache.solr.client.solrj.impl.HttpSolrClient;
import org.apache.solr.common.SolrInputDocument; import org.apache.solr.common.SolrInputDocument;
import com.egolm.common.StringUtil; import com.egolm.common.StringUtil;
import com.egolm.shop.config.XException; import com.egolm.shop.common.XException;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
public abstract class AbstractSolrApi implements SolrApi { public abstract class AbstractSolrApi implements SolrApi {
......
...@@ -4,7 +4,7 @@ import java.util.List; ...@@ -4,7 +4,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import com.egolm.common.jdbc.Page; import com.egolm.common.jdbc.Page;
import com.egolm.shop.pojo.TCustAddress; import com.egolm.shop.bean.TCustAddress;
public interface AddressService { public interface AddressService {
public List<Map<String,Object>> query(Map<String,Object> params ,Page page); public List<Map<String,Object>> query(Map<String,Object> params ,Page page);
......
...@@ -3,7 +3,7 @@ package com.egolm.shop.service; ...@@ -3,7 +3,7 @@ package com.egolm.shop.service;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import com.egolm.shop.pojo.TCommon; import com.egolm.shop.bean.TCommon;
public interface CommonService { public interface CommonService {
/** /**
......
...@@ -3,8 +3,8 @@ package com.egolm.shop.service; ...@@ -3,8 +3,8 @@ package com.egolm.shop.service;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import com.egolm.shop.pojo.TCustomer; import com.egolm.shop.bean.TCustomer;
import com.egolm.shop.pojo.TShop; import com.egolm.shop.bean.TShop;
public interface UserService { public interface UserService {
public TCustomer getCustomer(String custNO,String shopNO); public TCustomer getCustomer(String custNO,String shopNO);
......
package com.egolm.shop.service;
public interface WeixinTokenService {
}
...@@ -14,10 +14,10 @@ import com.egolm.common.bean.Rjx; ...@@ -14,10 +14,10 @@ import com.egolm.common.bean.Rjx;
import com.egolm.common.jdbc.JdbcTemplate; import com.egolm.common.jdbc.JdbcTemplate;
import com.egolm.common.jdbc.Page; import com.egolm.common.jdbc.Page;
import com.egolm.common.jdbc.dialect.SqlServerDialect; import com.egolm.common.jdbc.dialect.SqlServerDialect;
import com.egolm.shop.pojo.TCustAddress; import com.egolm.shop.bean.TCustAddress;
import com.egolm.shop.common.utils.I18NUtils;
import com.egolm.shop.service.AddressService; import com.egolm.shop.service.AddressService;
import com.egolm.shop.service.UserService; import com.egolm.shop.service.UserService;
import com.egolm.shop.util.I18NUtils;
@Service @Service
public class AddressServiceImpl implements AddressService { public class AddressServiceImpl implements AddressService {
......
...@@ -15,9 +15,9 @@ import com.egolm.common.bean.Rjx; ...@@ -15,9 +15,9 @@ import com.egolm.common.bean.Rjx;
import com.egolm.common.jdbc.JdbcTemplate; import com.egolm.common.jdbc.JdbcTemplate;
import com.egolm.common.jdbc.Page; import com.egolm.common.jdbc.Page;
import com.egolm.common.jdbc.dialect.SqlServerDialect; import com.egolm.common.jdbc.dialect.SqlServerDialect;
import com.egolm.shop.pojo.TCustomer; import com.egolm.shop.bean.TCustomer;
import com.egolm.shop.pojo.TIPBrandAuthorize; import com.egolm.shop.bean.TIPBrandAuthorize;
import com.egolm.shop.pojo.TShop; import com.egolm.shop.bean.TShop;
import com.egolm.shop.service.BrandService; import com.egolm.shop.service.BrandService;
import com.egolm.shop.service.UserService; import com.egolm.shop.service.UserService;
@Service @Service
......
...@@ -13,9 +13,9 @@ import com.egolm.common.StringUtil; ...@@ -13,9 +13,9 @@ import com.egolm.common.StringUtil;
import com.egolm.common.bean.Rjx; import com.egolm.common.bean.Rjx;
import com.egolm.common.jdbc.JdbcTemplate; import com.egolm.common.jdbc.JdbcTemplate;
import com.egolm.common.jdbc.dialect.SqlServerDialect; import com.egolm.common.jdbc.dialect.SqlServerDialect;
import com.egolm.shop.pojo.TCommon; import com.egolm.shop.bean.TCommon;
import com.egolm.shop.common.utils.I18NUtils;
import com.egolm.shop.service.CommonService; import com.egolm.shop.service.CommonService;
import com.egolm.shop.util.I18NUtils;
@Service @Service
public class CommonServiceImpl implements CommonService{ public class CommonServiceImpl implements CommonService{
......
...@@ -13,10 +13,10 @@ import org.springframework.stereotype.Service; ...@@ -13,10 +13,10 @@ import org.springframework.stereotype.Service;
import com.egolm.common.Util; import com.egolm.common.Util;
import com.egolm.common.bean.Rjx; import com.egolm.common.bean.Rjx;
import com.egolm.common.jdbc.JdbcTemplate; import com.egolm.common.jdbc.JdbcTemplate;
import com.egolm.shop.pojo.TCustomer; import com.egolm.shop.bean.TCustomer;
import com.egolm.shop.common.utils.I18NUtils;
import com.egolm.shop.service.CouponService; import com.egolm.shop.service.CouponService;
import com.egolm.shop.service.UserService; import com.egolm.shop.service.UserService;
import com.egolm.shop.util.I18NUtils;
@Service @Service
public class CouponServiceImpl implements CouponService { public class CouponServiceImpl implements CouponService {
private static final Log logger = LogFactory.getLog(CouponServiceImpl.class); private static final Log logger = LogFactory.getLog(CouponServiceImpl.class);
......
...@@ -21,9 +21,9 @@ import com.egolm.common.bean.Rjx; ...@@ -21,9 +21,9 @@ import com.egolm.common.bean.Rjx;
import com.egolm.common.jdbc.JdbcTemplate; import com.egolm.common.jdbc.JdbcTemplate;
import com.egolm.common.jdbc.Page; import com.egolm.common.jdbc.Page;
import com.egolm.common.jdbc.dialect.SqlServerDialect; import com.egolm.common.jdbc.dialect.SqlServerDialect;
import com.egolm.shop.config.XException; import com.egolm.shop.common.XException;
import com.egolm.shop.common.utils.I18NUtils;
import com.egolm.shop.service.GoodsService; import com.egolm.shop.service.GoodsService;
import com.egolm.shop.util.I18NUtils;
@Service @Service
public class GoodsServiceImpl implements GoodsService { public class GoodsServiceImpl implements GoodsService {
...@@ -217,10 +217,6 @@ public class GoodsServiceImpl implements GoodsService { ...@@ -217,10 +217,6 @@ public class GoodsServiceImpl implements GoodsService {
return pics; return pics;
} }
public static void main(String[] args) {
System.out.println((154&3));
}
/** /**
* 收藏及取消收藏 * 收藏及取消收藏
* @Title: updateFlavor * @Title: updateFlavor
...@@ -292,4 +288,14 @@ public class GoodsServiceImpl implements GoodsService { ...@@ -292,4 +288,14 @@ public class GoodsServiceImpl implements GoodsService {
} }
public static void main(String[] arg) {
String orgNo = "1001";
List<String> args = new ArrayList<String>();
args.add("(t.sAgentContractNO = '600001001' and t.nGoodsID = 519)");
String sql1 = "select t.sAgentContractNO, t.nGoodsID, p.sPromoTheme, p.sPromoName, p.sPromoPaperNO, p.sPromoActionTypeID, t.sGroupNO sPromoGroupNO from tYWPromoDtl t, tYWPromoMain p where p.sPromoActionTypeID != '3' and t.sPromoPaperNO = p.sPromoPaperNO and p.nTag&3 = 2 and p.sOrgNO = '" + orgNo + "' " + StringUtil.join(" OR ", " and (", ")", " and (1 = 0) ", args) + " group by t.sAgentContractNO, t.nGoodsID, p.sPromoTheme, p.sPromoName, p.sPromoPaperNO, p.sPromoActionTypeID, t.sGroupNO";
System.out.println(sql1);
}
} }
...@@ -3,9 +3,9 @@ package com.egolm.shop.service.impl; ...@@ -3,9 +3,9 @@ package com.egolm.shop.service.impl;
import java.util.Map; import java.util.Map;
import com.egolm.common.StringUtil; import com.egolm.common.StringUtil;
import com.egolm.shop.pojo.TCustomer; import com.egolm.shop.bean.TCustomer;
import com.egolm.shop.pojo.TShop; import com.egolm.shop.bean.TShop;
import com.egolm.shop.util.ShopContstrant; import com.egolm.shop.common.utils.ShopContstrant;
public class GoodsSql { public class GoodsSql {
......
...@@ -24,11 +24,11 @@ import com.egolm.common.jdbc.Page; ...@@ -24,11 +24,11 @@ import com.egolm.common.jdbc.Page;
import com.egolm.common.jdbc.dialect.Dialect; import com.egolm.common.jdbc.dialect.Dialect;
import com.egolm.common.jdbc.dialect.SqlServerDialect; import com.egolm.common.jdbc.dialect.SqlServerDialect;
import com.egolm.common.jdbc.dialect.bean.Sql; import com.egolm.common.jdbc.dialect.bean.Sql;
import com.egolm.shop.config.XException; import com.egolm.shop.bean.TSalesOrder;
import com.egolm.shop.pojo.model.TSalesOrder; import com.egolm.shop.bean.TSalesOrderDtl;
import com.egolm.shop.pojo.model.TSalesOrderDtl; import com.egolm.shop.common.XException;
import com.egolm.shop.common.utils.I18NUtils;
import com.egolm.shop.service.OrderService; import com.egolm.shop.service.OrderService;
import com.egolm.shop.util.I18NUtils;
@Service @Service
public class OrderServiceImpl implements OrderService { public class OrderServiceImpl implements OrderService {
......
...@@ -34,16 +34,16 @@ import com.egolm.common.jdbc.ResultMutil; ...@@ -34,16 +34,16 @@ import com.egolm.common.jdbc.ResultMutil;
import com.egolm.common.jdbc.dialect.Dialect; import com.egolm.common.jdbc.dialect.Dialect;
import com.egolm.common.jdbc.dialect.SqlServerDialect; import com.egolm.common.jdbc.dialect.SqlServerDialect;
import com.egolm.common.jdbc.dialect.bean.Sql; import com.egolm.common.jdbc.dialect.bean.Sql;
import com.egolm.shop.config.XException; import com.egolm.shop.bean.TCommon;
import com.egolm.shop.encrypt.EgoPasswordEncoder; import com.egolm.shop.bean.TCustomer;
import com.egolm.shop.pojo.TCommon; import com.egolm.shop.bean.TShop;
import com.egolm.shop.pojo.TCustomer; import com.egolm.shop.common.EgoPasswordEncoder;
import com.egolm.shop.pojo.TShop; import com.egolm.shop.common.XException;
import com.egolm.shop.common.utils.I18NUtils;
import com.egolm.shop.common.utils.ShopContstrant;
import com.egolm.shop.service.CommonService; import com.egolm.shop.service.CommonService;
import com.egolm.shop.service.SystemCtrlService; import com.egolm.shop.service.SystemCtrlService;
import com.egolm.shop.service.UserService; import com.egolm.shop.service.UserService;
import com.egolm.shop.util.I18NUtils;
import com.egolm.shop.util.ShopContstrant;
@Service @Service
public class UserServiceImpl implements UserService { public class UserServiceImpl implements UserService {
private static final Log logger = LogFactory.getLog(UserServiceImpl.class); private static final Log logger = LogFactory.getLog(UserServiceImpl.class);
......
package com.egolm.shop.service.impl;
import com.egolm.shop.service.WeixinTokenService;
public class WeixinTokenServiceImpl implements WeixinTokenService {
}
package com.egolm.shop.util;
import java.util.SortedMap;
import java.util.TreeMap;
import com.egolm.common.MD5Util;
public class SolrUtil {
public static void main(String[] args) {
SortedMap<Object,Object> parameters = new TreeMap<Object,Object>();
parameters.put("timestamp", System.currentTimeMillis());
parameters.put("langID", "zh_CN");
parameters.put("terminal", "wechat");
parameters.put("md5Key", "E67720C4E7B84615D7EAF106EBC8E677");
String createSign = MD5Util.createSign("UTF-8", parameters);
parameters.put("sign", createSign);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment